dwarf2read: Silence -Wenum-compare-switch warning
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-30 Simon Marchi <simon.marchi@ericsson.com>
2
3 * dwarf2read.c (dwarf_decode_macro_bytes): Ignore
4 -Wenum-compare-switch warning.
5 (dwarf_decode_macros): Likewise.
6
7 2017-12-30 Tom Tromey <tom@tromey.com>
8 Simon Marchi <simon.marchi@ericsson.com>
9
10 * stap-probe.h (struct stap_parse_info): Add constructor,
11 destructor.
12 * stap-probe.c (stap_parse_argument): Update.
13 * rust-exp.y (rust_lex_tests): Update.
14 * parser-defs.h (struct parser_state): Add constructor,
15 destructor, release method.
16 <expout>: Change type to expression_up.
17 (null_post_parser): Change type.
18 (initialize_expout, reallocate_expout): Remove.
19 * parse.c (parser_state::parser_state): Rename from
20 initialize_expout.
21 (parser_state::release): Rename from reallocate_expout.
22 (write_exp_elt, parse_exp_in_context_1, increase_expout_size):
23 Update.
24 (null_post_parser): Change type of "exp".
25 * dtrace-probe.c (dtrace_probe::build_arg_exprs): Update.
26 * ada-lang.c (resolve, resolve_subexp)
27 (replace_operator_with_call): Change type of "expp".
28 * language.h (struct language_defn) <la_post_parser>: Change type
29 of "expp".
30
31 2017-12-30 Simon Marchi <simon.marchi@ericsson.com>
32
33 * dwarf2read.c (struct mapped_debug_names): Make final.
34 (struct mapped_index): Make final.
35
36 2017-12-29 Simon Marchi <simon.marchi@ericsson.com>
37
38 * common/diagnostics.h
39 (DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES): New macro.
40 * amd64-linux-tdep.c (amd64_canonicalize_syscall): Use it.
41
42 2017-12-29 Simon Marchi <simon.marchi@ericsson.com>
43
44 * linux-thread-db.c (thread_db_detach): Remove call to
45 delete_thread_db_info.
46
47 2017-12-28 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * target.h (enum target_object) <TARGET_OBJECT_HPUX_UREGS,
50 TARGET_OBJECT_HPUX_SOLIB_GOT>: Remove.
51
52 2017-12-27 Franck Jullien <franck.jullien@gmail.com>
53 Stafford Horne <shorne@gmail.com>
54
55 * target-descriptions.c (tdesc_register_in_reggroup_p): Support
56 arbitrary strings.
57 (tdesc_use_registers): Add logic to register new reggroups.
58 (tdesc_reg::group): Update comment to indicate we allow
59 arbitrary strings.
60 * NEWS (Changes since GDB 8.0): Announce that GDB supports
61 arbitrary reggroups.
62
63 2017-12-27 Stafford Horne <shorne@gmail.com>
64
65 * reggroups.c (reggroup_gdbarch_new): New function.
66 (reggroup_find): New function.
67 * reggroups.h (reggroup_gdbarch_new): New function.
68 (reggroup_find): New function.
69
70 2017-12-27 Stafford Horne <shorne@gmail.com>
71
72 * reggroups.c (reggroups_init): Change to depend only on
73 obstack rather than gdbarch.
74 (reggroup_add): Remove logic for forcing premature init.
75 (_initialize_reggroup): Set `reggroups_data` with
76 gdbarch_data_register_pre_init() rather than
77 gdbarch_data_register_post_init().
78
79 2017-12-27 Stafford Horne <shorne@gmail.com>
80
81 * infcmd.c (_initialize_infcmd): Add help for info reg $reggroup
82 and info all-registers $reggroup feature.
83
84 2017-12-23 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * target-descriptions.c (print_c_tdesc)
87 <printf_field_type_assignment>: Add ATTRIBUTE_PRINTF.
88
89 2017-12-21 Simon Marchi <simon.marchi@ericsson.com>
90 Sergio Durigan Junior <sergiodj@redhat.com>
91
92 * target-descriptions.c (print_c_tdesc) <visit>: Don't output
93 field_type declaration, use printf_field_type_assignment
94 instead.
95 <printf_field_type_assignment>: New method.
96 * features/aarch64-core.c, features/aarch64-fpu.c
97 features/arc-arcompact.c, features/arc-v2.c,
98 features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c,
99 features/i386/32bit-mpx.c, features/i386/32bit-sse.c,
100 features/i386/64bit-avx512.c, features/i386/64bit-core.c,
101 features/i386/64bit-mpx.c, features/i386/64bit-sse.c,
102 features/i386/x32-core.c, features/or1k.c,
103 features/rs6000/powerpc-7400.c,
104 features/rs6000/powerpc-altivec32.c,
105 features/rs6000/powerpc-altivec32l.c,
106 features/rs6000/powerpc-altivec64.c,
107 features/rs6000/powerpc-altivec64l.c,
108 features/rs6000/powerpc-cell32l.c,
109 features/rs6000/powerpc-cell64l.c,
110 features/rs6000/powerpc-isa205-altivec32l.c,
111 features/rs6000/powerpc-isa205-altivec64l.c,
112 features/rs6000/powerpc-isa205-vsx32l.c,
113 features/rs6000/powerpc-isa205-vsx64l.c,
114 features/rs6000/powerpc-vsx32.c,
115 features/rs6000/powerpc-vsx32l.c,
116 features/rs6000/powerpc-vsx64.c,
117 features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c,
118 features/s390-tevx-linux64.c, features/s390-vx-linux64.c,
119 features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c,
120 features/s390x-vx-linux64.c: Re-generate.
121
122 2017-12-20 Uros Bizjak <ubizjak@gmail.com>
123
124 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Remove
125 write-only assignment to "insn" variable.
126
127 2017-12-20 Ulrich Weigand <uweigand@de.ibm.com>
128
129 * spu-tdep.c (spu_gdbarch_init): Set set_gdbarch_significant_addr_bit
130 to 64 bits.
131 (ppc_linux_init_abi): Likewise, if Cell/B.E. is supported.
132
133 2017-12-18 Joel Brobecker <brobecker@adacore.com>
134
135 * ada-lang.c (ada_to_fixed_type_1): Rethrow errors with
136 a more detailed exception message when getting an exception
137 while trying to read the value of an XVZ variable.
138 * ada-valprint.c (ada_val_print): Only catch RETURN_MASK_ERROR
139 exceptions. Print an error message when an exception is caught.
140
141 2017-12-18 Joel Brobecker <brobecker@adacore.com>
142
143 * ada-lang.c (assign_component): Strip any TYPE_CODE_TYPEDEF
144 layer from lhs' type.
145 (assign_aggregate): Likewise.
146
147 2017-12-18 Xavier Roirand <roirand@adacore.com>
148
149 * ada-lang.c (ada_convert_actual): Change the way actual value
150 are passed to the inferior when the inferior expects a pointer type.
151
152 2017-12-17 Stafford Horne <shorne@gmail.com>
153
154 * gdb/or1k-tdep.c (show_or1k_debug): Fix function parameter alignment.
155 (or1k_analyse_inst): Likewise.
156 (or1k_single_step_through_delay): Likewise.
157 (or1k_frame_cache): Fix parameter alignment and use paddress()
158 instead of %x.
159
160 2017-12-17 Stafford Horne <shorne@gmail.com>
161
162 * NEWS (Changes since GDB 8.0): Mention new or1k target and new
163 commands to set/show or1k debug.
164
165 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
166
167 * typeprint.c (whatis_exp): Fix ARI warning and reindent "if"
168 condition.
169
170 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
171 Pedro Alves <palves@redhat.com>
172
173 PR cli/16224
174 * NEWS (Changes since GDB 8.0): Mention new '/o' flag.
175 * c-typeprint.c (OFFSET_SPC_LEN): New define.
176 (c_type_print_varspec_prefix): New argument 'struct
177 print_offset_data *'.
178 (c_type_print_base_1): New function and prototype.
179 (c_print_type_1): New function, with code from 'c_print_type'.
180 (c_print_type): Use 'c_print_type_1'.
181 (c_type_print_varspec_prefix): New argument 'struct
182 print_offset_data *'. Use it. Call 'c_type_print_base_1'
183 instead of 'c_print_type_base'.
184 (print_spaces_filtered_with_print_options): New function.
185 (output_access_specifier): Take new argument FLAGS. Modify
186 function to call 'print_spaces_filtered_with_print_options'.
187 (c_print_type_vtable_offset_marker): New function.
188 (c_print_type_union_field_offset): New function.
189 (c_print_type_struct_field_offset): New function.
190 (c_print_type_no_offsets): New function.
191 (c_type_print_base_struct_union): New argument 'struct
192 print_offset_data *'. Print offsets and sizes for
193 struct/union/class fields.
194 * typeprint.c (const struct type_print_options
195 type_print_raw_options): Initialize 'print_offsets'.
196 (static struct type_print_options default_ptype_flags):
197 Likewise.
198 (struct print_offset_data print_offset_default_data): New
199 variable.
200 (whatis_exp): Handle '/o' option.
201 (_initialize_typeprint): Add '/o' flag to ptype's help.
202 * typeprint.h (struct print_offset_data): New struct.
203 (struct type_print_options) <print_offsets>: New field.
204
205 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
206
207 * c-typeprint.c (need_access_label_p): New function.
208 (c_type_print_base_struct_union): New function.
209 (c_type_print_base): Move code to handle
210 TYPE_CODE_{STRUCT,UNION} to the functions mentioned above.
211
212 2017-12-15 Richard Henderson <rth@redhat.com>
213 Uros Bizjak <ubizjak@gmail.com>
214
215 PR gdb/19061
216 * alpha-tdep.c (alpha_software_single_step): Call
217 alpha_deal_with_atomic_sequence here.
218 (set_gdbarch_software_single_step): Set to
219 alpha_software_single_step.
220 * nat/linux-ptrace.h [__alpha__]: Define GDB_ARCH_IS_TRAP_BRKPT
221 and GDB_ARCH_IS_TRAP_HWBKPT.
222
223 2017-12-15 Yao Qi <yao.qi@linaro.org>
224
225 * unittests/memory-map-selftests.c: Wrap test with HAVE_LIBEXPAT.
226
227 2017-12-15 Xavier Roirand <roirand@adacore.com>
228
229 * ada-lang.c (ada_value_primitive_field): Handle field search
230 in case of homonyms.
231 (find_struct_field): Ditto.
232 (ada_search_struct_field): Ditto.
233 (ada_value_struct_elt): Ditto.
234 (ada_lookup_struct_elt_type): Ditto.
235
236 2017-12-14 Simon Marchi <simon.marchi@ericsson.com>
237
238 * python/py-breakpoint.c (bppy_init): Use 'O' format specifier
239 for "qualified" and use PyObject_IsTrue.
240
241 2017-12-14 Jan Kratochvil <jan.kratochvil@redhat.com>
242
243 * dwarf2read.c (dw2_debug_names_iterator::next): Support
244 DW_IDX_type_unit.
245 (debug_names::dwarf5_offset_size, unit_kind): New.
246 (debug_names::insert): Add parameter kind.
247 (debug_names::build): Support DW_IDX_type_unit.
248 (debug_names::recursively_write_psymbols): Update
249 (debug_names::write_psymbols caller.
250 (debug_names::write_one_signatured_type_data)
251 (debug_names::write_one_signatured_type): New.
252 (debug_names::index_key, debug_names::symbol_value)
253 (debug_names::write_psymbols): Add kind.
254 (debug_names::write_one_signatured_type): New.
255 (write_debug_names): Move dwarf5_offset_size to debug_names.
256 Use debug_names::write_one_signatured_type for type units.
257
258 2017-12-14 Joel Brobecker <brobecker@adacore.com>
259
260 * ada-lang.c (ada_value_equal): Add handling of typedef types
261 when comparing array objects.
262
263 2017-12-14 Joel Brobecker <brobecker@adacore.com>
264
265 * ada-tasks.c (read_atcb): Properly set task_info->ptid
266 when !target_has_execution as well.
267 (task_command): Remove error when !target_has_execution.
268
269 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
270
271 * location.h (string_to_event_location): Add match_type
272 parameter.
273 * location.c (string_to_event_location): Likewise.
274 * python/py-breakpoint.c (bppy_init): Handle qualified
275 parameter.
276
277 2017-12-13 Pedro Alves <palves@redhat.com>
278
279 * completer.c (completion_tracker::maybe_add_completion): New
280 'text' and 'word' parameters. Use make_completion_match_str.
281 (completion_tracker::add_completion): New 'text' and 'word'
282 parameters. Pass down.
283 (completion_tracker::recompute_lowest_common_denominator): Change
284 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
285 * completer.h (completion_tracker::add_completion): New 'text' and
286 'word' parameters.
287 (completion_tracker::recompute_lowest_common_denominator): Change
288 parameter type to gdb::unique_xmalloc_ptr rval ref.
289 (completion_tracker::recompute_lowest_common_denominator): Change
290 parameter type to gdb::unique_xmalloc_ptr rval ref.
291 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
292 as well.
293
294 2017-12-13 Pedro Alves <palves@redhat.com>
295
296 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
297 make_completion_match_str.
298 * completer.c: Use gdb::unique_xmalloc_ptr and
299 make_completion_match_str.
300 (make_completion_match_str_1): New.
301 (make_completion_match_str(const char *, const char *,
302 const char *)): New.
303 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
304 const char *, const char *)): New.
305 * completer.h (make_completion_match_str(const char *,
306 const char *, const char *)): New.
307 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
308 const char *, const char *)): New.
309 * interps.c (interpreter_completer): Use make_completion_match_str.
310 * symtab.c (completion_list_add_name, add_filename_to_list): Use
311 make_completion_match_str.
312
313 2017-12-13 Stafford Horne <shorne@gmail.com>
314
315 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
316 strings.
317 (or1k_unwind_pc): Use paddress() instead of %p.
318 (or1k_unwind_sp): Likewise.
319 (or1k_frame_cache): Use host_address_to_string()/paddress()
320 instead of %p and use _() wrapper for message strings.
321
322 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
323
324 * contrib/ari/gdb_ari.sh: Fix typo in help.
325
326 2017-12-13 Joel Brobecker <brobecker@adacore.com>
327
328 * event-top.c (handle_line_of_input): Set server_command.
329
330 2017-12-12 Stafford Horne <shorne@gmail.com>
331 Stefan Wallentowitz <stefan@wallentowitz.de>
332 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
333 Franck Jullien <franck.jullien@gmail.com>
334 Jeremy Bennett <jeremy.bennett@embecosm.com>
335
336 * configure.tgt: Add targets for or1k and or1knd.
337 * or1k-tdep.c: New file.
338 * or1k-tdep.h: New file.
339 * features/Makefile: Add or1k.xml to build.
340 * features/or1k.xml: New file.
341 * features/or1k-core.xml: New file.
342 * features/or1k.c: Generated.
343
344 2017-12-12 Alan Modra <amodra@gmail.com>
345
346 PR tdep/22576
347 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
348 PLT offset, and retrieve r2 from stack when executing in reverse.
349 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
350 rather than PLT address.
351 (ppc64_standard_linkage2_target): Likewise.
352 (ppc64_standard_linkage3_target): Likewise.
353 (ppc64_standard_linkage4_target): Likewise.
354 (ppc64_skip_trampoline_code_1): Adjust to suit.
355
356 2017-12-11 Simon Marchi <simon.marchi@ericsson.com>
357
358 PR gdb/22556
359 * remote.c (remote_thread_name): Return NULL if name is empty.
360 (remote_threads_extra_info): Return NULL if extra info is empty.
361
362 2017-12-11 Pedro Alves <palves@redhat.com>
363
364 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
365 (elf_sym_fns_debug_names): Move to elfread.c.
366 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
367 instead of a sym_fns and add 'index_kind' output parameter. Fill
368 the latter in with the index variant kind if using an index.
369 (enum dw_index_kind): Moved to symfile.h.
370 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
371 (elf_sym_fns_lazy_psyms): Move from defs.h.
372 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
373 interface.
374 * symfile.h (enum class dw_index_kind): New, moved from
375 dwarf2read.c.
376 (dwarf2_initialize_objfile): Change prototype.
377
378 2017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
379
380 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
381 instead of mpfr_set_si to convert mantissa bits.
382
383 2017-12-11 Xavier Roirand <roirand@adacore.com>
384 Joel Brobecker <brobecker@adacore.com>
385
386 * ada-lang.c (ada_tag_value_at_base_address): Change the way
387 tagged type base address is computed.
388 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
389 New enumerate.
390 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
391 element of lai->primitive_type_vector.
392
393 2017-12-08 Pedro Alves <palves@redhat.com>
394
395 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
396 mapped_index_base.
397 (check_match): Adjust to use mock_index directly.
398 (check_find_bounds_finds)
399 (test_mapped_index_find_name_component_bounds): Adjust to work
400 with a mapped_index_base.
401
402 2017-12-08 Pedro Alves <palves@redhat.com>
403
404 * dwarf2read.c (struct mapped_index_base): New, partially factored
405 out from ...
406 (struct mapped_index): ... this. Inherit mapped_index_base.
407 (mapped_index::symbol_name_slot_invalid):
408 (mapped_index::symbol_name_at): Add override marker.
409 (mapped_index::symbol_name_count): New.
410 (struct mapped_debug_names): Inherit mapped_index_base.
411 (mapped_debug_names::symbol_name_at): New.
412 (mapped_debug_names::symbol_name_count): New.
413 (mapped_index::find_name_components_bounds): Rename to ...
414 (mapped_index_base::find_name_components_bounds): ... this.
415 (mapped_index::build_name_components): Rename to ...
416 (mapped_index_base::build_name_components): ... this. Adjust to
417 use mapped_index_base::symbol_name_count and
418 mapped_index_base::symbol_name_slot_invalid.
419 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
420 instead of a mapped_index. Use
421 dw2_expand_symtabs_matching_symbol.
422
423 2017-12-08 Pedro Alves <palves@redhat.com>
424
425 * dwarf2read.c (mapped_index::symbol_table_slot): New.
426 (mapped_index::address_table): Now a gdb::array_view of const
427 gdb_byte.
428 (mapped_index::symbol_table): Now a gdb::array_view of
429 symbol_table_slot.
430 (mapped_index::address_table_size)
431 (mapped_index::symbol_table_slots): Delete.
432 (create_addrmap_from_index): Adjust.
433 (find_slot_in_mapped_hash): Adjust.
434 (read_index_from_section): Adjust.
435 (dwarf2_read_index): Adjust.
436
437 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
438 Pedro Alves <palves@redhat.com>
439
440 * defs.h (elf_sym_fns_debug_names): New declaration.
441 * dwarf2read.c: Include "hash_enum.h".
442 (mapped_debug_names): New.
443 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
444 debug_names_table.
445 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
446 (struct dwz_file): Add debug_names.
447 (dwarf2_per_objfile::locate_sections): Handle debug_names and
448 debug_aranges.
449 (locate_dwz_sections): Handle debug_names.
450 (create_signatured_type_table_from_debug_names)
451 (create_addrmap_from_aranges): New.
452 (dwarf2_read_index): Update function comment.
453 (dwarf5_augmentation): Moved up.
454 (read_debug_names_from_section, create_cus_from_debug_names_list)
455 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
456 (dwarf5_djb_hash): Moved up.
457 (dw2_debug_names_iterator): New.
458 (read_indirect_string_at_offset): New declaration.
459 (mapped_debug_names::namei_to_name)
460 (dw2_debug_names_iterator::find_vec_in_debug_names)
461 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
462 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
463 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
464 New.
465 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
466 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
467 (debug_names::build): Update djb_hash caller.
468 (write_debug_names): Move out and rename augmentation to
469 dwarf5_augmentation.
470 * elfread.c (elf_sym_fns_debug_names): New.
471 * psymtab.h (dwarf2_debug_names_functions): New declaration.
472 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
473 debug_aranges.
474 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
475
476 2017-12-08 Pedro Alves <palves@redhat.com>
477
478 * common/hash_enum.h: New file.
479
480 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
481
482 * dwarf2read.c (create_cu_from_index_list): New from ...
483 (create_cus_from_index_list): ... this function, use it.
484 (dw_expand_symtabs_matching_file_matcher)
485 (dw2_expand_symtabs_matching_one): New from ...
486 (dw2_expand_symtabs_matching): ... this function, use them.
487
488 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
489
490 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
491 declarations from elfread.c.
492 (dwarf2_initialize_objfile): Change return value.
493 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
494 declarations to defs.h.
495 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
496 * symfile.h (dwarf2_initialize_objfile): Change return type.
497
498 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
499 Pedro Alves <palves@redhat.com>
500
501 * contrib/gdb-add-index.sh (index): Rename to ...
502 (index4): ... here.
503 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
504 Support also .debug_names and .debug_str.
505 * dwarf2read.c: Include cmath, set, list.
506 (INDEX_SUFFIX): Rename to ...
507 (INDEX4_SUFFIX): ... here.
508 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
509 (file_write(FILE *, const void *, size_t)): New.
510 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
511 (data_buf::append_unsigned_leb128, data_buf::empty): New.
512 (data_buf::file_write): Use ::file_write.
513 (data_buf::c_str, dwarf5_djb_hash, debug_names)
514 (check_dwarf64_offsets): New.
515 (psyms_seen_size, write_gdbindex): New from
516 write_psymtabs_to_index code.
517 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
518 (enum dw_index_kind): New.
519 (write_psymtabs_to_index): New parameter index_kind. Support
520 filename_str and out_file_str. Move code to write_gdbindex,
521 possibly call write_debug_names.
522 (save_gdb_index_command): New parameter -dwarf-5.
523 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
524
525 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
526 Pedro Alves <palves@redhat.com>
527
528 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
529 comment.
530 (GDB_ADD_INDEX): New variable.
531 <$want_index>: Call $GDB_ADD_INDEX.
532
533 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
534
535 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
536 "expression_up" inside the TRY block.
537
538 2017-12-08 Yao Qi <yao.qi@linaro.org>
539
540 * breakpoint.c (update_watchpoint): Call
541 address_significant.
542
543 2017-12-08 Yao Qi <yao.qi@linaro.org>
544
545 * breakpoint.c (adjust_breakpoint_address): Call
546 address_significant.
547
548 2017-12-08 Yao Qi <yao.qi@linaro.org>
549
550 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
551 significant_addr_bit.
552 * gdbarch.sh (significant_addr_bit): New.
553 * gdbarch.c, gdbarch.h: Re-generated.
554 * target.c (memory_xfer_partial): Call address_significant.
555 * utils.c (address_significant): New function.
556 * utils.h (address_significant): Declare.
557
558 2017-12-08 Tom Tromey <tom@tromey.com>
559
560 * printcmd.c (ui_printf): Update. Use std::vector.
561 * common/format.h (struct format_piece): Add constructor.
562 <string>: Now const.
563 (class format_pieces): New class.
564 (parse_format_string, free_format_pieces)
565 (free_format_pieces_cleanup): Remove.
566 * common/format.c (format_pieces::format_pieces): Rename from
567 parse_format_string. Update.
568 (free_format_pieces, free_format_pieces_cleanup): Remove.
569 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
570 * ax-gdb.h (gen_printf): Remove argument.
571 * ax-gdb.c (gen_printf): Remove "frags" argument.
572 (maint_agent_printf_command): Update. Use std::vector.
573
574 2017-12-08 Yao Qi <yao.qi@linaro.org>
575
576 PR breakpionts/22567
577 * linespec.c (minsym_found): Set sal.section.
578
579 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
580
581 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
582
583 2017-12-07 Keith Seitz <keiths@redhat.com>
584
585 PR breakpoints/22569
586 * location.c (string_to_explicit_location): When terminating
587 parsing early, break out of enclosing loop instead of returning.
588
589 2017-12-07 Keith Seitz <keiths@redhat.com>
590
591 * NEWS (New commands): Mention set/show print type nested-type-limit.
592 * c-typeprint.c (c_type_print_base): Print out nested types.
593 * dwarf2read.c (struct typedef_field_list): Rename to ...
594 (struct decl_field_list): ... this. Change all uses.
595 (struct field_info) <nested_types_list, nested_types_list_count>:
596 New fields.
597 (add_partial_symbol): Look for nested type definitions in C++, too.
598 (dwarf2_add_typedef): Rename to ...
599 (dwarf2_add_type_defn): ... this.
600 (type_can_define_types): New function.
601 Update assertion to use type_can_define_types.
602 Permit NULL for a field's name.
603 (process_structure_scope): Handle child DIEs of types that can
604 define types.
605 Copy the list of nested types into the type struct.
606 * gdbtypes.h (struct typedef_field): Rename to ...
607 (struct decl_field): ... this. Change all uses.
608 [is_protected, is_private]: New fields.
609 (struct cplus_struct_type) <nested_types, nested_types_count>: New
610 fields.
611 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
612 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
613 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
614 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
615 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
616 default value for print_nested_type_limit.
617 (print_nested_type_limit): New static variable.
618 (set_print_type_nested_types, show_print_type_nested_types): New
619 functions.
620 (_initialize_typeprint): Register new commands for set/show
621 `print-nested-type-limit'.
622 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
623 New field.
624
625 2017-12-07 Tom Tromey <tom@tromey.com>
626
627 PR breakpoints/22511:
628 * breakpoint.c (commands_command_1): Don't throw an exception when
629 no commands have been read.
630
631 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
632
633 PR c++/21222
634 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
635 range-for variable.
636
637 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
638
639 * common/selftest.h (struct selftest): Add virtual destructor.
640
641 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
642
643 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
644 over basic location code. Implement explicit location keywords.
645 (bppy_init_validate_args): New function.
646 * NEWS: Document Python explicit breakpoint locations.
647
648 2017-12-07 Joel Brobecker <brobecker@adacore.com>
649
650 * MAINTAINERS: Restore target entries for m68hc11-elf,
651 score-elf and xstormy16-elf, incorrectly removed in a previous
652 patch meant to only update the list of active maintainers.
653
654 2017-12-06 Pedro Alves <palves@redhat.com>
655
656 * break-catch-syscall.c (insert_catch_syscall)
657 (remove_catch_syscall): Adjust to pass reference to
658 inf_data->syscalls_counts directly via gdb::array_view.
659 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
660 and gdb::array_view.
661 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
662 * remote.c (remote_set_syscall_catchpoint): Likewise.
663 * target-debug.h (target_debug_print_bool): New.
664 (define target_debug_print_gdb_array_view_const_int): New.
665 * target-delegates.c: Regenerate.
666 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
667 gdb::array_view and bool.
668 (target_set_syscall_catchpoint): Likewise.
669
670 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
671
672 * break-catch-syscall.c (catch_syscall_completer): Get pointers
673 to syscall group strings after building the string vector.
674
675 2017-12-06 Pedro Alves <palves@redhat.com>
676
677 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
678 "qXfer:features:read"" is disabled.
679 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
680 Check packet_config_support instead of packet->support directly.
681
682 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
683
684 * target-descriptions.c (struct tdesc_feature) <registers>: Use
685 tdesc_reg_up typedef.
686 (struct target_desc) <features>: Use tdesc_feature_up typedef.
687
688 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * target-descriptions.c (struct tdesc_type): Use default
691 destructor.
692 <u>: Remove.
693 <accept>: Remove.
694 (struct tdesc_type_builtin): New.
695 (struct tdesc_type_vector): New.
696 (struct tdesc_type_with_fields): New.
697 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
698 (tdesc_gdb_type): Remove.
699 (tdesc_register_type): Adjust.
700 (tdesc_create_vector): Create tdesc_type_vector.
701 (tdesc_create_struct): Create tdesc_type_with_fields.
702 (tdesc_set_struct_size): Change parameter type.
703 (tdesc_create_union): Create tdesc_type_with_fields.
704 (tdesc_create_flags): Likewise.
705 (tdesc_create_enum): Likewise.
706 (tdesc_add_field): Change parameter type.
707 (tdesc_add_typed_bitfield): Likewise.
708 (tdesc_add_bitfield): Likewise.
709 (tdesc_add_flag): Likewise.
710 (tdesc_add_enum_value): Likewise.
711 (print_c_tdesc) <visit>: Remove overload with tdesc_type
712 parameter, add overloads for tdesc_type_builtin,
713 tdesc_type_with_fields and tdesc_type_vector.
714 <m_printed_type>: Remove.
715 <m_printed_element_type, m_printed_type_with_fields>: Add.
716 * target-descriptions.h (tdesc_create_enum): Change return type.
717 (tdesc_add_typed_bitfield): Change parameter type.
718 (tdesc_add_enum_value): Change parameter type.
719 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
720 type to tdesc_type_with_fields.
721 (tdesc_start_struct): Adjust.
722 (tdesc_start_flags): Adjust.
723 (tdesc_start_enum): Adjust.
724 (tdesc_start_field): Adjust.
725 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
726 (struct tdesc_type_vector): Forward-declare.
727 (struct tdesc_type_with_fields): Forward-declare.
728 (tdesc_create_struct): Change return type.
729 (tdesc_create_union): Likewise.
730 (tdesc_create_flags): Likewise.
731 (tdesc_add_field): Change parameter type.
732 (tdesc_set_struct_size): Likewise.
733 (tdesc_add_bitfield): Likewise.
734 (tdesc_add_flag): Likewise.
735 * features: Re-generate C files.
736
737 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
740 (struct tdesc_arch_reg): Add constructor.
741 (DEF_VEC_O (tdesc_arch_reg)): Remove.
742 (struct tdesc_arch_data): Initialize fields.
743 <arch_regs>: Change type to std::vector.
744 (target_find_description): Adjust.
745 (tdesc_find_type): Adjust.
746 (tdesc_data_init): Call tdesc_arch_data constructor.
747 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
748 (tdesc_data_cleanup): Free data with delete.
749 (tdesc_numbered_register): Adjust.
750 (tdesc_find_arch_register): Adjust.
751 (tdesc_use_registers): Adjust.
752
753 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * target-descriptions.c (tdesc_type_field): Remove typedef.
756 (DEF_VEC_O (tdesc_type_field)): Remove.
757 (struct tdesc_type_field): Add constructor.
758 <name>: Change type to std::string.
759 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
760 kind uses it.
761 <~tdesc_type>: Destroy vector if the type kind uses it.
762 <u::u::fields>: Change type to std::vector.
763 (tdesc_gdb_type): Adjust.
764 (tdesc_add_field): Adjust.
765 (tdesc_add_typed_bitfield): Adjust.
766 (tdesc_add_field): Adjust.
767 (tdesc_add_enum_value): Adjust.
768 (class print_c_tdesc) <visit>: Adjust.
769
770 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * target-descriptions.c (struct tdesc_type) <name>: Change type
773 to std::string.
774 <~tdesc_type>: Don't manually free name.
775 <operator==>: Adjust.
776 (tdesc_named_type): Adjust.
777 (tdesc_find_type): Adjust.
778 (tdesc_gdb_type): Adjust.
779 (class print_c_tdesc) <visit>: Adjust.
780
781 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * target-descriptions.c (tdesc_type_p): Remove typedef.
784 (DEF_VEC_P (tdesc_type_p)): Remove.
785 (struct tdesc_feature) <types>: Change type to std::vector.
786 <~tdesc_feature>: Replace with default implementation.
787 <accept>: Adjust.
788 (tdesc_named_type): Adjust.
789 (tdesc_create_vector): Adjust.
790 (tdesc_create_struct): Adjust.
791 (tdesc_create_union): Adjust.
792 (tdesc_create_flags): Adjust.
793 (tdesc_create_enum): Adjust.
794
795 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
796
797 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
798 type of name_ parameter, adjust to std::string change.
799 <name, group, type>: Change type to std::string.
800 <~tdesc_reg>: Replace with default implementation.
801 <operator==>: Adjust.
802 (tdesc_find_register_early): Adjust.
803 (tdesc_register_name): Adjust.
804 (tdesc_register_type): Adjust.
805 (tdesc_register_in_reggroup_p): Adjust.
806 (class print_c_tdesc) <visit>: Adjust.
807 (class print_c_feature) <visit>: Adjust.
808 * features/arc-arcompact.c: Re-generate.
809 * features/arc-v2.c: Re-generate.
810
811 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
812
813 * target-descriptions.c (tdesc_reg_p): Remove typedef.
814 (DEF_VEC_P (tdesc_reg_p)): Remove.
815 (struct tdesc_feature) <registers>: Change type to std::vector.
816 <~tdesc_feature>: Don't manually free registers.
817 <accept>: Adjust.
818 <operator==>: Adjust.
819 (tdesc_has_registers): Adjust.
820 (tdesc_find_register_early): Adjust.
821 (tdesc_use_registers): Adjust.
822 (tdesc_create_reg): Adjust.
823
824 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
825
826 * target-descriptions.c (tdesc_feature) <name>: Change type to
827 std::string.
828 <~tdesc_feature>: Don't manually free name.
829 <operator==>: Adjust.
830 (tdesc_find_feature): Adjust.
831 (tdesc_feature_name): Adjust.
832 (class print_c_tdesc) <visit_pre>: Adjust.
833 (class print_c_feature) <visit_pre>: Adjust.
834
835 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
836
837 * target-descriptions.c (tdesc_feature_p): Remove typedef.
838 (DEF_VEC_P (tdesc_feature_p)): Remove.
839 (struct target_desc) <features>: Change type to std::vector.
840 <~target_desc>: Replace with default implementation.
841 <accept>: Adjust.
842 <operator==>: Adjust.
843 (tdesc_has_registers): Adjust.
844 (tdesc_find_feature): Adjust.
845 (tdesc_use_registers): Adjust.
846 (tdesc_create_feature): Adjust.
847
848 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
849
850 * target-descriptions.c (arch_p): Remove typedef.
851 (DEF_VEC_P (arch_p)): Remove.
852 (struct target_desc) <compatible>: Change type to std::vector.
853 <~target_desc>: Don't manually free compatible.
854 (tdesc_compatible_p): Adjust.
855 (tdesc_add_compatible): Adjust.
856 (class print_c_tdesc) <visit_pre>: Adjust.
857
858 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
859
860 * target-descriptions.c (property_s): Remove typedef.
861 (DEF_VEC_O (property_s)): Remove.
862 (struct target_desc) <properties>: Make an std::vector.
863 <~target_desc>: Don't manually free properties.
864 (tdesc_property): Adjust.
865 (set_tdesc_property): Adjust.
866 (class print_c_tdesc) <visit_pre>: Adjust.
867
868 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
869
870 * common/gdb_assert.h (gdb_static_assert): Redefine using
871 static_assert.
872
873 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
874
875 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
876 unused variables.
877 (ada_is_redundant_range_encoding): Likewise.
878 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
879 Likewise.
880 * alpha-tdep.c (alpha_software_single_step): Likewise.
881 * arm-tdep.c (_initialize_arm_tdep): Likewise.
882 * auto-load.c (info_auto_load_cmd): Likewise.
883 * break-catch-syscall.c (insert_catch_syscall): Likewise.
884 (remove_catch_syscall): Likewise.
885 * breakpoint.c (condition_completer): Likewise.
886 (clear_command): Likewise.
887 (update_breakpoint_locations): Likewise.
888 * btrace.c (btrace_disable): Likewise.
889 (btrace_teardown): Likewise.
890 (btrace_maint_update_pt_packets): Likewise.
891 (maint_btrace_clear_cmd): Likewise.
892 * cli/cli-decode.c (lookup_cmd_1): Likewise.
893 (lookup_cmd_composition): Likewise.
894 * cli/cli-dump.c (scan_filename): Likewise.
895 (restore_command): Likewise.
896 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
897 * compile/compile-object-load.c (compile_object_load): Likewise.
898 * compile/compile-object-run.c (compile_object_run): Likewise.
899 * compile/compile.c (compile_to_object): Likewise.
900 * completer.c (filename_completer): Likewise.
901 (complete_files_symbols): Likewise.
902 (complete_expression): Likewise.
903 * corelow.c (core_open): Likewise.
904 * ctf.c (ctf_start): Likewise.
905 (ctf_write_status): Likewise.
906 (ctf_write_uploaded_tsv): Likewise.
907 (ctf_write_definition_end): Likewise.
908 (ctf_open_dir): Likewise.
909 (ctf_xfer_partial): Likewise.
910 (ctf_trace_find): Likewise.
911 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
912 Likewise.
913 * dwarf2loc.c (allocate_piece_closure): Likewise.
914 (indirect_pieced_value): Likewise.
915 (dwarf2_evaluate_loc_desc_full): Likewise.
916 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
917 (dw2_expand_symtabs_matching): Likewise.
918 (dw2_map_symbol_filenames): Likewise.
919 (read_and_check_comp_unit_head): Likewise.
920 (read_cutu_die_from_dwo): Likewise.
921 (lookup_dwo_unit): Likewise.
922 (read_comp_units_from_section): Likewise.
923 (dwarf2_compute_name): Likewise.
924 (handle_DW_AT_stmt_list): Likewise.
925 (create_cus_hash_table): Likewise.
926 (create_dwp_v2_section): Likewise.
927 (dwarf2_rnglists_process): Likewise.
928 (dwarf2_ranges_process): Likewise.
929 (dwarf2_record_block_ranges): Likewise.
930 (is_vtable_name): Likewise.
931 (read_formatted_entries): Likewise.
932 (skip_form_bytes): Likewise.
933 * elfread.c (elf_symtab_read): Likewise.
934 * exec.c (exec_file_command): Likewise.
935 * f-valprint.c (f_val_print): Likewise.
936 (info_common_command_for_block): Likewise.
937 * guile/guile.c (initialize_scheme_side): Likewise.
938 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
939 * guile/scm-cmd.c (cmdscm_completer): Likewise.
940 (gdbscm_register_command_x): Likewise.
941 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
942 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
943 * guile/scm-ports.c (file_port_magic): Likewise.
944 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
945 (ppscm_pretty_print_one_value): Likewise.
946 (ppscm_print_children): Likewise.
947 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
948 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
949 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
950 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
951 * i386-tdep.c (i386_register_reggroup_p): Likewise.
952 * infcmd.c (run_command_1): Likewise.
953 (until_next_fsm_clean_up): Likewise.
954 * linespec.c (linespec_complete): Likewise.
955 (find_label_symbols): Likewise.
956 * m2-valprint.c (m2_val_print): Likewise.
957 * memattr.c (require_user_regions): Likewise.
958 (lookup_mem_region): Likewise.
959 (disable_mem_command): Likewise.
960 (mem_delete): Likewise.
961 * mep-tdep.c (mep_register_name): Likewise.
962 (mep_analyze_prologue): Likewise.
963 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
964 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
965 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
966 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
967 * minidebug.c (lzma_open): Likewise.
968 * minsyms.c (lookup_minimal_symbol): Likewise.
969 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
970 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
971 (mips_o64_return_value): Likewise.
972 (mips_single_step_through_delay): Likewise.
973 (_initialize_mips_tdep): Likewise.
974 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
975 (nios2_software_single_step): Likewise.
976 * parse.c (find_minsym_type_and_address): Likewise.
977 * psymtab.c (psym_relocate): Likewise.
978 * python/py-breakpoint.c (bppy_get_commands): Likewise.
979 (gdbpy_breakpoint_modified): Likewise.
980 * python/py-infevents.c (create_inferior_call_event_object):
981 Likewise.
982 * python/py-record-btrace.c (btpy_list_item): Likewise.
983 * python/py-type.c (typy_str): Likewise.
984 * python/py-value.c (valpy_call): Likewise.
985 * python/python.c (do_start_initialization): Likewise.
986 * record-btrace.c (record_btrace_insn_history_range): Likewise.
987 (record_btrace_call_history_range): Likewise.
988 (record_btrace_record_method): Likewise.
989 (record_btrace_xfer_partial): Likewise.
990 (btrace_get_frame_function): Likewise.
991 * record-full.c (record_full_open): Likewise.
992 * record.c (get_context_size): Likewise.
993 * registry.h (DEFINE_REGISTRY): Likewise.
994 * remote-fileio.c (remote_fileio_request): Likewise.
995 * remote.c (remote_update_thread_list): Likewise.
996 (remote_check_symbols): Likewise.
997 (remote_commit_resume): Likewise.
998 (remote_interrupt): Likewise.
999 (remote_insert_breakpoint): Likewise.
1000 (compare_sections_command): Likewise.
1001 * rust-exp.y (super_name): Likewise.
1002 (lex_string): Likewise.
1003 (convert_ast_to_type): Likewise.
1004 (convert_ast_to_expression): Likewise.
1005 * rust-lang.c (rust_print_struct_def): Likewise.
1006 (rust_print_type): Likewise.
1007 (rust_evaluate_subexp): Likewise.
1008 * rx-tdep.c (rx_register_type): Likewise.
1009 * ser-event.c (serial_event_clear): Likewise.
1010 * serial.c (serial_open): Likewise.
1011 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
1012 * symfile.c (section_is_overlay): Likewise.
1013 (overlay_unmapped_address): Likewise.
1014 (overlay_mapped_address): Likewise.
1015 (simple_overlay_update_1): Likewise.
1016 (simple_overlay_update): Likewise.
1017 * symtab.c (symbol_find_demangled_name): Likewise.
1018 (search_symbols): Likewise.
1019 * target-descriptions.c (tdesc_predefined_type): Likewise.
1020 * target.c (target_commit_resume): Likewise.
1021 * thread.c (print_selected_thread_frame): Likewise.
1022 * top.c (new_ui_command): Likewise.
1023 (gdb_readline_no_editing): Likewise.
1024 * tracefile-tfile.c (tfile_open): Likewise.
1025 * tracepoint.c (create_tsv_from_upload): Likewise.
1026 * utils.c (quit): Likewise.
1027 (defaulted_query): Likewise.
1028 * valarith.c (value_concat): Likewise.
1029 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
1030 * xml-tdesc.c (target_fetch_description_xml): Likewise.
1031 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1032 (xtensa_pseudo_register_write): Likewise.
1033
1034 2017-12-04 Tom Tromey <tom@tromey.com>
1035
1036 * NEWS: Mention Rust trait object inspection.
1037
1038 2017-12-04 Pedro Alves <palves@redhat.com>
1039
1040 PR gdb/22499
1041 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
1042 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
1043 (vex2_prefix_p, vex3_prefix_p): New functions.
1044 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
1045 VEX3 prefixes.
1046 (fixup_riprel): Set VEX3.!B.
1047
1048 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * target.h (mem_region_vector): Remove.
1051 (struct target_ops) <to_memory_map>: Change return type to
1052 std::vector<mem_region>.
1053 * target-debug.h (target_debug_print_mem_region_vector): Rename
1054 to ...
1055 (target_debug_print_std_vector_mem_region): ... this.
1056 * target-delegates.c: Re-generate.
1057
1058 2017-12-03 Pedro Alves <palves@redhat.com>
1059
1060 * make-target-delegates (munge_type): Also munge '<', '>', and
1061 ':'. Avoid double underscores in identifiers, and trailing
1062 underscores.
1063 * target-debug.h
1064 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
1065 ...
1066 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
1067 * target-delegates.c: Regenerate.
1068
1069 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1070
1071 * common/poison.h (XDELETE): Fix typo.
1072
1073 2017-12-01 Andrew Cagney <cagney@redhat.com>
1074 Joel Brobecker <brobecker@adacore.com>
1075 Sergio Durigan Junior <sergiodj@redhat.com>
1076
1077 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
1078 feature.
1079 * coffread.c (coff_symfile_read): Do not map over sections with
1080 'coff_locate_sections' if readnever is on.
1081 * dwarf2read.c (dwarf2_has_info): Return 0 if
1082 readnever is on.
1083 * elfread.c (elf_symfile_read): Do not map over sections with
1084 'elf_locate_sections' if readnever is on.
1085 * main.c (validate_readnow_readnever): New function.
1086 (captured_main_1): Add support for --readnever.
1087 (print_gdb_help): Document --readnever.
1088 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
1089 flag.
1090 * symfile.c (readnever_symbol_files): New global.
1091 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
1092 'READNEVER_SYMBOL_FILES' is set.
1093 (validate_readnow_readnever): New function.
1094 (symbol_file_command): Handle '-readnever' option.
1095 Call 'validate_readnow_readnever'.
1096 (add_symbol_file_command): Handle '-readnever' option.
1097 Call 'validate_readnow_readnever'.
1098 (_initialize_symfile): Document new '-readnever' option for
1099 both 'symbol-file' and 'add-symbol-file' commands.
1100 * top.h (readnever_symbol_files): New extern global.
1101 * xcoffread.c (xcoff_initial_scan): Do not read debug
1102 information if readnever is on.
1103
1104 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
1105
1106 * symfile.c (symbol_file_command): Call
1107 'symbol_file_add_main_1' only after processing all command
1108 line options.
1109 (add_symbol_file_command): Modify logic to make arguments
1110 position-independent.
1111
1112 2017-12-01 Joel Brobecker <brobecker@adacore.com>
1113
1114 * ada-lang.c (symbol_list_obstack): Delete.
1115 (resolve_subexp): Make sure "candidates" gets xfree'ed.
1116 (ada_lookup_symbol_list_worker): Remove the limitation that
1117 the result is only good until the next call, now making it
1118 the responsibility of the caller to free the result when no
1119 longer needed. Adjust the function's intro comment accordingly.
1120 (ada_lookup_symbol_list): Adjust the function's intro comment.
1121 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
1122 (ada_lookup_encoded_symbol, get_var_value): Likewise.
1123 (_initialize_ada_language): Remove symbol_list_obstack
1124 initialization.
1125 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
1126 (write_var_or_type, write_name_assoc): Likewise.
1127
1128 2017-12-01 Tom Tromey <tom@tromey.com>
1129
1130 * Makefile.in (all_deps_files): New variable.
1131 Include .Po files using all_deps_files.
1132
1133 2017-12-01 Joel Brobecker <brobecker@adacore.com>
1134
1135 * MAINTAINERS: Update list of maintainers, moving those who
1136 stepped down or became inactive to the "Past Maintainers"
1137 section.
1138
1139 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1140
1141 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
1142 sys/proc.h.
1143 (NEW_PROC_API): Remove.
1144 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
1145 Likewise.
1146 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
1147 * configure: Regenerate.
1148 * config.in: Regenerate.
1149 * gdbserver/configure: Regenerate.
1150 * gdbserver/config.in: Regenerate.
1151
1152 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
1153 NEW_PROC_API test.
1154 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
1155
1156 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
1157
1158 * proc-api.c: Remove !NEW_PROC_API support.
1159 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
1160 Remove tests for macros always defined on Solaris.
1161 * proc-events.c: Remove !NEW_PROC_API support.
1162 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
1163 HAVE_SYS_USER_H tests.
1164 (init_syscall_table): Remove non-Solaris syscalls.
1165 Remove tests for syscalls present on all Solaris versions.
1166 Add missing Solaris 10+ syscalls.
1167 (signal_table): Remove non-Solaris signals.
1168 Remove tests for signals present on all Solaris versions.
1169 (fault_table): Remove non-Solaris faults.
1170 Remove tests for faults present on all Solaris versions.
1171 * proc-flags.c: Remove !NEW_PROC_API support.
1172 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
1173 Remove non-Solaris flags.
1174 * proc-why.c: Remove !NEW_PROC_API support.
1175 (pr_why_table): Remove meaningless comments.
1176 Remove tests for reasons present on all Solaris versions.
1177 Remove OSF/1 cases.
1178 (proc_prettyfprint_why): Likewise.
1179
1180 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
1181 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
1182 Remove WA_READ test, IRIX watchpoint support.
1183 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
1184 types. Change users.
1185 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
1186 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
1187 Change callers.
1188 Remove CTL_PROC_NAME_FMT tests.
1189 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
1190 users.
1191 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
1192 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
1193 (proc_modify_flag): Replace GDBRESET by PCUNSET.
1194 Remove PR_ASYNC, PR_KLC tests.
1195 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
1196 (proc_parent_pid): Remove PCWATCH etc. tests.
1197 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
1198 Remove PCAGENT test.
1199 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
1200 Remove SYS_lwpcreate || SYS_lwp_create test.
1201 (proc_get_current_thread): Likewise.
1202 [PIOCNTHR && PIOCTLIST]: Remove.
1203 [PIOCLSTATUS]: Remove.
1204 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
1205 [PRFS_STOPEXEC]: Remove.
1206 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
1207 (syscall_is_exit): Likewise.
1208 (syscall_is_exec): Likewise.
1209 (syscall_is_lwp_create): Likewise.
1210 Remove SYS_syssgi support.
1211 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
1212 [SYS_syssgi]: Remove.
1213 Remove non-Solaris cases, conditionals.
1214 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
1215 Remove.
1216 (procfs_init_inferior) [SYS_syssgi]: Remove.
1217 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
1218 (procfs_inferior_created) [SYS_syssgi]: Remove.
1219 (procfs_set_watchpoint): Remove !AIX5 test.
1220 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
1221 case.
1222 (mappingflags) [MA_PHYS]: Remove.
1223 (info_mappings_callback): Remove PCAGENT test.
1224 Remove PIOCOPENLWP || PCAGENT test.
1225
1226 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1227
1228 * sol-thread.c (info_solthreads): Constify args.
1229 Cast args to void *.
1230
1231 2017-11-29 John Baldwin <jhb@FreeBSD.org>
1232
1233 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
1234
1235 2017-11-29 Joel Brobecker <brobecker@adacore.com>
1236
1237 * ada-lang.c (to_fixed_range_type): Make sure that the size
1238 of the range type being returned is the same as the size
1239 of the range type being fixed.
1240
1241 2017-11-29 Pedro Alves <palves@redhat.com>
1242
1243 PR c++/19436
1244 * NEWS: Mention setting breakpoints on functions with C++ ABI
1245 tags.
1246 * completer.h (completion_match_for_lcd) <match,
1247 mark_ignored_range>: New methods.
1248 <finish>: Consider ignored ranges.
1249 <clear>: Clear ignored ranges.
1250 <m_ignored_ranges, m_finished_storage>: New fields.
1251 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1252 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1253 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1254 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1255 * language.c (default_symbol_name_matcher): Pass the
1256 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1257 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1258 * utils.c (skip_abi_tag): New function.
1259 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1260 Handle ABI tags.
1261 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1262 parameter.
1263
1264 2017-11-29 Pedro Alves <palves@redhat.com>
1265
1266 PR c++/19436
1267 * NEWS: Mention setting breakpoints on functions with C++ ABI
1268 tags.
1269 * completer.h (completion_match_for_lcd) <match,
1270 mark_ignored_range>: New methods.
1271 <finish>: Consider ignored ranges.
1272 <clear>: Clear ignored ranges.
1273 <m_ignored_ranges, m_finished_storage>: New fields.
1274 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1275 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1276 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1277 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1278 * language.c (default_symbol_name_matcher): Pass the
1279 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1280 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1281 * utils.c (skip_abi_tag): New function.
1282 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1283 Handle ABI tags.
1284 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1285 parameter.
1286
1287 2017-11-29 Pedro Alves <palves@redhat.com>
1288
1289 * NEWS: Mention that breakpoints on C++ functions are now set on
1290 on all namespaces/classes by default, and mention "break
1291 -qualified".
1292 * ax-gdb.c (agent_command_1): Adjust to pass a
1293 symbol_name_match_type to new_linespec_location.
1294 * breakpoint.c (parse_breakpoint_sals): Adjust to
1295 get_linespec_location's return type change.
1296 (strace_marker_create_sals_from_location): Adjust to pass a
1297 symbol_name_match_type to new_linespec_location.
1298 (strace_marker_decode_location): Adjust to get_linespec_location's
1299 return type change.
1300 (strace_command): Adjust to pass a symbol_name_match_type to
1301 new_linespec_location.
1302 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1303 mention "-qualified".
1304 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1305 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1306 enumerator.
1307 (complete_address_and_linespec_locations): New parameter
1308 'match_type'. Pass it down.
1309 (explicit_options): Add "-qualified".
1310 (collect_explicit_location_matches): Pass the requested match type
1311 to the linespec completers. Handle MATCH_QUALIFIED.
1312 (location_completer): Handle "-qualified" combined with linespecs.
1313 * cp-support.c (cp_search_name_hash): New.
1314 (cp_symbol_name_matches_1): Implement wild matching for C++.
1315 (cp_fq_symbol_name_matches): Reimplement.
1316 (cp_get_symbol_name_matcher): Return different matchers depending
1317 on the lookup name's match type.
1318 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1319 * cp-support.h (cp_search_name_hash): New declaration.
1320 * dwarf2read.c
1321 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1322 symbols.
1323 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1324 tests.
1325 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1326 pass a symbol_name_match_type to new_linespec_location.
1327 * linespec.c (linespec_parse_basic): Lookup function symbols using
1328 the parser's symbol name match type.
1329 (convert_explicit_location_to_linespec): New
1330 symbol_name_match_type parameter. Pass it down to
1331 find_linespec_symbols.
1332 (convert_explicit_location_to_sals): Pass the location's name
1333 match type to convert_explicit_location_to_linespec.
1334 (parse_linespec): New match_type parameter. Save it in the
1335 parser.
1336 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1337 (linespec_complete_function): New symbol_name_match_type
1338 parameter. Use it.
1339 (complete_linespec_component): Pass down the parser's recorded
1340 name match type.
1341 (linespec_complete_label): New symbol_name_match_type parameter.
1342 Use it.
1343 (linespec_complete): New symbol_name_match_type parameter. Save
1344 it in the parser and pass it down. Adjust to
1345 get_linespec_location's prototype change.
1346 (find_function_symbols, find_linespec_symbols): New
1347 symbol_name_match_type parameter. Pass it down instead of
1348 assuming symbol_name_match_type::WILD.
1349 * linespec.h (linespec_complete, linespec_complete_function)
1350 (linespec_complete_label): New symbol_name_match_type parameter.
1351 * location.c (event_location::linespec_location): Now a struct
1352 linespec_location.
1353 (EL_LINESPEC): Adjust.
1354 (initialize_explicit_location): Default to
1355 symbol_name_match_type::WILD.
1356 (new_linespec_location): New symbol_name_match_type parameter.
1357 Record it in the location.
1358 (get_linespec_location): Now returns a struct linespec_location.
1359 (new_explicit_location): Also copy func_name_match_type.
1360 (explicit_to_string_internal)
1361 (string_to_explicit_location): Handle "-qualified".
1362 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1363 Copy symbol_name_match_type fields.
1364 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1365 type change.
1366 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1367 change. Handle "-qualfied".
1368 (string_to_explicit_location): Handle "-qualified".
1369 (string_to_event_location_basic): New symbol_name_match_type
1370 parameter. Pass it down.
1371 (string_to_event_location): Handle "-qualified".
1372 * location.h (struct linespec_location): New.
1373 (explicit_location::func_name_match_type): New field.
1374 (new_linespec_location): Now returns a const linespec_location *.
1375 (string_to_event_location_basic): New symbol_name_match_type
1376 parameter.
1377 (explicit_completion_info::saw_explicit_location_option): New
1378 field.
1379 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1380 symbol_name_match_type to new_linespec_location.
1381 * python/py-breakpoint.c (bppy_init): Likewise.
1382 * python/python.c (gdbpy_decode_line): Likewise.
1383
1384 2017-11-29 Pedro Alves <palves@redhat.com>
1385
1386 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1387 parameter from completion_match to completion_match_result.
1388 Adjust.
1389 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1390 * completer.c (completion_tracker::maybe_add_completion): Add
1391 match_for_lcd parameter and use it.
1392 (completion_tracker::add_completion): Likewise.
1393 * completer.h (class completion_match_for_lcd): New class.
1394 (completion_match_result::match_for_lcd): New field.
1395 (completion_match_result::set_match): New method.
1396 (completion_tracker): Add comments.
1397 (completion_tracker::add_completion): Add match_for_lcd parameter.
1398 (completion_tracker::reset_completion_match_result): Reset
1399 match_for_lcd too.
1400 (completion_tracker::maybe_add_completion): Add match_for_lcd
1401 parameter.
1402 (completion_tracker::m_lowest_common_denominator_unique): Extend
1403 comments.
1404 * cp-support.c (cp_symbol_name_matches_1)
1405 (cp_fq_symbol_name_matches): Change type of parameter from
1406 completion_match to completion_match_result. Adjust.
1407 * language.c (default_symbol_name_matcher): Change type of
1408 parameter from completion_match to completion_match_result.
1409 Adjust.
1410 * language.h (completion_match_for_lcd): Forward declare.
1411 (default_symbol_name_matcher): Change type of parameter from
1412 completion_match to completion_match_result.
1413 * symtab.c (compare_symbol_name): Adjust.
1414 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1415 * symtab.h (ada_lookup_name_info::matches): Change type of
1416 parameter from completion_match to completion_match_result.
1417 (symbol_name_matcher_ftype): Likewise, and update comments.
1418
1419 2017-11-29 Pedro Alves <palves@redhat.com>
1420
1421 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1422 * minsyms.c (msymbol_is_text): Delete.
1423 (msymbol_is_function): New function.
1424 * minsyms.h (msymbol_is_text): Delete.
1425 (msymbol_is_function): New declaration.
1426 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1427
1428 2017-11-29 Tom Tromey <tom@tromey.com>
1429
1430 * Makefile.in (distclean): Handle the case where rmdir fails.
1431
1432 2017-11-29 Tom Tromey <tom@tromey.com>
1433
1434 * symfile.c (_initialize_symfile): Update usage text for
1435 add-symbol-file, symbol-file, load.
1436
1437 2017-11-29 Tom Tromey <tom@tromey.com>
1438
1439 * symfile.c (add_symbol_file_command): Error if some arguments to
1440 -s are missing. Change unrecognized-argument error message.
1441 (_initialize_symfile): Fix usage text for add-symbol-file.
1442
1443 2017-11-27 Tom Tromey <tom@tromey.com>
1444
1445 * Makefile.in (REMOTE_OBS): Remove.
1446 (SFILES): Remove remote sources.
1447 (COMMON_SFILES): Add remote sources.
1448 (ALLDEPFILES): Remove dcache.c.
1449
1450 2017-11-27 Tom Tromey <tom@tromey.com>
1451
1452 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1453 variables.
1454 (SFILES): Use SUBDIR_TARGET_SRCS.
1455 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1456 (CONFIG_SRC_SUBDIR): Add target.
1457 (%.o): Remove target rule.
1458
1459 2017-11-27 Tom Tromey <tom@tromey.com>
1460
1461 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1462 registry.o, thread-fsm.o, debug.o.
1463 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1464 thread-fsm.c, debug.c.
1465
1466 2017-11-27 Tom Tromey <tom@tromey.com>
1467
1468 * Makefile.in (COMMON_SFILES): New.
1469 (SFILES): Move some entries to COMMON_SFILES.
1470 (COMMON_OBS): Use COMMON_SFILES.
1471
1472 2017-11-27 Tom Tromey <tom@tromey.com>
1473
1474 * Makefile.in (YYFILES): Update comment.
1475 (YYOBJ): Redefine.
1476
1477 2017-11-27 Tom Tromey <tom@tromey.com>
1478
1479 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1480 (CONFIG_SRC_SUBDIR): Add python.
1481 (%.o): Remove python rule.
1482 (python/%.o): New rule.
1483 * configure: Rebuild.
1484 * configure.ac (CONFIG_OBS): Refer to python/python.o
1485
1486 2017-11-27 Tom Tromey <tom@tromey.com>
1487
1488 * configure: Rebuild.
1489 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1490 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1491 (CONFIG_SRC_SUBDIR): Add guile.
1492 (%.o): Remove guile rule.
1493
1494 2017-11-27 Tom Tromey <tom@tromey.com>
1495
1496 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1497 (%.o): Remove unittests rule.
1498 (CONFIG_SRC_SUBDIR): Add unittests.
1499
1500 2017-11-27 Tom Tromey <tom@tromey.com>
1501
1502 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1503 (CONFIG_SRC_SUBDIR): Add tui.
1504 (%.o): Remove tui rule.
1505
1506 2017-11-27 Tom Tromey <tom@tromey.com>
1507
1508 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1509 (%.o): Remove compile rule.
1510 (CONFIG_SRC_SUBDIR): Add compile.
1511
1512 2017-11-27 Tom Tromey <tom@tromey.com>
1513
1514 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1515 (%.o): Remove mi rule.
1516 (CONFIG_SRC_SUBDIR): Add mi.
1517 (COMMON_OBS): Use mi/mi-common.o
1518
1519 2017-11-27 Tom Tromey <tom@tromey.com>
1520
1521 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1522 (%.o): Remove cli rule.
1523 (CONFIG_SRC_SUBDIR): Add cli.
1524
1525 2017-11-27 Tom Tromey <tom@tromey.com>
1526
1527 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1528 * configure: Rebuild.
1529 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1530 (CONFIG_DEP_SUBDIR): New variable.
1531 (%.o): Add order-only dependency.
1532 ($(CONFIG_DEP_SUBDIR)): New target.
1533
1534 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1535
1536 PR gdb/21945
1537 * findcmd.c (_initialize_mem_search): Update find command help
1538 text.
1539
1540 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * python/python.c (do_start_initialization): Change progname
1543 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1544 Python 2.
1545
1546 2017-11-26 Tom Tromey <tom@tromey.com>
1547
1548 * common/format.h: Add include guards.
1549
1550 2017-11-26 Tom Tromey <tom@tromey.com>
1551
1552 * nat/linux-personality.h (class
1553 maybe_disable_address_space_randomization): New class.
1554 (maybe_disable_address_space_randomization): Don't declare
1555 function.
1556 * nat/linux-personality.c (restore_personality)
1557 (make_disable_asr_cleanup): Remove.
1558 (maybe_disable_address_space_randomization): Now a constructor.
1559 (~maybe_disable_address_space_randomization): New destructor.
1560 * linux-nat.c (linux_nat_create_inferior): Update.
1561
1562 2017-11-26 Tom Tromey <tom@tromey.com>
1563
1564 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1565
1566 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1567
1568 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1569 "cooked" register. Access only first four bytes of branch target
1570 registers.
1571
1572 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1573
1574 PR gdb/22491
1575 * stap-probe.c (relocate_address): New function.
1576 (stap_probe::get_relocated_address): Use 'relocate_address'.
1577 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1578 'm_sem_addr'.
1579 (stap_probe::clear_semaphore): Likewise.
1580
1581 2017-11-25 Pedro Alves <palves@redhat.com>
1582
1583 * dictionary.c: Include "safe-ctype.h".
1584 * minsyms.c: Include "safe-ctype.h".
1585 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1586
1587 2017-11-25 Pedro Alves <palves@redhat.com>
1588
1589 * completer.c (complete_line_internal_1): Skip spaces until the
1590 start of the command.
1591
1592 2017-11-24 Pedro Alves <palves@redhat.com>
1593
1594 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1595 cp_fq_symbol_name_matches. Pass language_cplus to
1596 strncmp_with_mode.
1597 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1598 (selftests::test_cp_symbol_name_cmp): New.
1599 (_initialize_cp_support): Register "cp_symbol_name_matches"
1600 selftests.
1601 * language.c (default_symbol_name_matcher): Pass language_minimal
1602 to strncmp_iw_with_mode.
1603 * utils.c: Include "cp-support.h" and <algorithm>.
1604 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1605 (cp_is_operator): New functions.
1606 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1607 skip whitespace in the symbol name when the lookup name doesn't
1608 have spaces, and vice versa.
1609 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1610 * utils.h (strncmp_iw_with_mode): Add language parameter.
1611
1612 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1613
1614 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1615 New functions.
1616 (print_it_exception): If available, display the exception
1617 message as well.
1618 * NEWS: Document new feature.
1619
1620 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1621
1622 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1623
1624 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1625
1626 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1627 (dtrace_probe::is_enabled, dtrace_probe::enable)
1628 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1629 variable
1630 * probe.c (gen_ui_out_table_header_info)
1631 (print_ui_out_not_applicables): Remove keyword 'struct' at
1632 for-range variable
1633
1634 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1635
1636 * configure.tgt: Add arch/aarch64.o
1637
1638 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1639
1640 * common/common-utils.h: Include poison.h.
1641 (xfree): Remove declaration, add definition with static_assert.
1642 * common/common-utils.c (xfree): Remove.
1643 * common/poison.h (IsMallocatable): Define.
1644 (IsFreeable): Define.
1645 (free): Delete for non-freeable types.
1646 (xnew): New.
1647 (XNEW): Undef and redefine.
1648 (xcnew): New.
1649 (XCNEW): Undef and redefine.
1650 (xdelete): New.
1651 (XDELETE): Undef and redefine.
1652 (xnewvec): New.
1653 (XNEWVEC): Undef and redefine.
1654 (xcnewvec): New.
1655 (XCNEWVEC): Undef and redefine.
1656 (xresizevec): New.
1657 (XRESIZEVEC): Undef and redefine.
1658 (xdeletevec): New.
1659 (XDELETEVEC): Undef and redefine.
1660 (xnewvar): New.
1661 (XNEWVAR): Undef and redefine.
1662 (xcnewvar): New.
1663 (XCNEWVAR): Undef and redefine.
1664 (xresizevar): New.
1665 (XRESIZEVAR): Undef and redefine.
1666
1667 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1668
1669 * gdbthread.h (private_thread_info): Define structure type, add
1670 virtual pure destructor.
1671 (thread_info) <priv>: Change type to unique_ptr.
1672 <private_dtor>: Remove.
1673 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1674 (private_thread_info::~private_thread_info): Provide default
1675 implementation.
1676 (thread_info::~thread_info): Don't call private_dtor nor
1677 manually free priv.
1678 * aix-thread.c (private_thread_info): Rename to ...
1679 (aix_thread_info): ... this.
1680 (get_aix_thread_info): New.
1681 (sync_threadlists): Adjust.
1682 (iter_tid): Adjust.
1683 (aix_thread_resume): Adjust.
1684 (aix_thread_fetch_registers): Adjust.
1685 (aix_thread_store_registers): Adjust.
1686 (aix_thread_extra_thread_info): Adjust.
1687 * darwin-nat.h (private_thread_info): Rename to ...
1688 (darwin_thread_info): ... this.
1689 (get_darwin_thread_info): New.
1690 * darwin-nat.c (darwin_init_thread_list): Adjust.
1691 (darwin_check_new_threads): Adjust.
1692 (thread_info_from_private_thread_info): Adjust.
1693 * linux-thread-db.c (private_thread_info): Rename to ...
1694 (thread_db_thread_info): ... this, initialize fields.
1695 (get_thread_db_thread_info): New.
1696 <dying>: Change type to bool.
1697 (update_thread_state): Adjust to type rename.
1698 (record_thread): Adjust to type rename an use of unique_ptr.
1699 (thread_db_pid_to_str): Likewise.
1700 (thread_db_extra_thread_info): Likewise.
1701 (thread_db_thread_handle_to_thread_info): Likewise.
1702 (thread_db_get_thread_local_address): Likewise.
1703 * nto-tdep.h (private_thread_info): Rename to ...
1704 (nto_thread_info): ... this, initialize fields.
1705 (get_nto_thread_info): New.
1706 <name>: Change type to std::string.
1707 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1708 use of unique_ptr.
1709 * nto-procfs.c (update_thread_private_data_name): Adjust to
1710 std::string change, allocate nto_private_thread_info with new.
1711 (update_thread_private_data): Adjust to unique_ptr.
1712 * remote.c (private_thread_info): Rename to ...
1713 (remote_thread_info): ... this, initialize data members with
1714 default values.
1715 <extra, name>: Change type to std::string.
1716 <thread_handle>: Change type to non-pointer.
1717 (free_private_thread_info): Remove.
1718 (get_private_info_thread): Rename to...
1719 (get_remote_thread_info): ... this, change return type, adjust to
1720 use of unique_ptr, use remote_thread_info constructor.
1721 (remote_add_thread): Adjust.
1722 (get_private_info_ptid): Rename to...
1723 (get_remote_thread_info): ...this, change return type.
1724 (remote_thread_name): Use get_remote_thread_info, adjust to
1725 change to std::string.
1726 (struct thread_item) <~thread_item>: Remove.
1727 <thread_handle>: Make non pointer.
1728 (start_thread): Adjust to thread_item::thread_handle type
1729 change.
1730 (remote_update_thread_list): Adjust to type name change, move
1731 strings from temporary to long-lived object instead of
1732 duplicating.
1733 (remote_threads_extra_info): Use get_remote_thread_info.
1734 (process_initial_stop_replies): Likewise.
1735 (resume_clear_thread_private_info): Likewise.
1736 (remote_resume): Adjust to type name change.
1737 (remote_commit_resume): Use get_remote_thread_info.
1738 (process_stop_reply): Adjust to type name change.
1739 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1740 (remote_stopped_by_hw_breakpoint): Likewise.
1741 (remote_stopped_by_watchpoint): Likewise.
1742 (remote_stopped_data_address): Likewise.
1743 (remote_core_of_thread): Likewise.
1744 (remote_thread_handle_to_thread_info): Use
1745 get_private_info_thread, adjust to thread_handle field type
1746 change.
1747
1748 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1749
1750 * remote.c (struct thread_item): Add constructor, disable copy
1751 construction and copy assignment, define default move
1752 construction and move assignment.
1753 <extra, name>: Change type to std::string.
1754 <core>: Initialize.
1755 <thread_handle>: Make non-pointer.
1756 (thread_item_t): Remove typedef.
1757 (DEF_VEC_O(thread_item_t)): Remove.
1758 (threads_listing_context) <contains_thread>: New method.
1759 <remove_thread>: New method.
1760 <items>: Change type to std::vector.
1761 (clear_threads_listing_context): Remove.
1762 (threads_listing_context_remove): Remove.
1763 (remote_newthread_step): Use thread_item constructor, adjust to
1764 change to std::vector.
1765 (start_thread): Use thread_item constructor, adjust to change to
1766 std::vector.
1767 (end_thread): Adjust to change to std::vector and std::string.
1768 (remote_get_threads_with_qthreadinfo): Use thread_item
1769 constructor, adjust to std::vector.
1770 (remote_update_thread_list): Adjust to change to std::vector and
1771 std::string, use threads_listing_context methods.
1772 (remove_child_of_pending_fork): Adjust.
1773 (remove_new_fork_children): Adjust.
1774 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1775 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1776 * unittests/rsp-low-selftests.c: New file.
1777 * common/rsp-low.h: Include common/byte-vector.h.
1778 (hex2bin): New overload.
1779 * common/rsp-low.c (hex2bin): New overload.
1780
1781 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1782
1783 * inferior.h (private_inferior): Define structure type, add
1784 virtual pure destructor.
1785 (inferior) <priv>: Change type to unique_ptr.
1786 * inferior.c (private_inferior::~private_inferior): Provide
1787 default implementation.
1788 (inferior::~inferior): Don't free priv field.
1789 (exit_inferior_1): Likewise.
1790 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1791 (darwin_exception_info): Remove typedef.
1792 (DEF_VEC_O (darwin_thread_t)); Remove.
1793 (private_inferior): Rename to ...
1794 (darwin_private_inferior): ... this, extend private_inferior.
1795 (get_darwin_inferior): New.
1796 <threads>: Change type to std::vector of darwin_thread_t pointers.
1797 * darwin-nat.c (darwin_check_new_threads): Adjust.
1798 (find_inferior_task_it): Adjust.
1799 (darwin_find_thread); Adjust.
1800 (darwin_suspend_inferior): Adjust.
1801 (darwin_resume_inferior): Adjust.
1802 (darwin_find_new_inferior): Adjust.
1803 (darwin_decode_notify_message): Adjust.
1804 (darwin_send_reply): Adjust.
1805 (darwin_resume_inferior_threads): Adjust.
1806 (darwin_suspend_inferior_threads): Adjust.
1807 (darwin_decode_message): Adjust.
1808 (darwin_wait): Adjust.
1809 (darwin_interrupt): Adjust.
1810 (darwin_deallocate_threads): Adjust.
1811 (darwin_mourn_inferior): Adjust, don't free private data.
1812 (darwin_reply_to_all_pending_messages): Adjust.
1813 (darwin_stop_inferior): Adjust.
1814 (darwin_setup_exceptions): Adjust.
1815 (darwin_kill_inferior): Adjust.
1816 (darwin_setup_request_notification): Adjust.
1817 (darwin_attach_pid): Adjust.
1818 (darwin_init_thread_list): Adjust.
1819 (darwin_setup_fake_stop_event): Adjust.
1820 (darwin_attach): Adjust.
1821 (darwin_detach): Adjust.
1822 (darwin_xfer_partial): Adjust.
1823 (set_enable_mach_exceptions): Adjust.
1824 (darwin_pid_to_exec_file): Adjust.
1825 (darwin_get_ada_task_ptid): Adjust.
1826 * darwin-nat-info.c (get_task_from_args): Adjust.
1827 (info_mach_ports_command): Adjust.
1828 (info_mach_region_command): Adjust.
1829 (info_mach_exceptions_command): Adjust.
1830 * remote.c (private_inferior): Rename to ...
1831 (remote_private_inferior): ... this, initialize fields.
1832 (get_remote_inferior); New.
1833 (remote_commit_resume): Use get_remote_inferior.
1834 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1835
1836 2017-11-24 Pedro Alves <palves@redhat.com>
1837
1838 * NEWS: Mention linespecs and explicit locations, and completion
1839 improvements.
1840
1841 2017-11-24 Yao Qi <yao.qi@linaro.org>
1842
1843 * regcache.c (regcache::dump): Remove footnote_register_size.
1844
1845 2017-11-24 Yao Qi <yao.qi@linaro.org>
1846
1847 * regcache.c (cooked_read_test): Add more test for readonly
1848 regcache.
1849
1850 2017-11-24 Yao Qi <yao.qi@linaro.org>
1851
1852 * gdbarch-selftests.c (test_target_has_registers): Move it to
1853 target.c.
1854 (test_target_has_stack): Likewise.
1855 (test_target_has_memory): Likewise.
1856 (test_target_prepare_to_store): Likewise.
1857 (test_target_store_registers): Likewise.
1858 (test_target_ops): Likewise.
1859 * regcache.c: Include selftest-arch.h and gdbthread.h.
1860 (target_ops_no_register): New class.
1861 (test_target_fetch_registers): New.
1862 (test_target_store_registers): New.
1863 (test_target_xfer_partial): New.
1864 (readwrite_regcache): New.
1865 (cooked_read_test): New.
1866 (_initialize_regcache): Register the test.
1867 * target.c: (test_target_has_registers): Moved from
1868 gdbarch-selftests.c.
1869 (test_target_has_stack): Likewise.
1870 (test_target_has_memory): Likewise.
1871 (test_target_prepare_to_store): Likewise.
1872 (test_target_store_registers): Likewise.
1873 * target.h (test_target_ops): New class.
1874
1875 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1876
1877 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1878 selftest.
1879
1880 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1881
1882 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1883 * arch/aarch64.c (aarch64_create_target_description): Create
1884 new target description.
1885 * features/Makefile: Add new files.
1886 * features/aarch64.c: Remove file.
1887 * features/aarch64-core.c: New autogenerated file.
1888 * features/aarch64-fpu.c: New autogenerated file.
1889 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1890
1891 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1892
1893 * Makefile.in: Add new files.
1894 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1895 aarch64_read_description.
1896 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1897 Call aarch64_read_description.
1898 * aarch64-tdep.c (aarch64_read_description): New function.
1899 (aarch64_gdbarch_init): Call aarch64_read_description.
1900 * aarch64-tdep.h (aarch64_read_description): New function.
1901 * arch/aarch64.c: New file.
1902 * configure.tgt: Add new files.
1903
1904 2017-11-24 Yao Qi <yao.qi@linaro.org>
1905
1906 * mi/mi-main.c (register_changed_p): Update.
1907 * value.c (value_contents_bits_eq): Change return type.
1908 (value_contents_eq): Likewise.
1909 * value.h: Update comments.
1910
1911 2017-11-24 Yao Qi <yao.qi@linaro.org>
1912
1913 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1914 local 'changed'. Remove error.
1915 (register_changed_p): Change return type to bool.
1916
1917 2017-11-24 Yao Qi <yao.qi@linaro.org>
1918
1919 * arch/tic6x.c: New file.
1920 * arch/tic6x.h: New file.
1921 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1922 tic6x-core.xml and tic6x-gp.xml.
1923 * features/tic6x-c6xp.c: Generated.
1924 * features/tic6x-core.c: Generated.
1925 * features/tic6x-gp.c: Generated.
1926 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1927 "tic6x-".
1928
1929 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * mi/mi-main.c (list_available_thread_groups): Change map value
1932 type to std::vector.
1933
1934 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1935
1936 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1937
1938 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1939
1940 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1941 back to...
1942 <children_requested>: ... this.
1943 (varobj_get_num_children, varobj_update): Adjust.
1944
1945 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1946
1947 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1948 (ada_value_has_mutated): Likewise.
1949 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1950 (c_is_path_expr_parent): Likewise.
1951 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1952 (mi_cmd_var_set_frozen): Likewise.
1953 (mi_cmd_var_update_iter): Likewise.
1954 (mi_cmd_var_update): Likewise.
1955 * varobj.c (pretty_printing): Likewise.
1956 (varobj_enable_pretty_printing): Likewise.
1957 (struct varobj_root) <floating, is_valid>: Likewise.
1958 (struct varobj_dynamic) <children_requested>: Likewise.
1959 (delete_variable): Likewise.
1960 (delete_variable_1): Likewise.
1961 (install_variable): Likewise.
1962 (update_type_if_necessary): Likewise.
1963 (install_new_value): Likewise.
1964 (value_of_root): Likewise.
1965 (is_root_p): Likewise.
1966 (varobj_create): Likewise.
1967 (varobj_delete): Likewise.
1968 (varobj_has_more): Likewise.
1969 (varobj_set_frozen): Likewise.
1970 (varobj_get_frozen): Likewise.
1971 (install_dynamic_child): Likewise.
1972 (dynamic_varobj_has_child_method): Likewise.
1973 (update_dynamic_varobj_children): Likewise.
1974 (varobj_get_num_children): Likewise.
1975 (varobj_list_children): Likewise.
1976 (is_path_expr_parent): Likewise.
1977 (varobj_default_is_path_expr_parent): Likewise.
1978 (varobj_is_dynamic_p): Likewise.
1979 (varobj_set_value): Likewise.
1980 (varobj_value_has_mutated): Likewise.
1981 (varobj_update): Likewise.
1982 (check_scope): Likewise.
1983 (value_of_root_1): Likewise.
1984 (varobj_value_get_print_value): Likewise.
1985 (varobj_editable_p): Likewise.
1986 (varobj_value_is_changeable_p): Likewise.
1987 (varobj_floating_p): Likewise.
1988 (varobj_default_value_is_changeable_p): Likewise.
1989 (varobj_invalidate_iter): Likewise.
1990 * varobj.h (struct varobj_update_result) <type_changed,
1991 children_changed, changed, value_installed>: Likewise.
1992 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1993 (struct lang_varobj_ops) <value_is_changeable_p,
1994 value_has_mutated, is_path_expr_parent>: Likewise.
1995 (varobj_delete): Likewise.
1996 (varobj_set_frozen): Likewise.
1997 (varobj_get_frozen): Likewise.
1998 (varobj_set_value): Likewise.
1999 (varobj_update): Likewise.
2000 (varobj_editable_p): Likewise.
2001 (varobj_floating_p): Likewise.
2002 (varobj_has_more): Likewise.
2003 (varobj_is_dynamic_p): Likewise.
2004 (varobj_default_value_is_changeable_p): Likewise.
2005 (varobj_value_is_changeable_p): Likewise.
2006 (varobj_is_anonymous_child): Likewise.
2007 (varobj_default_is_path_expr_parent): Likewise.
2008
2009 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2010
2011 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
2012 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
2013 <type_str>: Convert to 'std::string'.
2014 <expr>: Convert to 'expression_up'.
2015 (dtrace_probe_arg_s): Delete type and VEC.
2016 (dtrace_probe_enabler_s): Likewise.
2017 (struct dtrace_probe): Replace by...
2018 (class dtrace_static_probe_ops): ...this and...
2019 (class dtrace_probe): ...this.
2020 (dtrace_probe_is_linespec): Rename to...
2021 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
2022 to reflect change.
2023 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
2024 Adjust code. Create new instance of 'dtrace_probe'.
2025 (dtrace_build_arg_exprs): Rename to...
2026 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
2027 reflect change.
2028 (dtrace_get_probes): Rename to...
2029 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
2030 to reflect change.
2031 (dtrace_get_arg): Rename to...
2032 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
2033 reflect change.
2034 (dtrace_probe_is_enabled): Rename to...
2035 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
2036 change.
2037 (dtrace_get_probe_address): Rename to...
2038 (dtrace_probe::get_relocated_address): ...this. Adjust code
2039 to reflect change.
2040 (dtrace_get_probe_argument_count): Rename to...
2041 (dtrace_probe::get_argument_count): ...this. Adjust code to
2042 reflect change.
2043 (dtrace_can_evaluate_probe_arguments): Rename to...
2044 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
2045 to reflect change.
2046 (dtrace_evaluate_probe_argument): Rename to...
2047 (dtrace_probe::evaluate_argument): ...this. Adjust code to
2048 reflect change.
2049 (dtrace_compile_to_ax): Rename to...
2050 (dtrace_probe::compile_to_ax): ...this. Adjust code to
2051 reflect change.
2052 (dtrace_probe_destroy): Delete.
2053 (dtrace_type_name): Rename to...
2054 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
2055 reflect change.
2056 (dtrace_probe::get_static_ops): New method.
2057 (dtrace_gen_info_probes_table_header): Rename to...
2058 (dtrace_static_probe_ops::gen_info_probes_table_header):
2059 ...this. Adjust code to reflect change.
2060 (dtrace_gen_info_probes_table_values): Rename to...
2061 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
2062 code to reflect change.
2063 (dtrace_enable_probe): Rename to...
2064 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
2065 change.
2066 (dtrace_disable_probe): Rename to...
2067 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
2068 change.
2069 (struct probe_ops dtrace_probe_ops): Delete.
2070 (info_probes_dtrace_command): Call 'info_probes_for_spops'
2071 instead of 'info_probes_for_ops'.
2072 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
2073 of 'all_probe_ops'.
2074
2075 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2076 Simon Marchi <simark@simark.ca>
2077
2078 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
2079 variable.
2080 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
2081 <aexpr>: Change type to 'expression_up'.
2082 (stap_probe_arg_s): Delete type and VEC.
2083 (struct stap_probe): Delete. Replace by...
2084 (class stap_static_probe_ops): ...this and...
2085 (class stap_probe): ...this. Rename variables to add 'm_'
2086 prefix. Do not use 'union' for arguments anymore.
2087 (stap_get_expected_argument_type): Receive probe name instead
2088 of 'struct stap_probe'. Adjust code.
2089 (stap_parse_probe_arguments): Rename to...
2090 (stap_probe::parse_arguments): ...this. Adjust code to
2091 reflect change.
2092 (stap_get_probe_address): Rename to...
2093 (stap_probe::get_relocated_address): ...this. Adjust code
2094 to reflect change.
2095 (stap_get_probe_argument_count): Rename to...
2096 (stap_probe::get_argument_count): ...this. Adjust code
2097 to reflect change.
2098 (stap_get_arg): Rename to...
2099 (stap_probe::get_arg_by_number'): ...this. Adjust code to
2100 reflect change.
2101 (can_evaluate_probe_arguments): Rename to...
2102 (stap_probe::can_evaluate_arguments): ...this. Adjust code
2103 to reflect change.
2104 (stap_evaluate_probe_argument): Rename to...
2105 (stap_probe::evaluate_argument): ...this. Adjust code
2106 to reflect change.
2107 (stap_compile_to_ax): Rename to...
2108 (stap_probe::compile_to_ax): ...this. Adjust code to
2109 reflect change.
2110 (stap_probe_destroy): Delete.
2111 (stap_modify_semaphore): Adjust comment.
2112 (stap_set_semaphore): Rename to...
2113 (stap_probe::set_semaphore): ...this. Adjust code to reflect
2114 change.
2115 (stap_clear_semaphore): Rename to...
2116 (stap_probe::clear_semaphore): ...this. Adjust code to
2117 reflect change.
2118 (stap_probe::get_static_ops): New method.
2119 (handle_stap_probe): Adjust code to create instance of
2120 'stap_probe'.
2121 (stap_get_probes): Rename to...
2122 (stap_static_probe_ops::get_probes): ...this. Adjust code to
2123 reflect change.
2124 (stap_probe_is_linespec): Rename to...
2125 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
2126 reflect change.
2127 (stap_type_name): Rename to...
2128 (stap_static_probe_ops::type_name): ...this. Adjust code to
2129 reflect change.
2130 (stap_gen_info_probes_table_header): Rename to...
2131 (stap_static_probe_ops::gen_info_probes_table_header):
2132 ...this. Adjust code to reflect change.
2133 (stap_gen_info_probes_table_values): Rename to...
2134 (stap_probe::gen_info_probes_table_values): ...this. Adjust
2135 code to reflect change.
2136 (struct probe_ops stap_probe_ops): Delete.
2137 (info_probes_stap_command): Use 'info_probes_for_spops'
2138 instead of 'info_probes_for_ops'.
2139 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
2140 of 'all_probe_ops'.
2141
2142 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2143
2144 * break-catch-throw.c (fetch_probe_arguments): Use
2145 'probe.prob' instead of 'probe.probe'.
2146 * breakpoint.c (create_longjmp_master_breakpoint): Call
2147 'can_evaluate_arguments' and 'get_relocated_address' methods
2148 from probe.
2149 (create_exception_master_breakpoint): Likewise.
2150 (add_location_to_breakpoint): Use 'sal->prob' instead of
2151 'sal->probe'.
2152 (bkpt_probe_insert_location): Call 'set_semaphore' method from
2153 probe.
2154 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
2155 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
2156 of 'probe_ops'.
2157 (probe_key_free): Call 'delete' on probe.
2158 (check_exception_resume): Use 'probe.prob' instead of
2159 'probe.probe'.
2160 * location.c (string_to_event_location_basic): Call
2161 'probe_linespec_to_static_ops'.
2162 * probe.c (class any_static_probe_ops): New class.
2163 (any_static_probe_ops any_static_probe_ops): New variable.
2164 (parse_probes_in_pspace): Receive 'static_probe_ops' as
2165 argument. Adjust code to reflect change.
2166 (parse_probes): Use 'static_probe_ops' instead of
2167 'probe_ops'. Adjust code to reflect change.
2168 (find_probes_in_objfile): Call methods to get name and
2169 provider from probe.
2170 (find_probe_by_pc): Use 'result.prob' instead of
2171 'result.probe'. Call 'get_relocated_address' method from
2172 probe.
2173 (collect_probes): Adjust comment and argument list to receive
2174 'static_probe_ops' instead of 'probe_ops'. Adjust code to
2175 reflect change. Call necessary methods from probe.
2176 (compare_probes): Call methods to get name and provider from
2177 probes.
2178 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
2179 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
2180 adjust code accordingly.
2181 (print_ui_out_not_applicables): Likewise.
2182 (info_probes_for_ops): Rename to...
2183 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
2184 as argument instead of 'probe_ops'. Adjust code. Call
2185 necessary methods from probe.
2186 (info_probes_command): Use 'info_probes_for_spops'.
2187 (enable_probes_command): Pass correct argument to
2188 'collect_probes'. Call methods from probe.
2189 (disable_probes_command): Likewise.
2190 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
2191 (get_probe_argument_count): Move to
2192 'any_static_probe_ops::get_argument_count'.
2193 (can_evaluate_probe_arguments): Move to
2194 'any_static_probe_ops::can_evaluate_arguments'.
2195 (evaluate_probe_argument): Move to
2196 'any_static_probe_ops::evaluate_argument'.
2197 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
2198 'probe.probe'.
2199 (probe_linespec_to_ops): Rename to...
2200 (probe_linespec_to_static_ops): ...this. Adjust code.
2201 (probe_any_is_linespec): Rename to...
2202 (any_static_probe_ops::is_linespec): ...this.
2203 (probe_any_get_probes): Rename to...
2204 (any_static_probe_ops::get_probes): ...this.
2205 (any_static_probe_ops::type_name): New method.
2206 (any_static_probe_ops::gen_info_probes_table_header): New
2207 method.
2208 (compute_probe_arg): Use 'pc_probe.prob' instead of
2209 'pc_probe.probe'. Call methods from probe.
2210 (compile_probe_arg): Likewise.
2211 (std::vector<const probe_ops *> all_probe_ops): Delete.
2212 (std::vector<const static_probe_ops *> all_static_probe_ops):
2213 New variable.
2214 (_initialize_probe): Use 'all_static_probe_ops' instead of
2215 'all_probe_ops'.
2216 * probe.h (struct info_probe_column) <field_name>: Delete
2217 extraneous newline
2218 (info_probe_column_s): Delete type and VEC.
2219 (struct probe_ops): Delete. Replace with...
2220 (class static_probe_ops): ...this and...
2221 (clas probe): ...this.
2222 (struct bound_probe) <bound_probe>: Delete extraneous
2223 newline. Adjust constructor to receive 'probe' instead of
2224 'struct probe'.
2225 <probe>: Rename to...
2226 <prob>: ...this. Delete extraneous newline.
2227 <objfile>: Delete extraneous newline.
2228 (register_probe_ops): Delete unused prototype.
2229 (info_probes_for_ops): Rename to...
2230 (info_probes_for_spops): ...this. Adjust comment.
2231 (get_probe_address): Move to 'probe::get_address'.
2232 (get_probe_argument_count): Move to
2233 'probe::get_argument_count'.
2234 (can_evaluate_probe_arguments): Move to
2235 'probe::can_evaluate_arguments'.
2236 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
2237 * solib-svr4.c (struct svr4_info): Adjust comment.
2238 (struct probe_and_action) <probe>: Rename to...
2239 <prob>: ...this.
2240 (register_solib_event_probe): Receive 'probe' instead of
2241 'struct probe' as argument. Use 'prob' instead of 'probe'
2242 when applicable.
2243 (solib_event_probe_action): Call 'get_argument_count' method
2244 from probe. Adjust comment.
2245 (svr4_handle_solib_event): Adjust comment. Call
2246 'evaluate_argument' method from probe.
2247 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
2248 from probe.
2249 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
2250 'struct probe'. Call 'can_evaluate_arguments' from probe.
2251 * symfile.h: Forward declare 'class probe' instead of 'struct
2252 probe'.
2253 * symtab.h: Likewise.
2254 (struct symtab_and_line) <probe>: Rename to...
2255 <prob>: ...this.
2256 * tracepoint.c (start_tracing): Use 'prob' when applicable.
2257 Call probe methods.
2258 (stop_tracing): Likewise.
2259
2260 2017-11-22 Joel Brobecker <brobecker@adacore.com>
2261
2262 * ravenscar-thread.c (ravenscar_inferior_created): Remove
2263 trailing newline at end of string in call to warning.
2264
2265 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2266
2267 * osdata.h: Include vector isntead of vec.h.
2268 (osdata_column_s): Remove typedef.
2269 (struct osdata_column): Add constructor.
2270 <name, value>: Change type to std::string.
2271 (DEF_VEC_O (osdata_column_s)): Remove.
2272 (osdata_item_s): Remove typedef.
2273 (struct osdata_item) <columns>: Change type to std::vector.
2274 (DEF_VEC_O (osdata_item_s)): Remove.
2275 (struct osdata): Add constructor.
2276 <type>: Change type to std::string.
2277 <items>: Change type to std::vector.
2278 (osdata_p): Remove typedef.
2279 (DEF_VEC_P (osdata_p)): Remove.
2280 (osdata_parse): Return a unique_ptr.
2281 (osdata_free): Remove.
2282 (make_cleanup_osdata_free): Remove.
2283 (get_osdata): Return a unique_ptr.
2284 (get_osdata_column): Return pointer to std::string, take a
2285 reference to osdata_item as parameter.
2286 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2287 unique_ptr.
2288 <property_name>: Change type to std::string.
2289 (osdata_start_osdata): Allocate osdata with new and adjust.
2290 (osdata_start_item): Adjust.
2291 (osdata_start_column): Adjust.
2292 (osdata_end_column): Adjust.
2293 (clear_parsing_data): Remove.
2294 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2295 (osdata_item_clear): Remove.
2296 (get_osdata): return a unique_ptr and adjust.
2297 (get_osdata_column): Return a pointer to std::string and adjust.
2298 (info_osdata): Adjust.
2299 * mi/mi-main.c: Include <map>.
2300 (free_vector_of_osdata_items): Remove.
2301 (list_available_thread_groups): Adjust, use std::map instead of
2302 splay tree.
2303
2304 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2307 case in switch.
2308
2309 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2310
2311 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2312
2313 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2314
2315 * varobj.h (struct varobj_update_result): Add constructor, add
2316 move constructor, disable copy and assign, initialize fields.
2317 <newobj>: Change type to std::vector.
2318 (varobj_update): Return std::vector.
2319 * varobj.c (install_dynamic_child): Change VEC parameters to
2320 std::vector and adjust.
2321 (update_dynamic_varobj_children): Likewise.
2322 (varobj_update): Return std::vector and adjust.
2323 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2324
2325 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2326
2327 * varobj.h (struct varobj) <parent>: Remove const.
2328 <children>: Change type to std::vector.
2329 (varobj_list_children): Return std::vector const reference.
2330 (varobj_restrict_range): Change parameter type to std::vector
2331 const reference.
2332 * varobj.c (varobj_has_more): Adjust.
2333 (varobj_restrict_range): Change parameter type to std::vector
2334 const reference and adjust.
2335 (install_dynamic_child): Adjust.
2336 (update_dynamic_varobj_children): Adjust.
2337 (varobj_list_children): Return std::vector const reference and
2338 adjust.
2339 (varobj_add_child): Adjust.
2340 (update_type_if_necessary): Adjust.
2341 (varobj_update): Adjust.
2342 (delete_variable_1): Adjust.
2343 * ada-varobj.c (ada_value_has_mutated): Adjust.
2344 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2345
2346 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2347
2348 * varobj.h (struct varobj): Add constructor and destructor,
2349 initialize fields.
2350 * varobj.c (struct varobj_root): Initialize fields.
2351 (struct varobj_dynamic): Initialize fields.
2352 (varobj_create): Use unique_ptr instead of cleanup. Create
2353 varobj with new instead of new_root_variable.
2354 (delete_variable_1): Free variable with delete instead of
2355 free_variable.
2356 (create_child_with_value): Create variable with new instead of
2357 new_variable.
2358 (varobj::varobj): New.
2359 (varobj::~varobj): New (body mostly coming from free_variable).
2360 (new_variable): Remove.
2361 (free_variable): Remove.
2362 (do_free_variable_cleanup): Remove.
2363 (make_cleanup_free_variable): Remove.
2364
2365 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2366
2367 * core-regset.c: Remove file.
2368 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2369
2370 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2371
2372 * NEWS: Document use of GNU MPFR.
2373 * README: Likewise.
2374
2375 * Makefile.in (LIBMPFR): Add define.
2376 (CLIBS): Add $(LIBMPFR).
2377 * configure.ac: Add --with-mpfr configure option.
2378 * configure: Regenerate.
2379 * config.in: Regenerate.
2380
2381 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2382 (class mpfr_float_ops): New type.
2383 (mpfr_float_ops::from_target): Two new overloaded functions.
2384 (mpfr_float_ops::to_target): Likewise.
2385 (mpfr_float_ops::to_string): New function.
2386 (mpfr_float_ops::from_string): Likewise.
2387 (mpfr_float_ops::to_longest): Likewise.
2388 (mpfr_float_ops::from_longest): Likewise.
2389 (mpfr_float_ops::from_ulongest): Likewise.
2390 (mpfr_float_ops::to_host_double): Likewise.
2391 (mpfr_float_ops::from_host_double): Likewise.
2392 (mpfr_float_ops::convert): Likewise.
2393 (mpfr_float_ops::binop): Likewise.
2394 (mpfr_float_ops::compare): Likewise.
2395 (get_target_float_ops): Use mpfr_float_ops if available.
2396
2397 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2398
2399 * target-float.c: Do not include <math.h>.
2400 Include <cmath> and <limits>.
2401 (DOUBLEST): Do not define.
2402 (class target_float_ops): New type.
2403 (class host_float_ops): New templated type.
2404 (class decimal_float_ops): New type.
2405
2406 (floatformat_to_doublest): Rename to ...
2407 (host_float_ops<T>::from_target): ... this. Use template type T
2408 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2409 (host_float_ops<T>::from_target): New overload using a type argument.
2410 (floatformat_from_doublest): Rename to ...
2411 (host_float_ops<T>::to_target): ... this. Use template type T
2412 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2413 (host_float_ops<T>::to_target): New overload using a type argument.
2414 (floatformat_printf_format): New function.
2415 (struct printf_length_modifier): New templated type.
2416 (floatformat_to_string): Rename to ...
2417 (host_float_ops<T>::to_string): ... this. Use type instead of
2418 floatformat argument. Use floatformat_printf_format and
2419 printf_length_modifier. Remove special handling of invalid numbers,
2420 infinities and NaN (moved to target_float_to_string).
2421 (struct scanf_length_modifier): New templated type.
2422 (floatformat_from_string): Rename to ...
2423 (host_float_ops<T>::from_string): ... this. Use type instead of
2424 floatformat argument. Use scanf_length_modifier.
2425 (floatformat_to_longest): Rename to ...
2426 (host_float_ops<T>::to_longest): ... this. Use type instead of
2427 floatformat argument. Handle out-of-range values deterministically.
2428 (floatformat_from_longest): Rename to ...
2429 (host_float_ops<T>::from_longest): ... this. Use type instead of
2430 floatformat argument.
2431 (floatformat_from_ulongest): Rename to ...
2432 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2433 floatformat argument.
2434 (floatformat_to_host_double): Rename to ...
2435 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2436 floatformat argument.
2437 (floatformat_from_host_double): Rename to ...
2438 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2439 floatformat argument.
2440 (floatformat_convert): Rename to ...
2441 (host_float_ops<T>::convert): ... this. Use type instead of
2442 floatformat arguments. Remove handling of no-op conversions.
2443 (floatformat_binop): Rename to ...
2444 (host_float_ops<T>::binop): ... this. Use type instead of
2445 floatformat arguments.
2446 (floatformat_compare): Rename to ...
2447 (host_float_ops<T>::compare): ... this. Use type instead of
2448 floatformat arguments.
2449
2450 (match_endianness): Use type instead of length/byte_order arguments.
2451 (set_decnumber_context): Likewise.
2452 (decimal_from_number): Likewise. Update calls.
2453 (decimal_to_number): Likewise.
2454 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2455 (decimal_float_ops::to_host_double): New dummy function.
2456 (decimal_float_ops::from_host_double): Likewise.
2457 (decimal_to_string): Rename to ...
2458 (decimal_float_ops::to_string): ... this. Use type instead of
2459 length/byte_order arguments. Update calls.
2460 (decimal_from_string): Rename to ...
2461 (decimal_float_ops::from_string): ... this. Use type instead of
2462 length/byte_order arguments. Update calls.
2463 (decimal_from_longest): Rename to ...
2464 (decimal_float_ops::from_longest): ... this. Use type instead of
2465 length/byte_order arguments. Update calls.
2466 (decimal_from_ulongest): Rename to ...
2467 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2468 length/byte_order arguments. Update calls.
2469 (decimal_to_longest): Rename to ...
2470 (decimal_float_ops::to_longest): ... this. Use type instead of
2471 length/byte_order arguments. Update calls.
2472 (decimal_binop): Rename to ...
2473 (decimal_float_ops::binop): ... this. Use type instead of
2474 length/byte_order arguments. Update calls.
2475 (decimal_compare): Rename to ...
2476 (decimal_float_ops::compare): ... this. Use type instead of
2477 length/byte_order arguments. Update calls.
2478 (decimal_convert): Rename to ...
2479 (decimal_float_ops::convert): ... this. Use type instead of
2480 length/byte_order arguments. Update calls.
2481
2482 (target_float_same_category_p): New function.
2483 (target_float_same_format_p): Likewise.
2484 (target_float_format_length): Likewise.
2485 (enum target_float_ops_kind): New type.
2486 (get_target_float_ops_kind): New function.
2487 (get_target_float_ops): Three new overloaded functions.
2488
2489 (target_float_is_zero): Update call.
2490 (target_float_to_string): Add special handling of invalid numbers,
2491 infinities and NaN (moved from floatformat_to_string). Use
2492 target_float_ops callback.
2493 (target_float_from_string): Use target_float_ops callback.
2494 (target_float_to_longest): Likewise.
2495 (target_float_from_longest): Likewise.
2496 (target_float_from_ulongest): Likewise.
2497 (target_float_to_host_double): Likewise.
2498 (target_float_from_host_double): Likewise.
2499 (target_float_convert): Add special case for no-op conversions.
2500 Use target_float_ops callback.
2501 (target_float_binop): Use target_float_ops callback.
2502 (target_float_compare): Likewise.
2503
2504 2017-11-22 Yao Qi <yao.qi@linaro.org>
2505
2506 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2507
2508 2017-11-22 Yao Qi <yao.qi@linaro.org>
2509
2510 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2511 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2512
2513 2017-11-21 Jerome Guitton <guitton@adacore.com>
2514
2515 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2516 with event ptid from the lower layer before doing the
2517 ravenscar-specific update.
2518
2519 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2520
2521 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2522 the ptid's TID is nonzero.
2523
2524 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2525
2526 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2527 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2528 Make non-static. Change return type to char *. Adjust code
2529 accordingly. Rewrite the function's documentation.
2530 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2531 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2532 we have enough debugging information in the runtime to support
2533 Ada task debugging before we enable the ravenscar-thread layer.
2534
2535 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2536
2537 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2538 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2539 * ravenscar-thread.c: Add into comment.
2540 (base_magic_null_ptid): Delete.
2541 (base_ptid): Change documentation.
2542 (ravenscar_active_task): Renames ravenscar_running_thread.
2543 All callers updated throughout.
2544 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2545 (ravenscar_task_is_currently_active): Likewise.
2546 (get_base_thread_from_ravenscar_task): Ditto.
2547 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2548 (ravenscar_runtime_initialized): Likewise.
2549 (get_running_thread_id): Add new parameter "cpu". Adjust
2550 implementation to handle this new parameter.
2551 (ravenscar_fetch_registers): Small adjustment to use
2552 is_ravenscar_task and ravenscar_task_is_currently_active in
2553 order to decide whether to use the target beneath or this
2554 module's arch_ops.
2555 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2556 (ravenscar_stopped_by_sw_breakpoint): Use
2557 get_base_thread_from_ravenscar_task to get the underlying
2558 thread, rather than using base_ptid.
2559 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2560 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2561 Likewise.
2562 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2563
2564 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2565
2566 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2567 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2568 (get_tcb_types_info): Set fieldnos.base_cpu.
2569 (read_atcb): Set task_info->base_cpu.
2570 (info_task): Print "Base CPU" info if set by runtime.
2571
2572 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2573
2574 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2575 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2576 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2577 New functions.
2578 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2579 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2580 to_stopped_data_address and to_core_of_thread fields of
2581 ravenscar_ops.
2582
2583 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2584
2585 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2586 (struct gdbarch_tdep): New member long_double_abi.
2587 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2588 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2589 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2590 format depending on long_double_abi tdep member.
2591 (ppc_floatformat_for_type): Handle __ibm128 type.
2592
2593 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2594
2595 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2596
2597 2017-11-21 Pedro Alves <palves@redhat.com>
2598
2599 * dwarf2read.c (mapped_index::find_name_components_bounds)
2600 <completion mode, upper bound>: Use std::lower_bound instead of
2601 std::upper_bound.
2602 (test_mapped_index_find_name_component_bounds): Remove incorrect
2603 "t1_fund" from expected symbols.
2604
2605 2017-11-21 Pedro Alves <palves@redhat.com>
2606
2607 * dwarf2read.c (mapped_index::name_components_casing): New field.
2608 (mapped_index) <build_name_components,
2609 find_name_components_bounds): Declare new methods.
2610 (mapped_index::find_name_components_bounds)
2611 (mapped_index::build_name_components): New methods, factored out
2612 from dw2_expand_symtabs_matching_symbol.
2613 (check_find_bounds_finds)
2614 (test_mapped_index_find_name_component_bounds): New.
2615 (run_test): Rename to ...
2616 (test_dw2_expand_symtabs_matching_symbol): ... this.
2617 (run_test): Reimplement.
2618
2619 2017-11-21 Pedro Alves <palves@redhat.com>
2620
2621 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2622 (symbol_end): Use cp_ident_is_alnum.
2623 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2624 * dwarf2read.c (make_sort_after_prefix_name): New function.
2625 (dw2_expand_symtabs_matching_symbol): Use it.
2626 (test_symbols): Add more symbols.
2627 (run_test): Add tests.
2628
2629 2017-11-17 Tom Tromey <tom@tromey.com>
2630
2631 * symtab.h (enum symbol_subclass_kind): New.
2632 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2633 Remove.
2634 <subclass>: New member.
2635 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2636 * rust-lang.c (rust_get_trait_object_pointer): Update.
2637 * dwarf2read.c (read_func_scope): Update.
2638 (read_variable): Update.
2639
2640 2017-11-17 Tom Tromey <tom@tromey.com>
2641
2642 * dwarf2read.c (read_func_scope): Update.
2643 * symtab.h (struct template_symbol): Derive from symbol.
2644 <base>: Remove.
2645
2646 2017-11-17 Tom Tromey <tom@tromey.com>
2647
2648 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2649 (struct rust_vtable_symbol): New.
2650 (find_symbol_at_address): Declare.
2651 * symtab.c (find_symbol_at_address): New function.
2652 * symfile.h (struct quick_symbol_functions)
2653 <find_compunit_symtab_by_address>: New member.
2654 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2655 function.
2656 (debug_sym_quick_functions): Link to
2657 debug_qf_find_compunit_symtab_by_address.
2658 * rust-lang.c (rust_get_trait_object_pointer): New function.
2659 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2660 rust_get_trait_object_pointer.
2661 * psymtab.c (psym_relocate): Clear psymbol_map.
2662 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2663 functions.
2664 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2665 * objfiles.h (struct objfile) <psymbol_map>: New member.
2666 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2667 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2668 (rust_containing_type, read_variable): New functions.
2669
2670 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2671
2672 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2673
2674 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * common/filestuff.c: Include <algorithm>.
2677 (open_fds): Change type to std::vector<int>.
2678 (do_mark_open_fd): Adjust.
2679 (unmark_fd_no_cloexec): Adjust.
2680 (do_close): Adjust.
2681
2682 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2683
2684 * breakpoint.c (output_thread_groups): Take an std::vector.
2685 (print_one_breakpoint_location): Adjust.
2686
2687 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2688
2689 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2690 (ada_evaluate_subexp_for_cast): New function.
2691 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2692 ada_evaluate_subexp_for_cast.
2693 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2694 eval_skip_value.
2695 * eval.c (evaluate_var_value): Make non-static.
2696 (evaluate_var_msym_value, eval_skip_value): Likewise.
2697 * value.h (evaluate_var_value, evaluate_var_msym_value)
2698 (eval_skip_value): Declare.
2699
2700 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2701
2702 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2703 Update all callers.
2704
2705 2017-11-16 Pedro Alves <palves@redhat.com>
2706
2707 * python/py-unwind.c (pyuw_sniffer): Translate
2708 PyExc_KeyboardInterrupt to a GDB Quit exception.
2709
2710 2017-11-16 Pedro Alves <palves@redhat.com>
2711
2712 * infrun.c (resume_cleanups): Delete.
2713 (resume): No longer install a resume_cleanups cleanup nor call
2714 QUIT.
2715 (proceed): Pass the terminal to the inferior.
2716 (keep_going_pass_signal): No longer install a resume_cleanups
2717 cleanup.
2718
2719 2017-11-16 Pedro Alves <palves@redhat.com>
2720
2721 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2722 if the prompt is blocked.
2723
2724 2017-11-16 Pedro Alves <palves@redhat.com>
2725
2726 * breakpoint.c (insert_bp_location): Replace bp_err and
2727 bp_err_message locals by a gdb_exception local.
2728
2729 2017-11-16 Pedro Alves <palves@redhat.com>
2730
2731 * inflow.c (scoped_ignore_sigttou): New class.
2732 (child_terminal_ours_1, new_tty): Use it.
2733
2734 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2735
2736 * target-float.c (decimal_from_number): Add byte_order argument and
2737 call match_endianness. Error if unknown floating-point type.
2738 (decimal_to_number): Add byte_order argument and call match_endianness.
2739 (decimal_from_longest): Update call. Do not call match_endianness.
2740 (decimal_from_ulongest): Likewise.
2741 (decimal_binop): Likewise.
2742 (decimal_is_zero): Likewise.
2743 (decimal_compare): Likewise.
2744 (decimal_convert): Likewise.
2745
2746 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2747
2748 * python/python.c (gdbpy_rbreak): New function.
2749 * NEWS: Document Python rbreak feature.
2750
2751 2017-11-16 Yao Qi <yao.qi@linaro.org>
2752
2753 * features/tic6x-c62x.xml: Remove.
2754 * features/tic6x-c64x.xml: Remove.
2755 * features/tic6x-c64xp.xml: Remove.
2756
2757 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2758
2759 * symtab.h: Include <array>.
2760
2761 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2762
2763 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2764 (bsd_kvm_proc_cmd): Likewise.
2765
2766 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2767
2768 * tui/tui-win.c (window_name_completer): Replace VEC with
2769 std::vector.
2770
2771 2017-11-15 Andrew Cagney <cagney@gnu.org>
2772
2773 * MAINTAINERS: Remove no-longer applicable entries.
2774
2775 2017-11-15 Andrew Cagney <cagney@gnu.org>
2776
2777 * MAINTAINERS: Move self to Past Maintainers.
2778
2779 2017-11-15 Yao Qi <yao.qi@linaro.org>
2780
2781 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2782 * features/nios2-linux.c: Remove.
2783 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2784 initialize_tdesc_nios2_linux.
2785
2786 2017-11-15 Yao Qi <yao.qi@linaro.org>
2787
2788 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2789 M68HC11_LAST_HARD_REG + 1.
2790
2791 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2792
2793 PR gdb/22388
2794 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2795 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2796 Return TARGET_XFER_EOF if size of returned data is 0.
2797
2798 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2799
2800 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2801 memory-map-selftests.c.
2802 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2803 * memory-map.c (memory_map_start_memory): Fix computation of hi
2804 address.
2805 * unittests/memory-map-selftests.c: New file.
2806
2807 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2808
2809 * ada-lang.c: Fix some typos in the general command documenting
2810 how Ada expressions are being evaluated and how their result
2811 is printed.
2812
2813 2017-11-09 Tom Tromey <tom@tromey.com>
2814
2815 * psymtab.c (psymbol_hash): Do not hash string contents.
2816 (psymbol_compare): Add comment.
2817
2818 2017-11-09 Tom Tromey <tom@tromey.com>
2819
2820 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2821
2822 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2823
2824 * ada-exp.y (write_var_from_sym): Remove parameter
2825 "orig_left_context". Update all callers.
2826
2827 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * tracepoint.h (class collection_list) <stringify>: Return
2830 std::vector<std::string>.
2831 (encode_actions_rsp): Change parameters to
2832 std::vector<std::string> *.
2833 * tracepoint.c (collection_list::stringify): Return
2834 std::vector<std::string> and adjust accordingly.
2835 (encode_actions_rsp): Changee parameters to
2836 std::vector<std::string> and adjust accordingly.
2837 * remote.c (free_actions_list),
2838 free_actions_list_cleanup_wrapper): Remove.
2839 (remote_download_tracepoint): Adjust to std::vector.
2840
2841 2017-11-08 Tom Tromey <tom@tromey.com>
2842
2843 * dwarf2read.c (symbolp): Remove typedef.
2844 (read_func_scope): Use std::vector.
2845 (process_structure_scope): Use std::vector.
2846
2847 2017-11-08 Pedro Alves <palves@redhat.com>
2848
2849 * ada-lang.c (ada_make_symbol_completion_list): Use
2850 completion_skip_symbol.
2851 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2852 (symbol_is_function_or_method(symbol*)): New.
2853 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2854 completion_skip_symbol.
2855 (default_collect_symbol_completion_matches_break_on): Use
2856 completion_skip_symbol. Pass down mode.
2857 (collect_file_symbol_completion_matches): Pass down mode.
2858 * symtab.h (symbol_is_function_or_method): New declarations.
2859 (completion_skip_symbol): New template function.
2860
2861 2017-11-08 Pedro Alves <palves@redhat.com>
2862
2863 * linespec.c (iterate_over_all_matching_symtabs): Add
2864 search_domain parameter. Pass it down to expand_symtabs_matching.
2865 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2866 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2867 search_domain.
2868 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2869 Pass it down.
2870 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2871 symbols.
2872 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2873 it down.
2874
2875 2017-11-08 Pedro Alves <palves@redhat.com>
2876
2877 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2878 text_len locals and don't pass them down.
2879 * symtab.c (completion_list_add_name): Remove
2880 sym_text/sym_text_len parameters and adjust.
2881 (completion_list_add_symbol, completion_list_add_msymbol)
2882 (completion_list_objc_symbol, completion_list_add_fields)
2883 (add_symtab_completions): Likewise.
2884 (default_collect_symbol_completion_matches_break_on)
2885 (collect_file_symbol_completion_matches): Remove sym_text_len
2886 local and don't pass it down.
2887 * symtab.h (completion_list_add_name): Remove
2888 sym_text/sym_text_len parameters.
2889
2890 2017-11-08 Pedro Alves <palves@redhat.com>
2891
2892 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2893 unittests/lookup_name_info-selftests.c.
2894 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2895 * cp-support.c: Include "selftest.h".
2896 (cp_remove_params_1): Rename from cp_remove_params. Add
2897 'require_param' parameter, and handle it.
2898 (cp_remove_params): Reimplement.
2899 (cp_remove_params_if_any): New.
2900 (selftests::quote): New.
2901 (selftests::check_remove_params): New.
2902 (selftests::test_cp_remove_params): New.
2903 (_initialize_cp_support): Install
2904 selftests::test_cp_remove_params.
2905 * cp-support.h (cp_remove_params_if_any): Declare.
2906 * dwarf2read.c :Include "selftest.h".
2907 (dw2_expand_symtabs_matching_symbol): Use
2908 lookup_name_info::make_ignore_params.
2909 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2910 (selftests::dw2_expand_symtabs_matching::string_or_null)
2911 (selftests::dw2_expand_symtabs_matching::check_match)
2912 (selftests::dw2_expand_symtabs_matching::test_symbols)
2913 (selftests::dw2_expand_symtabs_matching::run_test): New.
2914 (_initialize_dwarf2_read): Register
2915 selftests::dw2_expand_symtabs_matching::run_test.
2916 * psymtab.c (psym_expand_symtabs_matching): Use
2917 lookup_name_info::make_ignore_params.
2918 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2919 If the lookup name wants to ignore parameters, strip them.
2920 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2921 code handling '('.
2922 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2923 (default_collect_symbol_completion_matches_break_on): Don't try to
2924 strip parameters.
2925 * symtab.h (lookup_name_info::lookup_name_info): Add
2926 'ignore_parameters' parameter.
2927 (lookup_name_info::ignore_parameters)
2928 (lookup_name_info::make_ignore_params): New methods.
2929 (lookup_name_info::m_ignore_parameters): New field.
2930 * unittests/lookup_name_info-selftests.c: New file.
2931
2932 2017-11-08 Pedro Alves <palves@redhat.com>
2933
2934 * dwarf2read.c (dw2_expand_marked_cus)
2935 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2936 (dw2_expand_symtabs_matching): Move further below.
2937 (dw2_expand_marked_cus): Reindent.
2938
2939 2017-11-08 Pedro Alves <palves@redhat.com>
2940
2941 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2942 (struct name_component): New.
2943 (mapped_index::name_components): New field.
2944 (mapped_index::symbol_name_at): New method.
2945 (dwarf2_read_index): Call mapped_index ctor.
2946 (dw2_map_matching_symbols): Add comment about name_components
2947 table.
2948 (dw2_expand_symtabs_matching): Factor part to...
2949 (dw2_expand_symtabs_matching_symbol): ... this new function.
2950 Build name components table, and lookup symbols in it before
2951 calling the name matcher.
2952 (dw2_expand_marked_cus): New, factored out from
2953 dw2_expand_symtabs_matching.
2954 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2955
2956 2017-11-08 Pedro Alves <palves@redhat.com>
2957
2958 * ada-lang.c (ada_encode): Rename to ..
2959 (ada_encode_1): ... this. Add throw_errors parameter and handle
2960 it.
2961 (ada_encode): Reimplement.
2962 (match_name): Delete, folded into full_name.
2963 (resolve_subexp): No longer pass the encoded name to
2964 ada_lookup_symbol_list.
2965 (should_use_wild_match): Delete.
2966 (name_match_type_from_name): New.
2967 (ada_lookup_simple_minsym): Use lookup_name_info and the
2968 language's symbol_name_matcher_ftype.
2969 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2970 (ada_add_block_renamings): Adjust to use lookup_name_info.
2971 (ada_lookup_name): New.
2972 (add_nonlocal_symbols, ada_add_all_symbols)
2973 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2974 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2975 (ada_name_for_lookup): Delete.
2976 (ada_lookup_encoded_symbol): Construct a verbatim name.
2977 (wild_match): Reverse sense of return type. Use bool.
2978 (full_match): Reverse sense of return type. Inline bits of old
2979 match_name here.
2980 (ada_add_block_symbols): Adjust to use lookup_name_info.
2981 (symbol_completion_match): Delete, folded into...
2982 (ada_lookup_name_info::matches): ... .this new method.
2983 (symbol_completion_add): Delete.
2984 (ada_collect_symbol_completion_matches): Add name_match_type
2985 parameter. Adjust to use lookup_name_info and
2986 completion_list_add_name.
2987 (get_var_value, ada_add_global_exceptions): Adjust to use
2988 lookup_name_info.
2989 (ada_get_symbol_name_cmp): Delete.
2990 (do_wild_match, do_full_match): New functions.
2991 (ada_lookup_name_info::ada_lookup_name_info): New method.
2992 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2993 functions.
2994 (ada_language_defn): Install ada_get_symbol_name_matcher.
2995 * ada-lex.l (processId): If name starts with '<', copy it
2996 verbatim.
2997 * block.c (block_iter_match_step, block_iter_match_first)
2998 (block_iter_match_next, block_lookup_symbol)
2999 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
3000 lookup_name_info.
3001 * block.h (block_iter_match_first, block_iter_match_next)
3002 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
3003 * c-lang.c (c_language_defn, cplus_language_defn)
3004 (asm_language_defn, minimal_language_defn): Adjust comments to
3005 refer to la_get_symbol_name_matcher.
3006 * completer.c (complete_files_symbols)
3007 (collect_explicit_location_matches, symbol_completer): Pass a
3008 symbol_name_match_type down.
3009 * completer.h (class completion_match, completion_match_result):
3010 New classes.
3011 (completion_tracker::reset_completion_match_result): New method.
3012 (completion_tracker::m_completion_match_result): New field.
3013 * cp-support.c (make_symbol_overload_list_block): Adjust to use
3014 lookup_name_info.
3015 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
3016 functions.
3017 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
3018 * d-lang.c: Adjust comments to refer to
3019 la_get_symbol_name_matcher.
3020 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
3021 Adjust to use lookup_name_info.
3022 (dict_iter_match_first, dict_iter_match_next)
3023 (iter_match_first_hashed, iter_match_next_hashed)
3024 (iter_match_first_linear, iter_match_next_linear): Adjust to work
3025 with a lookup_name_info.
3026 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
3027 Likewise.
3028 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
3029 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
3030 (gdb_index_symbol_name_matcher): New class.
3031 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
3032 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
3033 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
3034 with a symbol_name_match_type.
3035 (f_language_defn): Adjust comments to refer to
3036 la_get_symbol_name_matcher.
3037 * go-lang.c (go_language_defn): Adjust comments to refer to
3038 la_get_symbol_name_matcher.
3039 * language.c (default_symbol_name_matcher)
3040 (language_get_symbol_name_matcher): New functions.
3041 (unknown_language_defn, auto_language_defn): Adjust comments to
3042 refer to la_get_symbol_name_matcher.
3043 * language.h (symbol_name_cmp_ftype): Delete.
3044 (language_defn) <la_collect_symbol_completion_matches>: Add match
3045 type parameter.
3046 <la_get_symbol_name_cmp>: Delete field.
3047 <la_get_symbol_name_matcher>: New field.
3048 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
3049 (default_symbol_name_matcher, language_get_symbol_name_matcher):
3050 Declare.
3051 * linespec.c (iterate_over_all_matching_symtabs)
3052 (iterate_over_file_blocks): Adjust to use lookup_name_info.
3053 (find_methods): Add language parameter, and use lookup_name_info
3054 and the language's symbol_name_matcher_ftype.
3055 (linespec_complete_function): Adjust.
3056 (lookup_prefix_sym): Use lookup_name_info.
3057 (add_all_symbol_names_from_pspace): Adjust.
3058 (find_superclass_methods): Add language parameter and pass it
3059 down.
3060 (find_method): Pass symbol language down.
3061 (find_linespec_symbols): Don't demangle or Ada encode here.
3062 (search_minsyms_for_name): Add lookup_name_info parameter.
3063 (add_matching_symbols_to_info): Add name_match_type parameter.
3064 Use lookup_name_info.
3065 * m2-lang.c (m2_language_defn): Adjust comments to refer to
3066 la_get_symbol_name_matcher.
3067 * minsyms.c: Include <algorithm>.
3068 (add_minsym_to_demangled_hash_table): Remove table parameter and
3069 add objfile parameter. Use search_name_hash, and add language to
3070 demangled languages vector.
3071 (struct found_minimal_symbols): New struct.
3072 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
3073 New functions.
3074 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
3075 input names here. Use lookup_name_info instead. Lookup up
3076 demangled names once for each language in the demangled names
3077 vector.
3078 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
3079 demangled names once for each language in the demangled names
3080 vector.
3081 (build_minimal_symbol_hash_tables): Adjust.
3082 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
3083 lookup_name_info.
3084 * objc-lang.c (objc_language_defn): Adjust comment to refer to
3085 la_get_symbol_name_matcher.
3086 * objfiles.h: Include <vector>.
3087 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
3088 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
3089 la_get_symbol_name_matcher.
3090 * p-lang.c (pascal_language_defn): Adjust comment to refer to
3091 la_get_symbol_name_matcher.
3092 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
3093 (match_partial_symbol): Use symbol_name_match_type,
3094 lookup_name_info and psymbol_name_matches.
3095 (lookup_partial_symbol): Use lookup_name_info.
3096 (map_block): Use symbol_name_match_type and lookup_name_info.
3097 (psym_map_matching_symbols): Use symbol_name_match_type.
3098 (psymbol_name_matches): New.
3099 (recursively_search_psymtabs): Use lookup_name_info and
3100 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
3101 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
3102 'kind' parameter to 'domain'.
3103 * rust-lang.c (rust_language_defn): Adjust comment to refer to
3104 la_get_symbol_name_matcher.
3105 * symfile-debug.c (debug_qf_map_matching_symbols)
3106 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
3107 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
3108 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
3109 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
3110 Adjust to use symbol_name_match_type.
3111 <expand_symtabs_matching>: Adjust to use lookup_name_info.
3112 (expand_symtabs_matching): Adjust to use lookup_name_info.
3113 * symmisc.c (maintenance_expand_symtabs): Use
3114 lookup_name_info::match_any ().
3115 * symtab.c (symbol_matches_search_name): New.
3116 (eq_symbol_entry): Adjust to use lookup_name_info and the
3117 language's matcher.
3118 (demangle_for_lookup_info::demangle_for_lookup_info): New.
3119 (lookup_name_info::match_any): New.
3120 (iterate_over_symbols, search_symbols): Use lookup_name_info.
3121 (compare_symbol_name): Add language, lookup_name_info and
3122 completion_match_result parameters, and use them.
3123 (completion_list_add_name): Make extern. Add language and
3124 lookup_name_info parameters. Use them.
3125 (completion_list_add_symbol, completion_list_add_msymbol)
3126 (completion_list_objc_symbol): Add lookup_name_info parameters and
3127 adjust. Pass down language.
3128 (completion_list_add_fields): Add lookup_name_info parameters and
3129 adjust. Pass down language.
3130 (add_symtab_completions): Add lookup_name_info parameters and
3131 adjust.
3132 (default_collect_symbol_completion_matches_break_on): Add
3133 name_match_type parameter, and use it. Use lookup_name_info.
3134 (default_collect_symbol_completion_matches)
3135 (collect_symbol_completion_matches): Add name_match_type
3136 parameter, and pass it down.
3137 (collect_symbol_completion_matches_type): Adjust.
3138 (collect_file_symbol_completion_matches): Add name_match_type
3139 parameter, and use lookup_name_info.
3140 * symtab.h: Include <string> and "common/gdb_optional.h".
3141 (enum class symbol_name_match_type): New.
3142 (class ada_lookup_name_info): New.
3143 (struct demangle_for_lookup_info): New.
3144 (class lookup_name_info): New.
3145 (symbol_name_matcher_ftype): New.
3146 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
3147 (symbol_matches_search_name): Declare.
3148 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
3149 (default_collect_symbol_completion_matches)
3150 (collect_symbol_completion_matches)
3151 (collect_file_symbol_completion_matches): Add name_match_type
3152 parameter.
3153 (iterate_over_symbols): Use lookup_name_info.
3154 (completion_list_add_name): Declare.
3155 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
3156 (strncmp_iw_with_mode): Now extern.
3157 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
3158 (strncmp_iw_with_mode): Declare.
3159
3160 2017-11-08 Keith Seitz <keiths@redhat.com>
3161 Pedro Alves <palves@redhat.com>
3162
3163 * ada-lang.c (ada_language_defn): Install
3164 default_search_name_hash.
3165 * buildsym.c (struct buildsym_compunit): <language>: New field.
3166 (finish_block_internal): Pass language when creating dictionaries.
3167 (start_buildsym_compunit, start_symtab): New language parameters.
3168 Use them.
3169 (restart_symtab): Pass down compilation unit's language.
3170 * buildsym.h (enum language): Forward declare.
3171 (start_symtab): New 'language' parameter.
3172 * c-lang.c (c_language_defn, cplus_language_defn)
3173 (asm_language_defn, minimal_language_defn): Install
3174 default_search_name_hash.
3175 * coffread.c (coff_start_symtab): Adjust.
3176 * d-lang.c (d_language_defn): Install default_search_name_hash.
3177 * dbxread.c (struct symloc): Add 'pst_language' field.
3178 (PST_LANGUAGE): Define.
3179 (start_psymtab, read_ofile_symtab): Use it.
3180 (process_one_symbol): New 'language' parameter. Pass it down.
3181 * dictionary.c (struct dictionary) <language>: New field.
3182 (DICT_LANGUAGE): Define.
3183 (dict_create_hashed, dict_create_hashed_expandable)
3184 (dict_create_linear, dict_create_linear_expandable): New parameter
3185 'language'. Set the dictionary's language.
3186 (iter_match_first_hashed): Adjust to rename.
3187 (insert_symbol_hashed): Assert we don't see mismatching
3188 languages. Adjust to rename.
3189 (dict_hash): Rename to ...
3190 (default_search_name_hash): ... this and make extern.
3191 * dictionary.h (struct language_defn): Forward declare.
3192 (dict_create_hashed): New parameter 'language'.
3193 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
3194 * f-lang.c (f_language_defn): Install default_search_name_hash.
3195 * go-lang.c (go_language_defn): Install default_search_name_hash.
3196 * jit.c (finalize_symtab): Pass compunit's language to dictionary
3197 creation.
3198 * language.c (unknown_language_defn, auto_language_defn):
3199 * language.h (language_defn::la_search_name_hash): New field.
3200 (default_search_name_hash): Declare.
3201 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
3202 * mdebugread.c (new_block): New parameter 'language'.
3203 * mdebugread.c (parse_symbol): Pass symbol language to block
3204 allocation.
3205 (psymtab_to_symtab_1): Pass down language.
3206 (new_symtab): Pass compunit's language to block allocation.
3207 * objc-lang.c (objc_language_defn): Install
3208 default_search_name_hash.
3209 * opencl-lang.c (opencl_language_defn):
3210 * p-lang.c (pascal_language_defn): Install
3211 default_search_name_hash.
3212 * rust-lang.c (rust_language_defn): Install
3213 default_search_name_hash.
3214 * stabsread.h (enum language): Forward declare.
3215 (process_one_symbol): Add 'language' parameter.
3216 * symtab.c (search_name_hash): New function.
3217 * symtab.h (search_name_hash): Declare.
3218 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
3219
3220 2017-11-08 Pedro Alves <palves@redhat.com>
3221
3222 * cp-name-parser.y (main): Don't initialize extra_chars.
3223
3224 2017-11-07 Tom Tromey <tom@tromey.com>
3225
3226 * event-top.h (command_handler): Constify.
3227 * record-full.c (cmd_record_full_start): Update.
3228 * thread.c (thread_apply_all_command): Update.
3229 * printcmd.c (eval_command): Update.
3230 * mi/mi-main.c (mi_execute_cli_command): Update.
3231 (mi_execute_async_cli_command): Update.
3232 * tui/tui-stack.c (tui_update_command): Update.
3233 * cli/cli-interp.c (safe_execute_command): Constify.
3234 * record.c (record_start): Update.
3235 (record_start, record_stop, cmd_record_start): Update.
3236 * record-btrace.c (cmd_record_btrace_bts_start): Update.
3237 (cmd_record_btrace_pt_start): Update.
3238 (cmd_record_btrace_start): Update.
3239 (cmd_record_btrace_start): Update.
3240 * reverse.c (exec_reverse_once): Update.
3241 * python/python.c (execute_gdb_command): Don't copy the command.
3242 * event-top.c (command_line_handler): Update.
3243 (command_handler): Constify.
3244 * defs.h (deprecated_call_command_hook): Constify.
3245 * cli/cli-script.h (execute_user_command): Constify.
3246 * cli/cli-script.c (execute_user_command): Constify.
3247 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
3248 (enum command_control_type): Update.
3249 * main.c (catch_command_errors): Remove non-const overload.
3250 (catch_command_errors_ftype): Remove.
3251 * python/py-cmd.c (cmdpy_function): Constify.
3252 * guile/scm-cmd.c (cmdscm_function): Constify.
3253 * cli/cli-dump.c (call_dump_func): Constify.
3254 * cli/cli-decode.c (do_const_cfunc): Constify.
3255 (do_sfunc): Constify.
3256 (cmd_func): Constify.
3257 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
3258 * top.h (execute_command): Constify.
3259 * top.c (execute_command): Constify.
3260 (execute_command_to_string): Constify.
3261 (deprecated_call_command_hook): Constify.
3262 * command.h (cmd_func): Constify.
3263 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
3264
3265 2017-11-07 Tom Tromey <tom@tromey.com>
3266
3267 * ada-lang.c (catch_ada_exception_command): Constify.
3268 (catch_assert_command): Constify.
3269 * break-catch-throw.c (catch_catch_command, catch_throw_command)
3270 (catch_rethrow_command): Constify.
3271 (catch_exception_command_1): Constify.
3272 * breakpoint.h (add_catch_command): Constify.
3273 * break-catch-syscall.c (catch_syscall_command_1): Constify.
3274 (catch_syscall_split_args): Constify.
3275 * break-catch-sig.c (catch_signal_command): Constify.
3276 (catch_signal_split_args): Constify.
3277 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3278 cmd_const_sfunc_ftype.
3279 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3280 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3281 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3282 (add_setshow_string_cmd, struct cmd_list_element)
3283 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3284 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3285 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3286 Constify.
3287 (set_cmd_sfunc): Constify.
3288 (empty_sfunc): Constify.
3289 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3290 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3291 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3292 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3293 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3294 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3295 Constify.
3296 (set_cmd_sfunc): Constify.
3297 (cmd_sfunc_ftype): Remove.
3298 * compile/compile.c (set_compile_args): Constify.
3299 * infrun.c (set_disable_randomization): Constify.
3300 * infcmd.c (set_args_command, set_cwd_command): Constify.
3301 * breakpoint.c (set_condition_evaluation_mode): Constify.
3302 (add_catch_command): Constify.
3303 (catch_fork_command_1, catch_exec_command_1)
3304 (catch_load_command_1, catch_unload_command_1): Constify.
3305 (catch_load_or_unload): Constify.
3306 * guile/scm-param.c (pascm_set_func): Constify.
3307 (add_setshow_generic): Constify.
3308 * python/py-param.c (get_set_value): Constify.
3309 * top.h (set_verbose): Constify.
3310 * tui/tui-win.c (tui_set_var_cmd): Constify.
3311 * mi/mi-main.c (set_mi_async_command): Constify.
3312 * cli/cli-logging.c (set_logging_overwrite)
3313 (set_logging_redirect): Constify.
3314 * value.c (set_max_value_size): Constify.
3315 * valprint.c (set_input_radix, set_output_radix): Constify.
3316 * utils.c (set_width_command, set_height_command): Constify.
3317 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3318 * tracepoint.c (set_disconnected_tracing)
3319 (set_circular_trace_buffer, set_trace_buffer_size)
3320 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3321 * top.c (set_history_size_command, set_verbose, set_editing)
3322 (set_gdb_datadir, set_history_filename): Constify.
3323 * target.c (set_targetdebug, maint_set_target_async_command)
3324 (maint_set_target_non_stop_command, set_target_permissions)
3325 (set_write_memory_permission): Constify.
3326 (open_target): Constify.
3327 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3328 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3329 * symtab.c (set_symbol_cache_size_handler): Constify.
3330 * symfile.c (set_ext_lang_command): Constify.
3331 * symfile-debug.c (set_debug_symfile): Constify.
3332 * source.c (set_directories_command): Constify.
3333 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3334 * serial.c (set_parity): Constify.
3335 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3336 * remote.c (set_remote_exec_file, set_remotebreak)
3337 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3338 * record.c (set_record_insn_history_size)
3339 (set_record_call_history_size): Constify.
3340 * record-full.c (set_record_full_insn_max_num): Constify.
3341 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3342 * osabi.c (set_osabi): Constify.
3343 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3344 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3345 * maint.c (maintenance_set_profile_cmd): Constify.
3346 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3347 * language.c (set_language_command, set_range_command)
3348 (set_case_command): Constify.
3349 * infrun.c (set_non_stop, set_observer_mode)
3350 (set_stop_on_solib_events, set_schedlock_func)
3351 (set_exec_direction_func): Constify.
3352 * infcmd.c (set_inferior_tty_command): Constify.
3353 * disasm.c (set_disassembler_options_sfunc): Constify.
3354 * demangle.c (set_demangling_command): Constify.
3355 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3356 * cris-tdep.c (set_cris_version, set_cris_mode)
3357 (set_cris_dwarf2_cfi): Constify.
3358 * corefile.c (set_gnutarget_command): Constify.
3359 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3360 (set_target_wide_charset_sfunc): Constify.
3361 * breakpoint.c (update_dprintf_commands): Constify.
3362 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3363 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3364 (set_disassembly_style_sfunc): Constify.
3365 * arch-utils.c (set_endian, set_architecture): Constify.
3366 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3367 * agent.c (set_can_use_agent): Constify.
3368
3369 2017-11-07 Tom Tromey <tom@tromey.com>
3370
3371 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3372 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3373 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3374 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3375 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3376 (parse_int_arg, show_thread_default_detach_sc_cmd)
3377 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3378 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3379 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3380 (show_task_pause_cmd, set_task_detach_sc_cmd)
3381 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3382 (set_noninvasive_cmd, set_thread_pause_cmd)
3383 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3384 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3385 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3386 * windows-nat.c (display_selectors): Constify.
3387 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3388 non-const "cfunc".
3389 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3390 (cmd_cfunc_eq): Likewise.
3391 (struct cmd_list_element): Likewise.
3392 (do_cfunc): Remove.
3393 (cli_user_command_p): Update.
3394 * command.h (add_cmd): Remove non-const overload.
3395 (cmd_cfunc_ftype): Remove typedef.
3396 (cmd_cfunc_eq): Remove non-const overload.
3397 * value.c (show_values): Constify.
3398 * thread.c (thread_apply_all_command): Constify.
3399 * symfile.c (load_command): Constify.
3400 * source.c (directory_command): Constify.
3401 * maint.c (maintenance_internal_error)
3402 (maintenance_demangler_warning, maintenance_space_display)
3403 (maintenance_print_architecture, maintenance_translate_address)
3404 (maintenance_info_selftests, maintenance_internal_warning):
3405 Constify.
3406 * breakpoint.c (disable_trace_command, enable_trace_command):
3407 Constify.
3408 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3409 Constify.
3410 (add_auto_load_safe_path): Constify.
3411 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3412 * top.h (show_commands): Constify.
3413 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3414 * sparc64-tdep.c (adi_examine_command): Constify.
3415 (adi_assign_command): Constify.
3416
3417 2017-11-07 Tom Tromey <tom@tromey.com>
3418
3419 * frame.h (info_locals_command, info_args_command): Constify.
3420 * auto-load.h (auto_load_info_scripts): Constify.
3421 * inferior.h (registers_info): Constify.
3422 * copying.c: Rebuild.
3423 * copying.awk: Constify generated commands.
3424 * auto-load.c (auto_load_info_scripts)
3425 (info_auto_load_gdb_scripts): Constify.
3426 * cli/cli-decode.c (struct cmd_list_element): Take a
3427 cmd_const_cfunc_ftype.
3428 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3429 * tui/tui-win.c (tui_all_windows_info): Constify.
3430 * python/py-auto-load.c (info_auto_load_python_scripts):
3431 Constify.
3432 * cli/cli-cmds.c (show_command): Remove non-const overload.
3433 * tracepoint.c (info_tvariables_command, info_scope_command):
3434 Constify.
3435 (info_static_tracepoint_markers_command): Constify.
3436 * thread.c (info_threads_command): Constify.
3437 (print_thread_info_1): Constify.
3438 * target.c (info_target_command): Constify.
3439 * symtab.c (info_sources_command, info_functions_command)
3440 (info_types_command): Constify.
3441 (info_variables_command): Remove non-const overload.
3442 * symfile.c (info_ext_lang_command): Constify.
3443 * stack.c (info_frame_command, info_locals_command)
3444 (info_args_command): Constify.
3445 (backtrace_command): Remove non-const overload.
3446 * source.c (info_source_command, info_line_command): Constify.
3447 * solib.c (info_sharedlibrary_command): Constify.
3448 * skip.c (info_skip_command): Constify.
3449 * ser-go32.c (info_serial_command): Constify.
3450 * reverse.c (info_bookmarks_command): Constify.
3451 * printcmd.c (info_symbol_command, info_address_command)
3452 (info_display_command): Constify.
3453 * osdata.c (info_osdata_command): Constify.
3454 * objc-lang.c (info_selectors_command, info_classes_command):
3455 Constify.
3456 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3457 * memattr.c (info_mem_command): Constify.
3458 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3459 * linux-fork.c (info_checkpoints_command): Constify.
3460 * infrun.c (info_signals_command): Constify.
3461 * inflow.c (info_terminal_command): Constify.
3462 * inferior.c (info_inferiors_command): Constify.
3463 (print_inferior): Constify.
3464 * infcmd.c (info_program_command, info_all_registers_command)
3465 (info_registers_command, info_vector_command)
3466 (info_float_command): Constify.
3467 (registers_info): Constify.
3468 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3469 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3470 Constify.
3471 * f-valprint.c (info_common_command): Constify.
3472 * dcache.c (info_dcache_command): Constify.
3473 (dcache_info_1): Constify.
3474 * darwin-nat-info.c (info_mach_tasks_command)
3475 (info_mach_task_command, info_mach_ports_command)
3476 (info_mach_port_command, info_mach_threads_command)
3477 (info_mach_thread_command, info_mach_regions_command)
3478 (info_mach_regions_recurse_command, info_mach_region_command)
3479 (info_mach_exceptions_command): Constify.
3480 (get_task_from_args): Constify.
3481 * cp-support.c (info_vtbl_command): Constify.
3482 * breakpoint.c (info_watchpoints_command)
3483 (info_tracepoints_command): Constify.
3484 (info_breakpoints_command): Remove non-const overload.
3485 * avr-tdep.c (avr_io_reg_read_command): Constify.
3486 * auxv.c (info_auxv_command): Constify.
3487 * ada-tasks.c (info_tasks_command): Constify.
3488 (info_task): Constify.
3489 * ada-lang.c (info_exceptions_command): Constify.
3490
3491 2017-11-07 Tom Tromey <tom@tromey.com>
3492
3493 * solib.h (no_shared_libraries): Constify.
3494 * frame.h (return_command): Constify.
3495 * cli/cli-cmds.h (quit_command): Constify.
3496 * top.h (quit_command, execute_command): Constify.
3497 * target.h (flash_erase_command): Constify.
3498 * inferior.h (set_inferior_args, attach_command): Constify.
3499 * tracepoint.h (start_tracing, stop_tracing): Constify.
3500 * breakpoint.h (break_command, tbreak_command)
3501 (hbreak_command_wrapper, thbreak_command_wrapper)
3502 (rbreak_command_wrapper, watch_command_wrapper)
3503 (awatch_command_wrapper, rwatch_command_wrapper)
3504 (get_tracepoint_by_number): Constify.
3505 * symtab.c (info_variables_command, rbreak_command)
3506 (symtab_symbol_info): Constify.
3507 (info_variables_command): Add non-const overload.
3508 * top.c (dont_repeat_command): Constify.
3509 * breakpoint.c (ignore_command, commands_command)
3510 (condition_command, tbreak_command, hbreak_command)
3511 (thbreak_command, clear_command, break_command)
3512 (info_breakpoints_command, watch_command, rwatch_command)
3513 (awatch_command, trace_command, ftrace_command, strace_command)
3514 (trace_pass_command, break_range_command, dprintf_command)
3515 (agent_printf_command, get_tracepoint_by_number)
3516 (watch_maybe_just_location, trace_pass_command): Constify.
3517 (info_breakpoints_command): Add non-const overload.
3518 * tracefile.c (tsave_command): Constify.
3519 * infcmd.c (attach_command, disconnect_command, signal_command)
3520 (queue_signal_command, stepi_command, nexti_command)
3521 (finish_command, next_command, step_command, until_command)
3522 (advance_command, jump_command, continue_command, run_command)
3523 (start_command, starti_command, interrupt_command)
3524 (run_command_1, set_inferior_args, step_1): Constify.
3525 * inferior.c (add_inferior_command, remove_inferior_command)
3526 (clone_inferior_command): Constify.
3527 * linux-fork.c (checkpoint_command, restart_command): Constify.
3528 * windows-nat.c (signal_event_command): Constify.
3529 * guile/guile.c (guile_repl_command, guile_command): Constify.
3530 * printcmd.c (x_command, display_command, printf_command)
3531 (output_command, set_command, call_command, print_command)
3532 (eval_command): Constify.
3533 (non_const_set_command): Remove.
3534 (_initialize_printcmd): Update.
3535 * source.c (forward_search_command, reverse_search_command):
3536 Constify.
3537 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3538 Constify.
3539 * infrun.c (handle_command): Constify.
3540 * memattr.c (mem_command): Constify.
3541 * stack.c (return_command, up_command, up_silently_command)
3542 (down_command, down_silently_command, frame_command)
3543 (backtrace_command, func_command, backtrace_command_1): Constify.
3544 (backtrace_command): Add non-const overload.
3545 * remote-sim.c (simulator_command): Constify.
3546 * exec.c (set_section_command): Constify.
3547 * tracepoint.c (tdump_command, trace_variable_command)
3548 (tstatus_command, tstop_command, tstart_command)
3549 (end_actions_pseudocommand, while_stepping_pseudocommand)
3550 (collect_pseudocommand, teval_pseudocommand, actions_command)
3551 (start_tracing, stop_tracing): Constify.
3552 * value.c (init_if_undefined_command): Constify.
3553 * tui/tui-stack.c (tui_update_command): Constify.
3554 * tui/tui-win.c (tui_refresh_all_command)
3555 (tui_set_tab_width_command, tui_set_win_height_command)
3556 (tui_set_focus_command, tui_scroll_forward_command)
3557 (tui_scroll_backward_command, tui_scroll_left_command)
3558 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3559 (tui_set_win_height): Constify.
3560 * tui/tui-layout.c (tui_layout_command): Constify.
3561 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3562 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3563 (proc_untrace_sysexit_cmd): Constify.
3564 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3565 (threadset_test_cmd, threadlist_update_test_cmd)
3566 (threadalive_test): Constify.
3567 * objc-lang.c (print_object_command): Constify.
3568 * command.h (add_com): Constify.
3569 * cli/cli-dump.c (restore_command): Constify.
3570 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3571 (help_command, complete_command, shell_command, edit_command)
3572 (list_command, disassemble_command, make_command)
3573 (apropos_command, alias_command): Constify.
3574 * cli/cli-script.c (document_command, define_command)
3575 (while_command, if_command, validate_comname): Constify.
3576 * cli/cli-decode.c (struct cmd_list_element): Change type of
3577 "fun".
3578 * target.c (do_monitor_command, flash_erase_command): Constify.
3579 * regcache.c (reg_flush_command): Constify.
3580 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3581 (reverse_nexti, reverse_continue, reverse_finish)
3582 (save_bookmark_command, goto_bookmark_command)
3583 (exec_reverse_once): Constify.
3584 * python/python.c (python_interactive_command, python_command):
3585 Constify.
3586 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3587 Constify.
3588 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3589 * gcore.c (gcore_command): Constify.
3590
3591 2017-11-07 Tom Tromey <tom@tromey.com>
3592
3593 * printcmd.c (x_command): Call set_repeat_arguments.
3594 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3595 * top.c (repeat_arguments): New global.
3596 (set_repeat_arguments): New function.
3597 (execute_command): Handle repeat_arguments.
3598 (show_commands): Calls set_repeat_arguments.
3599 * command.h (set_repeat_arguments): Declare.
3600
3601 2017-11-07 Tom Tromey <tom@tromey.com>
3602
3603 * stack.c (backtrace_command): Use std::string.
3604 (backtrace_command_1): Make "count_exp" const.
3605
3606 2017-11-07 Tom Tromey <tom@tromey.com>
3607
3608 * source.c (directory_switch, mod_path, add_path): Constify.
3609 * defs.h (add_path, mod_path, directory_switch): Constify.
3610 * mi/mi-cmd-env.c (env_mod_path): Constify.
3611
3612 2017-11-07 Tom Tromey <tom@tromey.com>
3613
3614 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3615 (run_command_1, continue_command, step_1, jump_command)
3616 (signal_command, until_command, advance_command, finish_command)
3617 (attach_command): Update.
3618
3619 2017-11-07 Tom Tromey <tom@tromey.com>
3620
3621 * command.h (set_cmd_cfunc): Don't declare.
3622 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3623
3624 2017-11-07 Tom Tromey <tom@tromey.com>
3625
3626 * stack.c (select_frame_command): Constify.
3627 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3628 * command.h (add_com_suppress_notification): Constify.
3629
3630 2017-11-07 Tom Tromey <tom@tromey.com>
3631
3632 * breakpoint.c (stop_command): Constify.
3633 * cli/cli-decode.c (struct cmd_list_element): Constify.
3634 * command.h (add_abbrev_prefix_cmd): Constify.
3635
3636 2017-11-07 Pedro Alves <palves@redhat.com>
3637
3638 * breakpoint.c (extract_bp_kind): New enum.
3639 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3640 factored out from ...
3641 (extract_bp_number_and_location): ... here.
3642 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3643
3644 2017-11-07 Pedro Alves <palves@redhat.com>
3645
3646 * breakpoint.c (extract_bp_number_and_location): Change return
3647 type to void. Throw error instead of warning.
3648 (enable_disable_command): Adjust.
3649
3650 2017-11-07 Xavier Roirand <roirand@adacore.com>
3651 Pedro Alves <palves@redhat.com>
3652
3653 * breakpoint.c (map_breakpoint_number_range): New, factored out
3654 from ...
3655 (map_breakpoint_numbers): ... here.
3656 (find_location_by_number): Change parameters from string to
3657 breakpoint number and location.
3658 (extract_bp_number_and_location): New function.
3659 (enable_disable_bp_num_loc)
3660 (enable_disable_breakpoint_location_range)
3661 (enable_disable_command): New functions, factored out ...
3662 (enable_command, disable_command): ... these functions, and
3663 adjusted to support ranges.
3664 * NEWS: Document enable/disable breakpoint location range feature.
3665
3666 2017-11-06 Luis Machado <luis.machado@linaro.org>
3667
3668 * MAINTAINERS (Write After Approval): Update my e-mail address.
3669
3670 2017-11-06 Pedro Alves <palves@redhat.com>
3671
3672 * gnu-nat.c (gnu_terminal_init): Delete.
3673 (gnu_target): Don't install gnu_terminal_init.
3674 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3675 (child_terminal_init): ... this function.
3676
3677 2017-11-06 Pedro Alves <palves@redhat.com>
3678
3679 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3680 sgtty.h.
3681 * config.in, configure: Regenerate.
3682
3683 2017-11-06 Pedro Alves <palves@redhat.com>
3684
3685 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3686 (async_init_signals): Adjust.
3687 (handle_stop_sig): Rename to ...
3688 (handle_sigtstp): ... this.
3689 (async_stop_sig): Rename to ...
3690 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3691 SIGTSTP path.
3692 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3693 instead of STOP_SIGNAL thoughout.
3694 (handle_stop_sig): Rename to ...
3695 (handle_sigtstp): ... this.
3696 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3697
3698 2017-11-06 Pedro Alves <palves@redhat.com>
3699
3700 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3701 longer set flags twice in row.
3702
3703 2017-11-06 Pedro Alves <palves@redhat.com>
3704
3705 * Makefile.in (SER_HARDWIRE): Update comment.
3706 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3707 * common/gdb_termios.h: Delete file.
3708 * common/job-control.c: Include termios.h and unistd.h instead of
3709 gdb_termios.h.
3710 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3711 check.
3712 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3713 Remove sgtty code.
3714 * configure.ac: No longer check for termio.h and sgtty.h.
3715 * configure: Regenerate.
3716 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3717 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3718 Replace PROCESS_GROUP_TYPE references with pid_t references
3719 throughout.
3720 (gdb_getpgrp): Delete.
3721 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3722 (child_terminal_inferior): Remove comment. Remove sgtty code.
3723 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3724 gdb_getpgrp. Use serial_set_tty_state instead aof
3725 serial_noflush_set_tty_state. Remove sgtty code.
3726 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3727 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3728 (inferior_process_group): Now returns pid_t.
3729 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3730 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3731 * ser-event.c (serial_event_ops): Update.
3732 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3733 (dos_ops): Update.
3734 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3735 * ser-pipe.c (pipe_ops): Update.
3736 * ser-tcp.c (tcp_ops): Update.
3737 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3738 HAVE_TERMIOS checks.
3739 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3740 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3741 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3742 assume termios.
3743 (hardwire_noflush_set_tty_state): Delete.
3744 (hardwire_print_tty_state, hardwire_drain_output)
3745 (hardwire_flush_output, hardwire_flush_input)
3746 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3747 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3748 code, and assume termios.
3749 (hardwire_ops): Update.
3750 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3751 * serial.c (serial_noflush_set_tty_state): Delete.
3752 * serial.h (serial_noflush_set_tty_state): Delete.
3753 (serial_ops::noflush_set_tty_state): Delete.
3754
3755 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3756
3757 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3758 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3759 (COMMON_OBS): Remove doublest.o and dfp.o.
3760 Do not build target-float.c (instead of doublest.c)
3761 with -Wformat-nonliteral.
3762
3763 * doublest.c: Remove file.
3764 * doublest.h: Remove file.
3765 * dfp.c: Remove file.
3766 * dfp.h: Remove file.
3767
3768 * target-float.c: Do not include "doublest.h" and "dfp.h".
3769 (DOUBLEST): Move here from doublest.h.
3770 (enum float_kind): Likewise.
3771 (FLOATFORMAT_CHAR_BIT): Likewise.
3772 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3773 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3774 (floatformat_precision): Likewise.
3775 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3776 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3777 Likewise.
3778 (host_float_format, host_double_format, host_long_double_format):
3779 Likewise.
3780 (floatformat_to_string, floatformat_from_string): Likewise.
3781 (floatformat_to_doublest): Likewise. Also, inline the original
3782 convert_floatformat_to_doublest.
3783 (floatformat_from_doublest): Likewise. Also, inline the original
3784 convert_floatformat_from_doublest.
3785
3786 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3787 (MAX_DECIMAL_STRING): Move here from dfp.c.
3788 (match_endianness): Likewise.
3789 (set_decnumber_context, decimal_check_errors): Likewise.
3790 (decimal_from_number, decimal_to_number): Likewise.
3791 (decimal_to_string, decimal_from_string): Likewise. Make static.
3792 (decimal_from_longest, decimal_from_ulongest): Likewise.
3793 (decimal_to_longest): Likewise.
3794 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3795 (decimal_convert): Likewise.
3796
3797 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3798
3799 * doublest.c: Do not include "gdbtypes.h".
3800 (extract_typed_floating): Remove.
3801 (store_typed_floating): Remove.
3802 (convert_typed_floating): Remove.
3803 * doublest.h (struct type): Remove.
3804 (DOUBLEST_PRINT_FORMAT): Remove.
3805 (DOUBLEST_SCAN_FORMAT): Remove.
3806 (extract_typed_floating): Remove.
3807 (store_typed_floating): Remove.
3808 (convert_typed_floating): Remove.
3809
3810 * dfp.c (decimal_from_doublest): Remove.
3811 (decimal_to_doublest): Remove.
3812 * dfp.h: Do not include "doublest.h".
3813 (decimal_from_doublest): Remove.
3814 (decimal_to_doublest): Remove.
3815
3816 * value.c: Do not include "doublest.h" and "dfp.h".
3817 (value_as_double): Remove.
3818 (unpack_double): Remove.
3819 (value_from_double): Remove.
3820 (value_from_decfloat): Remove.
3821 * value.h: Do not include "doublest.h".
3822 (value_as_double): Remove.
3823 (unpack_double): Remove.
3824 (value_from_double): Remove.
3825 (value_from_decfloat): Remove.
3826
3827 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3828
3829 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3830 (i386_extract_return_value): Use target_float_convert.
3831 (i386_store_return_value): Likewise.
3832 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3833 (i387_value_to_register): Likewise.
3834 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3835 (ia64_register_to_value): Use target_float_convert.
3836 (ia64_value_to_register): Likewise.
3837 (ia64_extract_return_value): Likewise.
3838 (ia64_store_return_value): Likewise.
3839 (ia64_push_dummy_call): Likewise.
3840 * m68k-tdep.c: Include "target-float.h".
3841 (m68k_register_to_value): Use target_float_convert.
3842 (m68k_value_to_register): Likewise.
3843 (m68k_svr4_extract_return_value): Likewise.
3844 (m68k_svr4_store_return_value): Likewise.
3845 * ppc-sysv-tdep.c: Include "target-float.h".
3846 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3847 (do_ppc_sysv_return_value): Likewise.
3848 (ppc64_sysv_abi_push_freg): Likewise.
3849 (ppc64_sysv_abi_return_value_base): Likewise.
3850 * rs6000-aix-tdep.c: Include "target-float.h".
3851 (rs6000_push_dummy_call): Use target_float_convert.
3852 (rs6000_return_value): Likewise.
3853 * rs6000-lynx178-tdep.c: Include "target-float.h".
3854 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3855 (rs6000_lynx178_return_value): Likewise.
3856 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3857 (rs6000_register_to_value): Use target_float_convert.
3858 (rs6000_value_to_register): Likewise.
3859 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3860 (arm_extract_return_value): Use target_float_convert.
3861 (arm_store_return_value): Likewise.
3862 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3863 (sh_register_convert_to_virtual): Use target_float_convert.
3864 (sh_register_convert_to_raw): Likewise.
3865 * sh64-tdep.c: Include "target-float.h".
3866 (sh64_extract_return_value): Use target_float_convert.
3867 (sh64_register_convert_to_virtual): Likewise.
3868 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3869
3870 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3871
3872 * target-float.c (floatformat_to_host_double): New function.
3873 (floatformat_from_host_double): Likewise.
3874 (target_float_to_host_double): Likewise.
3875 (target_float_from_host_double): Likewise.
3876 * target-float.h (target_float_to_host_double): Add prototype.
3877 (target_float_from_host_double): Likewise.
3878
3879 * guile/scm-value.c: Include "target-float.h".
3880 (gdbscm_value_to_real): Use target_float_to_host_double.
3881 Handle integer source values via value_as_long.
3882 * guile/scm-math.c: Include "target-float.h". Do not include
3883 "doublest.h", "dfp.h", and "expression.h".
3884 (vlscm_convert_typed_number): Use target_float_from_host_double.
3885 (vlscm_convert_number): Likewise.
3886
3887 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3888 (convert_value_from_python): Use target_float_from_host_double.
3889
3890 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3891
3892 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3893 (cast_from_fixed): Likewise.
3894 (ada_scaling_type): New function.
3895 (ada_delta): Return value instead of DOUBLEST. Perform target
3896 arithmetic instead of host arithmetic.
3897 (scaling_factor): Rename to ...
3898 (ada_scaling_factor) ... this. Make non-static. Return value instead
3899 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3900 (ada_fixed_to_float): Remove.
3901 (ada_float_to_fixed): Remove.
3902 * ada-lang.h (ada_fixed_to_float): Remove.
3903 (ada_float_to_fixed): Remove.
3904 (ada_delta): Return value instead of DOUBLEST.
3905 (ada_scaling_factor): Add prototype.
3906
3907 * ada-typeprint.c: Include "target-float.h".
3908 (print_fixed_point_type): Perform target arithmetic instead of
3909 host arithmetic.
3910 * ada-valprint.c: Include "target-float.h".
3911 (ada_val_print_num): Perform target arithmetic instead of
3912 host arithmetic for fixed-point types.
3913
3914 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3915
3916 * target-float.c: Include <math.h>.
3917 (floatformat_binop): New function.
3918 (floatformat_compare): Likewise.
3919 (target_float_binop): Likewise.
3920 (target_float_compare): Likewise.
3921 * target-float.h: Include "expression.h".
3922 (target_float_binop): Add prototype.
3923 (target_float_compare): Likewise.
3924
3925 * valarith.c: Do not include "doublest.h" and "dfp.h".
3926 Include "common/byte-vector.h".
3927 (value_args_as_decimal): Remove, replace by ...
3928 (value_args_as_target_float): ... this function. Handle both
3929 binary and decimal target floating-point formats.
3930 (scalar_binop): Handle both binary and decimal FP using
3931 value_args_as_target_float and target_float_binop.
3932 (value_equal): Handle both binary and decimal FP using
3933 value_args_as_target_float and target_float_compare.
3934 (value_less): Likewise.
3935 (value_pos): Handle all scalar types as simple copy.
3936 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3937 * dfp.c (decimal_binop): Throw error instead of internal_error
3938 when called with an unsupported operation code.
3939
3940 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3941
3942 * target-float.c (target_float_to_string): New function.
3943 (target_float_from_string): New function.
3944 * target-float.h (target_float_to_string): Add prototype.
3945 (target_float_from_string): Add prototype.
3946
3947 * valprint.c: Include "target-float.h". Do not include
3948 "doublest.h" and "dfp.h".
3949 (print_floating): Use target_float_to_string.
3950 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3951 (printf_floating): Use target_float_to_string.
3952 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3953 (print_i387_value): Use target_float_to_string.
3954 * mips-tdep.c: Include "target-float.h".
3955 (mips_print_fp_register): Use target_float_to_string.
3956 * sh64-tdep.c: Include "target-float.h".
3957 (sh64_do_fp_register): Use target_float_to_string.
3958
3959 * parse.c: Include "target-float.h". Do not include
3960 "doublest.h" and "dfp.h".
3961 (parse_float): Use target_float_from_string.
3962 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3963 (define_symbol): Use target_float_from_string.
3964 * gdbarch-selftests.c: Include "target-float.h".
3965 (register_to_value_test): Use target_float_from_string.
3966
3967 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3968
3969 * Makefile.c (SFILES): Add target-float.c.
3970 (HFILES_NO_SRCDIR): Add target-float.h.
3971 (COMMON_OBS): Add target-float.o.
3972 * target-float.h: New file.
3973 * target-float.c: New file.
3974
3975 * doublest.c (floatformat_classify): Fix detection of float_zero.
3976
3977 * gdbtypes.c (is_floating_type): New function.
3978 * gdbtypes.h (is_floating_type): Add prototype.
3979
3980 * value.c: Do not include "floatformat.h".
3981 (unpack_double): Use target_float_is_valid.
3982 (is_floating_value): New function.
3983 * value.h (is_floating_value): Add prototype-
3984
3985 * valarith.c: Include "target-float.h".
3986 (value_logical_not): Use target_float_is_zero.
3987
3988 * python/py-value.c: Include "target-float.h".
3989 (valpy_nonzero): Use target_float_is_zero.
3990
3991 2017-11-04 Tom Tromey <tom@tromey.com>
3992
3993 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3994
3995 2017-11-04 Tom Tromey <tom@tromey.com>
3996
3997 * breakpoint.c (set_momentary_breakpoint): Return
3998 breakpoint_up.
3999 (until_break_command): Update.
4000 (new_until_break_fsm): Change argument types to
4001 breakpoint_up.
4002 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
4003 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
4004 Remove.
4005 * infcmd.c (finish_forward): Update.
4006 * breakpoint.h (set_momentary_breakpoint)
4007 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
4008 (make_cleanup_delete_breakpoint): Remove.
4009 (struct breakpoint_deleter): New.
4010 (breakpoint_up): New typedef.
4011 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
4012 (insert_exception_resume_breakpoint): Update.
4013 (insert_exception_resume_from_probe): Update.
4014 (insert_longjmp_resume_breakpoint): Update.
4015 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
4016 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
4017 * infcall.c (call_function_by_hand_dummy): Update
4018
4019 2017-11-04 Tom Tromey <tom@tromey.com>
4020
4021 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
4022
4023 2017-11-04 Tom Tromey <tom@tromey.com>
4024
4025 * linux-tdep.c (linux_core_info_proc_mappings): Use
4026 gdb::def_vector.
4027 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
4028 "size" argument.
4029 (linux_corefile_thread): Update.
4030 (linux_make_corefile_notes): Remove unused variable.
4031
4032 2017-11-04 Tom Tromey <tom@tromey.com>
4033
4034 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
4035 gdb::byte_vector.
4036
4037 2017-11-04 Tom Tromey <tom@tromey.com>
4038
4039 * objfiles.c (do_free_objfile_cleanup): Remove.
4040 * compile/compile-object-load.c (compile_object_load): Update.
4041 * objfiles.h (make_cleanup_free_objfile): Remove.
4042
4043 2017-11-04 Tom Tromey <tom@tromey.com>
4044
4045 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
4046 (adi_read_versions): Change "tags" to "gdb_byte *".
4047 (adi_print_versions): Likewise.
4048
4049 2017-11-04 Tom Tromey <tom@tromey.com>
4050
4051 * breakpoint.c
4052 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
4053 from start_rbreak_breakpoints.
4054 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
4055 * breakpoint.h (class scoped_rbreak_breakpoints): New.
4056 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
4057 * symtab.c (do_end_rbreak_breakpoints): Remove.
4058 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
4059
4060 2017-11-04 Tom Tromey <tom@tromey.com>
4061
4062 * cp-namespace.c (reset_directive_searched): Remove.
4063 (cp_lookup_symbol_via_imports): Use scoped_restore.
4064 * cp-support.c (reset_directive_searched): Remove.
4065 (make_symbol_overload_list_using): Use scoped_restore.
4066 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
4067 (reset_directive_searched): Remove.
4068
4069 2017-11-04 Tom Tromey <tom@tromey.com>
4070
4071 * symfile.c (find_separate_debug_file_by_debuglink): Use
4072 unique_xmalloc_ptr.
4073
4074 2017-11-04 Tom Tromey <tom@tromey.com>
4075
4076 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4077 type of "info".
4078 (compute_stack_depth): Likewise.
4079 (do_compile_dwarf_expr_to_c): Use std::vector.
4080
4081 2017-11-04 Tom Tromey <tom@tromey.com>
4082
4083 * compile/compile-object-load.c (link_callbacks_einfo): Use
4084 std::string.
4085
4086 2017-11-04 Tom Tromey <tom@tromey.com>
4087
4088 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4089 Use scoped_free_pendings.
4090 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
4091 scoped_free_pendings.
4092 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
4093 (xcoff_initial_scan): Likewise.
4094 * buildsym.c (reset_symtab_globals): Update comment.
4095 (scoped_free_pendings): Rename from really_free_pendings.
4096 (prepare_for_building): Update comment.
4097 (buildsym_init): Likewise.
4098 * buildsym.h (class scoped_free_pendings): New class.
4099 (really_free_pendings): Don't declare.
4100
4101 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
4102
4103 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
4104 output when converting a zero value to a special byteorder format.
4105
4106 2017-11-02 Yao Qi <yao.qi@linaro.org>
4107
4108 * frame.c (do_frame_register_read): Remove aspace.
4109 * jit.c (jit_frame_sniffer): Likwise.
4110 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4111 * regcache.c (regcache::regcache): Pass nullptr.
4112 (regcache_print): Caller updated.
4113 * regcache.h (regcache::regcache): Remove one constructor
4114 parameter aspace.
4115
4116 2017-11-02 Yao Qi <yao.qi@linaro.org>
4117
4118 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
4119
4120 2017-11-02 Yao Qi <yao.qi@linaro.org>
4121
4122 * breakpoint.c (insert_single_step_breakpoints): Update.
4123 * frame.c (struct frame_info) <aspace>: Add const.
4124 (frame_save_as_regcache): Add const.
4125 (get_frame_address_space): Return const address_space *.
4126 * frame.h (get_frame_address_space): Update declaration.
4127 * infrun.c (struct step_over_info) <aspace>: Add const.
4128 (set_step_over_info): Make aspace const.
4129 (displaced_step_prepare_throw): Change variable const.
4130 (resume): Likewise.
4131 (proceed): Likewise.
4132 (adjust_pc_after_break): Likewise.
4133 (save_waitstatus): Likewise.
4134 (handle_signal_stop): Likewise.
4135 (keep_going_pass_signal): Likewise.
4136 * jit.c (jit_frame_sniffer): Add const.
4137 * mips-tdep.c (mips_single_step_through_delay): Likewise.
4138 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4139 * record-full.c (record_full_wait_1): Likewise.
4140 * regcache.c (regcache::regcache): Change parameter to const.
4141 * regcache.h (regcache::regcache): Likewise.
4142 (regcache::aspace): Return const address_space *.
4143 (regcache) <m_aspace>: Add const.
4144
4145 2017-11-02 Yao Qi <yao.qi@linaro.org>
4146
4147 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
4148 * frame.c (create_sentinel_frame): Likewise.
4149 * infrun.c (displaced_step_prepare_throw): Likewise.
4150 (resume): Likewise.
4151 (thread_still_needs_step_over_bp): Likewise.
4152 (proceed): Likewise.
4153 (do_target_wait): Likewise.
4154 (adjust_pc_after_break): Likewise.
4155 (handle_syscall_event): Likewise.
4156 (save_waitstatus): Likewise.
4157 (handle_inferior_event_1): Likewise.
4158 (handle_signal_stop): Likewise.
4159 (keep_going_pass_signal): Likewise.
4160 * linux-nat.c (status_callback): Likewise.
4161 (save_stop_reason): Likewise.
4162 (resume_stopped_resumed_lwps): Likewise.
4163 * record-full.c (record_full_exec_insn): Likewise.
4164 (record_full_wait_1): Likewise.
4165 * regcache.c (get_regcache_aspace): Remove.
4166 * regcache.h (get_regcache_aspace): Remove.
4167
4168 2017-11-02 Yao Qi <yao.qi@linaro.org>
4169
4170 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4171 (init_regcache_descr): Use gdbarch_num_regs.
4172 (regcache::regcache): Likewise.
4173 (regcache::get_register_status): Likewise.
4174 (regcache::assert_raw_regnum): Likewise.
4175 (regcache::cooked_read): Likewise.
4176 (regcache::cooked_read_value): Likewise.
4177 (regcache::cooked_write): Likewise.
4178 (regcache::dump): Likewise.
4179 (regcache::num_raw_registers): New method.
4180 * regcache.h (class regcache) <num_raw_registers>: New.
4181
4182 2017-11-02 Yao Qi <yao.qi@linaro.org>
4183
4184 * regcache.c (regcache::assert_regnum): New method.
4185 (regcache::invalidate): Call assert_regnum.
4186 (regcache::raw_update): Likewise.
4187 (regcache::raw_write): Likewise.
4188 (regcache::raw_read_part): Likewise.
4189 (regcache::raw_write_part): Likewise.
4190 (regcache::raw_supply): Likewise.
4191 (regcache::raw_supply_integer): Likewise.
4192 (regcache::raw_supply_zeroed): Likewise.
4193 (regcache::raw_collect): Likewise.
4194 (regcache::raw_collect_integer): Likewise.
4195 * regcache.h (regcache::assert_regnum): Declare.
4196
4197 2017-11-02 Yao Qi <yao.qi@linaro.org>
4198
4199 * regcache.c (regcache::dump): Remove code.
4200
4201 2017-11-02 Yao Qi <yao.qi@linaro.org>
4202
4203 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
4204 Remove.
4205 <sizeof_cooked_register_status>: Remove.
4206 (init_regcache_descr): Update.
4207 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
4208 (regcache::save): Likewise.
4209 (regcache::dump): Likewise.
4210
4211 2017-11-01 James Bowman <james.bowman@ftdichip.com>
4212
4213 * ft32-tdep.c (ft32_fetch_instruction): New function.
4214 (ft32_analyze_prologue): Use ft32_fetch_instruction().
4215
4216 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
4217
4218 * cli/cli-script.c (execute_control_command): Rename to ...
4219 (execute_control_command_1): ... this.
4220 (execute_control_command): New function.
4221
4222 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
4223
4224 * tracepoint.c (tfind_command): Remove const_cast.
4225
4226 2017-10-30 Mike Gulick <mgulick@mathworks.com>
4227
4228 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
4229
4230 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
4231
4232 * common/common-utils.h (in_inclusive_range): New function.
4233 * arm-tdep.c (arm_record_extension_space): Use
4234 in_inclusive_range.
4235 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
4236 * cris-tdep.c (cris_spec_reg_applicable): Use
4237 in_inclusive_range.
4238
4239 2017-10-30 Pedro Alves <palves@redhat.com>
4240 Simon Marchi <simon.marchi@ericsson.com>
4241
4242 * remote.c (remote_set_syscall_catchpoint): Build a std::string
4243 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
4244
4245 2017-10-30 Pedro Alves <palves@redhat.com>
4246
4247 * common/common-utils.c (string_appendf, string_vappendf): New
4248 functions.
4249 * common/common-utils.h (string_appendf, string_vappendf): New
4250 declarations.
4251 * unittests/common-utils-selftests.c (string_appendf_func)
4252 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
4253 (string_vappendf_tests): New functions.
4254 (_initialize_common_utils_selftests): Register "string_appendf" and
4255 "string_vappendf tests".
4256
4257 2017-10-30 Pedro Alves <palves@redhat.com>
4258
4259 * unittests/common-utils-selftests.c (format_func): New typedef.
4260 (string_printf_tests, string_vprintf_tests): Tests factored out
4261 and merged to ...
4262 (test_format_func): ... this new function.
4263 (string_printf_tests, string_vprintf_tests): Reimplement on top of
4264 test_format_func.
4265
4266 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4267
4268 * darwin-nat.c: Remove include of gdb.h.
4269
4270 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4271
4272 * xtensa-xtregs.c: Fix formatting issues.
4273
4274 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4275
4276 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4277
4278 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4279
4280 PR python/21213
4281 * python/py-infthread.c (thpy_get_inferior): Increment reference
4282 of inferior before returning it.
4283
4284 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4285
4286 * unittests/common-utils-selftests.c (format): Add
4287 ATTRIBUTE_PRINTF.
4288
4289 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4290
4291 * xml-syscall.c (struct syscall_desc): Add constructor.
4292 <name>: Change type to std::string.
4293 (syscall_desc_up): New typedef.
4294 (syscall_desc_p): Remove typeder.
4295 (DEF_VEC_P(syscall_desc_p)): Remove.
4296 (struct syscall_group_desc): Add constructor.
4297 <name>: Change type to std::string.
4298 <syscalls>: Change type to std::vector.
4299 (syscall_group_desc_up): New typedef.
4300 (syscall_group_desc_p): Remove typedef.
4301 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4302 (struct syscalls_info) <syscalls>: Change type to std::vector of
4303 unique_ptr.
4304 <groups>: Likewise.
4305 <my_gdb_datadir>: Change type to std::string.
4306 (syscalls_info_up): New typedef.
4307 (allocate_syscalls_info): Remove.
4308 (syscalls_info_free_syscalls_desc): Remove.
4309 (syscalls_info_free_syscall_group_desc): Remove.
4310 (free_syscalls_info): Remove.
4311 (make_cleanup_free_syscalls_info): Remove.
4312 (syscall_group_create_syscall_group_desc): Adjust.
4313 (syscall_group_add_syscall): Adjust.
4314 (syscall_create_syscall_desc): Adjust.
4315 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4316 (init_syscalls_info): Adjust.
4317 (syscall_group_get_group_by_name): Adjust.
4318 (xml_get_syscall_number): Adjust.
4319 (xml_get_syscall_name): Adjust.
4320 (xml_list_of_syscalls): Adjust.
4321 (xml_list_syscalls_by_group): Adjust.
4322 (xml_list_of_groups): Adjust.
4323
4324 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * probe.h: Don't include gdb_vecs.h.
4327 (DEF_VEC_P (probe_p)): Remove.
4328 (find_probes_in_objfile): Return an std::vector.
4329 * probe.c (find_probes_in_objfile): Likewise.
4330 * breakpoint.c (breakpoint_objfile_data)
4331 <longjmp_probes>: Change type to std::vector.
4332 <exception_probes>: Likewise.
4333 (free_breakpoint_probes): Don't manually free vectors.
4334 (create_longjmp_master_breakpoint): Adjust.
4335 (create_exception_master_breakpoint): Adjust.
4336 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4337 parameter type, adjust.
4338 (svr4_create_solib_event_breakpoints): Adjust.
4339
4340 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4341
4342 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4343 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4344 with new.
4345 (free_breakpoint_probes): Rename to ...
4346 (free_breakpoint_objfile_data): ... this, and call delete on
4347 bp_objfile_data..
4348
4349 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4350
4351 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4352 (loaded_script_ptr): Remove typedef.
4353 (DEF_VEC_P (loaded_script_ptr)): Remove.
4354 (struct collect_matching_scripts_data): Add constructor.
4355 <scripts_p>: Change type to (pointer to) std::vector.
4356 (collect_matching_scripts_data): Adjust.
4357 (sort_scripts_by_name): Make suitable for std::sort.
4358 (print_scripts): Don't sort vector, adjust to std::vector.
4359 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4360
4361 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4362
4363 * symfile.c (filename_language): Make struct, not typedef. Add
4364 constructor.
4365 <ext>: Change type to std::string.
4366 (DEF_VEC_O (filename_language)): Remove.
4367 (filename_language_table): Change type to std::vector.
4368 (add_filename_language): Adjust.
4369 (set_ext_lang_command): Adjust.
4370 (info_ext_lang_command): Adjust.
4371 (deduce_language_from_filename): Adjust.
4372 (class scoped_restore_filename_language_table): Remove.
4373 (test_filename_language): Use scoped_restore.
4374 (test_set_ext_lang_command): Use scoped_restore, adjust to
4375 std::vector change.
4376
4377 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * symfile.c: Include selftest.h.
4380 (class scoped_restore_filename_language_table): New.
4381 (test_filename_language): New test.
4382 (test_set_ext_lang_command): New test.
4383 (_initialize_symfile): Register tests.
4384
4385 2017-10-27 Keith Seitz <keiths@redhat.com>
4386
4387 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4388 in the bp_location, falling back to find_pc_sect_function when
4389 needed.
4390 (add_location_to_breakpoint): Save sal->symbol.
4391 * breakpoint.h (struct bp_location) <symbol>: New field.
4392 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4393 * symtab.h (struct symtab_and_line) <symbol>: New field.
4394
4395 2017-10-26 Patrick Frants <osscontribute@gmail.com>
4396
4397 PR gdb/13669
4398 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4399 to rewind obstack.
4400
4401 2017-10-26 Pedro Alves <palves@redhat.com>
4402
4403 * remote.c (remote_async_terminal_ours_p): Delete.
4404 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4405 Remove references to 'remote_async_terminal_ours_p'.
4406
4407 2017-10-26 Yao Qi <yao.qi@linaro.org>
4408
4409 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4410
4411 2017-10-26 Yao Qi <yao.qi@linaro.org>
4412
4413 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4414 aspace const.
4415 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4416 Likewise.
4417 * breakpoint.c (bpstat_check_location): Remove cast.
4418 (breakpoint_hit_catch_fork): Make aspce const.
4419 (breakpoint_hit_catch_solib): Likewise.
4420 (breakpoint_hit_catch_exec): Likewise.
4421 (breakpoint_hit_ranged_breakpoint): Likewise.
4422 (breakpoint_hit_watchpoint): Likewise.
4423 (base_breakpoint_breakpoint_hit): Likewise.
4424 (bkpt_breakpoint_hit): Likewise.
4425 (dprintf_breakpoint_hit): Likewise.
4426 (tracepoint_breakpoint_hit): Likewise.
4427 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4428
4429 2017-10-26 Yao Qi <yao.qi@linaro.org>
4430
4431 * breakpoint.c (breakpoint_location_address_match): Change
4432 "struct address_space *" to "const address_space".
4433 (breakpoint_location_address_range_overlap): Likewise.
4434 (breakpoint_here_p): Likewise.
4435 (breakpoint_in_range_p): Likewise.
4436 (moribund_breakpoint_here_p): Likewise.
4437 (bp_location_inserted_here_p): Likewise.
4438 (software_breakpoint_inserted_here_p): Likewise.
4439 (hardware_breakpoint_inserted_here_p): Likewise.
4440 (hardware_watchpoint_inserted_in_range): Likewise.
4441 (bpstat_check_location): Likewise.
4442 (bpstat_stop_status): Likewise.
4443 (breakpoint_address_match): Likewise.
4444 (breakpoint_address_match_range): Likewise.
4445 (breakpoint_location_address_match): Likewise.
4446 (breakpoint_location_address_range_overlap): Likewise.
4447 (insert_single_step_breakpoint): Likewise.
4448 (breakpoint_has_location_inserted_here): Likewise.
4449 (single_step_breakpoint_inserted_here_p): Likewise.
4450 (pc_at_non_inline_function): Likewise.
4451 * breakpoint.h (bpstat_stop_status): Update declaration.
4452 (breakpoint_here_p): Likewise.
4453 (breakpoint_in_range_p): Likewise.
4454 (moribund_breakpoint_here_p): Likewise.
4455 (breakpoint_inserted_here_p): Likewise.
4456 (software_breakpoint_inserted_here_p): Likewise.
4457 (hardware_breakpoint_inserted_here_p): Likewise.
4458 (breakpoint_has_location_inserted_here): Likewise.
4459 (single_step_breakpoint_inserted_here_p): Likewise.
4460 (hardware_watchpoint_inserted_in_range): Likewise.
4461 (breakpoint_address_match): Likewise.
4462 (insert_single_step_breakpoint): Likewise.
4463 (pc_at_non_inline_function): Likewise.
4464 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4465 * record.c (record_check_stopped_by_breakpoint): Likewise.
4466 * record.h (record_check_stopped_by_breakpoint): Likewise.
4467 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4468
4469 2017-10-25 Yao Qi <yao.qi@linaro.org>
4470
4471 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4472 regcache->arch () instead get_regcache_arch.
4473 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4474 Likewise.
4475 (aarch64_fbsd_store_inferior_registers): Likewise.
4476 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4477 (store_gregs_to_thread): Likewise.
4478 (fetch_fpregs_from_thread): Likewise.
4479 (store_fpregs_to_thread): Likewise.
4480 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4481 (aarch64_store_return_value): Likewise.
4482 (aarch64_software_single_step): Likewise.
4483 * aix-thread.c (aix_thread_wait): Likewise.
4484 (supply_reg32): Likewise.
4485 (supply_sprs64): Likewise.
4486 (supply_sprs32): Likewise.
4487 (fill_gprs64): Likewise.
4488 (fill_gprs32): Likewise.
4489 (fill_sprs64): Likewise.
4490 (fill_sprs32): Likewise.
4491 (store_regs_user_thread): Likewise.
4492 (store_regs_kernel_thread): Likewise.
4493 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4494 (alphabsd_store_inferior_registers): Likewise.
4495 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4496 (alpha_store_return_value): Likewise.
4497 (alpha_deal_with_atomic_sequence): Likewise.
4498 (alpha_next_pc): Likewise.
4499 (alpha_software_single_step): Likewise.
4500 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4501 (amd64bsd_store_inferior_registers): Likewise.
4502 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4503 Likewise.
4504 (amd64_linux_store_inferior_registers): Likewise.
4505 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4506 (amd64_collect_native_gregset): Likewise.
4507 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4508 (amd64obsd_collect_uthread): Likewise.
4509 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4510 (amd64_collect_fpregset): Likewise.
4511 (amd64_supply_fxsave): Likewise.
4512 (amd64_supply_xsave): Likewise.
4513 (amd64_collect_fxsave): Likewise.
4514 (amd64_collect_xsave): Likewise.
4515 * arc-tdep.c (arc_write_pc): Likewise.
4516 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4517 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4518 (arm_fbsd_store_inferior_registers): Likewise.
4519 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4520 (store_vfp_regs): Likewise.
4521 (arm_linux_fetch_inferior_registers): Likewise.
4522 (arm_linux_store_inferior_registers): Likewise.
4523 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4524 (arm_linux_sigreturn_next_pc): Likewise.
4525 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4526 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4527 (fetch_register): Likewise.
4528 (store_register): Likewise.
4529 * arm-tdep.c (arm_is_thumb): Likewise.
4530 (displaced_in_arm_mode): Likewise.
4531 (bx_write_pc): Likewise.
4532 (arm_get_next_pcs_addr_bits_remove): Likewise.
4533 (arm_software_single_step): Likewise.
4534 (arm_extract_return_value): Likewise.
4535 (arm_store_return_value): Likewise.
4536 (arm_write_pc): Likewise.
4537 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4538 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4539 (bsd_uthread_store_registers): Likewise.
4540 * core-regset.c (fetch_core_registers): Likewise.
4541 * corelow.c (get_core_registers): Likewise.
4542 * cris-tdep.c (cris_store_return_value): Likewise.
4543 (cris_extract_return_value): Likewise.
4544 (find_step_target): Likewise.
4545 (find_step_target): Likewise.
4546 (cris_software_single_step): Likewise.
4547 * ctf.c (ctf_fetch_registers): Likewise.
4548 * darwin-nat.c (cancel_breakpoint): Likewise.
4549 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4550 * frv-tdep.c (frv_extract_return_value): Likewise.
4551 * ft32-tdep.c (ft32_store_return_value): Likewise.
4552 (ft32_extract_return_value): Likewise.
4553 * go32-nat.c (fetch_register): Likewise.
4554 (go32_fetch_registers): Likewise.
4555 (go32_store_registers): Likewise.
4556 (store_register): Likewise.
4557 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4558 (h8300_store_return_value): Likewise.
4559 * hppa-linux-nat.c (fetch_register): Likewise.
4560 (store_register): Likewise.
4561 (hppa_linux_fetch_inferior_registers): Likewise.
4562 (hppa_linux_store_inferior_registers): Likewise.
4563 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4564 (i386_darwin_store_inferior_registers): Likewise.
4565 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4566 (gnu_store_registers): Likewise.
4567 * i386-linux-nat.c (fetch_register): Likewise.
4568 (store_register): Likewise.
4569 (supply_gregset): Likewise.
4570 (fill_gregset): Likewise.
4571 (i386_linux_fetch_inferior_registers): Likewise.
4572 (i386_linux_store_inferior_registers): Likewise.
4573 (i386_linux_resume): Likewise.
4574 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4575 Likewise.
4576 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4577 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4578 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4579 (i386obsd_collect_uthread): Likewise.
4580 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4581 (i386_supply_gregset): Likewise.
4582 (i386_collect_gregset): Likewise.
4583 (i386_supply_fpregset): Likewise.
4584 (i386_collect_fpregset): Likewise.
4585 (i386_mpx_bd_base): Likewise.
4586 * i386-v4-nat.c (supply_fpregset): Likewise.
4587 (fill_fpregset): Likewise.
4588 * i387-tdep.c (i387_supply_fsave): Likewise.
4589 (i387_collect_fsave): Likewise.
4590 (i387_supply_fxsave): Likewise.
4591 (i387_collect_fxsave): Likewise.
4592 (i387_supply_xsave): Likewise.
4593 (i387_collect_xsave): Likewise.
4594 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4595 (ia64_linux_store_registers): Likewise.
4596 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4597 (ia64_extract_return_value): Likewise.
4598 (ia64_store_return_value): Likewise.
4599 (find_func_descr): Likewise.
4600 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4601 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4602 (inf_ptrace_store_registers): Likewise.
4603 * infrun.c (use_displaced_stepping): Likewise.
4604 (displaced_step_prepare_throw): Likewise.
4605 (resume): Likewise.
4606 (proceed): Likewise.
4607 (do_target_wait): Likewise.
4608 (adjust_pc_after_break): Likewise.
4609 (handle_inferior_event_1): Likewise.
4610 (handle_signal_stop): Likewise.
4611 (save_infcall_suspend_state): Likewise.
4612 (restore_infcall_suspend_state): Likewise.
4613 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4614 * jit.c (jit_frame_prev_register): Likewise.
4615 * linux-nat.c (save_stop_reason): Likewise.
4616 (linux_nat_wait_1): Likewise.
4617 (resume_stopped_resumed_lwps): Likewise.
4618 * linux-record.c (record_linux_sockaddr): Likewise.
4619 (record_linux_msghdr): Likewise.
4620 (record_linux_system_call): Likewise.
4621 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4622 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4623 (lm32_store_return_value): Likewise.
4624 * m32c-tdep.c (m32c_read_flg): Likewise.
4625 (m32c_pseudo_register_read): Likewise.
4626 (m32c_pseudo_register_write): Likewise.
4627 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4628 (m32r_linux_collect_gregset): Likewise.
4629 * m32r-tdep.c (m32r_store_return_value): Likewise.
4630 (m32r_extract_return_value): Likewise.
4631 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4632 (m68kbsd_collect_fpregset): Likewise.
4633 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4634 * m68k-linux-nat.c (fetch_register): Likewise.
4635 (old_fetch_inferior_registers): Likewise.
4636 (old_store_inferior_registers): Likewise.
4637 (store_regs): Likewise.
4638 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4639 (m68k_svr4_store_return_value): Likewise.
4640 * m88k-tdep.c (m88k_store_arguments): Likewise.
4641 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4642 (mi_cmd_data_write_register_values): Likewise.
4643 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4644 (mips_fbsd_store_inferior_registers): Likewise.
4645 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4646 (mips_fbsd_supply_gregs): Likewise.
4647 (mips_fbsd_collect_fpregs): Likewise.
4648 (mips_fbsd_collect_gregs): Likewise.
4649 (mips_fbsd_supply_fpregset): Likewise.
4650 (mips_fbsd_collect_fpregset): Likewise.
4651 (mips_fbsd_supply_gregset): Likewise.
4652 (mips_fbsd_collect_gregset): Likewise.
4653 * mips-linux-nat.c (supply_gregset): Likewise.
4654 (fill_gregset): Likewise.
4655 (supply_fpregset): Likewise.
4656 (fill_fpregset): Likewise.
4657 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4658 (mips_fill_gregset): Likewise.
4659 (mips_supply_fpregset): Likewise.
4660 (mips_fill_fpregset): Likewise.
4661 (mips64_supply_gregset): Likewise.
4662 (micromips_linux_sigframe_validate): Likewise.
4663 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4664 (mipsnbsd_fetch_inferior_registers): Likewise.
4665 (mipsnbsd_store_inferior_registers): Likewise.
4666 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4667 (mipsnbsd_supply_gregset): Likewise.
4668 (mipsnbsd_iterate_over_regset_sections): Likewise.
4669 (mipsnbsd_supply_reg): Likewise.
4670 (mipsnbsd_supply_fpreg): Likewise.
4671 * mips-tdep.c (mips_in_frame_stub): Likewise.
4672 (mips_dummy_id): Likewise.
4673 (is_octeon_bbit_op): Likewise.
4674 (micromips_bc1_pc): Likewise.
4675 (extended_mips16_next_pc): Likewise.
4676 (mips16_next_pc): Likewise.
4677 (deal_with_atomic_sequence): Likewise.
4678 * moxie-tdep.c (moxie_process_readu): Likewise.
4679 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4680 * nto-procfs.c (procfs_store_registers): Likewise.
4681 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4682 (ppcfbsd_store_inferior_registers): Likewise.
4683 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4684 (fetch_altivec_register): Likewise.
4685 (get_spe_registers): Likewise.
4686 (fetch_spe_register): Likewise.
4687 (fetch_altivec_registers): Likewise.
4688 (fetch_all_gp_regs): Likewise.
4689 (fetch_all_fp_regs): Likewise.
4690 (store_vsx_register): Likewise.
4691 (store_altivec_register): Likewise.
4692 (set_spe_registers): Likewise.
4693 (store_spe_register): Likewise.
4694 (store_altivec_registers): Likewise.
4695 (store_all_gp_regs): Likewise.
4696 (store_all_fp_regs): Likewise.
4697 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4698 (ppc_linux_collect_gregset): Likewise.
4699 (ppc_canonicalize_syscall): Likewise.
4700 (ppc_linux_record_signal): Likewise.
4701 (ppu2spu_prev_register): Likewise.
4702 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4703 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4704 (ppcobsd_store_registers): Likewise.
4705 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4706 Likewise.
4707 (ppc_ravenscar_generic_store_registers): Likewise.
4708 * procfs.c (procfs_fetch_registers): Likewise.
4709 (procfs_store_registers): Likewise.
4710 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4711 (ravenscar_store_registers): Likewise.
4712 (ravenscar_prepare_to_store): Likewise.
4713 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4714 * record-full.c (record_full_wait_1): Likewise.
4715 (record_full_registers_change): Likewise.
4716 (record_full_store_registers): Likewise.
4717 (record_full_core_fetch_registers): Likewise.
4718 (record_full_save): Likewise.
4719 (record_full_goto_insn): Likewise.
4720 * regcache.c (regcache_register_size): Likewise.
4721 (get_regcache_arch): Remove.
4722 (regcache_read_pc): Likewise.
4723 * regcache.h (get_regcache_arch): Remove.
4724 * remote-sim.c (gdbsim_fetch_register): Likewise.
4725 (gdbsim_store_register): Likewise.
4726 * remote.c (fetch_register_using_p): Likewise.
4727 (send_g_packet): Likewise.
4728 (remote_prepare_to_store): Likewise.
4729 (store_registers_using_G): Likewise.
4730 * reverse.c (save_bookmark_command): Likewise.
4731 (goto_bookmark_command): Likewise.
4732 * rs6000-aix-tdep.c (branch_dest): Likewise.
4733 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4734 (fetch_register): Likewise.
4735 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4736 (ppc_collect_reg): Likewise.
4737 (ppc_collect_gregset): Likewise.
4738 (ppc_collect_fpregset): Likewise.
4739 (ppc_collect_vsxregset): Likewise.
4740 (ppc_collect_vrregset): Likewise.
4741 (ppc_displaced_step_hw_singlestep): Likewise.
4742 (rs6000_pseudo_register_read): Likewise.
4743 (rs6000_pseudo_register_write): Likewise.
4744 * s390-linux-nat.c (supply_gregset): Likewise.
4745 (fill_gregset): Likewise.
4746 (s390_linux_fetch_inferior_registers): Likewise.
4747 * s390-linux-tdep.c (s390_write_pc): Likewise.
4748 (s390_software_single_step): Likewise.
4749 (s390_all_but_pc_registers_record): Likewise.
4750 (s390_linux_syscall_record): Likewise.
4751 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4752 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4753 (shnbsd_store_inferior_registers): Likewise.
4754 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4755 (sh_extract_return_value_fpu): Likewise.
4756 (sh_store_return_value_nofpu): Likewise.
4757 (sh_corefile_supply_regset): Likewise.
4758 (sh_corefile_collect_regset): Likewise.
4759 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4760 (sh64_store_return_value): Likewise.
4761 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4762 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4763 (sparc_store_inferior_registers): Likewise.
4764 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4765 (sparc_ravenscar_prepare_to_store): Likewise.
4766 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4767 (sparc_analyze_control_transfer): Likewise.
4768 (sparc_step_trap): Likewise.
4769 (sparc_software_single_step): Likewise.
4770 (sparc32_gdbarch_init): Likewise.
4771 (sparc_supply_rwindow): Likewise.
4772 (sparc_collect_rwindow): Likewise.
4773 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4774 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4775 (sparc64nbsd_collect_gregset): Likewise.
4776 (sparc64nbsd_supply_fpregset): Likewise.
4777 (sparc64nbsd_collect_fpregset): Likewise.
4778 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4779 (sparc64_supply_gregset): Likewise.
4780 (sparc64_collect_gregset): Likewise.
4781 (sparc64_supply_fpregset): Likewise.
4782 (sparc64_collect_fpregset): Likewise.
4783 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4784 * spu-tdep.c (spu_unwind_sp): Likewise.
4785 (spu2ppu_prev_register): Likewise.
4786 (spu_memory_remove_breakpoint): Likewise.
4787 * stack.c (return_command): Likewise.
4788 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4789 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4790 * tracefile.c (trace_save_ctf): Likewise.
4791 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4792 (do_windows_store_inferior_registers): Likewise.
4793 (windows_resume): Likewise.
4794 * xtensa-linux-nat.c (fill_gregset): Likewise.
4795 (supply_gregset_reg): Likewise.
4796 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4797 (xtensa_register_read_masked): Likewise.
4798 (xtensa_supply_gregset): Likewise.
4799 (xtensa_extract_return_value): Likewise.
4800 (xtensa_store_return_value): Likewise.
4801
4802 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4803
4804 * doublest.c (floatformat_from_string): New function.
4805 * doublest.h (floatformat_from_string): Add prototype.
4806
4807 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4808 (OP_FLOAT): ... this.
4809 * expression.h: Do not include "doublest.h".
4810 (union exp_element): Replace doubleconst and decfloatconst by
4811 new element floatconst.
4812 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4813 (ada_evaluate_subexp): Likewise.
4814 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4815 OP_DOUBLE and OP_DECFLOAT.
4816 * expprint.c (print_subexp_standard): Likewise.
4817 (dump_subexp_body_standard): Likewise.
4818 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4819
4820 * parse.c: Include "dfp.h".
4821 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4822 (write_exp_elt_floatcst): New function.
4823 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4824 and OP_DECFLOAT.
4825 (operator_check_standard): Likewise.
4826 (parse_float): Do not accept suffix. Take type as input. Return bool.
4827 Return target format buffer instead of host DOUBLEST.
4828 Use floatformat_from_string and decimal_from_string to parse
4829 either binary or decimal floating-point types.
4830 (parse_c_float): Remove.
4831 * parser-defs.h: Do not include "doublest.h".
4832 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4833 (write_exp_elt_floatcst): Add prototype.
4834 (parse_float): Update prototype.
4835 (parse_c_float): Remove.
4836
4837 * c-exp.y: Do not include "dfp.h".
4838 (typed_val_float): Use byte buffer instead of DOUBLEST.
4839 (typed_val_decfloat): Remove.
4840 (DECFLOAT): Remove.
4841 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4842 (parse_number): Update to new parse_float interface.
4843 Parse suffixes and determine type before calling parse_float.
4844 Handle decimal and binary FP types the same way.
4845
4846 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4847 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4848 (parse_number): Update to new parse_float interface.
4849 Parse suffixes and determine type before calling parse_float.
4850
4851 * f-exp.y: Replace dval by typed_val_float.
4852 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4853 (parse_number): Use parse_float instead of atof.
4854
4855 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4856 (parse_go_float): Remove.
4857 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4858 (parse_number): Call parse_float instead of parse_go_float.
4859 Parse suffixes and determine type before calling parse_float.
4860
4861 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4862 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4863 (parse_number): Update to new parse_float interface.
4864 Parse suffixes and determine type before calling parse_float.
4865
4866 * m2-exp.y: Replace dval by byte buffer val.
4867 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4868 (parse_number): Call parse_float instead of atof.
4869
4870 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4871 (lex_number): Call parse_float instead of strtod.
4872 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4873 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4874 Use write_exp_elt_floatcst.
4875 (unit_testing): Remove static variable.
4876 (rust_type): Do not check unit_testing.
4877 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4878
4879 * ada-exp.y (type_float, type_double): Remove.
4880 (typed_val_float): Use byte buffer instead of DOUBLEST.
4881 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4882 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4883
4884 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4885
4886 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4887 * arch/aarch64.h: New file.
4888
4889 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4890
4891 * dfp.h (decimal_from_string): Use const reference for argument.
4892 * dfp.c (decimal_from_string): Likewise.
4893
4894 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4895
4896 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4897 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4898 * mips-tdep.c (mips_print_fp_register): Likewise.
4899
4900 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4901
4902 * common/format.h (enum argclass): Replace decfloat_arg by
4903 dec32float_arg, dec64float_arg, and dec128float_arg.
4904 * common/format.c (parse_format_string): Update to return
4905 new decimal float argument classes.
4906
4907 * printcmd.c (printf_decfloat): Rename to ...
4908 (printf_floating): ... this. Add argclass argument, and use it
4909 instead of parsing the format string again. Add support for
4910 binary floating-point values, using floatformat_to_string.
4911 Convert value to the target format if it doesn't already match.
4912 (ui_printf): Call printf_floating instead of printf_decfloat,
4913 also for double_arg / long_double_arg. Pass argclass.
4914
4915 * dfp.c (decimal_to_string): Add format string argument.
4916 * dfp.h (decimal_to_string): Likewise.
4917
4918 * doublest.c (floatformat_to_string): Add format string argument.
4919 * doublest.h (floatformat_to_string): Likewise.
4920
4921 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4922
4923 * doublest.c (floatformat_precision): New routine.
4924 (floatformat_to_string): Likewise.
4925 * doublest.c (floatformat_to_string): Add prototype.
4926
4927 * printcmd.c (print_scalar_formatted): Only call print_floating
4928 on floating-point types.
4929 * valprint.c: Do not include "floatformat.h".
4930 (generic_val_print_decfloat): Remove.
4931 (generic_val_print): Call generic_val_print_float for both
4932 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4933 (print_floating): Use floatformat_to_string. Handle decimal float.
4934 (print_decimal_floating): Remove, merge into floatformat_to_string.
4935 * value.h (print_decimal_floating): Remove.
4936
4937 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4938
4939 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4940
4941 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4942
4943 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4944
4945 * memattr.h: Don't include vec.h.
4946 (struct mem_attrib): Initialize fields.
4947 <unknown>: New static method.
4948 (struct mem_region): Add constructors, operator<, initialize
4949 fields.
4950 * memattr.c: Include algorithm.
4951 (default_mem_attrib, unknown_mem_attrib): Remove.
4952 (user_mem_region_list): New global.
4953 (target_mem_region_list, mem_region_list): Change type to
4954 std::vector<mem_region>.
4955 (mem_use_target): Now a function.
4956 (target_mem_regions_valid): Change type to bool.
4957 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4958 (require_user_regions): Adjust.
4959 (require_target_regions): Adjust.
4960 (create_mem_region): Adjust.
4961 (lookup_mem_region): Adjust.
4962 (invalidate_target_mem_regions): Adjust.
4963 (mem_clear): Rename to...
4964 (user_mem_clear): ... this, and adjust.
4965 (mem_command): Adjust.
4966 (info_mem_command): Adjust.
4967 (mem_enable, enable_mem_command, mem_disable,
4968 disable_mem_command): Adjust.
4969 (mem_delete): Adjust.
4970 (delete_mem_command): Adjust.
4971 * memory-map.h (parse_memory_map): Return an std::vector.
4972 * memory-map.c (parse_memory_map): Likewise.
4973 (struct memory_map_parsing_data): Add constructor.
4974 <memory_map>: Point to std::vector.
4975 (memory_map_start_memory): Adjust.
4976 (memory_map_end_memory): Adjust.
4977 (memory_map_end_property): Adjust.
4978 (clear_result): Remove.
4979 * remote.c (remote_memory_map): Return an std::vector.
4980 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4981 Remove.
4982 (target_debug_print_mem_region_vector): New.
4983 * target-delegates.c: Regenerate.
4984 * target.h (mem_region_vector): New typedef.
4985 (to_memory_map): Return mem_region_vector.
4986 (target_memory_map): Return an std::vector.
4987 * target.c (target_memory_map): Return an std::vector.
4988 (flash_erase_command): Adjust.
4989
4990 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4991
4992 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4993 Change type to std::string.
4994 (memory_map_start_property): Adjust.
4995 (memory_map_end_property): Adjust.
4996
4997 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4998
4999 * infrun.h: Include common/byte-vector.h.
5000 (struct displaced_step_closure): New struct.
5001 (struct buf_displaced_step_closure): New struct.
5002 * infrun.c (displaced_step_closure::~displaced_step_closure):
5003 Provide default implementation.
5004 (displaced_step_clear): Deallocate step closure with delete.
5005 * aarch64-tdep.c (displaced_step_closure): Rename to ...
5006 (aarch64_displaced_step_closure): ... this, extend
5007 displaced_step_closure.
5008 (aarch64_displaced_step_data) <dsc>: Change type to
5009 aarch64_displaced_step_closure.
5010 (aarch64_displaced_step_copy_insn): Adjust to type change, use
5011 unique_ptr.
5012 (aarch64_displaced_step_fixup): Add cast for displaced step
5013 closure.
5014 * amd64-tdep.c (displaced_step_closure): Rename to ...
5015 (amd64_displaced_step_closure): ... this, extend
5016 displaced_step_closure.
5017 <insn_buf>: Change type to std::vector<gdb_byte>.
5018 <max_len>: Remove.
5019 (fixup_riprel): Change type of DSC parameter, adjust to type
5020 change of insn_buf.
5021 (fixup_displaced_copy): Change type of DSC parameter.
5022 (amd64_displaced_step_copy_insn): Instantiate
5023 amd64_displaced_step_closure.
5024 (amd64_displaced_step_fixup): Add cast for closure type, adjust
5025 to type change of insn_buf.
5026 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
5027 parameter DSC.
5028 (arm_linux_copy_svc): Likewise.
5029 (cleanup_kernel_helper_return): Likewise.
5030 (arm_catch_kernel_helper_return): Likewise.
5031 (arm_linux_displaced_step_copy_insn): Instantiate
5032 arm_displaced_step_closure.
5033 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
5034 (displaced_read_reg): Change type of parameter DSC.
5035 (branch_write_pc): Likewise.
5036 (load_write_pc): Likewise.
5037 (alu_write_pc): Likewise.
5038 (displaced_write_reg): Likewise.
5039 (arm_copy_unmodified): Likewise.
5040 (thumb_copy_unmodified_32bit): Likewise.
5041 (thumb_copy_unmodified_16bit): Likewise.
5042 (cleanup_preload): Likewise.
5043 (install_preload): Likewise.
5044 (arm_copy_preload): Likewise.
5045 (thumb2_copy_preload): Likewise.
5046 (install_preload_reg): Likewise.
5047 (arm_copy_preload_reg): Likewise.
5048 (cleanup_copro_load_store): Likewise.
5049 (install_copro_load_store): Likewise.
5050 (arm_copy_copro_load_store) Likewise.
5051 (thumb2_copy_copro_load_store): Likewise.
5052 (cleanup_branch): Likewise.
5053 (install_b_bl_blx): Likewise.
5054 (arm_copy_b_bl_blx): Likewise.
5055 (thumb2_copy_b_bl_blx): Likewise.
5056 (thumb_copy_b): Likewise.
5057 (install_bx_blx_reg): Likewise.
5058 (arm_copy_bx_blx_reg): Likewise.
5059 (thumb_copy_bx_blx_reg): Likewise.
5060 (cleanup_alu_imm): Likewise.
5061 (arm_copy_alu_imm): Likewise.
5062 (thumb2_copy_alu_imm): Likewise.
5063 (cleanup_alu_reg): Likewise.
5064 (install_alu_reg): Likewise.
5065 (arm_copy_alu_reg): Likewise.
5066 (thumb_copy_alu_reg): Likewise.
5067 (cleanup_alu_shifted_reg): Likewise.
5068 (install_alu_shifted_reg): Likewise.
5069 (arm_copy_alu_shifted_reg): Likewise.
5070 (cleanup_load): Likewise.
5071 (cleanup_store): Likewise.
5072 (arm_copy_extra_ld_st): Likewise.
5073 (install_load_store): Likewise.
5074 (thumb2_copy_load_literal): Likewise.
5075 (thumb2_copy_load_reg_imm): Likewise.
5076 (arm_copy_ldr_str_ldrb_strb): Likewise.
5077 (cleanup_block_load_all): Likewise.
5078 (cleanup_block_store_pc): Likewise.
5079 (cleanup_block_load_pc): Likewise.
5080 (arm_copy_block_xfer): Likewise.
5081 (thumb2_copy_block_xfer): Likewise.
5082 (cleanup_svc): Likewise.
5083 (install_svc): Likewise.
5084 (arm_copy_svc): Likewise.
5085 (thumb_copy_svc): Likewise.
5086 (arm_copy_undef): Likewise.
5087 (thumb_32bit_copy_undef): Likewise.
5088 (arm_copy_unpred): Likewise.
5089 (arm_decode_misc_memhint_neon): Likewise.
5090 (arm_decode_unconditional): Likewise.
5091 (arm_decode_miscellaneous): Likewise.
5092 (arm_decode_dp_misc): Likewise.
5093 (arm_decode_ld_st_word_ubyte): Likewise.
5094 (arm_decode_media): Likewise.
5095 (arm_decode_b_bl_ldmstm): Likewise.
5096 (arm_decode_ext_reg_ld_st): Likewise.
5097 (thumb2_decode_dp_shift_reg): Likewise.
5098 (thumb2_decode_ext_reg_ld_st): Likewise.
5099 (arm_decode_svc_copro): Likewise.
5100 (thumb2_decode_svc_copro): Likewise.
5101 (install_pc_relative): Likewise.
5102 (thumb_copy_pc_relative_16bit): Likewise.
5103 (thumb_decode_pc_relative_16bit): Likewise.
5104 (thumb_copy_pc_relative_32bit): Likewise.
5105 (thumb_copy_16bit_ldr_literal): Likewise.
5106 (thumb_copy_cbnz_cbz): Likewise.
5107 (thumb2_copy_table_branch): Likewise.
5108 (cleanup_pop_pc_16bit_all): Likewise.
5109 (thumb_copy_pop_pc_16bit): Likewise.
5110 (thumb_process_displaced_16bit_insn): Likewise.
5111 (decode_thumb_32bit_ld_mem_hints): Likewise.
5112 (thumb_process_displaced_32bit_insn): Likewise.
5113 (thumb_process_displaced_insn): Likewise.
5114 (arm_process_displaced_insn): Likewise.
5115 (arm_displaced_init_closure): Likewise.
5116 (arm_displaced_step_fixup): Add cast for closure.
5117 * arm-tdep.h: Include infrun.h.
5118 (displaced_step_closure): Rename to ...
5119 (arm_displaced_step_closure): ... this, extend
5120 displaced_step_closure.
5121 <u::svc::copy_svc_os>: Change type of parameter DSC.
5122 <cleanup>: Likewise.
5123 (arm_process_displaced_insn): Likewise.
5124 (arm_displaced_init_closure): Likewise.
5125 (displaced_read_reg): Likewise.
5126 (displaced_write_reg): Likewise.
5127 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5128 Adjust.
5129 * i386-tdep.h: Include infrun.h.
5130 (i386_displaced_step_closure): New typedef.
5131 * i386-tdep.c (i386_displaced_step_copy_insn): Use
5132 i386_displaced_step_closure.
5133 (i386_displaced_step_fixup): Adjust.
5134 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
5135 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
5136 and unique_ptr.
5137 (ppc_displaced_step_fixup): Adjust.
5138 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
5139 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
5140 and unique_ptr.
5141 (s390_displaced_step_fixup): Adjust.
5142
5143 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
5144
5145 * interps.h (interp_resume, interp_suspend, interp_set_temp):
5146 Remove declarations.
5147
5148 2017-10-20 Tom Tromey <tom@tromey.com>
5149
5150 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
5151 std::vector.
5152 (gdb_bfd_record_inclusion): Update.
5153 (bfdp): Remove typedef.
5154
5155 2017-10-20 Tom Tromey <tom@tromey.com>
5156
5157 * gdb_bfd.c (gdb_bfd_ref): Use new.
5158 (struct gdb_bfd_data): Add constructor, destructor, and member
5159 initializers.
5160 (gdb_bfd_unref): Use delete.
5161
5162 2017-10-20 Tom Tromey <tom@tromey.com>
5163
5164 * exec.c (exec_file_attach): Use new_bfd_ref.
5165 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
5166 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5167 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
5168 new_bfd_ref.
5169 * gdb_bfd.h (new_bfd_ref): New function.
5170
5171 2017-10-20 Pedro Alves <palves@redhat.com>
5172
5173 * main.c (captured_command_loop): Add attribute noinline.
5174
5175 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
5176
5177 * interps.c (struct interp_factory): Add constructor.
5178 (interp_factory_p): Remove typedef.
5179 (DEF_VEC_P(interp_factory_p)): Remove.
5180 (interpreter_factories): Change type to std::vector.
5181 (interp_factory_register): Adjust.
5182 (interp_lookup): Adjust.
5183 (interpreter_completer): Adjust.
5184
5185 2017-10-19 Tom Tromey <tom@tromey.com>
5186
5187 * break-catch-syscall.c (catch_syscall_completer): Use
5188 std::string, gdb::unique_xmalloc_ptr.
5189
5190 2017-10-19 Tom Tromey <tom@tromey.com>
5191
5192 * infcall.c (call_function_by_hand_dummy): Use std::string.
5193
5194 2017-10-19 Tom Tromey <tom@tromey.com>
5195
5196 * mi/mi-main.c (mi_cmd_execute): Update.
5197 * top.h (prepare_execute_command): Return scoped_value_mark.
5198 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
5199 Add move constructor.
5200 * top.c (prepare_execute_command): Return scoped_value_mark.
5201 (execute_command): Update.
5202
5203 2017-10-19 Pedro Alves <palves@redhat.com>
5204
5205 * xml-support.c (xml_fetch_content_from_file): Check fread's
5206 return.
5207
5208 2017-10-19 Pedro Alves <palves@redhat.com>
5209
5210 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
5211 async.
5212 (handle_error_fd): New function.
5213 (ser_base_async): Add/delete an event loop file handler for
5214 error_fd.
5215
5216 2017-10-19 Pedro Alves <palves@redhat.com>
5217
5218 * xml-support.c (xml_fetch_content_from_file): Don't read in
5219 chunks. Instead use fseek to determine the file's size, and read
5220 it in one go.
5221
5222 2017-11-18 Keith Seitz <keiths@redhat.com>
5223
5224 * c-exp.y (oper): Canonicalize conversion operators of user-defined
5225 types.
5226 Add whitespace to front of type name.
5227
5228 2017-10-18 Keith Seitz <keiths@redhat.com>
5229
5230 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
5231 DW_AT_accessibility.
5232
5233 2017-10-18 Yao Qi <yao.qi@linaro.org>
5234
5235 * features/tic6x-c62x-linux.c: Remove.
5236
5237 2017-10-17 Tom Tromey <tom@tromey.com>
5238
5239 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
5240 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5241 (do_mixed_source_and_assembly): Likewise.
5242
5243 2017-10-17 Tom Tromey <tom@tromey.com>
5244
5245 * regcache.c (regcache::xfer_part): Remove assertion.
5246
5247 2017-10-17 Pedro Alves <palves@redhat.com>
5248
5249 * xml-support.c (xml_fetch_content_from_file): Call
5250 unique_ptr::release() instead unique_ptr::get() when passing
5251 through xrealloc.
5252
5253 2017-10-17 Yao Qi <yao.qi@linaro.org>
5254
5255 * regcache.c (regcache::xfer_part): Remove parameters read and
5256 write, add parameter is_raw. All callers are updated.
5257
5258 2017-10-16 Keith Seitz <keiths@redhat.com>
5259
5260 * c-typeprint.c (enum access_specifier): Moved here from
5261 c_type_print_base.
5262 (output_access_specifier): New function.
5263 (c_type_print_base): Consider typedefs when assessing
5264 whether access labels are needed.
5265 Use output_access_specifier as needed.
5266 Output access specifier for typedefs, if needed.
5267 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5268 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5269 fields.
5270 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5271 accessor macros.
5272
5273 2017-10-16 Tom Tromey <tom@tromey.com>
5274
5275 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5276 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5277 * target.c (target_fileio_read_stralloc): Update.
5278 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5279 * target.h (target_fileio_read_stralloc): Return
5280 unique_xmalloc_ptr.
5281
5282 2017-10-16 Tom Tromey <tom@tromey.com>
5283
5284 * xml-syscall.c (xml_init_syscalls_info): Update.
5285 * xml-support.c (xinclude_start_include): Update.
5286 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5287 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5288 (xml_fetch_content_from_file): Likewise.
5289 * osdata.c (get_osdata): Update.
5290 * target.h (target_read_stralloc, target_get_osdata): Return
5291 unique_xmalloc_ptr.
5292 * solib-aix.c (solib_aix_get_library_list): Update.
5293 * solib-target.c (solib_target_current_sos): Update.
5294 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5295 * xml-tdesc.c (fetch_available_features_from_target): Update.
5296 (target_fetch_description_xml): Update.
5297 (file_read_description_xml): Update.
5298 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5299 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5300 (remote_pid_to_exec_file): Update.
5301 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5302 (target_get_osdata): Likewise.
5303
5304 2017-10-16 Tom Tromey <tom@tromey.com>
5305
5306 * remote.c (remote_register_number_and_offset): Use std::vector.
5307 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5308 (putpkt_binary): Use gdb::def_vector.
5309 (compare_sections_command): Use gdb::byte_vector.
5310
5311 2017-10-16 Tom Tromey <tom@tromey.com>
5312
5313 * ppc-linux-nat.c (hwdebug_insert_point): Use
5314 gdb::unique_xmalloc_ptr, XDUP.
5315
5316 2017-10-16 Tom Tromey <tom@tromey.com>
5317
5318 * probe.c (parse_probes): Use std::string.
5319 (info_probes_for_ops, enable_probes_command)
5320 (disable_probes_command): Remove cleanups.
5321
5322 2017-10-16 Tom Tromey <tom@tromey.com>
5323
5324 * buildsym.c (block_compar): Remove.
5325 (end_symtab_get_static_block): Use std::vector.
5326
5327 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5328
5329 * memrange.h (struct mem_range): Define operator< and operator==.
5330 (mem_range_s): Remove.
5331 (DEF_VEC_O (mem_range_s)): Remove.
5332 (normalize_mem_ranges): Change parameter type to std::vector.
5333 * memrange.c (compare_mem_ranges): Remove.
5334 (normalize_mem_ranges): Change parameter type to std::vector,
5335 adjust to vector change.
5336 * exec.c (section_table_available_memory): Return vector, remove
5337 parameter.
5338 (section_table_read_available_memory): Adjust to std::vector
5339 change.
5340 * remote.c (remote_read_bytes): Adjust to std::vector
5341 change.
5342 * tracepoint.h (traceframe_available_memory): Change parameter
5343 type to std::vector.
5344 * tracepoint.c (traceframe_available_memory): Change parameter
5345 type to std::vector, adjust.
5346 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5347 std::vector change.
5348 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5349 unittests/memrange-selftests.c.
5350 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5351 * gdb/unittests/memrange-selftests.c: New file.
5352
5353 2017-10-16 Pedro Alves <palves@redhat.com>
5354
5355 * elfread.c (probe_key_free): Rename range-for variable.
5356 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5357 (find_probe_by_pc, collect_probes): Rename range-for variable.
5358
5359 2017-10-16 Yao Qi <yao.qi@linaro.org>
5360
5361 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5362 * features/tic6x-c62x.c: Remove.
5363 * features/tic6x-c64x-linux.c: Remove.
5364 * features/tic6x-c64x.c: Remove.
5365 * features/tic6x-c64xp-linux.c: Remove.
5366 * features/tic6x-c64xp.c: Remove.
5367 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5368 initialize_tdesc_tic6x_*_linux functions.
5369 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5370 initialize_tdesc_tic6x_* functions.
5371
5372 2017-10-16 Yao Qi <yao.qi@linaro.org>
5373
5374 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5375 tic6x-c62x.
5376 * regformats/tic6x-c62x.dat: Remove.
5377 * regformats/tic6x-c64x.dat: Remove.
5378 * regformats/tic6x-c64xp.dat: Remove.
5379
5380 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5381
5382 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5383 (the !HAVE_LIBEXPAT version).
5384
5385 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5388 const.
5389
5390 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5391
5392 * target.h: Include tracepoint.h.
5393 (enum trace_find_type): Move to tracepoint.h.
5394 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5395 * tracepoint.h: Don't include target.h
5396 (enum trace_find_type): Move from target.h.
5397 (parse_traceframe_info): Return a unique ptr.
5398 * tracepoint.c (current_traceframe_info): Change type to unique
5399 ptr.
5400 (free_traceframe_info): Remove.
5401 (clear_traceframe_info): Don't manually free
5402 current_traceframe_info.
5403 (free_result): Remove.
5404 (parse_traceframe_info): Return a unique ptr.
5405 (get_traceframe_info): Adjust to unique ptr.
5406 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5407 * remote.c (remote_traceframe_info): Return a unique ptr.
5408 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5409 ptr.
5410 * target-debug.h (target_debug_print_traceframe_info_up): New
5411 macro.
5412 * target-delegates.c: Regenerate.
5413
5414 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5415
5416 * memrange.h (struct mem_range): Add constructors.
5417 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5418 std::vector<mem_range>.
5419 * tracepoint.c (free_traceframe_info): Don't manually free
5420 vector.
5421 (traceframe_info_start_memory): Adjust to vector change.
5422 (traceframe_available_memory): Likewise.
5423 * tracefile-tfile.c (build_traceframe_info): Likewise.
5424 * ctf.c (ctf_traceframe_info): Likewise.
5425
5426 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5427
5428 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5429 std::vector<int>.
5430 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5431 (traceframe_info_start_tvar): Adjust to vector change.
5432 (parse_traceframe_info): Allocate with new.
5433 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5434 vector change.
5435 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5436 change.
5437 tfile_traceframe_info): Allocate with new.
5438 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5439 change.
5440
5441 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5442
5443 * tracepoint.c (traceframe_info): Rename to...
5444 (current_traceframe_info): ...this.
5445 (clear_traceframe_info): Adjust.
5446 (get_traceframe_info): Adjust.
5447
5448 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5449
5450 * nat/linux-osdata.c: Include algorithm.
5451 (compare_processes): Remove.
5452 (struct pid_pgid_entry): New struct.
5453 (linux_xfer_osdata_processgroups): Use std::vector instead of
5454 XNEWVEC.
5455
5456 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5457
5458 * objfiles.h: Don't include symfile.h.
5459 (struct partial_symbol): Remove forward-declaration.
5460 (struct objfile) <global_psymbols, static_psymbols>: Change type
5461 to std::vector<partial_symbol *>.
5462 * objfiles.c (objfile::objfile): Don't memset those fields.
5463 (objfile::~objfile): Don't free those fields.
5464 * psympriv.h (struct psymbol_allocation_list): Remove
5465 forward-declaration.
5466 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5467 to std::vector.
5468 (start_psymtab_common): Change parameters to std::vector.
5469 * psymtab.c: Include algorithm.
5470 (require_partial_symbols): Call shrink_to_fit.
5471 (find_pc_sect_psymbol): Adjust to vector change.
5472 (match_partial_symbol): Likewise.
5473 (lookup_partial_symbol): Likewise.
5474 (psym_relocate): Likewise.
5475 (dump_psymtab): Likewise.
5476 (recursively_search_psymtabs): Likewise.
5477 (compare_psymbols): Remove.
5478 (sort_pst_symbols): Adjust to vector change.
5479 (start_psymtab_common): Likewise.
5480 (end_psymtab_common): Likewise.
5481 (psymbol_bcache_full): De-constify return value.
5482 (add_psymbol_to_bcache): Likewise.
5483 (extend_psymbol_list): Remove.
5484 (append_psymbol_to_list): Adjust to vector change.
5485 (add_psymbol_to_list): Likewise.
5486 (init_psymbol_list): Likewise.
5487 (maintenance_info_psymtabs): Likewise.
5488 (maintenance_check_psymtabs): Likewise.
5489 * symfile.h (struct psymbol_allocation_list): Remove.
5490 * symfile.c (reread_symbols): Adjust to vector change.
5491 * dbxread.c (start_psymtab): Change type of parameters.
5492 (dbx_symfile_read): Adjust to vector change.
5493 (read_dbx_symtab): Likewise.
5494 (start_psymtab): Change type of parameters.
5495 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5496 (create_partial_symtab): Likewise.
5497 (add_partial_symbol): Likewise.
5498 (write_one_signatured_type): Likewise.
5499 (recursively_write_psymbols): Likewise.
5500 * mdebugread.c (parse_partial_symbols): Likewise.
5501 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5502 (scan_xcoff_symtab): Adjust to vector change.
5503 (xcoff_initial_scan): Likewise.
5504
5505 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5506
5507 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5508
5509 2017-10-13 Yao Qi <yao.qi@linaro.org>
5510
5511 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5512 Remove s390x-*-expedite, add s390x-expedite.
5513
5514 2017-10-13 Yao Qi <yao.qi@linaro.org>
5515
5516 * features/s390-gs-linux64.c: Regenerated.
5517 * features/s390x-gs-linux64.c: Regenerated.
5518
5519 2017-10-13 Tom Tromey <tom@tromey.com>
5520
5521 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5522 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5523 delete.
5524 * symfile.c (symbol_file_add_with_addrs): Use new.
5525 (symbol_file_add_separate): Update comment.
5526 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5527 * jit.c (jit_object_close_impl): Use new.
5528 (jit_unregister_code): Use delete.
5529 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5530 (~objfile): Rename from free_objfile.
5531 (free_objfile_separate_debug, do_free_objfile_cleanup)
5532 (free_all_objfiles, objfile_purge_solibs): Use delete.
5533 * objfiles.h (struct objfile): Add constructor and destructor.
5534 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5535 (allocate_objfile, free_objfile): Don't declare.
5536 (struct objstats): Add initializers.
5537
5538 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5539
5540 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5541 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5542 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5543 * gdbarch.h: Regenerate.
5544 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5545 Adjust comment.
5546 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5547 (i386_displaced_step_fixup): Adjust comment.
5548 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5549
5550 2017-10-12 Tom Tromey <tom@tromey.com>
5551
5552 * prologue-value.h (pv_area::store_would_trash): Return bool.
5553 (pv_area::find_reg): Likewise.
5554 * prologue-value.c (pv_area::store_would_trash): Return bool.
5555 (pv_area::find_reg): Likewise.
5556
5557 2017-10-12 Tom Tromey <tom@tromey.com>
5558
5559 * s390-linux-tdep.c (s390_store, s390_load)
5560 (s390_check_for_saved, s390_analyze_prologue): Update.
5561 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5562 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5563 * prologue-value.h (class pv_area): Move from prologue-value.c.
5564 Change names of members. Add constructor, destructor, member
5565 functions.
5566 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5567 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5568 (pv_area_fetch, pv_area_scan): Don't declare.
5569 * prologue-value.c (struct pv_area::area_entry): Now member of
5570 pv_area.
5571 (struct pv_area): Move to prologue-value.h.
5572 (pv_area::pv_area): Rename from make_pv_area.
5573 (pv_area::~pv_area): Rename from free_pv_area.
5574 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5575 (clear_entries, find_entry, overlaps, store_would_trash, store)
5576 (fetch, find_reg, scan): Now member of pv_area.
5577 Remove "area" argument. Update.
5578 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5579 Update.
5580 * mn10300-tdep.c (push_reg, check_for_saved)
5581 (mn10300_analyze_prologue): Update.
5582 * mep-tdep.c (is_arg_spill, check_for_saved)
5583 (mep_analyze_prologue): Update.
5584 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5585 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5586 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5587 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5588 Update.
5589 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5590 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5591
5592 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5593
5594 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5595 * linux-nat.c (linux_nat_delete_thread): New variable.
5596 (lwp_free): Invoke linux_nat_delete_thread if set.
5597 (linux_nat_set_delete_thread): New function.
5598 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5599 thread delete callback.
5600 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5601 (_initialize_arm_linux_nat): Assign thread delete callback.
5602 * s390-linux-nat.c (s390_delete_thread): New function.
5603 (_initialize_s390_nat): Assign thread delete callback.
5604 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5605 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5606 function.
5607 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5608 declaration.
5609 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5610 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5611
5612 2017-10-09 Tom Tromey <tom@tromey.com>
5613
5614 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5615 std::string.
5616 * tui/tui-layout.c (enum tui_status): Use std::string.
5617
5618 2017-10-11 Tom Tromey <tom@tromey.com>
5619
5620 * gdbthread.h (thread_command): Constify.
5621 * inferior.h (detach_command): Constify.
5622 * top.h (set_history, show_history): Constify.
5623 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5624 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5625 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5626 * printcmd.c (set_command): Constify.
5627 (non_const_set_command): New function.
5628 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5629 * breakpoint.c (enable_command, disable_command, delete_command)
5630 (catch_command, tcatch_command, set_breakpoint_cmd)
5631 (show_breakpoint_cmd): Constify.
5632 * macrocmd.c (macro_command): Constify.
5633 * infcmd.c (unset_command, kill_command, detach_command)
5634 (info_proc_cmd): Constify.
5635 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5636 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5637 (info_auto_load_cmd): Constify.
5638 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5639 (unset_tdesc_cmd): Constify.
5640 * ada-lang.c (set_ada_command, show_ada_command)
5641 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5642 * guile/guile.c (set_guile_command, show_guile_command)
5643 (info_guile_command): Constify.
5644 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5645 Constify.
5646 * skip.c (skip_command): Constify.
5647 * compile/compile.c (_initialize_compile): Constify.
5648 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5649 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5650 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5651 (maint_btrace_pt_show_cmd): Constify.
5652 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5653 Constify.
5654 * python/python.c (user_show_python, user_set_python): Constify.
5655 * mips-tdep.c (set_mips_command, show_mips_command)
5656 (set_mipsfpu_command): Constify.
5657 * record-btrace.c (cmd_record_btrace_start)
5658 (cmd_set_record_btrace, cmd_show_record_btrace)
5659 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5660 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5661 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5662 Constify.
5663 * symfile.c (overlay_command): Constify.
5664 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5665 * cli/cli-logging.c (set_logging_command, show_logging_command):
5666 Constify.
5667 * cli/cli-dump.c (dump_command, append_command)
5668 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5669 (tekhex_dump_command, binary_dump_command)
5670 (binary_append_command): Constify.
5671 * cli/cli-decode.c (struct cmd_list_element): Change type of
5672 "fun".
5673 * cli/cli-cmds.c (info_command, show_command, set_debug)
5674 (show_debug): Constify.
5675 (show_command): Add non-const overload.
5676 * top.c (set_history, show_history): Constify.
5677 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5678 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5679 * target.c (target_command): Constify.
5680 * sparc64-tdep.c (info_adi_command): Constify.
5681 * record-full.c (cmd_record_full_start): Constify.
5682 (set_record_full_command): Constify. Fix typo.
5683 (show_record_full_command): Constify.
5684 * thread.c (thread_command, thread_apply_command): Constify.
5685 * memattr.c (dummy_cmd): Constify.
5686 * value.c (function_command): Constify.
5687 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5688 * probe.c (info_probes_command): Constify.
5689 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5690 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5691 (show_thread_cmd, set_thread_default_cmd)
5692 (show_thread_default_cmd): Constify.
5693 (check_empty): Constify.
5694 * tracepoint.c (tfind_command): Constify.
5695 * cp-support.c (maint_cplus_command): Constify.
5696 * windows-tdep.c (info_w32_command): Constify.
5697 * record.c (cmd_record_start, set_record_command)
5698 (show_record_command, info_record_command, cmd_record_goto):
5699 Constify.
5700 * ravenscar-thread.c (set_ravenscar_command)
5701 (show_ravenscar_command): Constify.
5702 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5703 Constify.
5704 (add_internal_problem_command): Remove casts.
5705 * arc-tdep.c (maintenance_print_arc_command): Constify.
5706 * valprint.c (set_print, show_print, set_print_raw)
5707 (show_print_raw): Constify.
5708 * maint.c (maintenance_command, maintenance_info_command)
5709 (maintenance_print_command, maintenance_set_cmd)
5710 (maintenance_show_cmd, set_per_command_cmd)
5711 (show_per_command_cmd, maintenance_check_command): Constify.
5712 * language.c (set_check, show_check): Constify.
5713 * typeprint.c (show_print_type, set_print_type): Constify.
5714 * go32-nat.c (go32_info_dos_command): Constify.
5715
5716 2017-10-11 Tom Tromey <tom@tromey.com>
5717
5718 * breakpoint.c (prepare_re_set_context): Remove.
5719 (breakpoint_re_set_one): Update. Don't use cleanups.
5720 (breakpoint_re_set): Use scoped_restore, std::string, and
5721 scoped_restore_current_language.
5722
5723 2017-10-11 Tom Tromey <tom@tromey.com>
5724
5725 * breakpoint.c (commands_command_1): Use std::string.
5726 (cleanup_executing_breakpoints): Remove.
5727 (bpstat_do_actions_1): Use scoped_restore.
5728 (bpstat_check_watchpoint): Use std::string.
5729 (decode_static_tracepoint_spec): Likewise.
5730 (break_range_command): Likewise.
5731 (watch_command_1): Likewise.
5732 (compare_breakpoints): Change argument types.
5733 (clear_command): Use std::vector.
5734 (cleanup_executing_breakpoints): Remove.
5735 (update_global_location_list): Use unique_xmalloc_ptr.
5736 (strace_command): Remove unused declaration.
5737
5738 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5739
5740 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5741 * NEWS: Mention new FreeBSD/arm native configuration.
5742 * configure.host: Add arm*-*-freebsd*.
5743 * configure.nat: Likewise.
5744 * arm-fbsd-nat.c: New file.
5745
5746 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5747
5748 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5749 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5750 * NEWS: Mention new FreeBSD/arm target.
5751 * configure.tgt: Add arm*-*-freebsd*.
5752 * arm-fbsd-tdep.c: New file.
5753 * arm-fbsd-tdep.h: New file.
5754
5755 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5756
5757 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5758 `gdbarch_elfcore_write_linux_prpsinfo'.
5759 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5760 method.
5761 (elf_internal_linux_prpsinfo): Remove declaration.
5762 * gdbarch.h: Regenerate.
5763 * gdbarch.c: Regenerate.
5764
5765 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5766
5767 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5768 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5769
5770 2017-10-11 Pedro Alves <palves@redhat.com>
5771
5772 * breakpoint.c (reattach_breakpoints): Delete.
5773 * breakpoint.h (reattach_breakpoints): Delete.
5774
5775 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5776
5777 * symfile.c (registered_sym_fns): Make struct, not typedef.
5778 (DEF_VEC_O (registered_sym_fns)): Remove.
5779 (symtab_fns): Change type to std::vector.
5780 (add_symtab_fns): Adjust.
5781 (find_sym_fns): Adjust.
5782
5783 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5784
5785 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5786 * arc-tdep.h (arc_arch_is_em): New function.
5787 (arc_arch_is_hs): Likewise.
5788
5789 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5790
5791 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5792 parentheses in the declaration.
5793 (macro_lookup_inclusion): Likewise.
5794 (macro_lookup_definition): Likewise.
5795 * p-lang.h (pascal_builtin_types): Likewise.
5796 * tui/tui-data.c (tui_win_list): Likewise.
5797 * tui/tui-data.h (tui_win_list): Likewise.
5798 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5799
5800 2017-10-11 Mark Rages <markrages@gmail.com>
5801
5802 * target-memory.c (block_boundaries): Fix for block address not
5803 aligned on block size.
5804
5805 2017-10-10 Pedro Alves <palves@redhat.com>
5806 Tom Tromey <tom@tromey.com>
5807
5808 * breakpoint.c (struct captured_breakpoint_query_args)
5809 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5810 (print_breakpoint): New.
5811 * breakpoint.h (print_breakpoint): Declare.
5812 * common/common-exceptions.h (enum return_reason): Remove
5813 references to catch_exceptions.
5814 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5815 Delete.
5816 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5817 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5818 * gdb.h: Delete.
5819 * gdbthread.h (thread_select): Declare.
5820 * mi/mi-cmd-break.c: Don't include gdb.h.
5821 (breakpoint_notify): Use print_breakpoint.
5822 * mi/mi-cmd-catch.c: Don't include gdb.h.
5823 * mi/mi-interp.c: Don't include gdb.h.
5824 (mi_print_breakpoint_for_event): New.
5825 (mi_breakpoint_created, mi_breakpoint_modified): Use
5826 mi_print_breakpoint_for_event.
5827 * mi/mi-main.c: Don't include gdb.h.
5828 (mi_cmd_thread_select): Parse the global thread ID here. Use
5829 thread_select instead of gdb_thread_select.
5830 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5831 of using gdb_list_thread_ids.
5832 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5833 FILEIO_ENOSYS here.
5834 (remote_fileio_request): Use TRY/CATCH instead of
5835 catch_exceptions.
5836 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5837 (symbol_file_add_from_memory_wrapper): Delete.
5838 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5839 * thread.c: Don't include gdb.h.
5840 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5841 (thread_alive): Use thread_select.
5842 (do_captured_thread_select): Delete, parts salvaged as ...
5843 (thread_select): ... this new function.
5844 (gdb_thread_select): Delete.
5845
5846 2017-10-10 Pedro Alves <palves@redhat.com>
5847 Tom Tromey <tom@tromey.com>
5848
5849 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5850 and reverse logic.
5851 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5852 No longer macros. Instead ...
5853 (enum wp_check_result): They're now values of this new
5854 enumeration.
5855 (watchpoint_check): Change return type to wp_check_result and
5856 parameter type to bpstat.
5857 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5858 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5859 catch_errors. Reverse logic of watchpoint_check call.
5860 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5861 pointer as parameter.
5862 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5863 * common/common-exceptions.c (throw_exception_sjlj): Update
5864 comments to avoid mentioning catch_errors.
5865 * exceptions.c (catch_errors): Delete.
5866 * exceptions.h: Update comments to avoid mentioning catch_errors.
5867 (catch_errors_ftype, catch_errors): Delete.
5868 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5869 (hook_stop_stub): Delete.
5870 (restore_selected_frame): Change return type to void, and
5871 parameter type to const frame_id &.
5872 (restore_infcall_control_state): Use TRY/CATCH instead of
5873 catch_errors.
5874 * main.c (captured_command_loop): Return void and remove
5875 parameter. Remove references to catch_errors.
5876 (captured_main): Use TRY/CATCH instead of catch_errors.
5877 * objc-lang.c (objc_submethod_helper_data)
5878 (find_objc_msgcall_submethod_helper): Delete.
5879 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5880 catch_errors.
5881 * record-full.c (record_full_message): Return void.
5882 (record_full_message_args, record_full_message_wrapper): Delete.
5883 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5884 instead of catch_errors.
5885 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5886 parameter type to int.
5887 * solib-darwin.c (open_symbol_file_object): Ditto.
5888 * solib-dsbt.c (open_symbol_file_object): Ditto.
5889 * solib-frv.c (open_symbol_file_object): Ditto.
5890 * solib-svr4.c (open_symbol_file_object): Ditto.
5891 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5892 * solib.c (update_solib_list): Use TRY/CATCH instead of
5893 catch_errors.
5894 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5895 Change type.
5896 * symmisc.c (struct print_symbol_args): Remove.
5897 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5898 (print_symbol): Change type.
5899 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5900 and remove parameters.
5901 (catch_errors): New.
5902 (get_windows_debug_event): Adjust.
5903
5904 2017-10-09 Tom Tromey <tom@tromey.com>
5905
5906 * mi/mi-main.c (free_splay_tree): Remove.
5907 (list_available_thread_groups): Use splay_tree_up.
5908 * common/gdb_splay_tree.h: New file.
5909
5910 2017-10-09 Tom Tromey <tom@tromey.com>
5911
5912 * mi/mi-main.c (do_nothing): Remove.
5913 (list_available_thread_groups): Update.
5914
5915 2017-10-09 Pedro Alves <palves@redhat.com>
5916
5917 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5918 reading registers when switching context.
5919
5920 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5921
5922 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5923 (fbsd_convert_siginfo): Likewise.
5924 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5925
5926 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5927
5928 * configure.ac (try_guile_versions): Remove guile-2.2.
5929 * configure: Regenerate.
5930
5931 2017-10-09 Tom Tromey <tom@tromey.com>
5932
5933 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5934 (COMPILE.pre): Use $(CXX).
5935
5936 2017-10-09 Pedro Alves <palves@redhat.com>
5937
5938 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5939 Use bool.
5940 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5941 * cp-support.h (cp_remove_params): Now returns a
5942 gdb::unique_xmalloc_ptr.
5943 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5944 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5945 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5946 returning a gdb::unique_xmalloc_ptr.
5947 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5948 * stack.c (find_frame_funname): Adjust to cp_remove_params
5949 returning a gdb::unique_xmalloc_ptr.
5950
5951 2017-10-08 Tom Tromey <tom@tromey.com>
5952
5953 * dwarf2read.c (dwarf2_get_dwz_file): Use
5954 gdb::unique_xmalloc_ptr.
5955 (find_slot_in_mapped_hash): Likewise.
5956 (dwarf2_physname): Likewise.
5957 (create_dwo_unit_in_dwp_v1): Use std::string.
5958 (create_dwo_unit_in_dwp_v2): Likewise.
5959 (lookup_dwo_cutu): Likewise.
5960 (inherit_abstract_dies): Use std::vector.
5961 (read_array_type): Likewise.
5962 (dwarf_decode_macros): Remove unused declaration.
5963 (unsigned_int_compar): Remove.
5964 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5965 (psymtabs_addrmap_cleanup): Remove.
5966
5967 2017-10-08 Tom Tromey <tom@tromey.com>
5968
5969 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5970 * frame.h (frame_cleanup_after_sniffer): Declare.
5971 (frame_prepare_for_sniffer): Return void.
5972 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5973 type of argument.
5974 (frame_prepare_for_sniffer): Return void.
5975
5976 2017-10-08 Tom Tromey <tom@tromey.com>
5977
5978 * utils.h (make_cleanup_value_free): Remove.
5979 * utils.c (do_value_free, struct cleanup): Remove.
5980 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5981 Use gdb_value_up.
5982 * value.h (struct value_deleter): New.
5983 (gdb_value_up): New typedef.
5984
5985 2017-10-08 Tom Tromey <tom@tromey.com>
5986
5987 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5988 (make_cleanup_free_search_symbols): Remove.
5989 (search_symbols): Return std::vector.
5990 (symbol_search::compare_search_syms): Now member of
5991 symbol_search. Change arguments.
5992 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5993 (symtab_symbol_info, rbreak_command): Update.
5994 * symtab.h (struct symbol_search) <next>: Remove.
5995 Add constructors.
5996 (symbol_search::operator<): New function.
5997 (symbol_search::operator==): New function.
5998 (search_symbols): Remove std::vector.
5999 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
6000 (symbol_search::compare_search_syms): Declare.
6001
6002 2017-10-06 Yao Qi <yao.qi@linaro.org>
6003
6004 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
6005 arch/aarch64-insn.o.
6006 Remove one rule.
6007 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
6008
6009 2017-10-06 Yao Qi <yao.qi@linaro.org>
6010
6011 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
6012 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
6013 arch/arm-linux.o respectively.
6014 * configure.tgt: Likewise.
6015
6016 2017-10-06 Yao Qi <yao.qi@linaro.org>
6017
6018 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
6019 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
6020
6021 2017-10-06 Pedro Alves <palves@redhat.com>
6022
6023 * windows-nat.c: Include <algorithm>.
6024
6025 2017-10-06 Yao Qi <yao.qi@linaro.org>
6026
6027 * configure.tgt (i386_tobjs): New variable.
6028 (amd64_tobjs): New variable.
6029 Set $cpu_obs and $os_obs.
6030
6031 2017-10-06 Yao Qi <yao.qi@linaro.org>
6032
6033 * Makefile.in (CONFIG_SRC_SUBDIR): New.
6034 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
6035 (clean): Remove object files and dependency files.
6036 (distclean): Remove the directory.
6037 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6038 * configure: Re-generated.
6039 * configure.tgt: Replace amd64.o with arch/amd64.o.
6040
6041 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
6042
6043 PR build/22188
6044 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
6045 and SETEND.
6046
6047 2017-10-05 Pedro Alves <palves@redhat.com>
6048
6049 * linux-nat.c (linux_child_follow_fork): When following the parent
6050 and detaching the child, consult the parent thread's architecture
6051 instead of the child's.
6052
6053 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6054
6055 * ax.h: Do not include "doublest.h".
6056 (union agent_val): Remove.
6057
6058 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6059
6060 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
6061 (decimal_to_string): Return std::string object.
6062 (decimal_from_string): Accept std::string object. Return bool.
6063 (decimal_from_integral, decimal_from_doublest): Remove.
6064 (decimal_from_longest): Add prototype.
6065 (decimal_from_ulongest): Likewise.
6066 (decimal_to_longest): Likewise.
6067 (decimal_from_doublest): Likewise.
6068 * dfp.c: Do not include "gdbtypes.h" or "value.h".
6069 (MAX_DECIMAL_STRING): Move here.
6070 (decimal_to_string): Return std::string object.
6071 (decimal_from_string): Accept std::string object. Return bool.
6072 (decimal_from_integral): Remove, replace by ...
6073 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
6074 (decimal_to_longest): New function.
6075 (decimal_from_floating): Remove, replace by ...
6076 (decimal_from_doublest): ... this new function.
6077 (decimal_to_doublest): Update to new decimal_to_string interface.
6078
6079 * value.c (unpack_long): Use decimal_to_longest.
6080 * valops.c (value_cast): Use decimal_from_doublest instead of
6081 decimal_from_floating. Use decimal_from_[u]longest isntead of
6082 decimal_from_integral.
6083 * valarith.c (value_args_as_decimal): Likewise.
6084 * valprint.c (print_decimal_floating): Update to new
6085 decimal_to_string interface.
6086 * printcmd.c (printf_decfloat): Likewise.
6087 * c-exp.y (parse_number): Update to new decimal_from_string interface.
6088
6089 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6090
6091 * doublest.h: Do not include "floatformat.h". Remove stale comments.
6092 * gdbtypes.c: Include "floatformat.h".
6093 * value.c: Likewise.
6094 * m68k-tdep.c: Likewise.
6095
6096 * findvar.c: Do not include "floatformat.h".
6097 * amd64-darwin-tdep.c: Likewise.
6098 * arm-linux-tdep.c: Likewise.
6099 * i386-darwin-tdep.c: Likewise.
6100 * i387-tdep.c: Likewise.
6101 * m68k-linux-tdep.c: Likewise.
6102 * mep-tdep.c: Likewise.
6103 * mips-tdep.c: Likewise.
6104 * nios2-tdep.c: Likewise.
6105 * s390-linux-tdep.c: Likewise.
6106 * sparc-obsd-tdep.c: Likewise.
6107 * sparc-tdep.c: Likewise.
6108 * sparc64-tdep.c: Likewise.
6109 * spu-tdep.c: Likewise.
6110 * tic6x-tdep.c: Likewise.
6111 * tilegx-tdep.c: Likewise.
6112 * vax-tdep.c: Likewise.
6113 * xstormy16-tdep.c: Likewise.
6114 * xtensa-tdep.c: Likewise.
6115
6116 * top.c: Do not include "doublest.h".
6117 * aarch64-tdep.c: Likewise.
6118 * alpha-tdep.c: Likewise.
6119 * arm-linux-tdep.c: Likewise.
6120 * m68k-linux-tdep.c: Likewise.
6121 * tilegx-tdep.c: Likewise.
6122 * xstormy16-tdep.c: Likewise.
6123
6124 2017-10-05 John Baldwin <jhb@FreeBSD.org>
6125
6126 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
6127 (mipsn32_fbsd_sigframe): Define.
6128 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
6129 for FreeBSD/mipsn32.
6130
6131 2017-10-05 John Baldwin <jhb@FreeBSD.org>
6132
6133 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
6134 AT_HWCAP.
6135
6136 2017-10-05 Tristan Gingold <tgingold@free.fr>
6137
6138 * MAINTAINERS (Misc): Update my email address.
6139
6140 2017-10-04 Pedro Alves <palves@redhat.com>
6141
6142 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
6143 it instead of target_gdbarch.
6144 (get_remote_state, get_remote_packet_size): Adjust
6145 get_remote_arch_state calls, passing down target_gdbarch
6146 explicitly.
6147 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
6148 'gdbarch' and use it instead of target_gdbarch.
6149 (get_memory_packet_size): Adjust get_remote_arch_state calls,
6150 passing down target_gdbarch explicitly.
6151 (struct stop_reply) <arch>: New field.
6152 (remote_parse_stop_reply): Use the stopped thread's architecture,
6153 not the current inferior's. Save the architecture in the
6154 stop_reply.
6155 (process_stop_reply): Use the stop reply's architecture.
6156 (process_g_packet, remote_fetch_registers)
6157 (remote_prepare_to_store, store_registers_using_G)
6158 (remote_store_registers): Adjust get_remote_arch_state calls,
6159 using the regcache's architecture.
6160 (remote_get_trace_status): Adjust get_remote_arch_state calls,
6161 passing down target_gdbarch explicitly.
6162 * spu-multiarch.c (spu_thread_architecture): Defer to the target
6163 beneath instead of calling target_gdbarch.
6164 * target.c (default_thread_architecture): Use the specified
6165 inferior's architecture, instead of the current inferior's
6166 architecture (via target_gdbarch).
6167
6168 2017-10-04 Pedro Alves <palves@redhat.com>
6169
6170 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
6171 case.
6172 (regcache_print): Handle !target_has_registers here instead.
6173
6174 2017-10-04 Pedro Alves <palves@redhat.com>
6175
6176 * frame.c (create_test_frame): Delete.
6177 * frame.h (create_test_frame): Delete.
6178 * gdbarch-selftests.c: Include gdbthread.h and target.h.
6179 (class regcache_test): Delete.
6180 (test_target_has_registers, test_target_has_stack)
6181 (test_target_has_memory, test_target_prepare_to_store)
6182 (test_target_store_registers): New functions.
6183 (test_target_ops): New class.
6184 (register_to_value_test): Error out if there's already a
6185 process_stratum (or higher) target pushed. Create a fuller mock
6186 environment, with mock target_ops, inferior, address space, thread
6187 and inferior_ptid.
6188 * progspace.c (struct address_space): Move to ...
6189 * progspace.h (struct address_space): ... here.
6190 * regcache.h (regcache::~regcache, regcache::raw_write)
6191 [GDB_SELF_TEST]: No longer virtual.
6192
6193 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
6194
6195 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
6196
6197 2017-10-04 Pedro Alves <palves@redhat.com>
6198
6199 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
6200 out of 'between TRY and CATCH'.
6201
6202 2017-10-04 Pedro Alves <palves@redhat.com>
6203
6204 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
6205 * common/common-exceptions.h (TRY): Open an outermost scope.
6206 Expand intro comment.
6207 (CATCH): Reindent.
6208 (END_CATCH): Close the outermost scope.
6209 * completer.c (complete_line_internal): Add missing END_CATCH.
6210
6211 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6212
6213 * NEWS (Changes since GDB 8.0): Add entry about new
6214 'set-cwd-on-gdbserver' feature.
6215 (New remote packets): Add entry for QSetWorkingDir.
6216 * common/common-inferior.h (set_inferior_cwd): New prototype.
6217 * infcmd.c (set_inferior_cwd): Remove "static".
6218 (show_cwd_command): Expand text to include remote debugging.
6219 * remote.c: Add PACKET_QSetWorkingDir.
6220 (remote_protocol_features) <QSetWorkingDir>: New entry for
6221 PACKET_QSetWorkingDir.
6222 (extended_remote_set_inferior_cwd): New function.
6223 (extended_remote_create_inferior): Call
6224 "extended_remote_set_inferior_cwd".
6225 (_initialize_remote): Call "add_packet_config_cmd" for
6226 QSetWorkingDir.
6227
6228 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6229
6230 * NEWS (New commands): Mention "set/show cwd".
6231 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
6232 "cd" command's help text.
6233 * common/common-inferior.h (get_inferior_cwd): New prototype.
6234 * infcmd.c (inferior_cwd_scratch): New global variable.
6235 (set_inferior_cwd): New function.
6236 (get_inferior_cwd): Likewise.
6237 (set_cwd_command): Likewise.
6238 (show_cwd_command): Likewise.
6239 (_initialize_infcmd): Add "set/show cwd" commands.
6240 * inferior.h (class inferior) <cwd>: New field.
6241 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
6242 (fork_inferior): Change inferior's cwd before its execution.
6243 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
6244 to CreateProcess.
6245
6246 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6247
6248 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
6249 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
6250 (COMMON_OBS): Add gdb_tilde_expand.o.
6251 * common/gdb_tilde_expand.c: New file.
6252 * common/gdb_tilde_expand.h: Likewise.
6253
6254 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
6255
6256 * gdbarch.sh (objfile): Remove duplicate declaration.
6257 * gdbarch.h: Regenerate.
6258
6259 2017-10-03 Tom Tromey <tom@tromey.com>
6260
6261 * utils.c (internal_vproblem): Use string_vprintf.
6262
6263 2017-10-03 Tom Tromey <tom@tromey.com>
6264
6265 * printcmd.c (info_symbol_command): Use std::string.
6266
6267 2017-10-03 Tom Tromey <tom@tromey.com>
6268
6269 * top.c (gdb_safe_append_history): Use std::string.
6270
6271 2017-10-03 Tom Tromey <tom@tromey.com>
6272
6273 * event-top.c (stdin_event_handler): Update.
6274 * main.c (captured_main_1): Update.
6275 * top.h (make_delete_ui_cleanup): Remove.
6276 (struct ui): Add constructor and destructor.
6277 (new_ui, delete_ui): Remove.
6278 * top.c (make_delete_ui_cleanup): Remove.
6279 (new_ui_command): Use std::unique_ptr.
6280 (delete_ui_cleanup): Remove.
6281 (ui::ui): Rename from new_ui. Update.
6282 (free_ui): Remove.
6283 (ui::~ui): Rename from delete_ui. Update.
6284
6285 2017-10-03 Tom Tromey <tom@tromey.com>
6286
6287 * symfile.c (load_progress): Use gdb::byte_vector.
6288
6289 2017-10-03 Tom Tromey <tom@tromey.com>
6290
6291 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6292 declaration.
6293 * printcmd.c (x_command): Remove unused declaration.
6294 * symfile.c (symbol_file_command): Remove unused declaration.
6295
6296 2017-10-03 Tom Tromey <tom@tromey.com>
6297
6298 * utils.c (internal_vproblem): Use std::string.
6299 (defaulted_query): Likewise.
6300
6301 2017-10-03 Tom Tromey <tom@tromey.com>
6302
6303 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6304 * top.c (execute_command_to_string): Update.
6305 * utils.c (make_cleanup_restore_page_info): Remove.
6306 (do_restore_page_info_cleanup): Remove.
6307 (set_batch_flag_and_restore_page_info):
6308 New.
6309 (make_cleanup_restore_page_info): Remove.
6310 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6311 (~set_batch_flag_and_restore_page_info): New
6312 (make_cleanup_restore_uinteger): Remove.
6313 (make_cleanup_restore_integer): Remove.
6314 (struct restore_integer_closure): Remove.
6315 (restore_integer): Remove.
6316 * utils.h (struct set_batch_flag_and_restore_page_info): New
6317 class.
6318 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6319 (make_cleanup_restore_page_info): Remove.
6320 (make_cleanup_restore_uinteger) Remove.
6321 (make_cleanup_restore_integer) Remove.
6322
6323 2017-10-03 Tom Tromey <tom@tromey.com>
6324
6325 * record-full.h (record_full_gdb_operation_disable_set): Return
6326 scoped_restore_tmpl<int>.
6327 * infrun.c (adjust_pc_after_break): Update.
6328 (handle_signal_stop): Update.
6329 * record-full.c (record_full_gdb_operation_disable_set): Return
6330 scoped_restore_tmpl<int>.
6331 (record_full_wait_1, record_full_insert_breakpoint)
6332 (record_full_remove_breakpoint, record_full_save)
6333 (record_full_goto_insn): Update.
6334
6335 2017-10-02 Tom Tromey <tom@tromey.com>
6336
6337 PR rust/22236:
6338 * rust-lang.c (rust_val_print_str): New function.
6339 (val_print_struct): Call it.
6340 (rust_subscript): Preserve name of slice type.
6341
6342 2017-10-02 Tom Tromey <tom@tromey.com>
6343
6344 * rust-lang.c (rust_subscript): Handle slices in
6345 EVAL_AVOID_SIDE_EFFECTS case.
6346
6347 2017-10-02 Tom Tromey <tom@tromey.com>
6348
6349 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6350
6351 2017-10-02 Tom Tromey <tom@tromey.com>
6352
6353 * rust-lang.h (rust_slice_type): Add "extern".
6354
6355 2017-10-02 Tom Tromey <tom@tromey.com>
6356 Pedro Alves <palves@redhat.com>
6357
6358 * ada-lang.h (ada_exc_info::operator<): Make const.
6359 (ada_exc_info::operator==): Make const.
6360 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6361 Make const.
6362
6363 2017-09-29 Tom Tromey <tom@tromey.com>
6364
6365 * target.c (read_whatever_is_readable): Change type of "result".
6366 Update.
6367 (free_memory_read_result_vector): Remove.
6368 (read_memory_robust): Change return type. Update.
6369 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6370 bin2hex, std::string.
6371 * target.h (memory_read_result_s): Remove typedef.
6372 (free_memory_read_result_vector): Remove.
6373 (read_memory_robust): Return std::vector.
6374
6375 2017-09-29 Tom Tromey <tom@tromey.com>
6376
6377 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6378
6379 2017-09-29 Tom Tromey <tom@tromey.com>
6380
6381 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6382 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6383 operator< and operator==.
6384 (ada_exceptions_list): Return a std::vector.
6385 * ada-lang.c (ada_exc_info::operator<): Rename from
6386 compare_ada_exception_info.
6387 (ada_exc_info::operator==): New.
6388 (sort_remove_dups_ada_exceptions_list): Change type of
6389 "exceptions".
6390 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6391 (ada_add_global_exceptions): Likewise.
6392 (ada_exceptions_list_1): Return a std::vector.
6393 (ada_exceptions_list): Likewise.
6394
6395 2017-09-29 Tom Tromey <tom@tromey.com>
6396
6397 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6398 'std::set *'.
6399 (print_one_inferior): Update.
6400 (free_vector_of_ints): Remove.
6401 (list_available_thread_groups): Change "ids" to std::set.
6402 (mi_cmd_list_thread_groups): Update.
6403 (struct collect_cores_data) <core>: Now a std::set.
6404 (collect_cores): Update.
6405 (unique): Remove.
6406 (print_one_inferior): Update.
6407
6408 2017-09-29 Tom Tromey <tom@tromey.com>
6409
6410 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6411 (mi_execute_async_cli_command): Likewise.
6412 (mi_cmd_trace_frame_collected): Use field_fmt.
6413
6414 2017-09-29 Tom Tromey <tom@tromey.com>
6415
6416 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6417 gdb::byte_vector.
6418
6419 2017-09-29 Tom Tromey <tom@tromey.com>
6420
6421 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6422
6423 2017-09-29 Tom Tromey <tom@tromey.com>
6424
6425 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6426
6427 2017-09-29 Tom Tromey <tom@tromey.com>
6428
6429 * varobj.h (varobj_gen_name): Return std::string.
6430 * varobj.c (varobj_gen_name): Return std::string.
6431 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6432 (mi_cmd_var_delete): Don't copy "name".
6433
6434 2017-09-29 Tom Tromey <tom@tromey.com>
6435
6436 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6437 (mi_cmd_break_insert_1): Update.
6438
6439 2017-09-29 Tom Tromey <tom@tromey.com>
6440
6441 * target.h (make_scoped_defer_target_commit_resume): Update.
6442 * target.c (make_scoped_defer_target_commit_resume): Rename from
6443 make_cleanup_defer_target_commit_resume. Return a
6444 scoped_restore.
6445 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6446
6447 2017-09-29 Tom Tromey <tom@tromey.com>
6448
6449 * main.c (captured_main_1): Remove unused declaration.
6450 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6451
6452 2017-09-29 Tom Tromey <tom@tromey.com>
6453
6454 * symtab.c (search_symbols): Remove unused outer cleanup.
6455 (make_source_files_completion_list): Remove unused declaration.
6456
6457 2017-09-29 Tom Tromey <tom@tromey.com>
6458
6459 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6460
6461 2017-09-29 Tom Tromey <tom@tromey.com>
6462
6463 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6464 gdb::byte_vector.
6465
6466 2017-09-29 Tom Tromey <tom@tromey.com>
6467
6468 * complaints.c (vcomplaint): Use std::string.
6469
6470 2017-09-29 Tom Tromey <tom@tromey.com>
6471
6472 * tracepoint.c (trace_variable_command): Use std::string.
6473 (encode_actions_1): Remove unused declarations.
6474 (create_tsv_from_upload): Use std::string.
6475
6476 2017-09-29 Tom Tromey <tom@tromey.com>
6477
6478 * cp-support.c (gdb_demangle): Use std::string.
6479
6480 2017-09-29 Tom Tromey <tom@tromey.com>
6481
6482 * stack.c (parse_frame_specification): Use std::string
6483 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6484
6485 2017-09-29 Tom Tromey <tom@tromey.com>
6486
6487 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6488
6489 2017-09-29 Tom Tromey <tom@tromey.com>
6490
6491 * utils.c (vfprintf_maybe_filtered): Use std::string.
6492 (vfprintf_unfiltered): Likewise.
6493
6494 2017-09-29 Tom Tromey <tom@tromey.com>
6495
6496 * event-top.c (top_level_prompt): Return std::string.
6497 (display_gdb_prompt): Update.
6498
6499 2017-09-29 Tom Tromey <tom@tromey.com>
6500
6501 * unittests/common-utils-selftests.c (format): New function.
6502 (string_vprintf_tests): New function.
6503 (_initialize_common_utils_selftests): Register new tests.
6504 * common/common-utils.c (string_vprintf): New function.
6505 * common/common-utils.h (string_vprintf): Declare.
6506
6507 2017-09-29 Pedro Alves <palves@redhat.com>
6508
6509 * common/rsp-low.c (unpack_varlen_hex): Constify.
6510 * common/rsp-low.h (unpack_varlen_hex): Constify.
6511 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6512 Constify.
6513 * remote.c (remote_set_permissions, read_ptid)
6514 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6515 (remote_static_tracepoint_marker_at)
6516 (remote_static_tracepoint_markers_by_strid)
6517 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6518 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6519 (parse_tracepoint_definition, parse_tsv_definition)
6520 (parse_static_tracepoint_marker_definition): Constify.
6521 * tracepoint.h (parse_static_tracepoint_marker_definition)
6522 (parse_trace_status, parse_tracepoint_status)
6523 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6524
6525 2017-09-29 Pedro Alves <palves@redhat.com>
6526
6527 * remote.c (target_buf, target_buf_size): Delete.
6528 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6529 Use the connection's packet buffer instead.
6530 All callers adjusted.
6531 (_initialize_remote): Remove references to target_buf and
6532 target_buf_size.
6533
6534 2017-09-28 Pedro Alves <palves@redhat.com>
6535
6536 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6537 unittests/common-utils-selftests.c.
6538 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6539 (COMMON_OBS): Remove utils-selftests.o.
6540 * utils-selftests.c: Move to ...
6541 * unittests/common-utils-selftests.c: ... here and rename self
6542 test to "string_printf".
6543
6544 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6545
6546 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6547 having NULL cus or tus.
6548
6549 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6550
6551 * arm-tdep.c: (convert_from_extended): Remove.
6552 (convert_to_extended): Likewise.
6553 (arm_extract_return_value): Use convert_typed_floating.
6554 (arm_store_return_value): Likewise.
6555
6556 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6557 * sh-tdep.c: Do not include "floatformat.h".
6558 (sh_littlebyte_bigword_type): New function.
6559 (sh_register_convert_to_virtual): Use convert_typed_floating.
6560 (sh_register_convert_to_raw): Likewise.
6561 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6562 (sh64_littlebyte_bigword_type): New function.
6563 (sh64_extract_return_value): Use convert_typed_floating.
6564 (sh64_register_convert_to_virtual): Likewise.
6565 (sh64_register_convert_to_raw): Likewise.
6566
6567 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6568
6569 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6570 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6571
6572 * gdbtypes.h (union type_specific): Make field floatformat hold
6573 just a single struct floatformat, not an array.
6574 (floatformat_from_type): Move here.
6575 * gdbtypes.c (floatformat_from_type): Move here. Update to
6576 changed TYPE_FLOATFORMAT definition.
6577 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6578 (recursive_dump_type): Likewise.
6579 (init_float_type): Install correct floatformat for byte order.
6580 (arch_float_type): Likewise.
6581
6582 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6583
6584 * gdbtypes.c (init_type): Change incoming argument from
6585 length-in-bytes to length-in-bits. Assert length is a
6586 multiple of TARGET_CHAR_BITS.
6587 (arch_type, arch_flags_type): Likewise.
6588 (init_integer_type): Update call to init_type.
6589 (init_character_type): Likewise.
6590 (init_boolean_type): Likewise.
6591 (init_float_type): Likewise.
6592 (init_decfloat_type): Likewise.
6593 (init_complex_type): Likewise.
6594 (init_pointer_type): Likewise.
6595 (objfile_type): Likewise.
6596 (arch_integer_type): Update call to arch_type.
6597 (arch_character_type): Likewise.
6598 (arch_boolean_type): Likewise.
6599 (arch_float_type): Likewise.
6600 (arch_decfloat_type): Likewise.
6601 (arch_complex_type): Likewise.
6602 (arch_pointer_type): Likewise.
6603 (gdbtypes_post_init): Likewise.
6604
6605 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6606 (read_base_type): Likewise.
6607 * mdebugread.c (basic_type): Likewise.
6608 * stabsread.c (dbx_init_float_type): Likewise.
6609 (rs6000_builtin_type): Likewise.
6610 (read_range_type): Likewise. Also, fix call to init_integer_type
6611 with erroneous length argument.
6612
6613 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6614 * d-lang.c (build_d_types): Likewise.
6615 * f-lang.c (build_fortran_types): Likewise.
6616 * go-lang.c (build_go_types): Likewise.
6617 * opencl-lang.c (build_opencl_types): Likewise.
6618 * jit.c (finalize_symtab): Likewise.
6619 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6620 (build_std_type_info_type): Likewise.
6621 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6622 update call to arch_flags_type.
6623
6624 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6625 arch_type.
6626 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6627 * windows-tdep.c (windows_get_tlb_type): Likewise.
6628
6629 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6630 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6631 * m32c-tdep.c (make_types): Likewise.
6632 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6633 (rl78_psw_type): Update call to arch_flags_type.
6634 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6635 * rx-tdep.c (rx_psw_type): Likewise.
6636 (rx_fpsw_type): Likewise.
6637 * sparc-tdep.c (sparc_psr_type): Likewise.
6638 (sparc_fsr_type): Likewise.
6639 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6640 (sparc64_ccr_type): Likewise.
6641 (sparc64_fsr_type): Likewise.
6642 (sparc64_fprs_type): Likewise.
6643
6644 2017-09-27 Tom Tromey <tom@tromey.com>
6645
6646 * findcmd.c (find_command): Constify.
6647
6648 2017-09-27 Tom Tromey <tom@tromey.com>
6649
6650 * ada-tasks.c (task_command_1, task_command): Constify.
6651
6652 2017-09-27 Tom Tromey <tom@tromey.com>
6653
6654 * symtab.c (maintenance_print_symbol_cache)
6655 (maintenance_flush_symbol_cache)
6656 (maintenance_print_symbol_cache_statistics): Constify.
6657
6658 2017-09-27 Tom Tromey <tom@tromey.com>
6659
6660 * inferior.c (detach_inferior_command, kill_inferior_command)
6661 (inferior_command): Constify.
6662
6663 2017-09-27 Tom Tromey <tom@tromey.com>
6664
6665 * regcache.c (regcache_print, maintenance_print_registers)
6666 (maintenance_print_raw_registers)
6667 (maintenance_print_cooked_registers)
6668 (maintenance_print_register_groups)
6669 (maintenance_print_remote_registers): Constify.
6670
6671 2017-09-27 Tom Tromey <tom@tromey.com>
6672
6673 * printcmd.c (map_display_numbers, undisplay_command)
6674 (enable_disable_display_command, enable_display_command)
6675 (disable_display_command): Constify.
6676
6677 2017-09-27 Tom Tromey <tom@tromey.com>
6678
6679 * breakpoint.h (delete_command): Don't declare.
6680 * breakpoint.c (delete_command, enable_once_command)
6681 (enable_count_command, enable_delete_command, breakpoint_1)
6682 (maintenance_info_breakpoints, stopin_command, stopat_command)
6683 (delete_command, delete_trace_command, save_breakpoints)
6684 (save_breakpoints_command, save_tracepoints_command): Constify.
6685
6686 2017-09-27 Tom Tromey <tom@tromey.com>
6687
6688 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6689 (skip_ws, extract_identifier, macro_define_command)
6690 (macro_undef_command, macro_list_command): Constify.
6691
6692 2017-09-27 Tom Tromey <tom@tromey.com>
6693
6694 * infcmd.c (environment_info, set_environment_command)
6695 (unset_environment_command, path_info, info_proc_cmd_1)
6696 (info_proc_cmd_mappings, info_proc_cmd_stat)
6697 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6698 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6699
6700 2017-09-27 Tom Tromey <tom@tromey.com>
6701
6702 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6703 Constify.
6704
6705 2017-09-27 Tom Tromey <tom@tromey.com>
6706
6707 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6708
6709 2017-09-27 Tom Tromey <tom@tromey.com>
6710
6711 * demangle.c (demangle_command): Constify.
6712
6713 2017-09-27 Tom Tromey <tom@tromey.com>
6714
6715 * progspace.c (maintenance_info_program_spaces_command):
6716 Constify.
6717
6718 2017-09-27 Tom Tromey <tom@tromey.com>
6719
6720 * compile/compile.c (check_raw_argument, compile_file_command)
6721 (compile_code_command, compile_print_command): Constify.
6722
6723 2017-09-27 Tom Tromey <tom@tromey.com>
6724
6725 * reggroups.c (maintenance_print_reggroups): Constify.
6726
6727 2017-09-27 Tom Tromey <tom@tromey.com>
6728
6729 * dwarf2read.c (save_gdb_index_command): Constify.
6730
6731 2017-09-27 Tom Tromey <tom@tromey.com>
6732
6733 * stap-probe.c (info_probes_stap_command): Constify.
6734
6735 2017-09-27 Tom Tromey <tom@tromey.com>
6736
6737 * fork-child.c (unset_exec_wrapper_command): Constify.
6738
6739 2017-09-27 Tom Tromey <tom@tromey.com>
6740
6741 * btrace.c (get_uint, get_context_size, no_chunk)
6742 (maint_btrace_packet_history_cmd)
6743 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6744 (maint_info_btrace_cmd): Constify.
6745
6746 2017-09-27 Tom Tromey <tom@tromey.com>
6747
6748 * reverse.c (delete_bookmark_command): Constify.
6749
6750 2017-09-27 Tom Tromey <tom@tromey.com>
6751
6752 * remote.c (set_memory_packet_size)
6753 (set_memory_write_packet_size, show_memory_write_packet_size)
6754 (set_memory_read_packet_size, show_memory_read_packet_size)
6755 (compare_sections_command, packet_command, remote_put_command)
6756 (remote_get_command, remote_delete_command): Constify.
6757
6758 2017-09-27 Tom Tromey <tom@tromey.com>
6759
6760 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6761 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6762 (set_mipsfpu_auto_command): Constify.
6763
6764 2017-09-27 Tom Tromey <tom@tromey.com>
6765
6766 * cli/cli-cmds.h (cd_command): Constify.
6767 * cli/cli-cmds.c (cd_command): Constify.
6768
6769 2017-09-27 Tom Tromey <tom@tromey.com>
6770
6771 * thread.c (thread_name_command, thread_find_command): Constify.
6772
6773 2017-09-27 Tom Tromey <tom@tromey.com>
6774
6775 * probe.c (enable_probes_command, disable_probes_command):
6776 Constify.
6777
6778 2017-09-27 Tom Tromey <tom@tromey.com>
6779
6780 * symfile.c (symbol_file_command): Constify.
6781 * gdbcore.h (deprecated_file_changed_hook): Constify.
6782 * exec.c (deprecated_file_changed_hook, exec_file_command)
6783 (file_command): Constify.
6784 * defs.h (symbol_file_command): Constify.
6785
6786 2017-09-27 Tom Tromey <tom@tromey.com>
6787
6788 * remote-fileio.c (set_system_call_allowed)
6789 (show_system_call_allowed): Constify.
6790
6791 2017-09-27 Tom Tromey <tom@tromey.com>
6792
6793 * tracepoint.c (delete_trace_variable_command)
6794 (tfind_end_command, tfind_start_command, tfind_pc_command)
6795 (tfind_tracepoint_command, tfind_line_command)
6796 (tfind_range_command, tfind_outside_command): Constify.
6797
6798 2017-09-27 Tom Tromey <tom@tromey.com>
6799
6800 * ax-gdb.c (maint_agent_printf_command, agent_command)
6801 (agent_eval_command): Constify.
6802
6803 2017-09-27 Tom Tromey <tom@tromey.com>
6804
6805 * tracepoint.c (info_scope_command): Constify.
6806 * python/python.c (gdbpy_decode_line): Constify.
6807 * python/py-breakpoint.c (bppy_init): Constify.
6808 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6809 * location.h: (new_linespec_location)
6810 (string_to_event_location_basic, string_to_event_location):
6811 Constify.
6812 * location.c (new_linespec_location)
6813 (string_to_event_location_basic, string_to_event_location):
6814 Constify.
6815 * linespec.h (decode_line_with_current_source)
6816 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6817 * linespec.c (linespec_lex_to_end)
6818 (decode_line_with_current_source)
6819 (decode_line_with_last_displayed): Constify.
6820 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6821 Constify.
6822 * cli/cli-cmds.c (edit_command, list_command): Constify.
6823 * breakpoint.h (until_break_command, watch_command_wrapper)
6824 (awatch_command_wrapper, rwatch_command_wrapper)
6825 (init_ada_exception_breakpoint): Constify.
6826 * breakpoint.c (break_command_1, dprintf_command)
6827 (break_range_command, watch_command_wrapper)
6828 (rwatch_command_wrapper, awatch_command_wrapper)
6829 (until_break_command, init_ada_exception_breakpoint)
6830 (strace_marker_create_sals_from_location, trace_command)
6831 (ftrace_command, strace_command, struct tracepoint): Constify.
6832 * ax-gdb.c (agent_command_1): Constify.
6833 * ada-lang.c (ada_exception_sal): Constify.
6834
6835 2017-09-27 Tom Tromey <tom@tromey.com>
6836
6837 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6838 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6839 (get_context_size, no_chunk, get_insn_history_modifiers)
6840 (cmd_record_insn_history, get_call_history_modifiers)
6841 (cmd_record_call_history): Constify.
6842
6843 2017-09-27 Tom Tromey <tom@tromey.com>
6844
6845 * source.c (show_substitute_path_command)
6846 (unset_substitute_path_command, set_substitute_path_command):
6847 Constify.
6848
6849 2017-09-27 Tom Tromey <tom@tromey.com>
6850
6851 * typeprint.c (maintenance_print_type): Constify.
6852 * maint.c (maintenance_dump_me, maintenance_demangle)
6853 (maintenance_time_display, maintenance_info_sections)
6854 (maintenance_print_statistics, maintenance_deprecate)
6855 (maintenance_undeprecate): Constify.
6856 (maintenance_do_deprecate): Constify. Use std::string.
6857 (maintenance_selftest): Constify.
6858 * gdbtypes.h (maintenance_print_type): Constify.
6859
6860 2017-09-27 Tom Tromey <tom@tromey.com>
6861
6862 * hppa-tdep.c (unwind_command): Constify.
6863
6864 2017-09-27 Tom Tromey <tom@tromey.com>
6865
6866 * target-descriptions.c (unset_tdesc_filename_cmd)
6867 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6868 Constify.
6869
6870 2017-09-27 Tom Tromey <tom@tromey.com>
6871
6872 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6873
6874 2017-09-27 Tom Tromey <tom@tromey.com>
6875
6876 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6877
6878 2017-09-27 Tom Tromey <tom@tromey.com>
6879
6880 * tui/tui-regs.c (tui_reg_command): Constify.
6881
6882 2017-09-27 Tom Tromey <tom@tromey.com>
6883
6884 * skip.c (skip_file_command, skip_function_command)
6885 (skip_enable_command, skip_disable_command, skip_delete_command):
6886 Constify.
6887
6888 2017-09-27 Tom Tromey <tom@tromey.com>
6889
6890 * record-btrace.c (cmd_record_btrace_bts_start)
6891 (cmd_record_btrace_pt_start): Constify.
6892
6893 2017-09-27 Tom Tromey <tom@tromey.com>
6894
6895 * symmisc.c (maintenance_print_symbols)
6896 (maintenance_print_msymbols, maintenance_print_objfiles)
6897 (maintenance_info_symtabs, maintenance_check_symtabs)
6898 (maintenance_expand_symtabs, maintenance_info_line_tables):
6899 Constify.
6900
6901 2017-09-27 Tom Tromey <tom@tromey.com>
6902
6903 * top.c (new_ui_command): Constify.
6904
6905 2017-09-27 Tom Tromey <tom@tromey.com>
6906
6907 * symfile.c (add_symbol_file_command)
6908 (remove_symbol_file_command, list_overlays_command)
6909 (map_overlay_command, unmap_overlay_command)
6910 (overlay_auto_command, overlay_manual_command)
6911 (overlay_off_command, overlay_load_command): Constify.
6912
6913 2017-09-27 Tom Tromey <tom@tromey.com>
6914
6915 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6916 (info_spu_mailbox_command, info_spu_dma_command)
6917 (info_spu_proxydma_command): Constify.
6918
6919 2017-09-27 Tom Tromey <tom@tromey.com>
6920
6921 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6922
6923 2017-09-27 Tom Tromey <tom@tromey.com>
6924
6925 * cli/cli-script.c (user_defined_command): Constify.
6926
6927 2017-09-27 Tom Tromey <tom@tromey.com>
6928
6929 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6930 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6931 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6932 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6933 (dump_binary_value, append_binary_memory, append_binary_value):
6934 Constify.
6935 (struct dump_context) <func>: Constify.
6936 (add_dump_command): Update.
6937
6938 2017-09-27 Tom Tromey <tom@tromey.com>
6939
6940 * cli/cli-cmds.c (show_version, show_configuration)
6941 (source_command, show_user): Constify.
6942
6943 2017-09-27 Tom Tromey <tom@tromey.com>
6944
6945 * target.c (maintenance_print_target_stack): Constify.
6946
6947 2017-09-27 Tom Tromey <tom@tromey.com>
6948
6949 * interps.c (interpreter_exec_cmd): Constify.
6950
6951 2017-09-27 Tom Tromey <tom@tromey.com>
6952
6953 * record-full.c (cmd_record_full_restore): Constify.
6954
6955 2017-09-27 Tom Tromey <tom@tromey.com>
6956
6957 * memattr.c (enable_mem_command, disable_mem_command)
6958 (delete_mem_command): Constify.
6959
6960 2017-09-27 Tom Tromey <tom@tromey.com>
6961
6962 * value.c (show_convenience): Constify.
6963
6964 2017-09-27 Tom Tromey <tom@tromey.com>
6965
6966 * gdbcore.h (core_file_command): Update.
6967 * corefile.c (core_file_command): Constify.
6968
6969 2017-09-27 Tom Tromey <tom@tromey.com>
6970
6971 * user-regs.c (maintenance_print_user_registers): Constify.
6972
6973 2017-09-27 Tom Tromey <tom@tromey.com>
6974
6975 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6976
6977 2017-09-27 Tom Tromey <tom@tromey.com>
6978
6979 * cp-support.c (first_component_command): Constify.
6980
6981 2017-09-27 Tom Tromey <tom@tromey.com>
6982
6983 * psymtab.c (maintenance_print_psymbols)
6984 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6985 Constify.
6986
6987 2017-09-27 Tom Tromey <tom@tromey.com>
6988
6989 * windows-tdep.c (display_tib): Constify.
6990
6991 2017-09-27 Tom Tromey <tom@tromey.com>
6992
6993 * linux-fork.c (delete_checkpoint_command)
6994 (detach_checkpoint_command): Constify.
6995
6996 2017-09-27 Tom Tromey <tom@tromey.com>
6997
6998 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6999
7000 2017-09-27 Tom Tromey <tom@tromey.com>
7001
7002 * arc-tdep.c (dump_arc_instruction_command): Constify.
7003
7004 2017-09-27 Tom Tromey <tom@tromey.com>
7005
7006 * valprint.c (set_radix, show_radix): Constify.
7007
7008 2017-09-27 Tom Tromey <tom@tromey.com>
7009
7010 * dtrace-probe.c (info_probes_dtrace_command): Constify.
7011
7012 2017-09-27 Tom Tromey <tom@tromey.com>
7013
7014 * command.h (not_just_help_class_command): Update.
7015 * cli/cli-decode.h (not_just_help_class_command): Update.
7016 * cli/cli-decode.c (not_just_help_class_command): Constify.
7017
7018 2017-09-27 Tom Tromey <tom@tromey.com>
7019
7020 * gdb_bfd.c (maintenance_info_bfds): Constify.
7021
7022 2017-09-27 Tom Tromey <tom@tromey.com>
7023
7024 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
7025 overloads.
7026 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
7027 (do_const_cfunc): New function.
7028 (cmd_cfunc_eq): New overload.
7029 (cli_user_command_p): Check do_const_cfunc.
7030 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
7031 const_cfunc.
7032 * command.h (add_cmd): Add const overload and no-function
7033 overload.
7034 (set_cmd_cfunc): Add const overload.
7035 (cmd_const_cfunc_ftype): Declare.
7036 (cmd_cfunc_eq): Add const overload.
7037 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
7038 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
7039 overload.
7040
7041 2017-09-27 Tom Tromey <tom@tromey.com>
7042
7043 * macroexp.c (get_next_token_for_substitution): New function.
7044 (substitute_args): Call it. Check for __VA_OPT__.
7045
7046 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
7047 Pedro Alves <palves@redhat.com>
7048
7049 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
7050 producer_is_icc_lt_14.
7051 (producer_is_icc_lt_14): New function.
7052 (check_producer): Add code for checking version of ICC.
7053 (producer_is_icc): Move to producer.c.
7054 (read_structure_type): Restrict ICC workaround to ICC<14.
7055 * producer.c: Include selftest.h.
7056 (producer_is_icc, producer_parsing_tests, _initialize_producer):
7057 New functions.
7058 * producer.h (producer_is_icc): New declaration.
7059
7060 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
7061
7062 * Makefile.in (SFILES): Add producer.c.
7063 (COMMON_OBS): Add producer.o
7064 * amd64-tdep.c (producer.h): Add new include.
7065 * dwarf2read.c (producer.h): Add new include.
7066 * producer.c: New file.
7067 * producer.h: New file.
7068 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
7069 producer.c.
7070 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
7071 producer.h.
7072
7073 2017-09-26 Matthias Klose <doko@ubuntu.com>
7074
7075 * configure.ac: Search ncursesw before ncurses.
7076 Check ncursesw/ncurses.h before ncurses/ncurses.h.
7077 * gdb_curses.h: Include <ncursesw/ncurses.h>
7078 * config.in, configure: Regenerate.
7079
7080 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7081
7082 PR gdb/22185
7083 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
7084 obsolete.
7085 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
7086 Remove i386sol2 support.
7087 * configure.nat <i386sol2>: Remove.
7088 <sol2-64>: Fold into ...
7089 <sol2>: ... this.
7090 Move common settings to default section.
7091 Add sol-thread.o.
7092 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
7093 x86_64-*-solaris2.1[0-9]*>: Rename to ...
7094 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
7095 <i[34567]86-*-solaris*>: Remove.
7096 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
7097
7098 * configure.ac: Remove wctype in libw check.
7099 (_MSE_INT_H): Don't define on Solaris 7-9.
7100 <solaris*>: Remove libthread_db.so.1 check.
7101 * configure: Regenerate.
7102 * config.in: Regenerate.
7103
7104 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
7105 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
7106 (gdb_ps_size_t): Remove.
7107 Use base types in users.
7108 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
7109
7110 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
7111
7112 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7113
7114 PR build/22206
7115 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
7116 (adi_is_addr_mapped): Likewise.
7117 (PSR_ICC): Don't redefine.
7118 (PSR_IMPL): Likewise.
7119
7120 2017-09-25 Tom Tromey <tom@tromey.com>
7121
7122 * regcache.c (regcache::dump): Use string_printf.
7123
7124 2017-09-25 Tom Tromey <tom@tromey.com>
7125
7126 * regcache.c (class regcache_invalidator): New.
7127 (struct register_to_invalidate): Remove.
7128 (make_cleanup_regcache_invalidate): Remove.
7129 (regcache::raw_write): Use regcache_invalidator.
7130
7131 2017-09-25 Tom Tromey <tom@tromey.com>
7132
7133 * spu-tdep.c (spu2ppu_sniffer): Update.
7134 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
7135 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
7136 Remove.
7137 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
7138 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
7139 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
7140 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
7141 (frame_pop): Update.
7142
7143 2017-09-25 Tom Tromey <tom@tromey.com>
7144
7145 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
7146 * regcache.h (regcache_xfree): Don't declare.
7147 * regcache.c (regcache_xfree): Remove.
7148 (do_regcache_xfree): Use delete.
7149 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
7150 * linux-fork.c (free_fork): Use delete.
7151 (fork_save_infrun_state): Likewise.
7152 * jit.c (jit_dealloc_cache): Use delete.
7153 * infrun.c (discard_infcall_suspend_state): Use delete.
7154
7155 2017-09-25 Tom Tromey <tom@tromey.com>
7156
7157 * regcache.h (regcache_xmalloc): Don't declare.
7158 (regcache_raw_set_cached_value): Update comment.
7159 * regcache.c (regcache_xmalloc): Remove.
7160 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
7161 * jit.c (jit_frame_sniffer): Use new.
7162 * frame.c (frame_save_as_regcache): Use new.
7163
7164 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7165
7166 * NEWS: Advertise support for guarded-storage registers on IBM z.
7167
7168 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7169
7170 * s390-linux-nat.c (have_regset_gs): New static variable.
7171 (s390_linux_fetch_inferior_registers): Handle guarded-storage
7172 control block and guarded-storage broadcast control regsets.
7173 (s390_read_description): Detect whether the target has
7174 guarded-storage support, return appropriate tdesc.
7175 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
7176 (features/s390x-gs-linux64.c): Likewise.
7177 (struct gdbarch_tdep) <have_gs>: New field.
7178 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
7179 (s390_gsbc_regset): New variables.
7180 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
7181 and s390_gsbc_regset, if applicable.
7182 (s390_core_read_description): Check whether core file was from a
7183 target with guarded-storage support; include appropriate regsets.
7184 (s390_gdbarch_init): Add registers for guarded-storage support.
7185 (_initialize_s390_tdep): Initialize new target descriptions that
7186 include registers for guarded-storage support.
7187 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
7188 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
7189 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
7190 (S390_NUM_REGS): Adjust macro definition.
7191 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
7192 (tdesc_s390x_gs_linux64): New declarations.
7193
7194 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7195
7196 * features/s390-gs-linux64.xml: New file.
7197 * features/s390-gs.xml: New file.
7198 * features/s390-gsbc.xml: New file.
7199 * features/s390x-gs-linux64.xml: New file.
7200 * features/Makefile (WHICH): Add s390-gs-linux64 and
7201 s390x-gs-linux64.
7202 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
7203 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
7204 * features/s390-gs-linux64.c: New generated file.
7205 * features/s390x-gs-linux64.c: New file.
7206 * regformats/s390-gs-linux64.dat: New file.
7207 * regformats/s390x-gs-linux64.dat: New file.
7208
7209 2017-09-23 Tom Tromey <tom@tromey.com>
7210
7211 * defs.h (make_cleanup_override_quit_handler): Don't declare.
7212
7213 2017-09-22 Tom Tromey <tom@tromey.com>
7214
7215 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
7216 type to scoped_restore_tmpl.
7217 <scoped_input_handler>: Initialize m_quit_handler directly.
7218
7219 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7220
7221 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
7222 (cd_command): Likewise. Free "current_directory" before
7223 assigning to it.
7224 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7225 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
7226 * top.c (gdb_dirbuf): Remove global declaration.
7227 * top.h (gdb_dirbuf): Likewise.
7228
7229 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7230
7231 * gnulib/aclocal.m4: Regenerate.
7232 * gnulib/config.in: Regenerate.
7233 * gnulib/configure: Regenerate.
7234 * gnulib/import/Makefile.am: Regenerate.
7235 * gnulib/import/Makefile.in: Regenerate.
7236 * gnulib/import/assure.h: New file.
7237 * gnulib/import/at-func.c: Likewise
7238 * gnulib/import/chdir-long.c: New file.
7239 * gnulib/import/chdir-long.h: New file.
7240 * gnulib/import/cloexec.c: New file.
7241 * gnulib/import/cloexec.h: New file.
7242 * gnulib/import/close.c: New file.
7243 * gnulib/import/closedir.c: New file.
7244 * gnulib/import/dirent-private.h: New file.
7245 * gnulib/import/dup-safer.c: New file.
7246 * gnulib/import/dup.c: New file.
7247 * gnulib/import/dup2.c: New file.
7248 * gnulib/import/error.c: New file.
7249 * gnulib/import/error.h: New file.
7250 * gnulib/import/exitfail.c: New file.
7251 * gnulib/import/exitfail.h: New file.
7252 * gnulib/import/fchdir.c: New file.
7253 * gnulib/import/fcntl.c: New file.
7254 * gnulib/import/fcntl.in.h: New file.
7255 * gnulib/import/fd-hook.c: New file.
7256 * gnulib/import/fd-hook.h: New file.
7257 * gnulib/import/fd-safer.c: New file.
7258 * gnulib/import/fdopendir.c: New file.
7259 * gnulib/import/filename.h: New file.
7260 * gnulib/import/filenamecat-lgpl.c: New file.
7261 * gnulib/import/filenamecat.h: New file.
7262 * gnulib/import/fstat.c: New file.
7263 * gnulib/import/fstatat.c: New file.
7264 * gnulib/import/getcwd-lgpl.c: New file.
7265 * gnulib/import/getcwd.c: New file.
7266 * gnulib/import/getdtablesize.c: New file.
7267 * gnulib/import/getlogin_r.c: New file.
7268 * gnulib/import/getprogname.c: New file.
7269 * gnulib/import/getprogname.h: New file.
7270 * gnulib/import/gettext.h: New file.
7271 * gnulib/import/glob-libc.h: New file.
7272 * gnulib/import/glob.c: New file.
7273 * gnulib/import/glob.in.h: New file.
7274 * gnulib/import/intprops.h: New file.
7275 * gnulib/import/m4/chdir-long.m4: New file.
7276 * gnulib/import/m4/close.m4: New file.
7277 * gnulib/import/m4/closedir.m4: New file.
7278 * gnulib/import/m4/d-ino.m4: New file.
7279 * gnulib/import/m4/d-type.m4: New file.
7280 * gnulib/import/m4/dup.m4: New file.
7281 * gnulib/import/m4/dup2.m4: New file.
7282 * gnulib/import/m4/error.m4: New file.
7283 * gnulib/import/m4/fchdir.m4: New file.
7284 * gnulib/import/m4/fcntl.m4: New file.
7285 * gnulib/import/m4/fcntl_h.m4: New file.
7286 * gnulib/import/m4/fdopendir.m4: New file.
7287 * gnulib/import/m4/filenamecat.m4: New file.
7288 * gnulib/import/m4/fstat.m4: New file.
7289 * gnulib/import/m4/fstatat.m4: New file.
7290 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7291 * gnulib/import/m4/getcwd-path-max.m4: New file.
7292 * gnulib/import/m4/getcwd.m4: New file.
7293 * gnulib/import/m4/getdtablesize.m4: New file.
7294 * gnulib/import/m4/getlogin_r.m4: New file.
7295 * gnulib/import/m4/getprogname.m4: New file.
7296 * gnulib/import/m4/glob.m4: New file.
7297 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7298 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7299 * gnulib/import/m4/mempcpy.m4: New file.
7300 * gnulib/import/m4/memrchr.m4: New file.
7301 * gnulib/import/m4/mode_t.m4: New file.
7302 * gnulib/import/m4/msvc-inval.m4: New file.
7303 * gnulib/import/m4/msvc-nothrow.m4: New file.
7304 * gnulib/import/m4/open.m4: New file.
7305 * gnulib/import/m4/openat.m4: New file.
7306 * gnulib/import/m4/opendir.m4: New file.
7307 * gnulib/import/m4/readdir.m4: New file.
7308 * gnulib/import/m4/realloc.m4: New file.
7309 * gnulib/import/m4/rewinddir.m4: New file.
7310 * gnulib/import/m4/save-cwd.m4: New file.
7311 * gnulib/import/m4/strdup.m4: New file.
7312 * gnulib/import/m4/strerror.m4: New file.
7313 * gnulib/import/m4/unistd-safer.m4: New file.
7314 * gnulib/import/mempcpy.c: New file.
7315 * gnulib/import/memrchr.c: New file.
7316 * gnulib/import/msvc-inval.c: New file.
7317 * gnulib/import/msvc-inval.h: New file.
7318 * gnulib/import/msvc-nothrow.c: New file.
7319 * gnulib/import/msvc-nothrow.h: New file.
7320 * gnulib/import/open.c: New file.
7321 * gnulib/import/openat-die.c: New file.
7322 * gnulib/import/openat-priv.h: New file.
7323 * gnulib/import/openat-proc.c: New file.
7324 * gnulib/import/openat.c: New file.
7325 * gnulib/import/openat.h: New file.
7326 * gnulib/import/opendir.c: New file.
7327 * gnulib/import/pipe-safer.c: New file.
7328 * gnulib/import/readdir.c: New file.
7329 * gnulib/import/realloc.c: New file.
7330 * gnulib/import/rewinddir.c: New file.
7331 * gnulib/import/save-cwd.c: New file.
7332 * gnulib/import/save-cwd.h: New file.
7333 * gnulib/import/strdup.c: New file.
7334 * gnulib/import/strerror-override.c: New file.
7335 * gnulib/import/strerror-override.h: New file.
7336 * gnulib/import/strerror.c: New file.
7337 * gnulib/import/unistd--.h: New file.
7338 * gnulib/import/unistd-safer.h: New file.
7339 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7340 "getcwd" and "glob".
7341 * ser-tcp.c: Undefine "close" before redefining it.
7342
7343 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7344
7345 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7346 get rid of res_val.
7347
7348 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7349
7350 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7351 <sol2,sparc>: Likewise.
7352 <sol2-64,i386>: Likewise.
7353
7354 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7355 -Wdeprecated-declarations on *-*-solaris*.
7356 * configure: Regenerate.
7357
7358 * procfs.c: Include "nat/inferior.h".
7359 (procfs_info_proc): Fix typo.
7360
7361 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7362
7363 * remote.c (vector): Include.
7364 (struct private_thread_info): Add field, thread_handle.
7365 (free_private_thread_info): Deallocate storage associated with
7366 thread handle.
7367 (get_private_info_thread): Initialize `thread_handle' field.
7368 (struct thread_item): Add field, thread_handle.
7369 (clear_threads_listing_context): Deallocate storage associated
7370 with thread handle.
7371 (start_thread): Add support for "handle" attribute.
7372 (thread_attributes): Add "handle".
7373 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7374 field.
7375 (remote_update_thread_list): Update thread_handle.
7376 (remote_thread_handle_to_thread_info): New function.
7377 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7378
7379 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7380
7381 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7382 function.
7383 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7384 * python/python-internal.h (thread_object_type): Declare.
7385
7386 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7387
7388 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7389 (target_thread_handle_to_thread_info): Declare.
7390 * target.c (target_thread_handle_to_thread_info): New function.
7391 * target-delegates.c: Regenerate.
7392 * gdbthread.h (find_thread_by_handle): Declare.
7393 * thread.c (find_thread_by_handle): New function.
7394 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7395 function.
7396 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7397
7398 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7399
7400 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7401
7402 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7405
7406 2017-09-21 Yao Qi <yao.qi@linaro.org>
7407
7408 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7409 to gdb_target_obs.
7410
7411 2017-09-20 Tom Tromey <tom@tromey.com>
7412
7413 * breakpoint.c (struct counted_command_line): Remove.
7414 (breakpoint_commands): Update.
7415 (alloc_counted_command_line, incref_counted_command_line)
7416 (decref_counted_command_line, do_cleanup_counted_command_line)
7417 (make_cleanup_decref_counted_command_line): Remove.
7418 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7419 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7420 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7421 (save_breakpoints): Update.
7422 * breakpoint.h (counted_command_line): Now a typedef to
7423 shared_ptr.
7424 (struct breakpoint) <commands>: Now a counted_command_line.
7425 (struct bpstats) <command>: Likewise.
7426
7427 2017-09-20 Tom Tromey <tom@tromey.com>
7428
7429 * breakpoint.c (struct commands_info, do_map_commands_command):
7430 Remove.
7431 (commands_command_1): Update.
7432 (iterate_over_related_breakpoints): Take a function_view.
7433 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7434 (delete_command): Update.
7435 (map_breakpoint_numbers): Take a function_view.
7436 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7437 (disable_command): Update.
7438 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7439 (enable_command): Update.
7440 (struct disp_data, do_enable_breakpoint_disp)
7441 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7442 (do_map_enable_delete_breakpoint): Remove.
7443 (enable_once_command, enable_count_command, enable_delete_command)
7444 (delete_trace_variable_command): Update.
7445
7446 2017-09-20 Tom Tromey <tom@tromey.com>
7447
7448 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7449 (bpstat_clear): Use delete.
7450 (bpstats): New constructors.
7451 (bpstat_copy, bpstat_stop_status): Use new.
7452 (dprintf_after_condition_true): Update.
7453 * breakpoint.h (bpstats::bpstats): Add constructors.
7454 (bpstats::~bpstats): Add destructor.
7455
7456 2017-09-20 Pedro Alves <palves@redhat.com>
7457
7458 * eval.c (make_params): Delete, refactored as ...
7459 (class fake_method): ... this new type's ctor.
7460 (fake_method::~fake_method): New.
7461 (evaluate_subexp_standard): Use 'fake_method'.
7462
7463 2017-09-20 Tom Tromey <tom@tromey.com>
7464
7465 * windows-nat.c (get_windows_debug_event, windows_wait)
7466 (do_initial_windows_stuff, windows_attach): Update.
7467 * utils.c (vwarning, internal_vproblem): Update.
7468 (ui_unregister_input_event_handler_cleanup)
7469 (prepare_to_handle_input): Remove.
7470 (class scoped_input_handler): New.
7471 (defaulted_query, prompt_for_continue): Update.
7472 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7473 Update.
7474 * top.c (undo_terminal_modifications_before_exit): Update.
7475 * target/target.h (target_terminal_init, target_terminal_inferior)
7476 (target_terminal_ours): Don't declare.
7477 (class target_terminal): New.
7478 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7479 (target_terminal_ours_for_output)
7480 (make_cleanup_restore_target_terminal): Don't declare.
7481 (target_terminal_info): Remove.
7482 * target.c (enum terminal_state, terminal_state): Remove.
7483 (target_terminal::terminal_state): Define.
7484 (target_terminal::init): Rename from target_terminal_init.
7485 (target_terminal::inferior): Rename from
7486 target_terminal_inferior.
7487 (target_terminal::ours): Rename from target_terminal_ours.
7488 (target_terminal::ours_for_output): Rename from
7489 target_terminal_ours_for_output.
7490 (target_terminal::info): New method.
7491 (cleanup_restore_target_terminal)
7492 (make_cleanup_restore_target_terminal): Remove.
7493 * solib.c (handle_solib_event): Update.
7494 * remote.c (remote_serial_quit_handler): Update.
7495 (remote_terminal_inferior, remote_wait_as): Update.
7496 * record-full.c (record_full_wait_1): Update.
7497 * nto-procfs.c (procfs_create_inferior): Update.
7498 * nat/fork-inferior.c (startup_inferior): Update.
7499 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7500 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7501 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7502 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7503 (mi_breakpoint_created, mi_breakpoint_deleted)
7504 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7505 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7506 (mi_user_selected_context_changed, report_initial_inferior):
7507 Update.
7508 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7509 (linux_nat_terminal_inferior): Update.
7510 * infrun.c (follow_fork_inferior)
7511 (handle_vfork_child_exec_or_exit, do_target_resume)
7512 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7513 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7514 Update.
7515 * inflow.c (child_terminal_init, info_terminal_command): Update.
7516 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7517 (attach_command): Update.
7518 * infcall.c (call_thread_fsm_should_stop): Update.
7519 * gnu-nat.c (gnu_attach): Update.
7520 * extension.c (struct active_ext_lang_state)
7521 (restore_active_ext_lang): Update.
7522 * exceptions.c (print_flush): Update.
7523 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7524 (struct quit_handler_cleanup_data, restore_quit_handler)
7525 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7526 Remove.
7527 * cp-support.c (gdb_demangle): Update.
7528 * breakpoint.c (update_inserted_breakpoint_locations)
7529 (insert_breakpoint_locations, handle_jit_event)
7530 (disable_breakpoints_in_unloaded_shlib): Update.
7531 * annotate.c (annotate_breakpoints_invalid)
7532 (annotate_frames_invalid): Update.
7533
7534 2017-09-20 Tom Tromey <tom@tromey.com>
7535
7536 * main.c (catch_command_errors): Rename from
7537 catch_command_errors_const.
7538 (captured_main_1): Update.
7539
7540 2017-09-20 Pedro Alves <palves@redhat.com>
7541
7542 * cli/cli-cmds.c (list_command): Use print_sal_location.
7543 (print_sal_location): New function.
7544 (ambiguous_line_spec): Use print_sal_location.
7545 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7546 * symtab.c (find_function_start_sal): Likewise.
7547 * symtab.h (symtab_and_line::symbol): New field.
7548
7549 2017-09-20 Pedro Alves <palves@redhat.com>
7550
7551 * linespec.c (minsym_found): Handle non-text minsyms.
7552 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7553
7554 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7555
7556 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7557 backslash.
7558
7559 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7560
7561 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7562 vmovups instead vmovaps.
7563 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7564
7565 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7566
7567 * NEWS (Changes since GDB 8.0): Add starti.
7568 * infcmd.c (enum run_break): New.
7569 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7570 case.
7571 (run_command): Use enum run_how.
7572 (start_command): Likewise.
7573 (starti_command): New function.
7574 (RUN_ARGS_HELP): New macro.
7575 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7576 commands. Add starti command.
7577
7578 2017-09-19 Yao Qi <yao.qi@linaro.org>
7579
7580 * Makefile.in (monitor.o): Remove the rule.
7581
7582 2017-09-19 Yao Qi <yao.qi@linaro.org>
7583
7584 * annotate.h (struct annotate_arg_emitter): Use
7585 DISABLE_COPY_AND_ASSIGN.
7586 * common/refcounted-object.h (refcounted_object): Likewise.
7587 * completer.h (struct completion_result): Likewise.
7588 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7589 * filename-seen-cache.h (filename_seen_cache): Likewise.
7590 * gdbcore.h (thread_section_name): Likewise.
7591 * gdb_regex.h (compiled_regex): Likewise.
7592 * gdbthread.h (scoped_restore_current_thread): Likewise.
7593 * inferior.h (scoped_restore_current_inferior): Likewise.
7594 * jit.c (jit_reader): Likewise.
7595 * linespec.h (struct linespec_result): Likewise.
7596 * mi/mi-parse.h (struct mi_parse): Likewise.
7597 * nat/fork-inferior.c (execv_argv): Likewise.
7598 * progspace.h (scoped_restore_current_program_space): Likewise.
7599 * python/python-internal.h (class gdbpy_enter): Likewise.
7600 * regcache.h (regcache): Likewise.
7601 * target-descriptions.c (struct tdesc_reg): Likewise.
7602 (struct tdesc_type): Likewise.
7603 (struct tdesc_feature): Likewise.
7604 * ui-out.h (ui_out_emit_type): Likewise.
7605
7606 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7607
7608 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7609 label abort_expression.
7610
7611 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7612
7613 * common/buffer.c (buffer_xml_printf): Adjust.
7614 * common/xml-utils.c (xml_escape_text): Change return type to
7615 std::string, update code accordingly.
7616 * common/xml-utils.h (xml_escape_text): Change return type to
7617 std::string.
7618 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7619 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7620 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7621 Adjust.
7622
7623 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7624
7625 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7626 (SUBDIR_UNITTESTS_OBS): Add new object file.
7627 * unittests/xml-utils-selftests.c: New file.
7628
7629 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7630
7631 * common/selftest.h (selftest): New struct/interface.
7632 (register_test): Add name parameter, add new overload.
7633 (run_tests): Add filter parameter.
7634 (for_each_selftest_ftype): New typedef.
7635 (for_each_selftest): New declaration.
7636 * common/selftest.c (tests): Change type to
7637 map<string, unique_ptr<selftest>>.
7638 (simple_selftest): New struct.
7639 (register_test): New function.
7640 (register_test): Add name parameter and use it.
7641 (run_tests): Add filter parameter and use it. Add prints.
7642 Adjust to vector -> map change.
7643 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7644 registering selftests.
7645 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7646 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7647 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7648 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7649 * findvar.c (_initialize_findvar): Likewise.
7650 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7651 * maint.c (maintenance_selftest): Update call to run_tests.
7652 (maintenance_info_selftests): New function.
7653 (_initialize_maint_cmds): Register "maintenance info selftests"
7654 command. Update "maintenance selftest" doc.
7655 * regcache.c (_initialize_regcache): Add names when registering
7656 selftests.
7657 * rust-exp.y (_initialize_rust_exp): Likewise.
7658 * selftest-arch.c (gdbarch_selftest): New struct.
7659 (gdbarch_tests): Remove.
7660 (register_test_foreach_arch): Add name parameter. Call
7661 register_test.
7662 (tests_with_arch): Remove, move most content to
7663 gdbarch_selftest::operator().
7664 (_initialize_selftests_foreach_arch): Remove.
7665 * selftest-arch.h (register_test_foreach_arch): Add name
7666 parameter.
7667 (run_tests_with_arch): New declaration.
7668 * utils-selftests.c (_initialize_utils_selftests): Add names
7669 when registering selftests.
7670 * utils.c (_initialize_utils): Likewise.
7671 * unittests/array-view-selftests.c
7672 (_initialize_array_view_selftests): Likewise.
7673 * unittests/environ-selftests.c (_initialize_environ_selftests):
7674 Likewise.
7675 * unittests/function-view-selftests.c
7676 (_initialize_function_view_selftests): Likewise.
7677 * unittests/offset-type-selftests.c
7678 (_initialize_offset_type_selftests): Likewise.
7679 * unittests/optional-selftests.c
7680 (_initialize_optional_selftests): Likewise.
7681 * unittests/scoped_restore-selftests.c
7682 (_initialize_scoped_restore_selftests): Likewise.
7683 * NEWS: Document "maintenance selftest" and "maint info
7684 selftests".
7685
7686 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7687
7688 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7689 scoped_restore.
7690
7691 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7692
7693 * mi/mi-main.c (mi_load_progress): Make uiout variable
7694 a unique_ptr.
7695
7696 2017-09-15 Pedro Alves <palves@redhat.com>
7697
7698 * compile/compile-c-types.c (convert_enum, convert_int)
7699 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7700
7701 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7702
7703 * dwarf2read.c (copy_string): Remove.
7704 (parse_macro_definition): Replace copy_string with savestring.
7705
7706 2017-09-15 Yao Qi <yao.qi@linaro.org>
7707
7708 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7709 gdb_target_obs.
7710 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7711 Likewise.
7712 (i[34567]86-*-linux*): Likewise.
7713
7714 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7715
7716 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7717 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7718 <stack>: Change type to std::vector.
7719 <stack_len, stack_allocated>: Remove.
7720 <grow_stack>: Remove.
7721 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7722 (dwarf_expr_context::~dwarf_expr_context): Remove.
7723 (dwarf_expr_context::grow_stack): Remove.
7724 (dwarf_expr_context::push): Adjust.
7725 (dwarf_expr_context::pop): Adjust.
7726 (dwarf_expr_context::fetch): Adjust.
7727 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7728 (dwarf_expr_context::stack_empty_p): Adjust.
7729 (dwarf_expr_context::execute_stack_op): Adjust.
7730
7731 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7732
7733 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7734 return type to bool.
7735 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7736
7737 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7738
7739 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7740 Change type to bool.
7741 (dwarf_stack_value) <in_stack_memory>: Likewise.
7742 (dwarf_expr_context) <push_address>: Change parameter type to
7743 bool.
7744 <fetch_in_stack_memory>: Change return type to bool.
7745 <push>: Change parameter type to bool.
7746 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7747 to bool.
7748 (dwarf_expr_context::push_address): Likewise.
7749 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7750 to bool.
7751 (dwarf_expr_context::execute_stack_op): Adjust.
7752 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7753
7754 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7755
7756 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7757 (struct dwarf_expr_context) <n_pieces>: Remove.
7758 <pieces>: Change type to std::vector.
7759 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7760 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7761 pieces.
7762 (dwarf_expr_context::add_piece): Adjust.
7763 * dwarf2loc.c (struct piece_closure): Initialize fields.
7764 <n_pieces>: Remove.
7765 <pieces>: Change type to std::vector.
7766 (allocate_piece_closure): Adjust, change parameter to
7767 std::vector rvalue and std::move it to piece_closure.
7768 (rw_pieced_value): Adjust.
7769 (check_pieced_synthetic_pointer): Adjust.
7770 (indirect_synthetic_pointer): Adjust.
7771 (coerce_pieced_ref): Adjust.
7772 (free_pieced_value_closure): Adjust. Use delete to free
7773 piece_closure.
7774 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7775 to allocate_piece_closure.
7776 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7777
7778 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7779
7780 * probe.h (probe_ops_cp): Remove typedef.
7781 (DEF_VEC_P (probe_ops_cp)): Remove.
7782 (all_probe_ops): Change type to std::vector.
7783 * probe.c (info_probes_for_ops): Adjust to vector change.
7784 (probe_linespec_to_ops): Likewise.
7785 (all_probe_ops): Change type to std::vector.
7786 (_initialize_probe): Adjust to vector change.
7787 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7788 * elfread.c (elf_get_probes): Likewise.
7789 * stap-probe.c (_initialize_stap_probe): Likewise.
7790
7791 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7792
7793 * probe.h (struct bound_probe): Define constructors.
7794 * probe.c (bound_probe_s): Remove typedef.
7795 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7796 (collect_probes): Change return type to std::vector, remove
7797 cleanup.
7798 (compare_probes): Return bool, change parameter type. Change
7799 semantic to "less than".
7800 (gen_ui_out_table_header_info): Change parameter to std::vector
7801 and update.
7802 (exists_probe_with_pops): Likewise.
7803 (info_probes_for_ops): Update to std::vector change.
7804 (enable_probes_command): Likewise.
7805 (disable_probes_command): Likewise.
7806
7807 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7808
7809 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7810 vec to std::vector.
7811 * probe.c (parse_probes_in_pspace): Update.
7812 (find_probes_in_objfile): Update.
7813 (find_probe_by_pc): Update.
7814 (collect_probes): Update.
7815 (probe_any_get_probes): Update.
7816 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7817 return type to reference to std::vector.
7818 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7819 std::vector and update.
7820 (dtrace_process_dof): Likewise.
7821 (dtrace_get_probes): Likewise.
7822 * elfread.c (elf_get_probes): Change return type to std::vector,
7823 store an std::vector in bfd_data.
7824 (probe_key_free): Update to std::vector.
7825 * stap-probe.c (handle_stap_probe): Change parameter to
7826 std::vector and update.
7827 (stap_get_probes): Likewise.
7828 * symfile-debug.c (debug_sym_get_probes): Change return type to
7829 std::vector and update.
7830
7831 2017-09-11 Tom Tromey <tom@tromey.com>
7832
7833 * breakpoint.c (program_breakpoint_here_p): Update.
7834 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7835 from make_show_memory_breakpoints_cleanup. Return a
7836 scoped_restore_tmpl<int>.
7837 (restore_show_memory_breakpoints): Remove.
7838 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7839 * mem-break.c (memory_validate_breakpoint): Update.
7840 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7841 (ia64_memory_remove_breakpoint): Update.
7842 (ia64_breakpoint_from_pc): Update.
7843 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7844 from make_show_memory_breakpoints_cleanup.
7845
7846 2017-09-11 Tom Tromey <tom@tromey.com>
7847
7848 * d-namespace.c (d_lookup_symbol): Use std::string.
7849 (find_symbol_in_baseclass): Likewise.
7850
7851 2017-09-11 Tom Tromey <tom@tromey.com>
7852
7853 * ctf.c (ctf_start): Use std::string.
7854
7855 2017-09-11 Tom Tromey <tom@tromey.com>
7856
7857 * ada-lang.c (is_known_support_routine): Update.
7858 (ada_unhandled_exception_name_addr_from_raise): Update.
7859 * guile/scm-frame.c (gdbscm_frame_name): Update.
7860 * python/py-frame.c (frapy_name): Update.
7861 (frapy_function): Update.
7862 * stack.h (find_frame_funname): Update.
7863 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7864 (print_frame): Update.
7865
7866 2017-09-11 Tom Tromey <tom@tromey.com>
7867
7868 * findcmd.c (put_bits): Take a gdb::byte_vector.
7869 (parse_find_args): Return gdb::byte_vector. "args" now const.
7870 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7871 cleanups.
7872 (find_command): Update.
7873
7874 2017-09-11 Tom Tromey <tom@tromey.com>
7875
7876 * cli/cli-script.c (class scoped_restore_hook_in): New.
7877 (clear_hook_in_cleanup): Remove.
7878 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7879 scoped_restore_hook_in.
7880
7881 2017-09-11 Tom Tromey <tom@tromey.com>
7882
7883 * cli/cli-script.c (restore_interp): Remove.
7884 (read_command_lines): Use scoped_restore_interp.
7885 * interps.c (scoped_restore_interp::set_temp): Rename from
7886 interp_set_temp.
7887 * interps.h (class scoped_restore_interp): New.
7888 (interp_set_temp): Remove.
7889
7890 2017-09-11 Tom Tromey <tom@tromey.com>
7891
7892 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7893 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7894 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7895 scoped_restore.
7896 (mi_cmd_break_insert_1): Update.
7897 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7898 scoped_restore.
7899
7900 2017-09-11 Tom Tromey <tom@tromey.com>
7901
7902 * demangle.c (demangle_command): Update.
7903 * breakpoint.c (disable_command): Update.
7904 (enable_command): Update.
7905 (find_location_by_number): Make "number" const. Use
7906 get_number_trailer.
7907 * cli/cli-utils.c (extract_arg): Return std::string.
7908 * probe.c (parse_probe_linespec): Update. Change types.
7909 (collect_probes): Take string arguments.
7910 (parse_probe_linespec): Likewise.
7911 (info_probes_for_ops): Update.
7912 (enable_probes_command): Update.
7913 (disable_probes_command): Update.
7914 * break-catch-sig.c (catch_signal_split_args): Update.
7915 * mi/mi-parse.c (mi_parse): Update.
7916
7917 2017-09-11 Tom Tromey <tom@tromey.com>
7918
7919 * language.h (language_enum): Make argument const.
7920 * language.c (language_enum): Make argument const.
7921
7922 2017-09-11 Tom Tromey <tom@tromey.com>
7923
7924 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7925 as function.
7926 (skip_to_space): Rename from skip_to_space_const.
7927 * common/common-utils.c (skip_to_space): New function.
7928 (skip_to_space): Rename from skip_to_space_const.
7929 * cli/cli-utils.h (get_number): Rename from get_number_const.
7930 (extract_arg): Rename from extract_arg_const.
7931 * cli/cli-utils.c (get_number): Rename from get_number_const.
7932 (extract_arg): Rename from extract_arg_const.
7933 (number_or_range_parser::get_number): Use ::get_number.
7934 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7935 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7936 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7937 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7938 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7939 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7940 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7941 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7942
7943 2017-09-11 Tom Tromey <tom@tromey.com>
7944
7945 * python/python.c (do_start_initialization): Use
7946 py-event-types.def to initialize types.
7947 Define all object type structures.
7948 * python/python-internal.h: Don't declare event initialization
7949 functions.
7950 * python/py-threadevent.c (thread_event_object_type): Don't
7951 define.
7952 * python/py-stopevent.c (stop_event_object_type): Don't define.
7953 * python/py-signalevent.c (signal_event_object_type): Don't
7954 declare or define.
7955 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7956 (clear_objfiles_event_object_type): Don't declare or define.
7957 * python/py-infevents.c (inferior_call_pre_event_object_type)
7958 (inferior_call_post_event_object_type)
7959 (register_changed_event_object_type)
7960 (memory_changed_event_object_type): Don't declare or define.
7961 * python/py-inferior.c (new_thread_event_object_type)
7962 (new_inferior_event_object_type)
7963 (inferior_deleted_event_object_type): Don't declare or define.
7964 * python/py-exitedevent.c (exited_event_object_type): Don't
7965 declare or define.
7966 * python/py-evts.c (gdbpy_initialize_py_events): Use
7967 py-all-events.def.
7968 * python/py-events.h (thread_event_object_type): Don't declare.
7969 (events_object): Use py-all-events.def.
7970 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7971 py-event-types.def.
7972 * python/py-event-types.def: New file.
7973 * python/py-continueevent.c (create_continue_event_object): Don't
7974 declare or define.
7975 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7976 declare or define.
7977 * python/py-all-events.def: New file.
7978
7979 2017-09-11 Tom Tromey <tom@tromey.com>
7980
7981 * python/py-threadevent.c (create_thread_event_object): Return
7982 gdbpy_ref.
7983 * python/py-stopevent.h (create_stop_event_object)
7984 (create_breakpoint_event_object, create_signal_event_object):
7985 Update.
7986 * python/py-stopevent.c (create_stop_event_object): Return
7987 gdbpy_ref.
7988 (emit_stop_event): Update.
7989 * python/py-signalevent.c (create_signal_event_object): Return
7990 gdbpy_ref.
7991 * python/py-infevents.c (create_inferior_call_event_object):
7992 Update.
7993 * python/py-event.h (create_event_object)
7994 (create_thread_event_object): Update.
7995 * python/py-event.c (create_event_object): Return gdbpy_ref.
7996 * python/py-continueevent.c: Return gdbpy_ref.
7997 * python/py-bpevent.c (create_breakpoint_event_object): Return
7998 gdbpy_ref.
7999
8000 2017-09-11 Tom Tromey <tom@tromey.com>
8001
8002 PR python/15622:
8003 * NEWS: Add entry.
8004 * python/python.c (do_start_initialization): Initialize new event
8005 types.
8006 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
8007 (gdbpy_initialize_inferior_deleted_event)
8008 (gdbpy_initialize_new_thread_event): Declare.
8009 * python/py-threadevent.c (create_thread_event_object): Add option
8010 "thread" parameter.
8011 * python/py-inferior.c (new_thread_event_object_type)
8012 (new_inferior_event_object_type)
8013 (inferior_deleted_event_object_type): Declare.
8014 (python_new_inferior, python_inferior_deleted): New functions.
8015 (add_thread_object): Emit new_thread event.
8016 (gdbpy_initialize_inferior): Attach new functions to corresponding
8017 observers.
8018 (new_thread, new_inferior, inferior_deleted): Define new event
8019 types.
8020 * python/py-evts.c (gdbpy_initialize_py_events): Add new
8021 registries.
8022 * python/py-events.h (events_object) <new_inferior,
8023 inferior_deleted, new_thread>: New fields.
8024 * python/py-event.h (create_thread_event_breakpoint): Add optional
8025 "thread" parameter.
8026
8027 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
8028
8029 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
8030 check current_ui instead.
8031 (internal_vproblem): Likewise.
8032
8033 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
8034
8035 * thread.c (print_thread_info_1): Remove unnecessary calls to
8036 uiout->is_mi_like_p.
8037
8038 2017-09-09 Tom Tromey <tom@tromey.com>
8039
8040 * namespace.h (add_using_directive): Update.
8041 * namespace.c (add_using_directive): Change type of excludes to
8042 std::vector.
8043 * dwarf2read.c (read_import_statement): Use std::vector.
8044 (read_namespace): Update.
8045 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
8046
8047 2017-09-09 Tom Tromey <tom@tromey.com>
8048
8049 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
8050
8051 2017-09-09 Tom Tromey <tom@tromey.com>
8052
8053 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
8054
8055 2017-09-09 Tom Tromey <tom@tromey.com>
8056
8057 * stack.c (func_command): Use gdb::def_vector.
8058
8059 2017-09-09 Tom Tromey <tom@tromey.com>
8060
8061 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
8062 ui_out_emit_list, ui_out_emit_tuple.
8063 (mi_cmd_var_update): Likewise.
8064
8065 2017-09-09 Tom Tromey <tom@tromey.com>
8066
8067 * mi/mi-interp.c (mi_user_selected_context_changed): Use
8068 ui_out_redirect_pop.
8069 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8070 ui_out_redirect_pop.
8071 * utils.c (do_ui_out_redirect_pop)
8072 (make_cleanup_ui_out_redirect_pop): Remove.
8073 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
8074 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
8075 * ui-out.h (ui_out_redirect_pop): New class.
8076
8077 2017-09-09 Tom Tromey <tom@tromey.com>
8078
8079 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
8080 (list_available_thread_groups, mi_cmd_list_thread_groups)
8081 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
8082 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
8083 Likewise.
8084
8085 2017-09-09 Tom Tromey <tom@tromey.com>
8086
8087 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
8088 ui_out_emit_tuple.
8089
8090 2017-09-09 Tom Tromey <tom@tromey.com>
8091
8092 * target.c (flash_erase_command): Use ui_out_emit_tuple.
8093 * stack.c (print_frame): Use ui_out_emit_tuple.
8094 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
8095 (info_spu_mailbox_command, info_spu_dma_command)
8096 (info_spu_proxydma_command): Likewise.
8097 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
8098 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
8099 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8100 ui_out_emit_tuple.
8101 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
8102
8103 2017-09-09 Tom Tromey <tom@tromey.com>
8104
8105 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
8106 (class ui_out_emit_table): Update comment.
8107 * ui-out.c (do_cleanup_table_end)
8108 (make_cleanup_ui_out_table_begin_end): Remove.
8109 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
8110 (info_spu_dma_cmdlist): Likewise.
8111 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
8112 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
8113 ui_out_emit_table.
8114
8115 2017-09-09 Tom Tromey <tom@tromey.com>
8116
8117 * thread.c (print_thread_info_1): Use ui_out_emit_table,
8118 ui_out_emit_list, gdb::optional.
8119
8120 2017-09-09 John Baldwin <jhb@FreeBSD.org>
8121
8122 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
8123 prototype.
8124 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
8125 prototype.
8126 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
8127 prototype.
8128 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
8129 * ada-exp.y: Remove _initialize_ada_exp prototype.
8130 * ada-lang.c: Remove _initialize_ada_language prototype.
8131 * ada-tasks.c: Remove _initialize_tasks prototype.
8132 * addrmap.c: Remove _initialize_addrmap prototype.
8133 * agent.c: Remove _initialize_agent prototype.
8134 * aix-thread.c: Remove _initialize_aix_thread prototype.
8135 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
8136 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
8137 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
8138 prototype.
8139 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
8140 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
8141 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
8142 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
8143 prototype.
8144 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
8145 prototype.
8146 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
8147 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
8148 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
8149 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
8150 prototype.
8151 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
8152 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
8153 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
8154 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
8155 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8156 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
8157 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
8158 prototype.
8159 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
8160 prototype.
8161 * annotate.c: Remove _initialize_annotate prototype.
8162 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
8163 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
8164 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
8165 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
8166 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
8167 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
8168 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
8169 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
8170 prototype.
8171 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
8172 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
8173 * auto-load.c: Remove _initialize_auto_load prototype.
8174 * auxv.c: Remove _initialize_auxv prototype.
8175 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
8176 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
8177 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
8178 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
8179 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
8180 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
8181 prototype.
8182 * break-catch-throw.c: Remove _initialize_break_catch_throw
8183 prototype.
8184 * breakpoint.c: Remove _initialize_breakpoint prototype.
8185 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
8186 * btrace.c: Remove _initialize_btrace prototype.
8187 * charset.c: Remove _initialize_charset prototype.
8188 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
8189 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
8190 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
8191 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
8192 * cli/cli-script.c: Remove _initialize_cli_script prototype.
8193 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
8194 * coffread.c: Remove _initialize_coffread prototype.
8195 * compile/compile.c: Remove _initialize_compile prototype.
8196 * complaints.c: Remove _initialize_complaints prototype.
8197 * completer.c: Remove _initialize_completer prototype.
8198 * copying.awk: Remove _initialize_copying prototype.
8199 * copying.c: Regenerate.
8200 * core-regset.c: Remove _initialize_core_regset prototype.
8201 * corefile.c: Remove _initialize_core prototype.
8202 * corelow.c: Remove _initialize_corelow prototype.
8203 * cp-abi.c: Remove _initialize_cp_abi prototype.
8204 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
8205 * cp-support.c: Remove _initialize_cp_support prototype.
8206 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
8207 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
8208 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
8209 * ctf.c: Remove _initialize_ctf prototype.
8210 * d-lang.c: Remove _initialize_d_language prototype.
8211 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
8212 prototype.
8213 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
8214 * dbxread.c: Remove _initialize_dbxread prototype.
8215 * dcache.c: Remove _initialize_dcache prototype.
8216 * demangle.c: Remove _initialize_demangler prototype.
8217 * disasm-selftests.c: Remove _initialize_disasm_selftests
8218 prototype.
8219 * disasm.c: Remove _initialize_disasm prototype.
8220 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
8221 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
8222 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
8223 prototype.
8224 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
8225 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
8226 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
8227 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
8228 * elfread.c: Remove _initialize_elfread prototype.
8229 * exec.c: Remove _initialize_exec prototype.
8230 * extension.c: Remove _initialize_extension prototype.
8231 * f-lang.c: Remove _initialize_f_language prototype.
8232 * f-valprint.c: Remove _initialize_f_valprint prototype.
8233 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
8234 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
8235 * filesystem.c: Remove _initialize_filesystem prototype.
8236 * findcmd.c: Remove _initialize_mem_search prototype.
8237 * fork-child.c: Remove _initialize_fork_child prototype.
8238 * frame-base.c: Remove _initialize_frame_base prototype.
8239 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
8240 * frame.c: Remove _initialize_frame prototype.
8241 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
8242 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
8243 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
8244 * gcore.c: Remove _initialize_gcore prototype.
8245 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
8246 * gdbarch.c: Regenerate.
8247 * gdbarch.sh: Remove _initialize_gdbarch prototype.
8248 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
8249 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
8250 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
8251 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
8252 * go-lang.c: Remove _initialize_go_language prototype.
8253 * go32-nat.c: Remove _initialize_go32_nat prototype.
8254 * guile/guile.c: Remove _initialize_guile prototype.
8255 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
8256 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
8257 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
8258 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
8259 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
8260 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
8261 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
8262 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
8263 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
8264 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
8265 prototype.
8266 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
8267 prototype.
8268 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8269 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8270 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8271 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8272 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8273 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8274 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8275 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8276 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8277 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8278 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8279 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8280 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8281 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8282 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8283 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8284 prototype.
8285 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8286 prototype.
8287 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8288 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8289 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8290 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8291 * infcall.c: Remove _initialize_infcall prototype.
8292 * infcmd.c: Remove _initialize_infcmd prototype.
8293 * inferior.c: Remove _initialize_inferiors prototype.
8294 * inflow.c: Remove _initialize_inflow prototype.
8295 * infrun.c: Remove _initialize_infrun prototype.
8296 * interps.c: Remove _initialize_interpreter prototype.
8297 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8298 * jit.c: Remove _initialize_jit prototype.
8299 * language.c: Remove _initialize_language prototype.
8300 * linux-fork.c: Remove _initialize_linux_fork prototype.
8301 * linux-nat.c: Remove _initialize_linux_nat prototype.
8302 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8303 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8304 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8305 * m2-lang.c: Remove _initialize_m2_language prototype.
8306 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8307 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8308 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8309 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8310 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8311 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8312 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8313 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8314 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8315 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8316 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8317 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8318 * machoread.c: Remove _initialize_machoread prototype.
8319 * macrocmd.c: Remove _initialize_macrocmd prototype.
8320 * macroscope.c: Remove _initialize_macroscope prototype.
8321 * maint.c: Remove _initialize_maint_cmds prototype.
8322 * mdebugread.c: Remove _initialize_mdebugread prototype.
8323 * memattr.c: Remove _initialize_mem prototype.
8324 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8325 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8326 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8327 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8328 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8329 * microblaze-linux-tdep.c: Remove
8330 _initialize_microblaze_linux_tdep prototype.
8331 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8332 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8333 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8334 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8335 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8336 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8337 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8338 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8339 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8340 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8341 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8342 prototype.
8343 * mipsread.c: Remove _initialize_mipsread prototype.
8344 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8345 prototype.
8346 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8347 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8348 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8349 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8350 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8351 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8352 prototype.
8353 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8354 * nto-procfs.c: Remove _initialize_procfs prototype.
8355 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8356 * objc-lang.c: Remove _initialize_objc_language prototype.
8357 * objfiles.c: Remove _initialize_objfiles prototype.
8358 * observer.c: Remove observer_test_first_notification_function,
8359 observer_test_second_notification_function,
8360 observer_test_third_notification_function, and
8361 _initialize_observer prototypes.
8362 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8363 * osabi.c: Remove _initialize_gdb_osabi prototype.
8364 * osdata.c: Remove _initialize_osdata prototype.
8365 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8366 * parse.c: Remove _initialize_parse prototype.
8367 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8368 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8369 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8370 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8371 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8372 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8373 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8374 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8375 * printcmd.c: Remove _initialize_printcmd prototype.
8376 * probe.c: Remove _initialize_probe prototype.
8377 * proc-api.c: Remove _initialize_proc_api prototype.
8378 * proc-events.c: Remove _initialize_proc_events prototype.
8379 * proc-service.c: Remove _initialize_proc_service prototype.
8380 * procfs.c: Remove _initialize_procfs prototype.
8381 * psymtab.c: Remove _initialize_psymtab prototype.
8382 * python/python.c: Remove _initialize_python prototype.
8383 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8384 * record-btrace.c: Remove _initialize_record_btrace prototype.
8385 * record-full.c: Remove _initialize_record_full prototype.
8386 * record.c: Remove _initialize_record prototype.
8387 * regcache.c: Remove _initialize_regcache prototype.
8388 * reggroups.c: Remove _initialize_reggroup prototype.
8389 * remote-notif.c: Remove _initialize_notif prototype.
8390 * remote-sim.c: Remove _initialize_remote_sim prototype.
8391 * remote.c: Remove _initialize_remote prototype.
8392 * reverse.c: Remove _initialize_reverse prototype.
8393 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8394 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8395 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8396 prototype.
8397 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8398 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8399 * rust-exp.y: Remove _initialize_rust_exp prototype.
8400 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8401 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8402 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8403 * score-tdep.c: Remove _initialize_score_tdep prototype.
8404 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8405 prototype.
8406 * ser-go32.c: Remove _initialize_ser_dos prototype.
8407 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8408 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8409 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8410 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8411 * serial.c: Remove _initialize_serial prototype.
8412 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8413 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8414 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8415 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8416 * skip.c: Remove _initialize_step_skip prototype.
8417 * sol-thread.c: Remove _initialize_sol_thread prototype.
8418 * solib-aix.c: Remove _initialize_solib_aix prototype.
8419 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8420 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8421 * solib-frv.c: Remove _initialize_frv_solib prototype.
8422 * solib-spu.c: Remove _initialize_spu_solib prototype.
8423 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8424 * solib-target.c: Remove _initialize_solib_target prototype.
8425 * solib.c: Remove _initialize_solib prototype.
8426 * source.c: Remove _initialize_source prototype.
8427 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8428 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8429 prototype.
8430 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8431 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8432 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8433 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8434 prototype.
8435 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8436 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8437 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8438 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8439 prototype.
8440 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8441 prototype.
8442 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8443 prototype.
8444 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8445 prototype.
8446 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8447 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8448 prototype.
8449 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8450 prototype.
8451 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8452 prototype.
8453 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8454 prototype.
8455 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8456 prototype.
8457 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8458 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8459 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8460 * stabsread.c: Remove _initialize_stabsread prototype.
8461 * stack.c: Remove _initialize_stack prototype.
8462 * stap-probe.c: Remove _initialize_stap_probe prototype.
8463 * std-regs.c: Remove _initialize_frame_reg prototype.
8464 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8465 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8466 * symfile.c: Remove _initialize_symfile prototype.
8467 * symmisc.c: Remove _initialize_symmisc prototype.
8468 * symtab.c: Remove _initialize_symtab prototype.
8469 * target-dcache.c: Remove _initialize_target_dcache prototype.
8470 * target-descriptions.c: Remove _initialize_target_descriptions
8471 prototype.
8472 * thread.c: Remove _initialize_thread prototype.
8473 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8474 prototype.
8475 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8476 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8477 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8478 prototype.
8479 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8480 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8481 * tracefile.c: Remove _initialize_tracefile prototype.
8482 * tracepoint.c: Remove _initialize_tracepoint prototype.
8483 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8484 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8485 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8486 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8487 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8488 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8489 * tui/tui.c: Remove _initialize_tui prototype.
8490 * typeprint.c: Remove _initialize_typeprint prototype.
8491 * user-regs.c: Remove _initialize_user_regs prototype.
8492 * utils.c: Remove _initialize_utils prototype.
8493 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8494 * valarith.c: Remove _initialize_valarith prototype.
8495 * valops.c: Remove _initialize_valops prototype.
8496 * valprint.c: Remove _initialize_valprint prototype.
8497 * value.c: Remove _initialize_values prototype.
8498 * varobj.c: Remove _initialize_varobj prototype.
8499 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8500 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8501 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8502 * windows-nat.c: Remove _initialize_windows_nat,
8503 _initialize_check_for_gdb_ini, and _initialize_loadable
8504 prototypes.
8505 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8506 * xcoffread.c: Remove _initialize_xcoffread prototype.
8507 * xml-support.c: Remove _initialize_xml_support prototype.
8508 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8509 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8510 prototype.
8511 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8512 prototype.
8513 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8514
8515 2017-09-08 Keith Seitz <keiths@redhat.com>
8516
8517 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8518 field.
8519
8520 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8521
8522 * f-valprint.c (f_val_print): Remove check for one byte
8523 sized integers. Remove printing of character type.
8524
8525 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8526 Christoph Weinmann <christoph.t.weinmann@intel.com>
8527 Bernhard Heckel <bernhard.heckel@intel.com>
8528
8529 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8530 to maintain proper indentation when printing pointers/refs.
8531
8532 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8533
8534 GDB 8.0.1 released.
8535
8536 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8537
8538 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8539
8540 2017-09-05 Tom Tromey <tom@tromey.com>
8541
8542 * parse.c (funcall_chain): Now a std::vector.
8543 (start_arglist, end_arglist): Simplify.
8544 (free_funcalls): Remove.
8545 (parse_exp_in_context_1): Remove cleanup.
8546
8547 2017-09-05 Tom Tromey <tom@tromey.com>
8548
8549 * go-exp.y (go_parse): Don't create a cleanup.
8550
8551 2017-09-05 Tom Tromey <tom@tromey.com>
8552
8553 * d-exp.y (PrimaryExpression): Use std::string.
8554 (d_parse): Don't create a cleanup.
8555
8556 2017-09-05 Tom Tromey <tom@tromey.com>
8557
8558 * utils.c (do_clear_parser_state): Remove.
8559 (make_cleanup_clear_parser_state): Remove.
8560 * p-exp.y (pascal_parse): Use scoped_restore.
8561 * m2-exp.y (m2_parse): Use scoped_restore.
8562 * f-exp.y (f_parse): Use scoped_restore.
8563 * d-exp.y (d_parse): Use scoped_restore.
8564 * c-exp.y (c_parse): Use scoped_restore.
8565 * ada-exp.y (ada_parse): Use scoped_restore.
8566 * utils.h (make_cleanup_clear_parser_state): Remove.
8567
8568 2017-09-06 Keith Seitz <keiths@redhat.com>
8569
8570 * dwarf2read.c (dw2_linkage_name_attr): New function.
8571 (dw2_linkage_name): New function.
8572 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8573 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8574 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8575
8576 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8577
8578 * config/djgpp/djconfig.sh: Correct shell portability issue.
8579
8580 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8581
8582 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8583
8584 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8585
8586 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8587 * NEWS: Mention new FreeBSD/mips native configuration.
8588 * configure.host: Add aarch64*-*-freebsd*.
8589 * configure.nat: Likewise.
8590 * aarch64-fbsd-nat.c: New file.
8591
8592 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8593
8594 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8595 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8596 * NEWS: Mention new FreeBSD/aarch64 target.
8597 * configure.tgt: Add aarch64*-*-freebsd*.
8598 * aarch64-fbsd-tdep.c: New file.
8599 * aarch64-fbsd-tdep.h: New file.
8600
8601 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8602
8603 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8604
8605 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8606
8607 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8608 of TLS symbols.
8609
8610 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8611
8612 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8613 call.
8614
8615 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8616
8617 * infrun.c (follow_exec): Call add_thread after
8618 target_find_description.
8619
8620 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8621
8622 * infrun.c (handle_inferior_event_1): When exec'ing, read
8623 stop_pc after follow_exec.
8624
8625 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8626
8627 * remote.c (process_g_packet): Update error message.
8628
8629 2017-09-05 Yao Qi <yao.qi@linaro.org>
8630
8631 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8632 targets.
8633
8634 2017-09-05 Pedro Alves <palves@redhat.com>
8635
8636 * eval.c (eval_call, evaluate_funcall): New functions, factored
8637 out from ...
8638 (evaluate_subexp_standard): ... this.
8639
8640 2017-09-05 Yao Qi <yao.qi@linaro.org>
8641
8642 * amd64-tdep.c (amd64_target_description): Create target
8643 descriptions.
8644 (_initialize_amd64_tdep): Don't call functions
8645 initialize_tdesc_amd64_*. Add self tests.
8646 * arch/amd64.c (amd64_create_target_description): Add parameter
8647 is_linux. Call set_tdesc_osabi if is_linux is true.
8648 * arch/amd64.h (amd64_create_target_description): Update the
8649 declaration.
8650 * arch/i386.c (i386_create_target_description): Add parameter
8651 is_linux. Call set_tdesc_osabi if is_linux is true.
8652 * arch/i386.h (i386_create_target_description): Update
8653 declaration.
8654 * configure.tgt: Add i386.o to gdb_target_obs.
8655 * features/Makefile (XMLTOC): Remove i386/*.xml.
8656 * features/i386/amd64-avx-avx512.c: Remove.
8657 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8658 * features/i386/amd64-avx-mpx.c: Remove.
8659 * features/i386/amd64-avx.c: Remove.
8660 * features/i386/amd64-mpx.c: Remove.
8661 * features/i386/amd64.c: Remove.
8662 * features/i386/i386-avx-avx512.c: Remove.
8663 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8664 * features/i386/i386-avx-mpx.c: Remove.
8665 * features/i386/i386-avx.c: Remove.
8666 * features/i386/i386-mmx.c: Remove.
8667 * features/i386/i386-mpx.c: Remove.
8668 * features/i386/i386.c: Remove.
8669 * i386-tdep.c: Don't include features/i386/i386*.c., include
8670 target-descriptions.h and arch/i386.h.
8671 (i386_target_description): Create target descriptions.
8672 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8673 functions. Do self tests.
8674
8675 2017-09-05 Yao Qi <yao.qi@linaro.org>
8676
8677 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8678 * features/i386/amd64-avx-avx512-linux.c: Removed.
8679 * features/i386/amd64-avx-linux.c: Removed.
8680 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8681 * features/i386/amd64-avx-mpx-linux.c: Removed.
8682 * features/i386/amd64-linux.c: Removed.
8683 * features/i386/amd64-mpx-linux.c: Removed.
8684 * features/i386/x32-avx-avx512-linux.c: Removed.
8685 * features/i386/x32-avx-linux.c: Removed.
8686 * features/i386/x32-linux.c: Removed.
8687
8688 2017-09-05 Yao Qi <yao.qi@linaro.org>
8689
8690 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8691 features/i386/*.c.
8692 (amd64_linux_read_description): Call
8693 amd64_create_target_description.
8694 * arch/amd64.c: New file.
8695 * arch/amd64.h: New file.
8696 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8697 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8698
8699 2017-09-05 Yao Qi <yao.qi@linaro.org>
8700
8701 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8702 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8703 (amd64_linux_read_description): Create target descriptions.
8704 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8705 functions. Add unit tests.
8706 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8707 x32-core.xml.
8708 * features/i386/64bit-avx.c: Generated.
8709 * features/i386/64bit-avx512.c: Generated.
8710 * features/i386/64bit-core.c: Generated.
8711 * features/i386/64bit-linux.c: Generated.
8712 * features/i386/64bit-mpx.c: Generated.
8713 * features/i386/64bit-pkeys.c: Generated.
8714 * features/i386/64bit-segments.c: Generated.
8715 * features/i386/64bit-sse.c: Generated.
8716 * features/i386/x32-core.c: Generated.
8717 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8718 c files for amd64-linux and x32-linux.
8719
8720 2017-09-05 Yao Qi <yao.qi@linaro.org>
8721
8722 * amd64-linux-tdep.c (amd64_linux_read_description): New
8723 function.
8724 (amd64_linux_core_read_description): Call
8725 amd64_linux_read_description.
8726 (amd64_linux_init_abi): Likewise.
8727 (amd64_x32_linux_init_abi): Likewise.
8728 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8729 * x86-linux-nat.c (x86_linux_read_description): Call
8730 amd64_linux_read_description.
8731
8732 2017-09-05 Yao Qi <yao.qi@linaro.org>
8733
8734 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8735 comments.
8736
8737 2017-09-05 Yao Qi <yao.qi@linaro.org>
8738
8739 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8740 * features/i386/i386-avx-avx512-linux.c: Remove.
8741 * features/i386/i386-avx-linux.c: Remove.
8742 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8743 * features/i386/i386-avx-mpx-linux.c: Remove.
8744 * features/i386/i386-linux.c: Remove.
8745 * features/i386/i386-mmx-linux.c: Remove.
8746 * features/i386/i386-mpx-linux.c: Remove.
8747
8748 2017-09-05 Yao Qi <yao.qi@linaro.org>
8749
8750 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8751 (SFILES): Add arch/i386.c.
8752 (HFILES_NO_SRCDIR): Add arch/i386.h.
8753 * arch/i386.c: New file.
8754 * arch/i386.h: New file.
8755 * arch/tdesc.h (allocate_target_description): Declare.
8756 (set_tdesc_architecture): Declare.
8757 (set_tdesc_osabi): Declare.
8758 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8759 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8760 include arch/i386.h.
8761 (i386_linux_read_description): Remove code and call
8762 i386_create_target_description.
8763 (set_tdesc_architecture): New function.
8764 (set_tdesc_osabi): New function.
8765 * target-descriptions.h (allocate_target_description): Remove.
8766
8767 2017-09-05 Yao Qi <yao.qi@linaro.org>
8768
8769 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8770 * target-descriptions.c (tdesc_create_feature): Likewise, and
8771 adjust code.
8772 * features/i386/32bit-avx.c: Re-generated.
8773 * features/i386/32bit-avx512.c: Re-generated.
8774 * features/i386/32bit-core.c: Re-generated.
8775 * features/i386/32bit-linux.c: Re-generated.
8776 * features/i386/32bit-mpx.c: Re-generated.
8777 * features/i386/32bit-pkeys.c: Re-generated.
8778 * features/i386/32bit-sse.c: Re-generated.
8779
8780 2017-09-05 Yao Qi <yao.qi@linaro.org>
8781
8782 * regformats/regdef.h (struct reg): Override operator == and !=.
8783
8784 2017-09-05 Yao Qi <yao.qi@linaro.org>
8785
8786 * arch/tdesc.h: New file.
8787 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8788 * target-descriptions.c: Update comments.
8789 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8790 declarations.
8791 * features/i386/32bit-avx.c: Re-generated.
8792 * features/i386/32bit-avx512.c: Re-generated.
8793 * features/i386/32bit-core.c: Re-generated.
8794 * features/i386/32bit-linux.c: Re-generated.
8795 * features/i386/32bit-mpx.c: Re-generated.
8796 * features/i386/32bit-pkeys.c: Re-generated.
8797 * features/i386/32bit-sse.c: Re-generated.
8798
8799 2017-09-05 Yao Qi <yao.qi@linaro.org>
8800
8801 * regformats/regdat.sh: Update generated code.
8802
8803 2017-09-05 Yao Qi <yao.qi@linaro.org>
8804
8805 * regformats/regdat.sh: Adjust code order.
8806
8807 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8808
8809 * expprint.c (dump_subexp_body_standard): Use constant format
8810 string in fprintf_filtered call.
8811
8812 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8813
8814 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8815 NetBSD/i386.
8816 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8817
8818 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8819
8820 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8821
8822 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8823
8824 * bsd-kvm.o: Define _KMEMUSER.
8825 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8826 * configure: Regenerate.
8827
8828 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8829
8830 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8831 * i386-fbsd-nat.c: Likewise.
8832
8833 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8834
8835 * unittests/array-view-selftests.c: Add include of <array>.
8836
8837 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8838
8839 * spu-tdep.c (flush_ea_cache): Add missing argument to
8840 call_function_by_hand.
8841
8842 2017-09-04 Pedro Alves <palves@redhat.com>
8843
8844 * NEWS (Safer support for debugging with no debug info): New.
8845
8846 2017-09-04 Pedro Alves <palves@redhat.com>
8847
8848 * c-exp.y (function_method, function_method_void): Add current
8849 instance flags to TYPE_INSTANCE.
8850 * dwarf2read.c (check_modifier): New.
8851 (compute_delayed_physnames): Assert that only C++ adds delayed
8852 physnames. Mark fn_fields as const/volatile depending on
8853 physname.
8854 * eval.c (make_params): New type_instance_flags parameter. Use
8855 it as the new type's instance flags.
8856 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8857 flags element and pass it to make_params.
8858 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8859 instance flags element.
8860 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8861 * gdbtypes.h: Include "enum-flags.h".
8862 (type_instance_flags): New enum-flags type.
8863 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8864 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8865 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8866 (follow_type_instance_flags): New function.
8867 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8868 * parser-defs.h (follow_type_instance_flags): Declare.
8869 * valops.c (value_struct_elt_for_reference): const/volatile must
8870 match too.
8871
8872 2017-09-04 Pedro Alves <palves@redhat.com>
8873
8874 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8875 function/method scopes; lookup the nested name as a function local
8876 static variable.
8877
8878 2017-09-04 Pedro Alves <palves@redhat.com>
8879
8880 (%type <voidval>): Add function_method.
8881 * c-exp.y (exp): New production for calls with no arguments.
8882 (function_method, function_method_void_or_typelist): New
8883 productions.
8884 (exp): New production for "method()::static_var".
8885 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8886 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8887 Handle OP_FUNC_STATIC_VAR.
8888 * parse.c (operator_length_standard):
8889 Handle OP_FUNC_STATIC_VAR.
8890
8891 2017-09-04 Pedro Alves <palves@redhat.com>
8892
8893 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8894 handling.
8895 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8896 Ditto.
8897 * parse.c (operator_length_standard, operator_check_standard):
8898 Ditto.
8899 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8900
8901 2017-09-04 Pedro Alves <palves@redhat.com>
8902
8903 * ax-gdb.c: Include "typeprint.h".
8904 (gen_expr_for_cast): New function.
8905 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8906 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8907 type is unknown.
8908 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8909 nodebug_data_symbol.
8910 * eval.c: Include "typeprint.h".
8911 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8912 Error out if symbol has unknown type.
8913 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8914 evaluate_subexp_for_cast.
8915 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8916 OP_VAR_MSYM_VALUE.
8917 (evaluate_subexp_for_cast): New function.
8918 * gdbtypes.c (init_nodebug_var_type): New function.
8919 (objfile_type): Use it to initialize types of variables with no
8920 debug info.
8921 * typeprint.c (error_unknown_type): New.
8922 * typeprint.h (error_unknown_type): New declaration.
8923 * compile/compile-c-types.c (convert_type_basic): Handle
8924 TYPE_CODE_ERROR; warn and fallback to int for variables with
8925 unknown type.
8926
8927 2017-09-04 Pedro Alves <palves@redhat.com>
8928
8929 * eval.c (evaluate_var_value): New function, factored out from ...
8930 (evaluate_subexp_standard): ... here.
8931
8932 2017-09-04 Pedro Alves <palves@redhat.com>
8933
8934 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8935 Remove useless assignments to 'op'.
8936
8937 2017-09-04 Pedro Alves <palves@redhat.com>
8938
8939 * eval.c (eval_skip_value): New function.
8940 (evaluate_subexp_standard): Use it.
8941
8942 2017-09-04 Pedro Alves <palves@redhat.com>
8943
8944 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8945 function name from symbol/minsym and pass it to
8946 error_call_unknown_return_type.
8947
8948 2017-09-04 Pedro Alves <palves@redhat.com>
8949
8950 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8951 * ax-gdb.c (gen_msym_var_ref): New function.
8952 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8953 * eval.c (evaluate_var_msym_value): New function.
8954 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8955 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8956 to call_function_by_hand.
8957 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8958 Handle OP_VAR_MSYM_VALUE.
8959 (union exp_element) <msymbol>: New field.
8960 * minsyms.h (struct type): Forward declare.
8961 (find_minsym_type_and_address): Declare.
8962 * parse.c (write_exp_elt_msym): New function.
8963 (write_exp_msymbol): Delete, refactored as ...
8964 (find_minsym_type_and_address): ... this new function.
8965 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8966 (operator_length_standard, operator_check_standard): Handle
8967 OP_VAR_MSYM_VALUE.
8968 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8969
8970 2017-09-04 Pedro Alves <palves@redhat.com>
8971
8972 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8973 TYPE_GNU_IFUNC specially here. Throw error if return type is
8974 unknown.
8975 * ada-typeprint.c (print_func_type): Handle functions with unknown
8976 return type.
8977 * c-typeprint.c (c_type_print_base): Handle functions and methods
8978 with unknown return type.
8979 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8980 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8981 * compile/compile-c-types.c: Include "objfiles.h".
8982 (convert_func): For functions with unknown return type, warn and
8983 default to int.
8984 * compile/compile-object-run.c (compile_object_run): Adjust call
8985 to call_function_by_hand_dummy.
8986 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8987 call_function_by_hand.
8988 * eval.c (evaluate_subexp_standard): Adjust calls to
8989 call_function_by_hand. Handle functions and methods with unknown
8990 return type. Pass expect_type to call_function_by_hand.
8991 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8992 return type.
8993 * gcore.c (call_target_sbrk): Adjust call to
8994 call_function_by_hand.
8995 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8996 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8997 an integer address type instead of nodebug.
8998 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8999 call_function_by_hand.
9000 * infcall.c (error_call_unknown_return_type): New function.
9001 (call_function_by_hand): New "default_return_type" parameter.
9002 Pass it down.
9003 (call_function_by_hand_dummy): New "default_return_type"
9004 parameter. Use it instead of defaulting to int. If there's no
9005 default and the return type is unknown, throw an error. If
9006 there's a default return type, and the called function has no
9007 debug info, then assume the function is prototyped.
9008 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
9009 New "default_return_type" parameter.
9010 (error_call_unknown_return_type): New declaration.
9011 * linux-fork.c (call_lseek): Cast return type of lseek.
9012 (inferior_call_waitpid, checkpoint_command): Adjust calls to
9013 call_function_by_hand.
9014 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
9015 calls to call_function_by_hand.
9016 * m2-typeprint.c (m2_procedure): Handle functions with unknown
9017 return type.
9018 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9019 (value_nsstring, print_object_command): Adjust calls to
9020 call_function_by_hand.
9021 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
9022 functions with unknown return type.
9023 (pascal_type_print_func_varspec_suffix): New function.
9024 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
9025 TYPE_CODE_METHOD>: Use it.
9026 * python/py-value.c (valpy_call): Adjust call to
9027 call_function_by_hand.
9028 * rust-lang.c (rust_evaluate_funcall): Adjust call to
9029 call_function_by_hand.
9030 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
9031 call_function_by_hand.
9032 * valops.c (value_allocate_space_in_inferior): Adjust call to
9033 call_function_by_hand.
9034 * typeprint.c (type_print_unknown_return_type): New function.
9035 * typeprint.h (type_print_unknown_return_type): New declaration.
9036
9037 2017-09-04 Pedro Alves <palves@redhat.com>
9038
9039 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
9040 types with more than one parameter as prototyped.
9041
9042 2017-09-04 Pedro Alves <palves@redhat.com>
9043
9044 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
9045 (disassemble_command): Use gdb_disassembly_flags instead of bare
9046 int.
9047 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
9048 (dump_insns, do_mixed_source_and_assembly_deprecated)
9049 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
9050 Use gdb_disassembly_flags instead of bare int.
9051 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
9052 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
9053 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
9054 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
9055 (enum gdb_disassembly_flag): ... values of this new enumeration.
9056 (gdb_disassembly_flags): Define.
9057 (gdb_disassembly)
9058 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
9059 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
9060 gdb_disassembly_flags instead of bare int.
9061 * record-btrace.c (btrace_insn_history)
9062 (record_btrace_insn_history, record_btrace_insn_history_range)
9063 (record_btrace_insn_history_from): Use gdb_disassembly_flags
9064 instead of bare int.
9065 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
9066 Use gdb_disassembly_flags instead of bare int.
9067 * target-debug.h (target_debug_print_gdb_disassembly_flags):
9068 Define.
9069 * target-delegates.c: Regenerate.
9070 * target.c (target_insn_history, target_insn_history_from)
9071 (target_insn_history_range): Use gdb_disassembly_flags instead of
9072 bare int.
9073 * target.h: Include "disasm.h".
9074 (struct target_ops) <to_insn_history, to_insn_history_from,
9075 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
9076 int.
9077 (target_insn_history, target_insn_history_from)
9078 (target_insn_history_range): Use gdb_disassembly_flags instead of
9079 bare int.
9080
9081 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9082
9083 * cli/cli-script.c (build_command_line): For if/while commands,
9084 check whether args is empty.
9085
9086 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9087
9088 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
9089 (enum command_control_type): Likewise.
9090 (struct command_line): Likewise.
9091 (free_command_lines): Likewise.
9092 (struct command_lines_deleter): Likewise.
9093 (command_line_up): Likewise.
9094 (read_command_lines): Likewise.
9095 (read_command_lines_1): Likewise.
9096 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
9097 (enum command_control_type): Likewise.
9098 (struct command_line): Likewise.
9099 (free_command_lines): Likewise.
9100 (struct command_lines_deleter): Likewise.
9101 (command_line_up): Likewise.
9102 (read_command_lines): Likewise.
9103 (read_command_lines_1): Likewise.
9104 * breakpoint.h: Include cli/cli-script.h.
9105 * extension-priv.h: Likewise.
9106 * gdbcmd.h: Likewise.
9107
9108 2017-09-04 Pedro Alves <palves@redhat.com>
9109
9110 * ada-lang.c (is_known_support_routine): Move sal declaration to
9111 where it is initialized.
9112 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
9113 (parse_breakpoint_sals, decode_static_tracepoint_spec)
9114 (clear_command, update_static_tracepoint): Remove init_sal
9115 references. Move declarations closer to initializations.
9116 * cli/cli-cmds.c (list_command): Move sal declarations closer to
9117 initializations.
9118 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
9119 references. Move sal declarations closer to initializations.
9120 * frame.c (find_frame_sal): Return a symtab_and_line via function
9121 return instead of output parameter. Remove init_sal references.
9122 * frame.h (find_frame_sal): Return a symtab_and_line via function
9123 return instead of output parameter.
9124 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
9125 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
9126 instead of memset.
9127 (gdbscm_find_pc_line): Remove init_sal reference.
9128 * infcall.c (call_function_by_hand_dummy): Remove init_sal
9129 references. Move declarations closer to initializations.
9130 * infcmd.c (set_step_frame): Update. Move declarations closer to
9131 initializations.
9132 (finish_backward): Remove init_sal references. Move declarations
9133 closer to initializations.
9134 * infrun.c (process_event_stop_test, handle_step_into_function)
9135 (insert_hp_step_resume_breakpoint_at_frame)
9136 (insert_step_resume_breakpoint_at_caller): Likewise.
9137 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
9138 (symbol_to_sal): Likewise.
9139 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
9140 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
9141 to its initialization.
9142 * reverse.c (save_bookmark_command): Use new/delete. Remove
9143 init_sal references. Move declarations closer to initializations.
9144 * source.c (get_current_source_symtab_and_line): Remove brace
9145 initialization.
9146 (set_current_source_symtab_and_line): Now takes the sal by const
9147 reference. Remove brace initialization.
9148 (line_info): Remove init_sal reference.
9149 * source.h (set_current_source_symtab_and_line): Now takes a
9150 symtab_and_line via const reference.
9151 * stack.c (set_current_sal_from_frame): Adjust.
9152 (print_frame_info): Adjust.
9153 (get_last_displayed_sal): Return the sal via function return
9154 instead of via output parameter. Simplify.
9155 (frame_info): Adjust.
9156 * stack.h (get_last_displayed_sal): Return the sal via function
9157 return instead of via output parameter.
9158 * symtab.c (init_sal): Delete.
9159 (find_pc_sect_line): Remove init_sal references. Move
9160 declarations closer to initializations.
9161 (find_function_start_sal): Remove init_sal references. Move
9162 declarations closer to initializations.
9163 * symtab.h (struct symtab_and_line): In-class initialize all
9164 fields.
9165 * tracepoint.c (set_traceframe_context)
9166 (print_one_static_tracepoint_marker): Remove init_sal references.
9167 Move declarations closer to initializations.
9168 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
9169 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
9170 declarations closer to initializations.
9171 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
9172 init_sal references. Adjust.
9173
9174 2017-09-04 Pedro Alves <palves@redhat.com>
9175
9176 * ax-gdb.c (agent_command_1): Use range-for.
9177 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9178 * breakpoint.c: Include "common/array-view.h".
9179 (init_breakpoint_sal, create_breakpoint_sal): Change sals
9180 parameter from struct symtabs_and_lines to
9181 array_view<symtab_and_line>. Adjust. Use range-for. Update.
9182 (breakpoint_sals_to_pc): Change sals parameter from struct
9183 symtabs_and_lines to std::vector reference.
9184 (check_fast_tracepoint_sals): Change sals parameter from struct
9185 symtabs_and_lines to std::array_view. Use range-for.
9186 (decode_static_tracepoint_spec): Return a std::vector instead of
9187 symtabs_and_lines. Update.
9188 (create_breakpoint): Update.
9189 (break_range_command, until_break_command, clear_command): Update.
9190 (base_breakpoint_decode_location, bkpt_decode_location)
9191 (bkpt_probe_create_sals_from_location)
9192 (bkpt_probe_decode_location, tracepoint_decode_location)
9193 (tracepoint_probe_decode_location)
9194 (strace_marker_create_sals_from_location): Return a std::vector
9195 instead of symtabs_and_lines.
9196 (strace_marker_create_breakpoints_sal): Update.
9197 (strace_marker_decode_location): Return a std::vector instead of
9198 symtabs_and_lines. Update.
9199 (update_breakpoint_locations): Change struct symtabs_and_lines
9200 parameters to gdb::array_view. Adjust.
9201 (location_to_sals): Return a std::vector instead of
9202 symtabs_and_lines. Update.
9203 (breakpoint_re_set_default): Use std::vector instead of struct
9204 symtabs_and_lines.
9205 (decode_location_default): Return a std::vector instead of
9206 symtabs_and_lines. Update.
9207 * breakpoint.h: Include "common/array-view.h".
9208 (struct breakpoint_ops) <decode_location>: Now returns a
9209 std::vector instead of returning a symtabs_and_lines via output
9210 parameter.
9211 (update_breakpoint_locations): Change sals parameters to use
9212 gdb::array_view.
9213 * cli/cli-cmds.c (edit_command, list_command): Update to use
9214 std::vector and gdb::array_view.
9215 (ambiguous_line_spec): Adjust to use gdb::array_view and
9216 range-for.
9217 (compare_symtabs): Rename to ...
9218 (cmp_symtabs): ... this. Change parameters to symtab_and_line
9219 const reference and adjust.
9220 (filter_sals): Rewrite using std::vector and standard algorithms.
9221 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
9222 (jump_command): Update to use std::vector.
9223 * linespec.c (struct linespec_state) <canonical_names>: Update
9224 comment.
9225 (add_sal_to_sals_basic): Delete.
9226 (add_sal_to_sals, filter_results, convert_results_to_lsals)
9227 (decode_line_2, create_sals_line_offset)
9228 (convert_address_location_to_sals, convert_linespec_to_sals)
9229 (convert_explicit_location_to_sals, parse_linespec)
9230 (event_location_to_sals, decode_line_full, decode_line_1)
9231 (decode_line_with_current_source)
9232 (decode_line_with_last_displayed, decode_objc)
9233 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
9234 (linespec_result::~linespec_result): Adjust to use std::vector
9235 instead of symtabs_and_lines.
9236 * linespec.h (linespec_sals::sals): Now a std::vector.
9237 (struct linespec_result): Use std::vector, bool, and in-class
9238 initialization.
9239 (decode_line_1, decode_line_with_current_source)
9240 (decode_line_with_last_displayed): Return std::vector.
9241 * macrocmd.c (info_macros_command): Use std::vector.
9242 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
9243 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
9244 std::vector.
9245 * probe.h (parse_probes): Return a std::vector.
9246 * python/python.c (gdbpy_decode_line): Use std::vector and
9247 gdb::array_view.
9248 * source.c (select_source_symtab, line_info): Use std::vector.
9249 * stack.c (func_command): Use std::vector.
9250 * symtab.h (struct symtabs_and_lines): Delete.
9251 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
9252
9253 2017-09-04 Pedro Alves <palves@redhat.com>
9254
9255 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9256 unittests/array-view-selftests.c.
9257 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
9258 * common/array-view.h: New file.
9259 * unittests/array-view-selftests.c: New file.
9260
9261 2017-09-04 Pedro Alves <palves@redhat.com>
9262
9263 * cli/cli-cmds.c (edit_command): Pass message to
9264 ambiguous_line_spec.
9265 (list_command): Pass message to ambiguous_line_spec. Say
9266 "first"/"last" instead of "start" and "end" to be consistent with
9267 the manual.
9268 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
9269 them to print formatted message.
9270
9271 2017-09-04 Pedro Alves <palves@redhat.com>
9272
9273 * btrace.c (ftrace_add_pt): Pass btrace_insn to
9274 ftrace_update_insns by reference instead of pointer.
9275
9276 2017-09-04 Yao Qi <yao.qi@linaro.org>
9277
9278 * i386-go32-tdep.c: Include x86-xstate.h.
9279 (i386_go32_init_abi): Call i386_target_description.
9280 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9281 if xcr0 is X86_XSTATE_X87_MASK.
9282 * i386-tdep.h (tdesc_i386): Remove the declaration.
9283 (tdesc_i386_mmx): Likewise.
9284
9285 2017-09-04 Yao Qi <yao.qi@linaro.org>
9286
9287 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9288 X86_XSTATE_SSE_MASK instead of 0.
9289
9290 2017-09-04 Yao Qi <yao.qi@linaro.org>
9291
9292 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9293 i386_target_description.
9294 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9295 i386_target_description.
9296 * i386-tdep.c (i386_gdbarch_init): Likewise.
9297
9298 2017-09-04 Yao Qi <yao.qi@linaro.org>
9299
9300 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9301 (x86_darwin_init_abi_64): Call amd64_target_description.
9302 * amd64-dicos-tdep.c: Likewise.
9303 * amd64-fbsd-nat.c: Likewise.
9304 * amd64-fbsd-tdep.c: Likewise.
9305 * amd64-nbsd-tdep.c: Likewise.
9306 * amd64-obsd-tdep.c: Likewise.
9307 * amd64-sol2-tdep.c: Likewise.
9308 * amd64-windows-tdep.c: Likewise.
9309 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9310
9311 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9312
9313 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9314 (btrace_function) <insn>: Change type to use std::vector.
9315 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9316 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9317 ftrace_update_insns, ftrace_compute_global_level_offset,
9318 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9319 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9320 change to std::vector.
9321 (ftrace_update_insns): Adjust to change to std::vector, change
9322 type of INSN parameter.
9323 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9324 * record-btrace.c (btrace_call_history_insn_range,
9325 btrace_compute_src_line_range,
9326 record_btrace_frame_prev_register): Adjust to change to
9327 std::vector.
9328 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9329 to change to std::vector.
9330
9331 2017-09-03 Tom Tromey <tom@tromey.com>
9332
9333 * corefile.c (reopen_exec_file): Use std::string.
9334
9335 2017-09-03 Tom Tromey <tom@tromey.com>
9336
9337 * compile/compile.c (compile_register_name_mangled): Return
9338 std::string.
9339 * compile/compile-loc2c.c (pushf_register_address): Update.
9340 (pushf_register): Update.
9341 * compile/compile-c-types.c (convert_array): Update.
9342 * compile/compile-c-symbols.c (generate_vla_size): Update.
9343 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9344 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9345 (convert_one_symbol): Update.
9346 (generate_c_for_for_one_variable): Update.
9347 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9348 std::string.
9349 (generate_register_struct): Update.
9350 * compile/compile-internal.h (c_get_range_decl_name): Return a
9351 std::string.
9352 (compile_register_name_mangled): Return std::string.
9353
9354 2017-09-03 Tom Tromey <tom@tromey.com>
9355
9356 * utils.c (perror_string): Return a std::string.
9357 (throw_perror_with_name, perror_warning_with_name): Update.
9358
9359 2017-09-03 Tom Tromey <tom@tromey.com>
9360
9361 * demangle.c (demangle_command): Use std::string,
9362 unique_xmalloc_ptr.
9363
9364 2017-09-03 Tom Tromey <tom@tromey.com>
9365
9366 * cli/cli-setshow.c (do_set_command): Use std::string.
9367
9368 2017-09-03 Tom Tromey <tom@tromey.com>
9369
9370 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9371
9372 2017-09-03 Tom Tromey <tom@tromey.com>
9373
9374 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9375
9376 2017-09-03 Tom Tromey <tom@tromey.com>
9377
9378 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9379 gdb::unique_xmalloc_ptr.
9380
9381 2017-09-03 Tom Tromey <tom@tromey.com>
9382
9383 * thread.c (print_thread_info_1): Use string_printf.
9384 (thread_apply_command, thread_apply_all_command): Use
9385 std::string.
9386
9387 2017-09-03 Tom Tromey <tom@tromey.com>
9388
9389 * valprint.c (val_print_string): Update.
9390 * gdbcore.h (memory_error_message): Return std::string.
9391 * corefile.c (memory_error_message): Return std::string.
9392 (memory_error): Update.
9393 * breakpoint.c (insert_bp_location): Update.
9394
9395 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9396
9397 * target/waitstatus.h (target_waitstatus_to_string): Change
9398 return type to std::string.
9399 * target/waitstatus.c (target_waitstatus_to_string): Return
9400 std::string.
9401 * target.h (target_waitstatus_to_string): Remove declaration.
9402 * infrun.c (resume, clear_proceed_status_thread,
9403 print_target_wait_results, do_target_wait, save_waitstatus,
9404 stop_all_threads): Adjust.
9405 * record-btrace.c (record_btrace_wait): Adjust.
9406 * target-debug.h
9407 (target_debug_print_struct_target_waitstatus_p): Adjust.
9408
9409 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9410
9411 PR gdb/22046
9412 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9413 detection.
9414
9415 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9416
9417 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9418 for setting/unsetting environment variables on the remote target.
9419 (New remote packets): Add entries for QEnvironmentHexEncoded,
9420 QEnvironmentUnset and QEnvironmentReset.
9421 * common/environ.c (gdb_environ::operator=): Extend method to
9422 handle m_user_set_env_list and m_user_unset_env_list.
9423 (gdb_environ::clear): Likewise.
9424 (match_var_in_string): Change type of first parameter from 'char
9425 *' to 'const char *'.
9426 (gdb_environ::set): Extend method to handle
9427 m_user_set_env_list and m_user_unset_env_list.
9428 (gdb_environ::unset): Likewise.
9429 (gdb_environ::clear_user_set_env): New method.
9430 (gdb_environ::user_set_envp): Likewise.
9431 (gdb_environ::user_unset_envp): Likewise.
9432 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9433 m_user_unset_env_list on move constructor/assignment.
9434 (unset): Add new default parameter 'update_unset_list = true'.
9435 (clear_user_set_env): New method.
9436 (user_set_envp): Likewise.
9437 (user_unset_envp): Likewise.
9438 (m_user_set_env_list): New std::set.
9439 (m_user_unset_env_list): Likewise.
9440 * common/rsp-low.c (hex2str): New function.
9441 (bin2hex): New overload for bin2hex function.
9442 * common/rsp-low.c (hex2str): New prototype.
9443 (str2hex): New overload prototype.
9444 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9445 QEnvironmentUnset and QEnvironmentReset.
9446 (remote_protocol_features): Add QEnvironmentHexEncoded,
9447 QEnvironmentUnset and QEnvironmentReset packets.
9448 (send_environment_packet): New function.
9449 (extended_remote_environment_support): Likewise.
9450 (extended_remote_create_inferior): Call
9451 extended_remote_environment_support.
9452 (_initialize_remote): Add QEnvironmentHexEncoded,
9453 QEnvironmentUnset and QEnvironmentReset packet configs.
9454 * unittests/environ-selftests.c (gdb_selftest_env_var):
9455 New variable.
9456 (test_vector_initialization): New function.
9457 (test_init_from_host_environ): Likewise.
9458 (test_reinit_from_host_environ): Likewise.
9459 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9460 Likewise.
9461 (test_unset_set_empty_vector): Likewise.
9462 (test_vector_clear): Likewise.
9463 (test_std_move): Likewise.
9464 (test_move_constructor):
9465 (test_self_move): Likewise.
9466 (test_set_unset_reset): Likewise.
9467 (run_tests): Rewrite in terms of the functions above.
9468
9469 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
9470
9471 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9472 (adi_available): Use a temp variable of type CORE_ADDR as argument
9473 3 when calling target_auxv_search.
9474 (adi_normalize_address): Use masks and xor operators to calculate
9475 normalized address.
9476 (adi_read_versions, adi_write_versions, adi_print_versions)
9477 (do_examine, do_assign): Use paddress.
9478
9479 2017-08-29 John Baldwin <jhb@FreeBSD.org>
9480
9481 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9482 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9483 out of loop and add supply of FIR.
9484 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9485 add collect of FIR.
9486
9487 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9488
9489 PR gdb/21827
9490 * cli/cli-script.c (define_command): Don't convert command name
9491 to lower case.
9492
9493 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9494
9495 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9496 Update all callers accordingly. Remove all code blocks handling
9497 the case where DISPP is not NULL.
9498
9499 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9500
9501 PR symtab/22003
9502 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9503 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9504 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9505
9506 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9507
9508 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9509 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9510 (read_comp_units_from_section): New parameter abbrev_section, use
9511 read_and_check_comp_unit_head, allocate signatured_type if needed.
9512 (create_all_comp_units): Update read_comp_units_from_section caller.
9513
9514 2017-08-23 Pedro Alves <palves@redhat.com>
9515
9516 PR remote/21852
9517 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9518 to null_ptid and switch to thread without reading the registers
9519 after adding the inferior.
9520
9521 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9522
9523 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9524 compile-gcc.
9525 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9526 (compile_to_object): Implement compile_gcc.
9527 (_initialize_compile): Install "set compile-gcc". Initialize
9528 compile_gcc.
9529
9530 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9531
9532 * compile/compile.c (compile_to_object): Conditionally call
9533 set_verbose. Conditionally call compile or compile_v0.
9534
9535 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9536
9537 * sparc64-tdep.h: (adi_normalize_address): New export.
9538 * sparc-nat.h: (open_adi_tag_fd): New export.
9539 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9540 * sparc64-linux-tdep.c:
9541 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9542 (sparc64_linux_handle_segmentation_fault): New function.
9543 (sparc64_linux_init_abi): Register
9544 sparc64_linux_handle_segmentation_fault
9545 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9546 (sparc64_addr_bits_remove): New function.
9547 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9548 (MAX_PROC_NAME_SIZE): New macro.
9549 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9550 (sparc64adilist): New variable.
9551 (adi_proc_list): New variable.
9552 (find_adi_info): New function.
9553 (add_adi_info): New function.
9554 (get_adi_info_proc): New function.
9555 (get_adi_info): New function.
9556 (info_adi_command): New function.
9557 (read_maps_entry): New function.
9558 (adi_available): New function.
9559 (adi_normalize_address): New function.
9560 (adi_align_address): New function.
9561 (adi_convert_byte_count): New function.
9562 (adi_tag_fd): New function.
9563 (adi_is_addr_mapped): New function.
9564 (adi_read_versions): New function.
9565 (adi_write_versions): New function.
9566 (adi_print_versions): New function.
9567 (do_examine): New function.
9568 (do_assign): New function.
9569 (adi_examine_command): New function.
9570 (adi_assign_command): New function.
9571 (_initialize_sparc64_adi_tdep): New function.
9572
9573 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9574
9575 * breakpoint.c (breakpoints_info): Rename to ...
9576 (info_breakpoints_command): ... this.
9577 (watchpoints_info): Rename to ...
9578 (info_watchpoints_command): ... this.
9579 (tracepoints_info): Rename to ...
9580 (info_tracepoints_command): ... this.
9581 (_initialize_breakpoint): Adjust.
9582 * dcache.c (dcache_info): Rename to ...
9583 (info_display_command): ... this.
9584 (_initialize_dcache): Adjust.
9585 * frame.h (args_info): Rename to ...
9586 (info_args_command): ... this.
9587 (locals_info): Rename to ...
9588 (info_locals_command): ... this.
9589 * infcmd.c (nofp_registers_info): Rename to ...
9590 (info_registers_command): ... this.
9591 (float_info): Rename to ...
9592 (info_float_command): ... this.
9593 (program_info): Rename to ...
9594 (info_program_command): ... this.
9595 (all_registers_info): Rename to ...
9596 (info_all_registers_command): ... this.
9597 (vector_info): Rename to ...
9598 (info_vector_command): ... this.
9599 (float_info): Rename to ...
9600 (info_float_command): ... this.
9601 (_initialize_infcmd): Adjust.
9602 * inferior.h (term_info): Rename to ...
9603 (info_terminal_command): ... this.
9604 * inflow.c (term_info): Rename to ...
9605 (info_terminal_command): ... this.
9606 (_initialize_inflow): Adjust.
9607 * infrun.c (signals_info): Rename to ...
9608 (info_signals_command): ... this.
9609 (_initialize_infrun): Adjust.
9610 * objc-lang.c (classes_info): Rename to ...
9611 (info_classes_command): ... this.
9612 (selectors_info): Rename to ...
9613 (info_selectors_command): ... this.
9614 (_initialize_objc_language): Adjust.
9615 * printcmd.c (sym_info): Rename to ...
9616 (info_symbol_command): ... this.
9617 (address_info): Rename to ...
9618 (info_address_command): ... this.
9619 (display_info): Rename to ...
9620 (info_display_command): ... this.
9621 (_initialize_printcmd): Adjust.
9622 * reverse.c (bookmarks_info): Rename to ...
9623 (info_breakpoints_command): ... this.
9624 (_initialize_reverse): Adjust.
9625 * ser-go32.c (dos_info): Rename to ...
9626 (info_serial_command): ... this.
9627 (_initialize_ser_dos): Adjust.
9628 * skip.c (skip_info): Rename to ...
9629 (info_skip_command): ... this.
9630 (_initialize_step_skip): Adjust.
9631 * source.c (line_info): Rename to ...
9632 (info_line_command): ... this.
9633 (source_info): Rename to ...
9634 (info_source_command)
9635 * stack.c (frame_info): Rename to ...
9636 (info_frame_command): ... this.
9637 (locals_info): Rename to ...
9638 (info_locals_command): ... this.
9639 (args_info): Rename to ...
9640 (info_args_command): ... this.
9641 (_initialize_stack): Adjust.
9642 * symtab.c (sources_info): Rename to ...
9643 (info_sources_command): ... this.
9644 (variables_info): Rename to ...
9645 (info_variables_command): ... this.
9646 (functions_info): Rename to ...
9647 (info_functions_command): ... this.
9648 (types_info): Rename to ...
9649 (info_types_command): ... this.
9650 (_initialize_symtab): Adjust.
9651 * target.c (target_info): Rename to ...
9652 (info_target_command): ... this.
9653 (initialize_targets): Adjust.
9654 * tracepoint.c (tvariables_info): Rename to ...
9655 (info_tvariables_command): ... this.
9656 (scope_info): Rename to ...
9657 (info_scope_command): ... this.
9658 (trace_dump_actions): Adjust.
9659 (_initialize_tracepoint): Adjust.
9660
9661 2017-08-22 Tom Tromey <tom@tromey.com>
9662
9663 * breakpoint.h (install_breakpoint): Update.
9664 * breakpoint.c (add_solib_catchpoint): Update.
9665 (install_breakpoint): Change argument to a std::unique_ptr.
9666 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9667 (create_breakpoint_sal, create_breakpoint): Update.
9668 (watch_command_1, catch_exec_command_1)
9669 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9670 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9671 Return the breakpoint.
9672 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9673 (new_single_step_breakpoint): Update.
9674 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9675 std::unique_ptr.
9676 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9677 std::unique_ptr.
9678 * break-catch-sig.c (create_signal_catchpoint): Use
9679 std::unique_ptr.
9680 * ada-lang.c (create_ada_exception_catchpoint): Use
9681 std::unique_ptr.
9682
9683 2017-08-22 Tom Tromey <tom@tromey.com>
9684
9685 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9686
9687 2017-08-22 Tom Tromey <tom@tromey.com>
9688
9689 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9690 (lookup_partial_symbol): Update.
9691
9692 2017-08-22 Tom Tromey <tom@tromey.com>
9693
9694 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9695 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9696 (find_and_open_source, symtab_to_fullname): Update.
9697 * psymtab.c (psymtab_to_fullname): Update.
9698
9699 2017-08-22 Tom Tromey <tom@tromey.com>
9700
9701 * exec.c (exec_file_attach): Update.
9702 * linux-thread-db.c (try_thread_db_load): Update.
9703 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9704 * utils.c (gdb_realpath): Change return type.
9705 (gdb_realpath_keepfile): Update.
9706 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9707 (_initialize_utils): Register the new self test.
9708 * source.c (openp): Update.
9709 (find_and_open_source): Update.
9710 * nto-tdep.c (nto_find_and_open_solib): Update.
9711 * main.c (set_gdb_data_directory): Update.
9712 (captured_main_1): Update.
9713 * dwarf2read.c (dwarf2_get_dwz_file): Update
9714 (dw2_map_symbol_filenames): Update.
9715 * auto-load.c (auto_load_safe_path_vec_update): Update.
9716 (filename_is_in_auto_load_safe_path_vec): Change type of
9717 "filename_realp".
9718 (auto_load_objfile_script): Update.
9719 (file_is_auto_load_safe): Update. Use std::string.
9720 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9721
9722 2017-08-22 Tom Tromey <tom@tromey.com>
9723
9724 * utils.c (gdb_realpath_keepfile): Return a
9725 gdb::unique_xmalloc_ptr.
9726 * exec.c (exec_file_attach): Update.
9727 * utils.h (gdb_realpath_keepfile): Return a
9728 gdb::unique_xmalloc_ptr.
9729
9730 2017-08-22 Tom Tromey <tom@tromey.com>
9731
9732 * compile/compile.c (compile_file_command): Use
9733 gdb::unique_xmalloc_ptr, std::string.
9734 * utils.c (gdb_abspath): Change return type.
9735 * source.c (openp): Update.
9736 * objfiles.c (allocate_objfile): Update.
9737 * main.c (set_gdb_data_directory): Update.
9738 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9739
9740 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9741
9742 * cli-cmds.c (list_commands): List actual code around more than
9743 one location.
9744
9745 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9746
9747 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9748
9749 2017-08-21 Pedro Alves <palves@redhat.com>
9750
9751 PR gdb/19487
9752 * c-exp.y (variable production): Handle function aliases.
9753 * minsyms.c (msymbol_is_text): New function.
9754 * minsyms.h (msymbol_is_text): Declare.
9755 * symtab.c (find_function_alias_target): New function.
9756 * symtab.h (find_function_alias_target): Declare.
9757
9758 2017-08-21 Pedro Alves <palves@redhat.com>
9759
9760 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9761 typedefs.
9762 * typeprint.c (whatis_exp): If handling "whatis", and expression
9763 is OP_TYPE, strip one typedef level. Otherwise don't strip
9764 typedefs here.
9765 * valops.c (value_cast): Save "to" type before resolving
9766 stubs/typedefs. Use that type as resulting value's type.
9767
9768 2017-08-18 Tom Tromey <tom@tromey.com>
9769 Pedro Alves <palves@redhat.com>
9770
9771 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9772 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9773 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9774 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9775 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9776 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9777 (linux_get_siginfo_data): Add "thread" argument. Use
9778 scoped_restore.
9779 * linux-nat.c (linux_child_follow_fork)
9780 (check_stopped_by_watchpoint): Use scoped_restore.
9781 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9782 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9783 (restore_inferior_ptid, save_inferior_ptid): Remove.
9784 * btrace.c (btrace_fetch): Use scoped_restore.
9785 * bsd-uthread.c (bsd_uthread_fetch_registers)
9786 (bsd_uthread_store_registers): Use scoped_restore.
9787 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9788 scoped_restore.
9789 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9790 (aix_thread_xfer_partial): Use scoped_restore.
9791 * inferior.h (save_inferior_ptid): Remove.
9792
9793 2017-08-18 Yao Qi <yao.qi@linaro.org>
9794
9795 PR tdep/21818
9796 * arm-tdep.c (gdb_print_insn_arm): Mark
9797 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9798
9799 2017-08-18 Yao Qi <yao.qi@linaro.org>
9800
9801 * NEWS: Mention GDBserver's new option "--selftest".
9802 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9803 * selftest.c: Move it to common/selftest.c.
9804 * selftest.h: Move it to common/selftest.h.
9805 * selftest-arch.c (reset): New function.
9806 (tests_with_arch): Call reset.
9807
9808 2017-08-18 Yao Qi <yao.qi@linaro.org>
9809
9810 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9811 instead of exception_fprintf and printf_filtered.
9812
9813 2017-08-18 Yao Qi <yao.qi@linaro.org>
9814
9815 * selftest.c (register_self_test): Rename it to
9816 selftests::register_test.
9817 (run_self_tests): selftest::run_tests.
9818 * selftest.h: Update declarations.
9819 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9820 selftests::register_test_foreach_arch.
9821 * selftest-arch.h: Update declaration.
9822 * aarch64-tdep.c: Update.
9823 * arm-tdep.c: Likewise.
9824 * disasm-selftests.c: Likewise.
9825 * dwarf2loc.c: Likewise.
9826 * dwarf2-frame.c: Likewise.
9827 * findvar.c: Likewise.
9828 * gdbarch-selftests.c: Likewise.
9829 * maint.c (maintenance_selftest): Likewise.
9830 * regcache.c: Likewise.
9831 * rust-exp.y: Likewise.
9832 * selftest-arch.c: Likewise.
9833 * unittests/environ-selftests.c: Likewise.
9834 * unittests/function-view-selftests.c: Likewise.
9835 * unittests/offset-type-selftests.c: Likewise.
9836 * unittests/optional-selftests.c: Likewise.
9837 * unittests/scoped_restore-selftests.c: Likewise.
9838 * utils-selftests.c: Likewise.
9839
9840 2017-08-17 Pedro Alves <palves@redhat.com>
9841
9842 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9843 local.
9844
9845 2017-08-17 Pedro Alves <palves@redhat.com>
9846
9847 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9848 field.
9849 (reset_die_in_process): Delete, replaced by ...
9850 (process_die_scope): ... this new class. Make it responsible for
9851 freeing cu->line_header too.
9852 (process_die): Use process_die_scope.
9853 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9854 cu->line_header_die_owner. Don't release the line header if it's
9855 owned by the CU.
9856 (setup_type_unit_groups): Make the CU/DIE own the line header.
9857 Don't release the line header here.
9858
9859 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9860
9861 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9862
9863 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9864
9865 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9866 Single-Key mode
9867
9868 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9869
9870 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9871 mode command list.
9872
9873 2017-08-15 Stafford Horne <shorne@gmail.com>
9874
9875 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9876
9877 2017-08-15 Stafford Horne <shorne@gmail.com>
9878
9879 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9880
9881 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9882
9883 PR gdb/21954
9884 * infcmd.c (unset_environment_command): Use the 'clear' method on
9885 the environment instead of resetting it.
9886
9887 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9888
9889 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9890 platforms.
9891
9892 2017-08-14 Tom Tromey <tom@tromey.com>
9893
9894 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9895 (print_binary_chars): Likewise.
9896 (BITS_IN_BYTES): Remove.
9897
9898 2017-08-14 Tom Tromey <tom@tromey.com>
9899
9900 PR gdb/21675
9901 * valprint.c (LOW_ZERO): Change value to 034.
9902 (print_octal_chars): Add static_asserts for octal constants.
9903 * printcmd.c (print_scalar_formatted): Add 'd' case.
9904
9905 2017-08-11 Tom Tromey <tom@tromey.com>
9906
9907 * symfile.c (add_symbol_file_command): Use std::vector.
9908
9909 2017-08-14 Tom Tromey <tom@tromey.com>
9910
9911 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9912 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9913 std::move.
9914 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9915
9916 2017-08-11 Pedro Alves <palves@redhat.com>
9917
9918 * infrun.c (process_event_stop_test): Adjust
9919 function_name_is_marked_for_skip call.
9920 * skip.c: Include <list>.
9921 (skiplist_entry): Make it a class with private fields, and
9922 getters/setters.
9923 (skiplist_entry_chain): Delete.
9924 (skiplist_entries): New.
9925 (skiplist_entry_count): Delete.
9926 (highest_skiplist_entry_num): New.
9927 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9928 (add_skiplist_entry): Delete.
9929 (skiplist_entry::skiplist_entry): New.
9930 (skiplist_entry::add_entry): New.
9931 (skip_file_command, skip_function): Adjust.
9932 (compile_skip_regexp): Delete.
9933 (skip_command): Don't compile regexp here. Adjust to use
9934 skiplist_entry::add_entry.
9935 (skip_info): Adjust to use range-for and getters.
9936 (skip_enable_command, skip_disable_command): Adjust to use
9937 range-for and setters.
9938 (skip_delete_command): Adjust to use std::list.
9939 (add_skiplist_entry): Delete.
9940 (skip_file_p): Delete, refactored as ...
9941 (skiplist_entry::do_skip_file_p): ... this new method.
9942 (skip_gfile_p): Delete, refactored as ...
9943 (skiplist_entry::do_gskip_file_p): ... this new method.
9944 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9945 (skiplist_entry::skip_function_p): ... this new method.
9946 (function_name_is_marked_for_skip): Now returns bool, and takes
9947 the function sal by const reference. Adjust to use range-for and
9948 skiplist_entry methods.
9949 (_initialize_step_skip): Remove references to
9950 skiplist_entry_chain, skiplist_entry_count.
9951 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9952 takes the function sal by const reference.
9953
9954 2017-08-11 Yao Qi <yao.qi@linaro.org>
9955
9956 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9957 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9958 (dwarf2_frame_cache):
9959 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9960 RETURN_MASK_ALL and set *this_case to NULL.
9961 * frame-unwind.h: Update comments.
9962
9963 2017-08-11 Yao Qi <yao.qi@linaro.org>
9964
9965 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9966 (dwarf2_frame_state_copy_regs): Remove.
9967 (dwarf2_frame_state_free_regs): Remove.
9968 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9969 (dwarf2_restore_rule): Call method .alloc_regs instead of
9970 dwarf2_frame_state_alloc_regs.
9971 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9972 constructor. Call std::move.
9973 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9974 (dwarf2_frame_cache): Likewise.
9975
9976 [GDB_SELF_TEST]: Include selftest.h and
9977 selftest-arch.h.
9978 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9979 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9980 execute_cfa_program_test.
9981
9982 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9983 copy ctor, assignment operator, move assignment.
9984 <alloc_regs>: New method.
9985 <swap>: New method.
9986 (struct dwarf2_frame_state): Delete dtor.
9987 (dwarf2_frame_state_alloc_regs): Remove declaration.
9988 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9989 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9990
9991 2017-08-11 Yao Qi <yao.qi@linaro.org>
9992
9993 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9994 (dwarf2_frame_state::dwarf2_frame_state): New.
9995 (dwarf2_frame_state::~dwarf2_frame_state): New.
9996 (dwarf2_fetch_cfa_info): Update.
9997 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9998 rather than a pointer. Update code.
9999 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
10000 dtor.
10001 <data_align, code_align, retaddr_column>: Change them to const.
10002 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
10003 to bool.
10004
10005 2017-08-11 Yao Qi <yao.qi@linaro.org>
10006
10007 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
10008 <loc.exp>: New field.
10009 * dwarf2-frame.c (execute_cfa_program): Update.
10010 (dwarf2_frame_prev_register): Update.
10011
10012 2017-08-10 Pedro Alves <palves@redhat.com>
10013
10014 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
10015
10016 2017-08-09 John Baldwin <jhb@FreeBSD.org>
10017
10018 * fbsd-nat.c (struct fbsd_fork_info): Remove.
10019 (fbsd_pending_children): Use std::list.
10020 (fbsd_remember_child): Likewise.
10021 (fbsd_is_child_pending): Likewise.
10022 (fbsd_pending_vfork_done): Use std::forward_list.
10023 (fbsd_add_vfork_done): Likewise.
10024 (fbsd_is_vfork_done_pending): Likewise.
10025 (fbsd_next_vfork_done): Likewise.
10026
10027 2017-08-09 John Baldwin <jhb@FreeBSD.org>
10028
10029 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
10030 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
10031 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
10032 for `mapfilename'.
10033 (fbsd_xfer_partial): Use gdb::byte_vector.
10034 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
10035
10036 2017-08-09 John Baldwin <jhb@FreeBSD.org>
10037
10038 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
10039 "filestuff.h".
10040 (fbsd_find_memory_regions): Fix `mapfile' initialization.
10041
10042 2017-08-09 Tom Tromey <tom@tromey.com>
10043
10044 * skip.c (skiplist_entry): New constructor.
10045 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
10046 (skiplist_entry::file_is_glob): Now bool.
10047 (skiplist_entry::file, skiplist_entry::function): Now
10048 std::string.
10049 (make_skip_entry): Return a unique_ptr. Use new.
10050 (free_skiplist_entry, free_skiplist_entry_cleanup)
10051 (make_free_skiplist_entry_cleanup): Remove.
10052 (skip_command, skip_disable_command, add_skiplist_entry)
10053 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
10054 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
10055 (function_name_is_marked_for_skip): Update.
10056 (skip_delete_command): Update. Use delete.
10057
10058 2017-08-09 Jiong Wang <jiong.wang@arm.com>
10059
10060 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
10061 (aarch64_linux_core_read_description): New function.
10062 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
10063
10064 2017-08-09 Pedro Alves <palves@redhat.com>
10065
10066 * cp-name-parser.y (cp_comp_to_string): Return a
10067 gdb::unique_xmalloc_ptr<char>.
10068 * cp-support.c (replace_typedefs_qualified_name)
10069 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
10070 (cp_canonicalize_string_full): Use op= instead of explicit
10071 convertion.
10072 (cp_class_name_from_physname, method_name_from_physname)
10073 (cp_func_name, cp_remove_params): Adjust to use
10074 gdb::unique_xmalloc_ptr<char>.
10075 * cp-support.h (cp_comp_to_string): Return a
10076 gdb::unique_xmalloc_ptr<char>.
10077 * python/py-type.c (typy_lookup_type): Adjust to use
10078 gdb::unique_xmalloc_ptr<char>.
10079
10080 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
10081
10082 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
10083
10084 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
10085 Yao Qi <yao.qi@linaro.org>
10086
10087 * cp-support.c (cp_canonicalize_string_full): Use
10088 gdb::unique_xmalloc_ptr<char>.
10089 (cp_canonicalize_string): Likewise.
10090
10091 2017-08-09 Yao Qi <yao.qi@linaro.org>
10092
10093 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
10094 * regformats/i386/amd64-avx-avx512.dat: Remove.
10095 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
10096 * regformats/i386/amd64-avx-mpx.dat:Remove.
10097 * regformats/i386/amd64-avx.dat: Remove.
10098 * regformats/i386/amd64-mpx.dat: Remove.
10099 * regformats/i386/i386-avx-avx512.dat: Remove.
10100 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
10101 * regformats/i386/i386-avx-mpx.dat: Remove.
10102 * regformats/i386/i386-mmx.dat: Remove.
10103 * regformats/i386/i386-mpx.dat: Remove.
10104
10105 2017-08-09 Yao Qi <yao.qi@linaro.org>
10106
10107 * amd64-tdep.h (tdesc_x32): Remove the declaration.
10108 * amd64-tdep.c: Don't include features/i386/x32*.c.
10109 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
10110 functions.
10111 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
10112 and i386/x32-avx-avx512.
10113 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
10114 and i386/x32.xml.
10115 * features/i386/x32-avx-avx512.c: Removed.
10116 * features/i386/x32-avx-avx512.xml: Removed.
10117 * features/i386/x32-avx.c: Removed.
10118 * features/i386/x32-avx.xml: Removed.
10119 * features/i386/x32.c: Removed.
10120 * features/i386/x32.xml: Removed.
10121 * regformats/i386/x32-avx-avx512.dat: Removed.
10122 * regformats/i386/x32-avx.dat: Removed.
10123 * regformats/i386/x32.dat: Removed.
10124
10125 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10126
10127 PR breakpoints/21886
10128 * mem-break.c (default_memory_insert_breakpoint): Use
10129 `->placed_address' rather than `->reqstd_address' for the
10130 breakpoint location.
10131
10132 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10133
10134 * arch-utils.c (default_print_insn): Remove arch/mach/endian
10135 assertions.
10136
10137 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10138
10139 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
10140 a union of `tdep_info', `tdesc_data' and `id'.
10141 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
10142 rather than `info.tdep_info'.
10143 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
10144 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10145 * i386-tdep.c (i386_gdbarch_init): Likewise.
10146 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
10147 * mips-tdep.c (mips_gdbarch_init): Likewise.
10148 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10149 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10150 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
10151 `info.tdep_info'.
10152 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
10153 `info.tdep_info'.
10154 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10155 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
10156 `info.tdep_info'.
10157 * spu-tdep.c (spu_gdbarch_init): Likewise.
10158 * gdbarch.h: Regenerate.
10159
10160 2017-08-07 Leszek Swirski <leszeks@google.com>
10161
10162 PR symtab/20899
10163 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
10164
10165 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
10166
10167 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
10168 (gdbsim_open): Rename gdb_argv args object to argv.
10169
10170 2017-08-05 Tom Tromey <tom@tromey.com>
10171
10172 * compile/compile-object-load.c (compile_object_load): Use
10173 gdb::unique_xmalloc_ptr.
10174 * cli/cli-dump.c (scan_filename): Rename from
10175 scan_filename_with_cleanup. Change return type.
10176 (scan_expression): Rename from scan_expression_with_cleanup.
10177 Change return type.
10178 (dump_memory_to_file, dump_value_to_file, restore_command):
10179 Use gdb::unique_xmalloc_ptr. Update.
10180 * cli/cli-cmds.c (find_and_open_script): Use
10181 gdb::unique_xmalloc_ptr.
10182 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
10183 * symmisc.c (maintenance_print_symbols)
10184 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
10185 * symfile.c (symfile_bfd_open, generic_load)
10186 (add_symbol_file_command, remove_symbol_file_command): Use
10187 gdb::unique_xmalloc_ptr.
10188 * source.c (openp): Use gdb::unique_xmalloc_ptr.
10189 * psymtab.c (maintenance_print_psymbols): Use
10190 gdb::unique_xmalloc_ptr.
10191 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
10192 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
10193 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
10194 (reload_shared_libraries_1): Likewise.
10195
10196 2017-08-05 Tom Tromey <tom@tromey.com>
10197
10198 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
10199 (rust_op_vector, rust_set_vector): New typedefs.
10200 (current_parser): New global.
10201 (work_obstack): Change to pointer type. Update all users.
10202 (rust_ast, pstate): Remove globals.
10203 (struct rust_parser): New.
10204 (%union) <params, field_inits>: Change type.
10205 (start, tuple_expr, unit_expr, struct_expr_list, literal)
10206 (field_expr, expr_list, maybe_expr_list, type_list): Update.
10207 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
10208 (convert_params_to_types, convert_params_to_expression): Change
10209 type of "params".
10210 (ast_string): Change type of "fields".
10211 (rust_parse): Make a rust_parser. Remove cleanups.
10212 (rust_lex_tests): Make and install an auto_obstack.
10213
10214 2017-08-04 Yao Qi <yao.qi@linaro.org>
10215
10216 * configure.srv (ipa_x32_linux_regobj): New.
10217 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
10218 instead of X86_TDESC_AVX512.
10219 (initialize_low_tracepoint): Call
10220 init_registers_x32_avx_avx512_linux.
10221
10222 2017-08-04 Yao Qi <yao.qi@linaro.org>
10223
10224 * utils.h (gdb_argv): Add namespace std for nullptr_t.
10225
10226 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
10227
10228 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
10229
10230 2017-08-03 Tom Tromey <tom@tromey.com>
10231
10232 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
10233 Remove.
10234 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
10235
10236 2017-08-03 Tom Tromey <tom@tromey.com>
10237
10238 * python/py-param.c (compute_enum_values): Use gdb_argv.
10239
10240 2017-08-03 Tom Tromey <tom@tromey.com>
10241
10242 * utils.h (struct gdb_argv_deleter): New.
10243 (gdb_argv): New class.
10244 * utils.c (gdb_argv::reset): New method.
10245 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
10246 * tracefile.c (tsave_command): Use gdb_argv.
10247 * top.c (new_ui_command): Use gdb_argv.
10248 * symmisc.c (maintenance_print_symbols)
10249 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
10250 * symfile.c (symbol_file_command, generic_load)
10251 (remove_symbol_file_command): Use gdb_argv.
10252 * stack.c (backtrace_command): Use gdb_argv.
10253 * source.c (add_path, show_substitute_path_command)
10254 (unset_substitute_path_command, set_substitute_path_command):
10255 Use gdb_argv.
10256 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
10257 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
10258 * remote.c (extended_remote_run, remote_put_command)
10259 (remote_get_command, remote_delete_command): Use gdb_argv.
10260 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
10261 (gdbsim_open): Use gdb_argv.
10262 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
10263 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
10264 * procfs.c (procfs_info_proc): Use gdb_argv.
10265 * interps.c (interpreter_exec_cmd): Use gdb_argv.
10266 * infrun.c (handle_command): Use gdb_argv.
10267 * inferior.c (add_inferior_command, clone_inferior_command):
10268 Use gdb_argv.
10269 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10270 * exec.c (exec_file_command): Use gdb_argv.
10271 * cli/cli-cmds.c (alias_command): Use gdb_argv.
10272 * compile/compile.c (build_argc_argv): Use gdb_argv.
10273
10274 2017-08-03 Tom Tromey <tom@tromey.com>
10275
10276 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10277
10278 2017-08-03 Tom Tromey <tom@tromey.com>
10279
10280 * python/python.c (compute_python_string): Return std::string.
10281 (gdbpy_eval_from_control_command): Update.
10282 (do_start_initialization): Use std::string.
10283 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10284 xstrprintf.
10285 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10286 xstrprintf.
10287
10288 2017-08-03 Tom Tromey <tom@tromey.com>
10289
10290 * top.h (do_restore_instream_cleanup): Remove.
10291 * top.c (do_restore_instream_cleanup): Remove.
10292 (read_command_file): Use scoped_restore.
10293 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10294
10295 2017-08-03 Tom Tromey <tom@tromey.com>
10296
10297 * cli/cli-script.c (execute_user_command)
10298 (execute_control_command): Use scoped_restore.
10299
10300 2017-08-03 Tom Tromey <tom@tromey.com>
10301
10302 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10303 (execute_user_command): Remove user_call_depth; use
10304 user_args_stack's size instead.
10305
10306 2017-08-03 Tom Tromey <tom@tromey.com>
10307
10308 * top.h (in_user_command): Remove.
10309 * top.c (in_user_command): Remove.
10310 * cli/cli-script.c (do_restore_user_call_depth)
10311 (execute_user_command): Update.
10312
10313 2017-08-03 Tom Tromey <tom@tromey.com>
10314
10315 * valops.c (search_struct_method): Use gdb::byte_vector.
10316 * valarith.c (value_concat): Use std::vector.
10317 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10318 (simple_search_memory): Likewise.
10319 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10320 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10321 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10322 * elfread.c (elf_rel_plt_read): Use std::string.
10323 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10324 * cli/cli-dump.c (restore_section_callback): Use
10325 gdb::byte_vector.
10326
10327 2017-08-03 Tom Tromey <tom@tromey.com>
10328
10329 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10330
10331 2017-08-03 Tom Tromey <tom@tromey.com>
10332
10333 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10334 (tui_register_format): Use scoped_restore.
10335
10336 2017-08-03 Tom Tromey <tom@tromey.com>
10337
10338 * reverse.c (exec_direction_default): Remove.
10339 (exec_reverse_once): Use scoped_restore.
10340 * remote.c (restore_remote_timeout): Remove.
10341 (remote_flash_erase, remote_flash_write, remote_flash_done)
10342 (readchar, remote_serial_write): Use scoped_restore.
10343 * cli/cli-script.c (struct source_cleanup_lines_args)
10344 (source_cleanup_lines): Remove.
10345 (script_from_file): Use scoped_restore.
10346 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10347 (source_command): Use scoped_restore.
10348
10349 2017-08-03 Tom Tromey <tom@tromey.com>
10350
10351 * utils.h (make_cleanup_free_so): Remove.
10352 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10353 * solist.h (struct so_deleter): New.
10354 (so_list_up): New typedef.
10355 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10356
10357 2017-08-03 Tom Tromey <tom@tromey.com>
10358
10359 * utils.h (make_cleanup_restore_current_language): Remove.
10360 * utils.c (do_restore_current_language)
10361 (make_cleanup_restore_current_language): Remove.
10362 * parse.c (parse_exp_in_context_1)
10363 (parse_expression_with_language): Use
10364 scoped_restore_current_language.
10365 * mi/mi-main.c (mi_cmd_execute): Use
10366 scoped_restore_current_language.
10367 * language.h (scoped_restore_current_language): New class.
10368
10369 2017-08-03 Tom Tromey <tom@tromey.com>
10370
10371 * compile/compile.c (cleanup_unlink_file): Remove.
10372 (compile_to_object): Use gdb::unlinker.
10373 (eval_compile_command): Likewise.
10374
10375 2017-08-03 Tom Tromey <tom@tromey.com>
10376
10377 * utils.h (make_cleanup_fclose): Remove.
10378 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10379
10380 2017-08-03 Tom Tromey <tom@tromey.com>
10381
10382 * top.c (open_terminal_stream): Return gdb_file_up.
10383 (new_ui_command): Update.
10384
10385 2017-08-03 Tom Tromey <tom@tromey.com>
10386
10387 * source.c (print_source_lines_base, forward_search_command)
10388 (reverse_search_command): Use gdb_file_up.
10389
10390 2017-08-03 Tom Tromey <tom@tromey.com>
10391
10392 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10393
10394 2017-08-03 Tom Tromey <tom@tromey.com>
10395
10396 * cli/cli-cmds.c (find_and_open_script): Change return type.
10397 Remove "streamp" and "full_path" parameters.
10398 (source_script_with_search): Update.
10399 * auto-load.c (source_script_file): Update.
10400 * cli/cli-cmds.h (find_and_open_script): Change type.
10401 (open_script): New struct.
10402
10403 2017-08-03 Tom Tromey <tom@tromey.com>
10404
10405 * xml-support.c (xml_fetch_content_from_file): Update.
10406 * ui-file.c (stdio_file::open): Update.
10407 * tracefile-tfile.c (tfile_start): Update.
10408 * remote.c (remote_file_put, remote_file_get): Update.
10409 * nat/linux-procfs.c (linux_proc_get_int)
10410 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10411 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10412 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10413 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10414 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10415 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10416 * linux-nat.c (linux_proc_pending_signals): Update.
10417 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10418 (file_closer): Remove.
10419 * compile/compile.c (compile_to_object): Update.
10420 * common/filestuff.h (struct gdb_file_deleter): New.
10421 (gdb_file_up): New typedef.
10422 (gdb_fopen_cloexec): Change return type.
10423 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10424 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10425 (dump_binary_file, restore_binary_file): Update.
10426 * auto-load.c (auto_load_objfile_script_1): Update.
10427
10428 2017-08-03 Tom Tromey <tom@tromey.com>
10429
10430 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10431 (info_static_tracepoint_markers_command): Likewise.
10432 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10433 * skip.c (skip_info): Use ui_out_emit_table.
10434 * progspace.c (print_program_space): Use ui_out_emit_table.
10435 * osdata.c (info_osdata): Use ui_out_emit_table.
10436 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10437 ui_out_emit_table.
10438 * linux-thread-db.c (info_auto_load_libthread_db): Use
10439 ui_out_emit_table.
10440 * inferior.c (print_inferior): Use ui_out_emit_table.
10441 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10442 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10443 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10444 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10445 * ui-out.h (class ui_out_emit_table): New.
10446
10447 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10448
10449 * mips-tdep.c (mips_fpu_type_str): New function.
10450 (mips_dump_tdep): Call it.
10451
10452 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10453
10454 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10455 `->mips_fpu_type'.
10456
10457 2017-07-31 Xavier Roirand <roirand@adacore.com>
10458
10459 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10460
10461 2017-07-27 Xavier Roirand <roirand@adacore.com>
10462
10463 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10464
10465 2017-07-26 Yao Qi <yao.qi@linaro.org>
10466
10467 * cli/cli-cmds.c (maintenancechecklist): New variable.
10468 * gdbcmd.h (maintenancechecklist): Declare it.
10469 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10470 Call i386_linux_read_description with different masks.
10471 * maint.c (maintenance_check_command): New function.
10472 (_initialize_maint_cmds): Call add_prefix_cmd.
10473 * target-descriptions.c (tdesc_reg): override operator != and ==.
10474 (tdesc_type): Likewise.
10475 (tdesc_feature): Likewise.
10476 (target_desc): Likewise.
10477 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10478 (maintenance_check_xml_descriptions): New function.
10479 (_initialize_target_descriptions) Add command "xml-descriptions".
10480 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10481
10482 2017-07-26 Yao Qi <yao.qi@linaro.org>
10483
10484 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10485 Include features/i386/32bit-*.c.
10486 (i386_linux_read_description): Generate target description if it
10487 doesn't exist.
10488 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10489 functions.
10490 * features/i386/32bit-linux.c: Re-generated.
10491 * features/i386/32bit-sse.c: Likewise.
10492 * target-descriptions.c (print_c_feature::visit): Print code to
10493 set register number if needed.
10494 (print_c_feature) <m_next_regnum>: New field.
10495
10496 2017-07-26 Yao Qi <yao.qi@linaro.org>
10497
10498 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10499 (FEATURE_XMLFILES): New.
10500 (FEATURE_CFILES): New.
10501 New rules.
10502 (clean-cfiles): Remove generated c files.
10503 * features/i386/32bit-avx.c: Generated.
10504 * features/i386/32bit-avx512.c: Generated.
10505 * features/i386/32bit-core.c: Generated.
10506 * features/i386/32bit-linux.c: Generated.
10507 * features/i386/32bit-mpx.c: Generated.
10508 * features/i386/32bit-pkeys.c: Generated.
10509 * features/i386/32bit-sse.c: Generated.
10510 * target-descriptions.c: Include algorithm.
10511 (tdesc_element_visitor): Add method visit_end.
10512 (print_c_tdesc): Implement visit_end.
10513 (print_c_tdesc:: m_filename_after_features): Move it to
10514 protected.
10515 (print_c_feature): New class.
10516 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10517 name starts with "i386/32bit-".
10518
10519 2017-07-26 Yao Qi <yao.qi@linaro.org>
10520
10521 * target-descriptions.c (tdesc_element_visitor): New class.
10522 (tdesc_element): New class.
10523 (tdesc_reg): Inherit from tdesc_element.
10524 (tdesc_reg::accept): New function.
10525 (tdesc_type): Inherit from tdesc_element.
10526 (tdesc_type::accept): New function.
10527 (tdesc_feature): Inherit from tdesc_element.
10528 (tdesc_feature::accept): New function.
10529 (target_desc): Inherit from tdesc_element.
10530 (target_desc::target_desc): New.
10531 (target_desc::~target_desc): New.
10532 (target_desc::accept): New.
10533 (allocate_target_description): Use new.
10534 (free_target_description): Use delete.
10535 (print_c_tdesc): New class.
10536 (maint_print_c_tdesc_cmd): Adjust.
10537
10538 * features/aarch64.c: Re-generated.
10539 * features/arc-arcompact.c: Re-generated.
10540 * features/arc-v2.c: Re-generated.
10541 * features/arm/arm-with-iwmmxt.c: Re-generated.
10542 * features/arm/arm-with-m.c: Re-generated.
10543 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10544 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10545 * features/arm/arm-with-neon.c: Re-generated.
10546 * features/arm/arm-with-vfpv2.c: Re-generated.
10547 * features/arm/arm-with-vfpv3.c: Re-generated.
10548 * features/i386/amd64-avx-avx512.c: Re-generated.
10549 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10550 * features/i386/amd64-avx.c: Re-generated.
10551 * features/i386/amd64-avx-linux.c: Re-generated.
10552 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10553 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10554 * features/i386/amd64-avx-mpx.c: Re-generated.
10555 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10556 * features/i386/amd64.c: Re-generated.
10557 * features/i386/amd64-linux.c: Re-generated.
10558 * features/i386/amd64-mpx.c: Re-generated.
10559 * features/i386/amd64-mpx-linux.c: Re-generated.
10560 * features/i386/i386-avx-avx512.c: Re-generated.
10561 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10562 * features/i386/i386-avx.c: Re-generated.
10563 * features/i386/i386-avx-linux.c: Re-generated.
10564 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10565 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10566 * features/i386/i386-avx-mpx.c: Re-generated.
10567 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10568 * features/i386/i386.c: Re-generated.
10569 * features/i386/i386-linux.c: Re-generated.
10570 * features/i386/i386-mmx.c: Re-generated.
10571 * features/i386/i386-mmx-linux.c: Re-generated.
10572 * features/i386/i386-mpx.c: Re-generated.
10573 * features/i386/i386-mpx-linux.c: Re-generated.
10574 * features/i386/x32-avx-avx512.c: Re-generated.
10575 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10576 * features/i386/x32-avx.c: Re-generated.
10577 * features/i386/x32-avx-linux.c: Re-generated.
10578 * features/i386/x32.c: Re-generated.
10579 * features/i386/x32-linux.c: Re-generated.
10580 * features/microblaze.c: Re-generated.
10581 * features/microblaze-with-stack-protect.c: Re-generated.
10582 * features/mips64-dsp-linux.c: Re-generated.
10583 * features/mips64-linux.c: Re-generated.
10584 * features/mips-dsp-linux.c: Re-generated.
10585 * features/mips-linux.c: Re-generated.
10586 * features/nds32.c: Re-generated.
10587 * features/nios2.c: Re-generated.
10588 * features/nios2-linux.c: Re-generated.
10589 * features/rs6000/powerpc-32.c: Re-generated.
10590 * features/rs6000/powerpc-32l.c: Re-generated.
10591 * features/rs6000/powerpc-403.c: Re-generated.
10592 * features/rs6000/powerpc-403gc.c : Re-generated.
10593 * features/rs6000/powerpc-405.c: Re-generated.
10594 * features/rs6000/powerpc-505.c: Re-generated.
10595 * features/rs6000/powerpc-601.c: Re-generated.
10596 * features/rs6000/powerpc-602.c: Re-generated.
10597 * features/rs6000/powerpc-603.c: Re-generated.
10598 * features/rs6000/powerpc-604.c: Re-generated.
10599 * features/rs6000/powerpc-64.c: Re-generated.
10600 * features/rs6000/powerpc-64l.c: Re-generated.
10601 * features/rs6000/powerpc-7400.c: Re-generated.
10602 * features/rs6000/powerpc-750.c: Re-generated.
10603 * features/rs6000/powerpc-860.c: Re-generated.
10604 * features/rs6000/powerpc-altivec32.c: Re-generated.
10605 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10606 * features/rs6000/powerpc-altivec64.c: Re-generated.
10607 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10608 * features/rs6000/powerpc-cell32l.c: Re-generated.
10609 * features/rs6000/powerpc-cell64l.c: Re-generated.
10610 * features/rs6000/powerpc-e500.c: Re-generated.
10611 * features/rs6000/powerpc-e500l.c: Re-generated.
10612 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10613 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10614 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10615 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10616 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10617 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10618 * features/rs6000/powerpc-vsx32.c: Re-generated.
10619 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10620 * features/rs6000/powerpc-vsx64.c: Re-generated.
10621 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10622 * features/rs6000/rs6000.c: Re-generated.
10623 * features/s390-linux32.c: Re-generated.
10624 * features/s390-linux32v1.c: Re-generated.
10625 * features/s390-linux32v2.c: Re-generated.
10626 * features/s390-linux64.c: Re-generated.
10627 * features/s390-linux64v1.c: Re-generated.
10628 * features/s390-linux64v2.c: Re-generated.
10629 * features/s390-te-linux64.c: Re-generated.
10630 * features/s390-tevx-linux64.c: Re-generated.
10631 * features/s390-vx-linux64.c: Re-generated.
10632 * features/s390x-linux64.c: Re-generated.
10633 * features/s390x-linux64v1.c: Re-generated.
10634 * features/s390x-linux64v2.c: Re-generated.
10635 * features/s390x-te-linux64.c: Re-generated.
10636 * features/s390x-tevx-linux64.c: Re-generated.
10637 * features/s390x-vx-linux64.c: Re-generated.
10638 * features/sparc/sparc32-solaris.c: Re-generated.
10639 * features/sparc/sparc64-solaris.c: Re-generated.
10640 * features/tic6x-c62x.c: Re-generated.
10641 * features/tic6x-c62x-linux.c: Re-generated.
10642 * features/tic6x-c64x.c: Re-generated.
10643 * features/tic6x-c64x-linux.c: Re-generated.
10644 * features/tic6x-c64xp.c: Re-generated.
10645 * features/tic6x-c64xp-linux.c: Re-generated.
10646
10647 2017-07-26 Yao Qi <yao.qi@linaro.org>
10648
10649 * i386-linux-tdep.c (i386_linux_read_description): New function.
10650 (i386_linux_core_read_description): Call
10651 i386_linux_read_description.
10652 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10653 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10654 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10655 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10656 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10657 * x86-linux-nat.c (x86_linux_read_description): Call
10658 i386_linux_read_description.
10659
10660 2017-07-26 Yao Qi <yao.qi@linaro.org>
10661
10662 * NEWS: Mention it.
10663 * features/Makefile (%.c: %.xml): Pass the xml file name to
10664 command "maint print c-tdesc".
10665 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10666 name from 'arg'.
10667
10668 2017-07-26 Yao Qi <yao.qi@linaro.org>
10669
10670 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10671 in-class initialization.
10672 (tdesc_create_feature): Call new instead of XCNEW.
10673 (free_target_description): Ue delete.
10674
10675 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10676
10677 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10678
10679 2017-07-25 Yao Qi <yao.qi@linaro.org>
10680
10681 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10682 constant.
10683 (amd64_x32_init_abi): Likewise.
10684 * amd64-tdep.h (amd64_init_abi): Update declaration.
10685 (amd64_x32_init_abi): Likewise.
10686
10687 2017-07-25 Yao Qi <yao.qi@linaro.org>
10688
10689 PR tdep/21717
10690 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10691 condition for FPSCR.
10692 (arm_linux_store_inferior_registers): Likewise.
10693
10694 2017-07-22 Tom Tromey <tom@tromey.com>
10695
10696 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10697 <syscalls_counts>: Now a std::vector.
10698 (get_catch_syscall_inferior_data): Use "new".
10699 (catch_syscall_inferior_data_cleanup): Use "delete".
10700 (insert_catch_syscall, remove_catch_syscall)
10701 (clear_syscall_counts): Update.
10702
10703 2017-07-22 Tom Tromey <tom@tromey.com>
10704
10705 * break-catch-syscall.c (syscall_catchpoint)
10706 <syscalls_to_be_caught>: Now a std::vector<int>
10707 (~syscall_catchpoint): Remove.
10708 (insert_catch_syscall, remove_catch_syscall)
10709 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10710 (print_mention_catch_syscall, print_recreate_catch_syscall):
10711 Update.
10712 (create_syscall_event_catchpoint): Change type of "filter"
10713 parameter.
10714 (catch_syscall_split_args): Return a std::vector.
10715 (catch_syscall_command_1, catching_syscall_number_1): Update.
10716
10717 2017-07-22 Tom Tromey <tom@tromey.com>
10718
10719 * break-catch-throw.c (struct exception_catchpoint)
10720 <exception_rx>: Now a std::string.
10721 (~exception_catchpoint): Remove.
10722 (print_one_detail_exception_catchpoint): Update.
10723 (handle_gnu_v3_exceptions): Change type of except_rx.
10724 (extract_exception_regexp): Return a std::string.
10725 (catch_exception_command_1): Update.
10726
10727 2017-07-22 Tom Tromey <tom@tromey.com>
10728
10729 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10730 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10731 std::vector.
10732 <catch_all>: Now a bool.
10733 (~signal_catchpoint): Remove.
10734 (signal_catchpoint_insert_location)
10735 (signal_catchpoint_remove_location)
10736 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10737 (signal_catchpoint_print_mention)
10738 (signal_catchpoint_print_recreate)
10739 (signal_catchpoint_explains_signal): Update.
10740 (create_signal_catchpoint): Change type of "filter" and
10741 "catch_all".
10742 (catch_signal_split_args): Return a std::vector. Change type of
10743 "catch_all".
10744 (catch_signal_command): Update.
10745
10746 2017-07-20 Pedro Alves <palves@redhat.com>
10747
10748 * ada-lang.c (ada_language_defn): Make extern.
10749 (_initialize_ada_language): Remove add_language call.
10750 * c-lang.c (c_language_defn, cplus_language_defn)
10751 (asm_language_defn, minimal_language_defn): Make extern.
10752 (_initialize_c_language): Delete.
10753 * completer.c (compare_cstrings): Delete, moved to utils.h.
10754 * d-lang.c (d_language_defn): Make extern.
10755 (_initialize_d_language): Remove add_language calls.
10756 * defs.h (enum language): Add comment.
10757 * f-lang.c (f_language_defn): Make extern.
10758 (_initialize_f_language): Remove add_language call.
10759 * go-lang.c (go_language_defn): Make extern.
10760 (_initialize_go_language): Remove add_language call.
10761 * language.c: Include <algorithm>.
10762 (languages): Redefine as const array.
10763 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10764 (set_language_command): Handle "local". Use for-range loop.
10765 (set_language): Remove loop.
10766 (language_enum): Rewrite.
10767 (language_def, language_str): Remove loops.
10768 (add_language): Delete.
10769 (add_set_language_command): New, based on add_languages.
10770 (skip_language_trampoline): Adjust.
10771 (local_language_defn): Delete.
10772 (language_gdbarch_post_init): Adjust.
10773 (_initialize_language): Remove add_language calls. Call
10774 add_set_language_command.
10775 * language.h (add_language): Delete.
10776 (auto_language_defn)
10777 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10778 (asm_language_defn, c_language_defn, cplus_language_defn)
10779 (d_language_defn, f_language_defn, go_language_defn)
10780 (m2_language_defn, objc_language_defn, opencl_language_defn)
10781 (pascal_language_defn, rust_language_defn): Declare.
10782 * m2-lang.c (m2_language_defn): Make extern.
10783 (_initialize_m2_language): Remove add_language call.
10784 * objc-lang.c (objc_language_defn): Make extern.
10785 (_initialize_objc_language): Remove add_language call.
10786 * opencl-lang.c (opencl_language_defn): Make extern.
10787 (_initialize_opencl_language): Remove add_language call.
10788 * p-lang.c (pascal_language_defn): Make extern.
10789 (_initialize_pascal_language): Delete.
10790 * rust-lang.c (rust_language_defn): Make extern.
10791 (_initialize_rust_language): Delete.
10792 * utils.h (compare_cstrings): New static inline function.
10793
10794 2017-07-20 Pedro Alves <palves@redhat.com>
10795
10796 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10797 (get_var_value): Constify parameters.
10798 (get_int_var_value): Change prototype.
10799 (to_fixed_range_type): Adjust.
10800 * ada-lang.h (get_int_var_value): Change prototype.
10801
10802 2017-07-20 Pedro Alves <palves@redhat.com>
10803
10804 * dwarf2read.c (dw2_lookup_symbol): Use
10805 SYMBOL_MATCHES_SEARCH_NAME.
10806 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10807
10808 2017-07-20 Pedro Alves <palves@redhat.com>
10809
10810 * block.c (block_iter_name_step, block_iter_name_first)
10811 (block_iter_name_next): Delete.
10812 (block_lookup_symbol_primary): Adjust to use
10813 dict_iter_match_first/dict_iter_match_next.
10814 * block.h (block_iter_name_first, block_iter_name_next): Delete
10815 declarations.
10816 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10817 dict_iter_match_first/dict_iter_match_next.
10818
10819 2017-07-20 Pedro Alves <palves@redhat.com>
10820
10821 * cp-support.c (cp_find_first_component_aux): Add missing case for
10822 end of string.
10823
10824 2017-07-18 David Blaikie <dblaikie@gmail.com>
10825
10826 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10827 of dwo_cu's dwo_file.
10828
10829 2017-07-18 Yao Qi <yao.qi@linaro.org>
10830
10831 * remote.c (store_registers_using_G): Remove one line comment.
10832
10833 2017-07-18 Yao Qi <yao.qi@linaro.org>
10834
10835 * regcache.c (regcache_cpy): Simplify it.
10836 (regcache::cpy_no_passthrough): Remove it.
10837 * regcache.h (cpy_no_passthrough): Remove it.
10838 (regcache_dup, regcache_cpy): Update comments.
10839
10840 2017-07-18 Pedro Alves <palves@redhat.com>
10841
10842 * remote-sim.c (sim_command_completer): Adjust to work with a
10843 completion_tracker instead of a VEC.
10844
10845 2017-07-17 Pedro Alves <palves@redhat.com>
10846
10847 * completer.c (complete_source_filenames): New function.
10848 (complete_address_and_linespec_locations): New function.
10849 (location_completer): Use complete_address_and_linespec_locations.
10850 (completion_tracker::build_completion_result): Honor the tracker's
10851 request to suppress append.
10852 * completer.h (completion_tracker::suppress_append_ws)
10853 (completion_tracker::set_suppress_append_ws): New methods.
10854 (completion_tracker::m_suppress_append_ws): New field.
10855 (complete_source_filenames): New declaration.
10856 * linespec.c (linespec_complete_what): New.
10857 (struct ls_parser) <complete_what, completion_word,
10858 completion_quote_char, completion_quote_end, completion_tracker>:
10859 New fields.
10860 (string_find_incomplete_keyword_at_end): New.
10861 (linespec_lexer_lex_string): Record quote char. If in completion
10862 mode, don't throw.
10863 (linespec_lexer_consume_token): Advance the completion word point.
10864 (linespec_lexer_peek_token): Save/restore completion info.
10865 (save_stream_and_consume_token): New.
10866 (set_completion_after_number): New.
10867 (linespec_parse_basic): Set what to complete next depending on
10868 token. Handle function and label completions specially.
10869 (parse_linespec): Disable objc shortcut in completion mode. Set
10870 what to complete next depending on token type. Skip keyword if in
10871 completion mode.
10872 (complete_linespec_component, linespec_complete): New.
10873 * linespec.h (linespec_complete): Declare.
10874
10875 2017-07-17 Pedro Alves <palves@redhat.com>
10876
10877 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10878 Handle 'operator<' / 'operator<<'.
10879
10880 2017-07-17 Pedro Alves <palves@redhat.com>
10881
10882 * completer.c (collect_explicit_location_matches): Handle
10883 MATCH_LABEL.
10884 (convert_explicit_location_to_linespec): New, factored out from
10885 ...
10886 (convert_explicit_location_to_sals): ... this.
10887 (complete_label): New.
10888 (linespec_complete_label, find_label_symbols_in_block): New.
10889 (find_label_symbols): Add completion_mode parameter and adjust to
10890 call find_label_symbols_in_block.
10891 * linespec.h (linespec_complete_label): Declare.
10892
10893 2017-07-17 Pedro Alves <palves@redhat.com>
10894
10895 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10896 complete_symbol_mode parameter.
10897 * cli/cli-cmds.c (complete_command): Get the completion result out
10898 of the handle_brkchars tracker if used a custom word point.
10899 * completer.c: Include "linespec.h".
10900 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10901 (advance_to_expression_complete_word_point): New.
10902 (completion_tracker::completes_to_completion_word): New.
10903 (complete_files_symbols): Pass down
10904 complete_symbol_mode::EXPRESSION.
10905 (explicit_options, probe_options): New.
10906 (collect_explicit_location_matches): Complete on the
10907 explictit_loc->foo instead of word. Use
10908 linespec_complete_function. Handle MATCH_LINE. Handle offering
10909 keyword and options completions.
10910 (backup_text_ptr): Delete.
10911 (skip_keyword): New.
10912 (complete_explicit_location): Remove 'word' parameter. Add
10913 language, quoted_arg_start and quoted_arg_end parameters.
10914 Rewrite, parsing left to right.
10915 (location_completer): Rewrite.
10916 (location_completer_handle_brkchars): New function.
10917 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10918 (enum complete_line_internal_reason): Adjust comments.
10919 (completion_tracker::discard_completions): New.
10920 (completer_handle_brkchars_func_for_completer): Handle
10921 location_completer.
10922 (gdb_custom_word_point_brkchars)
10923 (gdb_org_rl_basic_quote_characters): New.
10924 (gdb_completion_word_break_characters_throw)
10925 (completion_find_completion_word): Handle trackers that use a
10926 custom word point.
10927 (completion_tracker::advance_custom_word_point_by): New.
10928 (completion_tracker::build_completion_result): Don't rely on
10929 readline appending the quote char.
10930 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10931 use a custom word point.
10932 (gdb_rl_attempted_completion_function): Restore
10933 rl_basic_quote_characters.
10934 * completer.h (class completion_tracker): Extend intro comment.
10935 (completion_tracker::set_quote_char)
10936 (completion_tracker::quote_char)
10937 (completion_tracker::set_use_custom_word_point)
10938 (completion_tracker::use_custom_word_point)
10939 (completion_tracker::custom_word_point)
10940 (completion_tracker::set_custom_word_point)
10941 (completion_tracker::advance_custom_word_point_by)
10942 (completion_tracker::completes_to_completion_word)
10943 (completion_tracker::discard_completions): New methods.
10944 (completion_tracker::m_quote_char)
10945 (completion_tracker::m_use_custom_word_point)
10946 (completion_tracker::m_custom_word_point): New fields.
10947 (advance_to_expression_complete_word_point): Declare.
10948 * f-lang.c (f_collect_symbol_completion_matches): Add
10949 complete_symbol_mode parameter.
10950 * language.h (struct language_defn)
10951 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10952 parameter.
10953 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10954 (linespec_complete_function): New function.
10955 (linespec_lexer_lex_keyword): Adjust.
10956 * linespec.h (linespec_keywords, linespec_complete_function): New
10957 declarations.
10958 * location.c (find_end_quote): New function.
10959 (explicit_location_lex_one): Add explicit_completion_info
10960 parameter. Save quoting info. Don't throw if being called for
10961 completion. Don't handle Ada operators here.
10962 (is_cp_operator, skip_op_false_positives, first_of)
10963 (explicit_location_lex_one_function): New function.
10964 (string_to_explicit_location): Replace 'dont_throw' parameter with
10965 an explicit_completion_info pointer parameter. Handle it. Don't
10966 use explicit_location_lex_one to lex function names. Use
10967 explicit_location_lex_one_function instead.
10968 * location.h (struct explicit_completion_info): New.
10969 (string_to_explicit_location): Replace 'dont_throw' parameter with
10970 an explicit_completion_info pointer parameter.
10971 * symtab.c (default_collect_symbol_completion_matches_break_on):
10972 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10973 (default_collect_symbol_completion_matches)
10974 (collect_symbol_completion_matches): Add complete_symbol_mode
10975 parameter.
10976 (collect_symbol_completion_matches_type): Pass down
10977 complete_symbol_mode::EXPRESSION.
10978 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10979 parameter. Handle LINESPEC mode.
10980 * symtab.h (complete_symbol_mode): New.
10981 (default_collect_symbol_completion_matches_break_on)
10982 (default_collect_symbol_completion_matches)
10983 (collect_symbol_completion_matches)
10984 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10985 parameter.
10986
10987 2017-07-17 Pedro Alves <palves@redhat.com>
10988
10989 * utils.c (enum class strncmp_iw_mode): New.
10990 (strcmp_iw): Rename to ...
10991 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10992 parameters. Handle them.
10993 (strncmp_iw): New.
10994 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10995 * utils.h (strncmp_iw): Declare.
10996 (strcmp_iw): Move describing comments here.
10997
10998 2017-07-17 Pedro Alves <palves@redhat.com>
10999
11000 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
11001 CP_OPERATOR_STR.
11002 * c-typeprint.c (is_type_conversion_operator): Use
11003 CP_OPERATOR_STR.
11004 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
11005 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
11006 CP_OPERATOR_LEN.
11007 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
11008 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
11009 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
11010 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
11011 CP_OPERATOR_STR.
11012 * location.c: Include "cp-support.h".
11013 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
11014 CP_OPERATOR_STR.
11015 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
11016 CP_OPERATOR_LEN.
11017
11018 2017-07-17 Pedro Alves <palves@redhat.com>
11019
11020 * cli/cli-cmds.c (complete_command): Use a completion tracker
11021 along with completion_find_completion_word for handle_brkchars
11022 phase.
11023 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
11024 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
11025 (struct gdb_rl_completion_word_info): New.
11026 (gdb_rl_find_completion_word): New.
11027 (completion_find_completion_word): New.
11028 * completer.h (completion_find_completion_word): Declare.
11029
11030 2017-07-17 Pedro Alves <palves@redhat.com>
11031
11032 * ada-lang.c (symbol_completion_match): Adjust comments.
11033 (symbol_completion_add): Replace vector parameter with
11034 completion_tracker parameter. Use it.
11035 (ada_make_symbol_completion_list): Rename to...
11036 (ada_collect_symbol_completion_matches): ... this. Add
11037 completion_tracker parameter and use it.
11038 (ada_language_defn): Adjust.
11039 * break-catch-syscall.c (catch_syscall_completer): Adjust
11040 prototype and work with completion_tracker instead of VEC.
11041 * breakpoint.c (condition_completer): Adjust prototype and work
11042 with completion_tracker instead of VEC.
11043 * c-lang.c (c_language_defn, cplus_language_defn)
11044 (asm_language_defn, minimal_language_defn): Adjust to renames.
11045 * cli/cli-cmds.c (complete_command): Rework using
11046 completion_tracker. Catch exceptions when completing.
11047 * cli/cli-decode.c (integer_unlimited_completer)
11048 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
11049 with completion_tracker instead of VEC.
11050 * command.h (struct completion_tracker): Forward declare.
11051 (completer_ftype, completer_handle_brkchars_ftype): Change
11052 types.
11053 (complete_on_cmdlist, complete_on_enum): Adjust.
11054 * completer.c: Include <algorithm>.
11055 (struct gdb_completer_state): New.
11056 (current_completion): New global.
11057 (readline_line_completion_function): Delete.
11058 (noop_completer, filename_completer)
11059 (filename_completer_handle_brkchars, complete_files_symbols)
11060 (linespec_location_completer): Adjust to work with a
11061 completion_tracker instead of a VEC.
11062 (string_or_empty): New.
11063 (collect_explicit_location_matches): Adjust to work with a
11064 completion_tracker instead of a VEC.
11065 (explicit_location_completer): Rename to ...
11066 (complete_explicit_location): ... this and adjust to work with a
11067 completion_tracker instead of a VEC.
11068 (location_completer): Adjust to work with a completion_tracker
11069 instead of a VEC.
11070 (add_struct_fields): Adjust to work with a completion_list instead
11071 of VEC.
11072 (expression_completer): Rename to ...
11073 (complete_expression): ... this and adjust to work with a
11074 completion_tracker instead of a VEC. Use complete_files_symbols.
11075 (expression_completer): Reimplement on top of complete_expression.
11076 (symbol_completer): Adjust to work with a completion_tracker
11077 instead of a VEC.
11078 (enum complete_line_internal_reason): Add describing comments.
11079 (complete_line_internal_normal_command): Adjust to work with a
11080 completion_tracker instead of a VEC.
11081 (complete_line_internal): Rename to ...
11082 (complete_line_internal_1): ... this and adjust to work with a
11083 completion_tracker instead of a VEC. Assert TEXT is NULL in the
11084 handle_brkchars phase.
11085 (new_completion_tracker): Delete.
11086 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
11087 complete_line_internal_1.
11088 (free_completion_tracker): Delete.
11089 (INITIAL_COMPLETION_HTAB_SIZE): New.
11090 (completion_tracker::completion_tracker)
11091 (completion_tracker::~completion_tracker): New.
11092 (maybe_add_completion): Delete.
11093 (completion_tracker::maybe_add_completion)
11094 (completion_tracker::add_completion)
11095 (completion_tracker::add_completions): New.
11096 (throw_max_completions_reached_error): Delete.
11097 (complete_line): Adjust to work with a completion_tracker instead
11098 of a VEC. Don't create a completion_tracker_t or check for max
11099 completions here.
11100 (command_completer, command_completer_handle_brkchars)
11101 (signal_completer, reg_or_group_completer_1)
11102 (reg_or_group_completer, default_completer_handle_brkchars):
11103 Adjust to work with a completion_tracker.
11104 (gdb_completion_word_break_characters_throw): New.
11105 (gdb_completion_word_break_characters): Reimplement.
11106 (line_completion_function): Delete.
11107 (completion_tracker::recompute_lowest_common_denominator)
11108 (expand_preserving_ws)
11109 (completion_tracker::build_completion_result)
11110 (completion_result::completion_result)
11111 (completion_result::completion_result)
11112 (completion_result::~completion_result)
11113 (completion_result::completion_result)
11114 (completion_result::release_match_list, compare_cstrings)
11115 (completion_result::sort_match_list)
11116 (completion_result::reset_match_list)
11117 (gdb_rl_attempted_completion_function_throw)
11118 (gdb_rl_attempted_completion_function): New.
11119 * completer.h (completion_list, struct completion_result)
11120 (class completion_tracker): New.
11121 (complete_line): Add completion_tracker parameter.
11122 (readline_line_completion_function): Delete.
11123 (gdb_rl_attempted_completion_function): New.
11124 (noop_completer, filename_completer, expression_completer)
11125 (location_completer, symbol_completer, command_completer)
11126 (signal_completer, reg_or_group_completer): Update prototypes.
11127 (completion_tracker_t, new_completion_tracker)
11128 (make_cleanup_free_completion_tracker): Delete.
11129 (enum maybe_add_completion_enum): Delete.
11130 (maybe_add_completion): Delete.
11131 (throw_max_completions_reached_error): Delete.
11132 * corefile.c (complete_set_gnutarget): Adjust to work with a
11133 completion_tracker instead of a VEC.
11134 * cp-abi.c (cp_abi_completer): Adjust to work with a
11135 completion_tracker instead of a VEC.
11136 * d-lang.c (d_language_defn): Adjust.
11137 * disasm.c (disassembler_options_completer): Adjust to work with a
11138 completion_tracker instead of a VEC.
11139 * f-lang.c (f_make_symbol_completion_list): Rename to ...
11140 (f_collect_symbol_completion_matches): ... this. Adjust to work
11141 with a completion_tracker instead of a VEC.
11142 (f_language_defn): Adjust.
11143 * go-lang.c (go_language_defn): Adjust.
11144 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
11145 Adjust to work with a completion_tracker instead of a VEC.
11146 * infrun.c (handle_completer): Likewise.
11147 * interps.c (interpreter_completer): Likewise.
11148 * interps.h (interpreter_completer): Likewise.
11149 * language.c (unknown_language_defn, auto_language_defn)
11150 (local_language_defn): Adjust.
11151 * language.h (language_defn::la_make_symbol_completion_list):
11152 Rename to ...
11153 (language_defn::la_collect_symbol_completion_matches): ... this
11154 and adjust to work with a completion_tracker instead of a VEC.
11155 * m2-lang.c (m2_language_defn): Adjust.
11156 * objc-lang.c (objc_language_defn): Adjust.
11157 * opencl-lang.c (opencl_language_defn): Adjust.
11158 * p-lang.c (pascal_language_defn): Adjust.
11159 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
11160 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
11161 with a completion_tracker.
11162 * rust-lang.c (rust_language_defn): Adjust.
11163 * symtab.c (free_completion_list, do_free_completion_list)
11164 (return_val, completion_tracker): Delete.
11165 (completion_list_add_name, completion_list_add_symbol)
11166 (completion_list_add_msymbol, completion_list_objc_symbol)
11167 (completion_list_add_fields, add_symtab_completions): Add
11168 completion_tracker parameter and use it.
11169 (default_make_symbol_completion_list_break_on_1): Rename to...
11170 (default_collect_symbol_completion_matches_break_on): ... this.
11171 Add completion_tracker parameter and use it instead of allocating
11172 a completion tracker here.
11173 (default_make_symbol_completion_list_break_on): Delete old
11174 implementation.
11175 (default_make_symbol_completion_list): Delete.
11176 (default_collect_symbol_completion_matches): New.
11177 (make_symbol_completion_list): Delete.
11178 (collect_symbol_completion_matches): New.
11179 (make_symbol_completion_type): Rename to ...
11180 (collect_symbol_completion_matches_type): ... this. Add
11181 completion_tracker parameter and use it instead of VEC.
11182 (make_file_symbol_completion_list_1): Rename to...
11183 (collect_file_symbol_completion_matches): ... this. Add
11184 completion_tracker parameter and use it instead of VEC.
11185 (make_file_symbol_completion_list): Delete.
11186 (add_filename_to_list): Use completion_list instead of a VEC.
11187 (add_partial_filename_data::list): Now a completion_list.
11188 (make_source_files_completion_list): Work with a completion_list
11189 instead of a VEC.
11190 * symtab.h: Include "completer.h".
11191 (default_make_symbol_completion_list_break_on)
11192 (default_make_symbol_completion_list, make_symbol_completion_list)
11193 (make_symbol_completion_type, make_file_symbol_completion_list)
11194 (make_source_files_completion_list): Delete.
11195 (default_collect_symbol_completion_matches_break_on)
11196 (default_collect_symbol_completion_matches)
11197 (collect_symbol_completion_matches)
11198 (collect_symbol_completion_matches_type)
11199 (collect_file_symbol_completion_matches)
11200 (make_source_files_completion_list): New.
11201 * top.c (init_main): Don't install a rl_completion_entry_function
11202 hook. Install a rl_attempted_completion_function hook instead.
11203 * tui/tui-layout.c (layout_completer): Adjust to work with a
11204 completion_tracker.
11205 * tui/tui-regs.c (tui_reggroup_completer):
11206 * tui/tui-win.c (window_name_completer, focus_completer)
11207 (winheight_completer): Adjust to work with a completion_tracker.
11208 * value.c: Include "completer.h".
11209 (complete_internalvar): Adjust to work with a completion_tracker.
11210 * value.h (complete_internalvar): Likewise.
11211
11212 2017-07-17 Pedro Alves <palves@redhat.com>
11213
11214 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
11215 renames.
11216 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
11217 comments to completer_ftype's declaration.
11218 <completer_handle_brkchars>: Change type to
11219 completer_handle_brkchars_ftype.
11220 * command.h (completer_ftype): Add describing comment and give
11221 names to parameters.
11222 (completer_ftype_void): Rename to ...
11223 (completer_handle_brkchars_ftype) ... this. Add describing comment.
11224 (set_cmd_completer_handle_brkchars): Adjust.
11225 * completer.c (filename_completer_handle_brkchars): New function.
11226 (complete_line_internal_normal_command): New function, factored
11227 out from ...
11228 (complete_line_internal): ... here.
11229 (command_completer_handle_brkchars)
11230 (default_completer_handle_brkchars)
11231 (completer_handle_brkchars_func_for_completer): New functions.
11232 * completer.h (set_gdb_completion_word_break_characters): Delete
11233 declaration.
11234 (completer_handle_brkchars_func_for_completer): New declaration.
11235 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
11236 completer_handle_brkchars_func_for_completer.
11237
11238 2017-07-17 Pedro Alves <palves@redhat.com>
11239
11240 * completer.c (symbol_completer): New function, based on
11241 make_symbol_completion_list_fn.
11242 * completer.h (symbol_completer): New declaration.
11243 * guile/scm-cmd.c (cmdscm_completers): Adjust.
11244 * python/py-cmd.c (completers): Adjust.
11245 * symtab.c (make_symbol_completion_list_fn): Delete.
11246 * symtab.h (make_symbol_completion_list_fn): Delete.
11247 * cli/cli-decode.c (add_cmd): Adjust.
11248
11249 2017-07-17 Pedro Alves <palves@redhat.com>
11250
11251 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
11252 * dwarf2read.c: Include "filename-seen-cache.h".
11253 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
11254 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
11255 * filename-seen-cache.c: New file.
11256 * filename-seen-cache.h: New file.
11257 * symtab.c: Include "filename-seen-cache.h".
11258 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
11259 (create_filename_seen_cache, clear_filename_seen_cache)
11260 (delete_filename_seen_cache, filename_seen): Delete, parts moved
11261 to filename-seen-cache.h/filename-seen-cache.c.
11262 (output_source_filename, sources_info)
11263 (maybe_add_partial_symtab_filename)
11264 (make_source_files_completion_list): Adjust to use
11265 filename_seen_cache.
11266
11267 2017-07-17 Pedro Alves <palves@redhat.com>
11268
11269 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11270 fields.
11271 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11272 dwarf2_debug_sections*)): New.
11273 (dwarf2_per_objfile::dwarf2_per_objfile(const
11274 dwarf2_per_objfile&)): Declare as deleted.
11275 (dwarf2_per_objfile::operator=): Declare as deleted.
11276 (dwarf2_per_objfile::dwarf2_per_objfile)
11277 (dwarf2_per_objfile::~dwarf2_per_objfile)
11278 (dwarf2_per_objfile::free_cached_comp_units): New.
11279 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11280 ctor. Call dwarf2_per_objfile's ctor manually.
11281 (dwarf2_locate_sections): Deleted/refactored as ...
11282 (dwarf2_per_objfile::locate_sections): ... this new method.
11283 (free_cached_comp_units): Defer to
11284 dwarf2_per_objfile::free_cached_comp_units.
11285 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11286
11287 2017-07-14 Tom Tromey <tom@tromey.com>
11288
11289 PR rust/21764:
11290 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11291 parameter.
11292 <UNOP_SIZEOF>: Split into separate case.
11293 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11294
11295 2017-07-14 Tom Tromey <tom@tromey.com>
11296
11297 PR rust/21763:
11298 * symtab.c (symbol_matches_domain): Add language_rust to special
11299 case.
11300 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11301 treat LOC_TYPEDEF symbols as variables.
11302
11303 2017-07-14 Pedro Alves <palves@redhat.com>
11304
11305 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11306 symtabs matching all symtabs with SRCFILE as file name instead of
11307 only considering the first hit, with lookup_symtab.
11308
11309 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11310
11311 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11312 operator_name parameters.
11313 (gen_expr): Update function call.
11314
11315 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11316
11317 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11318 parameter.
11319 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11320 Likewise.
11321 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11322 parameter, use agent_expr::gdbarch instead, update function
11323 calls.
11324 (locexpr_tracepoint_var_ref): Likewise.
11325 (loclist_tracepoint_var_ref): Likewise.
11326 * ax-gdb.c (gen_trace_static_fields): Likewise.
11327 (gen_traced_pop): Likewise.
11328 (gen_frame_args_address): Likewise.
11329 (gen_frame_locals_address): Likewise.
11330 (gen_var_ref): Likewise.
11331 (gen_struct_ref_recursive): Likewise.
11332 (gen_static_field): Likewise.
11333 (gen_maybe_namespace_elt): Likewise.
11334 (gen_expr): Likewise.
11335 (gen_trace_for_var): Likewise.
11336 (gen_trace_for_expr): Likewise.
11337 (gen_trace_for_return_address): Likewise.
11338
11339 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11340
11341 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11342 parameter.
11343 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11344
11345 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11346
11347 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11348 from ax, update calls.
11349 (gen_usual_arithmetic): Likewise.
11350 (gen_integral_promotions): Likewise.
11351 (gen_bitfield_ref): Likewise.
11352 (gen_primitive_field): Likewise.
11353 (gen_struct_ref_recursive): Likewise.
11354 (gen_struct_ref): Likewise.
11355 (gen_maybe_namespace_elt): Likewise.
11356 (gen_struct_elt_for_reference): Likewise.
11357 (gen_namespace_elt): Likewise.
11358 (gen_aggregate_elt_ref): Likewise.
11359 (gen_expr): Get gdbarch from ax, update calls.
11360 (gen_expr_binop_rest): Likewise.
11361
11362 2017-07-13 Pedro Alves <palves@redhat.com>
11363
11364 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11365 as default tdesc.
11366 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11367 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11368 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11369 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11370 tdep.
11371 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11372 Get final tdesc from the tdep.
11373 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11374 default tdesc.
11375 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11376 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11377 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11378 Use it as default tdesc.
11379 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11380 down to amd_init_abi. No longer handle fallback tdesc here.
11381 * amd64-tdep.h (tdesc_x32): Declare.
11382 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11383 parameter.
11384 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11385 as default tdesc.
11386
11387 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11388
11389 * s390-linux-tdep.c (s390_process_record): Add support for
11390 instructions new in arch12.
11391
11392 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11393
11394 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11395 PT_GETFSBASE and PT_GETGSBASE.
11396 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11397 PT_SETGSBASE.
11398
11399 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11400
11401 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11402 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11403 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11404 those rules.
11405 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11406 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11407 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11408 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11409 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11410 * features/i386/amd64.xml: Add 64bit-segments.xml.
11411 * features/i386/amd64-avx-avx512.c: Regenerated.
11412 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11413 * features/i386/amd64-avx-mpx.c: Regenerated.
11414 * features/i386/amd64-avx.c: Regenerated.
11415 * features/i386/amd64-mpx.c: Regenerated.
11416 * features/i386/amd64.c: Regenerated.
11417 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11418 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11419 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11420 * regformats/i386/amd64-avx.dat: Regenerated.
11421 * regformats/i386/amd64-mpx.dat: Regenerated.
11422 * regformats/i386/amd64.dat: Regenerated.
11423
11424 2017-07-10 Yao Qi <yao.qi@linaro.org>
11425
11426 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11427 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11428
11429 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11430
11431 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11432 unsetenv.
11433 * gnulib/aclocal.m4: Regenerate.
11434 * gnulib/config.in: Regenerate.
11435 * gnulib/configure: Regenerate.
11436 * gnulib/import/Makefile.am: Regenerate.
11437 * gnulib/import/Makefile.in: Regenerate.
11438 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11439 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11440 * gnulib/import/m4/environ.m4: New file.
11441 * gnulib/import/m4/setenv.m4: New file.
11442 * gnulib/import/setenv.c: New file.
11443 * gnulib/import/unsetenv.c: New file.
11444
11445 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11446
11447 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11448 address when op is DW_OP_addr.
11449
11450 2017-07-09 Tom Tromey <tom@tromey.com>
11451
11452 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11453 check and apply to outer type.
11454
11455 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11456
11457 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11458 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11459 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11460 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11461
11462 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11463
11464 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11465
11466 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11467
11468 * corelow.c (get_core_siginfo): Remove.
11469 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11470 instead of get_core_siginfo.
11471 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11472 * gdbarch.h: Re-generate.
11473 * gdbarch.c: Re-generate.
11474 * linux-tdep.c (linux_core_xfer_siginfo): New.
11475 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11476
11477 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11478
11479 * corelow.c (thread_section_name): Move to ...
11480 * gdbcore.h (thread_section_name): ... here.
11481
11482 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11483
11484 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11485 (struct siginfo32): New.
11486 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11487 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11488 via ptrace(PT_LWPINFO).
11489
11490 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11491
11492 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11493 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11494 (fbsd_get_siginfo_type): New.
11495 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11496 (_initialize_fbsd_tdep): New.
11497
11498 2017-07-06 David Blaikie <dblaikie@gmail.com>
11499
11500 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11501 a singular dwo_unit*) to support multiple CUs in the same way that
11502 multiple TUs are supported.
11503 (create_cus_hash_table): Replace create_dwo_cu with a function for
11504 parsing multiple CUs from a DWO file.
11505 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11506 create_dwo_cu.
11507 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11508 htab_find, rather than comparing the signature to a singleton CU in
11509 the dwo_file.
11510
11511 2017-07-06 Pedro Alves <palves@redhat.com>
11512
11513 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11514
11515 2017-07-04 Pedro Alves <palves@redhat.com>
11516
11517 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11518 * gdbtypes.h (TYPE_STATIC): Delete.
11519 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11520 is_synchronized, is_native>: Delete.
11521 <dummy>: Bump.
11522 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11523 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11524 (TYPE_FN_FIELD_ABSTRACT): Delete.
11525
11526 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11527
11528 * buffer.h (buffer_finish): Fix spelling mistakes.
11529
11530 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11531
11532 * .dir-locals.el: Automatically switch to C-style comments in
11533 versions of Emacs that support the feature.
11534
11535 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11536 Pedro Alves <palves@redhat.com>
11537
11538 PR cli/21688
11539 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11540 (process_next_line): New variable 'inline_cmd'.
11541 Adjust 'if' clauses for "python", "compile" and "guile" to use
11542 'command_name_equals' and check for '!inline_cmd'.
11543
11544 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11545
11546 PR cli/21688
11547 * cli/cli-script.c (command_name_equals_not_inline): New function.
11548 (process_next_line): Adjust 'if' clauses for "python", "compile"
11549 and "guile" to use command_name_equals_not_inline.
11550
11551 2017-06-29 Pedro Alves <palves@redhat.com>
11552
11553 * completer.c (expression_completer): Call
11554 linespec_location_completer instead of location_completer.
11555
11556 2017-06-29 Pedro Alves <palves@redhat.com>
11557
11558 * completer.c (expression_completer): Remove code that recomputes
11559 'text' from 'word'.
11560
11561 2017-06-29 Yao Qi <yao.qi@linaro.org>
11562
11563 * regformats/regdat.sh: Generate code with
11564 "ifndef IN_PROCESS_AGENT".
11565
11566 2017-06-28 Pedro Alves <palves@redhat.com>
11567
11568 * command.h: Include "common/scoped_restore.h".
11569
11570 2017-06-28 Yao Qi <yao.qi@linaro.org>
11571
11572 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11573 instead of obstack_grow.
11574
11575 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11576
11577 PR gdb/21337
11578 * symfile.c (reread_symbols): Call objfiles_changed just before
11579 read_symbols.
11580
11581 2017-06-27 Pedro Alves <palves@redhat.com>
11582
11583 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11584 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11585 (completion_list_add_symbol, completion_list_add_msymbol):
11586 ... these new functions.
11587 (add_symtab_completions)
11588 (default_make_symbol_completion_list_break_on_1): Adjust.
11589
11590 2017-06-27 Pedro Alves <palves@redhat.com>
11591
11592 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11593 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11594 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11595 dtor.
11596 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11597 'storage_obstack' field an auto_obstack. In-class initialize all
11598 non-bitfield fields. Make minsyms_read bool.
11599 * symfile.c (read_symbols): Adjust.
11600
11601 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11602
11603 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11604 (gdbsim_store_register): Likewise.
11605
11606 2017-06-27 Pedro Alves <palves@redhat.com>
11607
11608 * c-exp.y (name_obstack): Now an auto_obstack.
11609 (yylex): Use auto_obstack::clear.
11610 (c_parse): Use auto_obstack::clear instead of reinitializing and
11611 freeing the obstack.
11612 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11613 * d-exp.y (name_obstack): Now an auto_obstack.
11614 (yylex): Use auto_obstack::clear.
11615 (d_parse): Use auto_obstack::clear instead of reinitializing and
11616 freeing the obstack.
11617 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11618 auto_obstack.
11619 * dwarf2read.c (create_addrmap_from_index)
11620 (dwarf2_build_psymtabs_hard)
11621 (update_enumeration_type_from_children): Likewise.
11622 * gdb_obstack.h (auto_obstack): New type.
11623 * go-exp.y (name_obstack): Now an auto_obstack.
11624 (build_packaged_name): Use auto_obstack::clear.
11625 (go_parse): Use auto_obstack::clear instead of reinitializing and
11626 freeing the obstack.
11627 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11628 auto_obstack.
11629 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11630 * rust-exp.y (work_obstack): Now an auto_obstack.
11631 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11632 reinitializing and freeing the obstack.
11633 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11634 (host_char_to_target): Use auto_obstack.
11635 * utils.h (make_cleanup_obstack_free): Delete declaration.
11636 * valprint.c (generic_emit_char, generic_printstr): Use
11637 auto_obstack.
11638
11639 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11640
11641 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11642 thread.
11643 (darwin_init_thread_list): Don't update dummy thread.
11644 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11645
11646 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11647
11648 * record-full.c (netorder16): Remove.
11649
11650 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11651
11652 * common/diagnostics.h: Define macros for GCC.
11653 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11654 * common/vec.h: Include diagnostics.h.
11655 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11656 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11657 warning.
11658
11659 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11660
11661 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11662 New macro.
11663 * ada-lex.l: Ignore deprecated register warnings.
11664
11665 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11666
11667 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11668 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11669
11670 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11671
11672 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11673 its own line.
11674
11675 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11676
11677 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11678
11679 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11680
11681 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11682 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11683 (xtensa_register_read_masked): Likewise.
11684
11685 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11686
11687 * common/environ.c (gdb_environ::unset): Update comment.
11688
11689 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11690
11691 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11692 registers.
11693
11694 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11695
11696 * record-full.c (record_full_exec_insn): Use byte_vector.
11697
11698 2017-06-22 Yao Qi <yao.qi@linaro.org>
11699
11700 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11701 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11702
11703 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11704
11705 * remote.c (cached_reg): Move from here...
11706 * regcache.h (cached_reg): ...to here.
11707 * python/py-unwind.c (struct reg_info): Remove.
11708 (cached_frame_info): Use cached_reg_t.
11709 (pyuw_prev_register): Likewise.
11710 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11711 (pyuw_dealloc_cache): Free all registers.
11712
11713 2017-06-22 Pedro Alves <palves@redhat.com>
11714 Simon Marchi <simon.marchi@ericsson.com>
11715
11716 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11717 warning.
11718 * common/diagnostics.h: New file.
11719
11720 2017-06-22 Pedro Alves <palves@redhat.com>
11721
11722 * common/agent.h: Add include guards.
11723
11724 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11725
11726 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11727 talk about addressable units instead of bytes.
11728
11729 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11730
11731 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11732 of '::const_iterator'.
11733
11734 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11735
11736 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11737 'unittests/environ-selftests.c'.
11738 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11739 * charset.c (find_charset_names): Declare object 'iconv_env'.
11740 Update code to use 'iconv_env' object. Remove call to
11741 'free_environ'.
11742 * common/environ.c: Include <utility>.
11743 (make_environ): Delete function.
11744 (free_environ): Delete function.
11745 (gdb_environ::clear): New function.
11746 (gdb_environ::operator=): New function.
11747 (gdb_environ::get): Likewise.
11748 (environ_vector): Delete function.
11749 (set_in_environ): Delete function.
11750 (gdb_environ::set): New function.
11751 (unset_in_environ): Delete function.
11752 (gdb_environ::unset): New function.
11753 (gdb_environ::envp): Likewise.
11754 * common/environ.h: Include <vector>.
11755 (struct gdb_environ): Delete; transform into...
11756 (class gdb_environ): ... this class.
11757 (free_environ): Delete prototype.
11758 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11759 environ_vector): Likewise.
11760 * infcmd.c (run_command_1): Update code to call
11761 'envp' from 'gdb_environ' class.
11762 (environment_info): Update code to call methods from 'gdb_environ'
11763 class.
11764 (unset_environment_command): Likewise.
11765 (path_info): Likewise.
11766 (path_command): Likewise.
11767 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11768 (inferior::inferior): Initialize 'environment' using the host's
11769 information.
11770 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11771 Include "environ.h".
11772 (class inferior) <environment>: Change type from 'struct
11773 gdb_environ' to 'gdb_environ'.
11774 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11775 methods from 'gdb_environ' class.
11776 * solib.c (solib_find_1): Likewise
11777 * unittests/environ-selftests.c: New file.
11778
11779 2017-06-20 Yao Qi <yao.qi@linaro.org>
11780
11781 * features/i386/i386-linux.xml: Exchange the order of including
11782 32bit-linux.xml and 32bit-sse.xml.
11783 * features/i386/i386-linux.c: Regenerated.
11784
11785 2017-06-20 Yao Qi <yao.qi@linaro.org>
11786
11787 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11788 Delete copy ctor and assignment operator.
11789 (tdesc_type): Likewise.
11790 (tdesc_feature): Likewise.
11791 (tdesc_free_reg): Remove.
11792 (tdesc_create_reg): Use new.
11793 (tdesc_free_type): Remove.
11794 (tdesc_create_vector): Use new.
11795 (tdesc_create_union): Likewise.
11796 (tdesc_create_flags): Likewise.
11797 (tdesc_create_enum): Likewise.
11798 (tdesc_free_feature): Delete.
11799 (free_target_description): Use delete.
11800
11801 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11802
11803 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11804 registers.
11805
11806 2017-06-19 Pedro Alves <palves@redhat.com>
11807
11808 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11809 after gdb::unlinker.
11810
11811 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11812
11813 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11814 gdb_environ to access an environment variable.
11815
11816 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11817
11818 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11819 gdb_byte*.
11820
11821 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11822
11823 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11824
11825 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11826
11827 * configure: Re-generate.
11828 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11829
11830 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11831
11832 * configure: Re-generate.
11833 * warning.m4: Pass -Werror to compiler when checking for
11834 supported warning flags.
11835
11836 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11837
11838 * Makefile.in (COMPILE.pre): Add "-x c++".
11839
11840 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11841 Pedro Alves <palves@redhat.com>
11842 Yao Qi <yao.qi@linaro.org>
11843
11844 * defs.h (RequireLongest): New.
11845 (extract_integer): Declare function template.
11846 (extract_signed_integer): Remove the declaration, but define it
11847 static inline.
11848 (extract_unsigned_integer): Likewise.
11849 (store_integer): Declare function template.
11850 (store_signed_integer): Remove the declaration, but define it
11851 static inline.
11852 (store_unsigned_integer): Likewise.
11853 * findvar.c (extract_integer): New function template.
11854 (extract_signed_integer): Remove.
11855 (extract_unsigned_integer): Remove.
11856 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11857 instantiations.
11858 (store_integer): New function template.
11859 (store_signed_integer): Remove.
11860 (store_unsigned_integer): Remove.
11861 (store_integer): Explicit instantiations.
11862 * regcache.c (regcache_raw_read_signed): Update.
11863 (regcache::raw_read): New function.
11864 (regcache::raw_read_signed): Remove.
11865 (regcache::raw_read_unsigned): Remove.
11866 (regcache_raw_read_unsigned): Update.
11867 (regcache_raw_write_unsigned): Update.
11868 (regcache::raw_write_signed): Remove.
11869 (regcache::raw_write): New function.
11870 (regcache_cooked_read_signed): Update.
11871 (regcache::raw_write_unsigned): Remove.
11872 (regcache::cooked_read_signed): Remove.
11873 (regcache_cooked_read_unsigned): Update.
11874 (regcache::cooked_read_unsigned): Remove.
11875 (regcache_cooked_write_signed): Update.
11876 (regcache_cooked_write_unsigned): Update.
11877 * regcache.h (regcache) <raw_read_signed>: Remove.
11878 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11879 <raw_read, raw_write>: New.
11880 <cooked_read_signed, cooked_write_signed>: Remove.
11881 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11882 <cooked_read, cooked_write>: New.
11883 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11884 (sh64_pseudo_register_write): Update.
11885
11886 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11887
11888 * arc-tdep.c (arc_disassembler_options): New variable.
11889 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11890 of default_print_insn.
11891 (arc_delayed_print_insn): Set info->section when needed,
11892 use default_print_insn to retrieve a disassembler.
11893
11894 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11895
11896 PR gdb/21574
11897 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11898 to mention $SHELL and startup-with-shell.
11899
11900 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11901
11902 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11903
11904 2017-06-14 Yao Qi <yao.qi@linaro.org>
11905
11906 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11907 default_print_insn instead of print_insn_aarch64.
11908 * arm-tdep.c (gdb_print_insn_arm): Call
11909 default_print_insn instead of print_insn_big_arm
11910 and print_insn_little_arm.
11911 * i386-tdep.c (i386_print_insn): Call default_print_insn
11912 instead of print_insn_i386.
11913 * ia64-tdep.c (ia64_print_insn): Call
11914 default_print_insn instead of print_insn_ia64.
11915 * mips-tdep.c (gdb_print_insn_mips): Call
11916 default_print_insn instead of print_insn_big_mips
11917 and print_insn_little_mips.
11918 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11919 instead of print_insn_spu.
11920
11921 2017-06-14 Pedro Alves <palves@redhat.com>
11922
11923 * ada-lang.c: Include "common/byte-vector.h".
11924 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11925 * charset.c (wchar_iterator::iterate): Resize the vector instead
11926 of reserving it.
11927 * common/byte-vector.h: Include "common/def-vector.h".
11928 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11929 * cli/cli-dump.c: Include "common/byte-vector.h".
11930 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11931 * common/byte-vector.h: New file.
11932 * common/def-vector.h: New file.
11933 * common/default-init-alloc.h: New file.
11934 * dwarf2loc.c: Include "common/byte-vector.h".
11935 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11936 instead of reserving it.
11937 * dwarf2read.c: Include "common/byte-vector.h".
11938 (data_buf::m_vec): Now a gdb::byte_vector.
11939 * gdb_regex.c: Include "common/def-vector.h".
11940 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11941 * mi/mi-main.c: Include "common/byte-vector.h".
11942 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11943 * printcmd.c: Include "common/byte-vector.h".
11944 (print_scalar_formatted): Use gdb::byte_vector.
11945 * valprint.c: Include "common/byte-vector.h".
11946 (maybe_negate_by_bytes, print_decimal_chars): Use
11947 gdb::byte_vector.
11948
11949 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11950
11951 * darwin-nat.c: Include "nat/fork-inferior.h".
11952
11953 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11954
11955 * configure.nat: Factor out Darwin bits that are not
11956 architecture-specific. Add fork-inferior.o.
11957
11958 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11959
11960 * configure.nat: Factor out AIX bits that are not
11961 architecture-specific. Add fork-inferior.o.
11962
11963 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11964
11965 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11966 (read_pieced_value, write_pieced_value): ...here. Reduce to
11967 wrappers that just call rw_pieced_value.
11968
11969 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11970
11971 * dwarf2loc.c (write_pieced_value): When writing the data for a
11972 memory piece, use write_memory_with_notification instead of
11973 write_memory.
11974
11975 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11976
11977 * valops.c (read_value_memory): Change embedded_offset to
11978 represent a bit offset instead of a byte offset.
11979 * value.h (read_value_memory): Adjust comment.
11980
11981 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11982
11983 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11984 dest_offset_bits and source_offset_bits.
11985 (write_pieced_value): Likewise.
11986
11987 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11988
11989 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11990 given by DW_OP_bit_piece.
11991 (write_pieced_value): Likewise.
11992
11993 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11994
11995 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11996 some other preparations to the places where sufficient information
11997 is available.
11998 (write_pieced_value): Likewise.
11999
12000 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12001
12002 * dwarf2loc.c (bits_to_bytes): New function.
12003 (read_pieced_value): Fix offset calculations for register pieces
12004 on big-endian targets.
12005 (write_pieced_value): Likewise.
12006
12007 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12008
12009 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
12010 (write_pieced_value): Likewise.
12011
12012 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12013
12014 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
12015 transfer the source value's least significant bits, instead of its
12016 lowest-addressed ones. Rename type_len to max_offset.
12017 (read_pieced_value): Mirror above changes to write_pieced_value as
12018 applicable.
12019
12020 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12021
12022 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
12023 truncate full bytes from dest_offset_bits before using it as an
12024 offset into the buffer.
12025
12026 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12027
12028 * dwarf2loc.c (write_pieced_value): Include transfer size in
12029 byte-wise check.
12030
12031 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12032
12033 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
12034 calculation of this_size.
12035
12036 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12037
12038 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
12039 when targeting a bit-field.
12040 (write_pieced_value): Likewise.
12041
12042 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12043
12044 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
12045 (allocate_piece_closure): Drop addr_size parameter.
12046 (dwarf2_evaluate_loc_desc_full): Adjust call to
12047 allocate_piece_closure.
12048
12049 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12050
12051 PR gdb/21226
12052 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
12053 the LSB end, independent of endianness.
12054
12055 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12056
12057 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
12058 size capping.
12059
12060 2017-06-13 Yao Qi <yao.qi@linaro.org>
12061
12062 * mips-linux-nat.c: Move include features/mips*-linux.c to
12063 mips-linux-tdep.c.
12064 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
12065 to mips-linux-tdep.c.
12066 * mips-linux-tdep.c: Include features/mips*-linux.c
12067 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
12068 functions.
12069 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
12070 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
12071 (tdesc_mips64_dsp_linux): Declare.
12072
12073 2017-06-12 Tom Tromey <tom@tromey.com>
12074
12075 * valprint.h (val_print_type_code_int): Remove.
12076 * valprint.c (generic_val_print_int): Always call
12077 val_print_scalar_formatted.
12078 (val_print_type_code_int): Remove.
12079 * printcmd.c (print_scalar_formatted): Handle options->format==0.
12080 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
12081 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
12082 * ada-valprint.c (ada_val_print_num): Use
12083 val_print_scalar_formatted.
12084
12085 2017-06-12 Tom Tromey <tom@tromey.com>
12086
12087 * printcmd.c (print_scalar_formatted): Unify the two switches.
12088 Don't convert scalars to LONGEST.
12089
12090 2017-06-12 Tom Tromey <tom@tromey.com>
12091
12092 PR exp/16225:
12093 * valprint.h (print_decimal_chars): Update.
12094 * valprint.c (maybe_negate_by_bytes): New function.
12095 (print_decimal_chars): Add "is_signed" argument.
12096 * printcmd.c (print_scalar_formatted): Update.
12097
12098 2017-06-12 Tom Tromey <tom@tromey.com>
12099
12100 PR exp/16225:
12101 * valprint.h (print_binary_chars, print_hex_chars): Update.
12102 * valprint.c (val_print_type_code_int): Update.
12103 (print_binary_chars): Add "zero_pad" argument.
12104 (emit_octal_digit): New function.
12105 (print_octal_chars): Don't zero-pad.
12106 (print_decimal_chars): Likewise.
12107 (print_hex_chars): Add "zero_pad" argument.
12108 * sh64-tdep.c (sh64_do_fp_register): Update.
12109 * regcache.c (regcache::dump): Update.
12110 * printcmd.c (print_scalar_formatted): Update.
12111 * infcmd.c (default_print_one_register_info): Update.
12112
12113 2017-06-12 Pedro Alves <palves@redhat.com>
12114 Alan Hayward <alan.hayward@arm.com>
12115
12116 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
12117 (mips_eabi_push_dummy_call): Rename local 'regsize' to
12118 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
12119 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
12120 Assert that abi_regsize bytes fit in 'ref_valbuf'.
12121
12122 2017-06-12 Pedro Alves <palves@redhat.com>
12123
12124 * dwarf2read.c (mapped_symtab::data): Now a vector of
12125 symtab_index_entry instead of vector of
12126 std::unique_ptr<symtab_index_entry>. All users adjusted to check
12127 whether an element's name is NULL instead of checking whether the
12128 element itself is NULL.
12129 (find_slot): Change return type. Adjust.
12130 (hash_expand, , add_index_entry, uniquify_cu_indices)
12131 (write_hash_table): Adjust.
12132
12133 2017-06-12 Pedro Alves <palves@redhat.com>
12134
12135 * dwarf2read.c (recursively_count_psymbols): New function.
12136 (write_psymtabs_to_index): Call it to compute number of psyms and
12137 pass estimate size of psyms_seen to unordered_set's ctor.
12138
12139 2017-06-12 Pedro Alves <palves@redhat.com>
12140
12141 * dwarf2read.c (write_hash_table): Check if key already exists
12142 before emplacing.
12143
12144 2017-06-12 Pedro Alves <palves@redhat.com>
12145
12146 * dwarf2read.c (data_buf::append_space): Rename to...
12147 (data_buf::grow): ... this, and make private. Adjust all callers.
12148 (data_buf::append_uint): New method.
12149 (add_address_entry, write_one_signatured_type)
12150 (write_psymtabs_to_index): Use it.
12151
12152 2017-06-12 Pedro Alves <palves@redhat.com>
12153
12154 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
12155 (file_write (FILE *, const std::vector<Elem>&)): Delete.
12156 (data_buf::file_write): Call ::fwrite directly.
12157
12158 2017-06-12 Pedro Alves <palves@redhat.com>
12159
12160 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
12161 std::vector::erase.
12162
12163 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12164
12165 Code cleanup: C++ify .gdb_index producer.
12166 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
12167 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
12168 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
12169 (create_strtab, add_string): Remove.
12170 (file_write, data_buf): New.
12171 (struct symtab_index_entry): Use std::vector for cu_indices.
12172 (struct mapped_symtab): Use std::vector for data.
12173 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
12174 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
12175 Remove.
12176 (find_slot): Change return type. Update it to the new data structures.
12177 (hash_expand, add_index_entry): Update it to the new data structures.
12178 (offset_type_compare): Remove.
12179 (uniquify_cu_indices): Update it to the new data structures.
12180 (c_str_view, c_str_view_hasher, vector_hasher): New.
12181 (add_indices_to_cpool): Remove.
12182 (write_hash_table): Update it to the new data structures.
12183 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
12184 (eq_psymtab_cu_index): Remove.
12185 (psym_index_map): New typedef.
12186 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
12187 reference and std::unordered_map for cu_index_htab.
12188 (add_address_entry, add_address_entry_worker, write_address_map)
12189 (write_psymbols): Update it to the new data structures.
12190 (write_obstack): Remove.
12191 (struct signatured_type_index_data): Change types_list to a data_buf
12192 reference and psyms_seen to a std::unordered_set reference.
12193 (write_one_signatured_type, recursively_write_psymbols)
12194 (write_psymtabs_to_index): Update it to the new data structures.
12195
12196 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
12197
12198 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
12199 separate-debug-file commands.
12200 * symfile.h (separate_debug_file_debug): New global.
12201 * symfile.c (separate_debug_file_debug): New global.
12202 (separate_debug_file_exists, find_separate_debug_file): Add
12203 debug output.
12204 (_initialize_symfile): Add "set debug separate-debug-file"
12205 command.
12206 * build-id.c (build_id_to_debug_bfd,
12207 find_separate_debug_file_by_buildid): Add debug output.
12208
12209 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
12210
12211 * gdbarch.sh (displaced_step_free_closure): Remove.
12212 * gdbarch.h, gdbarch.c: Re-generate.
12213 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
12214 displaced_step_free_closure.
12215 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
12216 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
12217 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
12218 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12219 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
12220 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12221 * arch-utils.h (simple_displaced_step_free_closure): Remove.
12222 * arch-utils.c (simple_displaced_step_free_closure): Remove.
12223 * infrun.c (displaced_step_clear): Call xfree instead of
12224 gdbarch_displaced_step_free_closure.
12225
12226 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
12227
12228 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
12229 NULL".
12230
12231 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12232
12233 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
12234 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
12235 (mn10300_push_dummy_call): Likewise.
12236
12237 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12238
12239 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
12240
12241 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12242
12243 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
12244
12245 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12246
12247 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
12248 able to start inferiors using a shell.
12249 (New remote packets): Announce new packet "QStartupWithShell".
12250 * remote.c: Add PACKET_QStartupWithShell.
12251 (extended_remote_create_inferior): Handle new
12252 PACKET_QStartupWithShell.
12253 (remote_protocol_features) <QStartupWithShell>: New entry for
12254 PACKET_QStartupWithShell.
12255 (_initialize_remote): Call "add_packet_config_cmd" for
12256 QStartupShell.
12257
12258 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12259 Pedro Alves <palves@redhat.com>
12260
12261 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
12262 and "nat/fork-inferior.h".
12263 * common/common-inferior.h: New file, with contents from
12264 "gdb/inferior.h".
12265 * commom/common-utils.c: Include "common-utils.h".
12266 (stringify_argv): New function.
12267 * common/common-utils.h (stringify_argv): New prototype.
12268 * configure.nat: Add "fork-inferior.o" as a dependency for
12269 "*linux*", "fbsd*" and "nbsd*" hosts.
12270 * corefile.c (get_exec_file): Update comment.
12271 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12272 instead of "startup_inferior".
12273 (darwin_create_inferior): Call "add_thread_silent" after
12274 "fork_inferior".
12275 * fork-child.c: Cleanup unnecessary includes.
12276 (SHELL_FILE): Move to "common/common-fork-child.c".
12277 (environ): Likewise.
12278 (exec_wrapper): Initialize.
12279 (get_exec_wrapper): New function.
12280 (breakup_args): Move to "common/common-fork-child.c"; rename to
12281 "breakup_args_for_exec".
12282 (escape_bang_in_quoted_argument): Move to
12283 "common/common-fork-child.c".
12284 (saved_ui): New variable.
12285 (prefork_hook): New function.
12286 (postfork_hook): Likewise.
12287 (postfork_child_hook): Likewise.
12288 (gdb_startup_inferior): Likewise.
12289 (fork_inferior): Move to "common/common-fork-child.c". Update
12290 function to support gdbserver.
12291 (startup_inferior): Likewise.
12292 * gdbcore.h (get_exec_file): Remove declaration.
12293 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12294 instead of "startup_inferior". Call "add_thread_silent" after
12295 "fork_inferior".
12296 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12297 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12298 instead of "startup_inferior". Call "add_thread_silent" after
12299 "fork_inferior".
12300 * inferior.h: Include "common-inferior.h".
12301 (trace_start_error): Move to "common/common-utils.h".
12302 (trace_start_error_with_name): Likewise.
12303 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12304 (startup_inferior): Likewise.
12305 (gdb_startup_inferior): New prototype.
12306 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12307 * nat/fork-inferior.h: New file.
12308 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12309 instead of "startup_inferior". Call "add_thread_silent" after
12310 "fork_inferior".
12311 * target.h (target_terminal_init): Move prototype to
12312 "target/target.h".
12313 (target_terminal_inferior): Likewise.
12314 (target_terminal_ours): Likewise.
12315 * target/target.h (target_terminal_init): New prototype, moved
12316 from "target.h".
12317 (target_terminal_inferior): Likewise.
12318 (target_terminal_ours): Likewise.
12319 * utils.c (gdb_flush_out_err): New function.
12320
12321 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12322
12323 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12324 * common/common-gdbthread.h: New file, with parts from
12325 "gdb/gdbthread.h".
12326 * gdbthread.h: Include "common-gdbthread.h".
12327 (switch_to_thread): Moved to "common/common-gdbthread.h".
12328
12329 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12330
12331 * Makefile.in (SFILES): Add "common/job-control.c".
12332 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12333 (COMMON_OBS): Add "job-control.o".
12334 * common/job-control.c: New file, with contents from
12335 "gdb/inflow.c".
12336 * common/job-control.h: New file, with contents from "terminal.h".
12337 * fork-child.c: Include "job-control.h".
12338 * inflow.c: Include "job-control.h".
12339 (gdb_setpgid): Move to "common/common-inflow.c".
12340 (_initialize_inflow): Move setting of "job_control" to
12341 "handle_job_control".
12342 * terminal.h (job_control): Moved to "common/common-terminal.h".
12343 (gdb_setpgid): Likewise.
12344 * top.c: Include "job_control.h".
12345 * utils.c: Likewise.
12346 (job_control): Moved to "job-control.c".
12347
12348 2017-06-07 Pedro Alves <palves@redhat.com>
12349
12350 * Makefile.in (SFILES): Add gdb_regex.c.
12351 (COMMON_OBS): Add gdb_regex.o.
12352 * ada-lang.c (ada_add_standard_exceptions)
12353 (ada_add_exceptions_from_frame, name_matches_regex)
12354 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12355 parameter type to compiled_regex. Adjust.
12356 (ada_exceptions_list): Use compiled_regex.
12357 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12358 std::unique_ptr<compiled_regex>.
12359 (exception_catchpoint::~exception_catchpoint): Remove regfree
12360 call.
12361 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12362 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12363 * breakpoint.c (solib_catchpoint::compiled): Now a
12364 std::unique_ptr<compiled_regex>.
12365 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12366 (check_status_catch_solib): Adjust to use compiled_regex.
12367 (add_solib_catchpoint): Adjust to use compiled_regex.
12368 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12369 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12370 compiled_regex reference. Adjust to use it.
12371 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12372 declaration. Include "gdb_regex.h".
12373 (apropos_cmd): Change regex parameter to compiled_regex reference.
12374 * gdb_regex.c: New file.
12375 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12376 declarations.
12377 (class compiled_regex): New.
12378 * linux-tdep.c: Include "common/gdb_optional.h".
12379 (struct mapping_regexes): New, factored out from
12380 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12381 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12382 gdb::optional and remove cleanups. Adjust to compiled_regex.
12383 * probe.c: Include "common/gdb_optional.h".
12384 (collect_probes): Use compiled_regex and gdb::optional and remove
12385 cleanups.
12386 * skip.c: Include "common/gdb_optional.h".
12387 (skiplist_entry::compiled_function_regexp): Now a
12388 gdb::optional<compiled_regex>.
12389 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12390 (free_skiplist_entry): Remove regfree call.
12391 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12392 compiled_regex and gdb::optional.
12393 * symtab.c: Include "common/gdb_optional.h".
12394 (search_symbols): Use compiled_regex and gdb::optional.
12395 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12396 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12397 to gdb_regex.c.
12398
12399 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12400
12401 * regcache.c (regcache::save): Avoid buffer use.
12402 (regcache::dump): Likewise.
12403
12404 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12405
12406 * sh-tdep.c (sh_pseudo_register_read): Remove
12407 MAX_REGISTER_SIZE.
12408 (sh_pseudo_register_write): Likewise.
12409 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12410 (sh64_pseudo_register_write): Likewise
12411
12412 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12413
12414 * aarch64-tdep.c (aarch64_store_return_value): Use
12415 V_REGISTER_SIZE.
12416 (aarch64_pseudo_read_value): Likewise.
12417 (aarch64_pseudo_write): Likewise.
12418
12419 2017-06-06 Yao Qi <yao.qi@linaro.org>
12420
12421 * regformats/regdef.h (set_register_cache): Remove the
12422 declaration.
12423
12424 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12425
12426 * frame.c (frame_unwind_register_signed): Use
12427 frame_unwind_register_value.
12428
12429 2017-06-06 Pedro Alves <palves@redhat.com>
12430
12431 PR breakpoints/21553
12432 * breakpoint.c (create_breakpoints_sal_default)
12433 (init_breakpoint_sal, create_breakpoint_sal): Use
12434 gdb::unique_xmalloc_ptr for string parameters.
12435 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12436 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12437 (base_breakpoint_create_breakpoints_sal)
12438 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12439 (strace_marker_create_breakpoints_sal)
12440 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12441 string parameters.
12442 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12443 gdb::unique_xmalloc_ptr for string parameters.
12444 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12445 parameters.
12446
12447 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12448
12449 * alpha-tdep.c (alpha_register_to_value): Use
12450 get_frame_register_value.
12451 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12452
12453 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12454
12455 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12456 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12457 (ia64_value_to_register): Likewise.
12458 (ia64_extract_return_value): Likewise.
12459 (ia64_store_return_value): Likewise.
12460 (ia64_push_dummy_call): Likewise.
12461
12462 2017-06-04 Joel Brobecker <brobecker@adacore.com>
12463
12464 GDB 8.0 released.
12465
12466 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12467
12468 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12469
12470 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12471
12472 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12473 parameter.
12474 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12475
12476 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12477
12478 * event-loop.c (poll_timers): Unallocate timer using delete
12479 instead of xfree.
12480
12481 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12482
12483 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12484 (struct breakpoint) <~breakpoint>: New.
12485 (struct watchpoint): Inherit from breakpoint.
12486 <~watchpoint>: New.
12487 <base>: Remove.
12488 (struct tracepoint): Inherit from breakpoint.
12489 <base>: Remove.
12490 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12491 (struct longjmp_breakpoint): Inherit from breakpoint.
12492 <~longjmp_breakpoint>: New.
12493 <base>: Remove.
12494 (new_breakpoint_from_type): Remove casts.
12495 (watchpoint_in_thread_scope): Remove reference to base field.
12496 (watchpoint_del_at_next_stop): Likewise.
12497 (update_watchpoint): Likewise.
12498 (watchpoint_check): Likewise.
12499 (bpstat_check_watchpoint): Likewise.
12500 (set_longjmp_breakpoint): Likewise.
12501 (struct fork_catchpoint): Inherit from breakpoint.
12502 <base>: Remove.
12503 (struct solib_catchpoint): Inherit from breakpoint.
12504 <~solib_catchpoint>: New.
12505 <base>: Remove.
12506 (dtor_catch_solib): Change to ...
12507 (solib_catchpoint::~solib_catchpoint): ... this.
12508 (breakpoint_hit_catch_solib): Remove reference to base field.
12509 (add_solib_catchpoint): Likewise.
12510 (create_fork_vfork_event_catchpoint): Likewise.
12511 (struct exec_catchpoint): Inherit from breakpoint.
12512 <~exec_catchpoint>: New.
12513 <base>: Remove.
12514 (dtor_catch_exec): Change to ...
12515 (exec_catchpoint::~exec_catchpoint): ... this.
12516 (dtor_watchpoint): Change to ...
12517 (watchpoint::~watchpoint): ... this.
12518 (watch_command_1): Remove reference to base field.
12519 (catch_exec_command_1): Likewise.
12520 (base_breakpoint_dtor): Change to ...
12521 (breakpoint::~breakpoint): ... this.
12522 (base_breakpoint_ops): Remove dtor field value.
12523 (longjmp_bkpt_dtor): Change to ...
12524 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12525 (strace_marker_create_breakpoints_sal): Remove reference to base
12526 field.
12527 (delete_breakpoint): Don't manually call breakpoint destructor.
12528 (create_tracepoint_from_upload): Remove reference to base field.
12529 (trace_pass_set_count): Likewise.
12530 (initialize_breakpoint_ops): Don't initialize
12531 momentary_breakpoint_ops, don't set dtors.
12532 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12533 <~ada_catchpoint>: New.
12534 <base>: Remove.
12535 (create_excep_cond_exprs): Remove reference to base field.
12536 (dtor_exception): Change to ...
12537 (ada_catchpoint::~ada_catchpoint): ... this.
12538 (dtor_catch_exception): Remove.
12539 (dtor_catch_exception_unhandled): Remove.
12540 (dtor_catch_assert): Remove.
12541 (create_ada_exception_catchpoint): Remove reference to base
12542 field.
12543 (initialize_ada_catchpoint_ops): Don't set dtors.
12544 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12545 breakpoint.
12546 <~signal_catchpoint>: New.
12547 <base>: Remove.
12548 (signal_catchpoint_dtor): Change to ...
12549 (signal_catchpoint::~signal_catchpoint): ... this.
12550 (create_signal_catchpoint): Remove reference to base field.
12551 (initialize_signal_catchpoint_ops): Don't set dtor.
12552 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12553 from breakpoint.
12554 <~syscall_catchpoint>: New.
12555 <base>: Remove.
12556 (dtor_catch_syscall): Change to ...
12557 (syscall_catchpoint::~syscall_catchpoint): ... this.
12558 (create_syscall_event_catchpoint): Remove reference to base
12559 field.
12560 (initialize_syscall_catchpoint_ops): Don't set dtor.
12561 * break-catch-throw.c (struct exception_catchpoint): Inherit
12562 from breakpoint.
12563 <~exception_catchpoint>: New.
12564 <base>: Remove.
12565 (dtor_exception_catchpoint): Change to ...
12566 (exception_catchpoint::~exception_catchpoint): ... this.
12567 (handle_gnu_v3_exceptions): Remove reference to base field.
12568 (initialize_throw_catchpoint_ops): Don't set dtor.
12569 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12570 field.
12571 * remote.c (remote_get_tracepoint_status): Likewise.
12572 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12573 * tracefile.c (tracefile_fetch_registers): Likewise.
12574 * tracepoint.c (actions_command): Likewise.
12575 (validate_actionline): Likewise.
12576 (tfind_1): Likewise.
12577 (get_traceframe_location): Likewise.
12578 (find_matching_tracepoint_location): Likewise.
12579 (parse_tracepoint_status): Likewise.
12580 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12581
12582 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12583
12584 * breakpoint.c (struct longjmp_breakpoint): New struct.
12585 (is_tracepoint_type): Change return type to bool.
12586 (is_longjmp_type): New function.
12587 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12588 (set_raw_breakpoint_without_location): Use
12589 new_breakpoint_from_type.
12590 (set_raw_breakpoint): Likewise.
12591
12592 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12593
12594 * breakpoint.c (new_breakpoint_from_type): New function.
12595 (create_breakpoint_sal): Use new_breakpoint_from_type and
12596 unique_ptr.
12597 (create_breakpoint): Likewise.
12598
12599 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12600
12601 * memattr.c (mem_info_command): Rename to ...
12602 (info_mem_command): ... this.
12603 (mem_enable_command): Rename to ...
12604 (enable_mem_command): ... this.
12605 (mem_disable_command): Rename to ...
12606 (disable_mem_command): ... this.
12607 (mem_delete_command): Rename to ...
12608 (delete_mem_command): ... this.
12609 (_initialize_mem): Adjust function names.
12610
12611 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12612
12613 * btrace.c (handle_pt_insn_events): New.
12614 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12615 STATUS. Split into this and ...
12616 (handle_pt_insn_event_flags): ... this.
12617
12618 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12619
12620 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12621 and struct pt_insn.resynced.
12622 * configure: Regenerated.
12623 * config.in: Regenerated.
12624
12625 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12626
12627 * btrace.c (ftrace_find_call_by_number): New function.
12628 (ftrace_new_function): Store objects, not pointers.
12629 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12630 ftrace_new_gap, ftrace_update_function,
12631 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12632 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12633 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12634 btrace_ends_with_single_insn, btrace_call_get): Account for
12635 btrace_thread_info::functions now storing objects.
12636 * btrace.h (struct btrace_thread_info): Add constructor.
12637 (struct btrace_thread_info) <functions>: Make std::vector.
12638 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12639 Initialize with default values.
12640 * record-btrace.c (record_btrace_frame_sniffer): Account for
12641 btrace_thread_info::functions now storing objects.
12642
12643 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12644
12645 * btrace.c: Remove typedef bfun_s.
12646 (ftrace_new_gap): Directly add gaps to the list of gaps.
12647 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12648 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12649 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12650 instead of gdb VEC.
12651
12652 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12653
12654 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12655 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12656 with btrace_thread_info::next_segment and
12657 btrace_thread_info::prev_segment.
12658 * btrace.h: Remove struct btrace_func_link.
12659 (struct btrace_function): Replace pair of function segment pointers
12660 with pair of indices.
12661 * python/py-record-btrace.c (btpy_call_prev_sibling,
12662 btpy_call_next_sibling): Replace references to
12663 btrace_thread_info::segment with btrace_thread_info::next_segment and
12664 btrace_thread_info::prev_segment.
12665 * record-btrace.c (record_btrace_frame_this_id): Use
12666 btrace_find_call_by_number.
12667
12668 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12669
12670 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12671 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12672 btrace_insn_next, btrace_insn_prev): Remove references to
12673 btrace_thread_info::flow.
12674 * btrace.h (struct btrace_function): Remove FLOW.
12675
12676 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12677
12678 * btrace.c (ftrace_find_call_by_number): New function.
12679 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12680 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12681 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12682 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12683 index.
12684 * btrace.h (struct btrace_function): Turn UP into an index.
12685 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12686 as an index.
12687 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12688 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12689 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12690
12691 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12692
12693 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12694 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12695 ftrace_update_function, ftrace_compute_global_level_offset,
12696 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12697 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12698 btrace_insn_end, btrace_is_empty): Remove references to
12699 btrace_thread_info::begin and btrace_thread_info::end.
12700 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12701 (struct btrace_thread_info) <functions>: Adjust comment.
12702 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12703 btrace_thread_info::begin.
12704
12705 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12706
12707 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12708 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12709 ftrace_update_function): Remove arguments that implicitly were always
12710 BTINFO->END.
12711 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12712 Don't pass BTINFO->END.
12713
12714 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12715
12716 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12717 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12718 btrace_find_insn_by_number): Replace function segment pointer with
12719 index.
12720 (btrace_insn_cmp): Simplify.
12721 * btrace.h: (struct btrace_insn_iterator) Rename index to
12722 insn_index. Replace function segment pointer with index into function
12723 segment vector.
12724 * record-btrace.c (record_btrace_call_history): Replace function
12725 segment pointer use with index.
12726 (record_btrace_frame_sniffer): Retrieve function call segment through
12727 vector.
12728 (record_btrace_set_replay): Remove defunc't safety check.
12729
12730 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12731
12732 * btrace.c (btrace_ends_with_single_insn): New function.
12733 (btrace_call_get, btrace_call_number, btrace_call_begin,
12734 btrace_call_end, btrace_call_next, btrace_call_prev,
12735 btrace_find_call_by_number): Use index into call segment vector
12736 instead of pointer.
12737 (btrace_call_cmp): Simplify.
12738 * btrace.h (struct btrace_call_iterator): Replace function call segment
12739 pointer with index into vector.
12740 * record-btrace.c (record_btrace_call_history): Use index instead of
12741 pointer.
12742
12743 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12744
12745 * btrace.c (btrace_insn_begin, btrace_insn_end,
12746 btrace_find_insn_by_number): Add btinfo to iterator.
12747 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12748
12749 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12750
12751 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12752 and save pointers directly.
12753 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12754 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12755 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12756 changed signature of functions.
12757 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12758 (btrace_fetch): Remove code that adds btrace_function pointers to
12759 vector of btrace_functions.
12760 (btrace_clear): Simplify freeing vector of btrace_functions.
12761
12762 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12763
12764 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12765 Replace VEC_* with std::vector functions.
12766 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12767 (struct btrace_thread_info)<functions>: Change type to std::vector.
12768
12769 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12770
12771 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12772 "Removed targets and native configurations" up. Merge duplicate
12773 "New commands" sub-sections. Add "New options" sub-sections.
12774
12775 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12776
12777 * defs.h (copy_integer_to_size): New declaration.
12778 * findvar.c (copy_integer_to_size): New function.
12779 (do_cint_test): New selftest function.
12780 (copy_integer_to_size_test): Likewise.
12781 (_initialize_findvar): Likewise.
12782 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12783 (mips_fbsd_collect_reg): Use raw_collect_integer.
12784 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12785 (mips64_fill_gregset): Use raw_collect_integer
12786 (mips64_fill_fpregset): Use raw_supply_integer.
12787 * regcache.c (regcache::raw_supply_integer): New function.
12788 (regcache::raw_collect_integer): Likewise.
12789 * regcache.h: (regcache::raw_supply_integer): New declaration.
12790 (regcache::raw_collect_integer): Likewise.
12791
12792 2017-05-24 Yao Qi <yao.qi@linaro.org>
12793
12794 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12795 (COMMON_OBS): Add gdbarch-selftests.o.
12796 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12797 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12798 * gdbarch-selftests.c: New file.
12799 * regcache.h (regcache) <~regcache>: Mark it virtual if
12800 GDB_SELF_TEST.
12801 <raw_write>: Likewise.
12802
12803 2017-05-24 Yao Qi <yao.qi@linaro.org>
12804
12805 * regcache.c (current_regcache): Change it to
12806 regcache::current_regcache.
12807 (regcache_observer_target_changed): Update.
12808 (regcache_thread_ptid_changed): Make it a regcache static
12809 method.
12810 (regcache_thread_ptid_changed): Update.
12811 (class regcache_access): New.
12812 (current_regcache_test): Update.
12813 (_initialize_regcache): Update.
12814 * regcache.h: Include forward_list.
12815 (regcache): Declare regcache_thread_ptid_changed and declare
12816 registers_changed_ptid as friend.
12817
12818 2017-05-24 Yao Qi <yao.qi@linaro.org>
12819
12820 * i387-tdep.c (i387_register_to_value): Use register_size
12821 instead of TYPE_LENGTH.
12822 * m68k-tdep.c (m68k_register_to_value): Likewise.
12823
12824 2017-05-24 Yao Qi <yao.qi@linaro.org>
12825
12826 * i387-tdep.c (i387_convert_register_p): Return false if type
12827 code isn't TYPE_CODE_FLT.
12828
12829 2017-05-24 Yao Qi <yao.qi@linaro.org>
12830
12831 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12832 length is 4.
12833 (alpha_register_to_value): Remove type length check.
12834 (alpha_value_to_register): Likewise.
12835
12836 2017-05-24 Yao Qi <yao.qi@linaro.org>
12837
12838 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12839 TYPE_CODE_FLT.
12840
12841 2017-05-24 Yao Qi <yao.qi@linaro.org>
12842
12843 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12844 TYPE_CODE_FLT or not.
12845
12846 2017-05-24 Yao Qi <yao.qi@linaro.org>
12847
12848 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12849 * avr-tdep.c (avr_gdbarch_init): Likewise.
12850 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12851 * cris-tdep.c (cris_gdbarch_init): Likewise.
12852 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12853 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12854 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12855 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12856 * mep-tdep.c (mep_gdbarch_init): Likewise.
12857 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12858 * mips-tdep.c (mips_gdbarch_init): Likewise.
12859 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12860 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12861 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12862 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12863 * v850-tdep.c (v850_gdbarch_init): Likewise.
12864
12865 2017-05-24 Yao Qi <yao.qi@linaro.org>
12866
12867 * selftest-arch.c (tests_with_arch): Call registers_changed
12868 and reinit_frame_cache.
12869 * selftest.c (run_self_tests): Likewise.
12870
12871 2017-05-24 Yao Qi <yao.qi@linaro.org>
12872
12873 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12874 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12875
12876 2017-05-24 Yao Qi <yao.qi@linaro.org>
12877
12878 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12879 set_gdbarch_print_insn.
12880
12881 2017-05-24 Yao Qi <yao.qi@linaro.org>
12882
12883 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12884 set_gdbarch_print_insn.
12885
12886 2017-05-24 Yao Qi <yao.qi@linaro.org>
12887
12888 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12889 set_gdbarch_print_insn.
12890 * arc-tdep.c (arc_gdbarch_init): Likewise.
12891 * arch-utils.c: include dis-asm.h.
12892 (default_print_insn): New function.
12893 * arch-utils.h (default_print_insn): Declare.
12894 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12895 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12896 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12897 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12898 * frv-tdep.c (frv_gdbarch_init): Likewise.
12899 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12900 * gdbarch.sh (print_insn): Use default_print_insn.
12901 * gdbarch.c: Regenerated.
12902 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12903 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12904 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12905 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12906 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12907 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12908 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12909 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12910 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12911 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12912 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12913 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12914 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12915 * mt-tdep.c (mt_gdbarch_init): Likewise.
12916 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12917 * nios2-tdep.c (nios2_print_insn): Remove.
12918 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12919 * rx-tdep.c (rx_gdbarch_init): Likewise.
12920 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12921 * score-tdep.c (score_print_insn): Remove.
12922 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12923 * sh-tdep.c (sh_gdbarch_init): Likewise.
12924 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12925 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12926 * tic6x-tdep.c (tic6x_print_insn): Remove.
12927 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12928 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12929 * v850-tdep.c (v850_gdbarch_init): Likewise.
12930 * vax-tdep.c (vax_gdbarch_init): Likewise.
12931 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12932 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12933
12934 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12935
12936 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12937 (MIPS_FP0_REGNUM): Remove.
12938 (MIPS_FSR_REGNUM): Remove.
12939 (mips_fbsd_supply_fpregs): Use mips_regnum.
12940 (mips_fbsd_supply_gregs): Likewise.
12941 (mips_fbsd_collect_fpregs): Likewise.
12942 (mips_fbsd_collect_gregs): Likewise.
12943
12944 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12945
12946 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12947 (getpfpregs_supplies): New function.
12948 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12949 getfpregs_supplies.
12950 (mips_fbsd_store_inferior_registers): Likewise.
12951
12952 2017-05-22 Pedro Alves <palves@redhat.com>
12953
12954 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12955 maintainer.
12956
12957 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12958
12959 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12960 (store_register): Likewise.
12961 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12962 (get_decimal_float_return_value): Likewise.
12963 (do_ppc_sysv_return_value): Likewise.
12964 (ppc64_sysv_abi_push_integer): Likewise.
12965 (ppc64_sysv_abi_push_freg): Likewise.
12966 (ppc64_sysv_abi_return_value_base): Likewise.
12967 (ppc64_sysv_abi_return_value): Likewise.
12968 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12969 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12970 * rs6000-nat.c: Likewise.
12971 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12972 (rs6000_value_to_register): Likewise.
12973 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12974
12975 2017-05-21 Tom Tromey <tom@tromey.com>
12976
12977 PR rust/21466:
12978 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12979 arrays as "[T]", not "[T; ]".
12980
12981 2017-05-19 Tom Tromey <tom@tromey.com>
12982
12983 PR rust/21484:
12984 * rust-lang.c (exp_descriptor_rust): New function.
12985 (rust_language_defn): Use it.
12986 * p-lang.c (pascal_language_defn): Update.
12987 * opencl-lang.c (opencl_language_defn): Update.
12988 * objc-lang.c (objc_language_defn): Update.
12989 * m2-lang.c (m2_language_defn): Update.
12990 * language.h (struct language_defn)
12991 <la_watch_location_expression>: New member.
12992 * language.c (unknown_language_defn, auto_language_defn)
12993 (local_language_defn): Update.
12994 * go-lang.c (go_language_defn): Update.
12995 * f-lang.c (f_language_defn): Update.
12996 * d-lang.c (d_language_defn): Update.
12997 * c-lang.h (c_watch_location_expression): Declare.
12998 * c-lang.c (c_watch_location_expression): New function.
12999 (c_language_defn, cplus_language_defn, asm_language_defn)
13000 (minimal_language_defn): Use it.
13001 * breakpoint.c (watch_command_1): Call
13002 la_watch_location_expression.
13003 * ada-lang.c (ada_language_defn): Update.
13004
13005 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13006
13007 PR tui/21482
13008 * gdb_curses.h (NOMACROS): Define.
13009 (NCURSES_NOMACROS): Define.
13010
13011 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13012
13013 PR tui/21482
13014 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
13015 arg to char *.
13016 * tui/tui-wingeneral.c (box_win): Likewise.
13017 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
13018 (tui_show_source_line): Likewise.
13019 (tui_show_exec_info_content): Likewise.
13020
13021 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13022
13023 * sparc-tdep.c (sparc_structure_return_p)
13024 (sparc_arg_on_registers_p): New functions.
13025 (sparc32_store_arguments): Use them.
13026 * sparc64-tdep.c (sparc64_16_byte_align_p)
13027 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
13028 Handle TYPE_CODE_ARRAY.
13029
13030 2017-05-17 Yao Qi <yao.qi@linaro.org>
13031
13032 * cli/cli-decode.c (add_alias_cmd): New function.
13033 * command.h (add_alias_cmd): Declare.
13034 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
13035 instead call add_alias_cmd.
13036
13037 2017-05-17 Pedro Alves <palves@redhat.com>
13038
13039 * Makefile.in (nat_extra_makefile_frag): Rename to ...
13040 (nat_makefile_frag): ... this. All references updated.
13041 * configure.ac: Likewise.
13042 * configure.nat: Likewise. Enhance comments.
13043 * configure: Regenerate.
13044
13045 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13046
13047 * procfs.c (procfs_create_inferior): Change prototype to match
13048 definition.
13049
13050 2017-05-13 Eli Zaretskii <eliz@gnu.org>
13051
13052 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
13053 C++ compiler warning.
13054
13055 2017-05-12 Tom Tromey <tom@tromey.com>
13056
13057 PR rust/21483:
13058 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
13059 recurse, just call value_struct_elt directly.
13060
13061 2017-05-12 Tom Tromey <tom@tromey.com>
13062
13063 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
13064 OP_RUST_ARRAY>: Fix.
13065
13066 2017-05-12 Tom Tromey <tom@tromey.com>
13067
13068 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
13069
13070 2017-05-09 Yao Qi <yao.qi@linaro.org>
13071
13072 * regcache.c: Include <forward_list>.
13073 (struct regcache_list): Remove.
13074 (current_regcache): Update.
13075 (get_thread_arch_aspace_regcache): Update for std::forward_list.
13076 (regcache_thread_ptid_changed): Likewise.
13077 (registers_changed_ptid): Likewise.
13078 (current_regcache_size): Likewise.
13079
13080 2017-05-09 Yao Qi <yao.qi@linaro.org>
13081
13082 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
13083 (current_regcache_size): New function.
13084 (current_regcache_test): New function.
13085 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
13086
13087 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13088
13089 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
13090 (print_gp_register_row): Use get_frame_register_value.
13091
13092 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13093
13094 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
13095 (mips_supply_fpregset): Likewise.
13096 (mips64_supply_gregset): Likewise.
13097
13098 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13099
13100 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
13101 regcache->raw_supply_zeroed.
13102
13103 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
13104
13105 * configure.nat: Rearrange 'case' statements to match
13106 host before cpu.
13107
13108 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
13109
13110 * Makefile.in: Remove "@host_makefile_frag@". Add variables
13111 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
13112 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
13113 "@nat_extra_makefile_frag@".
13114 (Makefile): Remove dependency on "@frags@".
13115 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
13116 (data-directory/Makefile): Likewise.
13117 * config/aarch64/linux.mh: Deleted; moved contents to
13118 "gdb/configure.nat".
13119 * config/alpha/alpha-linux.mh: Likewise.
13120 * config/alpha/nbsd.mh: Likewise.
13121 * config/arm/linux.mh: Likewise.
13122 * config/arm/nbsdelf.mh: Likewise.
13123 * config/i386/cygwin.mh: Likewise.
13124 * config/i386/cygwin64.mh: Likewise.
13125 * config/i386/darwin.mh: Likewise.
13126 * config/i386/fbsd.mh: Likewise.
13127 * config/i386/fbsd64.mh: Likewise.
13128 * config/i386/go32.mh: Likewise.
13129 * config/i386/i386gnu.mh: Likewise.
13130 * config/i386/i386sol2.mh: Likewise.
13131 * config/i386/linux.mh: Likewise.
13132 * config/i386/linux64.mh: Likewise.
13133 * config/i386/mingw.mh: Likewise.
13134 * config/i386/mingw64.mh: Likewise.
13135 * config/i386/nbsd64.mh: Likewise.
13136 * config/i386/nbsdelf.mh: Likewise.
13137 * config/i386/nto.mh: Likewise.
13138 * config/i386/obsd.mh: Likewise.
13139 * config/i386/obsd64.mh: Likewise.
13140 * config/i386/sol2-64.mh: Likewise.
13141 * config/ia64/linux.mh: Likewise.
13142 * config/m32r/linux.mh: Likewise.
13143 * config/m68k/linux.mh: Likewise.
13144 * config/m68k/nbsdelf.mh: Likewise.
13145 * config/m68k/obsd.mh: Likewise.
13146 * config/m88k/obsd.mh: Likewise.
13147 * config/mips/fbsd.mh: Likewise.
13148 * config/mips/linux.mh: Likewise.
13149 * config/mips/nbsd.mh: Likewise.
13150 * config/mips/obsd64.mh: Likewise.
13151 * config/pa/linux.mh: Likewise.
13152 * config/pa/nbsd.mh: Likewise.
13153 * config/pa/obsd.mh: Likewise.
13154 * config/powerpc/aix.mh: Likewise.
13155 * config/powerpc/fbsd.mh: Likewise.
13156 * config/powerpc/linux.mh: Likewise.
13157 * config/powerpc/nbsd.mh: Likewise.
13158 * config/powerpc/obsd.mh: Likewise.
13159 * config/powerpc/ppc64-linux.mh: Likewise.
13160 * config/powerpc/spu-linux.mh: Likewise.
13161 * config/s390/linux.mh: Likewise.
13162 * config/sh/nbsd.mh: Likewise.
13163 * config/sparc/fbsd.mh: Likewise.
13164 * config/sparc/linux.mh: Likewise.
13165 * config/sparc/linux64.mh: Likewise.
13166 * config/sparc/nbsd64.mh: Likewise.
13167 * config/sparc/nbsdelf.mh: Likewise.
13168 * config/sparc/obsd64.mh: Likewise.
13169 * config/sparc/sol2.mh: Likewise.
13170 * config/tilegx/linux.mh: Likewise.
13171 * config/vax/nbsdelf.mh: Likewise.
13172 * config/vax/obsd.mh: Likewise.
13173 * config/xtensa/linux.mh: Likewise.
13174 * config/i386/i386gnu.mn: New file, with excerpts from
13175 "config/i386/i386gnu.mh".
13176 * configure: Regenerate.
13177 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
13178 *.mh files under "gdb/config".
13179 * configure.nat: New file, with contents from the
13180 "gdb/config/*/*.mh" files.
13181
13182 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
13183
13184 * btrace.c (btrace_clear): Free insn vector.
13185
13186 2017-05-05 Pedro Alves <palves@redhat.com>
13187
13188 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
13189 * configure: Regenerate.
13190
13191 2017-05-04 Pedro Alves <palves@redhat.com>
13192
13193 * Makefile.in (SFILES): Add progspace-and-thread.c.
13194 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
13195 (COMMON_OBS): Add progspace-and-thread.o.
13196 * breakpoint.c: Include "progspace-and-thread.h".
13197 (update_inserted_breakpoint_locations)
13198 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
13199 Use scoped_restore_current_pspace_and_thread.
13200 (create_std_terminate_master_breakpoint): Use
13201 scoped_restore_current_program_space.
13202 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
13203 (print_breakpoint_location): Use
13204 scoped_restore_current_program_space.
13205 (bp_loc_is_permanent): Use
13206 scoped_restore_current_pspace_and_thread.
13207 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
13208 (download_tracepoint_locations): Use
13209 scoped_restore_current_pspace_and_thread.
13210 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
13211 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
13212 (enum step_over_calls_kind): Moved from inferior.h.
13213 (class scoped_restore_current_thread): New class.
13214 * gdbthread.h (make_cleanup_restore_current_thread): Delete
13215 declaration.
13216 (scoped_restore_current_thread): New class.
13217 * infcmd.c: Include "common/gdb_optional.h".
13218 (continue_1, proceed_after_attach): Use
13219 scoped_restore_current_thread.
13220 (notice_new_inferior): Use scoped_restore_current_thread.
13221 * inferior.c: Include "progspace-and-thread.h".
13222 (restore_inferior, save_current_inferior): Delete.
13223 (add_inferior_command, clone_inferior_command): Use
13224 scoped_restore_current_pspace_and_thread.
13225 * inferior.h (scoped_restore_current_inferior): New class.
13226 * infrun.c: Include "progspace-and-thread.h" and
13227 "common/gdb_optional.h".
13228 (follow_fork_inferior): Use
13229 scoped_restore_current_pspace_and_thread.
13230 (scoped_restore_exited_inferior): New class.
13231 (handle_vfork_child_exec_or_exit): Use
13232 scoped_restore_exited_inferior,
13233 scoped_restore_current_pspace_and_thread,
13234 scoped_restore_current_thread and scoped_restore.
13235 (fetch_inferior_event): Use scoped_restore_current_thread.
13236 * linespec.c (decode_line_full, decode_line_1): Use
13237 scoped_restore_current_program_space.
13238 * mi/mi-main.c: Include "progspace-and-thread.h".
13239 (exec_continue): Use scoped_restore_current_thread.
13240 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
13241 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
13242 * proc-service.c (ps_pglobal_lookup): Use
13243 scoped_restore_current_program_space.
13244 * progspace-and-thread.c: New file.
13245 * progspace-and-thread.h: New file.
13246 * progspace.c (release_program_space, clone_program_space): Use
13247 scoped_restore_current_program_space.
13248 (restore_program_space, save_current_program_space)
13249 (save_current_space_and_thread): Delete.
13250 (switch_to_program_space_and_thread): Moved to
13251 progspace-and-thread.c.
13252 * progspace.h (save_current_program_space)
13253 (save_current_space_and_thread): Delete declarations.
13254 (scoped_restore_current_program_space): New class.
13255 * remote.c (remote_btrace_maybe_reopen): Use
13256 scoped_restore_current_thread.
13257 * symtab.c: Include "progspace-and-thread.h".
13258 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
13259 * thread.c (print_thread_info_1): Use
13260 scoped_restore_current_thread.
13261 (struct current_thread_cleanup): Delete.
13262 (do_restore_current_thread_cleanup)
13263 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
13264 (scoped_restore_current_thread::~scoped_restore_current_thread):
13265 ... this new dtor.
13266 (make_cleanup_restore_current_thread): Rename/convert to ...
13267 (scoped_restore_current_thread::scoped_restore_current_thread):
13268 ... this new ctor.
13269 (thread_apply_all_command): Use scoped_restore_current_thread.
13270 (thread_apply_command): Use scoped_restore_current_thread.
13271 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13272 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13273
13274 2017-05-04 Pedro Alves <palves@redhat.com>
13275
13276 * thread.c (make_cleanup_restore_current_thread): Move
13277 find_thread_ptid call before the is_stopped call. Assert that the
13278 thread is found. Replace is_stopped call by checking the thread's
13279 state directly. Remove unnecessary NULL-thread check.
13280
13281 2017-05-04 Pedro Alves <palves@redhat.com>
13282
13283 * corelow.c (thread_section_name): New class.
13284 (get_core_register_section, get_core_siginfo): Use it.
13285
13286 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13287
13288 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13289 (get_core_register_section): Remove xfree of NULL pointer.
13290
13291 2017-05-03 Alan Hayward <alan.hayward@arm.com>
13292
13293 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13294 * regcache.c (regcache::raw_supply_zeroed): New function.
13295 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13296
13297 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13298
13299 * gdbarch.sh: Remove commented out definition of
13300 TARGET_CHAR_BIT.
13301 * gdbarch.h: Re-generate.
13302
13303 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13304
13305 * configure: Regenerate.
13306
13307 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13308
13309 * solib-target.c (solib_target_relocate_section_addresses):
13310 Remove num_section_bases, num_bases, segment_bases variables.
13311
13312 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13313
13314 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13315
13316 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13317
13318 * solib-target.c: Include <vector>
13319 (struct lm_info_target) <~lm_info_target>: Remove.
13320 <segment_bases, section_bases>: Change type to
13321 std::vector<CORE_ADDR>.
13322 (library_list_start_segment, library_list_start_section,
13323 library_list_end_library,
13324 solib_target_relocate_section_addresses): Adjust.
13325
13326 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13327
13328 * gdbarch.sh (software_single_step): Change return type to
13329 std::vector<CORE_ADDR>.
13330 * gdbarch.c, gdbarch.h: Re-generate.
13331 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13332 Adjust.
13333 (arm_deal_with_atomic_sequence_raw): Adjust.
13334 (thumb_get_next_pcs_raw): Adjust.
13335 (arm_get_next_pcs_raw): Adjust.
13336 (arm_get_next_pcs): Adjust.
13337 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13338 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13339 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13340 (alpha_software_single_step): Adjust.
13341 * alpha-tdep.h (alpha_software_single_step): Adjust.
13342 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13343 * arm-tdep.c (arm_software_single_step): Adjust.
13344 (arm_breakpoint_kind_from_current_state): Adjust.
13345 * arm-tdep.h (arm_software_single_step): Adjust.
13346 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13347 * cris-tdep.c (cris_software_single_step): Adjust.
13348 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13349 (micromips_deal_with_atomic_sequence): Adjust.
13350 (deal_with_atomic_sequence): Adjust.
13351 (mips_software_single_step): Adjust.
13352 * mips-tdep.h (mips_software_single_step): Adjust.
13353 * moxie-tdep.c (moxie_software_single_step): Adjust.
13354 * nios2-tdep.c (nios2_software_single_step): Adjust.
13355 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13356 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13357 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13358 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13359 * sparc-tdep.c (sparc_software_single_step): Adjust.
13360 * spu-tdep.c (spu_software_single_step): Adjust.
13361 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13362
13363 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13364
13365 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13366 * gdbarch.h: Re-generate.
13367
13368 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13369
13370 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13371 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13372 * python/py-instruction.c, python/py-instruction.h: New file.
13373 * python/py-record.c: Add py-instruction.h include.
13374 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13375 gdb.RecordInstruction.
13376 * python/python-internal.h: Add gdbpy_initialize_instruction
13377 declaration.
13378 * python/python.c (do_start_initialization): Add
13379 gdbpy_initialize_instruction.
13380
13381 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13382
13383 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13384 Remove.
13385 (btrace_func_from_recpy_func): New function.
13386 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13387 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13388 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13389 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13390 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13391 Also, use new helper functions.
13392 (btpy_list_item): Use new helper functions.
13393 (recpy_bt_function_call_history): Use new type name.
13394 (btpy_call_getset): Remove.
13395 (gdbpy_initialize_btrace): Remove code to initialize
13396 gdb.BtraceFunctionCall.
13397 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13398 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13399 recpy_bt_func_prev, recpy_bt_func_next): New export.
13400 * python/py-record.c (recpy_func_type): New static object.
13401 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13402 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13403 recpy_func_next): New function.
13404 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13405 (recpy_func_getset): New static object.
13406 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13407 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13408
13409 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13410
13411 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13412 (btpy_object, btpy_insn_type, btpy_new): Remove.
13413 (btpy_list_object): Use gdb.RecordInstruction type instead of
13414 gdb.BtraceInstruction type.
13415 (btrace_insn_from_recpy_insn): New function.
13416 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13417 btpy_new.
13418 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13419 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13420 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13421 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13422 instead of btpy_object.
13423 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13424 btpy_insn_data, btpy_insn_decode): Rename to ...
13425 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13426 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13427 recpy_bt_insn_decode): This. Also, use new helper functions.
13428 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13429 recpy_insn_type.
13430 (btpy_insn_getset): Remove.
13431 (gdbpy_initialize_btrace): Remove code to initialize
13432 gdb.BtraceInstruction. Use recpy_element_object.
13433 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13434 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13435 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13436 * python/py-record.c (recpy_insn_type): New static object.
13437 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13438 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13439 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13440 New function.
13441 (recpy_insn_getset): New static object.
13442 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13443 * python/py-record.h (recpy_element_object): New typedef.
13444 (recpy_insn_type, recpy_insn_new): New export.
13445
13446 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13447
13448 * py-record-btrace.c (btpy_insn_new): Removed.
13449 (btpy_insn_or_gap_new): New function.
13450 (btpy_insn_error): Removed.
13451 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13452 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13453 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13454 btpy_insn_or_gap_new instead of btpy_insn_new.
13455 (btpy_insn_getset): Remove btpy_insn_error.
13456 * py-record.c (recpy_gap_type): New static object.
13457 (recpy_gap_object): New typedef.
13458 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13459 recpy_gap_reason_string): New function.
13460 (recpy_gap_getset): New static object.
13461 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13462 * py-record.h (recpy_gap_new): New export.
13463
13464 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13465
13466 * python/py-record.c (recpy_ptid): Remove.
13467 (recpy_record_getset): Remove recpy_ptid.
13468
13469 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13470
13471 * btrace.c (btrace_fetch): Set inferior_ptid.
13472 * python/py-record-btrace.c: Add "py-record.h" include.
13473 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13474 recpy_bt_end, recpy_bt_instruction_history,
13475 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13476 in gdb.Record object instead of current ptid.
13477 * python/py-record.c: Include new "py-record.h" file.
13478 (recpy_record_object): Moved to py-record.h.
13479 * python/py-record.h: New file.
13480
13481 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13482
13483 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13484 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13485 indentation.
13486
13487 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13488
13489 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13490 the past maintainers section.
13491
13492 2017-04-28 Yao Qi <yao.qi@linaro.org>
13493
13494 * infcmd.c (get_return_value): Use regcache ctor, and remove
13495 cleanup.
13496
13497 2017-04-28 Yao Qi <yao.qi@linaro.org>
13498 Pedro Alves <palves@redhat.com>
13499
13500 * regcache.c (regcache::regcache): New tag dispatch ctor.
13501 (do_cooked_read): Moved above.
13502 (regcache_dup): Use the tag dispatch ctor..
13503 * regcache.h (regcache): Declare ctor, delete copy ctor and
13504 assignment operator, remove friend regcache_dup.
13505
13506 2017-04-28 Yao Qi <yao.qi@linaro.org>
13507
13508 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13509 call method save instead of regcache_cpy.
13510 * regcache.h (struct regcache): Make regcache_dup a friend.
13511
13512 2017-04-28 Yao Qi <yao.qi@linaro.org>
13513
13514 * regcache.c (struct regcache): Move to regcache.h
13515 (regcache::arch): New method.
13516 (regcache_get_ptid): Update.
13517 (get_regcache_arch): Call arch method.
13518 (get_regcache_aspace): Call method aspace.
13519 (register_buffer): Change it to method.
13520 (regcache_save): Change it to regcache::save.
13521 (regcache_restore): Likewise.
13522 (regcache_cpy_no_passthrough): Remove the declaration.
13523 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13524 (regcache_cpy_no_passthrough): Change it to method
13525 cpy_no_passthrough.
13526 (regcache_register_status): Change it to method
13527 get_register_status.
13528 (regcache_invalidate): Change it to method invalidate.
13529 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13530 (regcache_raw_update): Change it to method raw_update.
13531 (regcache_raw_read): Likewise.
13532 (regcache_raw_read_signed): Likewise.
13533 (regcache_raw_read_unsigned): Likewise.
13534 (regcache_raw_write_signed): Likewise.
13535 (regcache_raw_write_unsigned): Likewise.
13536 (regcache_cooked_read): Likewise.
13537 (regcache_cooked_read_value): Likewise.
13538 (regcache_cooked_read_signed): Likewise.
13539 (regcache_cooked_read_unsigned): Likewise.
13540 (regcache_cooked_write_signed): Likewise.
13541 (regcache_cooked_write_unsigned): Likewise.
13542 (regcache_raw_set_cached_value): Likewise.
13543 (regcache_raw_write): Likewise.
13544 (regcache_cooked_write): Likewise.
13545 (regcache_xfer_part): Likewise.
13546 (regcache_raw_read_part): Likewise.
13547 (regcache_raw_write_part): Likewise.
13548 (regcache_cooked_read_part): Likewise.
13549 (regcache_cooked_write_part): Likewise.
13550 (regcache_raw_supply): Likewise.
13551 (regcache_raw_collect): Likewise.
13552 (regcache_transfer_regset): Likewise.
13553 (regcache_supply_regset): Likewise.
13554 (regcache_collect_regset): Likewise.
13555 (regcache_debug_print_register): Likewise.
13556 (enum regcache_dump_what): Move it to regcache.h.
13557 (regcache_dump): Change it to method dump.
13558 * regcache.h (enum regcache_dump_what): New.
13559 (class regcache): New.
13560 * target.c (target_fetch_registers): Call method
13561 debug_print_register.
13562 (target_store_registers): Likewise.
13563
13564 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13565
13566 * windows-nat.c (struct lm_info_windows): Initialize field.
13567 (windows_make_so): Allocate lm_info_windows with new.
13568 (windows_free_so): Free lm_info_windows with delete.
13569
13570 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13571
13572 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13573 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13574 cleanup.
13575 (darwin_free_so): Free lm_info_darwin with delete.
13576
13577 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13578
13579 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13580 <l_addr_p>: Change type to bool.
13581 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13582 (svr4_free_so): Free lm_info_svr4 with delete.
13583 (svr4_copy_library_list): Replace memcpy with call to copy
13584 constructor.
13585 (library_list_start_library, svr4_default_sos): Allocate
13586 lm_info_svr4 with new.
13587
13588 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13589
13590 * solib-target.c (struct lm_info_target): Add destructor,
13591 initialize fields.
13592 <name>: Change type to std::string.
13593 (library_list_start_library): Allocate lm_info_target with new.
13594 (solib_target_free_library_list): Free lm_info_target with
13595 delete.
13596 (solib_target_current_sos): Adapt to std::string.
13597 (solib_target_free_so): Free lm_info_target with delete.
13598
13599 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13600
13601 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13602 fields.
13603 (frv_current_sos): Allocate lm_info_frv with new.
13604 (frv_relocate_main_executable): Free lm_info_frv with delete,
13605 allocate with new.
13606 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13607
13608 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13609
13610 * solib-frv.c (struct lm_info_frv): Fix indentation.
13611
13612 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13613
13614 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13615 map field.
13616 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13617 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13618 and allocate with new.
13619 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13620
13621 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13622
13623 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13624 <filename, member_name>: Change type to std::string.
13625 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13626 (library_list_start_library): Allocate lm_info_aix with new.
13627 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13628 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13629 with copy constructor.
13630
13631 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13632
13633 * solist.h (struct lm_info): Remove.
13634 (struct lm_info_base): New class.
13635 (struct so_list) <lm_info>: Change type to lm_info_base *.
13636 * nto-tdep.c (struct lm_info): Remove.
13637 (lm_addr): Adjust.
13638 * solib-aix.c (struct lm_info): Rename to ...
13639 (struct lm_info_aix): ... this. Extend lm_info_base.
13640 (lm_info_p): Rename to ...
13641 (lm_info_aix_p): ... this, and adjust.
13642 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13643 solib_aix_parse_libraries, library_list_start_library,
13644 solib_aix_free_library_list, solib_aix_parse_libraries,
13645 solib_aix_get_library_list,
13646 solib_aix_relocate_section_addresses, solib_aix_free_so,
13647 solib_aix_get_section_offsets,
13648 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13649 Adjust.
13650 (struct solib_aix_inferior_data) <library_list>: Adjust.
13651 * solib-darwin.c (struct lm_info): Rename to ...
13652 (struct lm_info_darwin): ... this. Extend lm_info_base.
13653 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13654 * solib-dsbt.c (struct lm_info): Rename to ...
13655 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13656 (struct dsbt_info) <main_executable_lm_info): Adjust.
13657 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13658 dsbt_relocate_section_addresses): Adjust.
13659 * solib-frv.c (struct lm_info): Rename to ...
13660 (struct lm_info_frv): ... this. Extend lm_info_base.
13661 (main_executable_lm_info): Adjust.
13662 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13663 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13664 find_canonical_descriptor_in_load_object,
13665 frv_fdpic_find_canonical_descriptor): Adjust.
13666 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13667 to lm_info_svr4.
13668 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13669 svr4_clear_so, svr4_copy_library_list,
13670 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13671 svr4_current_sos, svr4_fetch_objfile_link_map,
13672 solist_update_incremental): Adjust.
13673 * solib-svr4.h (struct lm_info_svr4): Move here from
13674 solib-svr4.c.
13675 * solib-target.c (struct lm_info): Rename to ...
13676 (struct lm_info_target): ... this. Extend lm_info_base.
13677 (lm_info_p): Rename to ...
13678 (lm_info_target_p): ... this.
13679 (solib_target_parse_libraries, library_list_start_segment,
13680 library_list_start_section, library_list_start_library,
13681 library_list_end_library, solib_target_free_library_list,
13682 solib_target_current_sos, solib_target_free_so,
13683 solib_target_relocate_section_addresses): Adjust.
13684 * windows-nat.c (struct lm_info): Rename to ...
13685 (struct lm_info_windows): ... this. Extend lm_info_base.
13686 (windows_make_so, handle_load_dll, handle_unload_dll,
13687 windows_xfer_shared_libraries): Adjust.
13688
13689 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13690
13691 * solib-darwin.c (struct darwin_so_list): Remove.
13692 (darwin_current_sos): Allocate an so_list object instead of a
13693 darwin_so_list, separately allocate an lm_info object.
13694 (darwin_free_so): Free lm_info.
13695
13696 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13697
13698 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13699 with fprintf_filtered.
13700
13701 2017-04-28 Yao Qi <yao.qi@linaro.org>
13702
13703 * regcache.c (regcache::regcache): New function.
13704 (regcache::~regcache): New function.
13705 (regcache_xmalloc_1): Remove.
13706 (regcache_xmalloc): Call new regcache.
13707 (regcache_xfree): Call delete regcache.
13708 (get_thread_arch_aspace_regcache): Call new regcache.
13709
13710 2017-04-28 Yao Qi <yao.qi@linaro.org>
13711
13712 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13713 lwp instead of ptid_get_lwp.
13714
13715 2017-04-28 Yao Qi <yao.qi@linaro.org>
13716
13717 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13718 lwp_info instead of getting from inferior_ptid.
13719
13720 2017-04-27 Keith Seitz <keiths@redhat.com>
13721
13722 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13723 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13724 (CV_CONVERSION_BADNESS): Define.
13725 (rank_one_type): Remove overly restrictive rvalue reference
13726 rank checks.
13727 Add cv-qualifier checks and subranks for type equality.
13728 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13729 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13730 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13731
13732 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13733
13734 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13735 count when creating the object.
13736
13737 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13738 Ulrich Weigand <uweigand@de.ibm.com>
13739
13740 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13741 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13742 is used in AIX.
13743 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13744 (process_xcoff_symbol): Likewise.
13745 (scan_xcoff_symtab): Likewise.
13746
13747 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13748
13749 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13750 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13751 (ia64_access_reg): Use get_frame_register_unsigned.
13752 (ia64_access_rse_reg): Likewise.
13753 (ia64_libunwind_frame_prev_register): Likewise.
13754
13755 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13756
13757 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13758 * gdbarch.c: Regenerated.
13759 * gdbarch.h: Regenerated.
13760 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13761 visibility external.
13762 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13763 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13764 (enum cfa_how_kind): Move to ...
13765 (struct dwarf2_frame_state_reg_info): Likewise.
13766 (struct dwarf2_frame_state): Likewise.
13767 * dwarf2-frame.h: ... here.
13768 (dwarf2_frame_state_alloc_regs): New declaration.
13769 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13770 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13771
13772 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13773
13774 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13775 regcache_raw_read_unsigned.
13776 (xtensa_pseudo_register_write): Likewise.
13777
13778 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13779
13780 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13781 (nds32_pseudo_register_write): Likewise.
13782
13783 2017-04-25 Yao Qi <yao.qi@linaro.org>
13784
13785 * regcache.c (struct regcache) <readonly_p>: Change its type
13786 to bool.
13787 (regcache_xmalloc_1): Update parameter type and callers update.
13788
13789 2017-04-25 Yao Qi <yao.qi@linaro.org>
13790
13791 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13792 set_gdbarch_wchar_bit.
13793 * arm-tdep.c (arm_gdbarch_init): Likewise.
13794
13795 2017-04-25 Pedro Alves <palves@redhat.com>
13796
13797 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13798 (BothAreRelocatable, memcopy, memmove): Don't define.
13799 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13800 macros.
13801
13802 2017-04-25 Pedro Alves <palves@redhat.com>
13803
13804 * common/common-defs.h: Include "common/poison.h".
13805 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13806 and adjust.
13807 * common/poison.h: New file.
13808 * common/traits.h: Include <type_traits>.
13809 (Not, Or, Requires): New, moved from common/function-view.h.
13810
13811 2017-04-25 Pedro Alves <palves@redhat.com>
13812
13813 * breakpoint.h (struct breakpoint): In-class initialize all
13814 fields. Make boolean fields "bool".
13815 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13816 memset call and initializations no longer necessary.
13817
13818 2017-04-25 Pedro Alves <palves@redhat.com>
13819
13820 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13821 reference.
13822 (pt_btrace_insn): New function.
13823 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13824
13825 2017-04-25 Pedro Alves <palves@redhat.com>
13826
13827 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13828 "base" field and inherit from "bp_location" instead. Add
13829 non-default ctor.
13830 (allocate_location_exception): Use new non-default ctor.
13831 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13832 (init_bp_location): Convert to ...
13833 (bp_location::bp_location): ... this new ctor, and remove memset
13834 call.
13835 (base_breakpoint_allocate_location): Use the new non-default ctor.
13836 * breakpoint.h (bp_location): Now a class. Declare default and
13837 non-default ctors. In-class initialize all members.
13838 (init_bp_location): Remove declaration.
13839
13840 2017-04-25 Pedro Alves <palves@redhat.com>
13841
13842 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13843 assignment operator.
13844
13845 2017-04-24 Yao Qi <yao.qi@linaro.org>
13846
13847 * doublest.c (convert_doublest_to_floatformat): Call
13848 floatformat_totalsize_bytes.
13849
13850 2017-04-22 Tom Tromey <tom@tromey.com>
13851
13852 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13853 ui_out_emit_list.
13854 * stack.c (print_frame): Use ui_out_emit_list.
13855 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13856 ui_out_emit_list.
13857 * mi/mi-main.c (print_one_inferior)
13858 (mi_cmd_data_list_register_names)
13859 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13860 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13861 ui_out_emit_list.
13862 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13863 (mi_output_solib_attribs): Use ui_out_emit_list,
13864 ui_out_emit_tuple.
13865 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13866 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13867 (mi_cmd_stack_list_args, list_args_or_locals): Use
13868 ui_out_emit_list.
13869 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13870 * breakpoint.c (print_solib_event, output_thread_groups): Use
13871 ui_out_emit_list.
13872
13873 2017-04-22 Tom Tromey <tom@tromey.com>
13874
13875 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13876 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13877 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13878
13879 2017-04-22 Tom Tromey <tom@tromey.com>
13880
13881 * tracepoint.c (tvariables_info_1)
13882 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13883
13884 2017-04-22 Tom Tromey <tom@tromey.com>
13885
13886 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13887 annotate_arg_emitter.
13888 * breakpoint.c (print_mention_watchpoint)
13889 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13890 * annotate.h (struct annotate_arg_emitter): New.
13891
13892 2017-04-22 Tom Tromey <tom@tromey.com>
13893
13894 * record-btrace.c (record_btrace_insn_history)
13895 (record_btrace_insn_history_range, record_btrace_call_history)
13896 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13897 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13898 ui_out_emit_tuple.
13899 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13900 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13901 * skip.c (skip_info): Use ui_out_emit_tuple.
13902 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13903 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13904 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13905 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13906 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13907 ui_out_emit_tuple.
13908 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13909 (output_register, mi_cmd_data_read_memory)
13910 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13911 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13912 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13913 Use ui_out_emit_tuple.
13914 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13915 ui_out_emit_tuple.
13916 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13917 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13918 * linux-thread-db.c (info_auto_load_libthread_db): Use
13919 ui_out_emit_tuple.
13920 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13921 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13922 * disasm.c (do_mixed_source_and_assembly_deprecated)
13923 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13924 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13925 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13926 * breakpoint.c (print_one_breakpoint_location)
13927 (print_one_breakpoint): Use ui_out_emit_tuple.
13928 * auto-load.c (print_script, info_auto_load_cmd): Use
13929 ui_out_emit_tuple.
13930 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13931
13932 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13933
13934 * thread.c (print_thread_info_1): Remove dead code.
13935
13936 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13937
13938 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13939 GDB_SELF_TEST.
13940 * arm-tdep.c (selftests::arm_record_test): Likewise.
13941
13942 2017-04-21 Yao Qi <yao.qi@linaro.org>
13943
13944 * regcache.c (regcache_restore): Remove argument 2. Replace
13945 argument 3 with regcache. Get register status from
13946 src->register_status and get register contents from
13947 register_buffer (src, regnum).
13948 (regcache_cpy): Update.
13949
13950 2017-04-19 Pedro Alves <palves@redhat.com>
13951
13952 * gdbthread.h (thread): Add missing closing parenthesis in
13953 comment.
13954
13955 2017-04-19 Pedro Alves <palves@redhat.com>
13956
13957 * common/refcounted-object.h: New file.
13958 * gdbthread.h: Include "common/refcounted-object.h".
13959 (thread_info): Inherit from refcounted_object and add comments.
13960 (thread_info::incref, thread_info::decref)
13961 (thread_info::m_refcount): Delete.
13962 (thread_info::deletable): Use the refcounted_object::refcount()
13963 method.
13964 * inferior.c (current_inferior_): Add comment.
13965 (set_current_inferior): Increment/decrement refcounts.
13966 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13967 not-deletable instead of comparing with the current inferior.
13968 (initialize_inferiors): Increment the initial inferior's refcount.
13969 * inferior.h (struct inferior): Forward declare.
13970 Include "common/refcounted-object.h".
13971 (current_inferior, set_current_inferior): Move declaration to
13972 before struct inferior's definition, and fix comment.
13973 (inferior): Inherit from refcounted_object. Add comments.
13974 * thread.c (switch_to_thread_no_regs): Reference the thread's
13975 inferior pointer directly instead of doing a ptid lookup.
13976 (switch_to_no_thread): New function.
13977 (switch_to_thread(thread_info *)): New function, factored out
13978 from ...
13979 (switch_to_thread(ptid_t)): ... this.
13980 (restore_current_thread): Delete.
13981 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13982 fields, and add 'inf' field.
13983 (do_restore_current_thread_cleanup): Check whether old->inf is
13984 alive instead of looking up an inferior by ptid. Use
13985 switch_to_thread and switch_to_no_thread.
13986 (restore_current_thread_cleanup_dtor): Use old->inf directly
13987 instead of lookup up an inferior by id. Decref the inferior.
13988 Don't restore 'removable'.
13989 (make_cleanup_restore_current_thread): Same the inferior pointer
13990 in old, instead of the inferior number. Incref the inferior.
13991 Don't save/clear 'removable'.
13992
13993 2017-04-19 Pedro Alves <palves@redhat.com>
13994
13995 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13996 unittests/scoped_restore-selftests.c.
13997 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13998 * common/scoped_restore.h (scoped_restore_base): Make "class".
13999 (scoped_restore_base::release): New public method.
14000 (scoped_restore_base::scoped_restore_base): New protected ctor.
14001 (scoped_restore_base::m_saved_var): New protected field.
14002 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
14003 scoped_restore_base base class instead of m_saved_var directly.
14004 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
14005 (scoped_restore_tmpl::scoped_restore_tmpl(const
14006 scoped_restore_tmpl<T>&)): Likewise.
14007 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
14008 method.
14009 (scoped_restore_tmpl::saved_var): New method.
14010 (scoped_restore_tmpl::m_saved_var): Delete.
14011 * inferior.h (inferior::detaching): Now a bool.
14012 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
14013 cleanup.
14014 * unittests/scoped_restore-selftests.c: New file.
14015
14016 2017-04-19 Pedro Alves <palves@redhat.com>
14017
14018 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
14019 Re-sort in alphabetic order.
14020
14021 2017-04-18 Pedro Alves <palves@redhat.com>
14022
14023 * xml-support.c (obstack_xml_printf): Delete.
14024 * xml-support.h (obstack_xml_printf): Delete.
14025
14026 2017-04-18 Pedro Alves <palves@redhat.com>
14027
14028 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
14029 vdebug, verror, body_text, start_element, end_element, name,
14030 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
14031 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
14032 is_xinclude>: Make private and add m_ prefix.
14033 (gdb_xml_parser::body_text): New method, based on ...
14034 (gdb_xml_body_text): ... this. Adjust.
14035 (gdb_xml_parser::vdebug): New method, based on ...
14036 (gdb_xml_debug): ... this. Adjust.
14037 (gdb_xml_parser::verror): New method, based on ...
14038 (gdb_xml_error): ... this. Adjust.
14039 (gdb_xml_parser::start_element): New method, based on ...
14040 (gdb_xml_start_element): ... this. Adjust.
14041 (gdb_xml_start_element_wrapper): Defer to
14042 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
14043 (gdb_xml_parser::end_element): New method, based on ...
14044 (gdb_xml_end_element_wrapper): ... this. Adjust.
14045 (gdb_xml_parser::~gdb_xml_parser): Adjust.
14046 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
14047 (gdb_xml_parser::use_dtd): New method, based on ...
14048 (gdb_xml_use_dtd): ... this. Adjust.
14049 (gdb_xml_parser::parse): New method, based on ...
14050 (gdb_xml_parse): ... this. Adjust.
14051 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
14052 (xinclude_start_include): Adjust to call the parser's name method.
14053 (xml_xinclude_default, xml_xinclude_start_doctype)
14054 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
14055 method.
14056 (xml_process_xincludes): Adjust to call parser methods.
14057 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
14058 declarations.
14059
14060 2017-04-18 Pedro Alves <palves@redhat.com>
14061
14062 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
14063 gdb::optional<std::string>.
14064 * xml-support.c: Include <string>.
14065 (scope_level::scope_level(scope_level &&))
14066 (scope_level::~scope_level): Delete.
14067 (scope_level::body): Now a std::string.
14068 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
14069 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
14070 parameter.
14071 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
14072 (xinclude_parsing_data::output): Now a std::string reference.
14073 (xinclude_start_include): Adjust.
14074 (xml_xinclude_default): Adjust.
14075 (xml_process_xincludes): Add 'output' parameter, and return bool.
14076 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
14077 and return bool.
14078 * xml-tdesc.c: Include <unordered_map> and <string>.
14079 (tdesc_xml_cache): Delete.
14080 (tdesc_xml_cache_s): Delete.
14081 (xml_cache): Now an std::unordered_map.
14082 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
14083 (target_fetch_description_xml): Change return type to
14084 gdb::optional<std::string>, and adjust.
14085 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
14086 (target_fetch_description_xml): Change return type to
14087 gdb::optional<std::string>.
14088
14089 2017-04-18 Pedro Alves <palves@redhat.com>
14090
14091 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14092 unittests/optional-selftests.c.
14093 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
14094 * unittests/optional-selftests.c: New file.
14095 * unittests/optional/assignment/1.cc: New file.
14096 * unittests/optional/assignment/2.cc: New file.
14097 * unittests/optional/assignment/3.cc: New file.
14098 * unittests/optional/assignment/4.cc: New file.
14099 * unittests/optional/assignment/5.cc: New file.
14100 * unittests/optional/assignment/6.cc: New file.
14101 * unittests/optional/assignment/7.cc: New file.
14102 * unittests/optional/cons/copy.cc: New file.
14103 * unittests/optional/cons/default.cc: New file.
14104 * unittests/optional/cons/move.cc: New file.
14105 * unittests/optional/cons/value.cc: New file.
14106 * unittests/optional/in_place.cc: New file.
14107 * unittests/optional/observers/1.cc: New file.
14108 * unittests/optional/observers/2.cc: New file.
14109
14110 2017-04-18 Pedro Alves <palves@redhat.com>
14111
14112 * common/gdb_optional.h: Include common/traits.h.
14113 (in_place_t): New type.
14114 (in_place): New constexpr variable.
14115 (optional::optional): Remove member initialization of
14116 m_instantiated.
14117 (optional::optional(in_place_t...)): New constructor.
14118 (optional::~optional): Use reset.
14119 (optional::optional(const optional&)): New.
14120 (optional::optional(const optional&&)): New.
14121 (optional::optional(T &)): New.
14122 (optional::optional(T &&)): New.
14123 (operator::operator=(const optional &)): New.
14124 (operator::operator=(optional &&)): New.
14125 (operator::operator= (const T &))
14126 (operator::operator= (T &&))
14127 (operator::emplace (Args &&... args)): Return a T&. Use reset.
14128 (operator::reset): New.
14129 (operator::m_instantiated):: Add in-class initializer.
14130 * common/traits.h: Include <type_traits>.
14131 (struct And): New types.
14132
14133 2017-04-18 Pedro Alves <palves@redhat.com>
14134
14135 * xml-support.c: Include <vector>.
14136 (scope_level::scope_level(const gdb_xml_element *))
14137 (scope_level::scope_level(scope_level&&)): New.
14138 (scope_level::~scope_level): New.
14139 (scope_level_s): Delete.
14140 (gdb_xml_parser::scopes): Now a std::vector.
14141 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
14142 Use std::vector.
14143 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
14144 scope cleanup code.
14145 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
14146 of the scopes member. Use std::vector::emplace_back.
14147
14148 2017-04-18 Pedro Alves <palves@redhat.com>
14149
14150 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
14151 a bool.
14152 (gdb_xml_end_element): Change type of first parameter.
14153 (gdb_xml_cleanup): Rename to ...
14154 (gdb_xml_parser::~gdb_xml_parser): ... this.
14155 (gdb_xml_create_parser_and_cleanup): Delete with ...
14156 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
14157 to this new ctor.
14158 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
14159 using gdb_xml_create_parser_and_cleanup.
14160 (xinclude_parsing_data): Add ctor/dtor.
14161 (xml_xinclude_cleanup): Delete.
14162 (xml_process_xincludes): Create a local xinclude_parsing_data
14163 instead of heap-allocating one. Create a local gdb_xml_parser
14164 instead of heap-allocating one with
14165 gdb_xml_create_parser_and_cleanup.
14166
14167 2017-04-18 John Baldwin <jhb@FreeBSD.org>
14168
14169 PR threads/20743
14170 * fbsd-nat.c (resume_one_thread_cb): Remove.
14171 (resume_all_threads_cb): Remove.
14172 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
14173 iterate_over_threads.
14174
14175 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14176
14177 * NEWS: Create a new section for the next release branch.
14178 Rename the section of the current branch, now that it has
14179 been cut.
14180
14181 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14182
14183 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
14184 * version.in: Bump version to 8.0.50.DATE-git.
14185
14186 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
14187
14188 PR gdb/21385
14189 * windows-nat.c (windows_create_inferior): Declare 'allargs'
14190 independently of the host, and fix build breakage on Cygwin.
14191
14192 2017-04-13 Pedro Alves <palves@redhat.com>
14193
14194 * inferior.c (free_inferior): Convert to ...
14195 (inferior::~inferior): ... this dtor.
14196 (inferior::inferior): New ctor, factored out from ...
14197 (add_inferior_silent): ... here. Allocate the inferior with a new
14198 expression.
14199 (delete_inferior): Call delete instead of free_inferior.
14200 * inferior.h (gdb_environ, continuation): Forward declare.
14201 (inferior): Now a class. Add in-class initialization to all
14202 members. Make boolean fields bool, except 'detaching'.
14203 (inferior::inferior): New explicit ctor.
14204 (inferior::~inferior): New.
14205
14206 2017-04-13 Pedro Alves <palves@redhat.com>
14207
14208 * inferior.c (init_inferior_list): Delete.
14209 * inferior.h (init_inferior_list): Delete.
14210
14211 2017-04-13 Pedro Alves <palves@redhat.com>
14212
14213 PR threads/13217
14214 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
14215 (top level): Call it twice, with different thread sets.
14216
14217 2017-04-13 Pedro Alves <palves@redhat.com>
14218
14219 * thread.c: Include <algorithm>.
14220 (thread_array_cleanup): Delete.
14221 (scoped_inc_dec_ref): New class.
14222 (live_threads_count): New function.
14223 (set_thread_refcount): Delete.
14224 (tp_array_compar_ascending): Now a bool.
14225 (tp_array_compar): Convert to a std::sort comparison function.
14226 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
14227 and live_threads_count.
14228
14229 2017-04-13 Pedro Alves <palves@redhat.com>
14230
14231 * infrun.c (follow_fork_inferior): Also switch the current
14232 inferior.
14233
14234 2017-04-13 Pedro Alves <palves@redhat.com>
14235
14236 * breakpoint.c (watch_command_1): Save watchpoint-frame info
14237 before calling create_internal_breakpoint.
14238
14239 2017-04-13 Pedro Alves <palves@redhat.com>
14240
14241 * fork-child.c (execv_argv): New class.
14242 (breakup_args): Refactored as ...
14243 (execv_argv::init_for_no_shell): .. this method of execv_argv.
14244 Copy arguments to storage and replace separators with NULL
14245 terminators in place.
14246 (escape_bang_in_quoted_argument): Adjust to return bool.
14247 (execv_argv::execv_argv): New ctor.
14248 (execv_argv::init_for_shell): New method, factored out from
14249 fork_inferior. Don't strdup strings into the vector.
14250 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
14251 Remove free_vector_argv call.
14252
14253 2017-04-13 Yao Qi <yao.qi@linaro.org>
14254
14255 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
14256 tdep->rx_psw_type.
14257
14258 2017-04-13 Yao Qi <yao.qi@linaro.org>
14259
14260 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
14261 * rx-tdep.c (rx_gdbarch_init): Likewise.
14262
14263 2017-04-13 Pedro Alves <palves@redhat.com>
14264
14265 * breakpoint.h (struct breakpoint): Reindent.
14266
14267 2017-04-13 Pedro Alves <palves@redhat.com>
14268
14269 * breakpoint.c (bp_location): Rename to ...
14270 (bp_locations): ... this. All references updated.
14271 (bp_location_count): Rename to ...
14272 (bp_locations_count): ... this. All references updated.
14273 (bp_location_placed_address_before_address_max): Rename to ...
14274 (bp_locations_placed_address_before_address_max): ... this. All
14275 references updated.
14276 (bp_location_shadow_len_after_address_max): Rename to ...
14277 (bp_locations_shadow_len_after_address_max): ... this. All
14278 references updated.
14279 (bp_location_compare_addrs): Rename to ...
14280 (bp_locations_compare_addrs): ... this. All references updated.
14281 (bp_location_compare):Rename to ...
14282 (bp_locations_compare): ... this. All references updated.
14283 (bp_location_target_extensions_update): Rename to ...
14284 (bp_locations_target_extensions_update): ... this. All references
14285 updated.
14286
14287 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14288
14289 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14290 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14291 'sgtty.h'.
14292 * common/gdb_termios.h: New file, with parts of "terminal.h".
14293 * inflow.c: Include "gdb_termios.h".
14294 * ser-unix.c: Include "gdb_termios.h".
14295 * terminal.h: Move terminal-related defines to
14296 "common/gdb_termios.h".
14297
14298 2017-04-12 Tom Tromey <tom@tromey.com>
14299
14300 * probe.c (parse_probes): Update.
14301 * location.h (delete_event_location): Don't declare.
14302 (event_location_deleter::operator()): Update.
14303 * location.c (event_location_deleter::operator()): Rename from
14304 delete_event_location.
14305 * linespec.h (linespec_result) <location>: Change type to
14306 event_location_up.
14307 * linespec.c (canonicalize_linespec, event_location_to_sals)
14308 (decode_objc): Update.
14309 (linespec_result): Don't call delete_event_location.
14310 * breakpoint.c (create_breakpoints_sal)
14311 (bkpt_probe_create_sals_from_location)
14312 (strace_marker_create_sals_from_location): Update.
14313
14314 2017-04-12 Tom Tromey <tom@tromey.com>
14315
14316 * linespec.h (struct linespec_result): Add constructor and
14317 destructor.
14318 (init_linespec_result, destroy_linespec_result)
14319 (make_cleanup_destroy_linespec_result): Don't declare.
14320 * linespec.c (init_linespec_result): Remove.
14321 (linespec_result::~linespec_result): Rename from
14322 destroy_linespec_result. Update.
14323 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14324 Remove.
14325 * breakpoint.c (create_breakpoint, break_range_command)
14326 (decode_location_default): Update.
14327 * ax-gdb.c (agent_command_1): Update.
14328
14329 2017-04-12 Tom Tromey <tom@tromey.com>
14330
14331 * remote.c (remote_download_tracepoint): Update.
14332 * python/py-breakpoint.c (bppy_get_location): Update.
14333 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14334 (gdbscm_breakpoint_location): Update.
14335 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14336 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14337 Change type to event_location_up.
14338 * breakpoint.c (create_overlay_event_breakpoint)
14339 (create_longjmp_master_breakpoint)
14340 (create_std_terminate_master_breakpoint)
14341 (create_exception_master_breakpoint)
14342 (breakpoint_event_location_empty_p, print_breakpoint_location)
14343 (print_one_breakpoint_location, create_thread_event_breakpoint)
14344 (init_breakpoint_sal, create_breakpoint)
14345 (print_recreate_ranged_breakpoint, break_range_command)
14346 (init_ada_exception_breakpoint, say_where): Update.
14347 (base_breakpoint_dtor): Don't call delete_event_location.
14348 (bkpt_print_recreate, tracepoint_print_recreate)
14349 (dprintf_print_recreate, update_static_tracepoint)
14350 (breakpoint_re_set_default): Update.
14351
14352 2017-04-12 Tom Tromey <tom@tromey.com>
14353
14354 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14355 type of "to_do". Update.
14356 (compute_stack_depth): Use std::vector.
14357
14358 2017-04-12 Tom Tromey <tom@tromey.com>
14359
14360 * printcmd.c (find_instruction_backward): Use std::vector.
14361
14362 2017-04-12 Tom Tromey <tom@tromey.com>
14363
14364 * symfile.c (objfilep): Remove typedef.
14365 (reread_symbols): Use a std::vector.
14366
14367 2017-04-12 Tom Tromey <tom@tromey.com>
14368
14369 * mi/mi-main.c (exec_direction_forward): Remove.
14370 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14371 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14372 scoped_restore.
14373 * guile/guile.c (guile_repl_command, guile_command)
14374 (gdbscm_execute_gdb_command): Use scoped_restore.
14375 * go-exp.y (go_parse): Use scoped_restore.
14376 * d-exp.y (d_parse): Use scoped_restore.
14377 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14378 * c-exp.y (c_parse): Use scoped_restore.
14379
14380 2017-04-12 Tom Tromey <tom@tromey.com>
14381
14382 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14383 (mi_parse): Update return type.
14384 (mi_parse_free): Remove.
14385 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14386 (mi_parse::~mi_parse): Rename from mi_parse_free.
14387 (mi_parse_cleanup): Remove.
14388 (mi_parse): Return a unique_ptr. Use new.
14389 * mi/mi-main.c (mi_execute_command): Update.
14390
14391 2017-04-12 Tom Tromey <tom@tromey.com>
14392
14393 * location.c (explicit_location_lex_one): Return a
14394 unique_xmalloc_ptr.
14395 (string_to_explicit_location): Update. Remove cleanups.
14396
14397 2017-04-12 Tom Tromey <tom@tromey.com>
14398
14399 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14400 (compare_value_and_voffset): Change type. Update.
14401 (compute_vtable_size): Change type of "offset_vec".
14402 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14403 (gnuv3_get_typeid): Remove extraneous declaration.
14404
14405 2017-04-12 Tom Tromey <tom@tromey.com>
14406
14407 * charset.h (wchar_iterator): Fix comment.
14408
14409 2017-04-12 Tom Tromey <tom@tromey.com>
14410
14411 * charset.c (iconv_wrapper): New class.
14412 (cleanup_iconv): Remove.
14413 (convert_between_encodings): Use it.
14414
14415 2017-04-12 Tom Tromey <tom@tromey.com>
14416
14417 * symfile.h (increment_reading_symtab): Update type.
14418 * symfile.c (decrement_reading_symtab): Remove.
14419 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14420 * psymtab.c (psymtab_to_symtab): Update.
14421 * dwarf2read.c (dw2_instantiate_symtab): Update.
14422
14423 2017-04-12 Tom Tromey <tom@tromey.com>
14424
14425 * jit.c (struct jit_reader): Declare separately. Add constructor
14426 and destructor. Change type of "handle".
14427 (loaded_jit_reader): Define separately.
14428 (jit_reader_load): Update. New "new".
14429 (jit_reader_unload_command): Use "delete".
14430 * gdb-dlfcn.h (struct dlclose_deleter): New.
14431 (gdb_dlhandle_up): New typedef.
14432 (gdb_dlopen, gdb_dlsym): Update types.
14433 (gdb_dlclose): Remove.
14434 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14435 (gdb_dlsym): Change type of "handle".
14436 (make_cleanup_dlclose): Remove.
14437 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14438 * compile/compile-c-support.c (load_libcc): Update.
14439
14440 2017-04-12 Tom Tromey <tom@tromey.com>
14441
14442 * symtab.h (find_pcs_for_symtab_line): Change return type.
14443 * symtab.c (find_pcs_for_symtab_line): Change return type.
14444 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14445 type of "vec". Update.
14446 (ltpy_get_pcs_for_line): Update.
14447 * linespec.c (decode_digits_ordinary): Update.
14448
14449 2017-04-12 Tom Tromey <tom@tromey.com>
14450
14451 * tracepoint.c (actions_command): Update.
14452 * python/python.c (python_command, python_interactive_command):
14453 Update.
14454 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14455 * guile/guile.c (guile_command): Update.
14456 * defs.h (read_command_lines, read_command_lines_1): Return
14457 command_line_up.
14458 (command_lines_deleter): New struct.
14459 (command_line_up): New typedef.
14460 * compile/compile.c (compile_code_command)
14461 (compile_print_command): Update.
14462 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14463 command_line_up.
14464 (make_cleanup_free_command_lines): Remove.
14465 * cli/cli-script.c (get_command_line, read_command_lines_1)
14466 (copy_command_lines): Return command_line_up.
14467 (while_command, if_command, read_command_lines, define_command)
14468 (document_command): Update.
14469 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14470 Remove.
14471 * breakpoint.h (breakpoint_set_commands): Change type of
14472 "commands".
14473 * breakpoint.c (breakpoint_set_commands): Change type of
14474 "commands". Update.
14475 (do_map_commands_command, update_dprintf_command_list)
14476 (create_tracepoint_from_upload): Update.
14477
14478 2017-04-12 Tom Tromey <tom@tromey.com>
14479
14480 * tracepoint.c (scope_info): Update.
14481 * spu-tdep.c (spu_catch_start): Update.
14482 * python/python.c (gdbpy_decode_line): Update.
14483 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14484 * python/py-breakpoint.c (bppy_init): Update.
14485 * probe.c (parse_probes): Update.
14486 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14487 * location.h (event_location_deleter): New struct.
14488 (event_location_up): New typedef.
14489 (new_linespec_location, new_address_location, new_probe_location)
14490 (new_explicit_location, copy_event_location)
14491 (string_to_event_location, string_to_event_location_basic)
14492 (string_to_explicit_location): Update return type.
14493 (make_cleanup_delete_event_location): Remove.
14494 * location.c (new_linespec_location, new_address_location)
14495 (new_probe_location, new_explicit_location, copy_event_location):
14496 Return event_location_up.
14497 (delete_event_location_cleanup)
14498 (make_cleanup_delete_event_location): Remove.
14499 (string_to_explicit_location, string_to_event_location_basic)
14500 (string_to_event_location): Return event_location_up.
14501 * linespec.c (canonicalize_linespec, event_location_to_sals)
14502 (decode_line_with_current_source)
14503 (decode_line_with_last_displayed, decode_objc): Update.
14504 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14505 * completer.c (location_completer): Update.
14506 * cli/cli-cmds.c (edit_command, list_command): Update.
14507 * breakpoint.c (create_overlay_event_breakpoint)
14508 (create_longjmp_master_breakpoint)
14509 (create_std_terminate_master_breakpoint)
14510 (create_exception_master_breakpoint)
14511 (create_thread_event_breakpoint): Update.
14512 (init_breakpoint_sal): Update. Remove some dead code.
14513 (create_breakpoint_sal): Change type of "location". Update.
14514 (create_breakpoints_sal, create_breakpoint, break_command_1)
14515 (dprintf_command, break_range_command, until_break_command)
14516 (init_ada_exception_breakpoint)
14517 (strace_marker_create_sals_from_location)
14518 (update_static_tracepoint, trace_command, ftrace_command)
14519 (strace_command, create_tracepoint_from_upload): Update.
14520 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14521 * ax-gdb.c (agent_command_1): Update.
14522
14523 2017-04-12 Pedro Alves <palves@redhat.com>
14524
14525 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14526 * configure.tgt: Handle i[34567]86-*-go32* and
14527 i[34567]86-*-msdosdjgpp*.
14528 * i386-tdep.c (i386_svr4_reg_to_regnum):
14529 Make extern.
14530 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14531 i386-go32-tdep.c.
14532 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14533 * i386-go32-tdep.c: New file.
14534 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14535 declarations.
14536
14537 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14538
14539 * aix-thread.c (pd_status2str): Change return type to const char *.
14540
14541 2017-04-12 Pedro Alves <palves@redhat.com>
14542
14543 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14544 calls to set_gdbarch_gnu_triplet_regexp.
14545
14546 2017-04-12 Pedro Alves <palves@redhat.com>
14547
14548 PR gdb/21323
14549 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14550 New enum value.
14551 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14552 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14553 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14554 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14555 * gdbarch.h, gdbarch.c: Regenerate.
14556 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14557 gdbarch_wchar_bit and gdbarch_wchar_signed.
14558 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14559 * arm-tdep.c (arm_gdbarch_init): Likewise.
14560 * avr-tdep.c (avr_gdbarch_init): Likewise.
14561 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14562 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14563 * i386-tdep.c (i386_go32_init_abi): Likewise.
14564 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14565 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14566 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14567 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14568 * sh-tdep.c (sh_gdbarch_init): Likewise.
14569 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14570 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14571 * windows-tdep.c (windows_init_abi): Likewise.
14572 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14573
14574 2017-04-12 Pedro Alves <palves@redhat.com>
14575
14576 PR c++/21323
14577 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14578 cplus_primitive_type_char32_t>: New enum values.
14579 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14580 and cplus_primitive_type_char32_t.
14581 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14582 32, use the archtecture's built-in type for char16_t and char32_t,
14583 respectively. Otherwise, fallback to init_integer_type as before,
14584 but make the type unsigned, and issue a complaint.
14585 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14586
14587 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14588
14589 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14590 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14591
14592 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14593
14594 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14595 'const char *'.
14596
14597 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14598
14599 * common/common-utils.c (free_vector_argv): New function.
14600 * common/common-utils.h: Include <vector>.
14601 (free_vector_argv): New prototype.
14602 * darwin-nat.c (darwin_create_inferior): Rewrite function
14603 prototype in order to constify "exec_file" and accept a
14604 "std::string" for "allargs".
14605 * fork-child.c: Include <vector>.
14606 (breakup_args): Rewrite function, using C++.
14607 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14608 and accept "std::string" for "allargs". Update the code to
14609 calculate "argv" based on "allargs". Update calls to "exec_fun"
14610 and "execvp".
14611 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14612 order to constify "exec_file" and accept a "std::string" for
14613 "allargs".
14614 * go32-nat.c (go32_create_inferior): Likewise.
14615 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14616 * infcmd.c (run_command_1): Constify "exec_file". Use
14617 "std::string" for inferior arguments.
14618 * inferior.h (fork_inferior): Update prototype.
14619 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14620 prototype in order to constify "exec_file" and accept a
14621 "std::string" for "allargs".
14622 * nto-procfs.c (procfs_create_inferior): Likewise.
14623 * procfs.c (procfs_create_inferior): Likewise.
14624 * remote-sim.c (gdbsim_create_inferior): Likewise.
14625 * remote.c (extended_remote_run): Update code to accept
14626 "std::string" as argument.
14627 (extended_remote_create_inferior): Rewrite function prototype in
14628 order to constify "exec_file" and accept a "std::string" for
14629 "allargs".
14630 * rs6000-nat.c (super_create_inferior): Likewise.
14631 (rs6000_create_inferior): Likewise.
14632 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14633 * windows-nat.c (windows_create_inferior): Likewise.
14634
14635 2017-04-11 Pedro Alves <palves@redhat.com>
14636
14637 * thread.c: Fix whitespace throughout.
14638
14639 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14640
14641 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14642
14643 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14644
14645 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14646
14647 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14648
14649 PR gdb/21364
14650 * osdata.c (info_osdata): Check if 'type' is an empty string
14651 instead of NULL.
14652
14653 2017-04-10 Pedro Alves <palves@redhat.com>
14654
14655 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14656 (ptid_to_global_thread_id, in_thread_list)
14657 (do_captured_list_thread_ids, set_resumed, set_running)
14658 (set_executing, set_stop_requested, finish_thread_state)
14659 (validate_registers_access, can_access_registers_ptid)
14660 (print_thread_info_1, switch_to_thread)
14661 (do_restore_current_thread_cleanup)
14662 (make_cleanup_restore_current_thread, thread_command)
14663 (thread_name_command): Use operator== instead of ptid_equal.
14664
14665 2017-04-10 Pedro Alves <palves@redhat.com>
14666
14667 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14668 (current_thread_cleanup_chain): Delete.
14669 (restore_current_thread_cleanup_dtor)
14670 (make_cleanup_restore_current_thread): Remove references to
14671 current_thread_cleanup_chain.
14672
14673 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14674
14675 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14676 REG_UNKNOWN.
14677
14678 2017-04-10 Yao Qi <yao.qi@linaro.org>
14679
14680 PR gdb/19942
14681 * gdbthread.h (thread_info::deletable): New method.
14682 (thread_info::incref): New method.
14683 (thread_info::decref): New method.
14684 (thread_info::refcount): Move it to private.
14685 * infrun.c (save_stop_context): Call inc_refcount.
14686 (release_stop_context_cleanup): Likewise.
14687 * thread.c (set_thread_exited): New function.
14688 (init_thread_list): Delete "tp" only it is deletable, otherwise
14689 call set_thread_exited.
14690 (delete_thread_1): Call set_thread_exited.
14691 (current_thread_cleanup) <inferior_pid>: Remove.
14692 <thread>: New field.
14693 (restore_current_thread_ptid_changed): Removed.
14694 (do_restore_current_thread_cleanup): Adjust.
14695 (restore_current_thread_cleanup_dtor): Don't call
14696 find_thread_ptid.
14697 (set_thread_refcount): Use dec_refcount.
14698 (make_cleanup_restore_current_thread): Adjust.
14699 (thread_apply_all_command): Call inc_refcount.
14700 (_initialize_thread): Don't call
14701 observer_attach_thread_ptid_changed.
14702
14703 2017-04-10 Yao Qi <yao.qi@linaro.org>
14704
14705 * thread.c (delete_thread_1): Hoist code on marking thread as
14706 exited.
14707
14708 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14709
14710 * windows-nat.c (windows_detach): Initialize ptid with
14711 minus_one_ptid.
14712
14713 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14714
14715 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14716
14717 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14718
14719 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14720 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14721 (bfin_pseudo_register_write): Likewise
14722
14723 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14724
14725 * common/ptid.h (struct ptid): Change to...
14726 (class ptid_t): ... this.
14727 <ptid_t>: New constructors.
14728 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14729 matches>: New methods.
14730 <make_null, make_minus_one>: New static methods.
14731 <pid>: Rename to...
14732 <m_pid>: ...this.
14733 <lwp>: Rename to...
14734 <m_lwp>: ...this.
14735 <tid>: Rename to...
14736 <m_tid>: ...this.
14737 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14738 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14739 as references, move comment to class ptid_t.
14740 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14741 ptid_t static methods.
14742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14743 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14744 Take ptid arguments as references, implement using ptid_t methods.
14745 * unittests/ptid-selftests.c: New file.
14746 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14747 unittests/ptid-selftests.c.
14748 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14749
14750 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14751
14752 * python/python.c (python_run_simple_file): Cast mode literal to
14753 non-const char pointer as expected by PyFile_FromString.
14754
14755 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14756
14757 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14758 minus_one_ptid and null_ptid.
14759
14760 2017-04-05 Pedro Alves <palves@redhat.com>
14761
14762 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14763 * configure: Regenerate.
14764
14765 2017-04-05 Pedro Alves <palves@redhat.com>
14766
14767 * ada-exp.y (yyerror): Constify.
14768 * ada-lang.c (bound_name, get_selections)
14769 (ada_variant_discrim_type)
14770 (ada_variant_discrim_name, ada_value_struct_elt)
14771 (ada_lookup_struct_elt_type, is_unchecked_variant)
14772 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14773 (catch_ada_exception_command_split)
14774 (catch_ada_assert_command_split, catch_assert_command)
14775 (ada_op_name): Constify.
14776 * ada-lang.h (ada_yyerror, get_selections)
14777 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14778 * arc-tdep.c (arc_print_frame_cache): Constify.
14779 * arm-tdep.c (arm_skip_stub): Constify.
14780 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14781 (gen_aggregate_elt_ref): Constify.
14782 * bcache.c (print_bcache_statistics): Constify.
14783 * bcache.h (print_bcache_statistics): Constify.
14784 * break-catch-throw.c (catch_exception_command_1):
14785 * breakpoint.c (struct ep_type_description::description):
14786 Constify.
14787 (add_solib_catchpoint): Constify.
14788 (catch_fork_command_1): Add cast.
14789 (add_catch_command): Constify.
14790 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14791 Constify.
14792 * bsd-uthread.c (bsd_uthread_state): Constify.
14793 * buildsym.c (patch_subfile_names): Constify.
14794 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14795 Constify.
14796 * c-exp.y (yyerror): Constify.
14797 (token::oper): Constify.
14798 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14799 * c-varobj.c (cplus_describe_child): Constify.
14800 * charset.c (find_charset_names): Add cast.
14801 (find_charset_names): Constify array and add const_cast.
14802 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14803 (edit_command): Constify.
14804 * cli/cli-decode.c (lookup_cmd): Constify.
14805 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14806 Constify.
14807 (struct dump_context): Constify.
14808 (add_dump_command, restore_command): Constify.
14809 * cli/cli-script.c (get_command_line): Constify.
14810 * cli/cli-script.h (get_command_line): Constify.
14811 * cli/cli-utils.c (check_for_argument): Constify.
14812 * cli/cli-utils.h (check_for_argument): Constify.
14813 * coff-pe-read.c (struct read_pe_section_data): Constify.
14814 * command.h (lookup_cmd): Constify.
14815 * common/print-utils.c (decimal2str): Constify.
14816 * completer.c (gdb_print_filename): Constify.
14817 * corefile.c (set_gnutarget): Constify.
14818 * cp-name-parser.y (yyerror): Constify.
14819 * cp-valprint.c (cp_print_class_member): Constify.
14820 * cris-tdep.c (cris_register_name, crisv32_register_name):
14821 Constify.
14822 * d-exp.y (yyerror): Constify.
14823 (struct token::oper): Constify.
14824 * d-lang.h (d_yyerror): Constify.
14825 * dbxread.c (struct header_file_location::name): Constify.
14826 (add_old_header_file, add_new_header_file, last_function_name)
14827 (dbx_next_symbol_text, add_bincl_to_list)
14828 (find_corresponding_bincl_psymtab, set_namestring)
14829 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14830 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14831 * defs.h (command_line_input, print_address_symbolic)
14832 (deprecated_readline_begin_hook): Constify.
14833 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14834 Constify.
14835 * event-top.c (handle_line_of_input): Constify and add cast.
14836 * exceptions.c (catch_errors): Constify.
14837 * exceptions.h (catch_errors): Constify.
14838 * expprint.c (print_subexp_standard, op_string, op_name)
14839 (op_name_standard, dump_raw_expression, dump_raw_expression):
14840 * expression.h (op_name, op_string, dump_raw_expression):
14841 Constify.
14842 * f-exp.y (yyerror): Constify.
14843 (struct token::oper): Constify.
14844 (struct f77_boolean_val::name): Constify.
14845 * f-lang.c (f_word_break_characters): Constify.
14846 * f-lang.h (f_yyerror): Constify.
14847 * fork-child.c (fork_inferior): Add cast.
14848 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14849 (new_variant): Constify.
14850 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14851 * gdbarch.c: Regenerate.
14852 * gdbcore.h (set_gnutarget): Constify.
14853 * go-exp.y (yyerror): Constify.
14854 (token::oper): Constify.
14855 * go-lang.h (go_yyerror): Constify.
14856 * go32-nat.c (go32_sysinfo): Constify.
14857 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14858 * guile/scm-cmd.c (cmdscm_function): Constify.
14859 * guile/scm-param.c (pascm_param_value): Constify.
14860 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14861 (h8300sx_register_name): Constify.
14862 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14863 Constify.
14864 * ia64-tdep.c (ia64_register_names): Constify.
14865 * infcmd.c (construct_inferior_arguments): Constify.
14866 (path_command, attach_post_wait): Constify.
14867 * language.c (show_range_command, show_case_command)
14868 (unk_lang_error): Constify.
14869 * language.h (language_defn::la_error)
14870 (language_defn::la_name_of_this): Constify.
14871 * linespec.c (decode_line_2): Constify.
14872 * linux-thread-db.c (thread_db_err_str): Constify.
14873 * lm32-tdep.c (lm32_register_name): Constify.
14874 * m2-exp.y (yyerror): Constify.
14875 * m2-lang.h (m2_yyerror): Constify.
14876 * m32r-tdep.c (m32r_register_names): Constify and make static.
14877 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14878 * m88k-tdep.c (m88k_register_name): Constify.
14879 * macroexp.c (appendmem): Constify.
14880 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14881 (upgrade_type, parse_external, parse_partial_symbols)
14882 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14883 (new_symbol): Constify.
14884 * memattr.c (mem_info_command): Constify.
14885 * mep-tdep.c (register_name_from_keyword): Constify.
14886 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14887 Constify.
14888 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14889 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14890 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14891 cast.
14892 (mi_execute_async_cli_command): Constify.
14893 * mips-tdep.c (mips_register_name): Constify.
14894 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14895 (am33_register_name, am33_2_register_name)
14896 * moxie-tdep.c (moxie_register_names): Constify.
14897 * nat/linux-osdata.c (osdata_type): Constify fields.
14898 * nto-tdep.c (nto_parse_redirection): Constify.
14899 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14900 (lookup_child_selector): Constify.
14901 (objc_methcall::name): Constify.
14902 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14903 (lookup_struct_typedef): Constify.
14904 * objfiles.c (pc_in_section): Constify.
14905 * objfiles.h (pc_in_section): Constify.
14906 * p-exp.y (struct token::oper): Constify.
14907 (yyerror): Constify.
14908 * p-lang.h (pascal_yyerror): Constify.
14909 * parser-defs.h (op_name_standard): Constify.
14910 (op_print::string): Constify.
14911 (exp_descriptor::op_name): Constify.
14912 * printcmd.c (print_address_symbolic): Constify.
14913 * psymtab.c (print_partial_symbols): Constify.
14914 * python/py-breakpoint.c (stop_func): Constify.
14915 (bppy_get_expression): Constify.
14916 * python/py-cmd.c (cmdpy_completer::name): Constify.
14917 (cmdpy_function): Constify.
14918 * python/py-event.c (evpy_add_attribute)
14919 (gdbpy_initialize_event_generic): Constify.
14920 * python/py-event.h (evpy_add_attribute)
14921 (gdbpy_initialize_event_generic): Constify.
14922 * python/py-evts.c (add_new_registry): Constify.
14923 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14924 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14925 * python/py-inferior.c (get_buffer): Add cast.
14926 * python/py-param.c (parm_constant::name): Constify.
14927 * python/py-unwind.c (fprint_frame_id): Constify.
14928 * python/python.c (gdbpy_parameter_value): Constify.
14929 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14930 * remote.c (memory_packet_config::name): Constify.
14931 (show_packet_config_cmd, remote_write_bytes)
14932 (remote_buffer_add_string):
14933 * reverse.c (exec_reverse_once): Constify.
14934 * rs6000-tdep.c (variant::name, variant::description): Constify.
14935 * rust-exp.y (rustyyerror): Constify.
14936 * rust-lang.c (rust_op_name): Constify.
14937 * rust-lang.h (rustyyerror): Constify.
14938 * serial.h (serial_ops::name): Constify.
14939 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14940 (sh_sh3e_register_name, sh_sh2e_register_name)
14941 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14942 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14943 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14944 (sh_sh4al_dsp_register_name): Constify.
14945 * sh64-tdep.c (sh64_register_name): Constify.
14946 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14947 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14948 * stabsread.c (patch_block_stabs, read_type_number)
14949 (ref_map::stabs, ref_add, process_reference)
14950 (symbol_reference_defined, define_symbol, define_symbol)
14951 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14952 (read_one_struct_field, read_struct_fields, read_baseclasses)
14953 (read_tilde_fields, read_struct_type, read_array_type)
14954 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14955 (read_huge_number, read_range_type, read_args, common_block_start)
14956 (find_name_end): Constify.
14957 * stabsread.h (common_block_start, define_symbol)
14958 (process_one_symbol, symbol_reference_defined, ref_add):
14959 * symfile.c (get_section_index, add_symbol_file_command):
14960 * symfile.h (get_section_index): Constify.
14961 * target-descriptions.c (tdesc_type::name): Constify.
14962 (tdesc_free_type): Add cast.
14963 * target.c (find_default_run_target):
14964 (add_deprecated_target_alias, find_default_run_target)
14965 (target_announce_detach): Constify.
14966 (do_option): Constify.
14967 * target.h (add_deprecated_target_alias): Constify.
14968 * thread.c (print_thread_info_1): Constify.
14969 * top.c (deprecated_readline_begin_hook, command_line_input):
14970 Constify.
14971 (init_main): Add casts.
14972 * top.h (handle_line_of_input): Constify.
14973 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14974 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14975 (tfind_command): Rename to ...
14976 (tfind_command_1): ... this and constify.
14977 (tfind_command): New function.
14978 (tfind_end_command, tfind_start_command): Adjust.
14979 (encode_source_string): Constify.
14980 * tracepoint.h (encode_source_string): Constify.
14981 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14982 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14983 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14984 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14985 * tui/tui-win.c (parse_scrolling_args): Constify.
14986 * tui/tui-windata.c (tui_erase_data_content): Constify.
14987 * tui/tui-windata.h (tui_erase_data_content): Constify.
14988 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14989 * tui/tui.c (tui_enable): Add cast.
14990 * utils.c (defaulted_query): Constify.
14991 (init_page_info): Add cast.
14992 (puts_debug, subset_compare): Constify.
14993 * utils.h (subset_compare): Constify.
14994 * varobj.c (varobj_format_string): Constify.
14995 * varobj.h (varobj_format_string): Constify.
14996 * vax-tdep.c (vax_register_name): Constify.
14997 * windows-nat.c (windows_detach): Constify.
14998 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14999 * xml-support.c (gdb_xml_end_element): Constify.
15000 * xml-tdesc.c (tdesc_start_reg): Constify.
15001 * xstormy16-tdep.c (xstormy16_register_name): Constify.
15002 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
15003 * xtensa-tdep.h (xtensa_register_t::name): Constify.
15004
15005 2017-04-05 Pedro Alves <palves@redhat.com>
15006
15007 * proc-api.c (struct trans): Constify.
15008 (procfs_note): Constify.
15009 * proc-events.c (struct trans, syscall_table):
15010 * proc-flags.c (struct trans): Constify.
15011 * proc-utils.h (procfs_note): Constify.
15012 * proc-why.c (struct trans): Constify.
15013 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
15014 (procfs_detach): Constify.
15015 * sol-thread.c (struct string_map): Constify.
15016 (td_err_string, td_state_string): Constify.
15017
15018 2017-04-05 Pedro Alves <palves@redhat.com>
15019
15020 * proc-api.c (procfs_filename): Don't initialize
15021 procfs_filename.
15022 (prepare_to_trace): Assume procfs_filename is non-NULL.
15023 (_initialize_proc_api): Give procfs_filename a default value here.
15024
15025 2017-04-05 Pedro Alves <palves@redhat.com>
15026
15027 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
15028 'cond_string' parameter.
15029 (extract_exception_regexp): Constify 'string' parameter.
15030 (catch_exception_command_1): Constify.
15031 * breakpoint.c (init_catchpoint)
15032 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
15033 parameter.
15034 (ep_parse_optional_if_clause, catch_fork_command_1)
15035 (catch_exec_command_1): Constify.
15036 * breakpoint.h (init_catchpoint): Constify 'cond_string'
15037 parameter.
15038 (ep_parse_optional_if_clause): Constify.
15039 * cli/cli-utils.c (remove_trailing_whitespace)
15040 (check_for_argument): Constify.
15041 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
15042 non-const overload.
15043 (check_for_argument): Likewise.
15044
15045 2017-04-05 Pedro Alves <palves@redhat.com>
15046
15047 * event-top.c (command_line_handler): Add cast to execute_command
15048 call.
15049 * record-btrace.c (cmd_record_btrace_bts_start)
15050 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
15051 (cmd_record_btrace_start): Add cast to execute_command call.
15052 * record-full.c (record_full_goto_insn):
15053 * record.c (record_start, record_stop): Add cast to
15054 execute_command_to_string calls.
15055 (cmd_record_start): Add cast to execute_command calls.
15056
15057 2017-04-05 Pedro Alves <palves@redhat.com>
15058
15059 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
15060 static inline function.
15061 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
15062 array and use gdb_PyArg_ParseTupleAndKeywords.
15063 * python/py-cmd.c (cmdpy_init): Likewise.
15064 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
15065 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
15066 (infpy_search_memory): Likewise.
15067 * python/py-objfile.c (objfpy_add_separate_debug_file)
15068 (gdbpy_lookup_objfile): Likewise.
15069 * python/py-symbol.c (gdbpy_lookup_symbol)
15070 (gdbpy_lookup_global_symbol): Likewise.
15071 * python/py-type.c (gdbpy_lookup_type): Likewise.
15072 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
15073 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
15074 Likewise.
15075
15076 2017-04-05 Pedro Alves <palves@redhat.com>
15077
15078 * python/python-internal.h (gdb_PyGetSetDef): New type.
15079 * python/py-block.c (block_object_getset)
15080 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
15081 * python/py-event.c (event_object_getset)
15082 (finish_breakpoint_object_getset): Likewise.
15083 * python/py-inferior.c (inferior_object_getset): Likewise.
15084 * python/py-infthread.c (thread_object_getset): Likewise.
15085 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
15086 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
15087 * python/py-objfile.c (objfile_getset): Likewise.
15088 * python/py-progspace.c (pspace_getset): Likewise.
15089 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
15090 Likewise.
15091 * python/py-record.c (recpy_record_getset): Likewise.
15092 * python/py-symbol.c (symbol_object_getset): Likewise.
15093 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
15094 Likewise.
15095 * python/py-type.c (type_object_getset, field_object_getset):
15096 Likewise.
15097 * python/py-value.c (value_object_getset): Likewise.
15098
15099 2017-04-05 Pedro Alves <palves@redhat.com>
15100
15101 * python/python-internal.h (gdb_PyObject_CallMethod)
15102 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
15103 New functions.
15104 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
15105 (PySys_GetObject, PySys_SetPath): New macros.
15106
15107 2017-04-05 Pedro Alves <palves@redhat.com>
15108
15109 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
15110 info_osdata_command.
15111 * osdata.c (info_osdata_command): Rename to ...
15112 (info_osdata): ... this. Constify 'type' parameter, and remove
15113 the 'from_tty' parameter. Accept NULL TYPE.
15114 (info_osdata_command): New function.
15115 * osdata.h (info_osdata_command): Remove declaration.
15116 (info_osdata): New declaration.
15117
15118 2017-04-05 Pedro Alves <palves@redhat.com>
15119
15120 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
15121 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
15122 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
15123 parameter.
15124 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
15125 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
15126 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
15127 parameter.
15128 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
15129 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
15130 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
15131 (mi_cmd_file_list_exec_source_files)
15132 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
15133 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
15134 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
15135 parameter.
15136 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
15137 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
15138 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
15139 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
15140 (mi_cmd_stack_info_frame): Constify 'command' parameter.
15141 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
15142 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
15143 'command' parameter.
15144 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
15145 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
15146 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
15147 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
15148 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
15149 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
15150 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
15151 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
15152 (mi_cmd_var_set_update_range): Constify 'command' parameter.
15153 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
15154 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
15155 parameter.
15156 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
15157 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
15158 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
15159 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
15160 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
15161 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
15162 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
15163 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
15164 (mi_cmd_data_list_changed_registers)
15165 (mi_cmd_data_write_register_values)
15166 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
15167 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
15168 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
15169 (mi_cmd_list_features, mi_cmd_list_target_features)
15170 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
15171 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
15172 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
15173 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
15174 (mi_cmd_trace_frame_collected): Constify 'command'
15175 parameter.
15176 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
15177 'command' parameter.
15178
15179 2017-04-05 Pedro Alves <palves@redhat.com>
15180
15181 * ada-lang.c (ada_completer_word_break_characters): Now a const
15182 array.
15183 (ada_get_gdb_completer_word_break_characters): Constify.
15184 * completer.c (gdb_completer_command_word_break_characters)
15185 (gdb_completer_file_name_break_characters)
15186 (gdb_completer_quote_characters): Now const arrays.
15187 (get_gdb_completer_quote_characters): Constify.
15188 (set_rl_completer_word_break_characters): New function.
15189 (set_gdb_completion_word_break_characters)
15190 (complete_line_internal): Use it.
15191 * completer.h (get_gdb_completer_quote_characters): Constify.
15192 (set_rl_completer_word_break_characters): Declare.
15193 * f-lang.c (f_word_break_characters): Constify.
15194 * language.c (default_word_break_characters): Constify.
15195 * language.h (language_defn::la_word_break_characters): Constify.
15196 (default_word_break_characters): Constify.
15197 * top.c (init_main): Use set_rl_completer_word_break_characters.
15198
15199 2017-04-05 Pedro Alves <palves@redhat.com>
15200
15201 * aix-thread.c (aix_thread_pid_to_str)
15202 (aix_thread_extra_thread_info): Constify.
15203 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
15204 * bsd-uthread.c (bsd_uthread_extra_thread_info)
15205 (bsd_uthread_pid_to_str): Constify.
15206 * corelow.c (core_pid_to_str): Constify.
15207 * darwin-nat.c (darwin_pid_to_str): Constify.
15208 * fbsd-nat.c (fbsd_pid_to_str): Constify.
15209 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
15210 Constify.
15211 * gnu-nat.c (gnu_pid_to_str): Constify.
15212 * go32-nat.c (go32_pid_to_str): Constify.
15213 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
15214 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
15215 * inferior.c (inferior_pid_to_str): Constify.
15216 * linux-nat.c (linux_nat_pid_to_str): Constify.
15217 * linux-tdep.c (linux_core_pid_to_str): Constify.
15218 * linux-thread-db.c (thread_db_pid_to_str)
15219 (thread_db_extra_thread_info): Constify.
15220 * nto-tdep.c (nto_extra_thread_info): Constify.
15221 * nto-tdep.h (nto_extra_thread_info): Constify.
15222 * obsd-nat.c (obsd_pid_to_str): Constify.
15223 * procfs.c (procfs_pid_to_str): Constify.
15224 * ravenscar-thread.c (ravenscar_extra_thread_info)
15225 (ravenscar_pid_to_str): Constify.
15226 * remote-sim.c (gdbsim_pid_to_str): Constify.
15227 * remote.c (remote_threads_extra_info, remote_pid_to_str):
15228 Constify.
15229 * sol-thread.c (solaris_pid_to_str): Constify.
15230 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
15231 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
15232 * target.c (default_pid_to_str, target_pid_to_str)
15233 (normal_pid_to_str, default_pid_to_str): Constify.
15234 * target.h (target_ops::to_pid_to_str)
15235 (target_ops::to_extra_thread_info): Constify.
15236 (target_pid_to_str, normal_pid_to_str): Constify.
15237 * windows-nat.c (windows_pid_to_str): Constify.
15238 * gdbarch.sh (core_pid_to_str): Constify.
15239 * target-delegates.c: Regenerate.
15240 * gdbarch.h, gdbarch.c: Regenerate.
15241
15242 2017-04-05 Pedro Alves <palves@redhat.com>
15243
15244 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
15245 the memory of the temporary warning_pre_print override.
15246 * utils.c (warning_pre_print): Constify.
15247 * utils.h (warning_pre_print): Constify.
15248
15249 2017-04-05 Pedro Alves <palves@redhat.com>
15250
15251 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
15252 (shell_command): New function.
15253 (make_command): Use std::string.
15254 (init_cli_cmds): Register shell_command instead of shell_escape.
15255
15256 2017-04-05 Pedro Alves <palves@redhat.com>
15257
15258 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
15259 * tracepoint.c (default_collect): Don't initialize.
15260
15261 2017-04-05 Pedro Alves <palves@redhat.com>
15262
15263 * macroexp.c (macro_buffer::shared): Now a bool.
15264 (init_buffer): Update.
15265 (init_shared_buffer): Constify 'addr' parameter.
15266 (substitute_args, expand, macro_expand, macro_expand_next): Remove
15267 casts.
15268
15269 2017-04-05 Pedro Alves <palves@redhat.com>
15270
15271 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15272 * disasm.c (set_disassembler_options): Constify local.
15273 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15274
15275 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15276
15277 PR gdb/21352
15278 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15279 option.
15280
15281 2017-04-05 Yao Qi <yao.qi@linaro.org>
15282
15283 * frame.c (frame_unwind_register_unsigned): Call
15284 frame_unwind_register_value.
15285
15286 2017-04-05 Yao Qi <yao.qi@linaro.org>
15287
15288 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15289 Use gdb_test_multiple, and don't match anchor.
15290
15291 2017-04-05 Pedro Alves <palves@redhat.com>
15292
15293 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15294 (Write After Approval): Remove Simon Marchi.
15295
15296 2017-04-05 Pedro Alves <palves@redhat.com>
15297
15298 * common/gdb_optional.h (optional::optional): Make constexpr and
15299 initialize m_dummy.
15300
15301 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15302
15303 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15304 (amd64fbsd_jmp_buf_reg_offset): Remove.
15305 (amd64fbsd_supply_uthread): Remove function.
15306 (amd64fbsd_collect_uthread): Remove function.
15307 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15308 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15309 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15310 (fbsd-nat.c): Update comment.
15311 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15312 (i386fbsd_jmp_buf_reg_offset): Remove.
15313 (i386fbsd_supply_uthread): Remove function.
15314 (i386fbsd_collect_uthread): Remove function.
15315 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15316
15317 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15318
15319 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15320 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15321 * NEWS: Mention that support for FreeBSD/alpha was removed.
15322 * alpha-fbsd-tdep.c: Delete file.
15323 * config/alpha/fbsd.mh: Delete file.
15324 * configure.host: Delete alpha*-*-freebsd* and
15325 alpha*-*-kfreebsd*-gnu.
15326 * configure.tgt: Delete alpha*-*-freebsd* and
15327 alpha*-*-kfreebsd*-gnu.
15328
15329 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15330
15331 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15332 amd64bsd_store_inferior_registers): Use ptid from regcache.
15333
15334 2017-04-04 Pedro Alves <palves@redhat.com>
15335
15336 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15337 data fields, make them private and add "m_" prefixes.
15338 (lnp_state_machine::lnp_state_machine): New ctor.
15339 (record_line, check_line_address, handle_set_discriminator)
15340 (handle_set_address, handle_advance_pc, handle_special_opcode)
15341 (handle_advance_line, handle_set_file, handle_negate_stmt)
15342 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15343 (end_sequence, advance_line): New methods.
15344 (m_gdbarch, m_record_lines_p): New fields.
15345 (lnp_reader_state): Delete.
15346 (dwarf_record_line): Rename to ...
15347 (lnp_state_machine::record_line): ... adjust.
15348 (init_lnp_state_machine): Delete.
15349 (lnp_state_machine::lnp_state_machine): New.
15350 (check_line_address): Rename to ...
15351 (lnp_state_machine::check_line_address): This.
15352 (dwarf_decode_lines_1): Remove reference to "reader_state".
15353 Adjust lnp_state_machine having a non-default ctor. Use bool.
15354 State machine internal state manipulation moved to
15355 lnp_state_machine methods.
15356
15357 2017-04-04 Pedro Alves <palves@redhat.com>
15358
15359 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15360 unittests/offset-type-selftests.c.
15361 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15362 * common/offset-type.h: New file.
15363 * common/preprocessor.h: New file.
15364 * common/traits.h: New file.
15365 * common/valid-expr.h: New file.
15366 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15367 sect_offset and cu_offset strong typedefs throughout.
15368 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15369 typedefs throughout.
15370 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15371 sect_offset and cu_offset strong typedefs throughout.
15372 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15373 typedefs throughout.
15374 * gdbtypes.h: Include "common/offset-type.h".
15375 (cu_offset): Now an offset type (strong typedef) instead of a
15376 struct.
15377 (sect_offset): Likewise.
15378 (union call_site_parameter_u): Rename "param_offset" field to
15379 "param_cu_off".
15380 * unittests/offset-type-selftests.c: New file.
15381
15382 2017-04-04 Pedro Alves <palves@redhat.com>
15383
15384 * common/underlying.h: New file.
15385 * dwarf2read.c: Include "common/gdb_optional.h" and
15386 "common/underlying.h".
15387 (dir_index, file_name_index): New types.
15388 (file_entry): Use them.
15389 (file_entry::include): Use to_underlying.
15390 (line_header::add_file_name): Use dir_index.
15391 (read_formatted_entries): Use gdb::optional. Read form before
15392 writting to file_entry.
15393 (dwarf_decode_line_header): Use dir_index.
15394 (lnp_state_machine::current_file): Use to_underlying.
15395 (lnp_state_machine::file): Change type to file_name_index.
15396 (dwarf_record_line): Use to_underlying.
15397 (init_lnp_state_machine): Use file_name_index.
15398 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15399
15400 2017-04-04 Pedro Alves <palves@redhat.com>
15401
15402 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15403 operator bool, has_value and get methods.
15404
15405 2017-04-04 Pedro Alves <palves@redhat.com>
15406
15407 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15408 fields.
15409 (line_header): Initialize all data fields. Change type of
15410 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15411 Change type of include_dirs to std::vector<const char *>. Remove
15412 num_include_dirs, include_dirs_size. Change type of file_names to
15413 std::vector<file_entry>. Remove num_file_names, file_names_size.
15414 (line_header::line_header): New.
15415 (line_header::add_include_dir, line_header::add_file_name): New
15416 methods.
15417 (line_header::include_dir_at): Remove NULL check.
15418 (line_header::file_name_at): Add const overload.
15419 (line_header_up): New unique_ptr typedef.
15420 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15421 std::vector. Remove free_line_header call.
15422 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15423 free_line_header call.
15424 (free_cu_line_header): Delete.
15425 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15426 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15427 Adjust to use std::vector.
15428 (free_line_header): Delete.
15429 (free_line_header_voidp): Use delete.
15430 (add_include_dir): Replace with ...
15431 (line_header::add_include_dir): ... this method. Use std::vector.
15432 (add_file_name): Replace with ...
15433 (line_header::add_file_name): ... this method. Use std::vector.
15434 (add_include_dir_stub): Delete.
15435 (read_formatted_entries): Remove memset.
15436 (dwarf_decode_line_header): Return a line_header_up instead of a
15437 raw pointer. Remove cleanup handling. Pass lambdas to
15438 read_formatted_entries. Adjust to use line_header methods.
15439 (dwarf_decode_lines_1): Adjust to use line_header methods.
15440 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15441 use std::vector.
15442
15443 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15444
15445 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15446 instead of struct ptid.
15447
15448 2017-05-04 Alan Hayward <alan.hayward@arm.com>
15449
15450 * frame.c (get_frame_register_bytes): Unwind using value.
15451 (put_frame_register_bytes): Likewise.
15452
15453 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15454
15455 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15456 aggregate-like.
15457
15458 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15459
15460 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15461
15462 2017-03-29 Yao Qi <yao.qi@linaro.org>
15463
15464 * gdbthread.h (struct thread_info): Declare constructor and
15465 destructor. Add some in-class member initializers.
15466 * thread.c (free_thread): Remove.
15467 (init_thread_list): Call delete instead of free_thread.
15468 (new_thread): Call thread_info constructor.
15469 (thread_info::thread_info): New function.
15470 (thread_info::~thread_info): New function.
15471 (delete_thread_1): Call delete instead of free_thread.
15472 (make_cleanup_restore_current_thread): Move tp and frame to
15473 inner block.
15474
15475 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15476
15477 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15478 (arc_skip_prologue): Likewise.
15479 (arc_make_frame_cache): Likewise.
15480 (arc_pv_get_operand): New function.
15481 (arc_is_in_prologue): Likewise.
15482 (arc_analyze_prologue): Likewise.
15483 (arc_print_frame_cache): Likewise.
15484 (MAX_PROLOGUE_LENGTH): New constant.
15485
15486 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15487
15488 * configure.tgt: Add arc-insn.o.
15489 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15490 (dump_arc_instruction_command): New function.
15491 (arc_fprintf_disasm): Likewise.
15492 (arc_disassemble_info): Likewise.
15493 (arc_insn_get_operand_value): Likewise.
15494 (arc_insn_get_operand_value_signed): Likewise.
15495 (arc_insn_get_memory_base_reg): Likewise.
15496 (arc_insn_get_memory_offset): Likewise.
15497 (arc_insn_get_branch_target): Likewise.
15498 (arc_insn_dump): Likewise.
15499 (arc_insn_get_linear_next_pc): Likewise.
15500 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15501 (arc_disassemble_info): Likewise.
15502 (arc_insn_get_branch_target): Likewise.
15503 (arc_insn_get_linear_next_pc): Likewise.
15504 * NEWS: Mention new "maint print arc arc-instruction".
15505
15506 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15507
15508 * arc-tdep (maintenance_print_arc_list): New variable.
15509 (maintenance_print_arc_command): New function.
15510
15511 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15512
15513 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15514 Add "limm" and "reserved".
15515 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15516 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15517 * arc-tdep.h (arc_regnum): Likewise.
15518
15519 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15520
15521 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15522 for THREADPTR register.
15523 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15524 register.
15525 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15526 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15527 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15528
15529 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15530
15531 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15532 registers above gdbarch_num_regs (gdbarch) as privileged in
15533 call0 ABI.
15534
15535 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15536
15537 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15538 for a single specified register or for all registers in
15539 a0_base..a0_base + C0_NREGS range.
15540 (supply_gregset_reg): Call regcache_raw_supply for a single
15541 specified register or for all registers in a0_base..a0_base +
15542 C0_NREGS range.
15543
15544 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15545
15546 * arch/xtensa.h (C0_NREGS): Add definition.
15547 * xtensa-tdep.c (C0_NREGS): Remove definition.
15548
15549 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15550
15551 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15552 Drop xtensa_default_isa initialization.
15553 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15554
15555 2017-03-27 Pedro Alves <palves@redhat.com>
15556
15557 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15558 (file_entry::include_dir): New method.
15559 (line_header::include_dir_at, line_header::file_name_at): New
15560 methods.
15561 (setup_type_unit_groups, setup_type_unit_groups)
15562 (psymtab_include_file_name): Simplify using the new methods.
15563 (lnp_state_machine) <the_line_header>: New field.
15564 <file>: Add comment.
15565 (lnp_state_machine::current_file): New method.
15566 (dwarf_record_line): Simplify using the new methods.
15567 (init_lnp_state_machine): Initialize the "the_line_header" field.
15568 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15569 Simplify using the new methods.
15570
15571 2017-03-27 Pedro Alves <palves@redhat.com>
15572
15573 * cp-name-parser.y (make_empty): Delete.
15574 (demangler_special, nested_name, ptr_operator, array_indicator)
15575 (direct_declarator, declarator_1): Use fill_comp instead of
15576 make_empty.
15577
15578 2017-03-27 Pedro Alves <palves@redhat.com>
15579
15580 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15581 to ATTRIBUTE_PRINTF.
15582 * solib-target.c (library_list_start_list): Print "string" not
15583 "version".
15584 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15585 gdb_xml_error call.
15586
15587 2017-03-27 Pedro Alves <palves@redhat.com>
15588
15589 * dwarf2read.c (struct file_and_directory): New.
15590 (dwarf2_get_dwz_file): Adjust to use std::string.
15591 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15592 (find_file_and_directory): Adjust to return a file_and_directory
15593 object.
15594 (read_file_scope): Adjust to use file_and_directory. Remove
15595 make_cleanup/do_cleanups calls.
15596 (open_and_init_dwp_file): Adjust to use std::string. Remove
15597 make_cleanup/do_cleanups calls.
15598 * python/python.c (do_start_initialization): Adjust to ldirname
15599 returning a std::string.
15600 * utils.c (ldirname): Now returns a std::string.
15601 * utils.h (ldirname): Change return type to std::string.
15602 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15603 returning a std::string.
15604 * xml-tdesc.c (file_read_description_xml): Likewise.
15605
15606 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15607
15608 * regcache.c (regcache_debug_print_register): New function.
15609 * regcache.h (regcache_debug_print_register): New declaration.
15610 * target.c (debug_print_register): Remove.
15611 (target_fetch_registers): Call regcache_debug_print_register.
15612 (target_store_registers): Likewise.
15613
15614 2017-03-24 Pádraig Brady <pbrady@fb.com>
15615
15616 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15617 reference beyond the 'lh->include_dirs' array before accessing to
15618 it.
15619 (psymtab_include_file_name): Likewise.
15620 (dwarf_decode_lines_1): Likewise.
15621 (dwarf_decode_lines): Likewise.
15622 (file_file_name): Likewise.
15623
15624 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15625
15626 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15627 inferior_ptid.
15628 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15629 ps_lsetfpregs): Likewise.
15630 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15631 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15632 ps_lsetfpregs): Likewise.
15633 * target.c (target_fetch_registers, target_store_registers):
15634 Remove asserts.
15635
15636 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15637
15638 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15639
15640 2017-03-23 Yao Qi <yao.qi@linaro.org>
15641
15642 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15643 (_initialize_aarch64_tdep): Register it.
15644 (aarch64_record_load_store): Handle PRFM instruction.
15645 (aarch64_process_record_test): New function.
15646
15647 2017-03-23 Yao Qi <yao.qi@linaro.org>
15648
15649 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15650 indentation.
15651
15652 2017-03-23 Yao Qi <yao.qi@linaro.org>
15653
15654 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15655
15656 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15657
15658 python/python.c (do_start_initialization): Fix memory leak.
15659
15660 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15661
15662 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15663 using get_ptrace_pid.
15664 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15665 inferior_ptid.
15666 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15667 inferior_ptid instead of pid.
15668
15669 2017-03-22 Yao Qi <yao.qi@linaro.org>
15670
15671 * aarch64-tdep.c: Wrap locally used classes in anonymous
15672 namespace.
15673 * arm-tdep.c: Likewise.
15674 * linespec.c: Likewise.
15675 * ui-out.c: Likewise.
15676
15677 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15678
15679 PR gdb/19637
15680 * python/lib/gdb/printer/bound_registers.py: Import sys.
15681
15682 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15683
15684 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15685 windows_thread_info parameter and use it instead of
15686 current_thread.
15687 (windows_fetch_inferior_registers): Don't set current_thread,
15688 pass the thread to do_windows_fetch_inferior_registers. Use
15689 ptid from regcache instead of inferior_ptid.
15690 (do_windows_store_inferior_registers): Add windows_thread_info
15691 parameter and use it instead of current_thread.
15692 (windows_store_inferior_registers): Don't set current_thread,
15693 pass the thread to do_windows_store_inferior_registers. Use
15694 ptid from regcache instead of inferior_ptid.
15695
15696 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15697
15698 * ser-mingw.c (ser_windows_raw): Remove reference to
15699 struct serial::current_timeout.
15700
15701 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15702
15703 PR tdep/20928
15704 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15705 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15706 (sparc64_fsr_type): Fix %fsr decoding.
15707
15708 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15709
15710 * python/py-record-btrace.c (btpy_insn_data): Change return type
15711 for Python 2.
15712
15713 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15714
15715 * spu-linux-nat.c (spu_fetch_inferior_registers,
15716 spu_store_inferior_registers): Use ptid from regcache, set and
15717 restore inferior_ptid.
15718 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15719 Likewise.
15720
15721 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15722
15723 * i386-linux-nat.c (fetch_register, store_register,
15724 i386_linux_fetch_inferior_registers,
15725 i386_linux_store_inferior_registers): Use ptid from regcache.
15726 * ia64-linux-nat.c (ia64_linux_fetch_register,
15727 ia64_linux_store_register): Likewise.
15728 * inf-ptrace.c (inf_ptrace_fetch_register,
15729 inf_ptrace_store_register): Likewise.
15730 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15731 m32r_linux_store_inferior_registers): Likewise.
15732 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15733 m68kbsd_store_inferior_registers): Likewise.
15734 * m68k-linux-nat.c (fetch_register, store_register,
15735 m68k_linux_fetch_inferior_registers,
15736 m68k_linux_store_inferior_registers): Likewise.
15737 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15738 m88kbsd_store_inferior_registers): Likewise.
15739 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15740 mips_fbsd_store_inferior_registers): Likewise.
15741 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15742 mips64_linux_regsets_store_registers): Likewise.
15743 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15744 mipsnbsd_store_inferior_registers): Likewise.
15745 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15746 mips64obsd_store_inferior_registers): Likewise.
15747 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15748 Likewise.
15749 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15750 ppcfbsd_store_inferior_registers): Likewise.
15751 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15752 ppc_linux_store_inferior_registers): Likewise.
15753 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15754 ppcnbsd_store_inferior_registers): Likewise.
15755 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15756 ppcobsd_store_registers): Likewise.
15757 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15758 Likewise.
15759 * ravenscar-thread.c (ravenscar_fetch_registers,
15760 ravenscar_store_registers, ravenscar_prepare_to_store):
15761 Likewise.
15762 * record-btrace.c (record_btrace_fetch_registers,
15763 record_btrace_store_registers, record_btrace_prepare_to_store):
15764 Likewise.
15765 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15766 Lookup inferior using ptid from regcache, instead of
15767 current_inferior.
15768 * remote.c (remote_fetch_registers, remote_store_registers): Use
15769 ptid from regcache.
15770 * rs6000-nat.c (fetch_register, store_register): Likewise.
15771 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15772 s390_linux_store_inferior_registers): Likewise.
15773 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15774 shnbsd_store_inferior_registers): Likewise.
15775 * sol-thread.c (sol_thread_fetch_registers,
15776 sol_thread_store_registers): Likewise.
15777 * sparc-nat.c (sparc_fetch_inferior_registers,
15778 sparc_store_inferior_registers): Likewise.
15779 * tilegx-linux-nat.c (fetch_inferior_registers,
15780 store_inferior_registers): Likewise.
15781 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15782 vaxbsd_store_inferior_registers): Likewise.
15783 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15784 store_xtregs): Likewise.
15785
15786 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15787
15788 PR gdb/14441
15789 * NEWS: Mention support for rvalue references in GDB and python.
15790 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15791 supports both lvalue and rvalue references.
15792
15793 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15794
15795 PR gdb/14441
15796 * gdbtypes.c (rank_one_type): Implement overloading
15797 resolution rules regarding rvalue references.
15798
15799 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15800
15801 PR gdb/14441
15802 * aarch64-tdep.c (aarch64_type_align)
15803 (aarch64_extract_return_value, aarch64_store_return_value): Change
15804 lvalue reference type checks to general reference type checks.
15805 * amd64-tdep.c (amd64_classify): Likewise.
15806 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15807 Likewise.
15808 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15809 (arm_store_return_value): Likewise.
15810 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15811 * c-typeprint.c (c_print_type): Likewise.
15812 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15813 (cplus_number_of_children, cplus_describe_child): Likewise.
15814 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15815 * completer.c (expression_completer): Likewise.
15816 * cp-support.c (make_symbol_overload_list_adl_namespace):
15817 Likewise.
15818 * darwin-nat-info.c (info_mach_region_command): Likewise.
15819 * dwarf2loc.c (entry_data_value_coerce_ref)
15820 (value_of_dwarf_reg_entry): Likewise.
15821 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15822 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15823 Likewise.
15824 * findvar.c (extract_typed_address, store_typed_address):
15825 Likewise.
15826 * gdbtypes.c (rank_one_type): Likewise.
15827 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15828 * infcall.c (value_arg_coerce): Likewise.
15829 * language.c (pointer_type): Likewise.
15830 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15831 Likewise.
15832 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15833 * mn10300-tdep.c (mn10300_type_align): Likewise.
15834 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15835 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15836 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15837 Likewise.
15838 * printcmd.c (print_formatted, x_command): Likewise.
15839 * python/py-type.c (typy_get_composite, typy_template_argument):
15840 Likewise.
15841 * python/py-value.c (valpy_referenced_value)
15842 (valpy_get_dynamic_type, value_has_field): Likewise.
15843 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15844 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15845 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15846 * spu-tdep.c (spu_scalar_value_p): Likewise.
15847 * symtab.c (lookup_symbol_aux): Likewise.
15848 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15849 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15850 Likewise.
15851 * valops.c (value_cast_pointers, value_cast)
15852 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15853 (value_struct_elt, value_struct_elt_bitpos)
15854 (value_find_oload_method_list, find_overload_match)
15855 (value_rtti_indirect_type): Likewise.
15856 * valprint.c (val_print_scalar_type_p, generic_val_print):
15857 Likewise.
15858 * value.c (value_actual_type, value_as_address, unpack_long)
15859 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15860 (coerce_ref): Likewise.
15861 * varobj.c (varobj_get_value_type): Likewise.
15862
15863 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15864
15865 PR gdb/14441
15866 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15867 table of constants.
15868 * python/lib/gdb/command/explore.py: Support exploring values
15869 of rvalue reference types.
15870 * python/lib/gdb/types.py: Implement get_basic_type() for
15871 rvalue reference types.
15872 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15873 constant.
15874 * python/py-value.c (valpy_getitem): Add an rvalue reference
15875 check.
15876 (valpy_reference_value): Add new parameter "refcode".
15877 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15878 New wrappers for valpy_reference_value().
15879 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15880 (gdbpy_invoke_xmethod): Likewise.
15881
15882 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15883
15884 PR gdb/14441
15885 * dwarf2read.c (process_die, read_type_die_1): Handle the
15886 DW_TAG_rvalue_reference_type DIE.
15887 (read_tag_reference_type): Add new parameter "refcode".
15888
15889 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15890
15891 PR gdb/14441
15892 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15893 (c_type_print_modifier, c_type_print_varspec_suffix)
15894 (c_type_print_base): Support printing rvalue reference types.
15895 * c-valprint.c (c_val_print, c_value_print): Support printing
15896 rvalue reference values.
15897
15898 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15899
15900 PR gdb/14441
15901 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15902 typename.
15903 * cp-support.c (replace_typedefs): Handle
15904 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15905 * python/py-type.c (typy_lookup_type): Likewise.
15906
15907 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15908
15909 PR gdb/14441
15910 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15911 * parse.c (insert_type): Change assert statement.
15912 (follow_types): Handle rvalue reference types.
15913 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15914 constant.
15915
15916 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15917
15918 PR gdb/14441
15919 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15920 value_ref() interface.
15921 * c-valprint.c (c_value_print): Likewise.
15922 * infcall.c (value_arg_coerce): Likewise.
15923 * python/py-value.c (valpy_reference_value): Likewise.
15924 * valops.c (value_cast, value_reinterpret_cast)
15925 (value_dynamic_cast, typecmp): Likewise.
15926 (value_ref): Parameterize by kind of return value reference type.
15927 * value.h (value_ref): Add new parameter "refcode".
15928
15929 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15930
15931 PR gdb/14441
15932 * dwarf2read.c (read_tag_reference_type): Use
15933 lookup_lvalue_reference_type() instead of lookup_reference_type().
15934 * eval.c (evaluate_subexp_standard): Likewise.
15935 * f-exp.y: Likewise.
15936 * gdbtypes.c (make_reference_type, lookup_reference_type):
15937 Generalize with rvalue reference types.
15938 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15939 convenience wrappers for lookup_reference_type().
15940 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15941 reference kind parameter.
15942 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15943 wrappers for lookup_reference_type().
15944 * guile/scm-type.c (gdbscm_type_reference): Use
15945 lookup_lvalue_reference_type() instead of lookup_reference_type().
15946 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15947 * parse.c (follow_types): Likewise.
15948 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15949 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15950 Likewise.
15951 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15952 (gdbpy_invoke_xmethod): Likewise.
15953 * stabsread.c: Provide extra argument to make_reference_type()
15954 call.
15955 * valops.c (value_ref, value_rtti_indirect_type): Use
15956 lookup_lvalue_reference_type() instead of lookup_reference_type().
15957
15958 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15959
15960 PR gdb/14441
15961 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15962 (TYPE_IS_REFERENCE): New macro.
15963 (struct type): Add rvalue_reference_type field.
15964 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15965
15966 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15967
15968 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15969 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15970 New function definition.
15971 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15972 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15973 New function declaration.
15974 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15975 * mi/mi-interp.h: New file.
15976 * solib.c (info_sharedlibrary_command): Replace for loop with
15977 ALL_SO_LIBS macro
15978 * solib.h (update_solib_list): New function declaration.
15979 (so_list_head): Move macro.
15980 * solist.h (ALL_SO_LIBS): New macro.
15981
15982 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15983
15984 * infcmd.c (post_create_inferior): Remove unused argument in
15985 call to solib_add.
15986 * remote.c (remote_start_remote): Likewise.
15987 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15988 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15989 (enable_break): Likewise.
15990 * solib.c (update_solib_list): Remove unused target argument
15991 and its documentation.
15992 (solib_add): Remove unused target argument. Remove unused
15993 argument in call to update_solib_list.
15994 (info_sharedlibrary_command): Remove unused argument in call
15995 to update_solib_list.
15996 (sharedlibrary_command): Remove unused argument in call to
15997 solib_add.
15998 (handle_solib_event): Likewise.
15999 (reload_shared_libraries): Likewise.
16000 * solib.h (solib_add): Remove unused target argument.
16001
16002 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
16003
16004 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
16005 (s390_displaced_step_fixup): Cover relative branches with the
16006 default fixup handling. This fixes lack of support for some
16007 relative branch instructions.
16008
16009 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16010
16011 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
16012 ptid from regcache.
16013
16014 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16015
16016 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
16017 i386_darwin_store_inferior_registers): Use ptid from regcache.
16018
16019 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16020
16021 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
16022 i386bsd_store_inferior_registers): Use ptid from regcache.
16023
16024 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16025
16026 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
16027 hppaobsd_store_registers): Use ptid from regcache.
16028
16029 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16030
16031 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
16032 hppanbsd_store_registers): Use ptid from regcache.
16033
16034 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16035
16036 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
16037 from regcache. Use get_ptrace_pid.
16038
16039 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16040
16041 * corelow.c (get_core_register_section): Use ptid from regcache,
16042 update doc.
16043
16044 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16045
16046 * bsd-uthread.c (bsd_uthread_fetch_registers,
16047 bsd_uthread_store_registers): Use ptid from regcache, set and
16048 restore inferior_ptid.
16049
16050 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16051
16052 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
16053 fetch_fp_regs, store_register, store_regs, store_fp_register,
16054 store_fp_regs): Use ptid from regcache.
16055
16056 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16057
16058 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
16059 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
16060 store_vfp_regs): Use ptid from regcache.
16061
16062 2017-03-17 Pedro Alves <palves@redhat.com>
16063
16064 PR remote/21188
16065 * ser-base.c (ser_base_wait_for): Add comment.
16066 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
16067 version.
16068 * ser-unix.c (hardwire_raw): Remove reference to
16069 scb->current_timeout.
16070 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
16071 (hardwire_ops): Install ser_base_readchar instead of
16072 hardwire_readchar.
16073 * serial.h (struct serial) <current_timeout, timeout_remaining>:
16074 Remove fields.
16075
16076 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
16077
16078 PR gdb/19637
16079 * python/lib/gdb/printer/bound_registers.py: Add support for
16080 Python 3.
16081
16082 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
16083
16084 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
16085 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
16086 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
16087 byte_offset to subobj_byte_offset. Fix the handling of
16088 DWARF_VALUE_STACK on big-endian targets when coming via an
16089 implicit pointer.
16090 (dwarf2_evaluate_loc_desc): Adjust call to
16091 dwarf2_evaluate_loc_desc_full.
16092 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
16093 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
16094
16095 2017-03-16 Yao Qi <yao.qi@linaro.org>
16096
16097 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
16098 and REVSH instructions.
16099
16100 2017-03-16 Yao Qi <yao.qi@linaro.org>
16101
16102 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
16103 (arm_record_test): Declare.
16104 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
16105 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
16106 align with the manual.
16107 (thumb_record_misc): Adjust the code order to align with the
16108 manual.
16109 (thumb2_record_decode_insn_handler): Fix instruction matching.
16110 (instruction_reader_thumb): New class.
16111 (arm_record_test): New function.
16112
16113 2017-03-16 Yao Qi <yao.qi@linaro.org>
16114
16115 * arm-tdep.c (abstract_memory_reader): New class.
16116 (instruction_reader): New class.
16117 (extract_arm_insn): Add argument 'reader'. Callers updated.
16118 (decode_insn): Likewise.
16119
16120 2017-03-16 Doug Evans <dje@google.com>
16121
16122 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
16123 member. Change type of TYPE member to SCM. All uses updated.
16124 (lsscm_make_lazy_string_smob): Add assert.
16125 (lsscm_make_lazy_string): Flag bad length values.
16126 (lsscm_elt_type): New function.
16127 (gdbscm_lazy_string_to_value): Rewrite to use
16128 lsscm_safe_lazy_string_to_value.
16129 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
16130 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
16131 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
16132 in incoming type.
16133 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16134 * guile/scm-type.c (tyscm_scm_to_type): New function.
16135
16136 2017-03-15 Doug Evans <dje@google.com>
16137
16138 PR python/17728, python/18439, python/18779
16139 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
16140 member. Change type of TYPE member to PyObject *. All uses updated.
16141 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
16142 (gdbpy_create_lazy_string_object): Flag bad length values.
16143 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
16144 Handle typedefs in incoming type.
16145 (stpy_lazy_string_elt_type): New function.
16146 (gdbpy_extract_lazy_string): Call it.
16147 * python/py-value.c (valpy_lazy_string): Flag bad length values.
16148 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
16149 typedefs in incoming type.
16150
16151 2017-03-16 Doug Evans <dje@google.com>
16152
16153 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16154 * guile/scm-type.c (tyscm_scm_to_type): New function.
16155
16156 2017-03-16 Jiong Wang <jiong.wang@arm.com>
16157
16158 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
16159 "ULONGEST" for "skip".
16160
16161 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16162
16163 PR gdb/21220
16164 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
16165 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
16166 (inf_ptrace_peek_poke): ...here. New function. Now also loop
16167 over ptrace peek/poke until end of buffer or error.
16168
16169 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
16170
16171 * parse.c (length_of_subexp): Make static.
16172 * parser-defs.h (length_of_subexp): Remove.
16173
16174 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16175
16176 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
16177 as well.
16178
16179 2017-03-14 Pedro Alves <palves@redhat.com>
16180
16181 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
16182 (main): Use std::unique_ptr. Remove calls to
16183 cp_demangled_name_parse_free.
16184
16185 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16186
16187 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
16188 alphabsd_store_inferior_registers): Use regcache->ptid instead
16189 of inferior_ptid.
16190
16191 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16192
16193 * aix-thread.c (aix_thread_fetch_registers,
16194 aix_thread_store_registers): Use regcache->ptid instead of
16195 inferior_ptid.
16196
16197 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16198
16199 * aarch64-linux-nat.c (fetch_gregs_from_thread,
16200 store_gregs_to_thread, fetch_fpregs_from_thread,
16201 store_fpregs_to_thread): Use regcache->ptid instead of
16202 inferior_ptid.
16203
16204 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16205
16206 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
16207 amd64_linux_fetch_inferior_registers): Use regcache->ptid
16208 instead of inferior_ptid.
16209
16210 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16211
16212 * target.c (target_fetch_registers, target_store_registers): Add
16213 assert.
16214
16215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16216
16217 * regcache.h (regcache_get_ptid): New function.
16218 * regcache.c (regcache_get_ptid): New function.
16219
16220 2017-03-13 Mark Wielaard <mark@klomp.org>
16221
16222 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
16223
16224 2017-03-10 Keith Seitz <keiths@redhat.com>
16225
16226 PR c++/8218
16227 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
16228
16229 2017-03-08 Pedro Alves <palves@redhat.com>
16230
16231 PR gdb/18360
16232 * infrun.c (start_step_over, do_target_resume, resume)
16233 (restart_threads): Assert we're not resuming a thread that is
16234 meant to be stopped.
16235 (infrun_thread_stop_requested_callback): Delete.
16236 (infrun_thread_stop_requested): If the thread is internally
16237 stopped, queue a pending stop event and clear the thread's
16238 inline-frame state.
16239 (handle_stop_requested): New function.
16240 (handle_syscall_event, handle_inferior_event_1): Use
16241 handle_stop_requested.
16242 (handle_stop_requested): New function.
16243 (handle_signal_stop): Set the thread's stop_signal here instead of
16244 at caller.
16245 (finish_step_over): Clear step over info unconditionally.
16246 (handle_signal_stop): If the user had interrupted the event
16247 thread, consider the stop a random signal.
16248 (handle_signal_stop) <signal arrived while stepping over
16249 breakpoint>: Don't restart threads here.
16250 (stop_waiting): Don't clear step-over info here.
16251
16252 2017-03-08 Pedro Alves <palves@redhat.com>
16253
16254 PR 21206
16255 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
16256 goes to argument 2, not 1.
16257
16258 2017-03-08 Pedro Alves <palves@redhat.com>
16259
16260 PR cli/21218
16261 * top.c (gdb_readline_wrapper): Avoid passing NULL to
16262 display_gdb_prompt.
16263 (command_line_input): Add comment.
16264
16265 2017-03-08 Pedro Alves <palves@redhat.com>
16266
16267 PR tui/21216
16268 * tui/tui-file.c (tui_file::write): New.
16269 * tui/tui-file.h (tui_file): Override "write".
16270 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16271 factored out from ...
16272 (tui_puts): ... here.
16273 (tui_putc): Use them.
16274 (tui_write): New function.
16275 * tui/tui-io.h (tui_write): Declare.
16276
16277 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16278
16279 * Makefile.in (SFILES): Replace "environ.c" with
16280 "common/environ.c".
16281 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16282 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16283 to...
16284 * common/environ.c: ... here.
16285 * environ.h: Moved to...
16286 * common/environ.h: ... here.
16287
16288 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16289
16290 * gdbarch.sh (pstring_ptr): New static function.
16291 (gdbarch_disassembler_options): Use it.
16292 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16293 not valid_disassembler_option->name.
16294 * gdbarch.c: Regenerate.
16295
16296 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16297
16298 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16299
16300 2017-03-07 Pedro Alves <palves@redhat.com>
16301
16302 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16303
16304 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
16305
16306 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16307 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16308 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16309 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16310
16311 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16312
16313 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16314
16315 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16316
16317 * remote.c (remote_add_target_side_commands): Use range-based
16318 for loop.
16319
16320 2017-03-03 Yao Qi <yao.qi@linaro.org>
16321
16322 PR gdb/21165
16323 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16324 value is lazy.
16325 * valprint.c (common_val_print): Likewise.
16326
16327 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16328
16329 * NEWS: Mention new set/show disassembler-options commands.
16330 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16331 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16332 (prospective_options): New static variable.
16333 (gdb_disassembler::gdb_disassembler): Initialize
16334 m_di.disassembler_options.
16335 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16336 (get_disassembler_options): New function.
16337 (set_disassembler_options): Likewise.
16338 (set_disassembler_options_sfunc): Likewise.
16339 (show_disassembler_options_sfunc): Likewise.
16340 (disassembler_options_completer): Likewise.
16341 (_initialize_disasm): Likewise.
16342 * disasm.h (get_disassembler_options): New prototype.
16343 (set_disassembler_options): Likewise.
16344 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16345 (gdbarch_verify_disassembler_options): Likewise.
16346 * gdbarch.c: Regenerate.
16347 * gdbarch.h: Likewise.
16348 * arm-tdep.c (num_disassembly_options): Delete.
16349 (set_disassembly_style): Likewise.
16350 (arm_disassembler_options): New static variable.
16351 (set_disassembly_style_sfunc): Convert short style name into long
16352 option name. Call set_disassembler_options.
16353 (show_disassembly_style_sfunc): New function.
16354 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16355 set_gdbarch_verify_disassembler_options.
16356 (_initialize_arm_tdep): Delete regnames variable and update callers.
16357 (arm_disassembler_options): Initialize.
16358 (disasm_options): New variable.
16359 (num_disassembly_options): Rename from this...
16360 (num_disassembly_styles): ...to this. Compute by scanning through
16361 disasm_options.
16362 (valid_disassembly_styles): Initialize using disasm_options.
16363 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16364 set_arm_regname_option.
16365 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16366 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16367 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16368 set_gdbarch_verify_disassembler_options.
16369 * s390-tdep.c (s390_disassembler_options): New static variable.
16370 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16371 set_gdbarch_verify_disassembler_options.
16372
16373 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16374
16375 * remote.c (remote_add_target_side_condition): Remove "struct"
16376 keyword from range-based for loop.
16377
16378 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16379
16380 * remote.c (remote_add_target_side_condition): Use range-based
16381 for loop. Update comment.
16382
16383 2017-02-27 Yao Qi <yao.qi@linaro.org>
16384
16385 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16386
16387 2017-02-26 Alan Hayward <alan.hayward@arm.com>
16388
16389 * regcache.c (regcache_raw_update): New function.
16390 (regcache_raw_read): Move code to regcache_raw_update.
16391 * regcache.h (regcache_raw_update): New declaration.
16392 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16393
16394 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16395
16396 * dwarf2read.c (create_debug_type_hash_table): Initialize
16397 header.signature and header.type_offset_in_tu.
16398
16399 2017-02-24 Pedro Alves <palves@redhat.com>
16400
16401 * symtab.c (make_file_symbol_completion_list_1): Use
16402 add_symtab_completions.
16403
16404 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16405
16406 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16407
16408 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16409
16410 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16411 I386_MAX_REGISTER_SIZE.
16412 (i386_pseudo_register_write): Likewise.
16413 (i386_process_record): Likewise.
16414 * i387-tdep.c (i387_supply_xsave): Likewise.
16415 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16416 (store_register): Likewise.
16417
16418 2017-02-23 Pedro Alves <palves@redhat.com>
16419
16420 * ada-lang.c: Include "common/function-view.h".
16421 (ada_iterate_over_symbols): Adjust to use function_view as
16422 callback type.
16423 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16424 (ada_make_symbol_completion_list): Use a lambda.
16425 (ada_exc_search_name_matches): Delete.
16426 (name_matches_regex): New.
16427 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16428 * compile/compile-c-support.c: Include "common/function-view.h".
16429 (print_one_macro): Change prototype to accept a ui_file pointer.
16430 (write_macro_definitions): Use a lambda.
16431 * dwarf2read.c: Include "common/function-view.h".
16432 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16433 (dw2_expand_symtabs_matching): Adjust to use function_view as
16434 callback type.
16435 * language.h: Include "common/function-view.h".
16436 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16437 function_view as callback type.
16438 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16439 * linespec.c: Include "common/function-view.h".
16440 (collect_info::add_symbol): New method.
16441 (struct symbol_and_data_callback, iterate_inline_only, struct
16442 symbol_matcher_data, iterate_name_matcher): Delete.
16443 (iterate_over_all_matching_symtabs): Adjust to use function_view
16444 as callback type and lambdas.
16445 (iterate_over_file_blocks): Adjust to use function_view as
16446 callback type.
16447 (decode_compound_collector): Now a class with private fields.
16448 (decode_compound_collector::release_symbols): New method.
16449 (collect_one_symbol): Rename to...
16450 (decode_compound_collector::operator()): ... this and adjust.
16451 (lookup_prefix_sym): decode_compound_collector construction bits
16452 move to decode_compound_collector ctor. Pass the
16453 decode_compound_collector object directly as callback. Remove
16454 cleanups and use decode_compound_collector::release_symbols
16455 instead.
16456 (symtab_collector): Now a class with private fields.
16457 (symtab_collector::release_symtabs): New method.
16458 (add_symtabs_to_list): Rename to...
16459 (symtab_collector::operator()): ... this and adjust.
16460 (collect_symtabs_from_filename): symtab_collector construction
16461 bits move to symtab_collector ctor. Pass the symtab_collector
16462 object directly as callback. Remove cleanups and use
16463 symtab_collector::release_symtabs instead.
16464 (collect_symbols): Delete.
16465 (add_matching_symbols_to_info): Use lambdas.
16466 * macrocmd.c (print_macro_callback): Delete.
16467 (info_macro_command): Use a lambda.
16468 (info_macros_command): Pass print_macro_definition as callable
16469 directly.
16470 (print_one_macro): Remove 'ignore' parameter.
16471 (macro_list_command): Adjust.
16472 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16473 (macro_for_each_data::user_data): Delete field.
16474 (foreach_macro): Adjust to call the function_view.
16475 (macro_for_each): Adjust to use function_view as callback type.
16476 (foreach_macro_in_scope): Adjust to call the function_view.
16477 (macro_for_each_in_scope): Adjust to use function_view as callback
16478 type.
16479 * macrotab.h: Include "common/function-view.h".
16480 (macro_callback_fn): Declare a prototype instead of a pointer.
16481 Remove "user_data" parameter.
16482 (macro_for_each, macro_for_each_in_scope): Adjust to use
16483 function_view as callback type.
16484 * psymtab.c (partial_map_expand_apply)
16485 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16486 Adjust to use function_view as callback type and to return bool.
16487 (psym_expand_symtabs_matching): Adjust to use function_view as
16488 callback types.
16489 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16490 to use function_view as callback type and to return bool.
16491 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16492 callback types.
16493 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16494 as callback types.
16495 * symfile.h: Include "common/function-view.h".
16496 (expand_symtabs_file_matcher_ftype)
16497 (expand_symtabs_symbol_matcher_ftype)
16498 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16499 return bool.
16500 (quick_symbol_functions::map_symtabs_matching_filename)
16501 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16502 function_view as callback type and return bool.
16503 (expand_symtabs_matching): Adjust to use function_view as callback
16504 type.
16505 (maintenance_expand_name_matcher)
16506 (maintenance_expand_file_matcher): Delete.
16507 (maintenance_expand_symtabs): Use lambdas.
16508 * symtab.c (iterate_over_some_symtabs): Adjust to use
16509 function_view as callback types and return bool.
16510 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16511 of a cleanup.
16512 (lookup_symtab_callback): Delete.
16513 (lookup_symtab): Use a lambda.
16514 (iterate_over_symbols): Adjust to use function_view as callback
16515 type.
16516 (struct search_symbols_data, search_symbols_file_matches)
16517 (search_symbols_name_matches): Delete.
16518 (search_symbols): Use a pair of lambdas.
16519 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16520 (symtab_expansion_callback): Delete.
16521 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16522 * symtab.h: Include "common/function-view.h".
16523 (iterate_over_some_symtabs): Adjust to use function_view as
16524 callback type and return bool.
16525 (iterate_over_symtabs): Adjust to use function_view as callback
16526 type.
16527 (symbol_found_callback_ftype): Remove 'data' parameter and return
16528 bool.
16529 (iterate_over_symbols): Adjust to use function_view as callback
16530 type.
16531
16532 2017-02-23 Pedro Alves <palves@redhat.com>
16533
16534 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16535 (%.o) <unittests/%.c>: New pattern.
16536 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16537 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16538 * common/function-view.h: New file.
16539 * unittests/function-view-selftests.c: New file.
16540 * configure: Regenerate.
16541
16542 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16543
16544 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16545 inferior_ptid.
16546 * go32-nat.c (go32_thread_alive): Likewise.
16547
16548 2017-02-23 Yao Qi <yao.qi@linaro.org>
16549
16550 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16551 delete.
16552
16553 2017-02-23 Yao Qi <yao.qi@linaro.org>
16554
16555 * varobj.c (varobj_clear_saved_item): Use delete instead of
16556 xfree.
16557 (update_dynamic_varobj_children): Likewise.
16558
16559 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16560
16561 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16562
16563 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16564
16565 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16566 m_enum_value to 0 in default constructor.
16567
16568 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16569
16570 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16571 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16572 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16573 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16574 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16575 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16576 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16577 IS_STORE_CONDITIONAL_INSN.
16578
16579 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16580
16581 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16582
16583 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16584
16585 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16586
16587 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16588
16589 * dwarf2read.c (skip_one_die, read_attribute_value)
16590 (dwarf2_const_value_attr, dump_die_shallow)
16591 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16592 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16593
16594 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16595
16596 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16597 (dwarf_parse_macro_header): Accept DWARF version 5.
16598 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16599
16600 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16601
16602 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16603 DW_AT_GNU_*.
16604 * common/common-exceptions.h (enum errors): Likewise.
16605 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16606 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16607 (dwarf_expr_context::execute_stack_op): Likewise.
16608 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16609 Likewise.
16610 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16611 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16612 (show_entry_values_debug, call_site_to_target_addr)
16613 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16614 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16615 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16616 (value_of_dwarf_block_entry, indirect_pieced_value)
16617 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16618 (disassemble_dwarf_expression): Likewise.
16619 * dwarf2read.c (process_die, inherit_abstract_dies)
16620 (read_call_site_scope): Likewise.
16621 * gdbtypes.h (struct func_type, struct call_site_parameter)
16622 (struct call_site): Likewise.
16623 * stack.c (read_frame_arg): Likewise.
16624 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16625
16626 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16627
16628 * defs.h (read_unsigned_leb128): New declaration.
16629 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16630 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16631 (dwarf2_find_location_expression): Call also
16632 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16633 * dwarf2loc.h (dwarf2_version): New declaration.
16634 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16635 rnglists.
16636 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16637 .debug_rnglists.
16638 (struct dwop_section_names): Add loclists_dwo.
16639 (dwop_section_names): Add .debug_loclists.dwo.
16640 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16641 (struct dwarf2_per_cu_data): Add dwarf_version.
16642 (struct dwo_sections): Add loclists.
16643 (struct attr_abbrev): Add implicit_const.
16644 (read_indirect_line_string): New declaration.
16645 (read_unsigned_leb128): Delete declaration.
16646 (rcuh_kind): New definition.
16647 (read_and_check_comp_unit_head): Change parameter
16648 is_debug_types_section to section_kind.
16649 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16650 (read_comp_unit_head): Change parameter abfd to section, add parameter
16651 section_kind. Handle DWARF-5.
16652 (error_check_comp_unit_head): Accept also DWARF version 5.
16653 (read_and_check_comp_unit_head): Change parameter
16654 is_debug_types_section to section_kind.
16655 (read_and_check_type_unit_head): Delete function.
16656 (read_abbrev_offset): Handle DWARF-5.
16657 (create_debug_type_hash_table): Add parameter section_kind. Process
16658 only DW_UT_type. Use signature and type_offset_in_tu from struct
16659 comp_unit_head.
16660 (create_debug_types_hash_table): Update create_debug_type_hash_table
16661 caller.
16662 (create_all_type_units): Call create_debug_type_hash_table.
16663 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16664 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16665 caller.
16666 (skip_one_die): Handle DW_FORM_implicit_const.
16667 (dwarf2_rnglists_process): New function.
16668 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16669 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16670 (read_attribute_value): Handle DW_FORM_implicit_const,
16671 DW_FORM_line_strp.
16672 (read_attribute): Handle DW_FORM_implicit_const.
16673 (read_indirect_string_at_offset_from): New function from
16674 read_indirect_string_at_offset.
16675 (read_indirect_string_at_offset): Call
16676 read_indirect_string_at_offset_from.
16677 (read_indirect_line_string_at_offset): New function.
16678 (read_indirect_string): New function comment.
16679 (read_indirect_line_string): New function.
16680 (read_unsigned_leb128): Make it global.
16681 (dwarf2_string_attr): Handle DWARF-5.
16682 (add_include_dir_stub, read_formatted_entries): New functions.
16683 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16684 Handle DWARF-5.
16685 (per_cu_header_read_in): Update read_comp_unit_head caller.
16686 (dwarf2_version): New function.
16687 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16688 rnglists.
16689 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16690 fields.
16691
16692 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16693
16694 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16695
16696 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16697
16698 * dwarf2read.c (dwarf2_ranges_process): New function from
16699 dwarf2_ranges_read.
16700 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16701 dwarf2_ranges_process.
16702
16703 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16704
16705 * dwarf2read.c (create_debug_type_hash_table): New function from
16706 create_debug_types_hash_table.
16707 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16708 (create_all_type_units, open_and_init_dwo_file): Update
16709 create_debug_types_hash_table callers.
16710
16711 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16712
16713 PR gdb/16188
16714 * fork-child.c (trace_start_error): Fix thinko. va_end should
16715 refer to 'ap', not 'args'.
16716
16717 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16718 Pedro Alves <palves@redhat.com>
16719
16720 PR gdb/16188
16721 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16722 calls succeeded.
16723 * fork-child.c (trace_start_error): New function.
16724 (trace_start_error_with_name): Likewise.
16725 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16726 * inf-ptrace.c (inf_ptrace_me): Likewise.
16727 * inferior.h (trace_start_error): New prototype.
16728 (trace_start_error_with_name): Likewise.
16729
16730 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16731
16732 PR gdb/21164
16733 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16734 NULL before using it.
16735 * symmisc.c (maintenance_print_symbols): Likewise.
16736 (maintenance_print_msymbols): Likewise.
16737
16738 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16739
16740 * NEWS: Add record Python bindings entry.
16741
16742 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16743
16744 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16745 py-record-full.o.
16746 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16747 * python/py-record-btrace.c, python/py-record-btrace.h,
16748 python/py-record-full.c, python/py-record-full.h: New file.
16749 * python/py-record.c: Add include for py-record-btrace.h and
16750 py-record-full.h.
16751 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16752 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16753 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16754 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16755 New definition.
16756 (gdbpy_initialize_btrace): New export.
16757 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16758
16759 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16760
16761 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16762 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16763 * python/py-record.c: New file.
16764 * python/python-internal.h (gdbpy_start_recording,
16765 gdbpy_current_recording, gdpy_stop_recording,
16766 gdbpy_initialize_record): New export.
16767 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16768 (python_GdbMethods): Add gdbpy_start_recording,
16769 gdbpy_current_recording and gdbpy_stop_recording.
16770
16771 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16772
16773 * record-btrace.c (record_btrace_record_method): New function.
16774 (init_record_btrace_ops): Initialize to_record_method.
16775 * record-full.c (record_full_record_method): New function.
16776 (init_record_full_ops, init_record_full_core_ops): Add
16777 record_full_record_method.
16778 * record.h (enum record_method): New enum.
16779 * target-debug.h (target_debug_print_enum_record_method: New define.
16780 * target-delegates.c: Regenerate.
16781 * target.c (target_record_method): New function.
16782 * target.h: Include record.h.
16783 (struct target_ops) <to_record_method>: New field.
16784 (target_record_method): New export.
16785
16786 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16787
16788 * record.h (record_start, record_stop): New export.
16789 * record.c (record_start, record_stop): New function.
16790
16791 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16792
16793 * btrace.c (btrace_fetch): Copy function call segments pointer
16794 into a vector.
16795 (btrace_clear): Clear the vector.
16796 (btrace_find_insn_by_number): Use binary search to find the correct
16797 function call segment.
16798 * btrace.h (brace_fun_p): New typedef.
16799 (struct btrace_thread_info) <functions>: New field.
16800
16801 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16802
16803 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16804 * btrace.c (btrace_decode_error): ... here. New function.
16805 * btrace.h (btrace_decode_error): New export.
16806
16807 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16808
16809 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16810 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16811 btrace_find_insn_by_number): Remove special case for gaps.
16812 * btrace.h (btrace_insn_get_error): New export.
16813 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16814 * record-btrace.c (btrace_insn_history): Print number for gaps.
16815 (record_btrace_info, record_btrace_goto): Handle gaps.
16816
16817 2017-02-14 Tom Tromey <tom@tromey.com>
16818
16819 PR python/13598:
16820 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16821 event.
16822 * python/py-evts.c (gdbpy_initialize_py_events): Add
16823 before_prompt registry.
16824 * python/py-events.h (events_object) <before_prompt>: New field.
16825
16826 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16827
16828 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16829
16830 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16831
16832 * symfile (_initialize_symfile): Add usage text to the load command's
16833 help text.
16834
16835 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16836
16837 * utils.c (defaulted_query): Don't query on secondary UIs.
16838
16839 2017-02-10 Tom Tromey <tom@tromey.com>
16840
16841 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16842
16843 2017-02-10 Tom Tromey <tom@tromey.com>
16844
16845 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16846 "cleanup" local.
16847 * python/py-type.c (typy_legacy_template_argument): Remove
16848 unnecessary "cleanup" local.
16849
16850 2017-02-10 Tom Tromey <tom@tromey.com>
16851
16852 * python/python.c (do_start_initialization): New function, from
16853 _initialize_python.
16854 (_initialize_python): Call do_start_initialization.
16855 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16856 goto.
16857
16858 2017-02-10 Tom Tromey <tom@tromey.com>
16859
16860 * python/py-prettyprint.c (pretty_print_one_value): Use
16861 gdbpy_ref.
16862
16863 2017-02-10 Tom Tromey <tom@tromey.com>
16864
16865 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16866 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16867 gdbpy_ref.
16868 * python/py-type.c (field_new): Use gdbpy_ref.
16869 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16870 gdbpy_ref.
16871 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16872 (py_free_pspace): Likewise.
16873 (pspace_to_pspace_object): Likewise.
16874 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16875 (py_free_objfile): Likewise.
16876 (objfile_to_objfile_object): Likewise.
16877 * python/py-inferior.c (delete_thread_object): Use
16878 gdbpy_ref.
16879 (infpy_read_memory): Likewise.
16880 (py_free_inferior): Likewise.
16881 * python/py-evtregistry.c (create_eventregistry_object): Use
16882 gdbpy_ref.
16883 * python/py-event.c (create_event_object): Use gdbpy_ref.
16884
16885 2017-02-10 Tom Tromey <tom@tromey.com>
16886
16887 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16888 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16889 used.
16890 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16891 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16892 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16893 python/py-framefilter.c, python/py-function.c,
16894 python/py-inferior.c, python/py-infevents.c,
16895 python/py-linetable.c, python/py-newobjfileevent.c,
16896 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16897 python/py-signalevent.c, python/py-stopevent.c,
16898 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16899 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16900 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16901 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16902
16903 2017-02-10 Tom Tromey <tom@tromey.com>
16904
16905 * ui-out.h (ui_out_emit_type): New class.
16906 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16907 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16908 and ui_out_emit_tuple.
16909 (enumerate_locals): Likewise.
16910 (py_mi_print_variables, py_print_locals, py_print_args): Use
16911 ui_out_emit_list.
16912 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16913 ui_out_emit_list.
16914 * common/gdb_optional.h: New file.
16915
16916 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16917
16918 * MAINTAINERS (Write After Approval): Update my e-mail address.
16919
16920 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16921
16922 PR gdb/21122
16923 * breakpoint.c (_initialize_breakpoint): Update the help description
16924 of the 'commands' command to indicate that it takes a list argument.
16925
16926 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16927
16928 * interps.c (current_interp_set_logging): Remove "return".
16929
16930 2017-02-09 Gary Benson <gbenson@redhat.com>
16931
16932 * symtab.c (add_symtab_completions): Prevent NULL pointer
16933 dereference.
16934
16935 2017-02-08 Pedro Alves <palves@redhat.com>
16936
16937 * interps.c (interp::interp): Remove reference to quiet_p.
16938 (interp_set): Make static. Remove dead "Switching to" output
16939 code.
16940 (interp_quiet_p, interp_set_quiet): Delete.
16941 (interpreter_exec_cmd): Don't set the interpreter quiet.
16942 * interps.h (interp_quiet_p): Make static.
16943 (class interp) <quiet_p>: Remove field
16944
16945 2017-02-08 Jerome Guitton <guitton@adacore.com>
16946
16947 * cli/cli-decode.c (find_command_name_length): Make it extern.
16948 * cli/cli-decode.h (find_command_name_length): Declare.
16949 * cli/cli-script.c (command_name_equals, line_first_arg):
16950 New functions.
16951 (process_next_line): Use cli-decode to parse command names.
16952 (build_command_line): Make args a constant pointer.
16953
16954 2017-02-08 Jerome Guitton <guitton@adacore.com>
16955
16956 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16957 Remove case-insensitive search.
16958
16959 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16960
16961 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16962 at the end of the line. Avoids an ARI warning.
16963
16964 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16965
16966 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16967 rdseed instructions.
16968 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16969
16970 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16971
16972 PR tdep/20936
16973 Provide and use sparc32 and sparc64 target description XML files.
16974 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16975 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16976 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16977 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16978 * features/sparc/sparc32-solaris.xml: New file.
16979 * features/sparc/sparc64-solaris.xml: New file.
16980 * features/sparc/sparc32-solaris.c: Generated.
16981 * features/sparc/sparc64-solaris.c: Generated.
16982 * sparc-tdep.h: Account for differences in target descriptions.
16983 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16984 (sparc32_register_type): Use target provided registers.
16985 (validate_tdesc_registers): New function.
16986 (sparc32_gdbarch_init): Use tdesc_has_registers.
16987 Set pseudoregister functions.
16988 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16989 (sparc64_register_type): Use target provided registers.
16990 (sparc64_init_abi): Set pseudoregister functions.
16991
16992 2017-02-03 Tom Tromey <tom@tromey.com>
16993
16994 PR rust/21097:
16995 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16996 with a single member.
16997
16998 2017-02-03 Pedro Alves <palves@redhat.com>
16999
17000 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
17001 (cli_interp_base::~cli_interp_base): New.
17002 (cli_interp): New struct.
17003 (as_cli_interp): Cast the interp itself to cli_interp.
17004 (cli_interpreter_pre_command_loop): Rename to ...
17005 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
17006 parameter.
17007 (cli_interpreter_init): Rename to ...
17008 (cli_interp::init): ... this. Remove 'self' parameter. Use
17009 boolean. Make extern.
17010 (cli_interpreter_resume): Rename to ...
17011 (cli_interp::resume): ... this. Remove 'data' parameter. Make
17012 extern.
17013 (cli_interpreter_suspend): Rename to ...
17014 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
17015 extern.
17016 (cli_interpreter_exec): Rename to ...
17017 (cli_interp::exec): ... this. Remove 'data' parameter. Make
17018 extern.
17019 (cli_interpreter_supports_command_editing): Rename to ...
17020 (cli_interp_base::supports_command_editing): ... this. Remove
17021 'interp' parameter. Make extern.
17022 (cli_ui_out): Rename to ...
17023 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
17024 Make extern.
17025 (cli_set_logging): Rename to ...
17026 (cli_interp_base::set_logging): ... this. Remove 'interp'
17027 parameter. Make extern.
17028 (cli_interp_procs): Delete.
17029 (cli_interp_factory): Adjust to use "new".
17030 * cli/cli-interp.h: Include "interps.h".
17031 (struct cli_interp_base): New struct.
17032 * interps.c (struct interp): Delete. Fields moved to interps.h.
17033 (interp_new): Delete.
17034 (interp::interp, interp::~interp): New.
17035 (interp_set): Use bool, and return void. Assume the interpreter
17036 has suspend, init and resume methods, and that the all return
17037 void.
17038 (set_top_level_interpreter): interp_set returns void.
17039 (interp_ui_out): Adapt.
17040 (current_interp_set_logging): Adapt.
17041 (interp_data): Delete.
17042 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
17043 (interp_exec): Adapt.
17044 (top_level_interpreter_data): Delete.
17045 * interps.h (interp_init_ftype, interp_resume_ftype)
17046 (interp_suspend_ftype, interp_exec_ftype)
17047 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
17048 (class interp): New.
17049 (interp_new): Delete.
17050 (interp_set): Now returns void. Use bool.
17051 (interp_data, top_level_interpreter_data): Delete.
17052 * mi/mi-common.h: Include interps.h.
17053 (class mi_interp): Inherit from interp. Define a ctor. Declare
17054 init, resume, suspect, exec, interp_ui_out, set_logging and
17055 pre_command_loop methods.
17056 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
17057 (mi_interpreter_init): Rename to ...
17058 (mi_interp::init): ... this. Remove the 'interp' parameter, use
17059 bool, return void and make extern. Adjust.
17060 (mi_interpreter_resume): ... Rename to ...
17061 (mi_interp::resume): ... this. Remove the 'data' parameter,
17062 return void and make extern. Adjust.
17063 (mi_interpreter_suspend): ... Rename to ...
17064 (mi_interp::suspend): ... this. Remove the 'data' parameter,
17065 return void and make extern. Adjust.
17066 (mi_interpreter_exec): ... Rename to ...
17067 (mi_interp::exec): ... this. Remove the 'data' parameter and make
17068 extern. Adjust.
17069 (mi_interpreter_pre_command_loop): ... Rename to ...
17070 (mi_interp::pre_command_loop): ... this. Remove the 'self'
17071 parameter and make extern.
17072 (mi_on_normal_stop_1): Adjust.
17073 (mi_ui_out): Rename to ...
17074 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
17075 parameter and make extern. Adjust.
17076 (mi_set_logging): Rename to ...
17077 (mi_interp::set_logging): ... this. Remove the 'interp'
17078 parameter and make extern. Adjust.
17079 (mi_interp_procs): Delete.
17080 (mi_interp_factory): Adjust to use 'new'.
17081 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
17082 (mi_print_exception, mi_execute_command, mi_load_progress):
17083 Adjust.
17084 * tui/tui-interp.c (tui_interp): New class.
17085 (as_tui_interp): Return a tui_interp pointer.
17086 (tui_on_normal_stop, tui_on_signal_received)
17087 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
17088 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
17089 to use interp::interp_ui_out.
17090 (tui_init): Rename to ...
17091 (tui_interp::init): ... this. Remove the 'self' parameter, use
17092 bool, return void and make extern. Adjust.
17093 (tui_resume): Rename to ...
17094 (tui_interp::resume): ... this. Remove the 'data' parameter,
17095 return void and make extern. Adjust.
17096 (tui_suspend): Rename to ...
17097 (tui_interp::suspend): ... this. Remove the 'data' parameter,
17098 return void and make extern. Adjust.
17099 (tui_ui_out): Rename to ...
17100 (tui_interp::interp_ui_out): ... this. Remove the 'self'
17101 parameter, and make extern. Adjust.
17102 (tui_exec): Rename to ...
17103 (tui_interp::exec): ... this. Remove the 'data' parameter and
17104 make extern.
17105 (tui_interp_procs): Delete.
17106 (tui_interp_factory): Use "new".
17107
17108 2017-02-02 Tom Tromey <tom@tromey.com>
17109
17110 * rust-exp.y (ends_raw_string, space_then_number)
17111 (rust_identifier_start_p): Return bool.
17112 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
17113 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
17114 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
17115 (rust_chartype_p): Return bool.
17116 (val_print_struct, rust_print_struct_def, rust_print_type):
17117 Update.
17118 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
17119 Return bool.
17120
17121 2017-02-02 Tom Tromey <tom@tromey.com>
17122
17123 * rust-lang.c: Reindent.
17124
17125 2017-02-02 Tom Tromey <tom@tromey.com>
17126
17127 * rust-lang.h (rust_crate_for_block): Update.
17128 * rust-lang.c (rust_crate_for_block): Return std::string.
17129 (rust_get_disr_info): Use std:;string, not
17130 gdb::unique_xmalloc_ptr.
17131 * rust-exp.y (crate_name): Update.
17132
17133 2017-02-02 Pedro Alves <palves@redhat.com>
17134
17135 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
17136 field out of gdb_disassembler_test and make it static.
17137
17138 2017-02-02 Pedro Alves <palves@redhat.com>
17139
17140 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
17141 mi1_interp and mi_interp fields.
17142
17143 2017-02-02 Pedro Alves <palves@redhat.com>
17144
17145 * cli/cli-interp.c (struct saved_output_files, saved_output):
17146 Moved from cli/cli-logging.c.
17147 (cli_set_logging): New function.
17148 (cli_interp_procs): Install cli_set_logging.
17149 * cli/cli-interp.h (make_logging_output, cli_set_logging):
17150 Declare.
17151 * cli/cli-logging.c (struct saved_output_files, saved_output):
17152 Moved to cli/cli-interp.c.
17153 (pop_output_files): Don't save outputs here.
17154 (make_logging_output): New function.
17155 (handle_redirections): Don't build tee nor save previous outputs
17156 here.
17157 * interps.c (current_interp_set_logging): Change prototype.
17158 Assume there's always a set_logging_proc method installed.
17159 * interps.h (interp_set_logging_ftype): Change prototype.
17160 (current_interp_set_logging): Change prototype and adjust comment.
17161 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
17162 use make_logging_output.
17163 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
17164 2017-02-02 Pedro Alves <palves@redhat.com>
17165
17166 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
17167 from ...
17168 (set_logging_overwrite): ... here.
17169 (logging_no_redirect_file): Delete.
17170 (set_logging_redirect): Don't handle redirection on the fly.
17171 Instead warn that "logging off" / "logging on" is necessary.
17172 (pop_output_files): Delete references to logging_no_redirect_file.
17173 (show_logging_command): Always speak in terms of what will happen
17174 once logging is reenabled.
17175
17176 2017-02-02 Pedro Alves <palves@redhat.com>
17177
17178 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
17179
17180 2017-02-02 Pedro Alves <palves@redhat.com>
17181
17182 * disasm.c (gdb_pretty_print_insn): Rename to ...
17183 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
17184 Remove gdbarch parameter. Adapt to clear the object's buffers
17185 instead of allocating new buffers, and to print using the object's
17186 gdb_disassembler instead of calling gdb_print_insn.
17187 (dump_insns): Use gdb_pretty_print_disassembler.
17188 * disasm.h (gdb_pretty_print_insn): Delete declaration.
17189 (gdb_pretty_print_disassembler): New class.
17190 * record-btrace.c (btrace_insn_history): Use
17191 gdb_pretty_print_disassembler.
17192
17193 2017-02-02 Pedro Alves <palves@redhat.com>
17194
17195 * ada-lang.c (type_as_string): Use string_file.
17196 * ada-valprint.c (ada_print_floating): Use string_file.
17197 * ada-varobj.c (ada_varobj_scalar_image)
17198 (ada_varobj_get_value_image): Use string_file.
17199 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
17200 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
17201 * breakpoint.c (update_inserted_breakpoint_locations)
17202 (insert_breakpoint_locations, reattach_breakpoints)
17203 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
17204 (print_it_watchpoint): Use string_file.
17205 (save_breakpoints): Use stdio_file.
17206 * c-exp.y (oper): Use string_file.
17207 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
17208 tee_file.
17209 (pop_output_files): Use delete.
17210 (handle_redirections): Use stdio_file and tee_file.
17211 * cli/cli-setshow.c (do_show_command): Use string_file.
17212 * compile/compile-c-support.c (c_compute_program): Use
17213 string_file.
17214 * compile/compile-c-symbols.c (generate_vla_size): Take a
17215 'string_file &' instead of a 'ui_file *'.
17216 (generate_c_for_for_one_variable): Take a 'string_file &' instead
17217 of a 'ui_file *'. Use string_file.
17218 (generate_c_for_variable_locations): Take a 'string_file &'
17219 instead of a 'ui_file *'.
17220 * compile/compile-internal.h (generate_c_for_for_one_variable):
17221 Take a 'string_file &' instead of a 'ui_file *'.
17222 * compile/compile-loc2c.c (push, pushf, unary, binary)
17223 (print_label, pushf_register_address, pushf_register)
17224 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
17225 'ui_file *'. Adjust.
17226 * compile/compile.c (compile_to_object): Use string_file.
17227 * compile/compile.h (compile_dwarf_expr_to_c)
17228 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
17229 'ui_file *'.
17230 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
17231 (replace_typedefs_qualified_name): Use string_file and
17232 obstack_copy0.
17233 * disasm.c (gdb_pretty_print_insn): Use string_file.
17234 (gdb_disassembly): Adjust reference the null_stream global.
17235 (do_ui_file_delete): Delete.
17236 (gdb_insn_length): Use null_stream.
17237 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
17238 * dwarf2loc.c (dwarf2_compile_property_to_c)
17239 (locexpr_generate_c_location, loclist_generate_c_location): Take a
17240 'string_file &' instead of a 'ui_file *'.
17241 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
17242 * dwarf2read.c (do_ui_file_peek_last): Delete.
17243 (dwarf2_compute_name): Use string_file.
17244 * event-top.c (gdb_setup_readline): Use stdio_file.
17245 * gdbarch.sh (verify_gdbarch): Use string_file.
17246 * gdbtypes.c (safe_parse_type): Use null_stream.
17247 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
17248 string_file.
17249 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
17250 'string_file *' instead of a 'ui_file *'.
17251 (gdbscm_arch_disassemble): Use string_file.
17252 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
17253 * guile/scm-ports.c (class ioscm_file_port): Now a class that
17254 inherits from ui_file.
17255 (ioscm_file_port_delete, ioscm_file_port_rewind)
17256 (ioscm_file_port_put): Delete.
17257 (ioscm_file_port_write): Rename to ...
17258 (ioscm_file_port::write): ... this. Remove file_port_magic
17259 checks.
17260 (ioscm_file_port_new): Delete.
17261 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
17262 ui_file_up.
17263 * guile/scm-type.c (tyscm_type_name): Use string_file.
17264 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
17265 Use string_file.
17266 * infcmd.c (print_return_value_1): Use string_file.
17267 * infrun.c (print_target_wait_results): Use string_file.
17268 * language.c (add_language): Use string_file.
17269 * location.c (explicit_to_string_internal): Use string_file.
17270 * main.c (captured_main_1): Use null_file.
17271 * maint.c (maintenance_print_architecture): Use stdio_file.
17272 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17273 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17274 event_channel>: Change type to mi_console_file pointer.
17275 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17276 (mi_console_file_delete): Delete.
17277 (struct mi_console_file): Delete.
17278 (mi_console_file_magic): Delete.
17279 (mi_console_file_new): Delete.
17280 (mi_console_file::mi_console_file): New.
17281 (mi_console_file_delete): Delete.
17282 (mi_console_file_fputs): Delete.
17283 (mi_console_file::write): New.
17284 (mi_console_raw_packet): Delete.
17285 (mi_console_file::flush): New.
17286 (mi_console_file_flush): Delete.
17287 (mi_console_set_raw): Rename to ...
17288 (mi_console_file::set_raw): ... this.
17289 * mi/mi-console.h (class mi_console_file): New class.
17290 (mi_console_file_new, mi_console_set_raw): Delete.
17291 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17292 (mi_set_logging): Use delete and tee_file. Adjust.
17293 * mi/mi-main.c (output_register): Use string_file.
17294 (mi_cmd_data_evaluate_expression): Use string_file.
17295 (mi_cmd_data_read_memory): Use string_file.
17296 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17297 * mi/mi-out.c (mi_ui_out::main_stream): New.
17298 (mi_ui_out::rewind): Use main_stream and
17299 string_file.
17300 (mi_ui_out::put): Use main_stream and string_file.
17301 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17302 Allocate a 'string_file' instead.
17303 (mi_out_new): Don't allocate a mem_fileopen stream here.
17304 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17305 (mi_ui_out::main_stream): Declare method.
17306 * printcmd.c (eval_command): Use string_file.
17307 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17308 * python/py-arch.c (archpy_disassemble): Use string_file.
17309 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17310 * python/py-frame.c (frapy_str): Use string_file.
17311 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17312 Use string_file.
17313 * python/py-type.c (typy_str): Use string_file.
17314 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17315 * python/py-value.c (valpy_str): Use string_file.
17316 * record-btrace.c (btrace_insn_history): Use string_file.
17317 * regcache.c (regcache_print): Use stdio_file.
17318 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17319 * remote.c (escape_buffer): Use string_file.
17320 * rust-lang.c (rust_get_disr_info): Use string_file.
17321 * serial.c (serial_open_ops_1): Use stdio_file.
17322 (do_serial_close): Use delete.
17323 * stack.c (print_frame_arg): Use string_file.
17324 (print_frame_args): Remove local mem_fileopen stream, not used.
17325 (print_frame): Use string_file.
17326 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17327 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17328 Take a 'string_file *' instead of a 'ui_file *'.
17329 * top.c (new_ui): Use stdio_file and stderr_file.
17330 (free_ui): Use delete.
17331 (execute_command_to_string): Use string_file.
17332 (quit_confirm): Use string_file.
17333 * tracepoint.c (collection_list::append_exp): Use string_file.
17334 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17335 * tui/tui-file.c: Don't include "ui-file.h".
17336 (enum streamtype, struct tui_stream): Delete.
17337 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17338 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17339 (tui_file::tui_file): New method.
17340 (tui_file_fputs): Delete.
17341 (tui_file_get_strbuf): Delete.
17342 (tui_file::puts): New method.
17343 (tui_file_adjust_strbuf): Delete.
17344 (tui_file_flush): Delete.
17345 (tui_file::flush): New method.
17346 * tui/tui-file.h: Tweak intro comment.
17347 Include ui-file.h.
17348 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17349 (tui_file_adjust_strbuf): Delete declarations.
17350 (class tui_file): New class.
17351 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17352 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17353 (tui_register_format): Use string_stream.
17354 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17355 (tui_get_function_from_frame): Use string_file.
17356 * typeprint.c (type_to_string): Use string_file.
17357 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17358 (null_stream): New global.
17359 (ui_file_delete): Delete.
17360 (ui_file::ui_file): New.
17361 (null_file_isatty): Delete.
17362 (ui_file::~ui_file): New.
17363 (null_file_rewind): Delete.
17364 (ui_file::printf): New.
17365 (null_file_put): Delete.
17366 (null_file_flush): Delete.
17367 (ui_file::putstr): New.
17368 (null_file_write): Delete.
17369 (ui_file::putstrn): New.
17370 (null_file_read): Delete.
17371 (ui_file::putc): New.
17372 (null_file_fputs): Delete.
17373 (null_file_write_async_safe): Delete.
17374 (ui_file::vprintf): New.
17375 (null_file_delete): Delete.
17376 (null_file::write): New.
17377 (null_file_fseek): Delete.
17378 (null_file::puts): New.
17379 (ui_file_data): Delete.
17380 (null_file::write_async_safe): New.
17381 (gdb_flush, ui_file_isatty): Adjust.
17382 (ui_file_put, ui_file_rewind): Delete.
17383 (ui_file_write): Adjust.
17384 (ui_file_write_for_put): Delete.
17385 (ui_file_write_async_safe, ui_file_read): Adjust.
17386 (ui_file_fseek): Delete.
17387 (fputs_unfiltered): Adjust.
17388 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17389 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17390 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17391 (set_ui_file_data): Delete.
17392 (string_file::~string_file, string_file::write)
17393 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17394 (do_ui_file_as_string, ui_file_as_string): Delete.
17395 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17396 (struct mem_file): Delete.
17397 (mem_file_new): Delete.
17398 (stdio_file::stdio_file): New.
17399 (mem_file_delete): Delete.
17400 (stdio_file::stdio_file): New.
17401 (mem_fileopen): Delete.
17402 (stdio_file::~stdio_file): New.
17403 (mem_file_rewind): Delete.
17404 (stdio_file::set_stream): New.
17405 (mem_file_put): Delete.
17406 (stdio_file::open): New.
17407 (mem_file_write): Delete.
17408 (stdio_file_magic, struct stdio_file): Delete.
17409 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17410 (stdio_file::flush): New.
17411 (stdio_file_read): Rename to ...
17412 (stdio_file::read): ... this. Adjust.
17413 (stdio_file_write): Rename to ...
17414 (stdio_file::write): ... this. Adjust.
17415 (stdio_file_write_async_safe): Rename to ...
17416 (stdio_file::write_async_safe) ... this. Adjust.
17417 (stdio_file_fputs): Rename to ...
17418 (stdio_file::puts) ... this. Adjust.
17419 (stdio_file_isatty): Delete.
17420 (stdio_file_fseek): Delete.
17421 (stdio_file::isatty): New.
17422 (stderr_file_write): Rename to ...
17423 (stderr_file::write) ... this. Adjust.
17424 (stderr_file_fputs): Rename to ...
17425 (stderr_file::puts) ... this. Adjust.
17426 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17427 (stderr_file::stderr_file): New.
17428 (tee_file_magic): Delete.
17429 (struct tee_file): Delete.
17430 (tee_file::tee_file): New.
17431 (tee_file_new): Delete.
17432 (tee_file::~tee_file): New.
17433 (tee_file_delete): Delete.
17434 (tee_file_flush): Rename to ...
17435 (tee_file::flush): ... this. Adjust.
17436 (tee_file_write): Rename to ...
17437 (tee_file::write): ... this. Adjust.
17438 (tee_file::write_async_safe): New.
17439 (tee_file_fputs): Rename to ...
17440 (tee_file::puts): ... this. Adjust.
17441 (tee_file_isatty): Rename to ...
17442 (tee_file::isatty): ... this. Adjust.
17443 * ui-file.h (struct obstack, struct ui_file): Don't
17444 forward-declare.
17445 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17446 (ui_file_write_ftype)
17447 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17448 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17449 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17450 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17451 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17452 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17453 (set_ui_file_fseek): Delete.
17454 (ui_file_data, ui_file_delete, ui_file_rewind)
17455 (struct ui_file): New.
17456 (ui_file_up): New.
17457 (class null_file): New.
17458 (null_stream): Declare.
17459 (ui_file_write_for_put, ui_file_put): Delete.
17460 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17461 Delete.
17462 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17463 (gdb_fopen, tee_file_new): Delete.
17464 (struct string_file): New.
17465 (struct stdio_file): New.
17466 (stdio_file_up): New.
17467 (struct stderr_file): New.
17468 (class tee_file): New.
17469 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17470 of a 'ui_file *'. Adjust.
17471 * ui-out.h (class ui_out) <field_stream>: Likewise.
17472 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17473 (null_stream): Delete.
17474 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17475 Adjust.
17476 * utils.h (struct ui_file): Delete forward declaration..
17477 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17478 (error_stream): Take a 'string_file &' instead of a
17479 'ui_file *'.
17480 * varobj.c (varobj_value_get_print_value): Use string_file.
17481 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17482 * gdbarch.c: Regenerate.
17483
17484 2017-02-02 Pedro Alves <palves@redhat.com>
17485
17486 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17487 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17488 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17489 Adjust to call gdb_print_insn instead of
17490 gdb_disassembler::print_insn.
17491 (dump_insns, do_mixed_source_and_assembly_deprecated)
17492 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17493 'gdbarch' parameter. Remove gdb_disassembler parameter.
17494 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17495 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17496 declaration.
17497 (gdb_pretty_print_insn): Re-add declaration.
17498 * record-btrace.c (btrace_insn_history): Don't allocate a
17499 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17500
17501 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17502
17503 * disasm.h (gdb_disassembly): Remove file_string parameter.
17504 * disasm.c (gdb_disassembly): Likewise.
17505 * cli/cli-cmds.c (print_disassembly): Adapt.
17506 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17507 * stack.c (do_gdb_disassembly): Likewise.
17508
17509 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17510
17511 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17512 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17513 targets. And if the implicit value is longer than needed, extract
17514 the first bytes instead of the "least significant" ones.
17515
17516 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17517
17518 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17519 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17520 (btrace_fetch): Assert can_access_registers_ptid.
17521 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17522 validate_registers_access.
17523
17524 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17525
17526 * gdbthread.h (can_access_registers_ptid): New.
17527 * thread.c (can_access_registers_ptid): New.
17528
17529 2017-02-01 Pedro Alves <palves@redhat.com>
17530
17531 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17532
17533 2017-01-31 Pedro Alves <palves@redhat.com>
17534
17535 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17536 Fix typos.
17537
17538 2017-01-31 Pedro Alves <palves@redhat.com>
17539
17540 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17541 not used.
17542
17543 2017-01-31 Pedro Alves <palves@redhat.com>
17544
17545 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17546
17547 2017-01-31 Pedro Alves <palves@redhat.com>
17548
17549 * common/scoped_restore.h
17550 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17551 change the value's parameter type to T2.
17552 (make_scoped_restore): Likewise.
17553
17554 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17555 Richard Henderson <rth@redhat.com>
17556
17557 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17558 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17559 GS_BASE for older kernels.
17560 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17561 GS_BASE for older kernels.
17562 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17563 and GS_BASE to the offset table.
17564 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17565 system register group.
17566 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17567 for older kernels.
17568 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17569 amd64 ABI.
17570 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17571 AMD64_GSBASE_REGNUM.
17572 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17573 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17574 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17575 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17576 i386/64bit-segments.xml in those rules.
17577 * features/i386/64bit-segments.xml: New file.
17578 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17579 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17580 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17581 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17582 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17583 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17584 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17585 * features/i386/amd64-avx-linux.c: Regenerated.
17586 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17587 * features/i386/amd64-avx-mpx.c: Regenerated.
17588 * features/i386/amd64-avx512-linux.c: Regenerated.
17589 * features/i386/amd64-linux.c: Regenerated.
17590 * features/i386/amd64-mpx-linux.c: Regenerated.
17591 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17592 * features/i386/i386-avx-mpx.c: Regenerated.
17593 * features/i386/x32-avx-linux.c: Regenerated.
17594 * features/i386/x32-avx512-linux.c: Regenerated.
17595 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17596 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17597 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17598 * regformats/i386/amd64-linux.dat: Regenerated.
17599 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17600 * regformats/i386/x32-avx-linux.dat: Regenerated.
17601 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17602 * regformats/i386/x32-linux.dat: Regenerated.
17603
17604 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17605
17606 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17607 Set to AMD64_NUM_REGS.
17608
17609 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17610
17611 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17612 that checks validity of a register number.
17613
17614 2017-01-27 Kees Cook <keescook@google.com>
17615
17616 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17617 fetch_fpregs if target has fpa registers.
17618 (arm_linux_store_inferior_registers): Call store_fpregs if target
17619 has fpa registers.
17620
17621 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17622
17623 * cris-tdep.c (cris_gdbarch_init): Remove check for
17624 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17625
17626 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17627
17628 * corelow.c (get_core_register_section): Check for regset
17629 existence before checking for REGSET_VARIABLE_SIZE.
17630
17631 2017-01-26 Yao Qi <yao.qi@linaro.org>
17632 Pedro Alves <palves@redhat.com>
17633
17634 PR gdb/20939
17635 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17636 call memory_error, save memaddr instead.
17637 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17638 negative, cal memory_error.
17639 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17640
17641 2017-01-26 Yao Qi <yao.qi@linaro.org>
17642
17643 * disasm-selftests.c (memory_error_test): New function.
17644 (_initialize_disasm_selftests): Register memory_error_test.
17645
17646 2017-01-26 Yao Qi <yao.qi@linaro.org>
17647
17648 * Makefile.in (SFILES): Add disasm-selftests.c and
17649 selftest-arch.c.
17650 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17651 * disasm-selftests.c: New file.
17652 * selftest-arch.c: New file.
17653 * selftest-arch.h: New file.
17654
17655 2017-01-26 Yao Qi <yao.qi@linaro.org>
17656
17657 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17658 to bfd_arch_mep. Don't return 0 if section is not
17659 found. Call print_insn_mep.
17660
17661 2017-01-26 Pedro Alves <palves@redhat.com>
17662 Yao Qi <yao.qi@linaro.org>
17663
17664 * arm-tdep.c: Include "disasm.h".
17665 (gdb_print_insn_arm): Update code to get gdbarch.
17666 * disasm.c (dis_asm_read_memory): Change it to
17667 gdb_disassembler::dis_asm_read_memory.
17668 (dis_asm_memory_error): Likewise.
17669 (dis_asm_print_address): Likewise.
17670 (gdb_pretty_print_insn): Change it to
17671 gdb_disassembler::pretty_print_insn.
17672 (dump_insns): Add one argument gdb_disassemlber. All
17673 callers updated.
17674 (do_mixed_source_and_assembly_deprecated): Likewise.
17675 (do_mixed_source_and_assembly): Likewise.
17676 (do_assembly_only): Likewise.
17677 (gdb_disassembler::gdb_disassembler): New.
17678 (gdb_disassembler::print_insn): New.
17679 * disasm.h (class gdb_disassembler): New.
17680 (gdb_pretty_print_insn): Remove declaration.
17681 (gdb_disassemble_info): Likewise.
17682 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17683 (gdbscm_disasm_read_memory_worker): Update.
17684 (gdbscm_disasm_read_memory): Update.
17685 (gdbscm_disasm_memory_error): Remove.
17686 (gdbscm_disasm_print_address): Remove.
17687 (gdbscm_disassembler::gdbscm_disassembler): New.
17688 (gdbscm_print_insn_from_port): Update.
17689 * mips-tdep.c: Include disasm.h.
17690 (gdb_print_insn_mips): Update code to get gdbarch.
17691 * record-btrace.c (btrace_insn_history): Update.
17692 * spu-tdep.c: Include disasm.h.
17693 (struct spu_dis_asm_data): Remove.
17694 (struct spu_dis_asm_info): New.
17695 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17696 SPU id.
17697 (gdb_print_insn_spu): Cast disassemble_info to
17698 spu_dis_asm_info.
17699
17700 2017-01-26 Yao Qi <yao.qi@linaro.org>
17701
17702 * disasm.c (do_ui_file_delete): Delete.
17703 (gdb_insn_length): Move code creating stream to ...
17704 * utils.c (null_stream): ... here. New function.
17705 * utils.h (null_stream): Declare.
17706
17707 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17708
17709 * python/py-inferior.c (find_thread_object): Return directly
17710 from the loop. Remove "found" variable.
17711
17712 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17713
17714 GDB 7.12.1 released.
17715
17716 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17717
17718 * python/py-function.c (fnpy_call): Reorder declarations to have
17719 the gdbpy_enter object declared first.
17720 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17721
17722 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17723
17724 PR python/21068
17725 * python/python-internal.h (PyMem_RawMalloc): Define for
17726 Python < 3.4.
17727 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17728 PyMem_RawMalloc instead of PyMem_Malloc.
17729
17730 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17731 Luis Machado <lgustavo@codesourcery.com>
17732
17733 * NEWS (New commands): Mention flash-erase.
17734 (New MI commands): Mention target-flash-erase.
17735 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17736 command.
17737 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17738 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17739 * target.c (flash_erase_command): New function.
17740 (initialize_targets): Add new flash-erase command.
17741 * target.h (flash_erase_command): New declaration.
17742
17743 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17744
17745 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17746 HAVE_SYS_PROCFS_H is defined.
17747
17748 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17749
17750 * remote.c (struct cached_reg): Change data into a pointer.
17751 * (stop_reply_dtr): Free data pointers before deleting vector.
17752 (process_stop_reply): Likewise.
17753 (remote_parse_stop_reply): Allocate space for data
17754
17755 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17756
17757 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17758 MAX_REGISTER_SIZE.
17759 (amd64_pseudo_register_read_value): Likewise.
17760 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17761 (store_register_using_P): Likewise.
17762 * regcache.c (regcache_xfer_part): Likewise.
17763
17764 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17765
17766 Split real and pseudo registers.
17767 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17768 (sparc32_pseudo_regnum): New enum.
17769 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17770 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17771 (SPARC32_CP0_REGISTERS): New macro.
17772 (sparc32_pseudo_register_name): New function.
17773 (sparc32_register_name): Use sparc32_pseudo_register_name.
17774 (sparc32_pseudo_register_type): New function.
17775 (sparc32_register_type): Use sparc32_pseudo_register_type.
17776 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17777 pseudo register numbers.
17778 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17779 (SPARC64_CP0_REGISTERS): New macro.
17780 (sparc64_pseudo_register_name): New function.
17781 (sparc64_register_name): Use sparc64_pseudo_register_name.
17782 (sparc64_pseudo_register_type): New function.
17783 (sparc64_register_type): Use sparc64_pseudo_register_type.
17784 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17785 pseudo register numbers.
17786 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17787 sparc64_store_arguments): Handle pseudo register numbers.
17788
17789 2017-01-13 Yao Qi <yao.qi@linaro.org>
17790
17791 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17792 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17793 output.
17794 (getpkt_or_notif_sane_1): Likewise.
17795
17796 2017-01-13 Yao Qi <yao.qi@linaro.org>
17797
17798 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17799 of CC. Pass "-x c++-header" instead of "-x c".
17800
17801 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17802
17803 * remote.c (remote_can_async_p): Update comment.
17804
17805 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17806
17807 * linux-nat.c (linux_nat_can_async_p): Update comment.
17808
17809 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17810
17811 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17812
17813 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17814
17815 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17816
17817 2017-01-10 Tom Tromey <tom@tromey.com>
17818
17819 * python/py-type.c (typy_legacy_template_argument): Update.
17820 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17821 ~demangle_parse_info): Declare new members.
17822 (cp_demangled_name_to_comp): Return unique_ptr.
17823 (cp_demangled_name_parse_free)
17824 (make_cleanup_cp_demangled_name_parse_free)
17825 (cp_new_demangle_parse_info): Remove.
17826 * cp-support.c (do_demangled_name_parse_free_cleanup)
17827 (make_cleanup_cp_demangled_name_parse_free): Remove.
17828 (inspect_type, cp_canonicalize_string_full)
17829 (cp_canonicalize_string): Update.
17830 (mangled_name_to_comp): Change return type.
17831 (cp_class_name_from_physname, method_name_from_physname)
17832 (cp_func_name, cp_remove_params): Update.
17833 * cp-name-parser.y (demangle_parse_info): New constructor, from
17834 cp_new_demangle_parse_info.
17835 (~demangle_parse_info): New destructor, from
17836 cp_demangled_name_parse_free.
17837 (cp_merge_demangle_parse_infos): Update.
17838 (cp_demangled_name_to_comp): Change return type.
17839
17840 2017-01-10 Tom Tromey <tom@tromey.com>
17841
17842 * top.c (prevent_dont_repeat): Change return type.
17843 * python/python.c (execute_gdb_command): Use std::string.
17844 Update.
17845 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17846 * command.h (prevent_dont_repeat): Change return type.
17847 * breakpoint.c (bpstat_do_actions_1): Update.
17848
17849 2017-01-10 Tom Tromey <tom@tromey.com>
17850
17851 * value.h (scoped_value_mark::~scoped_value_mark): Call
17852 free_to_mark.
17853 (scoped_value_mark::free_to_mark): New method.
17854 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17855 scoped_value_mark.
17856
17857 2017-01-10 Tom Tromey <tom@tromey.com>
17858
17859 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17860 (valpy_reference_value, valpy_const_value, valpy_get_address)
17861 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17862 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17863 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17864 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17865 scoped_value_mark.
17866 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17867 * value.h (scoped_value_mark): New class.
17868
17869 2017-01-10 Tom Tromey <tom@tromey.com>
17870
17871 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17872 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17873 * psymtab.c (discard_psymtabs_upto): Remove.
17874 (make_cleanup_discard_psymtabs): Remove.
17875 (struct psymtab_state): Remove.
17876
17877 2017-01-10 Tom Tromey <tom@tromey.com>
17878
17879 * record-full.c (record_full_save_cleanups): Remove.
17880 (record_full_save): Use gdb::unlinker.
17881 * gcore.c (do_bfd_delete_cleanup): Remove.
17882 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17883 cleanups.
17884 * dwarf2read.c (unlink_if_set): Remove.
17885 (write_psymtabs_to_index): Use gdb::unlinker.
17886 * common/gdb_unlinker.h: New file.
17887
17888 2017-01-10 Tom Tromey <tom@tromey.com>
17889
17890 * windows-tdep.c (windows_xfer_shared_library): Update.
17891 * windows-nat.c (windows_make_so): Update.
17892 * utils.h (make_cleanup_bfd_unref): Remove.
17893 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17894 * symfile.h (symfile_bfd_open)
17895 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17896 * symfile.c (read_symbols, symbol_file_add)
17897 (separate_debug_file_exists): Update.
17898 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17899 (generic_load, reread_symbols): Update.
17900 * symfile-mem.c (symbol_file_add_from_memory): Update.
17901 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17902 (spu_symbol_file_add_from_memory): Update.
17903 * solist.h (struct target_so_ops) <bfd_open>: Return
17904 gdb_bfd_ref_ptr.
17905 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17906 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17907 gdb_bfd_ref_ptr.
17908 (solib_map_sections, reload_shared_libraries_1): Update.
17909 * solib-svr4.c (enable_break): Update.
17910 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17911 * solib-frv.c (enable_break2): Update.
17912 * solib-dsbt.c (enable_break): Update.
17913 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17914 gdb_bfd_ref_ptr.
17915 (darwin_solib_get_all_image_info_addr_at_init): Update.
17916 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17917 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17918 * record-full.c (record_full_save): Update.
17919 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17920 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17921 * minidebug.c (find_separate_debug_file_in_section): Return
17922 gdb_bfd_ref_ptr.
17923 * machoread.c (macho_add_oso_symfile): Change abfd to
17924 gdb_bfd_ref_ptr.
17925 (macho_symfile_read_all_oso): Update.
17926 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17927 (macho_symfile_read): Update.
17928 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17929 (jit_bfd_try_read_symtab): Update.
17930 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17931 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17932 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17933 gdb_bfd_ref_ptr.
17934 (gdb_bfd_ref_policy): New struct.
17935 (gdb_bfd_ref_ptr): New typedef.
17936 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17937 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17938 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17939 gdb_bfd_ref_ptr.
17940 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17941 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17942 (gcore_command): Update.
17943 * exec.c (exec_file_attach): Update.
17944 * elfread.c (elf_symfile_read): Update.
17945 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17946 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17947 (open_and_init_dwo_file): Update.
17948 (open_dwp_file): Return gdb_bfd_ref_ptr.
17949 (open_and_init_dwp_file): Update.
17950 * corelow.c (core_open): Update.
17951 * compile/compile-object-load.c (compile_object_load): Update.
17952 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17953 * coffread.c (coff_symfile_read): Update.
17954 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17955 gdb_bfd_ref_ptr. Rename.
17956 (dump_bfd_file, restore_command): Update.
17957 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17958 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17959 (find_separate_debug_file_by_buildid): Update.
17960
17961 2017-01-10 Tom Tromey <tom@tromey.com>
17962
17963 * common/gdb_ref_ptr.h: New file.
17964 * python/py-ref.h (struct gdbpy_ref_policy): New.
17965 (gdbpy_ref): Now a typedef.
17966
17967 2017-01-10 Tom Tromey <tom@tromey.com>
17968
17969 * utils.h (make_cleanup_htab_delete): Don't declare.
17970 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17971 Remove.
17972 * linespec.c (decode_compound_collector): Add constructor,
17973 destructor.
17974 (lookup_prefix_sym): Remove cleanup.
17975 (symtab_collector): Add constructor, destructor.
17976 (collect_symtabs_from_filename): Remove cleanup.
17977 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17978 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17979 Use htab_up.
17980 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17981 * dwarf2read.c (dw2_expand_symtabs_matching)
17982 (dw2_map_symbol_filenames, dwarf_decode_macros)
17983 (write_psymtabs_to_index): Use htab_up.
17984 * dwarf2loc.c (func_verify_no_selftailcall)
17985 (call_site_find_chain_1, func_verify_no_selftailcall)
17986 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17987 std::vector, gdb::unique_xmalloc_ptr.
17988 (call_sitep): Remove typedef.
17989 (dwarf2_locexpr_baton_eval): Remove unused variable.
17990
17991 2017-01-10 Tom Tromey <tom@tromey.com>
17992
17993 * python/python-internal.h (make_cleanup_py_decref)
17994 (make_cleanup_py_xdecref): Don't declare.
17995 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17996 (py_xdecref, make_cleanup_py_xdecref): Remove.
17997
17998 2017-01-10 Tom Tromey <tom@tromey.com>
17999
18000 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
18001 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
18002
18003 2017-01-10 Tom Tromey <tom@tromey.com>
18004
18005 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
18006
18007 2017-01-10 Tom Tromey <tom@tromey.com>
18008
18009 * python/py-utils.c (unicode_to_encoded_string)
18010 (python_string_to_target_string)
18011 (python_string_to_target_python_string)
18012 (python_string_to_host_string, gdbpy_obj_to_string)
18013 (get_addr_from_python): Use gdbpy_ref.
18014
18015 2017-01-10 Tom Tromey <tom@tromey.com>
18016
18017 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
18018 gdbpy_ref.
18019
18020 2017-01-10 Tom Tromey <tom@tromey.com>
18021
18022 * python/python.c (eval_python_command, gdbpy_decode_line)
18023 (gdbpy_run_events, gdbpy_start_type_printers)
18024 (gdbpy_apply_type_printers): Use gdbpy_ref.
18025
18026 2017-01-10 Tom Tromey <tom@tromey.com>
18027
18028 * python/py-param.c (get_doc_string, compute_enum_values): Use
18029 gdbpy_ref.
18030
18031 2017-01-10 Tom Tromey <tom@tromey.com>
18032
18033 * python/py-inferior.c (find_thread_object, build_inferior_list):
18034 Use gdbpy_ref.
18035
18036 2017-01-10 Tom Tromey <tom@tromey.com>
18037
18038 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
18039
18040 2017-01-10 Tom Tromey <tom@tromey.com>
18041
18042 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
18043 gdbpy_ref.
18044
18045 2017-01-10 Tom Tromey <tom@tromey.com>
18046
18047 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
18048 extra incref.
18049 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
18050 Use gdbpy_ref.
18051
18052 2017-01-10 Tom Tromey <tom@tromey.com>
18053
18054 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18055 gdbpy_ref.
18056
18057 2017-01-10 Tom Tromey <tom@tromey.com>
18058
18059 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
18060 decref results of PyArg_ParseTupleAndKeywords.
18061
18062 2017-01-10 Tom Tromey <tom@tromey.com>
18063
18064 * python/python.c (python_run_simple_file): Use
18065 unique_xmalloc_ptr, gdbpy_ref.
18066
18067 2017-01-10 Tom Tromey <tom@tromey.com>
18068
18069 * python/py-prettyprint.c (print_stack_unless_memory_error)
18070 (print_string_repr, print_children): Use gdbpy_ref.
18071 (dummy_python_frame): New class.
18072 (dummy_python_frame::dummy_python_frame): Rename from
18073 push_dummy_python_frame.
18074 (py_restore_tstate): Remove.
18075
18076 2017-01-10 Tom Tromey <tom@tromey.com>
18077
18078 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
18079
18080 2017-01-10 Tom Tromey <tom@tromey.com>
18081
18082 * python/python.c (ensure_python_env, restore_python_env):
18083 Remove.
18084 * python/python-internal.h (ensure_python_env): Don't declare.
18085 * varobj.h (varobj_ensure_python_env): Don't declare.
18086 * varobj.c (varobj_ensure_python_env): Remove.
18087
18088 2017-01-10 Tom Tromey <tom@tromey.com>
18089
18090 * varobj.c (varobj_value_get_print_value): Use
18091 gdbpy_enter_varobj.
18092
18093 2017-01-10 Tom Tromey <tom@tromey.com>
18094
18095 * python/py-prettyprint.c (print_string_repr, print_children):
18096 Update.
18097 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
18098 of "encoding".
18099 * varobj.c (varobj_value_get_print_value): Update.
18100 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
18101
18102 2017-01-10 Tom Tromey <tom@tromey.com>
18103
18104 * varobj.c (varobj_get_display_hint)
18105 (dynamic_varobj_has_child_method, install_new_value_visualizer)
18106 (varobj_set_visualizer, free_variable): Use
18107 gdbpy_enter_varobj.
18108
18109 2017-01-10 Tom Tromey <tom@tromey.com>
18110
18111 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
18112 (do_finish_initialization): New function. Use gdbpy_ref.
18113 (gdbpy_finish_initialization): Use gdbpy_enter. Call
18114 do_finish_initialization.
18115
18116 2017-01-10 Tom Tromey <tom@tromey.com>
18117
18118 * python/py-param.c (get_set_value, get_show_value): Use
18119 gdbpy_enter, gdbpy_ref.
18120
18121 2017-01-10 Tom Tromey <tom@tromey.com>
18122
18123 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
18124
18125 2017-01-10 Tom Tromey <tom@tromey.com>
18126
18127 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
18128
18129 2017-01-10 Tom Tromey <tom@tromey.com>
18130
18131 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
18132 Use gdbpy_enter_varobj.
18133
18134 2017-01-10 Tom Tromey <tom@tromey.com>
18135
18136 * varobj.c (gdbpy_enter_varobj): New constructor.
18137 * python/python-internal.h (gdbpy_enter_varobj): New class.
18138 * python/py-varobj.c (py_varobj_get_iterator): Use
18139 gdbpy_enter_varobj.
18140
18141 2017-01-10 Tom Tromey <tom@tromey.com>
18142
18143 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
18144 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18145 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
18146 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
18147 unique_xmalloc_ptr.
18148 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
18149
18150 2017-01-10 Tom Tromey <tom@tromey.com>
18151
18152 * python/py-xmethods.c (invoke_match_method): Use
18153 gdbpy_ref.
18154
18155 2017-01-10 Tom Tromey <tom@tromey.com>
18156
18157 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
18158 gdbpy_enter, gdbpy_ref.
18159
18160 2017-01-10 Tom Tromey <tom@tromey.com>
18161
18162 * python/python.c (python_interactive_command): Use gdbpy_enter.
18163
18164 2017-01-10 Tom Tromey <tom@tromey.com>
18165
18166 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
18167 gdbpy_ref.
18168
18169 2017-01-10 Tom Tromey <tom@tromey.com>
18170
18171 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
18172 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18173
18174 2017-01-10 Tom Tromey <tom@tromey.com>
18175
18176 * utils.h (htab_deleter): New struct.
18177 (htab_up): New typedef.
18178 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
18179 gdbpy_enter, gdbpy_ref, htab_up.
18180
18181 2017-01-10 Tom Tromey <tom@tromey.com>
18182
18183 * python/py-unwind.c (pending_frame_invalidate): Remove.
18184 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
18185
18186 2017-01-10 Tom Tromey <tom@tromey.com>
18187
18188 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
18189 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
18190
18191 2017-01-10 Tom Tromey <tom@tromey.com>
18192
18193 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
18194
18195 2017-01-10 Tom Tromey <tom@tromey.com>
18196
18197 * python/python.c (gdbpy_eval_from_control_command)
18198 (gdbpy_source_script, gdbpy_run_events)
18199 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
18200 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
18201 gdbpy_enter.
18202
18203 2017-01-10 Tom Tromey <tom@tromey.com>
18204
18205 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
18206
18207 2017-01-10 Tom Tromey <tom@tromey.com>
18208
18209 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
18210
18211 2017-01-10 Tom Tromey <tom@tromey.com>
18212
18213 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
18214 (python_on_inferior_call_pre, python_on_inferior_call_post)
18215 (python_on_memory_change, python_on_register_change)
18216 (python_inferior_exit, python_new_objfile, add_thread_object)
18217 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
18218
18219 2017-01-10 Tom Tromey <tom@tromey.com>
18220
18221 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
18222 (bpfinishpy_handle_exit): Use gdbpy_enter.
18223
18224 2017-01-10 Tom Tromey <tom@tromey.com>
18225
18226 * python/py-cmd.c (cmdpy_destroyer)
18227 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
18228 gdbpy_enter.
18229
18230 2017-01-10 Tom Tromey <tom@tromey.com>
18231
18232 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18233 gdbpy_enter.
18234 (gdbpy_breakpoint_has_cond): Likewise.
18235
18236 2017-01-10 Tom Tromey <tom@tromey.com>
18237
18238 * python/python.c (gdbpy_enter): New constructor.
18239 (~gdbpy_enter): New destructor.
18240 (restore_python_env, ensure_python_env): Rewrite.
18241 * python/python-internal.h (gdbpy_enter): New class.
18242
18243 2017-01-10 Tom Tromey <tom@tromey.com>
18244
18245 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
18246
18247 2017-01-10 Tom Tromey <tom@tromey.com>
18248
18249 * python/py-value.c (value_has_field, get_field_flag)
18250 (get_field_type, valpy_getitem, convert_value_from_python): Use
18251 gdbpy_ref.
18252
18253 2017-01-10 Tom Tromey <tom@tromey.com>
18254
18255 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
18256 gdbpy_ref.
18257
18258 2017-01-10 Tom Tromey <tom@tromey.com>
18259
18260 * python/py-prettyprint.c (search_pp_list)
18261 (find_pretty_printer_from_objfiles)
18262 (find_pretty_printer_from_progspace)
18263 (find_pretty_printer_from_gdb, find_pretty_printer)
18264 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
18265 gdbpy_ref.
18266
18267 2017-01-10 Tom Tromey <tom@tromey.com>
18268
18269 * python/py-param.c (call_doc_function): Use gdbpy_ref.
18270
18271 2017-01-10 Tom Tromey <tom@tromey.com>
18272
18273 * python/py-linetable.c (build_line_table_tuple_from_pcs)
18274 (ltpy_get_all_source_lines): Use gdbpy_ref.
18275
18276 2017-01-10 Tom Tromey <tom@tromey.com>
18277
18278 * python/py-framefilter.c (extract_sym, extract_value)
18279 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18280 gdbpy_ref.
18281
18282 2017-01-10 Tom Tromey <tom@tromey.com>
18283
18284 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18285
18286 2017-01-10 Tom Tromey <tom@tromey.com>
18287
18288 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18289
18290 2017-01-10 Tom Tromey <tom@tromey.com>
18291
18292 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18293 gdbpy_ref.
18294
18295 2017-01-10 Tom Tromey <tom@tromey.com>
18296
18297 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18298
18299 2017-01-10 Tom Tromey <tom@tromey.com>
18300
18301 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18302 (typy_range): Use gdbpy_ref.
18303
18304 2017-01-10 Tom Tromey <tom@tromey.com>
18305
18306 * python/py-threadevent.c (create_thread_event_object): Use
18307 gdbpy_ref.
18308 * python/py-stopevent.c (create_stop_event_object): Simplify.
18309 (emit_stop_event): Use gdbpy_ref.
18310 * python/py-signalevent.c (create_signal_event_object): Use
18311 gdbpy_ref.
18312 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18313 (emit_new_objfile_event, create_clear_objfiles_event_object)
18314 (emit_clear_objfiles_event): Use gdbpy_ref.
18315 * python/py-infevents.c (create_inferior_call_event_object)
18316 (create_register_changed_event_object)
18317 (create_memory_changed_event_object, emit_inferior_call_event)
18318 (emit_memory_changed_event, emit_register_changed_event): Use
18319 gdbpy_ref.
18320 * python/py-exitedevent.c (create_exited_event_object)
18321 (emit_exited_event): Use gdbpy_ref.
18322 * python/py-event.h (evpy_emit_event): Remove
18323 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18324 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18325 * python/py-continueevent.c (emit_continue_event): Use
18326 gdbpy_ref.
18327 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18328 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18329 gdbpy_ref.
18330 * python/py-bpevent.c (create_breakpoint_event_object): Use
18331 gdbpy_ref.
18332
18333 2017-01-10 Tom Tromey <tom@tromey.com>
18334
18335 * python/py-ref.h: New file.
18336
18337 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18338
18339 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18340 void.
18341 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18342 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18343 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18344 * ui-out.c (ui_out::redirect): Likewise.
18345 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18346 * cli/cli-logging.c (set_logging_redirect): Update call site of
18347 ui_out::redirect.
18348 (handle_redirections): Likewise.
18349 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18350 * top.c (execute_command_to_string): Likewise.
18351 * utils.c (do_ui_out_redirect_pop): Likewise.
18352
18353 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18354
18355 * stack.c (_initialize_stack): Update "frame" command help message.
18356
18357 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18358
18359 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18360
18361 2017-01-06 Yao Qi <yao.qi@linaro.org>
18362
18363 * x86-linux-nat.h: Include gdb_proc_service.h.
18364
18365 2017-01-06 Yao Qi <yao.qi@linaro.org>
18366
18367 * ser-base.h: Include serial.h.
18368
18369 2017-01-06 Yao Qi <yao.qi@linaro.org>
18370
18371 * ppc-linux-tdep.h: Include ppc-tdep.h.
18372
18373 2017-01-06 Yao Qi <yao.qi@linaro.org>
18374
18375 * nat/amd64-linux-siginfo.h: Include signal.h.
18376
18377 2017-01-06 Yao Qi <yao.qi@linaro.org>
18378
18379 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18380
18381 2017-01-06 Yao Qi <yao.qi@linaro.org>
18382
18383 * mi/mi-parse.h: Include mi-cmds.h.
18384
18385 2017-01-06 Yao Qi <yao.qi@linaro.org>
18386
18387 * inf-loop.c: Don't include "target.h".
18388 * inf-loop.h: Include it here.
18389
18390 2017-01-06 Yao Qi <yao.qi@linaro.org>
18391
18392 * dfp.h: Include "dboulest.h" and "expression.h".
18393
18394 2017-01-06 Yao Qi <yao.qi@linaro.org>
18395
18396 * ax-gdb.h: Include "ax.h".
18397
18398 2017-01-06 Yao Qi <yao.qi@linaro.org>
18399
18400 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18401 with nat/gdb_ptrace.h.
18402
18403 2017-01-05 Yao Qi <yao.qi@linaro.org>
18404
18405 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18406 new line.
18407 (mips64_fbsd_sigframe_init): Likewise.
18408
18409 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18410
18411 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18412 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18413
18414 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18415
18416 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18417 * NEWS: Mention new FreeBSD/mips native configuration.
18418 * config/mips/fbsd.mh: New file.
18419 * configure.host: Add mips*-*-freebsd*.
18420 * mips-fbsd-nat.c: New file.
18421
18422 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18423
18424 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18425 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18426 * NEWS: Mention new FreeBSD/mips target.
18427 * configure.tgt: Add mips*-*-freebsd*.
18428 * mips-fbsd-tdep.c: New file.
18429 * mips-fbsd-tdep.h: New file.
18430
18431 2017-01-04 Yao Qi <yao.qi@linaro.org>
18432
18433 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18434 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18435
18436 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18437
18438 Update copyright year range in all GDB files.
18439
18440 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18441
18442 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18443
18444 For older changes see ChangeLog-2016.
18445 \f
18446 Local Variables:
18447 mode: change-log
18448 left-margin: 8
18449 fill-column: 74
18450 version-control: never
18451 coding: utf-8
18452 End:
This page took 0.401601 seconds and 5 git commands to generate.