Remove unnecessary call to get_thread_db_info
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-29 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-thread-db.c (thread_db_detach): Remove call to
4 delete_thread_db_info.
5
6 2017-12-28 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * target.h (enum target_object) <TARGET_OBJECT_HPUX_UREGS,
9 TARGET_OBJECT_HPUX_SOLIB_GOT>: Remove.
10
11 2017-12-27 Franck Jullien <franck.jullien@gmail.com>
12 Stafford Horne <shorne@gmail.com>
13
14 * target-descriptions.c (tdesc_register_in_reggroup_p): Support
15 arbitrary strings.
16 (tdesc_use_registers): Add logic to register new reggroups.
17 (tdesc_reg::group): Update comment to indicate we allow
18 arbitrary strings.
19 * NEWS (Changes since GDB 8.0): Announce that GDB supports
20 arbitrary reggroups.
21
22 2017-12-27 Stafford Horne <shorne@gmail.com>
23
24 * reggroups.c (reggroup_gdbarch_new): New function.
25 (reggroup_find): New function.
26 * reggroups.h (reggroup_gdbarch_new): New function.
27 (reggroup_find): New function.
28
29 2017-12-27 Stafford Horne <shorne@gmail.com>
30
31 * reggroups.c (reggroups_init): Change to depend only on
32 obstack rather than gdbarch.
33 (reggroup_add): Remove logic for forcing premature init.
34 (_initialize_reggroup): Set `reggroups_data` with
35 gdbarch_data_register_pre_init() rather than
36 gdbarch_data_register_post_init().
37
38 2017-12-27 Stafford Horne <shorne@gmail.com>
39
40 * infcmd.c (_initialize_infcmd): Add help for info reg $reggroup
41 and info all-registers $reggroup feature.
42
43 2017-12-23 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * target-descriptions.c (print_c_tdesc)
46 <printf_field_type_assignment>: Add ATTRIBUTE_PRINTF.
47
48 2017-12-21 Simon Marchi <simon.marchi@ericsson.com>
49 Sergio Durigan Junior <sergiodj@redhat.com>
50
51 * target-descriptions.c (print_c_tdesc) <visit>: Don't output
52 field_type declaration, use printf_field_type_assignment
53 instead.
54 <printf_field_type_assignment>: New method.
55 * features/aarch64-core.c, features/aarch64-fpu.c
56 features/arc-arcompact.c, features/arc-v2.c,
57 features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c,
58 features/i386/32bit-mpx.c, features/i386/32bit-sse.c,
59 features/i386/64bit-avx512.c, features/i386/64bit-core.c,
60 features/i386/64bit-mpx.c, features/i386/64bit-sse.c,
61 features/i386/x32-core.c, features/or1k.c,
62 features/rs6000/powerpc-7400.c,
63 features/rs6000/powerpc-altivec32.c,
64 features/rs6000/powerpc-altivec32l.c,
65 features/rs6000/powerpc-altivec64.c,
66 features/rs6000/powerpc-altivec64l.c,
67 features/rs6000/powerpc-cell32l.c,
68 features/rs6000/powerpc-cell64l.c,
69 features/rs6000/powerpc-isa205-altivec32l.c,
70 features/rs6000/powerpc-isa205-altivec64l.c,
71 features/rs6000/powerpc-isa205-vsx32l.c,
72 features/rs6000/powerpc-isa205-vsx64l.c,
73 features/rs6000/powerpc-vsx32.c,
74 features/rs6000/powerpc-vsx32l.c,
75 features/rs6000/powerpc-vsx64.c,
76 features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c,
77 features/s390-tevx-linux64.c, features/s390-vx-linux64.c,
78 features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c,
79 features/s390x-vx-linux64.c: Re-generate.
80
81 2017-12-20 Uros Bizjak <ubizjak@gmail.com>
82
83 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Remove
84 write-only assignment to "insn" variable.
85
86 2017-12-20 Ulrich Weigand <uweigand@de.ibm.com>
87
88 * spu-tdep.c (spu_gdbarch_init): Set set_gdbarch_significant_addr_bit
89 to 64 bits.
90 (ppc_linux_init_abi): Likewise, if Cell/B.E. is supported.
91
92 2017-12-18 Joel Brobecker <brobecker@adacore.com>
93
94 * ada-lang.c (ada_to_fixed_type_1): Rethrow errors with
95 a more detailed exception message when getting an exception
96 while trying to read the value of an XVZ variable.
97 * ada-valprint.c (ada_val_print): Only catch RETURN_MASK_ERROR
98 exceptions. Print an error message when an exception is caught.
99
100 2017-12-18 Joel Brobecker <brobecker@adacore.com>
101
102 * ada-lang.c (assign_component): Strip any TYPE_CODE_TYPEDEF
103 layer from lhs' type.
104 (assign_aggregate): Likewise.
105
106 2017-12-18 Xavier Roirand <roirand@adacore.com>
107
108 * ada-lang.c (ada_convert_actual): Change the way actual value
109 are passed to the inferior when the inferior expects a pointer type.
110
111 2017-12-17 Stafford Horne <shorne@gmail.com>
112
113 * gdb/or1k-tdep.c (show_or1k_debug): Fix function parameter alignment.
114 (or1k_analyse_inst): Likewise.
115 (or1k_single_step_through_delay): Likewise.
116 (or1k_frame_cache): Fix parameter alignment and use paddress()
117 instead of %x.
118
119 2017-12-17 Stafford Horne <shorne@gmail.com>
120
121 * NEWS (Changes since GDB 8.0): Mention new or1k target and new
122 commands to set/show or1k debug.
123
124 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
125
126 * typeprint.c (whatis_exp): Fix ARI warning and reindent "if"
127 condition.
128
129 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
130 Pedro Alves <palves@redhat.com>
131
132 PR cli/16224
133 * NEWS (Changes since GDB 8.0): Mention new '/o' flag.
134 * c-typeprint.c (OFFSET_SPC_LEN): New define.
135 (c_type_print_varspec_prefix): New argument 'struct
136 print_offset_data *'.
137 (c_type_print_base_1): New function and prototype.
138 (c_print_type_1): New function, with code from 'c_print_type'.
139 (c_print_type): Use 'c_print_type_1'.
140 (c_type_print_varspec_prefix): New argument 'struct
141 print_offset_data *'. Use it. Call 'c_type_print_base_1'
142 instead of 'c_print_type_base'.
143 (print_spaces_filtered_with_print_options): New function.
144 (output_access_specifier): Take new argument FLAGS. Modify
145 function to call 'print_spaces_filtered_with_print_options'.
146 (c_print_type_vtable_offset_marker): New function.
147 (c_print_type_union_field_offset): New function.
148 (c_print_type_struct_field_offset): New function.
149 (c_print_type_no_offsets): New function.
150 (c_type_print_base_struct_union): New argument 'struct
151 print_offset_data *'. Print offsets and sizes for
152 struct/union/class fields.
153 * typeprint.c (const struct type_print_options
154 type_print_raw_options): Initialize 'print_offsets'.
155 (static struct type_print_options default_ptype_flags):
156 Likewise.
157 (struct print_offset_data print_offset_default_data): New
158 variable.
159 (whatis_exp): Handle '/o' option.
160 (_initialize_typeprint): Add '/o' flag to ptype's help.
161 * typeprint.h (struct print_offset_data): New struct.
162 (struct type_print_options) <print_offsets>: New field.
163
164 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
165
166 * c-typeprint.c (need_access_label_p): New function.
167 (c_type_print_base_struct_union): New function.
168 (c_type_print_base): Move code to handle
169 TYPE_CODE_{STRUCT,UNION} to the functions mentioned above.
170
171 2017-12-15 Richard Henderson <rth@redhat.com>
172 Uros Bizjak <ubizjak@gmail.com>
173
174 PR gdb/19061
175 * alpha-tdep.c (alpha_software_single_step): Call
176 alpha_deal_with_atomic_sequence here.
177 (set_gdbarch_software_single_step): Set to
178 alpha_software_single_step.
179 * nat/linux-ptrace.h [__alpha__]: Define GDB_ARCH_IS_TRAP_BRKPT
180 and GDB_ARCH_IS_TRAP_HWBKPT.
181
182 2017-12-15 Yao Qi <yao.qi@linaro.org>
183
184 * unittests/memory-map-selftests.c: Wrap test with HAVE_LIBEXPAT.
185
186 2017-12-15 Xavier Roirand <roirand@adacore.com>
187
188 * ada-lang.c (ada_value_primitive_field): Handle field search
189 in case of homonyms.
190 (find_struct_field): Ditto.
191 (ada_search_struct_field): Ditto.
192 (ada_value_struct_elt): Ditto.
193 (ada_lookup_struct_elt_type): Ditto.
194
195 2017-12-14 Simon Marchi <simon.marchi@ericsson.com>
196
197 * python/py-breakpoint.c (bppy_init): Use 'O' format specifier
198 for "qualified" and use PyObject_IsTrue.
199
200 2017-12-14 Jan Kratochvil <jan.kratochvil@redhat.com>
201
202 * dwarf2read.c (dw2_debug_names_iterator::next): Support
203 DW_IDX_type_unit.
204 (debug_names::dwarf5_offset_size, unit_kind): New.
205 (debug_names::insert): Add parameter kind.
206 (debug_names::build): Support DW_IDX_type_unit.
207 (debug_names::recursively_write_psymbols): Update
208 (debug_names::write_psymbols caller.
209 (debug_names::write_one_signatured_type_data)
210 (debug_names::write_one_signatured_type): New.
211 (debug_names::index_key, debug_names::symbol_value)
212 (debug_names::write_psymbols): Add kind.
213 (debug_names::write_one_signatured_type): New.
214 (write_debug_names): Move dwarf5_offset_size to debug_names.
215 Use debug_names::write_one_signatured_type for type units.
216
217 2017-12-14 Joel Brobecker <brobecker@adacore.com>
218
219 * ada-lang.c (ada_value_equal): Add handling of typedef types
220 when comparing array objects.
221
222 2017-12-14 Joel Brobecker <brobecker@adacore.com>
223
224 * ada-tasks.c (read_atcb): Properly set task_info->ptid
225 when !target_has_execution as well.
226 (task_command): Remove error when !target_has_execution.
227
228 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
229
230 * location.h (string_to_event_location): Add match_type
231 parameter.
232 * location.c (string_to_event_location): Likewise.
233 * python/py-breakpoint.c (bppy_init): Handle qualified
234 parameter.
235
236 2017-12-13 Pedro Alves <palves@redhat.com>
237
238 * completer.c (completion_tracker::maybe_add_completion): New
239 'text' and 'word' parameters. Use make_completion_match_str.
240 (completion_tracker::add_completion): New 'text' and 'word'
241 parameters. Pass down.
242 (completion_tracker::recompute_lowest_common_denominator): Change
243 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
244 * completer.h (completion_tracker::add_completion): New 'text' and
245 'word' parameters.
246 (completion_tracker::recompute_lowest_common_denominator): Change
247 parameter type to gdb::unique_xmalloc_ptr rval ref.
248 (completion_tracker::recompute_lowest_common_denominator): Change
249 parameter type to gdb::unique_xmalloc_ptr rval ref.
250 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
251 as well.
252
253 2017-12-13 Pedro Alves <palves@redhat.com>
254
255 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
256 make_completion_match_str.
257 * completer.c: Use gdb::unique_xmalloc_ptr and
258 make_completion_match_str.
259 (make_completion_match_str_1): New.
260 (make_completion_match_str(const char *, const char *,
261 const char *)): New.
262 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
263 const char *, const char *)): New.
264 * completer.h (make_completion_match_str(const char *,
265 const char *, const char *)): New.
266 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
267 const char *, const char *)): New.
268 * interps.c (interpreter_completer): Use make_completion_match_str.
269 * symtab.c (completion_list_add_name, add_filename_to_list): Use
270 make_completion_match_str.
271
272 2017-12-13 Stafford Horne <shorne@gmail.com>
273
274 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
275 strings.
276 (or1k_unwind_pc): Use paddress() instead of %p.
277 (or1k_unwind_sp): Likewise.
278 (or1k_frame_cache): Use host_address_to_string()/paddress()
279 instead of %p and use _() wrapper for message strings.
280
281 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
282
283 * contrib/ari/gdb_ari.sh: Fix typo in help.
284
285 2017-12-13 Joel Brobecker <brobecker@adacore.com>
286
287 * event-top.c (handle_line_of_input): Set server_command.
288
289 2017-12-12 Stafford Horne <shorne@gmail.com>
290 Stefan Wallentowitz <stefan@wallentowitz.de>
291 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
292 Franck Jullien <franck.jullien@gmail.com>
293 Jeremy Bennett <jeremy.bennett@embecosm.com>
294
295 * configure.tgt: Add targets for or1k and or1knd.
296 * or1k-tdep.c: New file.
297 * or1k-tdep.h: New file.
298 * features/Makefile: Add or1k.xml to build.
299 * features/or1k.xml: New file.
300 * features/or1k-core.xml: New file.
301 * features/or1k.c: Generated.
302
303 2017-12-12 Alan Modra <amodra@gmail.com>
304
305 PR tdep/22576
306 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
307 PLT offset, and retrieve r2 from stack when executing in reverse.
308 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
309 rather than PLT address.
310 (ppc64_standard_linkage2_target): Likewise.
311 (ppc64_standard_linkage3_target): Likewise.
312 (ppc64_standard_linkage4_target): Likewise.
313 (ppc64_skip_trampoline_code_1): Adjust to suit.
314
315 2017-12-11 Simon Marchi <simon.marchi@ericsson.com>
316
317 PR gdb/22556
318 * remote.c (remote_thread_name): Return NULL if name is empty.
319 (remote_threads_extra_info): Return NULL if extra info is empty.
320
321 2017-12-11 Pedro Alves <palves@redhat.com>
322
323 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
324 (elf_sym_fns_debug_names): Move to elfread.c.
325 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
326 instead of a sym_fns and add 'index_kind' output parameter. Fill
327 the latter in with the index variant kind if using an index.
328 (enum dw_index_kind): Moved to symfile.h.
329 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
330 (elf_sym_fns_lazy_psyms): Move from defs.h.
331 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
332 interface.
333 * symfile.h (enum class dw_index_kind): New, moved from
334 dwarf2read.c.
335 (dwarf2_initialize_objfile): Change prototype.
336
337 2017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
338
339 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
340 instead of mpfr_set_si to convert mantissa bits.
341
342 2017-12-11 Xavier Roirand <roirand@adacore.com>
343 Joel Brobecker <brobecker@adacore.com>
344
345 * ada-lang.c (ada_tag_value_at_base_address): Change the way
346 tagged type base address is computed.
347 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
348 New enumerate.
349 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
350 element of lai->primitive_type_vector.
351
352 2017-12-08 Pedro Alves <palves@redhat.com>
353
354 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
355 mapped_index_base.
356 (check_match): Adjust to use mock_index directly.
357 (check_find_bounds_finds)
358 (test_mapped_index_find_name_component_bounds): Adjust to work
359 with a mapped_index_base.
360
361 2017-12-08 Pedro Alves <palves@redhat.com>
362
363 * dwarf2read.c (struct mapped_index_base): New, partially factored
364 out from ...
365 (struct mapped_index): ... this. Inherit mapped_index_base.
366 (mapped_index::symbol_name_slot_invalid):
367 (mapped_index::symbol_name_at): Add override marker.
368 (mapped_index::symbol_name_count): New.
369 (struct mapped_debug_names): Inherit mapped_index_base.
370 (mapped_debug_names::symbol_name_at): New.
371 (mapped_debug_names::symbol_name_count): New.
372 (mapped_index::find_name_components_bounds): Rename to ...
373 (mapped_index_base::find_name_components_bounds): ... this.
374 (mapped_index::build_name_components): Rename to ...
375 (mapped_index_base::build_name_components): ... this. Adjust to
376 use mapped_index_base::symbol_name_count and
377 mapped_index_base::symbol_name_slot_invalid.
378 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
379 instead of a mapped_index. Use
380 dw2_expand_symtabs_matching_symbol.
381
382 2017-12-08 Pedro Alves <palves@redhat.com>
383
384 * dwarf2read.c (mapped_index::symbol_table_slot): New.
385 (mapped_index::address_table): Now a gdb::array_view of const
386 gdb_byte.
387 (mapped_index::symbol_table): Now a gdb::array_view of
388 symbol_table_slot.
389 (mapped_index::address_table_size)
390 (mapped_index::symbol_table_slots): Delete.
391 (create_addrmap_from_index): Adjust.
392 (find_slot_in_mapped_hash): Adjust.
393 (read_index_from_section): Adjust.
394 (dwarf2_read_index): Adjust.
395
396 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
397 Pedro Alves <palves@redhat.com>
398
399 * defs.h (elf_sym_fns_debug_names): New declaration.
400 * dwarf2read.c: Include "hash_enum.h".
401 (mapped_debug_names): New.
402 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
403 debug_names_table.
404 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
405 (struct dwz_file): Add debug_names.
406 (dwarf2_per_objfile::locate_sections): Handle debug_names and
407 debug_aranges.
408 (locate_dwz_sections): Handle debug_names.
409 (create_signatured_type_table_from_debug_names)
410 (create_addrmap_from_aranges): New.
411 (dwarf2_read_index): Update function comment.
412 (dwarf5_augmentation): Moved up.
413 (read_debug_names_from_section, create_cus_from_debug_names_list)
414 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
415 (dwarf5_djb_hash): Moved up.
416 (dw2_debug_names_iterator): New.
417 (read_indirect_string_at_offset): New declaration.
418 (mapped_debug_names::namei_to_name)
419 (dw2_debug_names_iterator::find_vec_in_debug_names)
420 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
421 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
422 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
423 New.
424 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
425 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
426 (debug_names::build): Update djb_hash caller.
427 (write_debug_names): Move out and rename augmentation to
428 dwarf5_augmentation.
429 * elfread.c (elf_sym_fns_debug_names): New.
430 * psymtab.h (dwarf2_debug_names_functions): New declaration.
431 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
432 debug_aranges.
433 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
434
435 2017-12-08 Pedro Alves <palves@redhat.com>
436
437 * common/hash_enum.h: New file.
438
439 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
440
441 * dwarf2read.c (create_cu_from_index_list): New from ...
442 (create_cus_from_index_list): ... this function, use it.
443 (dw_expand_symtabs_matching_file_matcher)
444 (dw2_expand_symtabs_matching_one): New from ...
445 (dw2_expand_symtabs_matching): ... this function, use them.
446
447 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
448
449 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
450 declarations from elfread.c.
451 (dwarf2_initialize_objfile): Change return value.
452 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
453 declarations to defs.h.
454 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
455 * symfile.h (dwarf2_initialize_objfile): Change return type.
456
457 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
458 Pedro Alves <palves@redhat.com>
459
460 * contrib/gdb-add-index.sh (index): Rename to ...
461 (index4): ... here.
462 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
463 Support also .debug_names and .debug_str.
464 * dwarf2read.c: Include cmath, set, list.
465 (INDEX_SUFFIX): Rename to ...
466 (INDEX4_SUFFIX): ... here.
467 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
468 (file_write(FILE *, const void *, size_t)): New.
469 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
470 (data_buf::append_unsigned_leb128, data_buf::empty): New.
471 (data_buf::file_write): Use ::file_write.
472 (data_buf::c_str, dwarf5_djb_hash, debug_names)
473 (check_dwarf64_offsets): New.
474 (psyms_seen_size, write_gdbindex): New from
475 write_psymtabs_to_index code.
476 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
477 (enum dw_index_kind): New.
478 (write_psymtabs_to_index): New parameter index_kind. Support
479 filename_str and out_file_str. Move code to write_gdbindex,
480 possibly call write_debug_names.
481 (save_gdb_index_command): New parameter -dwarf-5.
482 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
483
484 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
485 Pedro Alves <palves@redhat.com>
486
487 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
488 comment.
489 (GDB_ADD_INDEX): New variable.
490 <$want_index>: Call $GDB_ADD_INDEX.
491
492 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
493
494 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
495 "expression_up" inside the TRY block.
496
497 2017-12-08 Yao Qi <yao.qi@linaro.org>
498
499 * breakpoint.c (update_watchpoint): Call
500 address_significant.
501
502 2017-12-08 Yao Qi <yao.qi@linaro.org>
503
504 * breakpoint.c (adjust_breakpoint_address): Call
505 address_significant.
506
507 2017-12-08 Yao Qi <yao.qi@linaro.org>
508
509 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
510 significant_addr_bit.
511 * gdbarch.sh (significant_addr_bit): New.
512 * gdbarch.c, gdbarch.h: Re-generated.
513 * target.c (memory_xfer_partial): Call address_significant.
514 * utils.c (address_significant): New function.
515 * utils.h (address_significant): Declare.
516
517 2017-12-08 Tom Tromey <tom@tromey.com>
518
519 * printcmd.c (ui_printf): Update. Use std::vector.
520 * common/format.h (struct format_piece): Add constructor.
521 <string>: Now const.
522 (class format_pieces): New class.
523 (parse_format_string, free_format_pieces)
524 (free_format_pieces_cleanup): Remove.
525 * common/format.c (format_pieces::format_pieces): Rename from
526 parse_format_string. Update.
527 (free_format_pieces, free_format_pieces_cleanup): Remove.
528 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
529 * ax-gdb.h (gen_printf): Remove argument.
530 * ax-gdb.c (gen_printf): Remove "frags" argument.
531 (maint_agent_printf_command): Update. Use std::vector.
532
533 2017-12-08 Yao Qi <yao.qi@linaro.org>
534
535 PR breakpionts/22567
536 * linespec.c (minsym_found): Set sal.section.
537
538 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
539
540 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
541
542 2017-12-07 Keith Seitz <keiths@redhat.com>
543
544 PR breakpoints/22569
545 * location.c (string_to_explicit_location): When terminating
546 parsing early, break out of enclosing loop instead of returning.
547
548 2017-12-07 Keith Seitz <keiths@redhat.com>
549
550 * NEWS (New commands): Mention set/show print type nested-type-limit.
551 * c-typeprint.c (c_type_print_base): Print out nested types.
552 * dwarf2read.c (struct typedef_field_list): Rename to ...
553 (struct decl_field_list): ... this. Change all uses.
554 (struct field_info) <nested_types_list, nested_types_list_count>:
555 New fields.
556 (add_partial_symbol): Look for nested type definitions in C++, too.
557 (dwarf2_add_typedef): Rename to ...
558 (dwarf2_add_type_defn): ... this.
559 (type_can_define_types): New function.
560 Update assertion to use type_can_define_types.
561 Permit NULL for a field's name.
562 (process_structure_scope): Handle child DIEs of types that can
563 define types.
564 Copy the list of nested types into the type struct.
565 * gdbtypes.h (struct typedef_field): Rename to ...
566 (struct decl_field): ... this. Change all uses.
567 [is_protected, is_private]: New fields.
568 (struct cplus_struct_type) <nested_types, nested_types_count>: New
569 fields.
570 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
571 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
572 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
573 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
574 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
575 default value for print_nested_type_limit.
576 (print_nested_type_limit): New static variable.
577 (set_print_type_nested_types, show_print_type_nested_types): New
578 functions.
579 (_initialize_typeprint): Register new commands for set/show
580 `print-nested-type-limit'.
581 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
582 New field.
583
584 2017-12-07 Tom Tromey <tom@tromey.com>
585
586 PR breakpoints/22511:
587 * breakpoint.c (commands_command_1): Don't throw an exception when
588 no commands have been read.
589
590 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
591
592 PR c++/21222
593 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
594 range-for variable.
595
596 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
597
598 * common/selftest.h (struct selftest): Add virtual destructor.
599
600 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
601
602 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
603 over basic location code. Implement explicit location keywords.
604 (bppy_init_validate_args): New function.
605 * NEWS: Document Python explicit breakpoint locations.
606
607 2017-12-07 Joel Brobecker <brobecker@adacore.com>
608
609 * MAINTAINERS: Restore target entries for m68hc11-elf,
610 score-elf and xstormy16-elf, incorrectly removed in a previous
611 patch meant to only update the list of active maintainers.
612
613 2017-12-06 Pedro Alves <palves@redhat.com>
614
615 * break-catch-syscall.c (insert_catch_syscall)
616 (remove_catch_syscall): Adjust to pass reference to
617 inf_data->syscalls_counts directly via gdb::array_view.
618 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
619 and gdb::array_view.
620 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
621 * remote.c (remote_set_syscall_catchpoint): Likewise.
622 * target-debug.h (target_debug_print_bool): New.
623 (define target_debug_print_gdb_array_view_const_int): New.
624 * target-delegates.c: Regenerate.
625 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
626 gdb::array_view and bool.
627 (target_set_syscall_catchpoint): Likewise.
628
629 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
630
631 * break-catch-syscall.c (catch_syscall_completer): Get pointers
632 to syscall group strings after building the string vector.
633
634 2017-12-06 Pedro Alves <palves@redhat.com>
635
636 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
637 "qXfer:features:read"" is disabled.
638 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
639 Check packet_config_support instead of packet->support directly.
640
641 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
642
643 * target-descriptions.c (struct tdesc_feature) <registers>: Use
644 tdesc_reg_up typedef.
645 (struct target_desc) <features>: Use tdesc_feature_up typedef.
646
647 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * target-descriptions.c (struct tdesc_type): Use default
650 destructor.
651 <u>: Remove.
652 <accept>: Remove.
653 (struct tdesc_type_builtin): New.
654 (struct tdesc_type_vector): New.
655 (struct tdesc_type_with_fields): New.
656 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
657 (tdesc_gdb_type): Remove.
658 (tdesc_register_type): Adjust.
659 (tdesc_create_vector): Create tdesc_type_vector.
660 (tdesc_create_struct): Create tdesc_type_with_fields.
661 (tdesc_set_struct_size): Change parameter type.
662 (tdesc_create_union): Create tdesc_type_with_fields.
663 (tdesc_create_flags): Likewise.
664 (tdesc_create_enum): Likewise.
665 (tdesc_add_field): Change parameter type.
666 (tdesc_add_typed_bitfield): Likewise.
667 (tdesc_add_bitfield): Likewise.
668 (tdesc_add_flag): Likewise.
669 (tdesc_add_enum_value): Likewise.
670 (print_c_tdesc) <visit>: Remove overload with tdesc_type
671 parameter, add overloads for tdesc_type_builtin,
672 tdesc_type_with_fields and tdesc_type_vector.
673 <m_printed_type>: Remove.
674 <m_printed_element_type, m_printed_type_with_fields>: Add.
675 * target-descriptions.h (tdesc_create_enum): Change return type.
676 (tdesc_add_typed_bitfield): Change parameter type.
677 (tdesc_add_enum_value): Change parameter type.
678 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
679 type to tdesc_type_with_fields.
680 (tdesc_start_struct): Adjust.
681 (tdesc_start_flags): Adjust.
682 (tdesc_start_enum): Adjust.
683 (tdesc_start_field): Adjust.
684 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
685 (struct tdesc_type_vector): Forward-declare.
686 (struct tdesc_type_with_fields): Forward-declare.
687 (tdesc_create_struct): Change return type.
688 (tdesc_create_union): Likewise.
689 (tdesc_create_flags): Likewise.
690 (tdesc_add_field): Change parameter type.
691 (tdesc_set_struct_size): Likewise.
692 (tdesc_add_bitfield): Likewise.
693 (tdesc_add_flag): Likewise.
694 * features: Re-generate C files.
695
696 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
699 (struct tdesc_arch_reg): Add constructor.
700 (DEF_VEC_O (tdesc_arch_reg)): Remove.
701 (struct tdesc_arch_data): Initialize fields.
702 <arch_regs>: Change type to std::vector.
703 (target_find_description): Adjust.
704 (tdesc_find_type): Adjust.
705 (tdesc_data_init): Call tdesc_arch_data constructor.
706 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
707 (tdesc_data_cleanup): Free data with delete.
708 (tdesc_numbered_register): Adjust.
709 (tdesc_find_arch_register): Adjust.
710 (tdesc_use_registers): Adjust.
711
712 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
713
714 * target-descriptions.c (tdesc_type_field): Remove typedef.
715 (DEF_VEC_O (tdesc_type_field)): Remove.
716 (struct tdesc_type_field): Add constructor.
717 <name>: Change type to std::string.
718 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
719 kind uses it.
720 <~tdesc_type>: Destroy vector if the type kind uses it.
721 <u::u::fields>: Change type to std::vector.
722 (tdesc_gdb_type): Adjust.
723 (tdesc_add_field): Adjust.
724 (tdesc_add_typed_bitfield): Adjust.
725 (tdesc_add_field): Adjust.
726 (tdesc_add_enum_value): Adjust.
727 (class print_c_tdesc) <visit>: Adjust.
728
729 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
730
731 * target-descriptions.c (struct tdesc_type) <name>: Change type
732 to std::string.
733 <~tdesc_type>: Don't manually free name.
734 <operator==>: Adjust.
735 (tdesc_named_type): Adjust.
736 (tdesc_find_type): Adjust.
737 (tdesc_gdb_type): Adjust.
738 (class print_c_tdesc) <visit>: Adjust.
739
740 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * target-descriptions.c (tdesc_type_p): Remove typedef.
743 (DEF_VEC_P (tdesc_type_p)): Remove.
744 (struct tdesc_feature) <types>: Change type to std::vector.
745 <~tdesc_feature>: Replace with default implementation.
746 <accept>: Adjust.
747 (tdesc_named_type): Adjust.
748 (tdesc_create_vector): Adjust.
749 (tdesc_create_struct): Adjust.
750 (tdesc_create_union): Adjust.
751 (tdesc_create_flags): Adjust.
752 (tdesc_create_enum): Adjust.
753
754 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
755
756 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
757 type of name_ parameter, adjust to std::string change.
758 <name, group, type>: Change type to std::string.
759 <~tdesc_reg>: Replace with default implementation.
760 <operator==>: Adjust.
761 (tdesc_find_register_early): Adjust.
762 (tdesc_register_name): Adjust.
763 (tdesc_register_type): Adjust.
764 (tdesc_register_in_reggroup_p): Adjust.
765 (class print_c_tdesc) <visit>: Adjust.
766 (class print_c_feature) <visit>: Adjust.
767 * features/arc-arcompact.c: Re-generate.
768 * features/arc-v2.c: Re-generate.
769
770 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
771
772 * target-descriptions.c (tdesc_reg_p): Remove typedef.
773 (DEF_VEC_P (tdesc_reg_p)): Remove.
774 (struct tdesc_feature) <registers>: Change type to std::vector.
775 <~tdesc_feature>: Don't manually free registers.
776 <accept>: Adjust.
777 <operator==>: Adjust.
778 (tdesc_has_registers): Adjust.
779 (tdesc_find_register_early): Adjust.
780 (tdesc_use_registers): Adjust.
781 (tdesc_create_reg): Adjust.
782
783 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
784
785 * target-descriptions.c (tdesc_feature) <name>: Change type to
786 std::string.
787 <~tdesc_feature>: Don't manually free name.
788 <operator==>: Adjust.
789 (tdesc_find_feature): Adjust.
790 (tdesc_feature_name): Adjust.
791 (class print_c_tdesc) <visit_pre>: Adjust.
792 (class print_c_feature) <visit_pre>: Adjust.
793
794 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * target-descriptions.c (tdesc_feature_p): Remove typedef.
797 (DEF_VEC_P (tdesc_feature_p)): Remove.
798 (struct target_desc) <features>: Change type to std::vector.
799 <~target_desc>: Replace with default implementation.
800 <accept>: Adjust.
801 <operator==>: Adjust.
802 (tdesc_has_registers): Adjust.
803 (tdesc_find_feature): Adjust.
804 (tdesc_use_registers): Adjust.
805 (tdesc_create_feature): Adjust.
806
807 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
808
809 * target-descriptions.c (arch_p): Remove typedef.
810 (DEF_VEC_P (arch_p)): Remove.
811 (struct target_desc) <compatible>: Change type to std::vector.
812 <~target_desc>: Don't manually free compatible.
813 (tdesc_compatible_p): Adjust.
814 (tdesc_add_compatible): Adjust.
815 (class print_c_tdesc) <visit_pre>: Adjust.
816
817 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
818
819 * target-descriptions.c (property_s): Remove typedef.
820 (DEF_VEC_O (property_s)): Remove.
821 (struct target_desc) <properties>: Make an std::vector.
822 <~target_desc>: Don't manually free properties.
823 (tdesc_property): Adjust.
824 (set_tdesc_property): Adjust.
825 (class print_c_tdesc) <visit_pre>: Adjust.
826
827 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
828
829 * common/gdb_assert.h (gdb_static_assert): Redefine using
830 static_assert.
831
832 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
833
834 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
835 unused variables.
836 (ada_is_redundant_range_encoding): Likewise.
837 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
838 Likewise.
839 * alpha-tdep.c (alpha_software_single_step): Likewise.
840 * arm-tdep.c (_initialize_arm_tdep): Likewise.
841 * auto-load.c (info_auto_load_cmd): Likewise.
842 * break-catch-syscall.c (insert_catch_syscall): Likewise.
843 (remove_catch_syscall): Likewise.
844 * breakpoint.c (condition_completer): Likewise.
845 (clear_command): Likewise.
846 (update_breakpoint_locations): Likewise.
847 * btrace.c (btrace_disable): Likewise.
848 (btrace_teardown): Likewise.
849 (btrace_maint_update_pt_packets): Likewise.
850 (maint_btrace_clear_cmd): Likewise.
851 * cli/cli-decode.c (lookup_cmd_1): Likewise.
852 (lookup_cmd_composition): Likewise.
853 * cli/cli-dump.c (scan_filename): Likewise.
854 (restore_command): Likewise.
855 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
856 * compile/compile-object-load.c (compile_object_load): Likewise.
857 * compile/compile-object-run.c (compile_object_run): Likewise.
858 * compile/compile.c (compile_to_object): Likewise.
859 * completer.c (filename_completer): Likewise.
860 (complete_files_symbols): Likewise.
861 (complete_expression): Likewise.
862 * corelow.c (core_open): Likewise.
863 * ctf.c (ctf_start): Likewise.
864 (ctf_write_status): Likewise.
865 (ctf_write_uploaded_tsv): Likewise.
866 (ctf_write_definition_end): Likewise.
867 (ctf_open_dir): Likewise.
868 (ctf_xfer_partial): Likewise.
869 (ctf_trace_find): Likewise.
870 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
871 Likewise.
872 * dwarf2loc.c (allocate_piece_closure): Likewise.
873 (indirect_pieced_value): Likewise.
874 (dwarf2_evaluate_loc_desc_full): Likewise.
875 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
876 (dw2_expand_symtabs_matching): Likewise.
877 (dw2_map_symbol_filenames): Likewise.
878 (read_and_check_comp_unit_head): Likewise.
879 (read_cutu_die_from_dwo): Likewise.
880 (lookup_dwo_unit): Likewise.
881 (read_comp_units_from_section): Likewise.
882 (dwarf2_compute_name): Likewise.
883 (handle_DW_AT_stmt_list): Likewise.
884 (create_cus_hash_table): Likewise.
885 (create_dwp_v2_section): Likewise.
886 (dwarf2_rnglists_process): Likewise.
887 (dwarf2_ranges_process): Likewise.
888 (dwarf2_record_block_ranges): Likewise.
889 (is_vtable_name): Likewise.
890 (read_formatted_entries): Likewise.
891 (skip_form_bytes): Likewise.
892 * elfread.c (elf_symtab_read): Likewise.
893 * exec.c (exec_file_command): Likewise.
894 * f-valprint.c (f_val_print): Likewise.
895 (info_common_command_for_block): Likewise.
896 * guile/guile.c (initialize_scheme_side): Likewise.
897 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
898 * guile/scm-cmd.c (cmdscm_completer): Likewise.
899 (gdbscm_register_command_x): Likewise.
900 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
901 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
902 * guile/scm-ports.c (file_port_magic): Likewise.
903 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
904 (ppscm_pretty_print_one_value): Likewise.
905 (ppscm_print_children): Likewise.
906 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
907 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
908 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
909 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
910 * i386-tdep.c (i386_register_reggroup_p): Likewise.
911 * infcmd.c (run_command_1): Likewise.
912 (until_next_fsm_clean_up): Likewise.
913 * linespec.c (linespec_complete): Likewise.
914 (find_label_symbols): Likewise.
915 * m2-valprint.c (m2_val_print): Likewise.
916 * memattr.c (require_user_regions): Likewise.
917 (lookup_mem_region): Likewise.
918 (disable_mem_command): Likewise.
919 (mem_delete): Likewise.
920 * mep-tdep.c (mep_register_name): Likewise.
921 (mep_analyze_prologue): Likewise.
922 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
923 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
924 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
925 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
926 * minidebug.c (lzma_open): Likewise.
927 * minsyms.c (lookup_minimal_symbol): Likewise.
928 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
929 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
930 (mips_o64_return_value): Likewise.
931 (mips_single_step_through_delay): Likewise.
932 (_initialize_mips_tdep): Likewise.
933 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
934 (nios2_software_single_step): Likewise.
935 * parse.c (find_minsym_type_and_address): Likewise.
936 * psymtab.c (psym_relocate): Likewise.
937 * python/py-breakpoint.c (bppy_get_commands): Likewise.
938 (gdbpy_breakpoint_modified): Likewise.
939 * python/py-infevents.c (create_inferior_call_event_object):
940 Likewise.
941 * python/py-record-btrace.c (btpy_list_item): Likewise.
942 * python/py-type.c (typy_str): Likewise.
943 * python/py-value.c (valpy_call): Likewise.
944 * python/python.c (do_start_initialization): Likewise.
945 * record-btrace.c (record_btrace_insn_history_range): Likewise.
946 (record_btrace_call_history_range): Likewise.
947 (record_btrace_record_method): Likewise.
948 (record_btrace_xfer_partial): Likewise.
949 (btrace_get_frame_function): Likewise.
950 * record-full.c (record_full_open): Likewise.
951 * record.c (get_context_size): Likewise.
952 * registry.h (DEFINE_REGISTRY): Likewise.
953 * remote-fileio.c (remote_fileio_request): Likewise.
954 * remote.c (remote_update_thread_list): Likewise.
955 (remote_check_symbols): Likewise.
956 (remote_commit_resume): Likewise.
957 (remote_interrupt): Likewise.
958 (remote_insert_breakpoint): Likewise.
959 (compare_sections_command): Likewise.
960 * rust-exp.y (super_name): Likewise.
961 (lex_string): Likewise.
962 (convert_ast_to_type): Likewise.
963 (convert_ast_to_expression): Likewise.
964 * rust-lang.c (rust_print_struct_def): Likewise.
965 (rust_print_type): Likewise.
966 (rust_evaluate_subexp): Likewise.
967 * rx-tdep.c (rx_register_type): Likewise.
968 * ser-event.c (serial_event_clear): Likewise.
969 * serial.c (serial_open): Likewise.
970 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
971 * symfile.c (section_is_overlay): Likewise.
972 (overlay_unmapped_address): Likewise.
973 (overlay_mapped_address): Likewise.
974 (simple_overlay_update_1): Likewise.
975 (simple_overlay_update): Likewise.
976 * symtab.c (symbol_find_demangled_name): Likewise.
977 (search_symbols): Likewise.
978 * target-descriptions.c (tdesc_predefined_type): Likewise.
979 * target.c (target_commit_resume): Likewise.
980 * thread.c (print_selected_thread_frame): Likewise.
981 * top.c (new_ui_command): Likewise.
982 (gdb_readline_no_editing): Likewise.
983 * tracefile-tfile.c (tfile_open): Likewise.
984 * tracepoint.c (create_tsv_from_upload): Likewise.
985 * utils.c (quit): Likewise.
986 (defaulted_query): Likewise.
987 * valarith.c (value_concat): Likewise.
988 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
989 * xml-tdesc.c (target_fetch_description_xml): Likewise.
990 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
991 (xtensa_pseudo_register_write): Likewise.
992
993 2017-12-04 Tom Tromey <tom@tromey.com>
994
995 * NEWS: Mention Rust trait object inspection.
996
997 2017-12-04 Pedro Alves <palves@redhat.com>
998
999 PR gdb/22499
1000 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
1001 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
1002 (vex2_prefix_p, vex3_prefix_p): New functions.
1003 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
1004 VEX3 prefixes.
1005 (fixup_riprel): Set VEX3.!B.
1006
1007 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
1008
1009 * target.h (mem_region_vector): Remove.
1010 (struct target_ops) <to_memory_map>: Change return type to
1011 std::vector<mem_region>.
1012 * target-debug.h (target_debug_print_mem_region_vector): Rename
1013 to ...
1014 (target_debug_print_std_vector_mem_region): ... this.
1015 * target-delegates.c: Re-generate.
1016
1017 2017-12-03 Pedro Alves <palves@redhat.com>
1018
1019 * make-target-delegates (munge_type): Also munge '<', '>', and
1020 ':'. Avoid double underscores in identifiers, and trailing
1021 underscores.
1022 * target-debug.h
1023 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
1024 ...
1025 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
1026 * target-delegates.c: Regenerate.
1027
1028 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1029
1030 * common/poison.h (XDELETE): Fix typo.
1031
1032 2017-12-01 Andrew Cagney <cagney@redhat.com>
1033 Joel Brobecker <brobecker@adacore.com>
1034 Sergio Durigan Junior <sergiodj@redhat.com>
1035
1036 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
1037 feature.
1038 * coffread.c (coff_symfile_read): Do not map over sections with
1039 'coff_locate_sections' if readnever is on.
1040 * dwarf2read.c (dwarf2_has_info): Return 0 if
1041 readnever is on.
1042 * elfread.c (elf_symfile_read): Do not map over sections with
1043 'elf_locate_sections' if readnever is on.
1044 * main.c (validate_readnow_readnever): New function.
1045 (captured_main_1): Add support for --readnever.
1046 (print_gdb_help): Document --readnever.
1047 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
1048 flag.
1049 * symfile.c (readnever_symbol_files): New global.
1050 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
1051 'READNEVER_SYMBOL_FILES' is set.
1052 (validate_readnow_readnever): New function.
1053 (symbol_file_command): Handle '-readnever' option.
1054 Call 'validate_readnow_readnever'.
1055 (add_symbol_file_command): Handle '-readnever' option.
1056 Call 'validate_readnow_readnever'.
1057 (_initialize_symfile): Document new '-readnever' option for
1058 both 'symbol-file' and 'add-symbol-file' commands.
1059 * top.h (readnever_symbol_files): New extern global.
1060 * xcoffread.c (xcoff_initial_scan): Do not read debug
1061 information if readnever is on.
1062
1063 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
1064
1065 * symfile.c (symbol_file_command): Call
1066 'symbol_file_add_main_1' only after processing all command
1067 line options.
1068 (add_symbol_file_command): Modify logic to make arguments
1069 position-independent.
1070
1071 2017-12-01 Joel Brobecker <brobecker@adacore.com>
1072
1073 * ada-lang.c (symbol_list_obstack): Delete.
1074 (resolve_subexp): Make sure "candidates" gets xfree'ed.
1075 (ada_lookup_symbol_list_worker): Remove the limitation that
1076 the result is only good until the next call, now making it
1077 the responsibility of the caller to free the result when no
1078 longer needed. Adjust the function's intro comment accordingly.
1079 (ada_lookup_symbol_list): Adjust the function's intro comment.
1080 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
1081 (ada_lookup_encoded_symbol, get_var_value): Likewise.
1082 (_initialize_ada_language): Remove symbol_list_obstack
1083 initialization.
1084 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
1085 (write_var_or_type, write_name_assoc): Likewise.
1086
1087 2017-12-01 Tom Tromey <tom@tromey.com>
1088
1089 * Makefile.in (all_deps_files): New variable.
1090 Include .Po files using all_deps_files.
1091
1092 2017-12-01 Joel Brobecker <brobecker@adacore.com>
1093
1094 * MAINTAINERS: Update list of maintainers, moving those who
1095 stepped down or became inactive to the "Past Maintainers"
1096 section.
1097
1098 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1099
1100 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
1101 sys/proc.h.
1102 (NEW_PROC_API): Remove.
1103 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
1104 Likewise.
1105 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
1106 * configure: Regenerate.
1107 * config.in: Regenerate.
1108 * gdbserver/configure: Regenerate.
1109 * gdbserver/config.in: Regenerate.
1110
1111 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
1112 NEW_PROC_API test.
1113 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
1114
1115 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
1116
1117 * proc-api.c: Remove !NEW_PROC_API support.
1118 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
1119 Remove tests for macros always defined on Solaris.
1120 * proc-events.c: Remove !NEW_PROC_API support.
1121 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
1122 HAVE_SYS_USER_H tests.
1123 (init_syscall_table): Remove non-Solaris syscalls.
1124 Remove tests for syscalls present on all Solaris versions.
1125 Add missing Solaris 10+ syscalls.
1126 (signal_table): Remove non-Solaris signals.
1127 Remove tests for signals present on all Solaris versions.
1128 (fault_table): Remove non-Solaris faults.
1129 Remove tests for faults present on all Solaris versions.
1130 * proc-flags.c: Remove !NEW_PROC_API support.
1131 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
1132 Remove non-Solaris flags.
1133 * proc-why.c: Remove !NEW_PROC_API support.
1134 (pr_why_table): Remove meaningless comments.
1135 Remove tests for reasons present on all Solaris versions.
1136 Remove OSF/1 cases.
1137 (proc_prettyfprint_why): Likewise.
1138
1139 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
1140 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
1141 Remove WA_READ test, IRIX watchpoint support.
1142 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
1143 types. Change users.
1144 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
1145 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
1146 Change callers.
1147 Remove CTL_PROC_NAME_FMT tests.
1148 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
1149 users.
1150 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
1151 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
1152 (proc_modify_flag): Replace GDBRESET by PCUNSET.
1153 Remove PR_ASYNC, PR_KLC tests.
1154 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
1155 (proc_parent_pid): Remove PCWATCH etc. tests.
1156 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
1157 Remove PCAGENT test.
1158 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
1159 Remove SYS_lwpcreate || SYS_lwp_create test.
1160 (proc_get_current_thread): Likewise.
1161 [PIOCNTHR && PIOCTLIST]: Remove.
1162 [PIOCLSTATUS]: Remove.
1163 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
1164 [PRFS_STOPEXEC]: Remove.
1165 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
1166 (syscall_is_exit): Likewise.
1167 (syscall_is_exec): Likewise.
1168 (syscall_is_lwp_create): Likewise.
1169 Remove SYS_syssgi support.
1170 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
1171 [SYS_syssgi]: Remove.
1172 Remove non-Solaris cases, conditionals.
1173 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
1174 Remove.
1175 (procfs_init_inferior) [SYS_syssgi]: Remove.
1176 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
1177 (procfs_inferior_created) [SYS_syssgi]: Remove.
1178 (procfs_set_watchpoint): Remove !AIX5 test.
1179 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
1180 case.
1181 (mappingflags) [MA_PHYS]: Remove.
1182 (info_mappings_callback): Remove PCAGENT test.
1183 Remove PIOCOPENLWP || PCAGENT test.
1184
1185 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1186
1187 * sol-thread.c (info_solthreads): Constify args.
1188 Cast args to void *.
1189
1190 2017-11-29 John Baldwin <jhb@FreeBSD.org>
1191
1192 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
1193
1194 2017-11-29 Joel Brobecker <brobecker@adacore.com>
1195
1196 * ada-lang.c (to_fixed_range_type): Make sure that the size
1197 of the range type being returned is the same as the size
1198 of the range type being fixed.
1199
1200 2017-11-29 Pedro Alves <palves@redhat.com>
1201
1202 PR c++/19436
1203 * NEWS: Mention setting breakpoints on functions with C++ ABI
1204 tags.
1205 * completer.h (completion_match_for_lcd) <match,
1206 mark_ignored_range>: New methods.
1207 <finish>: Consider ignored ranges.
1208 <clear>: Clear ignored ranges.
1209 <m_ignored_ranges, m_finished_storage>: New fields.
1210 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1211 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1212 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1213 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1214 * language.c (default_symbol_name_matcher): Pass the
1215 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1216 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1217 * utils.c (skip_abi_tag): New function.
1218 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1219 Handle ABI tags.
1220 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1221 parameter.
1222
1223 2017-11-29 Pedro Alves <palves@redhat.com>
1224
1225 PR c++/19436
1226 * NEWS: Mention setting breakpoints on functions with C++ ABI
1227 tags.
1228 * completer.h (completion_match_for_lcd) <match,
1229 mark_ignored_range>: New methods.
1230 <finish>: Consider ignored ranges.
1231 <clear>: Clear ignored ranges.
1232 <m_ignored_ranges, m_finished_storage>: New fields.
1233 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1234 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1235 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1236 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1237 * language.c (default_symbol_name_matcher): Pass the
1238 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1239 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1240 * utils.c (skip_abi_tag): New function.
1241 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1242 Handle ABI tags.
1243 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1244 parameter.
1245
1246 2017-11-29 Pedro Alves <palves@redhat.com>
1247
1248 * NEWS: Mention that breakpoints on C++ functions are now set on
1249 on all namespaces/classes by default, and mention "break
1250 -qualified".
1251 * ax-gdb.c (agent_command_1): Adjust to pass a
1252 symbol_name_match_type to new_linespec_location.
1253 * breakpoint.c (parse_breakpoint_sals): Adjust to
1254 get_linespec_location's return type change.
1255 (strace_marker_create_sals_from_location): Adjust to pass a
1256 symbol_name_match_type to new_linespec_location.
1257 (strace_marker_decode_location): Adjust to get_linespec_location's
1258 return type change.
1259 (strace_command): Adjust to pass a symbol_name_match_type to
1260 new_linespec_location.
1261 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1262 mention "-qualified".
1263 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1264 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1265 enumerator.
1266 (complete_address_and_linespec_locations): New parameter
1267 'match_type'. Pass it down.
1268 (explicit_options): Add "-qualified".
1269 (collect_explicit_location_matches): Pass the requested match type
1270 to the linespec completers. Handle MATCH_QUALIFIED.
1271 (location_completer): Handle "-qualified" combined with linespecs.
1272 * cp-support.c (cp_search_name_hash): New.
1273 (cp_symbol_name_matches_1): Implement wild matching for C++.
1274 (cp_fq_symbol_name_matches): Reimplement.
1275 (cp_get_symbol_name_matcher): Return different matchers depending
1276 on the lookup name's match type.
1277 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1278 * cp-support.h (cp_search_name_hash): New declaration.
1279 * dwarf2read.c
1280 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1281 symbols.
1282 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1283 tests.
1284 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1285 pass a symbol_name_match_type to new_linespec_location.
1286 * linespec.c (linespec_parse_basic): Lookup function symbols using
1287 the parser's symbol name match type.
1288 (convert_explicit_location_to_linespec): New
1289 symbol_name_match_type parameter. Pass it down to
1290 find_linespec_symbols.
1291 (convert_explicit_location_to_sals): Pass the location's name
1292 match type to convert_explicit_location_to_linespec.
1293 (parse_linespec): New match_type parameter. Save it in the
1294 parser.
1295 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1296 (linespec_complete_function): New symbol_name_match_type
1297 parameter. Use it.
1298 (complete_linespec_component): Pass down the parser's recorded
1299 name match type.
1300 (linespec_complete_label): New symbol_name_match_type parameter.
1301 Use it.
1302 (linespec_complete): New symbol_name_match_type parameter. Save
1303 it in the parser and pass it down. Adjust to
1304 get_linespec_location's prototype change.
1305 (find_function_symbols, find_linespec_symbols): New
1306 symbol_name_match_type parameter. Pass it down instead of
1307 assuming symbol_name_match_type::WILD.
1308 * linespec.h (linespec_complete, linespec_complete_function)
1309 (linespec_complete_label): New symbol_name_match_type parameter.
1310 * location.c (event_location::linespec_location): Now a struct
1311 linespec_location.
1312 (EL_LINESPEC): Adjust.
1313 (initialize_explicit_location): Default to
1314 symbol_name_match_type::WILD.
1315 (new_linespec_location): New symbol_name_match_type parameter.
1316 Record it in the location.
1317 (get_linespec_location): Now returns a struct linespec_location.
1318 (new_explicit_location): Also copy func_name_match_type.
1319 (explicit_to_string_internal)
1320 (string_to_explicit_location): Handle "-qualified".
1321 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1322 Copy symbol_name_match_type fields.
1323 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1324 type change.
1325 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1326 change. Handle "-qualfied".
1327 (string_to_explicit_location): Handle "-qualified".
1328 (string_to_event_location_basic): New symbol_name_match_type
1329 parameter. Pass it down.
1330 (string_to_event_location): Handle "-qualified".
1331 * location.h (struct linespec_location): New.
1332 (explicit_location::func_name_match_type): New field.
1333 (new_linespec_location): Now returns a const linespec_location *.
1334 (string_to_event_location_basic): New symbol_name_match_type
1335 parameter.
1336 (explicit_completion_info::saw_explicit_location_option): New
1337 field.
1338 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1339 symbol_name_match_type to new_linespec_location.
1340 * python/py-breakpoint.c (bppy_init): Likewise.
1341 * python/python.c (gdbpy_decode_line): Likewise.
1342
1343 2017-11-29 Pedro Alves <palves@redhat.com>
1344
1345 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1346 parameter from completion_match to completion_match_result.
1347 Adjust.
1348 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1349 * completer.c (completion_tracker::maybe_add_completion): Add
1350 match_for_lcd parameter and use it.
1351 (completion_tracker::add_completion): Likewise.
1352 * completer.h (class completion_match_for_lcd): New class.
1353 (completion_match_result::match_for_lcd): New field.
1354 (completion_match_result::set_match): New method.
1355 (completion_tracker): Add comments.
1356 (completion_tracker::add_completion): Add match_for_lcd parameter.
1357 (completion_tracker::reset_completion_match_result): Reset
1358 match_for_lcd too.
1359 (completion_tracker::maybe_add_completion): Add match_for_lcd
1360 parameter.
1361 (completion_tracker::m_lowest_common_denominator_unique): Extend
1362 comments.
1363 * cp-support.c (cp_symbol_name_matches_1)
1364 (cp_fq_symbol_name_matches): Change type of parameter from
1365 completion_match to completion_match_result. Adjust.
1366 * language.c (default_symbol_name_matcher): Change type of
1367 parameter from completion_match to completion_match_result.
1368 Adjust.
1369 * language.h (completion_match_for_lcd): Forward declare.
1370 (default_symbol_name_matcher): Change type of parameter from
1371 completion_match to completion_match_result.
1372 * symtab.c (compare_symbol_name): Adjust.
1373 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1374 * symtab.h (ada_lookup_name_info::matches): Change type of
1375 parameter from completion_match to completion_match_result.
1376 (symbol_name_matcher_ftype): Likewise, and update comments.
1377
1378 2017-11-29 Pedro Alves <palves@redhat.com>
1379
1380 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1381 * minsyms.c (msymbol_is_text): Delete.
1382 (msymbol_is_function): New function.
1383 * minsyms.h (msymbol_is_text): Delete.
1384 (msymbol_is_function): New declaration.
1385 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1386
1387 2017-11-29 Tom Tromey <tom@tromey.com>
1388
1389 * Makefile.in (distclean): Handle the case where rmdir fails.
1390
1391 2017-11-29 Tom Tromey <tom@tromey.com>
1392
1393 * symfile.c (_initialize_symfile): Update usage text for
1394 add-symbol-file, symbol-file, load.
1395
1396 2017-11-29 Tom Tromey <tom@tromey.com>
1397
1398 * symfile.c (add_symbol_file_command): Error if some arguments to
1399 -s are missing. Change unrecognized-argument error message.
1400 (_initialize_symfile): Fix usage text for add-symbol-file.
1401
1402 2017-11-27 Tom Tromey <tom@tromey.com>
1403
1404 * Makefile.in (REMOTE_OBS): Remove.
1405 (SFILES): Remove remote sources.
1406 (COMMON_SFILES): Add remote sources.
1407 (ALLDEPFILES): Remove dcache.c.
1408
1409 2017-11-27 Tom Tromey <tom@tromey.com>
1410
1411 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1412 variables.
1413 (SFILES): Use SUBDIR_TARGET_SRCS.
1414 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1415 (CONFIG_SRC_SUBDIR): Add target.
1416 (%.o): Remove target rule.
1417
1418 2017-11-27 Tom Tromey <tom@tromey.com>
1419
1420 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1421 registry.o, thread-fsm.o, debug.o.
1422 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1423 thread-fsm.c, debug.c.
1424
1425 2017-11-27 Tom Tromey <tom@tromey.com>
1426
1427 * Makefile.in (COMMON_SFILES): New.
1428 (SFILES): Move some entries to COMMON_SFILES.
1429 (COMMON_OBS): Use COMMON_SFILES.
1430
1431 2017-11-27 Tom Tromey <tom@tromey.com>
1432
1433 * Makefile.in (YYFILES): Update comment.
1434 (YYOBJ): Redefine.
1435
1436 2017-11-27 Tom Tromey <tom@tromey.com>
1437
1438 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1439 (CONFIG_SRC_SUBDIR): Add python.
1440 (%.o): Remove python rule.
1441 (python/%.o): New rule.
1442 * configure: Rebuild.
1443 * configure.ac (CONFIG_OBS): Refer to python/python.o
1444
1445 2017-11-27 Tom Tromey <tom@tromey.com>
1446
1447 * configure: Rebuild.
1448 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1449 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1450 (CONFIG_SRC_SUBDIR): Add guile.
1451 (%.o): Remove guile rule.
1452
1453 2017-11-27 Tom Tromey <tom@tromey.com>
1454
1455 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1456 (%.o): Remove unittests rule.
1457 (CONFIG_SRC_SUBDIR): Add unittests.
1458
1459 2017-11-27 Tom Tromey <tom@tromey.com>
1460
1461 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1462 (CONFIG_SRC_SUBDIR): Add tui.
1463 (%.o): Remove tui rule.
1464
1465 2017-11-27 Tom Tromey <tom@tromey.com>
1466
1467 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1468 (%.o): Remove compile rule.
1469 (CONFIG_SRC_SUBDIR): Add compile.
1470
1471 2017-11-27 Tom Tromey <tom@tromey.com>
1472
1473 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1474 (%.o): Remove mi rule.
1475 (CONFIG_SRC_SUBDIR): Add mi.
1476 (COMMON_OBS): Use mi/mi-common.o
1477
1478 2017-11-27 Tom Tromey <tom@tromey.com>
1479
1480 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1481 (%.o): Remove cli rule.
1482 (CONFIG_SRC_SUBDIR): Add cli.
1483
1484 2017-11-27 Tom Tromey <tom@tromey.com>
1485
1486 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1487 * configure: Rebuild.
1488 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1489 (CONFIG_DEP_SUBDIR): New variable.
1490 (%.o): Add order-only dependency.
1491 ($(CONFIG_DEP_SUBDIR)): New target.
1492
1493 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1494
1495 PR gdb/21945
1496 * findcmd.c (_initialize_mem_search): Update find command help
1497 text.
1498
1499 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * python/python.c (do_start_initialization): Change progname
1502 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1503 Python 2.
1504
1505 2017-11-26 Tom Tromey <tom@tromey.com>
1506
1507 * common/format.h: Add include guards.
1508
1509 2017-11-26 Tom Tromey <tom@tromey.com>
1510
1511 * nat/linux-personality.h (class
1512 maybe_disable_address_space_randomization): New class.
1513 (maybe_disable_address_space_randomization): Don't declare
1514 function.
1515 * nat/linux-personality.c (restore_personality)
1516 (make_disable_asr_cleanup): Remove.
1517 (maybe_disable_address_space_randomization): Now a constructor.
1518 (~maybe_disable_address_space_randomization): New destructor.
1519 * linux-nat.c (linux_nat_create_inferior): Update.
1520
1521 2017-11-26 Tom Tromey <tom@tromey.com>
1522
1523 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1524
1525 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1526
1527 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1528 "cooked" register. Access only first four bytes of branch target
1529 registers.
1530
1531 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1532
1533 PR gdb/22491
1534 * stap-probe.c (relocate_address): New function.
1535 (stap_probe::get_relocated_address): Use 'relocate_address'.
1536 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1537 'm_sem_addr'.
1538 (stap_probe::clear_semaphore): Likewise.
1539
1540 2017-11-25 Pedro Alves <palves@redhat.com>
1541
1542 * dictionary.c: Include "safe-ctype.h".
1543 * minsyms.c: Include "safe-ctype.h".
1544 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1545
1546 2017-11-25 Pedro Alves <palves@redhat.com>
1547
1548 * completer.c (complete_line_internal_1): Skip spaces until the
1549 start of the command.
1550
1551 2017-11-24 Pedro Alves <palves@redhat.com>
1552
1553 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1554 cp_fq_symbol_name_matches. Pass language_cplus to
1555 strncmp_with_mode.
1556 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1557 (selftests::test_cp_symbol_name_cmp): New.
1558 (_initialize_cp_support): Register "cp_symbol_name_matches"
1559 selftests.
1560 * language.c (default_symbol_name_matcher): Pass language_minimal
1561 to strncmp_iw_with_mode.
1562 * utils.c: Include "cp-support.h" and <algorithm>.
1563 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1564 (cp_is_operator): New functions.
1565 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1566 skip whitespace in the symbol name when the lookup name doesn't
1567 have spaces, and vice versa.
1568 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1569 * utils.h (strncmp_iw_with_mode): Add language parameter.
1570
1571 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1572
1573 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1574 New functions.
1575 (print_it_exception): If available, display the exception
1576 message as well.
1577 * NEWS: Document new feature.
1578
1579 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1580
1581 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1582
1583 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1584
1585 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1586 (dtrace_probe::is_enabled, dtrace_probe::enable)
1587 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1588 variable
1589 * probe.c (gen_ui_out_table_header_info)
1590 (print_ui_out_not_applicables): Remove keyword 'struct' at
1591 for-range variable
1592
1593 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1594
1595 * configure.tgt: Add arch/aarch64.o
1596
1597 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * common/common-utils.h: Include poison.h.
1600 (xfree): Remove declaration, add definition with static_assert.
1601 * common/common-utils.c (xfree): Remove.
1602 * common/poison.h (IsMallocatable): Define.
1603 (IsFreeable): Define.
1604 (free): Delete for non-freeable types.
1605 (xnew): New.
1606 (XNEW): Undef and redefine.
1607 (xcnew): New.
1608 (XCNEW): Undef and redefine.
1609 (xdelete): New.
1610 (XDELETE): Undef and redefine.
1611 (xnewvec): New.
1612 (XNEWVEC): Undef and redefine.
1613 (xcnewvec): New.
1614 (XCNEWVEC): Undef and redefine.
1615 (xresizevec): New.
1616 (XRESIZEVEC): Undef and redefine.
1617 (xdeletevec): New.
1618 (XDELETEVEC): Undef and redefine.
1619 (xnewvar): New.
1620 (XNEWVAR): Undef and redefine.
1621 (xcnewvar): New.
1622 (XCNEWVAR): Undef and redefine.
1623 (xresizevar): New.
1624 (XRESIZEVAR): Undef and redefine.
1625
1626 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1627
1628 * gdbthread.h (private_thread_info): Define structure type, add
1629 virtual pure destructor.
1630 (thread_info) <priv>: Change type to unique_ptr.
1631 <private_dtor>: Remove.
1632 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1633 (private_thread_info::~private_thread_info): Provide default
1634 implementation.
1635 (thread_info::~thread_info): Don't call private_dtor nor
1636 manually free priv.
1637 * aix-thread.c (private_thread_info): Rename to ...
1638 (aix_thread_info): ... this.
1639 (get_aix_thread_info): New.
1640 (sync_threadlists): Adjust.
1641 (iter_tid): Adjust.
1642 (aix_thread_resume): Adjust.
1643 (aix_thread_fetch_registers): Adjust.
1644 (aix_thread_store_registers): Adjust.
1645 (aix_thread_extra_thread_info): Adjust.
1646 * darwin-nat.h (private_thread_info): Rename to ...
1647 (darwin_thread_info): ... this.
1648 (get_darwin_thread_info): New.
1649 * darwin-nat.c (darwin_init_thread_list): Adjust.
1650 (darwin_check_new_threads): Adjust.
1651 (thread_info_from_private_thread_info): Adjust.
1652 * linux-thread-db.c (private_thread_info): Rename to ...
1653 (thread_db_thread_info): ... this, initialize fields.
1654 (get_thread_db_thread_info): New.
1655 <dying>: Change type to bool.
1656 (update_thread_state): Adjust to type rename.
1657 (record_thread): Adjust to type rename an use of unique_ptr.
1658 (thread_db_pid_to_str): Likewise.
1659 (thread_db_extra_thread_info): Likewise.
1660 (thread_db_thread_handle_to_thread_info): Likewise.
1661 (thread_db_get_thread_local_address): Likewise.
1662 * nto-tdep.h (private_thread_info): Rename to ...
1663 (nto_thread_info): ... this, initialize fields.
1664 (get_nto_thread_info): New.
1665 <name>: Change type to std::string.
1666 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1667 use of unique_ptr.
1668 * nto-procfs.c (update_thread_private_data_name): Adjust to
1669 std::string change, allocate nto_private_thread_info with new.
1670 (update_thread_private_data): Adjust to unique_ptr.
1671 * remote.c (private_thread_info): Rename to ...
1672 (remote_thread_info): ... this, initialize data members with
1673 default values.
1674 <extra, name>: Change type to std::string.
1675 <thread_handle>: Change type to non-pointer.
1676 (free_private_thread_info): Remove.
1677 (get_private_info_thread): Rename to...
1678 (get_remote_thread_info): ... this, change return type, adjust to
1679 use of unique_ptr, use remote_thread_info constructor.
1680 (remote_add_thread): Adjust.
1681 (get_private_info_ptid): Rename to...
1682 (get_remote_thread_info): ...this, change return type.
1683 (remote_thread_name): Use get_remote_thread_info, adjust to
1684 change to std::string.
1685 (struct thread_item) <~thread_item>: Remove.
1686 <thread_handle>: Make non pointer.
1687 (start_thread): Adjust to thread_item::thread_handle type
1688 change.
1689 (remote_update_thread_list): Adjust to type name change, move
1690 strings from temporary to long-lived object instead of
1691 duplicating.
1692 (remote_threads_extra_info): Use get_remote_thread_info.
1693 (process_initial_stop_replies): Likewise.
1694 (resume_clear_thread_private_info): Likewise.
1695 (remote_resume): Adjust to type name change.
1696 (remote_commit_resume): Use get_remote_thread_info.
1697 (process_stop_reply): Adjust to type name change.
1698 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1699 (remote_stopped_by_hw_breakpoint): Likewise.
1700 (remote_stopped_by_watchpoint): Likewise.
1701 (remote_stopped_data_address): Likewise.
1702 (remote_core_of_thread): Likewise.
1703 (remote_thread_handle_to_thread_info): Use
1704 get_private_info_thread, adjust to thread_handle field type
1705 change.
1706
1707 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1708
1709 * remote.c (struct thread_item): Add constructor, disable copy
1710 construction and copy assignment, define default move
1711 construction and move assignment.
1712 <extra, name>: Change type to std::string.
1713 <core>: Initialize.
1714 <thread_handle>: Make non-pointer.
1715 (thread_item_t): Remove typedef.
1716 (DEF_VEC_O(thread_item_t)): Remove.
1717 (threads_listing_context) <contains_thread>: New method.
1718 <remove_thread>: New method.
1719 <items>: Change type to std::vector.
1720 (clear_threads_listing_context): Remove.
1721 (threads_listing_context_remove): Remove.
1722 (remote_newthread_step): Use thread_item constructor, adjust to
1723 change to std::vector.
1724 (start_thread): Use thread_item constructor, adjust to change to
1725 std::vector.
1726 (end_thread): Adjust to change to std::vector and std::string.
1727 (remote_get_threads_with_qthreadinfo): Use thread_item
1728 constructor, adjust to std::vector.
1729 (remote_update_thread_list): Adjust to change to std::vector and
1730 std::string, use threads_listing_context methods.
1731 (remove_child_of_pending_fork): Adjust.
1732 (remove_new_fork_children): Adjust.
1733 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1734 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1735 * unittests/rsp-low-selftests.c: New file.
1736 * common/rsp-low.h: Include common/byte-vector.h.
1737 (hex2bin): New overload.
1738 * common/rsp-low.c (hex2bin): New overload.
1739
1740 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1741
1742 * inferior.h (private_inferior): Define structure type, add
1743 virtual pure destructor.
1744 (inferior) <priv>: Change type to unique_ptr.
1745 * inferior.c (private_inferior::~private_inferior): Provide
1746 default implementation.
1747 (inferior::~inferior): Don't free priv field.
1748 (exit_inferior_1): Likewise.
1749 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1750 (darwin_exception_info): Remove typedef.
1751 (DEF_VEC_O (darwin_thread_t)); Remove.
1752 (private_inferior): Rename to ...
1753 (darwin_private_inferior): ... this, extend private_inferior.
1754 (get_darwin_inferior): New.
1755 <threads>: Change type to std::vector of darwin_thread_t pointers.
1756 * darwin-nat.c (darwin_check_new_threads): Adjust.
1757 (find_inferior_task_it): Adjust.
1758 (darwin_find_thread); Adjust.
1759 (darwin_suspend_inferior): Adjust.
1760 (darwin_resume_inferior): Adjust.
1761 (darwin_find_new_inferior): Adjust.
1762 (darwin_decode_notify_message): Adjust.
1763 (darwin_send_reply): Adjust.
1764 (darwin_resume_inferior_threads): Adjust.
1765 (darwin_suspend_inferior_threads): Adjust.
1766 (darwin_decode_message): Adjust.
1767 (darwin_wait): Adjust.
1768 (darwin_interrupt): Adjust.
1769 (darwin_deallocate_threads): Adjust.
1770 (darwin_mourn_inferior): Adjust, don't free private data.
1771 (darwin_reply_to_all_pending_messages): Adjust.
1772 (darwin_stop_inferior): Adjust.
1773 (darwin_setup_exceptions): Adjust.
1774 (darwin_kill_inferior): Adjust.
1775 (darwin_setup_request_notification): Adjust.
1776 (darwin_attach_pid): Adjust.
1777 (darwin_init_thread_list): Adjust.
1778 (darwin_setup_fake_stop_event): Adjust.
1779 (darwin_attach): Adjust.
1780 (darwin_detach): Adjust.
1781 (darwin_xfer_partial): Adjust.
1782 (set_enable_mach_exceptions): Adjust.
1783 (darwin_pid_to_exec_file): Adjust.
1784 (darwin_get_ada_task_ptid): Adjust.
1785 * darwin-nat-info.c (get_task_from_args): Adjust.
1786 (info_mach_ports_command): Adjust.
1787 (info_mach_region_command): Adjust.
1788 (info_mach_exceptions_command): Adjust.
1789 * remote.c (private_inferior): Rename to ...
1790 (remote_private_inferior): ... this, initialize fields.
1791 (get_remote_inferior); New.
1792 (remote_commit_resume): Use get_remote_inferior.
1793 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1794
1795 2017-11-24 Pedro Alves <palves@redhat.com>
1796
1797 * NEWS: Mention linespecs and explicit locations, and completion
1798 improvements.
1799
1800 2017-11-24 Yao Qi <yao.qi@linaro.org>
1801
1802 * regcache.c (regcache::dump): Remove footnote_register_size.
1803
1804 2017-11-24 Yao Qi <yao.qi@linaro.org>
1805
1806 * regcache.c (cooked_read_test): Add more test for readonly
1807 regcache.
1808
1809 2017-11-24 Yao Qi <yao.qi@linaro.org>
1810
1811 * gdbarch-selftests.c (test_target_has_registers): Move it to
1812 target.c.
1813 (test_target_has_stack): Likewise.
1814 (test_target_has_memory): Likewise.
1815 (test_target_prepare_to_store): Likewise.
1816 (test_target_store_registers): Likewise.
1817 (test_target_ops): Likewise.
1818 * regcache.c: Include selftest-arch.h and gdbthread.h.
1819 (target_ops_no_register): New class.
1820 (test_target_fetch_registers): New.
1821 (test_target_store_registers): New.
1822 (test_target_xfer_partial): New.
1823 (readwrite_regcache): New.
1824 (cooked_read_test): New.
1825 (_initialize_regcache): Register the test.
1826 * target.c: (test_target_has_registers): Moved from
1827 gdbarch-selftests.c.
1828 (test_target_has_stack): Likewise.
1829 (test_target_has_memory): Likewise.
1830 (test_target_prepare_to_store): Likewise.
1831 (test_target_store_registers): Likewise.
1832 * target.h (test_target_ops): New class.
1833
1834 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1835
1836 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1837 selftest.
1838
1839 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1840
1841 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1842 * arch/aarch64.c (aarch64_create_target_description): Create
1843 new target description.
1844 * features/Makefile: Add new files.
1845 * features/aarch64.c: Remove file.
1846 * features/aarch64-core.c: New autogenerated file.
1847 * features/aarch64-fpu.c: New autogenerated file.
1848 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1849
1850 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1851
1852 * Makefile.in: Add new files.
1853 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1854 aarch64_read_description.
1855 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1856 Call aarch64_read_description.
1857 * aarch64-tdep.c (aarch64_read_description): New function.
1858 (aarch64_gdbarch_init): Call aarch64_read_description.
1859 * aarch64-tdep.h (aarch64_read_description): New function.
1860 * arch/aarch64.c: New file.
1861 * configure.tgt: Add new files.
1862
1863 2017-11-24 Yao Qi <yao.qi@linaro.org>
1864
1865 * mi/mi-main.c (register_changed_p): Update.
1866 * value.c (value_contents_bits_eq): Change return type.
1867 (value_contents_eq): Likewise.
1868 * value.h: Update comments.
1869
1870 2017-11-24 Yao Qi <yao.qi@linaro.org>
1871
1872 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1873 local 'changed'. Remove error.
1874 (register_changed_p): Change return type to bool.
1875
1876 2017-11-24 Yao Qi <yao.qi@linaro.org>
1877
1878 * arch/tic6x.c: New file.
1879 * arch/tic6x.h: New file.
1880 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1881 tic6x-core.xml and tic6x-gp.xml.
1882 * features/tic6x-c6xp.c: Generated.
1883 * features/tic6x-core.c: Generated.
1884 * features/tic6x-gp.c: Generated.
1885 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1886 "tic6x-".
1887
1888 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * mi/mi-main.c (list_available_thread_groups): Change map value
1891 type to std::vector.
1892
1893 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1896
1897 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1900 back to...
1901 <children_requested>: ... this.
1902 (varobj_get_num_children, varobj_update): Adjust.
1903
1904 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1907 (ada_value_has_mutated): Likewise.
1908 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1909 (c_is_path_expr_parent): Likewise.
1910 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1911 (mi_cmd_var_set_frozen): Likewise.
1912 (mi_cmd_var_update_iter): Likewise.
1913 (mi_cmd_var_update): Likewise.
1914 * varobj.c (pretty_printing): Likewise.
1915 (varobj_enable_pretty_printing): Likewise.
1916 (struct varobj_root) <floating, is_valid>: Likewise.
1917 (struct varobj_dynamic) <children_requested>: Likewise.
1918 (delete_variable): Likewise.
1919 (delete_variable_1): Likewise.
1920 (install_variable): Likewise.
1921 (update_type_if_necessary): Likewise.
1922 (install_new_value): Likewise.
1923 (value_of_root): Likewise.
1924 (is_root_p): Likewise.
1925 (varobj_create): Likewise.
1926 (varobj_delete): Likewise.
1927 (varobj_has_more): Likewise.
1928 (varobj_set_frozen): Likewise.
1929 (varobj_get_frozen): Likewise.
1930 (install_dynamic_child): Likewise.
1931 (dynamic_varobj_has_child_method): Likewise.
1932 (update_dynamic_varobj_children): Likewise.
1933 (varobj_get_num_children): Likewise.
1934 (varobj_list_children): Likewise.
1935 (is_path_expr_parent): Likewise.
1936 (varobj_default_is_path_expr_parent): Likewise.
1937 (varobj_is_dynamic_p): Likewise.
1938 (varobj_set_value): Likewise.
1939 (varobj_value_has_mutated): Likewise.
1940 (varobj_update): Likewise.
1941 (check_scope): Likewise.
1942 (value_of_root_1): Likewise.
1943 (varobj_value_get_print_value): Likewise.
1944 (varobj_editable_p): Likewise.
1945 (varobj_value_is_changeable_p): Likewise.
1946 (varobj_floating_p): Likewise.
1947 (varobj_default_value_is_changeable_p): Likewise.
1948 (varobj_invalidate_iter): Likewise.
1949 * varobj.h (struct varobj_update_result) <type_changed,
1950 children_changed, changed, value_installed>: Likewise.
1951 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1952 (struct lang_varobj_ops) <value_is_changeable_p,
1953 value_has_mutated, is_path_expr_parent>: Likewise.
1954 (varobj_delete): Likewise.
1955 (varobj_set_frozen): Likewise.
1956 (varobj_get_frozen): Likewise.
1957 (varobj_set_value): Likewise.
1958 (varobj_update): Likewise.
1959 (varobj_editable_p): Likewise.
1960 (varobj_floating_p): Likewise.
1961 (varobj_has_more): Likewise.
1962 (varobj_is_dynamic_p): Likewise.
1963 (varobj_default_value_is_changeable_p): Likewise.
1964 (varobj_value_is_changeable_p): Likewise.
1965 (varobj_is_anonymous_child): Likewise.
1966 (varobj_default_is_path_expr_parent): Likewise.
1967
1968 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1969
1970 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1971 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1972 <type_str>: Convert to 'std::string'.
1973 <expr>: Convert to 'expression_up'.
1974 (dtrace_probe_arg_s): Delete type and VEC.
1975 (dtrace_probe_enabler_s): Likewise.
1976 (struct dtrace_probe): Replace by...
1977 (class dtrace_static_probe_ops): ...this and...
1978 (class dtrace_probe): ...this.
1979 (dtrace_probe_is_linespec): Rename to...
1980 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1981 to reflect change.
1982 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1983 Adjust code. Create new instance of 'dtrace_probe'.
1984 (dtrace_build_arg_exprs): Rename to...
1985 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1986 reflect change.
1987 (dtrace_get_probes): Rename to...
1988 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1989 to reflect change.
1990 (dtrace_get_arg): Rename to...
1991 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1992 reflect change.
1993 (dtrace_probe_is_enabled): Rename to...
1994 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1995 change.
1996 (dtrace_get_probe_address): Rename to...
1997 (dtrace_probe::get_relocated_address): ...this. Adjust code
1998 to reflect change.
1999 (dtrace_get_probe_argument_count): Rename to...
2000 (dtrace_probe::get_argument_count): ...this. Adjust code to
2001 reflect change.
2002 (dtrace_can_evaluate_probe_arguments): Rename to...
2003 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
2004 to reflect change.
2005 (dtrace_evaluate_probe_argument): Rename to...
2006 (dtrace_probe::evaluate_argument): ...this. Adjust code to
2007 reflect change.
2008 (dtrace_compile_to_ax): Rename to...
2009 (dtrace_probe::compile_to_ax): ...this. Adjust code to
2010 reflect change.
2011 (dtrace_probe_destroy): Delete.
2012 (dtrace_type_name): Rename to...
2013 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
2014 reflect change.
2015 (dtrace_probe::get_static_ops): New method.
2016 (dtrace_gen_info_probes_table_header): Rename to...
2017 (dtrace_static_probe_ops::gen_info_probes_table_header):
2018 ...this. Adjust code to reflect change.
2019 (dtrace_gen_info_probes_table_values): Rename to...
2020 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
2021 code to reflect change.
2022 (dtrace_enable_probe): Rename to...
2023 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
2024 change.
2025 (dtrace_disable_probe): Rename to...
2026 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
2027 change.
2028 (struct probe_ops dtrace_probe_ops): Delete.
2029 (info_probes_dtrace_command): Call 'info_probes_for_spops'
2030 instead of 'info_probes_for_ops'.
2031 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
2032 of 'all_probe_ops'.
2033
2034 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2035 Simon Marchi <simark@simark.ca>
2036
2037 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
2038 variable.
2039 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
2040 <aexpr>: Change type to 'expression_up'.
2041 (stap_probe_arg_s): Delete type and VEC.
2042 (struct stap_probe): Delete. Replace by...
2043 (class stap_static_probe_ops): ...this and...
2044 (class stap_probe): ...this. Rename variables to add 'm_'
2045 prefix. Do not use 'union' for arguments anymore.
2046 (stap_get_expected_argument_type): Receive probe name instead
2047 of 'struct stap_probe'. Adjust code.
2048 (stap_parse_probe_arguments): Rename to...
2049 (stap_probe::parse_arguments): ...this. Adjust code to
2050 reflect change.
2051 (stap_get_probe_address): Rename to...
2052 (stap_probe::get_relocated_address): ...this. Adjust code
2053 to reflect change.
2054 (stap_get_probe_argument_count): Rename to...
2055 (stap_probe::get_argument_count): ...this. Adjust code
2056 to reflect change.
2057 (stap_get_arg): Rename to...
2058 (stap_probe::get_arg_by_number'): ...this. Adjust code to
2059 reflect change.
2060 (can_evaluate_probe_arguments): Rename to...
2061 (stap_probe::can_evaluate_arguments): ...this. Adjust code
2062 to reflect change.
2063 (stap_evaluate_probe_argument): Rename to...
2064 (stap_probe::evaluate_argument): ...this. Adjust code
2065 to reflect change.
2066 (stap_compile_to_ax): Rename to...
2067 (stap_probe::compile_to_ax): ...this. Adjust code to
2068 reflect change.
2069 (stap_probe_destroy): Delete.
2070 (stap_modify_semaphore): Adjust comment.
2071 (stap_set_semaphore): Rename to...
2072 (stap_probe::set_semaphore): ...this. Adjust code to reflect
2073 change.
2074 (stap_clear_semaphore): Rename to...
2075 (stap_probe::clear_semaphore): ...this. Adjust code to
2076 reflect change.
2077 (stap_probe::get_static_ops): New method.
2078 (handle_stap_probe): Adjust code to create instance of
2079 'stap_probe'.
2080 (stap_get_probes): Rename to...
2081 (stap_static_probe_ops::get_probes): ...this. Adjust code to
2082 reflect change.
2083 (stap_probe_is_linespec): Rename to...
2084 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
2085 reflect change.
2086 (stap_type_name): Rename to...
2087 (stap_static_probe_ops::type_name): ...this. Adjust code to
2088 reflect change.
2089 (stap_gen_info_probes_table_header): Rename to...
2090 (stap_static_probe_ops::gen_info_probes_table_header):
2091 ...this. Adjust code to reflect change.
2092 (stap_gen_info_probes_table_values): Rename to...
2093 (stap_probe::gen_info_probes_table_values): ...this. Adjust
2094 code to reflect change.
2095 (struct probe_ops stap_probe_ops): Delete.
2096 (info_probes_stap_command): Use 'info_probes_for_spops'
2097 instead of 'info_probes_for_ops'.
2098 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
2099 of 'all_probe_ops'.
2100
2101 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2102
2103 * break-catch-throw.c (fetch_probe_arguments): Use
2104 'probe.prob' instead of 'probe.probe'.
2105 * breakpoint.c (create_longjmp_master_breakpoint): Call
2106 'can_evaluate_arguments' and 'get_relocated_address' methods
2107 from probe.
2108 (create_exception_master_breakpoint): Likewise.
2109 (add_location_to_breakpoint): Use 'sal->prob' instead of
2110 'sal->probe'.
2111 (bkpt_probe_insert_location): Call 'set_semaphore' method from
2112 probe.
2113 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
2114 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
2115 of 'probe_ops'.
2116 (probe_key_free): Call 'delete' on probe.
2117 (check_exception_resume): Use 'probe.prob' instead of
2118 'probe.probe'.
2119 * location.c (string_to_event_location_basic): Call
2120 'probe_linespec_to_static_ops'.
2121 * probe.c (class any_static_probe_ops): New class.
2122 (any_static_probe_ops any_static_probe_ops): New variable.
2123 (parse_probes_in_pspace): Receive 'static_probe_ops' as
2124 argument. Adjust code to reflect change.
2125 (parse_probes): Use 'static_probe_ops' instead of
2126 'probe_ops'. Adjust code to reflect change.
2127 (find_probes_in_objfile): Call methods to get name and
2128 provider from probe.
2129 (find_probe_by_pc): Use 'result.prob' instead of
2130 'result.probe'. Call 'get_relocated_address' method from
2131 probe.
2132 (collect_probes): Adjust comment and argument list to receive
2133 'static_probe_ops' instead of 'probe_ops'. Adjust code to
2134 reflect change. Call necessary methods from probe.
2135 (compare_probes): Call methods to get name and provider from
2136 probes.
2137 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
2138 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
2139 adjust code accordingly.
2140 (print_ui_out_not_applicables): Likewise.
2141 (info_probes_for_ops): Rename to...
2142 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
2143 as argument instead of 'probe_ops'. Adjust code. Call
2144 necessary methods from probe.
2145 (info_probes_command): Use 'info_probes_for_spops'.
2146 (enable_probes_command): Pass correct argument to
2147 'collect_probes'. Call methods from probe.
2148 (disable_probes_command): Likewise.
2149 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
2150 (get_probe_argument_count): Move to
2151 'any_static_probe_ops::get_argument_count'.
2152 (can_evaluate_probe_arguments): Move to
2153 'any_static_probe_ops::can_evaluate_arguments'.
2154 (evaluate_probe_argument): Move to
2155 'any_static_probe_ops::evaluate_argument'.
2156 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
2157 'probe.probe'.
2158 (probe_linespec_to_ops): Rename to...
2159 (probe_linespec_to_static_ops): ...this. Adjust code.
2160 (probe_any_is_linespec): Rename to...
2161 (any_static_probe_ops::is_linespec): ...this.
2162 (probe_any_get_probes): Rename to...
2163 (any_static_probe_ops::get_probes): ...this.
2164 (any_static_probe_ops::type_name): New method.
2165 (any_static_probe_ops::gen_info_probes_table_header): New
2166 method.
2167 (compute_probe_arg): Use 'pc_probe.prob' instead of
2168 'pc_probe.probe'. Call methods from probe.
2169 (compile_probe_arg): Likewise.
2170 (std::vector<const probe_ops *> all_probe_ops): Delete.
2171 (std::vector<const static_probe_ops *> all_static_probe_ops):
2172 New variable.
2173 (_initialize_probe): Use 'all_static_probe_ops' instead of
2174 'all_probe_ops'.
2175 * probe.h (struct info_probe_column) <field_name>: Delete
2176 extraneous newline
2177 (info_probe_column_s): Delete type and VEC.
2178 (struct probe_ops): Delete. Replace with...
2179 (class static_probe_ops): ...this and...
2180 (clas probe): ...this.
2181 (struct bound_probe) <bound_probe>: Delete extraneous
2182 newline. Adjust constructor to receive 'probe' instead of
2183 'struct probe'.
2184 <probe>: Rename to...
2185 <prob>: ...this. Delete extraneous newline.
2186 <objfile>: Delete extraneous newline.
2187 (register_probe_ops): Delete unused prototype.
2188 (info_probes_for_ops): Rename to...
2189 (info_probes_for_spops): ...this. Adjust comment.
2190 (get_probe_address): Move to 'probe::get_address'.
2191 (get_probe_argument_count): Move to
2192 'probe::get_argument_count'.
2193 (can_evaluate_probe_arguments): Move to
2194 'probe::can_evaluate_arguments'.
2195 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
2196 * solib-svr4.c (struct svr4_info): Adjust comment.
2197 (struct probe_and_action) <probe>: Rename to...
2198 <prob>: ...this.
2199 (register_solib_event_probe): Receive 'probe' instead of
2200 'struct probe' as argument. Use 'prob' instead of 'probe'
2201 when applicable.
2202 (solib_event_probe_action): Call 'get_argument_count' method
2203 from probe. Adjust comment.
2204 (svr4_handle_solib_event): Adjust comment. Call
2205 'evaluate_argument' method from probe.
2206 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
2207 from probe.
2208 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
2209 'struct probe'. Call 'can_evaluate_arguments' from probe.
2210 * symfile.h: Forward declare 'class probe' instead of 'struct
2211 probe'.
2212 * symtab.h: Likewise.
2213 (struct symtab_and_line) <probe>: Rename to...
2214 <prob>: ...this.
2215 * tracepoint.c (start_tracing): Use 'prob' when applicable.
2216 Call probe methods.
2217 (stop_tracing): Likewise.
2218
2219 2017-11-22 Joel Brobecker <brobecker@adacore.com>
2220
2221 * ravenscar-thread.c (ravenscar_inferior_created): Remove
2222 trailing newline at end of string in call to warning.
2223
2224 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2225
2226 * osdata.h: Include vector isntead of vec.h.
2227 (osdata_column_s): Remove typedef.
2228 (struct osdata_column): Add constructor.
2229 <name, value>: Change type to std::string.
2230 (DEF_VEC_O (osdata_column_s)): Remove.
2231 (osdata_item_s): Remove typedef.
2232 (struct osdata_item) <columns>: Change type to std::vector.
2233 (DEF_VEC_O (osdata_item_s)): Remove.
2234 (struct osdata): Add constructor.
2235 <type>: Change type to std::string.
2236 <items>: Change type to std::vector.
2237 (osdata_p): Remove typedef.
2238 (DEF_VEC_P (osdata_p)): Remove.
2239 (osdata_parse): Return a unique_ptr.
2240 (osdata_free): Remove.
2241 (make_cleanup_osdata_free): Remove.
2242 (get_osdata): Return a unique_ptr.
2243 (get_osdata_column): Return pointer to std::string, take a
2244 reference to osdata_item as parameter.
2245 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2246 unique_ptr.
2247 <property_name>: Change type to std::string.
2248 (osdata_start_osdata): Allocate osdata with new and adjust.
2249 (osdata_start_item): Adjust.
2250 (osdata_start_column): Adjust.
2251 (osdata_end_column): Adjust.
2252 (clear_parsing_data): Remove.
2253 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2254 (osdata_item_clear): Remove.
2255 (get_osdata): return a unique_ptr and adjust.
2256 (get_osdata_column): Return a pointer to std::string and adjust.
2257 (info_osdata): Adjust.
2258 * mi/mi-main.c: Include <map>.
2259 (free_vector_of_osdata_items): Remove.
2260 (list_available_thread_groups): Adjust, use std::map instead of
2261 splay tree.
2262
2263 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2264
2265 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2266 case in switch.
2267
2268 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2269
2270 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2271
2272 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * varobj.h (struct varobj_update_result): Add constructor, add
2275 move constructor, disable copy and assign, initialize fields.
2276 <newobj>: Change type to std::vector.
2277 (varobj_update): Return std::vector.
2278 * varobj.c (install_dynamic_child): Change VEC parameters to
2279 std::vector and adjust.
2280 (update_dynamic_varobj_children): Likewise.
2281 (varobj_update): Return std::vector and adjust.
2282 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2283
2284 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2285
2286 * varobj.h (struct varobj) <parent>: Remove const.
2287 <children>: Change type to std::vector.
2288 (varobj_list_children): Return std::vector const reference.
2289 (varobj_restrict_range): Change parameter type to std::vector
2290 const reference.
2291 * varobj.c (varobj_has_more): Adjust.
2292 (varobj_restrict_range): Change parameter type to std::vector
2293 const reference and adjust.
2294 (install_dynamic_child): Adjust.
2295 (update_dynamic_varobj_children): Adjust.
2296 (varobj_list_children): Return std::vector const reference and
2297 adjust.
2298 (varobj_add_child): Adjust.
2299 (update_type_if_necessary): Adjust.
2300 (varobj_update): Adjust.
2301 (delete_variable_1): Adjust.
2302 * ada-varobj.c (ada_value_has_mutated): Adjust.
2303 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2304
2305 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2306
2307 * varobj.h (struct varobj): Add constructor and destructor,
2308 initialize fields.
2309 * varobj.c (struct varobj_root): Initialize fields.
2310 (struct varobj_dynamic): Initialize fields.
2311 (varobj_create): Use unique_ptr instead of cleanup. Create
2312 varobj with new instead of new_root_variable.
2313 (delete_variable_1): Free variable with delete instead of
2314 free_variable.
2315 (create_child_with_value): Create variable with new instead of
2316 new_variable.
2317 (varobj::varobj): New.
2318 (varobj::~varobj): New (body mostly coming from free_variable).
2319 (new_variable): Remove.
2320 (free_variable): Remove.
2321 (do_free_variable_cleanup): Remove.
2322 (make_cleanup_free_variable): Remove.
2323
2324 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2325
2326 * core-regset.c: Remove file.
2327 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2328
2329 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2330
2331 * NEWS: Document use of GNU MPFR.
2332 * README: Likewise.
2333
2334 * Makefile.in (LIBMPFR): Add define.
2335 (CLIBS): Add $(LIBMPFR).
2336 * configure.ac: Add --with-mpfr configure option.
2337 * configure: Regenerate.
2338 * config.in: Regenerate.
2339
2340 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2341 (class mpfr_float_ops): New type.
2342 (mpfr_float_ops::from_target): Two new overloaded functions.
2343 (mpfr_float_ops::to_target): Likewise.
2344 (mpfr_float_ops::to_string): New function.
2345 (mpfr_float_ops::from_string): Likewise.
2346 (mpfr_float_ops::to_longest): Likewise.
2347 (mpfr_float_ops::from_longest): Likewise.
2348 (mpfr_float_ops::from_ulongest): Likewise.
2349 (mpfr_float_ops::to_host_double): Likewise.
2350 (mpfr_float_ops::from_host_double): Likewise.
2351 (mpfr_float_ops::convert): Likewise.
2352 (mpfr_float_ops::binop): Likewise.
2353 (mpfr_float_ops::compare): Likewise.
2354 (get_target_float_ops): Use mpfr_float_ops if available.
2355
2356 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2357
2358 * target-float.c: Do not include <math.h>.
2359 Include <cmath> and <limits>.
2360 (DOUBLEST): Do not define.
2361 (class target_float_ops): New type.
2362 (class host_float_ops): New templated type.
2363 (class decimal_float_ops): New type.
2364
2365 (floatformat_to_doublest): Rename to ...
2366 (host_float_ops<T>::from_target): ... this. Use template type T
2367 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2368 (host_float_ops<T>::from_target): New overload using a type argument.
2369 (floatformat_from_doublest): Rename to ...
2370 (host_float_ops<T>::to_target): ... this. Use template type T
2371 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2372 (host_float_ops<T>::to_target): New overload using a type argument.
2373 (floatformat_printf_format): New function.
2374 (struct printf_length_modifier): New templated type.
2375 (floatformat_to_string): Rename to ...
2376 (host_float_ops<T>::to_string): ... this. Use type instead of
2377 floatformat argument. Use floatformat_printf_format and
2378 printf_length_modifier. Remove special handling of invalid numbers,
2379 infinities and NaN (moved to target_float_to_string).
2380 (struct scanf_length_modifier): New templated type.
2381 (floatformat_from_string): Rename to ...
2382 (host_float_ops<T>::from_string): ... this. Use type instead of
2383 floatformat argument. Use scanf_length_modifier.
2384 (floatformat_to_longest): Rename to ...
2385 (host_float_ops<T>::to_longest): ... this. Use type instead of
2386 floatformat argument. Handle out-of-range values deterministically.
2387 (floatformat_from_longest): Rename to ...
2388 (host_float_ops<T>::from_longest): ... this. Use type instead of
2389 floatformat argument.
2390 (floatformat_from_ulongest): Rename to ...
2391 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2392 floatformat argument.
2393 (floatformat_to_host_double): Rename to ...
2394 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2395 floatformat argument.
2396 (floatformat_from_host_double): Rename to ...
2397 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2398 floatformat argument.
2399 (floatformat_convert): Rename to ...
2400 (host_float_ops<T>::convert): ... this. Use type instead of
2401 floatformat arguments. Remove handling of no-op conversions.
2402 (floatformat_binop): Rename to ...
2403 (host_float_ops<T>::binop): ... this. Use type instead of
2404 floatformat arguments.
2405 (floatformat_compare): Rename to ...
2406 (host_float_ops<T>::compare): ... this. Use type instead of
2407 floatformat arguments.
2408
2409 (match_endianness): Use type instead of length/byte_order arguments.
2410 (set_decnumber_context): Likewise.
2411 (decimal_from_number): Likewise. Update calls.
2412 (decimal_to_number): Likewise.
2413 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2414 (decimal_float_ops::to_host_double): New dummy function.
2415 (decimal_float_ops::from_host_double): Likewise.
2416 (decimal_to_string): Rename to ...
2417 (decimal_float_ops::to_string): ... this. Use type instead of
2418 length/byte_order arguments. Update calls.
2419 (decimal_from_string): Rename to ...
2420 (decimal_float_ops::from_string): ... this. Use type instead of
2421 length/byte_order arguments. Update calls.
2422 (decimal_from_longest): Rename to ...
2423 (decimal_float_ops::from_longest): ... this. Use type instead of
2424 length/byte_order arguments. Update calls.
2425 (decimal_from_ulongest): Rename to ...
2426 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2427 length/byte_order arguments. Update calls.
2428 (decimal_to_longest): Rename to ...
2429 (decimal_float_ops::to_longest): ... this. Use type instead of
2430 length/byte_order arguments. Update calls.
2431 (decimal_binop): Rename to ...
2432 (decimal_float_ops::binop): ... this. Use type instead of
2433 length/byte_order arguments. Update calls.
2434 (decimal_compare): Rename to ...
2435 (decimal_float_ops::compare): ... this. Use type instead of
2436 length/byte_order arguments. Update calls.
2437 (decimal_convert): Rename to ...
2438 (decimal_float_ops::convert): ... this. Use type instead of
2439 length/byte_order arguments. Update calls.
2440
2441 (target_float_same_category_p): New function.
2442 (target_float_same_format_p): Likewise.
2443 (target_float_format_length): Likewise.
2444 (enum target_float_ops_kind): New type.
2445 (get_target_float_ops_kind): New function.
2446 (get_target_float_ops): Three new overloaded functions.
2447
2448 (target_float_is_zero): Update call.
2449 (target_float_to_string): Add special handling of invalid numbers,
2450 infinities and NaN (moved from floatformat_to_string). Use
2451 target_float_ops callback.
2452 (target_float_from_string): Use target_float_ops callback.
2453 (target_float_to_longest): Likewise.
2454 (target_float_from_longest): Likewise.
2455 (target_float_from_ulongest): Likewise.
2456 (target_float_to_host_double): Likewise.
2457 (target_float_from_host_double): Likewise.
2458 (target_float_convert): Add special case for no-op conversions.
2459 Use target_float_ops callback.
2460 (target_float_binop): Use target_float_ops callback.
2461 (target_float_compare): Likewise.
2462
2463 2017-11-22 Yao Qi <yao.qi@linaro.org>
2464
2465 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2466
2467 2017-11-22 Yao Qi <yao.qi@linaro.org>
2468
2469 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2470 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2471
2472 2017-11-21 Jerome Guitton <guitton@adacore.com>
2473
2474 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2475 with event ptid from the lower layer before doing the
2476 ravenscar-specific update.
2477
2478 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2479
2480 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2481 the ptid's TID is nonzero.
2482
2483 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2484
2485 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2486 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2487 Make non-static. Change return type to char *. Adjust code
2488 accordingly. Rewrite the function's documentation.
2489 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2490 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2491 we have enough debugging information in the runtime to support
2492 Ada task debugging before we enable the ravenscar-thread layer.
2493
2494 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2495
2496 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2497 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2498 * ravenscar-thread.c: Add into comment.
2499 (base_magic_null_ptid): Delete.
2500 (base_ptid): Change documentation.
2501 (ravenscar_active_task): Renames ravenscar_running_thread.
2502 All callers updated throughout.
2503 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2504 (ravenscar_task_is_currently_active): Likewise.
2505 (get_base_thread_from_ravenscar_task): Ditto.
2506 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2507 (ravenscar_runtime_initialized): Likewise.
2508 (get_running_thread_id): Add new parameter "cpu". Adjust
2509 implementation to handle this new parameter.
2510 (ravenscar_fetch_registers): Small adjustment to use
2511 is_ravenscar_task and ravenscar_task_is_currently_active in
2512 order to decide whether to use the target beneath or this
2513 module's arch_ops.
2514 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2515 (ravenscar_stopped_by_sw_breakpoint): Use
2516 get_base_thread_from_ravenscar_task to get the underlying
2517 thread, rather than using base_ptid.
2518 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2519 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2520 Likewise.
2521 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2522
2523 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2524
2525 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2526 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2527 (get_tcb_types_info): Set fieldnos.base_cpu.
2528 (read_atcb): Set task_info->base_cpu.
2529 (info_task): Print "Base CPU" info if set by runtime.
2530
2531 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2532
2533 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2534 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2535 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2536 New functions.
2537 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2538 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2539 to_stopped_data_address and to_core_of_thread fields of
2540 ravenscar_ops.
2541
2542 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2543
2544 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2545 (struct gdbarch_tdep): New member long_double_abi.
2546 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2547 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2548 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2549 format depending on long_double_abi tdep member.
2550 (ppc_floatformat_for_type): Handle __ibm128 type.
2551
2552 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2553
2554 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2555
2556 2017-11-21 Pedro Alves <palves@redhat.com>
2557
2558 * dwarf2read.c (mapped_index::find_name_components_bounds)
2559 <completion mode, upper bound>: Use std::lower_bound instead of
2560 std::upper_bound.
2561 (test_mapped_index_find_name_component_bounds): Remove incorrect
2562 "t1_fund" from expected symbols.
2563
2564 2017-11-21 Pedro Alves <palves@redhat.com>
2565
2566 * dwarf2read.c (mapped_index::name_components_casing): New field.
2567 (mapped_index) <build_name_components,
2568 find_name_components_bounds): Declare new methods.
2569 (mapped_index::find_name_components_bounds)
2570 (mapped_index::build_name_components): New methods, factored out
2571 from dw2_expand_symtabs_matching_symbol.
2572 (check_find_bounds_finds)
2573 (test_mapped_index_find_name_component_bounds): New.
2574 (run_test): Rename to ...
2575 (test_dw2_expand_symtabs_matching_symbol): ... this.
2576 (run_test): Reimplement.
2577
2578 2017-11-21 Pedro Alves <palves@redhat.com>
2579
2580 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2581 (symbol_end): Use cp_ident_is_alnum.
2582 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2583 * dwarf2read.c (make_sort_after_prefix_name): New function.
2584 (dw2_expand_symtabs_matching_symbol): Use it.
2585 (test_symbols): Add more symbols.
2586 (run_test): Add tests.
2587
2588 2017-11-17 Tom Tromey <tom@tromey.com>
2589
2590 * symtab.h (enum symbol_subclass_kind): New.
2591 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2592 Remove.
2593 <subclass>: New member.
2594 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2595 * rust-lang.c (rust_get_trait_object_pointer): Update.
2596 * dwarf2read.c (read_func_scope): Update.
2597 (read_variable): Update.
2598
2599 2017-11-17 Tom Tromey <tom@tromey.com>
2600
2601 * dwarf2read.c (read_func_scope): Update.
2602 * symtab.h (struct template_symbol): Derive from symbol.
2603 <base>: Remove.
2604
2605 2017-11-17 Tom Tromey <tom@tromey.com>
2606
2607 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2608 (struct rust_vtable_symbol): New.
2609 (find_symbol_at_address): Declare.
2610 * symtab.c (find_symbol_at_address): New function.
2611 * symfile.h (struct quick_symbol_functions)
2612 <find_compunit_symtab_by_address>: New member.
2613 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2614 function.
2615 (debug_sym_quick_functions): Link to
2616 debug_qf_find_compunit_symtab_by_address.
2617 * rust-lang.c (rust_get_trait_object_pointer): New function.
2618 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2619 rust_get_trait_object_pointer.
2620 * psymtab.c (psym_relocate): Clear psymbol_map.
2621 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2622 functions.
2623 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2624 * objfiles.h (struct objfile) <psymbol_map>: New member.
2625 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2626 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2627 (rust_containing_type, read_variable): New functions.
2628
2629 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2632
2633 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * common/filestuff.c: Include <algorithm>.
2636 (open_fds): Change type to std::vector<int>.
2637 (do_mark_open_fd): Adjust.
2638 (unmark_fd_no_cloexec): Adjust.
2639 (do_close): Adjust.
2640
2641 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2642
2643 * breakpoint.c (output_thread_groups): Take an std::vector.
2644 (print_one_breakpoint_location): Adjust.
2645
2646 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2647
2648 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2649 (ada_evaluate_subexp_for_cast): New function.
2650 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2651 ada_evaluate_subexp_for_cast.
2652 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2653 eval_skip_value.
2654 * eval.c (evaluate_var_value): Make non-static.
2655 (evaluate_var_msym_value, eval_skip_value): Likewise.
2656 * value.h (evaluate_var_value, evaluate_var_msym_value)
2657 (eval_skip_value): Declare.
2658
2659 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2660
2661 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2662 Update all callers.
2663
2664 2017-11-16 Pedro Alves <palves@redhat.com>
2665
2666 * python/py-unwind.c (pyuw_sniffer): Translate
2667 PyExc_KeyboardInterrupt to a GDB Quit exception.
2668
2669 2017-11-16 Pedro Alves <palves@redhat.com>
2670
2671 * infrun.c (resume_cleanups): Delete.
2672 (resume): No longer install a resume_cleanups cleanup nor call
2673 QUIT.
2674 (proceed): Pass the terminal to the inferior.
2675 (keep_going_pass_signal): No longer install a resume_cleanups
2676 cleanup.
2677
2678 2017-11-16 Pedro Alves <palves@redhat.com>
2679
2680 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2681 if the prompt is blocked.
2682
2683 2017-11-16 Pedro Alves <palves@redhat.com>
2684
2685 * breakpoint.c (insert_bp_location): Replace bp_err and
2686 bp_err_message locals by a gdb_exception local.
2687
2688 2017-11-16 Pedro Alves <palves@redhat.com>
2689
2690 * inflow.c (scoped_ignore_sigttou): New class.
2691 (child_terminal_ours_1, new_tty): Use it.
2692
2693 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2694
2695 * target-float.c (decimal_from_number): Add byte_order argument and
2696 call match_endianness. Error if unknown floating-point type.
2697 (decimal_to_number): Add byte_order argument and call match_endianness.
2698 (decimal_from_longest): Update call. Do not call match_endianness.
2699 (decimal_from_ulongest): Likewise.
2700 (decimal_binop): Likewise.
2701 (decimal_is_zero): Likewise.
2702 (decimal_compare): Likewise.
2703 (decimal_convert): Likewise.
2704
2705 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2706
2707 * python/python.c (gdbpy_rbreak): New function.
2708 * NEWS: Document Python rbreak feature.
2709
2710 2017-11-16 Yao Qi <yao.qi@linaro.org>
2711
2712 * features/tic6x-c62x.xml: Remove.
2713 * features/tic6x-c64x.xml: Remove.
2714 * features/tic6x-c64xp.xml: Remove.
2715
2716 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2717
2718 * symtab.h: Include <array>.
2719
2720 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2721
2722 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2723 (bsd_kvm_proc_cmd): Likewise.
2724
2725 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 * tui/tui-win.c (window_name_completer): Replace VEC with
2728 std::vector.
2729
2730 2017-11-15 Andrew Cagney <cagney@gnu.org>
2731
2732 * MAINTAINERS: Remove no-longer applicable entries.
2733
2734 2017-11-15 Andrew Cagney <cagney@gnu.org>
2735
2736 * MAINTAINERS: Move self to Past Maintainers.
2737
2738 2017-11-15 Yao Qi <yao.qi@linaro.org>
2739
2740 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2741 * features/nios2-linux.c: Remove.
2742 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2743 initialize_tdesc_nios2_linux.
2744
2745 2017-11-15 Yao Qi <yao.qi@linaro.org>
2746
2747 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2748 M68HC11_LAST_HARD_REG + 1.
2749
2750 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2751
2752 PR gdb/22388
2753 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2754 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2755 Return TARGET_XFER_EOF if size of returned data is 0.
2756
2757 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2758
2759 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2760 memory-map-selftests.c.
2761 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2762 * memory-map.c (memory_map_start_memory): Fix computation of hi
2763 address.
2764 * unittests/memory-map-selftests.c: New file.
2765
2766 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2767
2768 * ada-lang.c: Fix some typos in the general command documenting
2769 how Ada expressions are being evaluated and how their result
2770 is printed.
2771
2772 2017-11-09 Tom Tromey <tom@tromey.com>
2773
2774 * psymtab.c (psymbol_hash): Do not hash string contents.
2775 (psymbol_compare): Add comment.
2776
2777 2017-11-09 Tom Tromey <tom@tromey.com>
2778
2779 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2780
2781 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2782
2783 * ada-exp.y (write_var_from_sym): Remove parameter
2784 "orig_left_context". Update all callers.
2785
2786 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2787
2788 * tracepoint.h (class collection_list) <stringify>: Return
2789 std::vector<std::string>.
2790 (encode_actions_rsp): Change parameters to
2791 std::vector<std::string> *.
2792 * tracepoint.c (collection_list::stringify): Return
2793 std::vector<std::string> and adjust accordingly.
2794 (encode_actions_rsp): Changee parameters to
2795 std::vector<std::string> and adjust accordingly.
2796 * remote.c (free_actions_list),
2797 free_actions_list_cleanup_wrapper): Remove.
2798 (remote_download_tracepoint): Adjust to std::vector.
2799
2800 2017-11-08 Tom Tromey <tom@tromey.com>
2801
2802 * dwarf2read.c (symbolp): Remove typedef.
2803 (read_func_scope): Use std::vector.
2804 (process_structure_scope): Use std::vector.
2805
2806 2017-11-08 Pedro Alves <palves@redhat.com>
2807
2808 * ada-lang.c (ada_make_symbol_completion_list): Use
2809 completion_skip_symbol.
2810 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2811 (symbol_is_function_or_method(symbol*)): New.
2812 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2813 completion_skip_symbol.
2814 (default_collect_symbol_completion_matches_break_on): Use
2815 completion_skip_symbol. Pass down mode.
2816 (collect_file_symbol_completion_matches): Pass down mode.
2817 * symtab.h (symbol_is_function_or_method): New declarations.
2818 (completion_skip_symbol): New template function.
2819
2820 2017-11-08 Pedro Alves <palves@redhat.com>
2821
2822 * linespec.c (iterate_over_all_matching_symtabs): Add
2823 search_domain parameter. Pass it down to expand_symtabs_matching.
2824 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2825 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2826 search_domain.
2827 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2828 Pass it down.
2829 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2830 symbols.
2831 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2832 it down.
2833
2834 2017-11-08 Pedro Alves <palves@redhat.com>
2835
2836 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2837 text_len locals and don't pass them down.
2838 * symtab.c (completion_list_add_name): Remove
2839 sym_text/sym_text_len parameters and adjust.
2840 (completion_list_add_symbol, completion_list_add_msymbol)
2841 (completion_list_objc_symbol, completion_list_add_fields)
2842 (add_symtab_completions): Likewise.
2843 (default_collect_symbol_completion_matches_break_on)
2844 (collect_file_symbol_completion_matches): Remove sym_text_len
2845 local and don't pass it down.
2846 * symtab.h (completion_list_add_name): Remove
2847 sym_text/sym_text_len parameters.
2848
2849 2017-11-08 Pedro Alves <palves@redhat.com>
2850
2851 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2852 unittests/lookup_name_info-selftests.c.
2853 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2854 * cp-support.c: Include "selftest.h".
2855 (cp_remove_params_1): Rename from cp_remove_params. Add
2856 'require_param' parameter, and handle it.
2857 (cp_remove_params): Reimplement.
2858 (cp_remove_params_if_any): New.
2859 (selftests::quote): New.
2860 (selftests::check_remove_params): New.
2861 (selftests::test_cp_remove_params): New.
2862 (_initialize_cp_support): Install
2863 selftests::test_cp_remove_params.
2864 * cp-support.h (cp_remove_params_if_any): Declare.
2865 * dwarf2read.c :Include "selftest.h".
2866 (dw2_expand_symtabs_matching_symbol): Use
2867 lookup_name_info::make_ignore_params.
2868 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2869 (selftests::dw2_expand_symtabs_matching::string_or_null)
2870 (selftests::dw2_expand_symtabs_matching::check_match)
2871 (selftests::dw2_expand_symtabs_matching::test_symbols)
2872 (selftests::dw2_expand_symtabs_matching::run_test): New.
2873 (_initialize_dwarf2_read): Register
2874 selftests::dw2_expand_symtabs_matching::run_test.
2875 * psymtab.c (psym_expand_symtabs_matching): Use
2876 lookup_name_info::make_ignore_params.
2877 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2878 If the lookup name wants to ignore parameters, strip them.
2879 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2880 code handling '('.
2881 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2882 (default_collect_symbol_completion_matches_break_on): Don't try to
2883 strip parameters.
2884 * symtab.h (lookup_name_info::lookup_name_info): Add
2885 'ignore_parameters' parameter.
2886 (lookup_name_info::ignore_parameters)
2887 (lookup_name_info::make_ignore_params): New methods.
2888 (lookup_name_info::m_ignore_parameters): New field.
2889 * unittests/lookup_name_info-selftests.c: New file.
2890
2891 2017-11-08 Pedro Alves <palves@redhat.com>
2892
2893 * dwarf2read.c (dw2_expand_marked_cus)
2894 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2895 (dw2_expand_symtabs_matching): Move further below.
2896 (dw2_expand_marked_cus): Reindent.
2897
2898 2017-11-08 Pedro Alves <palves@redhat.com>
2899
2900 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2901 (struct name_component): New.
2902 (mapped_index::name_components): New field.
2903 (mapped_index::symbol_name_at): New method.
2904 (dwarf2_read_index): Call mapped_index ctor.
2905 (dw2_map_matching_symbols): Add comment about name_components
2906 table.
2907 (dw2_expand_symtabs_matching): Factor part to...
2908 (dw2_expand_symtabs_matching_symbol): ... this new function.
2909 Build name components table, and lookup symbols in it before
2910 calling the name matcher.
2911 (dw2_expand_marked_cus): New, factored out from
2912 dw2_expand_symtabs_matching.
2913 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2914
2915 2017-11-08 Pedro Alves <palves@redhat.com>
2916
2917 * ada-lang.c (ada_encode): Rename to ..
2918 (ada_encode_1): ... this. Add throw_errors parameter and handle
2919 it.
2920 (ada_encode): Reimplement.
2921 (match_name): Delete, folded into full_name.
2922 (resolve_subexp): No longer pass the encoded name to
2923 ada_lookup_symbol_list.
2924 (should_use_wild_match): Delete.
2925 (name_match_type_from_name): New.
2926 (ada_lookup_simple_minsym): Use lookup_name_info and the
2927 language's symbol_name_matcher_ftype.
2928 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2929 (ada_add_block_renamings): Adjust to use lookup_name_info.
2930 (ada_lookup_name): New.
2931 (add_nonlocal_symbols, ada_add_all_symbols)
2932 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2933 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2934 (ada_name_for_lookup): Delete.
2935 (ada_lookup_encoded_symbol): Construct a verbatim name.
2936 (wild_match): Reverse sense of return type. Use bool.
2937 (full_match): Reverse sense of return type. Inline bits of old
2938 match_name here.
2939 (ada_add_block_symbols): Adjust to use lookup_name_info.
2940 (symbol_completion_match): Delete, folded into...
2941 (ada_lookup_name_info::matches): ... .this new method.
2942 (symbol_completion_add): Delete.
2943 (ada_collect_symbol_completion_matches): Add name_match_type
2944 parameter. Adjust to use lookup_name_info and
2945 completion_list_add_name.
2946 (get_var_value, ada_add_global_exceptions): Adjust to use
2947 lookup_name_info.
2948 (ada_get_symbol_name_cmp): Delete.
2949 (do_wild_match, do_full_match): New functions.
2950 (ada_lookup_name_info::ada_lookup_name_info): New method.
2951 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2952 functions.
2953 (ada_language_defn): Install ada_get_symbol_name_matcher.
2954 * ada-lex.l (processId): If name starts with '<', copy it
2955 verbatim.
2956 * block.c (block_iter_match_step, block_iter_match_first)
2957 (block_iter_match_next, block_lookup_symbol)
2958 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2959 lookup_name_info.
2960 * block.h (block_iter_match_first, block_iter_match_next)
2961 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2962 * c-lang.c (c_language_defn, cplus_language_defn)
2963 (asm_language_defn, minimal_language_defn): Adjust comments to
2964 refer to la_get_symbol_name_matcher.
2965 * completer.c (complete_files_symbols)
2966 (collect_explicit_location_matches, symbol_completer): Pass a
2967 symbol_name_match_type down.
2968 * completer.h (class completion_match, completion_match_result):
2969 New classes.
2970 (completion_tracker::reset_completion_match_result): New method.
2971 (completion_tracker::m_completion_match_result): New field.
2972 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2973 lookup_name_info.
2974 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2975 functions.
2976 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2977 * d-lang.c: Adjust comments to refer to
2978 la_get_symbol_name_matcher.
2979 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2980 Adjust to use lookup_name_info.
2981 (dict_iter_match_first, dict_iter_match_next)
2982 (iter_match_first_hashed, iter_match_next_hashed)
2983 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2984 with a lookup_name_info.
2985 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2986 Likewise.
2987 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2988 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2989 (gdb_index_symbol_name_matcher): New class.
2990 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2991 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2992 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2993 with a symbol_name_match_type.
2994 (f_language_defn): Adjust comments to refer to
2995 la_get_symbol_name_matcher.
2996 * go-lang.c (go_language_defn): Adjust comments to refer to
2997 la_get_symbol_name_matcher.
2998 * language.c (default_symbol_name_matcher)
2999 (language_get_symbol_name_matcher): New functions.
3000 (unknown_language_defn, auto_language_defn): Adjust comments to
3001 refer to la_get_symbol_name_matcher.
3002 * language.h (symbol_name_cmp_ftype): Delete.
3003 (language_defn) <la_collect_symbol_completion_matches>: Add match
3004 type parameter.
3005 <la_get_symbol_name_cmp>: Delete field.
3006 <la_get_symbol_name_matcher>: New field.
3007 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
3008 (default_symbol_name_matcher, language_get_symbol_name_matcher):
3009 Declare.
3010 * linespec.c (iterate_over_all_matching_symtabs)
3011 (iterate_over_file_blocks): Adjust to use lookup_name_info.
3012 (find_methods): Add language parameter, and use lookup_name_info
3013 and the language's symbol_name_matcher_ftype.
3014 (linespec_complete_function): Adjust.
3015 (lookup_prefix_sym): Use lookup_name_info.
3016 (add_all_symbol_names_from_pspace): Adjust.
3017 (find_superclass_methods): Add language parameter and pass it
3018 down.
3019 (find_method): Pass symbol language down.
3020 (find_linespec_symbols): Don't demangle or Ada encode here.
3021 (search_minsyms_for_name): Add lookup_name_info parameter.
3022 (add_matching_symbols_to_info): Add name_match_type parameter.
3023 Use lookup_name_info.
3024 * m2-lang.c (m2_language_defn): Adjust comments to refer to
3025 la_get_symbol_name_matcher.
3026 * minsyms.c: Include <algorithm>.
3027 (add_minsym_to_demangled_hash_table): Remove table parameter and
3028 add objfile parameter. Use search_name_hash, and add language to
3029 demangled languages vector.
3030 (struct found_minimal_symbols): New struct.
3031 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
3032 New functions.
3033 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
3034 input names here. Use lookup_name_info instead. Lookup up
3035 demangled names once for each language in the demangled names
3036 vector.
3037 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
3038 demangled names once for each language in the demangled names
3039 vector.
3040 (build_minimal_symbol_hash_tables): Adjust.
3041 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
3042 lookup_name_info.
3043 * objc-lang.c (objc_language_defn): Adjust comment to refer to
3044 la_get_symbol_name_matcher.
3045 * objfiles.h: Include <vector>.
3046 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
3047 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
3048 la_get_symbol_name_matcher.
3049 * p-lang.c (pascal_language_defn): Adjust comment to refer to
3050 la_get_symbol_name_matcher.
3051 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
3052 (match_partial_symbol): Use symbol_name_match_type,
3053 lookup_name_info and psymbol_name_matches.
3054 (lookup_partial_symbol): Use lookup_name_info.
3055 (map_block): Use symbol_name_match_type and lookup_name_info.
3056 (psym_map_matching_symbols): Use symbol_name_match_type.
3057 (psymbol_name_matches): New.
3058 (recursively_search_psymtabs): Use lookup_name_info and
3059 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
3060 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
3061 'kind' parameter to 'domain'.
3062 * rust-lang.c (rust_language_defn): Adjust comment to refer to
3063 la_get_symbol_name_matcher.
3064 * symfile-debug.c (debug_qf_map_matching_symbols)
3065 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
3066 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
3067 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
3068 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
3069 Adjust to use symbol_name_match_type.
3070 <expand_symtabs_matching>: Adjust to use lookup_name_info.
3071 (expand_symtabs_matching): Adjust to use lookup_name_info.
3072 * symmisc.c (maintenance_expand_symtabs): Use
3073 lookup_name_info::match_any ().
3074 * symtab.c (symbol_matches_search_name): New.
3075 (eq_symbol_entry): Adjust to use lookup_name_info and the
3076 language's matcher.
3077 (demangle_for_lookup_info::demangle_for_lookup_info): New.
3078 (lookup_name_info::match_any): New.
3079 (iterate_over_symbols, search_symbols): Use lookup_name_info.
3080 (compare_symbol_name): Add language, lookup_name_info and
3081 completion_match_result parameters, and use them.
3082 (completion_list_add_name): Make extern. Add language and
3083 lookup_name_info parameters. Use them.
3084 (completion_list_add_symbol, completion_list_add_msymbol)
3085 (completion_list_objc_symbol): Add lookup_name_info parameters and
3086 adjust. Pass down language.
3087 (completion_list_add_fields): Add lookup_name_info parameters and
3088 adjust. Pass down language.
3089 (add_symtab_completions): Add lookup_name_info parameters and
3090 adjust.
3091 (default_collect_symbol_completion_matches_break_on): Add
3092 name_match_type parameter, and use it. Use lookup_name_info.
3093 (default_collect_symbol_completion_matches)
3094 (collect_symbol_completion_matches): Add name_match_type
3095 parameter, and pass it down.
3096 (collect_symbol_completion_matches_type): Adjust.
3097 (collect_file_symbol_completion_matches): Add name_match_type
3098 parameter, and use lookup_name_info.
3099 * symtab.h: Include <string> and "common/gdb_optional.h".
3100 (enum class symbol_name_match_type): New.
3101 (class ada_lookup_name_info): New.
3102 (struct demangle_for_lookup_info): New.
3103 (class lookup_name_info): New.
3104 (symbol_name_matcher_ftype): New.
3105 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
3106 (symbol_matches_search_name): Declare.
3107 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
3108 (default_collect_symbol_completion_matches)
3109 (collect_symbol_completion_matches)
3110 (collect_file_symbol_completion_matches): Add name_match_type
3111 parameter.
3112 (iterate_over_symbols): Use lookup_name_info.
3113 (completion_list_add_name): Declare.
3114 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
3115 (strncmp_iw_with_mode): Now extern.
3116 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
3117 (strncmp_iw_with_mode): Declare.
3118
3119 2017-11-08 Keith Seitz <keiths@redhat.com>
3120 Pedro Alves <palves@redhat.com>
3121
3122 * ada-lang.c (ada_language_defn): Install
3123 default_search_name_hash.
3124 * buildsym.c (struct buildsym_compunit): <language>: New field.
3125 (finish_block_internal): Pass language when creating dictionaries.
3126 (start_buildsym_compunit, start_symtab): New language parameters.
3127 Use them.
3128 (restart_symtab): Pass down compilation unit's language.
3129 * buildsym.h (enum language): Forward declare.
3130 (start_symtab): New 'language' parameter.
3131 * c-lang.c (c_language_defn, cplus_language_defn)
3132 (asm_language_defn, minimal_language_defn): Install
3133 default_search_name_hash.
3134 * coffread.c (coff_start_symtab): Adjust.
3135 * d-lang.c (d_language_defn): Install default_search_name_hash.
3136 * dbxread.c (struct symloc): Add 'pst_language' field.
3137 (PST_LANGUAGE): Define.
3138 (start_psymtab, read_ofile_symtab): Use it.
3139 (process_one_symbol): New 'language' parameter. Pass it down.
3140 * dictionary.c (struct dictionary) <language>: New field.
3141 (DICT_LANGUAGE): Define.
3142 (dict_create_hashed, dict_create_hashed_expandable)
3143 (dict_create_linear, dict_create_linear_expandable): New parameter
3144 'language'. Set the dictionary's language.
3145 (iter_match_first_hashed): Adjust to rename.
3146 (insert_symbol_hashed): Assert we don't see mismatching
3147 languages. Adjust to rename.
3148 (dict_hash): Rename to ...
3149 (default_search_name_hash): ... this and make extern.
3150 * dictionary.h (struct language_defn): Forward declare.
3151 (dict_create_hashed): New parameter 'language'.
3152 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
3153 * f-lang.c (f_language_defn): Install default_search_name_hash.
3154 * go-lang.c (go_language_defn): Install default_search_name_hash.
3155 * jit.c (finalize_symtab): Pass compunit's language to dictionary
3156 creation.
3157 * language.c (unknown_language_defn, auto_language_defn):
3158 * language.h (language_defn::la_search_name_hash): New field.
3159 (default_search_name_hash): Declare.
3160 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
3161 * mdebugread.c (new_block): New parameter 'language'.
3162 * mdebugread.c (parse_symbol): Pass symbol language to block
3163 allocation.
3164 (psymtab_to_symtab_1): Pass down language.
3165 (new_symtab): Pass compunit's language to block allocation.
3166 * objc-lang.c (objc_language_defn): Install
3167 default_search_name_hash.
3168 * opencl-lang.c (opencl_language_defn):
3169 * p-lang.c (pascal_language_defn): Install
3170 default_search_name_hash.
3171 * rust-lang.c (rust_language_defn): Install
3172 default_search_name_hash.
3173 * stabsread.h (enum language): Forward declare.
3174 (process_one_symbol): Add 'language' parameter.
3175 * symtab.c (search_name_hash): New function.
3176 * symtab.h (search_name_hash): Declare.
3177 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
3178
3179 2017-11-08 Pedro Alves <palves@redhat.com>
3180
3181 * cp-name-parser.y (main): Don't initialize extra_chars.
3182
3183 2017-11-07 Tom Tromey <tom@tromey.com>
3184
3185 * event-top.h (command_handler): Constify.
3186 * record-full.c (cmd_record_full_start): Update.
3187 * thread.c (thread_apply_all_command): Update.
3188 * printcmd.c (eval_command): Update.
3189 * mi/mi-main.c (mi_execute_cli_command): Update.
3190 (mi_execute_async_cli_command): Update.
3191 * tui/tui-stack.c (tui_update_command): Update.
3192 * cli/cli-interp.c (safe_execute_command): Constify.
3193 * record.c (record_start): Update.
3194 (record_start, record_stop, cmd_record_start): Update.
3195 * record-btrace.c (cmd_record_btrace_bts_start): Update.
3196 (cmd_record_btrace_pt_start): Update.
3197 (cmd_record_btrace_start): Update.
3198 (cmd_record_btrace_start): Update.
3199 * reverse.c (exec_reverse_once): Update.
3200 * python/python.c (execute_gdb_command): Don't copy the command.
3201 * event-top.c (command_line_handler): Update.
3202 (command_handler): Constify.
3203 * defs.h (deprecated_call_command_hook): Constify.
3204 * cli/cli-script.h (execute_user_command): Constify.
3205 * cli/cli-script.c (execute_user_command): Constify.
3206 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
3207 (enum command_control_type): Update.
3208 * main.c (catch_command_errors): Remove non-const overload.
3209 (catch_command_errors_ftype): Remove.
3210 * python/py-cmd.c (cmdpy_function): Constify.
3211 * guile/scm-cmd.c (cmdscm_function): Constify.
3212 * cli/cli-dump.c (call_dump_func): Constify.
3213 * cli/cli-decode.c (do_const_cfunc): Constify.
3214 (do_sfunc): Constify.
3215 (cmd_func): Constify.
3216 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
3217 * top.h (execute_command): Constify.
3218 * top.c (execute_command): Constify.
3219 (execute_command_to_string): Constify.
3220 (deprecated_call_command_hook): Constify.
3221 * command.h (cmd_func): Constify.
3222 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
3223
3224 2017-11-07 Tom Tromey <tom@tromey.com>
3225
3226 * ada-lang.c (catch_ada_exception_command): Constify.
3227 (catch_assert_command): Constify.
3228 * break-catch-throw.c (catch_catch_command, catch_throw_command)
3229 (catch_rethrow_command): Constify.
3230 (catch_exception_command_1): Constify.
3231 * breakpoint.h (add_catch_command): Constify.
3232 * break-catch-syscall.c (catch_syscall_command_1): Constify.
3233 (catch_syscall_split_args): Constify.
3234 * break-catch-sig.c (catch_signal_command): Constify.
3235 (catch_signal_split_args): Constify.
3236 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3237 cmd_const_sfunc_ftype.
3238 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3239 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3240 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3241 (add_setshow_string_cmd, struct cmd_list_element)
3242 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3243 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3244 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3245 Constify.
3246 (set_cmd_sfunc): Constify.
3247 (empty_sfunc): Constify.
3248 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3249 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3250 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3251 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3252 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3253 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3254 Constify.
3255 (set_cmd_sfunc): Constify.
3256 (cmd_sfunc_ftype): Remove.
3257 * compile/compile.c (set_compile_args): Constify.
3258 * infrun.c (set_disable_randomization): Constify.
3259 * infcmd.c (set_args_command, set_cwd_command): Constify.
3260 * breakpoint.c (set_condition_evaluation_mode): Constify.
3261 (add_catch_command): Constify.
3262 (catch_fork_command_1, catch_exec_command_1)
3263 (catch_load_command_1, catch_unload_command_1): Constify.
3264 (catch_load_or_unload): Constify.
3265 * guile/scm-param.c (pascm_set_func): Constify.
3266 (add_setshow_generic): Constify.
3267 * python/py-param.c (get_set_value): Constify.
3268 * top.h (set_verbose): Constify.
3269 * tui/tui-win.c (tui_set_var_cmd): Constify.
3270 * mi/mi-main.c (set_mi_async_command): Constify.
3271 * cli/cli-logging.c (set_logging_overwrite)
3272 (set_logging_redirect): Constify.
3273 * value.c (set_max_value_size): Constify.
3274 * valprint.c (set_input_radix, set_output_radix): Constify.
3275 * utils.c (set_width_command, set_height_command): Constify.
3276 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3277 * tracepoint.c (set_disconnected_tracing)
3278 (set_circular_trace_buffer, set_trace_buffer_size)
3279 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3280 * top.c (set_history_size_command, set_verbose, set_editing)
3281 (set_gdb_datadir, set_history_filename): Constify.
3282 * target.c (set_targetdebug, maint_set_target_async_command)
3283 (maint_set_target_non_stop_command, set_target_permissions)
3284 (set_write_memory_permission): Constify.
3285 (open_target): Constify.
3286 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3287 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3288 * symtab.c (set_symbol_cache_size_handler): Constify.
3289 * symfile.c (set_ext_lang_command): Constify.
3290 * symfile-debug.c (set_debug_symfile): Constify.
3291 * source.c (set_directories_command): Constify.
3292 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3293 * serial.c (set_parity): Constify.
3294 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3295 * remote.c (set_remote_exec_file, set_remotebreak)
3296 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3297 * record.c (set_record_insn_history_size)
3298 (set_record_call_history_size): Constify.
3299 * record-full.c (set_record_full_insn_max_num): Constify.
3300 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3301 * osabi.c (set_osabi): Constify.
3302 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3303 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3304 * maint.c (maintenance_set_profile_cmd): Constify.
3305 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3306 * language.c (set_language_command, set_range_command)
3307 (set_case_command): Constify.
3308 * infrun.c (set_non_stop, set_observer_mode)
3309 (set_stop_on_solib_events, set_schedlock_func)
3310 (set_exec_direction_func): Constify.
3311 * infcmd.c (set_inferior_tty_command): Constify.
3312 * disasm.c (set_disassembler_options_sfunc): Constify.
3313 * demangle.c (set_demangling_command): Constify.
3314 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3315 * cris-tdep.c (set_cris_version, set_cris_mode)
3316 (set_cris_dwarf2_cfi): Constify.
3317 * corefile.c (set_gnutarget_command): Constify.
3318 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3319 (set_target_wide_charset_sfunc): Constify.
3320 * breakpoint.c (update_dprintf_commands): Constify.
3321 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3322 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3323 (set_disassembly_style_sfunc): Constify.
3324 * arch-utils.c (set_endian, set_architecture): Constify.
3325 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3326 * agent.c (set_can_use_agent): Constify.
3327
3328 2017-11-07 Tom Tromey <tom@tromey.com>
3329
3330 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3331 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3332 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3333 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3334 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3335 (parse_int_arg, show_thread_default_detach_sc_cmd)
3336 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3337 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3338 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3339 (show_task_pause_cmd, set_task_detach_sc_cmd)
3340 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3341 (set_noninvasive_cmd, set_thread_pause_cmd)
3342 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3343 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3344 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3345 * windows-nat.c (display_selectors): Constify.
3346 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3347 non-const "cfunc".
3348 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3349 (cmd_cfunc_eq): Likewise.
3350 (struct cmd_list_element): Likewise.
3351 (do_cfunc): Remove.
3352 (cli_user_command_p): Update.
3353 * command.h (add_cmd): Remove non-const overload.
3354 (cmd_cfunc_ftype): Remove typedef.
3355 (cmd_cfunc_eq): Remove non-const overload.
3356 * value.c (show_values): Constify.
3357 * thread.c (thread_apply_all_command): Constify.
3358 * symfile.c (load_command): Constify.
3359 * source.c (directory_command): Constify.
3360 * maint.c (maintenance_internal_error)
3361 (maintenance_demangler_warning, maintenance_space_display)
3362 (maintenance_print_architecture, maintenance_translate_address)
3363 (maintenance_info_selftests, maintenance_internal_warning):
3364 Constify.
3365 * breakpoint.c (disable_trace_command, enable_trace_command):
3366 Constify.
3367 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3368 Constify.
3369 (add_auto_load_safe_path): Constify.
3370 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3371 * top.h (show_commands): Constify.
3372 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3373 * sparc64-tdep.c (adi_examine_command): Constify.
3374 (adi_assign_command): Constify.
3375
3376 2017-11-07 Tom Tromey <tom@tromey.com>
3377
3378 * frame.h (info_locals_command, info_args_command): Constify.
3379 * auto-load.h (auto_load_info_scripts): Constify.
3380 * inferior.h (registers_info): Constify.
3381 * copying.c: Rebuild.
3382 * copying.awk: Constify generated commands.
3383 * auto-load.c (auto_load_info_scripts)
3384 (info_auto_load_gdb_scripts): Constify.
3385 * cli/cli-decode.c (struct cmd_list_element): Take a
3386 cmd_const_cfunc_ftype.
3387 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3388 * tui/tui-win.c (tui_all_windows_info): Constify.
3389 * python/py-auto-load.c (info_auto_load_python_scripts):
3390 Constify.
3391 * cli/cli-cmds.c (show_command): Remove non-const overload.
3392 * tracepoint.c (info_tvariables_command, info_scope_command):
3393 Constify.
3394 (info_static_tracepoint_markers_command): Constify.
3395 * thread.c (info_threads_command): Constify.
3396 (print_thread_info_1): Constify.
3397 * target.c (info_target_command): Constify.
3398 * symtab.c (info_sources_command, info_functions_command)
3399 (info_types_command): Constify.
3400 (info_variables_command): Remove non-const overload.
3401 * symfile.c (info_ext_lang_command): Constify.
3402 * stack.c (info_frame_command, info_locals_command)
3403 (info_args_command): Constify.
3404 (backtrace_command): Remove non-const overload.
3405 * source.c (info_source_command, info_line_command): Constify.
3406 * solib.c (info_sharedlibrary_command): Constify.
3407 * skip.c (info_skip_command): Constify.
3408 * ser-go32.c (info_serial_command): Constify.
3409 * reverse.c (info_bookmarks_command): Constify.
3410 * printcmd.c (info_symbol_command, info_address_command)
3411 (info_display_command): Constify.
3412 * osdata.c (info_osdata_command): Constify.
3413 * objc-lang.c (info_selectors_command, info_classes_command):
3414 Constify.
3415 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3416 * memattr.c (info_mem_command): Constify.
3417 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3418 * linux-fork.c (info_checkpoints_command): Constify.
3419 * infrun.c (info_signals_command): Constify.
3420 * inflow.c (info_terminal_command): Constify.
3421 * inferior.c (info_inferiors_command): Constify.
3422 (print_inferior): Constify.
3423 * infcmd.c (info_program_command, info_all_registers_command)
3424 (info_registers_command, info_vector_command)
3425 (info_float_command): Constify.
3426 (registers_info): Constify.
3427 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3428 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3429 Constify.
3430 * f-valprint.c (info_common_command): Constify.
3431 * dcache.c (info_dcache_command): Constify.
3432 (dcache_info_1): Constify.
3433 * darwin-nat-info.c (info_mach_tasks_command)
3434 (info_mach_task_command, info_mach_ports_command)
3435 (info_mach_port_command, info_mach_threads_command)
3436 (info_mach_thread_command, info_mach_regions_command)
3437 (info_mach_regions_recurse_command, info_mach_region_command)
3438 (info_mach_exceptions_command): Constify.
3439 (get_task_from_args): Constify.
3440 * cp-support.c (info_vtbl_command): Constify.
3441 * breakpoint.c (info_watchpoints_command)
3442 (info_tracepoints_command): Constify.
3443 (info_breakpoints_command): Remove non-const overload.
3444 * avr-tdep.c (avr_io_reg_read_command): Constify.
3445 * auxv.c (info_auxv_command): Constify.
3446 * ada-tasks.c (info_tasks_command): Constify.
3447 (info_task): Constify.
3448 * ada-lang.c (info_exceptions_command): Constify.
3449
3450 2017-11-07 Tom Tromey <tom@tromey.com>
3451
3452 * solib.h (no_shared_libraries): Constify.
3453 * frame.h (return_command): Constify.
3454 * cli/cli-cmds.h (quit_command): Constify.
3455 * top.h (quit_command, execute_command): Constify.
3456 * target.h (flash_erase_command): Constify.
3457 * inferior.h (set_inferior_args, attach_command): Constify.
3458 * tracepoint.h (start_tracing, stop_tracing): Constify.
3459 * breakpoint.h (break_command, tbreak_command)
3460 (hbreak_command_wrapper, thbreak_command_wrapper)
3461 (rbreak_command_wrapper, watch_command_wrapper)
3462 (awatch_command_wrapper, rwatch_command_wrapper)
3463 (get_tracepoint_by_number): Constify.
3464 * symtab.c (info_variables_command, rbreak_command)
3465 (symtab_symbol_info): Constify.
3466 (info_variables_command): Add non-const overload.
3467 * top.c (dont_repeat_command): Constify.
3468 * breakpoint.c (ignore_command, commands_command)
3469 (condition_command, tbreak_command, hbreak_command)
3470 (thbreak_command, clear_command, break_command)
3471 (info_breakpoints_command, watch_command, rwatch_command)
3472 (awatch_command, trace_command, ftrace_command, strace_command)
3473 (trace_pass_command, break_range_command, dprintf_command)
3474 (agent_printf_command, get_tracepoint_by_number)
3475 (watch_maybe_just_location, trace_pass_command): Constify.
3476 (info_breakpoints_command): Add non-const overload.
3477 * tracefile.c (tsave_command): Constify.
3478 * infcmd.c (attach_command, disconnect_command, signal_command)
3479 (queue_signal_command, stepi_command, nexti_command)
3480 (finish_command, next_command, step_command, until_command)
3481 (advance_command, jump_command, continue_command, run_command)
3482 (start_command, starti_command, interrupt_command)
3483 (run_command_1, set_inferior_args, step_1): Constify.
3484 * inferior.c (add_inferior_command, remove_inferior_command)
3485 (clone_inferior_command): Constify.
3486 * linux-fork.c (checkpoint_command, restart_command): Constify.
3487 * windows-nat.c (signal_event_command): Constify.
3488 * guile/guile.c (guile_repl_command, guile_command): Constify.
3489 * printcmd.c (x_command, display_command, printf_command)
3490 (output_command, set_command, call_command, print_command)
3491 (eval_command): Constify.
3492 (non_const_set_command): Remove.
3493 (_initialize_printcmd): Update.
3494 * source.c (forward_search_command, reverse_search_command):
3495 Constify.
3496 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3497 Constify.
3498 * infrun.c (handle_command): Constify.
3499 * memattr.c (mem_command): Constify.
3500 * stack.c (return_command, up_command, up_silently_command)
3501 (down_command, down_silently_command, frame_command)
3502 (backtrace_command, func_command, backtrace_command_1): Constify.
3503 (backtrace_command): Add non-const overload.
3504 * remote-sim.c (simulator_command): Constify.
3505 * exec.c (set_section_command): Constify.
3506 * tracepoint.c (tdump_command, trace_variable_command)
3507 (tstatus_command, tstop_command, tstart_command)
3508 (end_actions_pseudocommand, while_stepping_pseudocommand)
3509 (collect_pseudocommand, teval_pseudocommand, actions_command)
3510 (start_tracing, stop_tracing): Constify.
3511 * value.c (init_if_undefined_command): Constify.
3512 * tui/tui-stack.c (tui_update_command): Constify.
3513 * tui/tui-win.c (tui_refresh_all_command)
3514 (tui_set_tab_width_command, tui_set_win_height_command)
3515 (tui_set_focus_command, tui_scroll_forward_command)
3516 (tui_scroll_backward_command, tui_scroll_left_command)
3517 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3518 (tui_set_win_height): Constify.
3519 * tui/tui-layout.c (tui_layout_command): Constify.
3520 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3521 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3522 (proc_untrace_sysexit_cmd): Constify.
3523 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3524 (threadset_test_cmd, threadlist_update_test_cmd)
3525 (threadalive_test): Constify.
3526 * objc-lang.c (print_object_command): Constify.
3527 * command.h (add_com): Constify.
3528 * cli/cli-dump.c (restore_command): Constify.
3529 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3530 (help_command, complete_command, shell_command, edit_command)
3531 (list_command, disassemble_command, make_command)
3532 (apropos_command, alias_command): Constify.
3533 * cli/cli-script.c (document_command, define_command)
3534 (while_command, if_command, validate_comname): Constify.
3535 * cli/cli-decode.c (struct cmd_list_element): Change type of
3536 "fun".
3537 * target.c (do_monitor_command, flash_erase_command): Constify.
3538 * regcache.c (reg_flush_command): Constify.
3539 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3540 (reverse_nexti, reverse_continue, reverse_finish)
3541 (save_bookmark_command, goto_bookmark_command)
3542 (exec_reverse_once): Constify.
3543 * python/python.c (python_interactive_command, python_command):
3544 Constify.
3545 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3546 Constify.
3547 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3548 * gcore.c (gcore_command): Constify.
3549
3550 2017-11-07 Tom Tromey <tom@tromey.com>
3551
3552 * printcmd.c (x_command): Call set_repeat_arguments.
3553 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3554 * top.c (repeat_arguments): New global.
3555 (set_repeat_arguments): New function.
3556 (execute_command): Handle repeat_arguments.
3557 (show_commands): Calls set_repeat_arguments.
3558 * command.h (set_repeat_arguments): Declare.
3559
3560 2017-11-07 Tom Tromey <tom@tromey.com>
3561
3562 * stack.c (backtrace_command): Use std::string.
3563 (backtrace_command_1): Make "count_exp" const.
3564
3565 2017-11-07 Tom Tromey <tom@tromey.com>
3566
3567 * source.c (directory_switch, mod_path, add_path): Constify.
3568 * defs.h (add_path, mod_path, directory_switch): Constify.
3569 * mi/mi-cmd-env.c (env_mod_path): Constify.
3570
3571 2017-11-07 Tom Tromey <tom@tromey.com>
3572
3573 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3574 (run_command_1, continue_command, step_1, jump_command)
3575 (signal_command, until_command, advance_command, finish_command)
3576 (attach_command): Update.
3577
3578 2017-11-07 Tom Tromey <tom@tromey.com>
3579
3580 * command.h (set_cmd_cfunc): Don't declare.
3581 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3582
3583 2017-11-07 Tom Tromey <tom@tromey.com>
3584
3585 * stack.c (select_frame_command): Constify.
3586 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3587 * command.h (add_com_suppress_notification): Constify.
3588
3589 2017-11-07 Tom Tromey <tom@tromey.com>
3590
3591 * breakpoint.c (stop_command): Constify.
3592 * cli/cli-decode.c (struct cmd_list_element): Constify.
3593 * command.h (add_abbrev_prefix_cmd): Constify.
3594
3595 2017-11-07 Pedro Alves <palves@redhat.com>
3596
3597 * breakpoint.c (extract_bp_kind): New enum.
3598 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3599 factored out from ...
3600 (extract_bp_number_and_location): ... here.
3601 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3602
3603 2017-11-07 Pedro Alves <palves@redhat.com>
3604
3605 * breakpoint.c (extract_bp_number_and_location): Change return
3606 type to void. Throw error instead of warning.
3607 (enable_disable_command): Adjust.
3608
3609 2017-11-07 Xavier Roirand <roirand@adacore.com>
3610 Pedro Alves <palves@redhat.com>
3611
3612 * breakpoint.c (map_breakpoint_number_range): New, factored out
3613 from ...
3614 (map_breakpoint_numbers): ... here.
3615 (find_location_by_number): Change parameters from string to
3616 breakpoint number and location.
3617 (extract_bp_number_and_location): New function.
3618 (enable_disable_bp_num_loc)
3619 (enable_disable_breakpoint_location_range)
3620 (enable_disable_command): New functions, factored out ...
3621 (enable_command, disable_command): ... these functions, and
3622 adjusted to support ranges.
3623 * NEWS: Document enable/disable breakpoint location range feature.
3624
3625 2017-11-06 Luis Machado <luis.machado@linaro.org>
3626
3627 * MAINTAINERS (Write After Approval): Update my e-mail address.
3628
3629 2017-11-06 Pedro Alves <palves@redhat.com>
3630
3631 * gnu-nat.c (gnu_terminal_init): Delete.
3632 (gnu_target): Don't install gnu_terminal_init.
3633 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3634 (child_terminal_init): ... this function.
3635
3636 2017-11-06 Pedro Alves <palves@redhat.com>
3637
3638 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3639 sgtty.h.
3640 * config.in, configure: Regenerate.
3641
3642 2017-11-06 Pedro Alves <palves@redhat.com>
3643
3644 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3645 (async_init_signals): Adjust.
3646 (handle_stop_sig): Rename to ...
3647 (handle_sigtstp): ... this.
3648 (async_stop_sig): Rename to ...
3649 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3650 SIGTSTP path.
3651 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3652 instead of STOP_SIGNAL thoughout.
3653 (handle_stop_sig): Rename to ...
3654 (handle_sigtstp): ... this.
3655 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3656
3657 2017-11-06 Pedro Alves <palves@redhat.com>
3658
3659 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3660 longer set flags twice in row.
3661
3662 2017-11-06 Pedro Alves <palves@redhat.com>
3663
3664 * Makefile.in (SER_HARDWIRE): Update comment.
3665 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3666 * common/gdb_termios.h: Delete file.
3667 * common/job-control.c: Include termios.h and unistd.h instead of
3668 gdb_termios.h.
3669 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3670 check.
3671 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3672 Remove sgtty code.
3673 * configure.ac: No longer check for termio.h and sgtty.h.
3674 * configure: Regenerate.
3675 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3676 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3677 Replace PROCESS_GROUP_TYPE references with pid_t references
3678 throughout.
3679 (gdb_getpgrp): Delete.
3680 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3681 (child_terminal_inferior): Remove comment. Remove sgtty code.
3682 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3683 gdb_getpgrp. Use serial_set_tty_state instead aof
3684 serial_noflush_set_tty_state. Remove sgtty code.
3685 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3686 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3687 (inferior_process_group): Now returns pid_t.
3688 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3689 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3690 * ser-event.c (serial_event_ops): Update.
3691 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3692 (dos_ops): Update.
3693 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3694 * ser-pipe.c (pipe_ops): Update.
3695 * ser-tcp.c (tcp_ops): Update.
3696 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3697 HAVE_TERMIOS checks.
3698 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3699 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3700 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3701 assume termios.
3702 (hardwire_noflush_set_tty_state): Delete.
3703 (hardwire_print_tty_state, hardwire_drain_output)
3704 (hardwire_flush_output, hardwire_flush_input)
3705 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3706 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3707 code, and assume termios.
3708 (hardwire_ops): Update.
3709 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3710 * serial.c (serial_noflush_set_tty_state): Delete.
3711 * serial.h (serial_noflush_set_tty_state): Delete.
3712 (serial_ops::noflush_set_tty_state): Delete.
3713
3714 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3715
3716 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3717 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3718 (COMMON_OBS): Remove doublest.o and dfp.o.
3719 Do not build target-float.c (instead of doublest.c)
3720 with -Wformat-nonliteral.
3721
3722 * doublest.c: Remove file.
3723 * doublest.h: Remove file.
3724 * dfp.c: Remove file.
3725 * dfp.h: Remove file.
3726
3727 * target-float.c: Do not include "doublest.h" and "dfp.h".
3728 (DOUBLEST): Move here from doublest.h.
3729 (enum float_kind): Likewise.
3730 (FLOATFORMAT_CHAR_BIT): Likewise.
3731 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3732 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3733 (floatformat_precision): Likewise.
3734 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3735 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3736 Likewise.
3737 (host_float_format, host_double_format, host_long_double_format):
3738 Likewise.
3739 (floatformat_to_string, floatformat_from_string): Likewise.
3740 (floatformat_to_doublest): Likewise. Also, inline the original
3741 convert_floatformat_to_doublest.
3742 (floatformat_from_doublest): Likewise. Also, inline the original
3743 convert_floatformat_from_doublest.
3744
3745 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3746 (MAX_DECIMAL_STRING): Move here from dfp.c.
3747 (match_endianness): Likewise.
3748 (set_decnumber_context, decimal_check_errors): Likewise.
3749 (decimal_from_number, decimal_to_number): Likewise.
3750 (decimal_to_string, decimal_from_string): Likewise. Make static.
3751 (decimal_from_longest, decimal_from_ulongest): Likewise.
3752 (decimal_to_longest): Likewise.
3753 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3754 (decimal_convert): Likewise.
3755
3756 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3757
3758 * doublest.c: Do not include "gdbtypes.h".
3759 (extract_typed_floating): Remove.
3760 (store_typed_floating): Remove.
3761 (convert_typed_floating): Remove.
3762 * doublest.h (struct type): Remove.
3763 (DOUBLEST_PRINT_FORMAT): Remove.
3764 (DOUBLEST_SCAN_FORMAT): Remove.
3765 (extract_typed_floating): Remove.
3766 (store_typed_floating): Remove.
3767 (convert_typed_floating): Remove.
3768
3769 * dfp.c (decimal_from_doublest): Remove.
3770 (decimal_to_doublest): Remove.
3771 * dfp.h: Do not include "doublest.h".
3772 (decimal_from_doublest): Remove.
3773 (decimal_to_doublest): Remove.
3774
3775 * value.c: Do not include "doublest.h" and "dfp.h".
3776 (value_as_double): Remove.
3777 (unpack_double): Remove.
3778 (value_from_double): Remove.
3779 (value_from_decfloat): Remove.
3780 * value.h: Do not include "doublest.h".
3781 (value_as_double): Remove.
3782 (unpack_double): Remove.
3783 (value_from_double): Remove.
3784 (value_from_decfloat): Remove.
3785
3786 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3787
3788 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3789 (i386_extract_return_value): Use target_float_convert.
3790 (i386_store_return_value): Likewise.
3791 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3792 (i387_value_to_register): Likewise.
3793 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3794 (ia64_register_to_value): Use target_float_convert.
3795 (ia64_value_to_register): Likewise.
3796 (ia64_extract_return_value): Likewise.
3797 (ia64_store_return_value): Likewise.
3798 (ia64_push_dummy_call): Likewise.
3799 * m68k-tdep.c: Include "target-float.h".
3800 (m68k_register_to_value): Use target_float_convert.
3801 (m68k_value_to_register): Likewise.
3802 (m68k_svr4_extract_return_value): Likewise.
3803 (m68k_svr4_store_return_value): Likewise.
3804 * ppc-sysv-tdep.c: Include "target-float.h".
3805 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3806 (do_ppc_sysv_return_value): Likewise.
3807 (ppc64_sysv_abi_push_freg): Likewise.
3808 (ppc64_sysv_abi_return_value_base): Likewise.
3809 * rs6000-aix-tdep.c: Include "target-float.h".
3810 (rs6000_push_dummy_call): Use target_float_convert.
3811 (rs6000_return_value): Likewise.
3812 * rs6000-lynx178-tdep.c: Include "target-float.h".
3813 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3814 (rs6000_lynx178_return_value): Likewise.
3815 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3816 (rs6000_register_to_value): Use target_float_convert.
3817 (rs6000_value_to_register): Likewise.
3818 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3819 (arm_extract_return_value): Use target_float_convert.
3820 (arm_store_return_value): Likewise.
3821 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3822 (sh_register_convert_to_virtual): Use target_float_convert.
3823 (sh_register_convert_to_raw): Likewise.
3824 * sh64-tdep.c: Include "target-float.h".
3825 (sh64_extract_return_value): Use target_float_convert.
3826 (sh64_register_convert_to_virtual): Likewise.
3827 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3828
3829 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3830
3831 * target-float.c (floatformat_to_host_double): New function.
3832 (floatformat_from_host_double): Likewise.
3833 (target_float_to_host_double): Likewise.
3834 (target_float_from_host_double): Likewise.
3835 * target-float.h (target_float_to_host_double): Add prototype.
3836 (target_float_from_host_double): Likewise.
3837
3838 * guile/scm-value.c: Include "target-float.h".
3839 (gdbscm_value_to_real): Use target_float_to_host_double.
3840 Handle integer source values via value_as_long.
3841 * guile/scm-math.c: Include "target-float.h". Do not include
3842 "doublest.h", "dfp.h", and "expression.h".
3843 (vlscm_convert_typed_number): Use target_float_from_host_double.
3844 (vlscm_convert_number): Likewise.
3845
3846 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3847 (convert_value_from_python): Use target_float_from_host_double.
3848
3849 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3850
3851 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3852 (cast_from_fixed): Likewise.
3853 (ada_scaling_type): New function.
3854 (ada_delta): Return value instead of DOUBLEST. Perform target
3855 arithmetic instead of host arithmetic.
3856 (scaling_factor): Rename to ...
3857 (ada_scaling_factor) ... this. Make non-static. Return value instead
3858 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3859 (ada_fixed_to_float): Remove.
3860 (ada_float_to_fixed): Remove.
3861 * ada-lang.h (ada_fixed_to_float): Remove.
3862 (ada_float_to_fixed): Remove.
3863 (ada_delta): Return value instead of DOUBLEST.
3864 (ada_scaling_factor): Add prototype.
3865
3866 * ada-typeprint.c: Include "target-float.h".
3867 (print_fixed_point_type): Perform target arithmetic instead of
3868 host arithmetic.
3869 * ada-valprint.c: Include "target-float.h".
3870 (ada_val_print_num): Perform target arithmetic instead of
3871 host arithmetic for fixed-point types.
3872
3873 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3874
3875 * target-float.c: Include <math.h>.
3876 (floatformat_binop): New function.
3877 (floatformat_compare): Likewise.
3878 (target_float_binop): Likewise.
3879 (target_float_compare): Likewise.
3880 * target-float.h: Include "expression.h".
3881 (target_float_binop): Add prototype.
3882 (target_float_compare): Likewise.
3883
3884 * valarith.c: Do not include "doublest.h" and "dfp.h".
3885 Include "common/byte-vector.h".
3886 (value_args_as_decimal): Remove, replace by ...
3887 (value_args_as_target_float): ... this function. Handle both
3888 binary and decimal target floating-point formats.
3889 (scalar_binop): Handle both binary and decimal FP using
3890 value_args_as_target_float and target_float_binop.
3891 (value_equal): Handle both binary and decimal FP using
3892 value_args_as_target_float and target_float_compare.
3893 (value_less): Likewise.
3894 (value_pos): Handle all scalar types as simple copy.
3895 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3896 * dfp.c (decimal_binop): Throw error instead of internal_error
3897 when called with an unsupported operation code.
3898
3899 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3900
3901 * target-float.c (target_float_to_string): New function.
3902 (target_float_from_string): New function.
3903 * target-float.h (target_float_to_string): Add prototype.
3904 (target_float_from_string): Add prototype.
3905
3906 * valprint.c: Include "target-float.h". Do not include
3907 "doublest.h" and "dfp.h".
3908 (print_floating): Use target_float_to_string.
3909 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3910 (printf_floating): Use target_float_to_string.
3911 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3912 (print_i387_value): Use target_float_to_string.
3913 * mips-tdep.c: Include "target-float.h".
3914 (mips_print_fp_register): Use target_float_to_string.
3915 * sh64-tdep.c: Include "target-float.h".
3916 (sh64_do_fp_register): Use target_float_to_string.
3917
3918 * parse.c: Include "target-float.h". Do not include
3919 "doublest.h" and "dfp.h".
3920 (parse_float): Use target_float_from_string.
3921 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3922 (define_symbol): Use target_float_from_string.
3923 * gdbarch-selftests.c: Include "target-float.h".
3924 (register_to_value_test): Use target_float_from_string.
3925
3926 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3927
3928 * Makefile.c (SFILES): Add target-float.c.
3929 (HFILES_NO_SRCDIR): Add target-float.h.
3930 (COMMON_OBS): Add target-float.o.
3931 * target-float.h: New file.
3932 * target-float.c: New file.
3933
3934 * doublest.c (floatformat_classify): Fix detection of float_zero.
3935
3936 * gdbtypes.c (is_floating_type): New function.
3937 * gdbtypes.h (is_floating_type): Add prototype.
3938
3939 * value.c: Do not include "floatformat.h".
3940 (unpack_double): Use target_float_is_valid.
3941 (is_floating_value): New function.
3942 * value.h (is_floating_value): Add prototype-
3943
3944 * valarith.c: Include "target-float.h".
3945 (value_logical_not): Use target_float_is_zero.
3946
3947 * python/py-value.c: Include "target-float.h".
3948 (valpy_nonzero): Use target_float_is_zero.
3949
3950 2017-11-04 Tom Tromey <tom@tromey.com>
3951
3952 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3953
3954 2017-11-04 Tom Tromey <tom@tromey.com>
3955
3956 * breakpoint.c (set_momentary_breakpoint): Return
3957 breakpoint_up.
3958 (until_break_command): Update.
3959 (new_until_break_fsm): Change argument types to
3960 breakpoint_up.
3961 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3962 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3963 Remove.
3964 * infcmd.c (finish_forward): Update.
3965 * breakpoint.h (set_momentary_breakpoint)
3966 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3967 (make_cleanup_delete_breakpoint): Remove.
3968 (struct breakpoint_deleter): New.
3969 (breakpoint_up): New typedef.
3970 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3971 (insert_exception_resume_breakpoint): Update.
3972 (insert_exception_resume_from_probe): Update.
3973 (insert_longjmp_resume_breakpoint): Update.
3974 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3975 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3976 * infcall.c (call_function_by_hand_dummy): Update
3977
3978 2017-11-04 Tom Tromey <tom@tromey.com>
3979
3980 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3981
3982 2017-11-04 Tom Tromey <tom@tromey.com>
3983
3984 * linux-tdep.c (linux_core_info_proc_mappings): Use
3985 gdb::def_vector.
3986 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3987 "size" argument.
3988 (linux_corefile_thread): Update.
3989 (linux_make_corefile_notes): Remove unused variable.
3990
3991 2017-11-04 Tom Tromey <tom@tromey.com>
3992
3993 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3994 gdb::byte_vector.
3995
3996 2017-11-04 Tom Tromey <tom@tromey.com>
3997
3998 * objfiles.c (do_free_objfile_cleanup): Remove.
3999 * compile/compile-object-load.c (compile_object_load): Update.
4000 * objfiles.h (make_cleanup_free_objfile): Remove.
4001
4002 2017-11-04 Tom Tromey <tom@tromey.com>
4003
4004 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
4005 (adi_read_versions): Change "tags" to "gdb_byte *".
4006 (adi_print_versions): Likewise.
4007
4008 2017-11-04 Tom Tromey <tom@tromey.com>
4009
4010 * breakpoint.c
4011 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
4012 from start_rbreak_breakpoints.
4013 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
4014 * breakpoint.h (class scoped_rbreak_breakpoints): New.
4015 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
4016 * symtab.c (do_end_rbreak_breakpoints): Remove.
4017 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
4018
4019 2017-11-04 Tom Tromey <tom@tromey.com>
4020
4021 * cp-namespace.c (reset_directive_searched): Remove.
4022 (cp_lookup_symbol_via_imports): Use scoped_restore.
4023 * cp-support.c (reset_directive_searched): Remove.
4024 (make_symbol_overload_list_using): Use scoped_restore.
4025 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
4026 (reset_directive_searched): Remove.
4027
4028 2017-11-04 Tom Tromey <tom@tromey.com>
4029
4030 * symfile.c (find_separate_debug_file_by_debuglink): Use
4031 unique_xmalloc_ptr.
4032
4033 2017-11-04 Tom Tromey <tom@tromey.com>
4034
4035 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4036 type of "info".
4037 (compute_stack_depth): Likewise.
4038 (do_compile_dwarf_expr_to_c): Use std::vector.
4039
4040 2017-11-04 Tom Tromey <tom@tromey.com>
4041
4042 * compile/compile-object-load.c (link_callbacks_einfo): Use
4043 std::string.
4044
4045 2017-11-04 Tom Tromey <tom@tromey.com>
4046
4047 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4048 Use scoped_free_pendings.
4049 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
4050 scoped_free_pendings.
4051 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
4052 (xcoff_initial_scan): Likewise.
4053 * buildsym.c (reset_symtab_globals): Update comment.
4054 (scoped_free_pendings): Rename from really_free_pendings.
4055 (prepare_for_building): Update comment.
4056 (buildsym_init): Likewise.
4057 * buildsym.h (class scoped_free_pendings): New class.
4058 (really_free_pendings): Don't declare.
4059
4060 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
4061
4062 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
4063 output when converting a zero value to a special byteorder format.
4064
4065 2017-11-02 Yao Qi <yao.qi@linaro.org>
4066
4067 * frame.c (do_frame_register_read): Remove aspace.
4068 * jit.c (jit_frame_sniffer): Likwise.
4069 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4070 * regcache.c (regcache::regcache): Pass nullptr.
4071 (regcache_print): Caller updated.
4072 * regcache.h (regcache::regcache): Remove one constructor
4073 parameter aspace.
4074
4075 2017-11-02 Yao Qi <yao.qi@linaro.org>
4076
4077 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
4078
4079 2017-11-02 Yao Qi <yao.qi@linaro.org>
4080
4081 * breakpoint.c (insert_single_step_breakpoints): Update.
4082 * frame.c (struct frame_info) <aspace>: Add const.
4083 (frame_save_as_regcache): Add const.
4084 (get_frame_address_space): Return const address_space *.
4085 * frame.h (get_frame_address_space): Update declaration.
4086 * infrun.c (struct step_over_info) <aspace>: Add const.
4087 (set_step_over_info): Make aspace const.
4088 (displaced_step_prepare_throw): Change variable const.
4089 (resume): Likewise.
4090 (proceed): Likewise.
4091 (adjust_pc_after_break): Likewise.
4092 (save_waitstatus): Likewise.
4093 (handle_signal_stop): Likewise.
4094 (keep_going_pass_signal): Likewise.
4095 * jit.c (jit_frame_sniffer): Add const.
4096 * mips-tdep.c (mips_single_step_through_delay): Likewise.
4097 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4098 * record-full.c (record_full_wait_1): Likewise.
4099 * regcache.c (regcache::regcache): Change parameter to const.
4100 * regcache.h (regcache::regcache): Likewise.
4101 (regcache::aspace): Return const address_space *.
4102 (regcache) <m_aspace>: Add const.
4103
4104 2017-11-02 Yao Qi <yao.qi@linaro.org>
4105
4106 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
4107 * frame.c (create_sentinel_frame): Likewise.
4108 * infrun.c (displaced_step_prepare_throw): Likewise.
4109 (resume): Likewise.
4110 (thread_still_needs_step_over_bp): Likewise.
4111 (proceed): Likewise.
4112 (do_target_wait): Likewise.
4113 (adjust_pc_after_break): Likewise.
4114 (handle_syscall_event): Likewise.
4115 (save_waitstatus): Likewise.
4116 (handle_inferior_event_1): Likewise.
4117 (handle_signal_stop): Likewise.
4118 (keep_going_pass_signal): Likewise.
4119 * linux-nat.c (status_callback): Likewise.
4120 (save_stop_reason): Likewise.
4121 (resume_stopped_resumed_lwps): Likewise.
4122 * record-full.c (record_full_exec_insn): Likewise.
4123 (record_full_wait_1): Likewise.
4124 * regcache.c (get_regcache_aspace): Remove.
4125 * regcache.h (get_regcache_aspace): Remove.
4126
4127 2017-11-02 Yao Qi <yao.qi@linaro.org>
4128
4129 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4130 (init_regcache_descr): Use gdbarch_num_regs.
4131 (regcache::regcache): Likewise.
4132 (regcache::get_register_status): Likewise.
4133 (regcache::assert_raw_regnum): Likewise.
4134 (regcache::cooked_read): Likewise.
4135 (regcache::cooked_read_value): Likewise.
4136 (regcache::cooked_write): Likewise.
4137 (regcache::dump): Likewise.
4138 (regcache::num_raw_registers): New method.
4139 * regcache.h (class regcache) <num_raw_registers>: New.
4140
4141 2017-11-02 Yao Qi <yao.qi@linaro.org>
4142
4143 * regcache.c (regcache::assert_regnum): New method.
4144 (regcache::invalidate): Call assert_regnum.
4145 (regcache::raw_update): Likewise.
4146 (regcache::raw_write): Likewise.
4147 (regcache::raw_read_part): Likewise.
4148 (regcache::raw_write_part): Likewise.
4149 (regcache::raw_supply): Likewise.
4150 (regcache::raw_supply_integer): Likewise.
4151 (regcache::raw_supply_zeroed): Likewise.
4152 (regcache::raw_collect): Likewise.
4153 (regcache::raw_collect_integer): Likewise.
4154 * regcache.h (regcache::assert_regnum): Declare.
4155
4156 2017-11-02 Yao Qi <yao.qi@linaro.org>
4157
4158 * regcache.c (regcache::dump): Remove code.
4159
4160 2017-11-02 Yao Qi <yao.qi@linaro.org>
4161
4162 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
4163 Remove.
4164 <sizeof_cooked_register_status>: Remove.
4165 (init_regcache_descr): Update.
4166 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
4167 (regcache::save): Likewise.
4168 (regcache::dump): Likewise.
4169
4170 2017-11-01 James Bowman <james.bowman@ftdichip.com>
4171
4172 * ft32-tdep.c (ft32_fetch_instruction): New function.
4173 (ft32_analyze_prologue): Use ft32_fetch_instruction().
4174
4175 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
4176
4177 * cli/cli-script.c (execute_control_command): Rename to ...
4178 (execute_control_command_1): ... this.
4179 (execute_control_command): New function.
4180
4181 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
4182
4183 * tracepoint.c (tfind_command): Remove const_cast.
4184
4185 2017-10-30 Mike Gulick <mgulick@mathworks.com>
4186
4187 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
4188
4189 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
4190
4191 * common/common-utils.h (in_inclusive_range): New function.
4192 * arm-tdep.c (arm_record_extension_space): Use
4193 in_inclusive_range.
4194 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
4195 * cris-tdep.c (cris_spec_reg_applicable): Use
4196 in_inclusive_range.
4197
4198 2017-10-30 Pedro Alves <palves@redhat.com>
4199 Simon Marchi <simon.marchi@ericsson.com>
4200
4201 * remote.c (remote_set_syscall_catchpoint): Build a std::string
4202 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
4203
4204 2017-10-30 Pedro Alves <palves@redhat.com>
4205
4206 * common/common-utils.c (string_appendf, string_vappendf): New
4207 functions.
4208 * common/common-utils.h (string_appendf, string_vappendf): New
4209 declarations.
4210 * unittests/common-utils-selftests.c (string_appendf_func)
4211 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
4212 (string_vappendf_tests): New functions.
4213 (_initialize_common_utils_selftests): Register "string_appendf" and
4214 "string_vappendf tests".
4215
4216 2017-10-30 Pedro Alves <palves@redhat.com>
4217
4218 * unittests/common-utils-selftests.c (format_func): New typedef.
4219 (string_printf_tests, string_vprintf_tests): Tests factored out
4220 and merged to ...
4221 (test_format_func): ... this new function.
4222 (string_printf_tests, string_vprintf_tests): Reimplement on top of
4223 test_format_func.
4224
4225 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4226
4227 * darwin-nat.c: Remove include of gdb.h.
4228
4229 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4230
4231 * xtensa-xtregs.c: Fix formatting issues.
4232
4233 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4234
4235 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4236
4237 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4238
4239 PR python/21213
4240 * python/py-infthread.c (thpy_get_inferior): Increment reference
4241 of inferior before returning it.
4242
4243 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4244
4245 * unittests/common-utils-selftests.c (format): Add
4246 ATTRIBUTE_PRINTF.
4247
4248 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4249
4250 * xml-syscall.c (struct syscall_desc): Add constructor.
4251 <name>: Change type to std::string.
4252 (syscall_desc_up): New typedef.
4253 (syscall_desc_p): Remove typeder.
4254 (DEF_VEC_P(syscall_desc_p)): Remove.
4255 (struct syscall_group_desc): Add constructor.
4256 <name>: Change type to std::string.
4257 <syscalls>: Change type to std::vector.
4258 (syscall_group_desc_up): New typedef.
4259 (syscall_group_desc_p): Remove typedef.
4260 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4261 (struct syscalls_info) <syscalls>: Change type to std::vector of
4262 unique_ptr.
4263 <groups>: Likewise.
4264 <my_gdb_datadir>: Change type to std::string.
4265 (syscalls_info_up): New typedef.
4266 (allocate_syscalls_info): Remove.
4267 (syscalls_info_free_syscalls_desc): Remove.
4268 (syscalls_info_free_syscall_group_desc): Remove.
4269 (free_syscalls_info): Remove.
4270 (make_cleanup_free_syscalls_info): Remove.
4271 (syscall_group_create_syscall_group_desc): Adjust.
4272 (syscall_group_add_syscall): Adjust.
4273 (syscall_create_syscall_desc): Adjust.
4274 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4275 (init_syscalls_info): Adjust.
4276 (syscall_group_get_group_by_name): Adjust.
4277 (xml_get_syscall_number): Adjust.
4278 (xml_get_syscall_name): Adjust.
4279 (xml_list_of_syscalls): Adjust.
4280 (xml_list_syscalls_by_group): Adjust.
4281 (xml_list_of_groups): Adjust.
4282
4283 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4284
4285 * probe.h: Don't include gdb_vecs.h.
4286 (DEF_VEC_P (probe_p)): Remove.
4287 (find_probes_in_objfile): Return an std::vector.
4288 * probe.c (find_probes_in_objfile): Likewise.
4289 * breakpoint.c (breakpoint_objfile_data)
4290 <longjmp_probes>: Change type to std::vector.
4291 <exception_probes>: Likewise.
4292 (free_breakpoint_probes): Don't manually free vectors.
4293 (create_longjmp_master_breakpoint): Adjust.
4294 (create_exception_master_breakpoint): Adjust.
4295 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4296 parameter type, adjust.
4297 (svr4_create_solib_event_breakpoints): Adjust.
4298
4299 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4300
4301 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4302 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4303 with new.
4304 (free_breakpoint_probes): Rename to ...
4305 (free_breakpoint_objfile_data): ... this, and call delete on
4306 bp_objfile_data..
4307
4308 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4309
4310 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4311 (loaded_script_ptr): Remove typedef.
4312 (DEF_VEC_P (loaded_script_ptr)): Remove.
4313 (struct collect_matching_scripts_data): Add constructor.
4314 <scripts_p>: Change type to (pointer to) std::vector.
4315 (collect_matching_scripts_data): Adjust.
4316 (sort_scripts_by_name): Make suitable for std::sort.
4317 (print_scripts): Don't sort vector, adjust to std::vector.
4318 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4319
4320 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4321
4322 * symfile.c (filename_language): Make struct, not typedef. Add
4323 constructor.
4324 <ext>: Change type to std::string.
4325 (DEF_VEC_O (filename_language)): Remove.
4326 (filename_language_table): Change type to std::vector.
4327 (add_filename_language): Adjust.
4328 (set_ext_lang_command): Adjust.
4329 (info_ext_lang_command): Adjust.
4330 (deduce_language_from_filename): Adjust.
4331 (class scoped_restore_filename_language_table): Remove.
4332 (test_filename_language): Use scoped_restore.
4333 (test_set_ext_lang_command): Use scoped_restore, adjust to
4334 std::vector change.
4335
4336 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4337
4338 * symfile.c: Include selftest.h.
4339 (class scoped_restore_filename_language_table): New.
4340 (test_filename_language): New test.
4341 (test_set_ext_lang_command): New test.
4342 (_initialize_symfile): Register tests.
4343
4344 2017-10-27 Keith Seitz <keiths@redhat.com>
4345
4346 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4347 in the bp_location, falling back to find_pc_sect_function when
4348 needed.
4349 (add_location_to_breakpoint): Save sal->symbol.
4350 * breakpoint.h (struct bp_location) <symbol>: New field.
4351 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4352 * symtab.h (struct symtab_and_line) <symbol>: New field.
4353
4354 2017-10-26 Patrick Frants <osscontribute@gmail.com>
4355
4356 PR gdb/13669
4357 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4358 to rewind obstack.
4359
4360 2017-10-26 Pedro Alves <palves@redhat.com>
4361
4362 * remote.c (remote_async_terminal_ours_p): Delete.
4363 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4364 Remove references to 'remote_async_terminal_ours_p'.
4365
4366 2017-10-26 Yao Qi <yao.qi@linaro.org>
4367
4368 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4369
4370 2017-10-26 Yao Qi <yao.qi@linaro.org>
4371
4372 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4373 aspace const.
4374 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4375 Likewise.
4376 * breakpoint.c (bpstat_check_location): Remove cast.
4377 (breakpoint_hit_catch_fork): Make aspce const.
4378 (breakpoint_hit_catch_solib): Likewise.
4379 (breakpoint_hit_catch_exec): Likewise.
4380 (breakpoint_hit_ranged_breakpoint): Likewise.
4381 (breakpoint_hit_watchpoint): Likewise.
4382 (base_breakpoint_breakpoint_hit): Likewise.
4383 (bkpt_breakpoint_hit): Likewise.
4384 (dprintf_breakpoint_hit): Likewise.
4385 (tracepoint_breakpoint_hit): Likewise.
4386 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4387
4388 2017-10-26 Yao Qi <yao.qi@linaro.org>
4389
4390 * breakpoint.c (breakpoint_location_address_match): Change
4391 "struct address_space *" to "const address_space".
4392 (breakpoint_location_address_range_overlap): Likewise.
4393 (breakpoint_here_p): Likewise.
4394 (breakpoint_in_range_p): Likewise.
4395 (moribund_breakpoint_here_p): Likewise.
4396 (bp_location_inserted_here_p): Likewise.
4397 (software_breakpoint_inserted_here_p): Likewise.
4398 (hardware_breakpoint_inserted_here_p): Likewise.
4399 (hardware_watchpoint_inserted_in_range): Likewise.
4400 (bpstat_check_location): Likewise.
4401 (bpstat_stop_status): Likewise.
4402 (breakpoint_address_match): Likewise.
4403 (breakpoint_address_match_range): Likewise.
4404 (breakpoint_location_address_match): Likewise.
4405 (breakpoint_location_address_range_overlap): Likewise.
4406 (insert_single_step_breakpoint): Likewise.
4407 (breakpoint_has_location_inserted_here): Likewise.
4408 (single_step_breakpoint_inserted_here_p): Likewise.
4409 (pc_at_non_inline_function): Likewise.
4410 * breakpoint.h (bpstat_stop_status): Update declaration.
4411 (breakpoint_here_p): Likewise.
4412 (breakpoint_in_range_p): Likewise.
4413 (moribund_breakpoint_here_p): Likewise.
4414 (breakpoint_inserted_here_p): Likewise.
4415 (software_breakpoint_inserted_here_p): Likewise.
4416 (hardware_breakpoint_inserted_here_p): Likewise.
4417 (breakpoint_has_location_inserted_here): Likewise.
4418 (single_step_breakpoint_inserted_here_p): Likewise.
4419 (hardware_watchpoint_inserted_in_range): Likewise.
4420 (breakpoint_address_match): Likewise.
4421 (insert_single_step_breakpoint): Likewise.
4422 (pc_at_non_inline_function): Likewise.
4423 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4424 * record.c (record_check_stopped_by_breakpoint): Likewise.
4425 * record.h (record_check_stopped_by_breakpoint): Likewise.
4426 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4427
4428 2017-10-25 Yao Qi <yao.qi@linaro.org>
4429
4430 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4431 regcache->arch () instead get_regcache_arch.
4432 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4433 Likewise.
4434 (aarch64_fbsd_store_inferior_registers): Likewise.
4435 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4436 (store_gregs_to_thread): Likewise.
4437 (fetch_fpregs_from_thread): Likewise.
4438 (store_fpregs_to_thread): Likewise.
4439 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4440 (aarch64_store_return_value): Likewise.
4441 (aarch64_software_single_step): Likewise.
4442 * aix-thread.c (aix_thread_wait): Likewise.
4443 (supply_reg32): Likewise.
4444 (supply_sprs64): Likewise.
4445 (supply_sprs32): Likewise.
4446 (fill_gprs64): Likewise.
4447 (fill_gprs32): Likewise.
4448 (fill_sprs64): Likewise.
4449 (fill_sprs32): Likewise.
4450 (store_regs_user_thread): Likewise.
4451 (store_regs_kernel_thread): Likewise.
4452 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4453 (alphabsd_store_inferior_registers): Likewise.
4454 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4455 (alpha_store_return_value): Likewise.
4456 (alpha_deal_with_atomic_sequence): Likewise.
4457 (alpha_next_pc): Likewise.
4458 (alpha_software_single_step): Likewise.
4459 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4460 (amd64bsd_store_inferior_registers): Likewise.
4461 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4462 Likewise.
4463 (amd64_linux_store_inferior_registers): Likewise.
4464 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4465 (amd64_collect_native_gregset): Likewise.
4466 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4467 (amd64obsd_collect_uthread): Likewise.
4468 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4469 (amd64_collect_fpregset): Likewise.
4470 (amd64_supply_fxsave): Likewise.
4471 (amd64_supply_xsave): Likewise.
4472 (amd64_collect_fxsave): Likewise.
4473 (amd64_collect_xsave): Likewise.
4474 * arc-tdep.c (arc_write_pc): Likewise.
4475 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4476 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4477 (arm_fbsd_store_inferior_registers): Likewise.
4478 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4479 (store_vfp_regs): Likewise.
4480 (arm_linux_fetch_inferior_registers): Likewise.
4481 (arm_linux_store_inferior_registers): Likewise.
4482 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4483 (arm_linux_sigreturn_next_pc): Likewise.
4484 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4485 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4486 (fetch_register): Likewise.
4487 (store_register): Likewise.
4488 * arm-tdep.c (arm_is_thumb): Likewise.
4489 (displaced_in_arm_mode): Likewise.
4490 (bx_write_pc): Likewise.
4491 (arm_get_next_pcs_addr_bits_remove): Likewise.
4492 (arm_software_single_step): Likewise.
4493 (arm_extract_return_value): Likewise.
4494 (arm_store_return_value): Likewise.
4495 (arm_write_pc): Likewise.
4496 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4497 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4498 (bsd_uthread_store_registers): Likewise.
4499 * core-regset.c (fetch_core_registers): Likewise.
4500 * corelow.c (get_core_registers): Likewise.
4501 * cris-tdep.c (cris_store_return_value): Likewise.
4502 (cris_extract_return_value): Likewise.
4503 (find_step_target): Likewise.
4504 (find_step_target): Likewise.
4505 (cris_software_single_step): Likewise.
4506 * ctf.c (ctf_fetch_registers): Likewise.
4507 * darwin-nat.c (cancel_breakpoint): Likewise.
4508 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4509 * frv-tdep.c (frv_extract_return_value): Likewise.
4510 * ft32-tdep.c (ft32_store_return_value): Likewise.
4511 (ft32_extract_return_value): Likewise.
4512 * go32-nat.c (fetch_register): Likewise.
4513 (go32_fetch_registers): Likewise.
4514 (go32_store_registers): Likewise.
4515 (store_register): Likewise.
4516 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4517 (h8300_store_return_value): Likewise.
4518 * hppa-linux-nat.c (fetch_register): Likewise.
4519 (store_register): Likewise.
4520 (hppa_linux_fetch_inferior_registers): Likewise.
4521 (hppa_linux_store_inferior_registers): Likewise.
4522 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4523 (i386_darwin_store_inferior_registers): Likewise.
4524 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4525 (gnu_store_registers): Likewise.
4526 * i386-linux-nat.c (fetch_register): Likewise.
4527 (store_register): Likewise.
4528 (supply_gregset): Likewise.
4529 (fill_gregset): Likewise.
4530 (i386_linux_fetch_inferior_registers): Likewise.
4531 (i386_linux_store_inferior_registers): Likewise.
4532 (i386_linux_resume): Likewise.
4533 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4534 Likewise.
4535 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4536 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4537 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4538 (i386obsd_collect_uthread): Likewise.
4539 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4540 (i386_supply_gregset): Likewise.
4541 (i386_collect_gregset): Likewise.
4542 (i386_supply_fpregset): Likewise.
4543 (i386_collect_fpregset): Likewise.
4544 (i386_mpx_bd_base): Likewise.
4545 * i386-v4-nat.c (supply_fpregset): Likewise.
4546 (fill_fpregset): Likewise.
4547 * i387-tdep.c (i387_supply_fsave): Likewise.
4548 (i387_collect_fsave): Likewise.
4549 (i387_supply_fxsave): Likewise.
4550 (i387_collect_fxsave): Likewise.
4551 (i387_supply_xsave): Likewise.
4552 (i387_collect_xsave): Likewise.
4553 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4554 (ia64_linux_store_registers): Likewise.
4555 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4556 (ia64_extract_return_value): Likewise.
4557 (ia64_store_return_value): Likewise.
4558 (find_func_descr): Likewise.
4559 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4560 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4561 (inf_ptrace_store_registers): Likewise.
4562 * infrun.c (use_displaced_stepping): Likewise.
4563 (displaced_step_prepare_throw): Likewise.
4564 (resume): Likewise.
4565 (proceed): Likewise.
4566 (do_target_wait): Likewise.
4567 (adjust_pc_after_break): Likewise.
4568 (handle_inferior_event_1): Likewise.
4569 (handle_signal_stop): Likewise.
4570 (save_infcall_suspend_state): Likewise.
4571 (restore_infcall_suspend_state): Likewise.
4572 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4573 * jit.c (jit_frame_prev_register): Likewise.
4574 * linux-nat.c (save_stop_reason): Likewise.
4575 (linux_nat_wait_1): Likewise.
4576 (resume_stopped_resumed_lwps): Likewise.
4577 * linux-record.c (record_linux_sockaddr): Likewise.
4578 (record_linux_msghdr): Likewise.
4579 (record_linux_system_call): Likewise.
4580 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4581 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4582 (lm32_store_return_value): Likewise.
4583 * m32c-tdep.c (m32c_read_flg): Likewise.
4584 (m32c_pseudo_register_read): Likewise.
4585 (m32c_pseudo_register_write): Likewise.
4586 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4587 (m32r_linux_collect_gregset): Likewise.
4588 * m32r-tdep.c (m32r_store_return_value): Likewise.
4589 (m32r_extract_return_value): Likewise.
4590 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4591 (m68kbsd_collect_fpregset): Likewise.
4592 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4593 * m68k-linux-nat.c (fetch_register): Likewise.
4594 (old_fetch_inferior_registers): Likewise.
4595 (old_store_inferior_registers): Likewise.
4596 (store_regs): Likewise.
4597 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4598 (m68k_svr4_store_return_value): Likewise.
4599 * m88k-tdep.c (m88k_store_arguments): Likewise.
4600 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4601 (mi_cmd_data_write_register_values): Likewise.
4602 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4603 (mips_fbsd_store_inferior_registers): Likewise.
4604 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4605 (mips_fbsd_supply_gregs): Likewise.
4606 (mips_fbsd_collect_fpregs): Likewise.
4607 (mips_fbsd_collect_gregs): Likewise.
4608 (mips_fbsd_supply_fpregset): Likewise.
4609 (mips_fbsd_collect_fpregset): Likewise.
4610 (mips_fbsd_supply_gregset): Likewise.
4611 (mips_fbsd_collect_gregset): Likewise.
4612 * mips-linux-nat.c (supply_gregset): Likewise.
4613 (fill_gregset): Likewise.
4614 (supply_fpregset): Likewise.
4615 (fill_fpregset): Likewise.
4616 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4617 (mips_fill_gregset): Likewise.
4618 (mips_supply_fpregset): Likewise.
4619 (mips_fill_fpregset): Likewise.
4620 (mips64_supply_gregset): Likewise.
4621 (micromips_linux_sigframe_validate): Likewise.
4622 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4623 (mipsnbsd_fetch_inferior_registers): Likewise.
4624 (mipsnbsd_store_inferior_registers): Likewise.
4625 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4626 (mipsnbsd_supply_gregset): Likewise.
4627 (mipsnbsd_iterate_over_regset_sections): Likewise.
4628 (mipsnbsd_supply_reg): Likewise.
4629 (mipsnbsd_supply_fpreg): Likewise.
4630 * mips-tdep.c (mips_in_frame_stub): Likewise.
4631 (mips_dummy_id): Likewise.
4632 (is_octeon_bbit_op): Likewise.
4633 (micromips_bc1_pc): Likewise.
4634 (extended_mips16_next_pc): Likewise.
4635 (mips16_next_pc): Likewise.
4636 (deal_with_atomic_sequence): Likewise.
4637 * moxie-tdep.c (moxie_process_readu): Likewise.
4638 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4639 * nto-procfs.c (procfs_store_registers): Likewise.
4640 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4641 (ppcfbsd_store_inferior_registers): Likewise.
4642 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4643 (fetch_altivec_register): Likewise.
4644 (get_spe_registers): Likewise.
4645 (fetch_spe_register): Likewise.
4646 (fetch_altivec_registers): Likewise.
4647 (fetch_all_gp_regs): Likewise.
4648 (fetch_all_fp_regs): Likewise.
4649 (store_vsx_register): Likewise.
4650 (store_altivec_register): Likewise.
4651 (set_spe_registers): Likewise.
4652 (store_spe_register): Likewise.
4653 (store_altivec_registers): Likewise.
4654 (store_all_gp_regs): Likewise.
4655 (store_all_fp_regs): Likewise.
4656 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4657 (ppc_linux_collect_gregset): Likewise.
4658 (ppc_canonicalize_syscall): Likewise.
4659 (ppc_linux_record_signal): Likewise.
4660 (ppu2spu_prev_register): Likewise.
4661 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4662 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4663 (ppcobsd_store_registers): Likewise.
4664 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4665 Likewise.
4666 (ppc_ravenscar_generic_store_registers): Likewise.
4667 * procfs.c (procfs_fetch_registers): Likewise.
4668 (procfs_store_registers): Likewise.
4669 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4670 (ravenscar_store_registers): Likewise.
4671 (ravenscar_prepare_to_store): Likewise.
4672 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4673 * record-full.c (record_full_wait_1): Likewise.
4674 (record_full_registers_change): Likewise.
4675 (record_full_store_registers): Likewise.
4676 (record_full_core_fetch_registers): Likewise.
4677 (record_full_save): Likewise.
4678 (record_full_goto_insn): Likewise.
4679 * regcache.c (regcache_register_size): Likewise.
4680 (get_regcache_arch): Remove.
4681 (regcache_read_pc): Likewise.
4682 * regcache.h (get_regcache_arch): Remove.
4683 * remote-sim.c (gdbsim_fetch_register): Likewise.
4684 (gdbsim_store_register): Likewise.
4685 * remote.c (fetch_register_using_p): Likewise.
4686 (send_g_packet): Likewise.
4687 (remote_prepare_to_store): Likewise.
4688 (store_registers_using_G): Likewise.
4689 * reverse.c (save_bookmark_command): Likewise.
4690 (goto_bookmark_command): Likewise.
4691 * rs6000-aix-tdep.c (branch_dest): Likewise.
4692 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4693 (fetch_register): Likewise.
4694 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4695 (ppc_collect_reg): Likewise.
4696 (ppc_collect_gregset): Likewise.
4697 (ppc_collect_fpregset): Likewise.
4698 (ppc_collect_vsxregset): Likewise.
4699 (ppc_collect_vrregset): Likewise.
4700 (ppc_displaced_step_hw_singlestep): Likewise.
4701 (rs6000_pseudo_register_read): Likewise.
4702 (rs6000_pseudo_register_write): Likewise.
4703 * s390-linux-nat.c (supply_gregset): Likewise.
4704 (fill_gregset): Likewise.
4705 (s390_linux_fetch_inferior_registers): Likewise.
4706 * s390-linux-tdep.c (s390_write_pc): Likewise.
4707 (s390_software_single_step): Likewise.
4708 (s390_all_but_pc_registers_record): Likewise.
4709 (s390_linux_syscall_record): Likewise.
4710 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4711 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4712 (shnbsd_store_inferior_registers): Likewise.
4713 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4714 (sh_extract_return_value_fpu): Likewise.
4715 (sh_store_return_value_nofpu): Likewise.
4716 (sh_corefile_supply_regset): Likewise.
4717 (sh_corefile_collect_regset): Likewise.
4718 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4719 (sh64_store_return_value): Likewise.
4720 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4721 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4722 (sparc_store_inferior_registers): Likewise.
4723 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4724 (sparc_ravenscar_prepare_to_store): Likewise.
4725 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4726 (sparc_analyze_control_transfer): Likewise.
4727 (sparc_step_trap): Likewise.
4728 (sparc_software_single_step): Likewise.
4729 (sparc32_gdbarch_init): Likewise.
4730 (sparc_supply_rwindow): Likewise.
4731 (sparc_collect_rwindow): Likewise.
4732 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4733 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4734 (sparc64nbsd_collect_gregset): Likewise.
4735 (sparc64nbsd_supply_fpregset): Likewise.
4736 (sparc64nbsd_collect_fpregset): Likewise.
4737 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4738 (sparc64_supply_gregset): Likewise.
4739 (sparc64_collect_gregset): Likewise.
4740 (sparc64_supply_fpregset): Likewise.
4741 (sparc64_collect_fpregset): Likewise.
4742 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4743 * spu-tdep.c (spu_unwind_sp): Likewise.
4744 (spu2ppu_prev_register): Likewise.
4745 (spu_memory_remove_breakpoint): Likewise.
4746 * stack.c (return_command): Likewise.
4747 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4748 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4749 * tracefile.c (trace_save_ctf): Likewise.
4750 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4751 (do_windows_store_inferior_registers): Likewise.
4752 (windows_resume): Likewise.
4753 * xtensa-linux-nat.c (fill_gregset): Likewise.
4754 (supply_gregset_reg): Likewise.
4755 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4756 (xtensa_register_read_masked): Likewise.
4757 (xtensa_supply_gregset): Likewise.
4758 (xtensa_extract_return_value): Likewise.
4759 (xtensa_store_return_value): Likewise.
4760
4761 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4762
4763 * doublest.c (floatformat_from_string): New function.
4764 * doublest.h (floatformat_from_string): Add prototype.
4765
4766 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4767 (OP_FLOAT): ... this.
4768 * expression.h: Do not include "doublest.h".
4769 (union exp_element): Replace doubleconst and decfloatconst by
4770 new element floatconst.
4771 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4772 (ada_evaluate_subexp): Likewise.
4773 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4774 OP_DOUBLE and OP_DECFLOAT.
4775 * expprint.c (print_subexp_standard): Likewise.
4776 (dump_subexp_body_standard): Likewise.
4777 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4778
4779 * parse.c: Include "dfp.h".
4780 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4781 (write_exp_elt_floatcst): New function.
4782 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4783 and OP_DECFLOAT.
4784 (operator_check_standard): Likewise.
4785 (parse_float): Do not accept suffix. Take type as input. Return bool.
4786 Return target format buffer instead of host DOUBLEST.
4787 Use floatformat_from_string and decimal_from_string to parse
4788 either binary or decimal floating-point types.
4789 (parse_c_float): Remove.
4790 * parser-defs.h: Do not include "doublest.h".
4791 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4792 (write_exp_elt_floatcst): Add prototype.
4793 (parse_float): Update prototype.
4794 (parse_c_float): Remove.
4795
4796 * c-exp.y: Do not include "dfp.h".
4797 (typed_val_float): Use byte buffer instead of DOUBLEST.
4798 (typed_val_decfloat): Remove.
4799 (DECFLOAT): Remove.
4800 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4801 (parse_number): Update to new parse_float interface.
4802 Parse suffixes and determine type before calling parse_float.
4803 Handle decimal and binary FP types the same way.
4804
4805 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4806 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4807 (parse_number): Update to new parse_float interface.
4808 Parse suffixes and determine type before calling parse_float.
4809
4810 * f-exp.y: Replace dval by typed_val_float.
4811 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4812 (parse_number): Use parse_float instead of atof.
4813
4814 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4815 (parse_go_float): Remove.
4816 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4817 (parse_number): Call parse_float instead of parse_go_float.
4818 Parse suffixes and determine type before calling parse_float.
4819
4820 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4821 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4822 (parse_number): Update to new parse_float interface.
4823 Parse suffixes and determine type before calling parse_float.
4824
4825 * m2-exp.y: Replace dval by byte buffer val.
4826 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4827 (parse_number): Call parse_float instead of atof.
4828
4829 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4830 (lex_number): Call parse_float instead of strtod.
4831 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4832 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4833 Use write_exp_elt_floatcst.
4834 (unit_testing): Remove static variable.
4835 (rust_type): Do not check unit_testing.
4836 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4837
4838 * ada-exp.y (type_float, type_double): Remove.
4839 (typed_val_float): Use byte buffer instead of DOUBLEST.
4840 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4841 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4842
4843 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4844
4845 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4846 * arch/aarch64.h: New file.
4847
4848 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4849
4850 * dfp.h (decimal_from_string): Use const reference for argument.
4851 * dfp.c (decimal_from_string): Likewise.
4852
4853 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4854
4855 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4856 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4857 * mips-tdep.c (mips_print_fp_register): Likewise.
4858
4859 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4860
4861 * common/format.h (enum argclass): Replace decfloat_arg by
4862 dec32float_arg, dec64float_arg, and dec128float_arg.
4863 * common/format.c (parse_format_string): Update to return
4864 new decimal float argument classes.
4865
4866 * printcmd.c (printf_decfloat): Rename to ...
4867 (printf_floating): ... this. Add argclass argument, and use it
4868 instead of parsing the format string again. Add support for
4869 binary floating-point values, using floatformat_to_string.
4870 Convert value to the target format if it doesn't already match.
4871 (ui_printf): Call printf_floating instead of printf_decfloat,
4872 also for double_arg / long_double_arg. Pass argclass.
4873
4874 * dfp.c (decimal_to_string): Add format string argument.
4875 * dfp.h (decimal_to_string): Likewise.
4876
4877 * doublest.c (floatformat_to_string): Add format string argument.
4878 * doublest.h (floatformat_to_string): Likewise.
4879
4880 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4881
4882 * doublest.c (floatformat_precision): New routine.
4883 (floatformat_to_string): Likewise.
4884 * doublest.c (floatformat_to_string): Add prototype.
4885
4886 * printcmd.c (print_scalar_formatted): Only call print_floating
4887 on floating-point types.
4888 * valprint.c: Do not include "floatformat.h".
4889 (generic_val_print_decfloat): Remove.
4890 (generic_val_print): Call generic_val_print_float for both
4891 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4892 (print_floating): Use floatformat_to_string. Handle decimal float.
4893 (print_decimal_floating): Remove, merge into floatformat_to_string.
4894 * value.h (print_decimal_floating): Remove.
4895
4896 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4897
4898 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4899
4900 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4901
4902 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4903
4904 * memattr.h: Don't include vec.h.
4905 (struct mem_attrib): Initialize fields.
4906 <unknown>: New static method.
4907 (struct mem_region): Add constructors, operator<, initialize
4908 fields.
4909 * memattr.c: Include algorithm.
4910 (default_mem_attrib, unknown_mem_attrib): Remove.
4911 (user_mem_region_list): New global.
4912 (target_mem_region_list, mem_region_list): Change type to
4913 std::vector<mem_region>.
4914 (mem_use_target): Now a function.
4915 (target_mem_regions_valid): Change type to bool.
4916 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4917 (require_user_regions): Adjust.
4918 (require_target_regions): Adjust.
4919 (create_mem_region): Adjust.
4920 (lookup_mem_region): Adjust.
4921 (invalidate_target_mem_regions): Adjust.
4922 (mem_clear): Rename to...
4923 (user_mem_clear): ... this, and adjust.
4924 (mem_command): Adjust.
4925 (info_mem_command): Adjust.
4926 (mem_enable, enable_mem_command, mem_disable,
4927 disable_mem_command): Adjust.
4928 (mem_delete): Adjust.
4929 (delete_mem_command): Adjust.
4930 * memory-map.h (parse_memory_map): Return an std::vector.
4931 * memory-map.c (parse_memory_map): Likewise.
4932 (struct memory_map_parsing_data): Add constructor.
4933 <memory_map>: Point to std::vector.
4934 (memory_map_start_memory): Adjust.
4935 (memory_map_end_memory): Adjust.
4936 (memory_map_end_property): Adjust.
4937 (clear_result): Remove.
4938 * remote.c (remote_memory_map): Return an std::vector.
4939 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4940 Remove.
4941 (target_debug_print_mem_region_vector): New.
4942 * target-delegates.c: Regenerate.
4943 * target.h (mem_region_vector): New typedef.
4944 (to_memory_map): Return mem_region_vector.
4945 (target_memory_map): Return an std::vector.
4946 * target.c (target_memory_map): Return an std::vector.
4947 (flash_erase_command): Adjust.
4948
4949 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4950
4951 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4952 Change type to std::string.
4953 (memory_map_start_property): Adjust.
4954 (memory_map_end_property): Adjust.
4955
4956 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4957
4958 * infrun.h: Include common/byte-vector.h.
4959 (struct displaced_step_closure): New struct.
4960 (struct buf_displaced_step_closure): New struct.
4961 * infrun.c (displaced_step_closure::~displaced_step_closure):
4962 Provide default implementation.
4963 (displaced_step_clear): Deallocate step closure with delete.
4964 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4965 (aarch64_displaced_step_closure): ... this, extend
4966 displaced_step_closure.
4967 (aarch64_displaced_step_data) <dsc>: Change type to
4968 aarch64_displaced_step_closure.
4969 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4970 unique_ptr.
4971 (aarch64_displaced_step_fixup): Add cast for displaced step
4972 closure.
4973 * amd64-tdep.c (displaced_step_closure): Rename to ...
4974 (amd64_displaced_step_closure): ... this, extend
4975 displaced_step_closure.
4976 <insn_buf>: Change type to std::vector<gdb_byte>.
4977 <max_len>: Remove.
4978 (fixup_riprel): Change type of DSC parameter, adjust to type
4979 change of insn_buf.
4980 (fixup_displaced_copy): Change type of DSC parameter.
4981 (amd64_displaced_step_copy_insn): Instantiate
4982 amd64_displaced_step_closure.
4983 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4984 to type change of insn_buf.
4985 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4986 parameter DSC.
4987 (arm_linux_copy_svc): Likewise.
4988 (cleanup_kernel_helper_return): Likewise.
4989 (arm_catch_kernel_helper_return): Likewise.
4990 (arm_linux_displaced_step_copy_insn): Instantiate
4991 arm_displaced_step_closure.
4992 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4993 (displaced_read_reg): Change type of parameter DSC.
4994 (branch_write_pc): Likewise.
4995 (load_write_pc): Likewise.
4996 (alu_write_pc): Likewise.
4997 (displaced_write_reg): Likewise.
4998 (arm_copy_unmodified): Likewise.
4999 (thumb_copy_unmodified_32bit): Likewise.
5000 (thumb_copy_unmodified_16bit): Likewise.
5001 (cleanup_preload): Likewise.
5002 (install_preload): Likewise.
5003 (arm_copy_preload): Likewise.
5004 (thumb2_copy_preload): Likewise.
5005 (install_preload_reg): Likewise.
5006 (arm_copy_preload_reg): Likewise.
5007 (cleanup_copro_load_store): Likewise.
5008 (install_copro_load_store): Likewise.
5009 (arm_copy_copro_load_store) Likewise.
5010 (thumb2_copy_copro_load_store): Likewise.
5011 (cleanup_branch): Likewise.
5012 (install_b_bl_blx): Likewise.
5013 (arm_copy_b_bl_blx): Likewise.
5014 (thumb2_copy_b_bl_blx): Likewise.
5015 (thumb_copy_b): Likewise.
5016 (install_bx_blx_reg): Likewise.
5017 (arm_copy_bx_blx_reg): Likewise.
5018 (thumb_copy_bx_blx_reg): Likewise.
5019 (cleanup_alu_imm): Likewise.
5020 (arm_copy_alu_imm): Likewise.
5021 (thumb2_copy_alu_imm): Likewise.
5022 (cleanup_alu_reg): Likewise.
5023 (install_alu_reg): Likewise.
5024 (arm_copy_alu_reg): Likewise.
5025 (thumb_copy_alu_reg): Likewise.
5026 (cleanup_alu_shifted_reg): Likewise.
5027 (install_alu_shifted_reg): Likewise.
5028 (arm_copy_alu_shifted_reg): Likewise.
5029 (cleanup_load): Likewise.
5030 (cleanup_store): Likewise.
5031 (arm_copy_extra_ld_st): Likewise.
5032 (install_load_store): Likewise.
5033 (thumb2_copy_load_literal): Likewise.
5034 (thumb2_copy_load_reg_imm): Likewise.
5035 (arm_copy_ldr_str_ldrb_strb): Likewise.
5036 (cleanup_block_load_all): Likewise.
5037 (cleanup_block_store_pc): Likewise.
5038 (cleanup_block_load_pc): Likewise.
5039 (arm_copy_block_xfer): Likewise.
5040 (thumb2_copy_block_xfer): Likewise.
5041 (cleanup_svc): Likewise.
5042 (install_svc): Likewise.
5043 (arm_copy_svc): Likewise.
5044 (thumb_copy_svc): Likewise.
5045 (arm_copy_undef): Likewise.
5046 (thumb_32bit_copy_undef): Likewise.
5047 (arm_copy_unpred): Likewise.
5048 (arm_decode_misc_memhint_neon): Likewise.
5049 (arm_decode_unconditional): Likewise.
5050 (arm_decode_miscellaneous): Likewise.
5051 (arm_decode_dp_misc): Likewise.
5052 (arm_decode_ld_st_word_ubyte): Likewise.
5053 (arm_decode_media): Likewise.
5054 (arm_decode_b_bl_ldmstm): Likewise.
5055 (arm_decode_ext_reg_ld_st): Likewise.
5056 (thumb2_decode_dp_shift_reg): Likewise.
5057 (thumb2_decode_ext_reg_ld_st): Likewise.
5058 (arm_decode_svc_copro): Likewise.
5059 (thumb2_decode_svc_copro): Likewise.
5060 (install_pc_relative): Likewise.
5061 (thumb_copy_pc_relative_16bit): Likewise.
5062 (thumb_decode_pc_relative_16bit): Likewise.
5063 (thumb_copy_pc_relative_32bit): Likewise.
5064 (thumb_copy_16bit_ldr_literal): Likewise.
5065 (thumb_copy_cbnz_cbz): Likewise.
5066 (thumb2_copy_table_branch): Likewise.
5067 (cleanup_pop_pc_16bit_all): Likewise.
5068 (thumb_copy_pop_pc_16bit): Likewise.
5069 (thumb_process_displaced_16bit_insn): Likewise.
5070 (decode_thumb_32bit_ld_mem_hints): Likewise.
5071 (thumb_process_displaced_32bit_insn): Likewise.
5072 (thumb_process_displaced_insn): Likewise.
5073 (arm_process_displaced_insn): Likewise.
5074 (arm_displaced_init_closure): Likewise.
5075 (arm_displaced_step_fixup): Add cast for closure.
5076 * arm-tdep.h: Include infrun.h.
5077 (displaced_step_closure): Rename to ...
5078 (arm_displaced_step_closure): ... this, extend
5079 displaced_step_closure.
5080 <u::svc::copy_svc_os>: Change type of parameter DSC.
5081 <cleanup>: Likewise.
5082 (arm_process_displaced_insn): Likewise.
5083 (arm_displaced_init_closure): Likewise.
5084 (displaced_read_reg): Likewise.
5085 (displaced_write_reg): Likewise.
5086 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5087 Adjust.
5088 * i386-tdep.h: Include infrun.h.
5089 (i386_displaced_step_closure): New typedef.
5090 * i386-tdep.c (i386_displaced_step_copy_insn): Use
5091 i386_displaced_step_closure.
5092 (i386_displaced_step_fixup): Adjust.
5093 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
5094 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
5095 and unique_ptr.
5096 (ppc_displaced_step_fixup): Adjust.
5097 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
5098 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
5099 and unique_ptr.
5100 (s390_displaced_step_fixup): Adjust.
5101
5102 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
5103
5104 * interps.h (interp_resume, interp_suspend, interp_set_temp):
5105 Remove declarations.
5106
5107 2017-10-20 Tom Tromey <tom@tromey.com>
5108
5109 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
5110 std::vector.
5111 (gdb_bfd_record_inclusion): Update.
5112 (bfdp): Remove typedef.
5113
5114 2017-10-20 Tom Tromey <tom@tromey.com>
5115
5116 * gdb_bfd.c (gdb_bfd_ref): Use new.
5117 (struct gdb_bfd_data): Add constructor, destructor, and member
5118 initializers.
5119 (gdb_bfd_unref): Use delete.
5120
5121 2017-10-20 Tom Tromey <tom@tromey.com>
5122
5123 * exec.c (exec_file_attach): Use new_bfd_ref.
5124 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
5125 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5126 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
5127 new_bfd_ref.
5128 * gdb_bfd.h (new_bfd_ref): New function.
5129
5130 2017-10-20 Pedro Alves <palves@redhat.com>
5131
5132 * main.c (captured_command_loop): Add attribute noinline.
5133
5134 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
5135
5136 * interps.c (struct interp_factory): Add constructor.
5137 (interp_factory_p): Remove typedef.
5138 (DEF_VEC_P(interp_factory_p)): Remove.
5139 (interpreter_factories): Change type to std::vector.
5140 (interp_factory_register): Adjust.
5141 (interp_lookup): Adjust.
5142 (interpreter_completer): Adjust.
5143
5144 2017-10-19 Tom Tromey <tom@tromey.com>
5145
5146 * break-catch-syscall.c (catch_syscall_completer): Use
5147 std::string, gdb::unique_xmalloc_ptr.
5148
5149 2017-10-19 Tom Tromey <tom@tromey.com>
5150
5151 * infcall.c (call_function_by_hand_dummy): Use std::string.
5152
5153 2017-10-19 Tom Tromey <tom@tromey.com>
5154
5155 * mi/mi-main.c (mi_cmd_execute): Update.
5156 * top.h (prepare_execute_command): Return scoped_value_mark.
5157 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
5158 Add move constructor.
5159 * top.c (prepare_execute_command): Return scoped_value_mark.
5160 (execute_command): Update.
5161
5162 2017-10-19 Pedro Alves <palves@redhat.com>
5163
5164 * xml-support.c (xml_fetch_content_from_file): Check fread's
5165 return.
5166
5167 2017-10-19 Pedro Alves <palves@redhat.com>
5168
5169 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
5170 async.
5171 (handle_error_fd): New function.
5172 (ser_base_async): Add/delete an event loop file handler for
5173 error_fd.
5174
5175 2017-10-19 Pedro Alves <palves@redhat.com>
5176
5177 * xml-support.c (xml_fetch_content_from_file): Don't read in
5178 chunks. Instead use fseek to determine the file's size, and read
5179 it in one go.
5180
5181 2017-11-18 Keith Seitz <keiths@redhat.com>
5182
5183 * c-exp.y (oper): Canonicalize conversion operators of user-defined
5184 types.
5185 Add whitespace to front of type name.
5186
5187 2017-10-18 Keith Seitz <keiths@redhat.com>
5188
5189 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
5190 DW_AT_accessibility.
5191
5192 2017-10-18 Yao Qi <yao.qi@linaro.org>
5193
5194 * features/tic6x-c62x-linux.c: Remove.
5195
5196 2017-10-17 Tom Tromey <tom@tromey.com>
5197
5198 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
5199 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5200 (do_mixed_source_and_assembly): Likewise.
5201
5202 2017-10-17 Tom Tromey <tom@tromey.com>
5203
5204 * regcache.c (regcache::xfer_part): Remove assertion.
5205
5206 2017-10-17 Pedro Alves <palves@redhat.com>
5207
5208 * xml-support.c (xml_fetch_content_from_file): Call
5209 unique_ptr::release() instead unique_ptr::get() when passing
5210 through xrealloc.
5211
5212 2017-10-17 Yao Qi <yao.qi@linaro.org>
5213
5214 * regcache.c (regcache::xfer_part): Remove parameters read and
5215 write, add parameter is_raw. All callers are updated.
5216
5217 2017-10-16 Keith Seitz <keiths@redhat.com>
5218
5219 * c-typeprint.c (enum access_specifier): Moved here from
5220 c_type_print_base.
5221 (output_access_specifier): New function.
5222 (c_type_print_base): Consider typedefs when assessing
5223 whether access labels are needed.
5224 Use output_access_specifier as needed.
5225 Output access specifier for typedefs, if needed.
5226 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5227 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5228 fields.
5229 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5230 accessor macros.
5231
5232 2017-10-16 Tom Tromey <tom@tromey.com>
5233
5234 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5235 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5236 * target.c (target_fileio_read_stralloc): Update.
5237 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5238 * target.h (target_fileio_read_stralloc): Return
5239 unique_xmalloc_ptr.
5240
5241 2017-10-16 Tom Tromey <tom@tromey.com>
5242
5243 * xml-syscall.c (xml_init_syscalls_info): Update.
5244 * xml-support.c (xinclude_start_include): Update.
5245 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5246 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5247 (xml_fetch_content_from_file): Likewise.
5248 * osdata.c (get_osdata): Update.
5249 * target.h (target_read_stralloc, target_get_osdata): Return
5250 unique_xmalloc_ptr.
5251 * solib-aix.c (solib_aix_get_library_list): Update.
5252 * solib-target.c (solib_target_current_sos): Update.
5253 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5254 * xml-tdesc.c (fetch_available_features_from_target): Update.
5255 (target_fetch_description_xml): Update.
5256 (file_read_description_xml): Update.
5257 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5258 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5259 (remote_pid_to_exec_file): Update.
5260 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5261 (target_get_osdata): Likewise.
5262
5263 2017-10-16 Tom Tromey <tom@tromey.com>
5264
5265 * remote.c (remote_register_number_and_offset): Use std::vector.
5266 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5267 (putpkt_binary): Use gdb::def_vector.
5268 (compare_sections_command): Use gdb::byte_vector.
5269
5270 2017-10-16 Tom Tromey <tom@tromey.com>
5271
5272 * ppc-linux-nat.c (hwdebug_insert_point): Use
5273 gdb::unique_xmalloc_ptr, XDUP.
5274
5275 2017-10-16 Tom Tromey <tom@tromey.com>
5276
5277 * probe.c (parse_probes): Use std::string.
5278 (info_probes_for_ops, enable_probes_command)
5279 (disable_probes_command): Remove cleanups.
5280
5281 2017-10-16 Tom Tromey <tom@tromey.com>
5282
5283 * buildsym.c (block_compar): Remove.
5284 (end_symtab_get_static_block): Use std::vector.
5285
5286 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5287
5288 * memrange.h (struct mem_range): Define operator< and operator==.
5289 (mem_range_s): Remove.
5290 (DEF_VEC_O (mem_range_s)): Remove.
5291 (normalize_mem_ranges): Change parameter type to std::vector.
5292 * memrange.c (compare_mem_ranges): Remove.
5293 (normalize_mem_ranges): Change parameter type to std::vector,
5294 adjust to vector change.
5295 * exec.c (section_table_available_memory): Return vector, remove
5296 parameter.
5297 (section_table_read_available_memory): Adjust to std::vector
5298 change.
5299 * remote.c (remote_read_bytes): Adjust to std::vector
5300 change.
5301 * tracepoint.h (traceframe_available_memory): Change parameter
5302 type to std::vector.
5303 * tracepoint.c (traceframe_available_memory): Change parameter
5304 type to std::vector, adjust.
5305 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5306 std::vector change.
5307 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5308 unittests/memrange-selftests.c.
5309 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5310 * gdb/unittests/memrange-selftests.c: New file.
5311
5312 2017-10-16 Pedro Alves <palves@redhat.com>
5313
5314 * elfread.c (probe_key_free): Rename range-for variable.
5315 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5316 (find_probe_by_pc, collect_probes): Rename range-for variable.
5317
5318 2017-10-16 Yao Qi <yao.qi@linaro.org>
5319
5320 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5321 * features/tic6x-c62x.c: Remove.
5322 * features/tic6x-c64x-linux.c: Remove.
5323 * features/tic6x-c64x.c: Remove.
5324 * features/tic6x-c64xp-linux.c: Remove.
5325 * features/tic6x-c64xp.c: Remove.
5326 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5327 initialize_tdesc_tic6x_*_linux functions.
5328 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5329 initialize_tdesc_tic6x_* functions.
5330
5331 2017-10-16 Yao Qi <yao.qi@linaro.org>
5332
5333 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5334 tic6x-c62x.
5335 * regformats/tic6x-c62x.dat: Remove.
5336 * regformats/tic6x-c64x.dat: Remove.
5337 * regformats/tic6x-c64xp.dat: Remove.
5338
5339 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5340
5341 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5342 (the !HAVE_LIBEXPAT version).
5343
5344 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5345
5346 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5347 const.
5348
5349 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5350
5351 * target.h: Include tracepoint.h.
5352 (enum trace_find_type): Move to tracepoint.h.
5353 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5354 * tracepoint.h: Don't include target.h
5355 (enum trace_find_type): Move from target.h.
5356 (parse_traceframe_info): Return a unique ptr.
5357 * tracepoint.c (current_traceframe_info): Change type to unique
5358 ptr.
5359 (free_traceframe_info): Remove.
5360 (clear_traceframe_info): Don't manually free
5361 current_traceframe_info.
5362 (free_result): Remove.
5363 (parse_traceframe_info): Return a unique ptr.
5364 (get_traceframe_info): Adjust to unique ptr.
5365 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5366 * remote.c (remote_traceframe_info): Return a unique ptr.
5367 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5368 ptr.
5369 * target-debug.h (target_debug_print_traceframe_info_up): New
5370 macro.
5371 * target-delegates.c: Regenerate.
5372
5373 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5374
5375 * memrange.h (struct mem_range): Add constructors.
5376 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5377 std::vector<mem_range>.
5378 * tracepoint.c (free_traceframe_info): Don't manually free
5379 vector.
5380 (traceframe_info_start_memory): Adjust to vector change.
5381 (traceframe_available_memory): Likewise.
5382 * tracefile-tfile.c (build_traceframe_info): Likewise.
5383 * ctf.c (ctf_traceframe_info): Likewise.
5384
5385 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5386
5387 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5388 std::vector<int>.
5389 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5390 (traceframe_info_start_tvar): Adjust to vector change.
5391 (parse_traceframe_info): Allocate with new.
5392 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5393 vector change.
5394 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5395 change.
5396 tfile_traceframe_info): Allocate with new.
5397 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5398 change.
5399
5400 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5401
5402 * tracepoint.c (traceframe_info): Rename to...
5403 (current_traceframe_info): ...this.
5404 (clear_traceframe_info): Adjust.
5405 (get_traceframe_info): Adjust.
5406
5407 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5408
5409 * nat/linux-osdata.c: Include algorithm.
5410 (compare_processes): Remove.
5411 (struct pid_pgid_entry): New struct.
5412 (linux_xfer_osdata_processgroups): Use std::vector instead of
5413 XNEWVEC.
5414
5415 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5416
5417 * objfiles.h: Don't include symfile.h.
5418 (struct partial_symbol): Remove forward-declaration.
5419 (struct objfile) <global_psymbols, static_psymbols>: Change type
5420 to std::vector<partial_symbol *>.
5421 * objfiles.c (objfile::objfile): Don't memset those fields.
5422 (objfile::~objfile): Don't free those fields.
5423 * psympriv.h (struct psymbol_allocation_list): Remove
5424 forward-declaration.
5425 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5426 to std::vector.
5427 (start_psymtab_common): Change parameters to std::vector.
5428 * psymtab.c: Include algorithm.
5429 (require_partial_symbols): Call shrink_to_fit.
5430 (find_pc_sect_psymbol): Adjust to vector change.
5431 (match_partial_symbol): Likewise.
5432 (lookup_partial_symbol): Likewise.
5433 (psym_relocate): Likewise.
5434 (dump_psymtab): Likewise.
5435 (recursively_search_psymtabs): Likewise.
5436 (compare_psymbols): Remove.
5437 (sort_pst_symbols): Adjust to vector change.
5438 (start_psymtab_common): Likewise.
5439 (end_psymtab_common): Likewise.
5440 (psymbol_bcache_full): De-constify return value.
5441 (add_psymbol_to_bcache): Likewise.
5442 (extend_psymbol_list): Remove.
5443 (append_psymbol_to_list): Adjust to vector change.
5444 (add_psymbol_to_list): Likewise.
5445 (init_psymbol_list): Likewise.
5446 (maintenance_info_psymtabs): Likewise.
5447 (maintenance_check_psymtabs): Likewise.
5448 * symfile.h (struct psymbol_allocation_list): Remove.
5449 * symfile.c (reread_symbols): Adjust to vector change.
5450 * dbxread.c (start_psymtab): Change type of parameters.
5451 (dbx_symfile_read): Adjust to vector change.
5452 (read_dbx_symtab): Likewise.
5453 (start_psymtab): Change type of parameters.
5454 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5455 (create_partial_symtab): Likewise.
5456 (add_partial_symbol): Likewise.
5457 (write_one_signatured_type): Likewise.
5458 (recursively_write_psymbols): Likewise.
5459 * mdebugread.c (parse_partial_symbols): Likewise.
5460 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5461 (scan_xcoff_symtab): Adjust to vector change.
5462 (xcoff_initial_scan): Likewise.
5463
5464 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5465
5466 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5467
5468 2017-10-13 Yao Qi <yao.qi@linaro.org>
5469
5470 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5471 Remove s390x-*-expedite, add s390x-expedite.
5472
5473 2017-10-13 Yao Qi <yao.qi@linaro.org>
5474
5475 * features/s390-gs-linux64.c: Regenerated.
5476 * features/s390x-gs-linux64.c: Regenerated.
5477
5478 2017-10-13 Tom Tromey <tom@tromey.com>
5479
5480 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5481 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5482 delete.
5483 * symfile.c (symbol_file_add_with_addrs): Use new.
5484 (symbol_file_add_separate): Update comment.
5485 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5486 * jit.c (jit_object_close_impl): Use new.
5487 (jit_unregister_code): Use delete.
5488 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5489 (~objfile): Rename from free_objfile.
5490 (free_objfile_separate_debug, do_free_objfile_cleanup)
5491 (free_all_objfiles, objfile_purge_solibs): Use delete.
5492 * objfiles.h (struct objfile): Add constructor and destructor.
5493 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5494 (allocate_objfile, free_objfile): Don't declare.
5495 (struct objstats): Add initializers.
5496
5497 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5500 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5501 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5502 * gdbarch.h: Regenerate.
5503 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5504 Adjust comment.
5505 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5506 (i386_displaced_step_fixup): Adjust comment.
5507 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5508
5509 2017-10-12 Tom Tromey <tom@tromey.com>
5510
5511 * prologue-value.h (pv_area::store_would_trash): Return bool.
5512 (pv_area::find_reg): Likewise.
5513 * prologue-value.c (pv_area::store_would_trash): Return bool.
5514 (pv_area::find_reg): Likewise.
5515
5516 2017-10-12 Tom Tromey <tom@tromey.com>
5517
5518 * s390-linux-tdep.c (s390_store, s390_load)
5519 (s390_check_for_saved, s390_analyze_prologue): Update.
5520 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5521 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5522 * prologue-value.h (class pv_area): Move from prologue-value.c.
5523 Change names of members. Add constructor, destructor, member
5524 functions.
5525 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5526 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5527 (pv_area_fetch, pv_area_scan): Don't declare.
5528 * prologue-value.c (struct pv_area::area_entry): Now member of
5529 pv_area.
5530 (struct pv_area): Move to prologue-value.h.
5531 (pv_area::pv_area): Rename from make_pv_area.
5532 (pv_area::~pv_area): Rename from free_pv_area.
5533 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5534 (clear_entries, find_entry, overlaps, store_would_trash, store)
5535 (fetch, find_reg, scan): Now member of pv_area.
5536 Remove "area" argument. Update.
5537 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5538 Update.
5539 * mn10300-tdep.c (push_reg, check_for_saved)
5540 (mn10300_analyze_prologue): Update.
5541 * mep-tdep.c (is_arg_spill, check_for_saved)
5542 (mep_analyze_prologue): Update.
5543 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5544 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5545 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5546 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5547 Update.
5548 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5549 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5550
5551 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5554 * linux-nat.c (linux_nat_delete_thread): New variable.
5555 (lwp_free): Invoke linux_nat_delete_thread if set.
5556 (linux_nat_set_delete_thread): New function.
5557 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5558 thread delete callback.
5559 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5560 (_initialize_arm_linux_nat): Assign thread delete callback.
5561 * s390-linux-nat.c (s390_delete_thread): New function.
5562 (_initialize_s390_nat): Assign thread delete callback.
5563 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5564 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5565 function.
5566 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5567 declaration.
5568 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5569 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5570
5571 2017-10-09 Tom Tromey <tom@tromey.com>
5572
5573 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5574 std::string.
5575 * tui/tui-layout.c (enum tui_status): Use std::string.
5576
5577 2017-10-11 Tom Tromey <tom@tromey.com>
5578
5579 * gdbthread.h (thread_command): Constify.
5580 * inferior.h (detach_command): Constify.
5581 * top.h (set_history, show_history): Constify.
5582 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5583 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5584 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5585 * printcmd.c (set_command): Constify.
5586 (non_const_set_command): New function.
5587 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5588 * breakpoint.c (enable_command, disable_command, delete_command)
5589 (catch_command, tcatch_command, set_breakpoint_cmd)
5590 (show_breakpoint_cmd): Constify.
5591 * macrocmd.c (macro_command): Constify.
5592 * infcmd.c (unset_command, kill_command, detach_command)
5593 (info_proc_cmd): Constify.
5594 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5595 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5596 (info_auto_load_cmd): Constify.
5597 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5598 (unset_tdesc_cmd): Constify.
5599 * ada-lang.c (set_ada_command, show_ada_command)
5600 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5601 * guile/guile.c (set_guile_command, show_guile_command)
5602 (info_guile_command): Constify.
5603 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5604 Constify.
5605 * skip.c (skip_command): Constify.
5606 * compile/compile.c (_initialize_compile): Constify.
5607 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5608 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5609 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5610 (maint_btrace_pt_show_cmd): Constify.
5611 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5612 Constify.
5613 * python/python.c (user_show_python, user_set_python): Constify.
5614 * mips-tdep.c (set_mips_command, show_mips_command)
5615 (set_mipsfpu_command): Constify.
5616 * record-btrace.c (cmd_record_btrace_start)
5617 (cmd_set_record_btrace, cmd_show_record_btrace)
5618 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5619 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5620 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5621 Constify.
5622 * symfile.c (overlay_command): Constify.
5623 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5624 * cli/cli-logging.c (set_logging_command, show_logging_command):
5625 Constify.
5626 * cli/cli-dump.c (dump_command, append_command)
5627 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5628 (tekhex_dump_command, binary_dump_command)
5629 (binary_append_command): Constify.
5630 * cli/cli-decode.c (struct cmd_list_element): Change type of
5631 "fun".
5632 * cli/cli-cmds.c (info_command, show_command, set_debug)
5633 (show_debug): Constify.
5634 (show_command): Add non-const overload.
5635 * top.c (set_history, show_history): Constify.
5636 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5637 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5638 * target.c (target_command): Constify.
5639 * sparc64-tdep.c (info_adi_command): Constify.
5640 * record-full.c (cmd_record_full_start): Constify.
5641 (set_record_full_command): Constify. Fix typo.
5642 (show_record_full_command): Constify.
5643 * thread.c (thread_command, thread_apply_command): Constify.
5644 * memattr.c (dummy_cmd): Constify.
5645 * value.c (function_command): Constify.
5646 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5647 * probe.c (info_probes_command): Constify.
5648 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5649 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5650 (show_thread_cmd, set_thread_default_cmd)
5651 (show_thread_default_cmd): Constify.
5652 (check_empty): Constify.
5653 * tracepoint.c (tfind_command): Constify.
5654 * cp-support.c (maint_cplus_command): Constify.
5655 * windows-tdep.c (info_w32_command): Constify.
5656 * record.c (cmd_record_start, set_record_command)
5657 (show_record_command, info_record_command, cmd_record_goto):
5658 Constify.
5659 * ravenscar-thread.c (set_ravenscar_command)
5660 (show_ravenscar_command): Constify.
5661 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5662 Constify.
5663 (add_internal_problem_command): Remove casts.
5664 * arc-tdep.c (maintenance_print_arc_command): Constify.
5665 * valprint.c (set_print, show_print, set_print_raw)
5666 (show_print_raw): Constify.
5667 * maint.c (maintenance_command, maintenance_info_command)
5668 (maintenance_print_command, maintenance_set_cmd)
5669 (maintenance_show_cmd, set_per_command_cmd)
5670 (show_per_command_cmd, maintenance_check_command): Constify.
5671 * language.c (set_check, show_check): Constify.
5672 * typeprint.c (show_print_type, set_print_type): Constify.
5673 * go32-nat.c (go32_info_dos_command): Constify.
5674
5675 2017-10-11 Tom Tromey <tom@tromey.com>
5676
5677 * breakpoint.c (prepare_re_set_context): Remove.
5678 (breakpoint_re_set_one): Update. Don't use cleanups.
5679 (breakpoint_re_set): Use scoped_restore, std::string, and
5680 scoped_restore_current_language.
5681
5682 2017-10-11 Tom Tromey <tom@tromey.com>
5683
5684 * breakpoint.c (commands_command_1): Use std::string.
5685 (cleanup_executing_breakpoints): Remove.
5686 (bpstat_do_actions_1): Use scoped_restore.
5687 (bpstat_check_watchpoint): Use std::string.
5688 (decode_static_tracepoint_spec): Likewise.
5689 (break_range_command): Likewise.
5690 (watch_command_1): Likewise.
5691 (compare_breakpoints): Change argument types.
5692 (clear_command): Use std::vector.
5693 (cleanup_executing_breakpoints): Remove.
5694 (update_global_location_list): Use unique_xmalloc_ptr.
5695 (strace_command): Remove unused declaration.
5696
5697 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5698
5699 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5700 * NEWS: Mention new FreeBSD/arm native configuration.
5701 * configure.host: Add arm*-*-freebsd*.
5702 * configure.nat: Likewise.
5703 * arm-fbsd-nat.c: New file.
5704
5705 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5706
5707 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5708 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5709 * NEWS: Mention new FreeBSD/arm target.
5710 * configure.tgt: Add arm*-*-freebsd*.
5711 * arm-fbsd-tdep.c: New file.
5712 * arm-fbsd-tdep.h: New file.
5713
5714 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5715
5716 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5717 `gdbarch_elfcore_write_linux_prpsinfo'.
5718 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5719 method.
5720 (elf_internal_linux_prpsinfo): Remove declaration.
5721 * gdbarch.h: Regenerate.
5722 * gdbarch.c: Regenerate.
5723
5724 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5725
5726 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5727 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5728
5729 2017-10-11 Pedro Alves <palves@redhat.com>
5730
5731 * breakpoint.c (reattach_breakpoints): Delete.
5732 * breakpoint.h (reattach_breakpoints): Delete.
5733
5734 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5735
5736 * symfile.c (registered_sym_fns): Make struct, not typedef.
5737 (DEF_VEC_O (registered_sym_fns)): Remove.
5738 (symtab_fns): Change type to std::vector.
5739 (add_symtab_fns): Adjust.
5740 (find_sym_fns): Adjust.
5741
5742 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5743
5744 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5745 * arc-tdep.h (arc_arch_is_em): New function.
5746 (arc_arch_is_hs): Likewise.
5747
5748 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5749
5750 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5751 parentheses in the declaration.
5752 (macro_lookup_inclusion): Likewise.
5753 (macro_lookup_definition): Likewise.
5754 * p-lang.h (pascal_builtin_types): Likewise.
5755 * tui/tui-data.c (tui_win_list): Likewise.
5756 * tui/tui-data.h (tui_win_list): Likewise.
5757 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5758
5759 2017-10-11 Mark Rages <markrages@gmail.com>
5760
5761 * target-memory.c (block_boundaries): Fix for block address not
5762 aligned on block size.
5763
5764 2017-10-10 Pedro Alves <palves@redhat.com>
5765 Tom Tromey <tom@tromey.com>
5766
5767 * breakpoint.c (struct captured_breakpoint_query_args)
5768 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5769 (print_breakpoint): New.
5770 * breakpoint.h (print_breakpoint): Declare.
5771 * common/common-exceptions.h (enum return_reason): Remove
5772 references to catch_exceptions.
5773 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5774 Delete.
5775 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5776 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5777 * gdb.h: Delete.
5778 * gdbthread.h (thread_select): Declare.
5779 * mi/mi-cmd-break.c: Don't include gdb.h.
5780 (breakpoint_notify): Use print_breakpoint.
5781 * mi/mi-cmd-catch.c: Don't include gdb.h.
5782 * mi/mi-interp.c: Don't include gdb.h.
5783 (mi_print_breakpoint_for_event): New.
5784 (mi_breakpoint_created, mi_breakpoint_modified): Use
5785 mi_print_breakpoint_for_event.
5786 * mi/mi-main.c: Don't include gdb.h.
5787 (mi_cmd_thread_select): Parse the global thread ID here. Use
5788 thread_select instead of gdb_thread_select.
5789 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5790 of using gdb_list_thread_ids.
5791 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5792 FILEIO_ENOSYS here.
5793 (remote_fileio_request): Use TRY/CATCH instead of
5794 catch_exceptions.
5795 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5796 (symbol_file_add_from_memory_wrapper): Delete.
5797 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5798 * thread.c: Don't include gdb.h.
5799 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5800 (thread_alive): Use thread_select.
5801 (do_captured_thread_select): Delete, parts salvaged as ...
5802 (thread_select): ... this new function.
5803 (gdb_thread_select): Delete.
5804
5805 2017-10-10 Pedro Alves <palves@redhat.com>
5806 Tom Tromey <tom@tromey.com>
5807
5808 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5809 and reverse logic.
5810 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5811 No longer macros. Instead ...
5812 (enum wp_check_result): They're now values of this new
5813 enumeration.
5814 (watchpoint_check): Change return type to wp_check_result and
5815 parameter type to bpstat.
5816 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5817 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5818 catch_errors. Reverse logic of watchpoint_check call.
5819 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5820 pointer as parameter.
5821 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5822 * common/common-exceptions.c (throw_exception_sjlj): Update
5823 comments to avoid mentioning catch_errors.
5824 * exceptions.c (catch_errors): Delete.
5825 * exceptions.h: Update comments to avoid mentioning catch_errors.
5826 (catch_errors_ftype, catch_errors): Delete.
5827 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5828 (hook_stop_stub): Delete.
5829 (restore_selected_frame): Change return type to void, and
5830 parameter type to const frame_id &.
5831 (restore_infcall_control_state): Use TRY/CATCH instead of
5832 catch_errors.
5833 * main.c (captured_command_loop): Return void and remove
5834 parameter. Remove references to catch_errors.
5835 (captured_main): Use TRY/CATCH instead of catch_errors.
5836 * objc-lang.c (objc_submethod_helper_data)
5837 (find_objc_msgcall_submethod_helper): Delete.
5838 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5839 catch_errors.
5840 * record-full.c (record_full_message): Return void.
5841 (record_full_message_args, record_full_message_wrapper): Delete.
5842 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5843 instead of catch_errors.
5844 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5845 parameter type to int.
5846 * solib-darwin.c (open_symbol_file_object): Ditto.
5847 * solib-dsbt.c (open_symbol_file_object): Ditto.
5848 * solib-frv.c (open_symbol_file_object): Ditto.
5849 * solib-svr4.c (open_symbol_file_object): Ditto.
5850 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5851 * solib.c (update_solib_list): Use TRY/CATCH instead of
5852 catch_errors.
5853 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5854 Change type.
5855 * symmisc.c (struct print_symbol_args): Remove.
5856 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5857 (print_symbol): Change type.
5858 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5859 and remove parameters.
5860 (catch_errors): New.
5861 (get_windows_debug_event): Adjust.
5862
5863 2017-10-09 Tom Tromey <tom@tromey.com>
5864
5865 * mi/mi-main.c (free_splay_tree): Remove.
5866 (list_available_thread_groups): Use splay_tree_up.
5867 * common/gdb_splay_tree.h: New file.
5868
5869 2017-10-09 Tom Tromey <tom@tromey.com>
5870
5871 * mi/mi-main.c (do_nothing): Remove.
5872 (list_available_thread_groups): Update.
5873
5874 2017-10-09 Pedro Alves <palves@redhat.com>
5875
5876 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5877 reading registers when switching context.
5878
5879 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5880
5881 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5882 (fbsd_convert_siginfo): Likewise.
5883 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5884
5885 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5886
5887 * configure.ac (try_guile_versions): Remove guile-2.2.
5888 * configure: Regenerate.
5889
5890 2017-10-09 Tom Tromey <tom@tromey.com>
5891
5892 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5893 (COMPILE.pre): Use $(CXX).
5894
5895 2017-10-09 Pedro Alves <palves@redhat.com>
5896
5897 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5898 Use bool.
5899 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5900 * cp-support.h (cp_remove_params): Now returns a
5901 gdb::unique_xmalloc_ptr.
5902 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5903 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5904 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5905 returning a gdb::unique_xmalloc_ptr.
5906 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5907 * stack.c (find_frame_funname): Adjust to cp_remove_params
5908 returning a gdb::unique_xmalloc_ptr.
5909
5910 2017-10-08 Tom Tromey <tom@tromey.com>
5911
5912 * dwarf2read.c (dwarf2_get_dwz_file): Use
5913 gdb::unique_xmalloc_ptr.
5914 (find_slot_in_mapped_hash): Likewise.
5915 (dwarf2_physname): Likewise.
5916 (create_dwo_unit_in_dwp_v1): Use std::string.
5917 (create_dwo_unit_in_dwp_v2): Likewise.
5918 (lookup_dwo_cutu): Likewise.
5919 (inherit_abstract_dies): Use std::vector.
5920 (read_array_type): Likewise.
5921 (dwarf_decode_macros): Remove unused declaration.
5922 (unsigned_int_compar): Remove.
5923 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5924 (psymtabs_addrmap_cleanup): Remove.
5925
5926 2017-10-08 Tom Tromey <tom@tromey.com>
5927
5928 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5929 * frame.h (frame_cleanup_after_sniffer): Declare.
5930 (frame_prepare_for_sniffer): Return void.
5931 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5932 type of argument.
5933 (frame_prepare_for_sniffer): Return void.
5934
5935 2017-10-08 Tom Tromey <tom@tromey.com>
5936
5937 * utils.h (make_cleanup_value_free): Remove.
5938 * utils.c (do_value_free, struct cleanup): Remove.
5939 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5940 Use gdb_value_up.
5941 * value.h (struct value_deleter): New.
5942 (gdb_value_up): New typedef.
5943
5944 2017-10-08 Tom Tromey <tom@tromey.com>
5945
5946 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5947 (make_cleanup_free_search_symbols): Remove.
5948 (search_symbols): Return std::vector.
5949 (symbol_search::compare_search_syms): Now member of
5950 symbol_search. Change arguments.
5951 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5952 (symtab_symbol_info, rbreak_command): Update.
5953 * symtab.h (struct symbol_search) <next>: Remove.
5954 Add constructors.
5955 (symbol_search::operator<): New function.
5956 (symbol_search::operator==): New function.
5957 (search_symbols): Remove std::vector.
5958 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5959 (symbol_search::compare_search_syms): Declare.
5960
5961 2017-10-06 Yao Qi <yao.qi@linaro.org>
5962
5963 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5964 arch/aarch64-insn.o.
5965 Remove one rule.
5966 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5967
5968 2017-10-06 Yao Qi <yao.qi@linaro.org>
5969
5970 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5971 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5972 arch/arm-linux.o respectively.
5973 * configure.tgt: Likewise.
5974
5975 2017-10-06 Yao Qi <yao.qi@linaro.org>
5976
5977 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5978 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5979
5980 2017-10-06 Pedro Alves <palves@redhat.com>
5981
5982 * windows-nat.c: Include <algorithm>.
5983
5984 2017-10-06 Yao Qi <yao.qi@linaro.org>
5985
5986 * configure.tgt (i386_tobjs): New variable.
5987 (amd64_tobjs): New variable.
5988 Set $cpu_obs and $os_obs.
5989
5990 2017-10-06 Yao Qi <yao.qi@linaro.org>
5991
5992 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5993 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5994 (clean): Remove object files and dependency files.
5995 (distclean): Remove the directory.
5996 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5997 * configure: Re-generated.
5998 * configure.tgt: Replace amd64.o with arch/amd64.o.
5999
6000 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
6001
6002 PR build/22188
6003 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
6004 and SETEND.
6005
6006 2017-10-05 Pedro Alves <palves@redhat.com>
6007
6008 * linux-nat.c (linux_child_follow_fork): When following the parent
6009 and detaching the child, consult the parent thread's architecture
6010 instead of the child's.
6011
6012 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6013
6014 * ax.h: Do not include "doublest.h".
6015 (union agent_val): Remove.
6016
6017 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6018
6019 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
6020 (decimal_to_string): Return std::string object.
6021 (decimal_from_string): Accept std::string object. Return bool.
6022 (decimal_from_integral, decimal_from_doublest): Remove.
6023 (decimal_from_longest): Add prototype.
6024 (decimal_from_ulongest): Likewise.
6025 (decimal_to_longest): Likewise.
6026 (decimal_from_doublest): Likewise.
6027 * dfp.c: Do not include "gdbtypes.h" or "value.h".
6028 (MAX_DECIMAL_STRING): Move here.
6029 (decimal_to_string): Return std::string object.
6030 (decimal_from_string): Accept std::string object. Return bool.
6031 (decimal_from_integral): Remove, replace by ...
6032 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
6033 (decimal_to_longest): New function.
6034 (decimal_from_floating): Remove, replace by ...
6035 (decimal_from_doublest): ... this new function.
6036 (decimal_to_doublest): Update to new decimal_to_string interface.
6037
6038 * value.c (unpack_long): Use decimal_to_longest.
6039 * valops.c (value_cast): Use decimal_from_doublest instead of
6040 decimal_from_floating. Use decimal_from_[u]longest isntead of
6041 decimal_from_integral.
6042 * valarith.c (value_args_as_decimal): Likewise.
6043 * valprint.c (print_decimal_floating): Update to new
6044 decimal_to_string interface.
6045 * printcmd.c (printf_decfloat): Likewise.
6046 * c-exp.y (parse_number): Update to new decimal_from_string interface.
6047
6048 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
6049
6050 * doublest.h: Do not include "floatformat.h". Remove stale comments.
6051 * gdbtypes.c: Include "floatformat.h".
6052 * value.c: Likewise.
6053 * m68k-tdep.c: Likewise.
6054
6055 * findvar.c: Do not include "floatformat.h".
6056 * amd64-darwin-tdep.c: Likewise.
6057 * arm-linux-tdep.c: Likewise.
6058 * i386-darwin-tdep.c: Likewise.
6059 * i387-tdep.c: Likewise.
6060 * m68k-linux-tdep.c: Likewise.
6061 * mep-tdep.c: Likewise.
6062 * mips-tdep.c: Likewise.
6063 * nios2-tdep.c: Likewise.
6064 * s390-linux-tdep.c: Likewise.
6065 * sparc-obsd-tdep.c: Likewise.
6066 * sparc-tdep.c: Likewise.
6067 * sparc64-tdep.c: Likewise.
6068 * spu-tdep.c: Likewise.
6069 * tic6x-tdep.c: Likewise.
6070 * tilegx-tdep.c: Likewise.
6071 * vax-tdep.c: Likewise.
6072 * xstormy16-tdep.c: Likewise.
6073 * xtensa-tdep.c: Likewise.
6074
6075 * top.c: Do not include "doublest.h".
6076 * aarch64-tdep.c: Likewise.
6077 * alpha-tdep.c: Likewise.
6078 * arm-linux-tdep.c: Likewise.
6079 * m68k-linux-tdep.c: Likewise.
6080 * tilegx-tdep.c: Likewise.
6081 * xstormy16-tdep.c: Likewise.
6082
6083 2017-10-05 John Baldwin <jhb@FreeBSD.org>
6084
6085 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
6086 (mipsn32_fbsd_sigframe): Define.
6087 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
6088 for FreeBSD/mipsn32.
6089
6090 2017-10-05 John Baldwin <jhb@FreeBSD.org>
6091
6092 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
6093 AT_HWCAP.
6094
6095 2017-10-05 Tristan Gingold <tgingold@free.fr>
6096
6097 * MAINTAINERS (Misc): Update my email address.
6098
6099 2017-10-04 Pedro Alves <palves@redhat.com>
6100
6101 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
6102 it instead of target_gdbarch.
6103 (get_remote_state, get_remote_packet_size): Adjust
6104 get_remote_arch_state calls, passing down target_gdbarch
6105 explicitly.
6106 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
6107 'gdbarch' and use it instead of target_gdbarch.
6108 (get_memory_packet_size): Adjust get_remote_arch_state calls,
6109 passing down target_gdbarch explicitly.
6110 (struct stop_reply) <arch>: New field.
6111 (remote_parse_stop_reply): Use the stopped thread's architecture,
6112 not the current inferior's. Save the architecture in the
6113 stop_reply.
6114 (process_stop_reply): Use the stop reply's architecture.
6115 (process_g_packet, remote_fetch_registers)
6116 (remote_prepare_to_store, store_registers_using_G)
6117 (remote_store_registers): Adjust get_remote_arch_state calls,
6118 using the regcache's architecture.
6119 (remote_get_trace_status): Adjust get_remote_arch_state calls,
6120 passing down target_gdbarch explicitly.
6121 * spu-multiarch.c (spu_thread_architecture): Defer to the target
6122 beneath instead of calling target_gdbarch.
6123 * target.c (default_thread_architecture): Use the specified
6124 inferior's architecture, instead of the current inferior's
6125 architecture (via target_gdbarch).
6126
6127 2017-10-04 Pedro Alves <palves@redhat.com>
6128
6129 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
6130 case.
6131 (regcache_print): Handle !target_has_registers here instead.
6132
6133 2017-10-04 Pedro Alves <palves@redhat.com>
6134
6135 * frame.c (create_test_frame): Delete.
6136 * frame.h (create_test_frame): Delete.
6137 * gdbarch-selftests.c: Include gdbthread.h and target.h.
6138 (class regcache_test): Delete.
6139 (test_target_has_registers, test_target_has_stack)
6140 (test_target_has_memory, test_target_prepare_to_store)
6141 (test_target_store_registers): New functions.
6142 (test_target_ops): New class.
6143 (register_to_value_test): Error out if there's already a
6144 process_stratum (or higher) target pushed. Create a fuller mock
6145 environment, with mock target_ops, inferior, address space, thread
6146 and inferior_ptid.
6147 * progspace.c (struct address_space): Move to ...
6148 * progspace.h (struct address_space): ... here.
6149 * regcache.h (regcache::~regcache, regcache::raw_write)
6150 [GDB_SELF_TEST]: No longer virtual.
6151
6152 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
6153
6154 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
6155
6156 2017-10-04 Pedro Alves <palves@redhat.com>
6157
6158 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
6159 out of 'between TRY and CATCH'.
6160
6161 2017-10-04 Pedro Alves <palves@redhat.com>
6162
6163 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
6164 * common/common-exceptions.h (TRY): Open an outermost scope.
6165 Expand intro comment.
6166 (CATCH): Reindent.
6167 (END_CATCH): Close the outermost scope.
6168 * completer.c (complete_line_internal): Add missing END_CATCH.
6169
6170 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6171
6172 * NEWS (Changes since GDB 8.0): Add entry about new
6173 'set-cwd-on-gdbserver' feature.
6174 (New remote packets): Add entry for QSetWorkingDir.
6175 * common/common-inferior.h (set_inferior_cwd): New prototype.
6176 * infcmd.c (set_inferior_cwd): Remove "static".
6177 (show_cwd_command): Expand text to include remote debugging.
6178 * remote.c: Add PACKET_QSetWorkingDir.
6179 (remote_protocol_features) <QSetWorkingDir>: New entry for
6180 PACKET_QSetWorkingDir.
6181 (extended_remote_set_inferior_cwd): New function.
6182 (extended_remote_create_inferior): Call
6183 "extended_remote_set_inferior_cwd".
6184 (_initialize_remote): Call "add_packet_config_cmd" for
6185 QSetWorkingDir.
6186
6187 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6188
6189 * NEWS (New commands): Mention "set/show cwd".
6190 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
6191 "cd" command's help text.
6192 * common/common-inferior.h (get_inferior_cwd): New prototype.
6193 * infcmd.c (inferior_cwd_scratch): New global variable.
6194 (set_inferior_cwd): New function.
6195 (get_inferior_cwd): Likewise.
6196 (set_cwd_command): Likewise.
6197 (show_cwd_command): Likewise.
6198 (_initialize_infcmd): Add "set/show cwd" commands.
6199 * inferior.h (class inferior) <cwd>: New field.
6200 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
6201 (fork_inferior): Change inferior's cwd before its execution.
6202 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
6203 to CreateProcess.
6204
6205 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6206
6207 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
6208 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
6209 (COMMON_OBS): Add gdb_tilde_expand.o.
6210 * common/gdb_tilde_expand.c: New file.
6211 * common/gdb_tilde_expand.h: Likewise.
6212
6213 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
6214
6215 * gdbarch.sh (objfile): Remove duplicate declaration.
6216 * gdbarch.h: Regenerate.
6217
6218 2017-10-03 Tom Tromey <tom@tromey.com>
6219
6220 * utils.c (internal_vproblem): Use string_vprintf.
6221
6222 2017-10-03 Tom Tromey <tom@tromey.com>
6223
6224 * printcmd.c (info_symbol_command): Use std::string.
6225
6226 2017-10-03 Tom Tromey <tom@tromey.com>
6227
6228 * top.c (gdb_safe_append_history): Use std::string.
6229
6230 2017-10-03 Tom Tromey <tom@tromey.com>
6231
6232 * event-top.c (stdin_event_handler): Update.
6233 * main.c (captured_main_1): Update.
6234 * top.h (make_delete_ui_cleanup): Remove.
6235 (struct ui): Add constructor and destructor.
6236 (new_ui, delete_ui): Remove.
6237 * top.c (make_delete_ui_cleanup): Remove.
6238 (new_ui_command): Use std::unique_ptr.
6239 (delete_ui_cleanup): Remove.
6240 (ui::ui): Rename from new_ui. Update.
6241 (free_ui): Remove.
6242 (ui::~ui): Rename from delete_ui. Update.
6243
6244 2017-10-03 Tom Tromey <tom@tromey.com>
6245
6246 * symfile.c (load_progress): Use gdb::byte_vector.
6247
6248 2017-10-03 Tom Tromey <tom@tromey.com>
6249
6250 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6251 declaration.
6252 * printcmd.c (x_command): Remove unused declaration.
6253 * symfile.c (symbol_file_command): Remove unused declaration.
6254
6255 2017-10-03 Tom Tromey <tom@tromey.com>
6256
6257 * utils.c (internal_vproblem): Use std::string.
6258 (defaulted_query): Likewise.
6259
6260 2017-10-03 Tom Tromey <tom@tromey.com>
6261
6262 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6263 * top.c (execute_command_to_string): Update.
6264 * utils.c (make_cleanup_restore_page_info): Remove.
6265 (do_restore_page_info_cleanup): Remove.
6266 (set_batch_flag_and_restore_page_info):
6267 New.
6268 (make_cleanup_restore_page_info): Remove.
6269 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6270 (~set_batch_flag_and_restore_page_info): New
6271 (make_cleanup_restore_uinteger): Remove.
6272 (make_cleanup_restore_integer): Remove.
6273 (struct restore_integer_closure): Remove.
6274 (restore_integer): Remove.
6275 * utils.h (struct set_batch_flag_and_restore_page_info): New
6276 class.
6277 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6278 (make_cleanup_restore_page_info): Remove.
6279 (make_cleanup_restore_uinteger) Remove.
6280 (make_cleanup_restore_integer) Remove.
6281
6282 2017-10-03 Tom Tromey <tom@tromey.com>
6283
6284 * record-full.h (record_full_gdb_operation_disable_set): Return
6285 scoped_restore_tmpl<int>.
6286 * infrun.c (adjust_pc_after_break): Update.
6287 (handle_signal_stop): Update.
6288 * record-full.c (record_full_gdb_operation_disable_set): Return
6289 scoped_restore_tmpl<int>.
6290 (record_full_wait_1, record_full_insert_breakpoint)
6291 (record_full_remove_breakpoint, record_full_save)
6292 (record_full_goto_insn): Update.
6293
6294 2017-10-02 Tom Tromey <tom@tromey.com>
6295
6296 PR rust/22236:
6297 * rust-lang.c (rust_val_print_str): New function.
6298 (val_print_struct): Call it.
6299 (rust_subscript): Preserve name of slice type.
6300
6301 2017-10-02 Tom Tromey <tom@tromey.com>
6302
6303 * rust-lang.c (rust_subscript): Handle slices in
6304 EVAL_AVOID_SIDE_EFFECTS case.
6305
6306 2017-10-02 Tom Tromey <tom@tromey.com>
6307
6308 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6309
6310 2017-10-02 Tom Tromey <tom@tromey.com>
6311
6312 * rust-lang.h (rust_slice_type): Add "extern".
6313
6314 2017-10-02 Tom Tromey <tom@tromey.com>
6315 Pedro Alves <palves@redhat.com>
6316
6317 * ada-lang.h (ada_exc_info::operator<): Make const.
6318 (ada_exc_info::operator==): Make const.
6319 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6320 Make const.
6321
6322 2017-09-29 Tom Tromey <tom@tromey.com>
6323
6324 * target.c (read_whatever_is_readable): Change type of "result".
6325 Update.
6326 (free_memory_read_result_vector): Remove.
6327 (read_memory_robust): Change return type. Update.
6328 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6329 bin2hex, std::string.
6330 * target.h (memory_read_result_s): Remove typedef.
6331 (free_memory_read_result_vector): Remove.
6332 (read_memory_robust): Return std::vector.
6333
6334 2017-09-29 Tom Tromey <tom@tromey.com>
6335
6336 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6337
6338 2017-09-29 Tom Tromey <tom@tromey.com>
6339
6340 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6341 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6342 operator< and operator==.
6343 (ada_exceptions_list): Return a std::vector.
6344 * ada-lang.c (ada_exc_info::operator<): Rename from
6345 compare_ada_exception_info.
6346 (ada_exc_info::operator==): New.
6347 (sort_remove_dups_ada_exceptions_list): Change type of
6348 "exceptions".
6349 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6350 (ada_add_global_exceptions): Likewise.
6351 (ada_exceptions_list_1): Return a std::vector.
6352 (ada_exceptions_list): Likewise.
6353
6354 2017-09-29 Tom Tromey <tom@tromey.com>
6355
6356 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6357 'std::set *'.
6358 (print_one_inferior): Update.
6359 (free_vector_of_ints): Remove.
6360 (list_available_thread_groups): Change "ids" to std::set.
6361 (mi_cmd_list_thread_groups): Update.
6362 (struct collect_cores_data) <core>: Now a std::set.
6363 (collect_cores): Update.
6364 (unique): Remove.
6365 (print_one_inferior): Update.
6366
6367 2017-09-29 Tom Tromey <tom@tromey.com>
6368
6369 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6370 (mi_execute_async_cli_command): Likewise.
6371 (mi_cmd_trace_frame_collected): Use field_fmt.
6372
6373 2017-09-29 Tom Tromey <tom@tromey.com>
6374
6375 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6376 gdb::byte_vector.
6377
6378 2017-09-29 Tom Tromey <tom@tromey.com>
6379
6380 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6381
6382 2017-09-29 Tom Tromey <tom@tromey.com>
6383
6384 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6385
6386 2017-09-29 Tom Tromey <tom@tromey.com>
6387
6388 * varobj.h (varobj_gen_name): Return std::string.
6389 * varobj.c (varobj_gen_name): Return std::string.
6390 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6391 (mi_cmd_var_delete): Don't copy "name".
6392
6393 2017-09-29 Tom Tromey <tom@tromey.com>
6394
6395 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6396 (mi_cmd_break_insert_1): Update.
6397
6398 2017-09-29 Tom Tromey <tom@tromey.com>
6399
6400 * target.h (make_scoped_defer_target_commit_resume): Update.
6401 * target.c (make_scoped_defer_target_commit_resume): Rename from
6402 make_cleanup_defer_target_commit_resume. Return a
6403 scoped_restore.
6404 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6405
6406 2017-09-29 Tom Tromey <tom@tromey.com>
6407
6408 * main.c (captured_main_1): Remove unused declaration.
6409 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6410
6411 2017-09-29 Tom Tromey <tom@tromey.com>
6412
6413 * symtab.c (search_symbols): Remove unused outer cleanup.
6414 (make_source_files_completion_list): Remove unused declaration.
6415
6416 2017-09-29 Tom Tromey <tom@tromey.com>
6417
6418 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6419
6420 2017-09-29 Tom Tromey <tom@tromey.com>
6421
6422 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6423 gdb::byte_vector.
6424
6425 2017-09-29 Tom Tromey <tom@tromey.com>
6426
6427 * complaints.c (vcomplaint): Use std::string.
6428
6429 2017-09-29 Tom Tromey <tom@tromey.com>
6430
6431 * tracepoint.c (trace_variable_command): Use std::string.
6432 (encode_actions_1): Remove unused declarations.
6433 (create_tsv_from_upload): Use std::string.
6434
6435 2017-09-29 Tom Tromey <tom@tromey.com>
6436
6437 * cp-support.c (gdb_demangle): Use std::string.
6438
6439 2017-09-29 Tom Tromey <tom@tromey.com>
6440
6441 * stack.c (parse_frame_specification): Use std::string
6442 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6443
6444 2017-09-29 Tom Tromey <tom@tromey.com>
6445
6446 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6447
6448 2017-09-29 Tom Tromey <tom@tromey.com>
6449
6450 * utils.c (vfprintf_maybe_filtered): Use std::string.
6451 (vfprintf_unfiltered): Likewise.
6452
6453 2017-09-29 Tom Tromey <tom@tromey.com>
6454
6455 * event-top.c (top_level_prompt): Return std::string.
6456 (display_gdb_prompt): Update.
6457
6458 2017-09-29 Tom Tromey <tom@tromey.com>
6459
6460 * unittests/common-utils-selftests.c (format): New function.
6461 (string_vprintf_tests): New function.
6462 (_initialize_common_utils_selftests): Register new tests.
6463 * common/common-utils.c (string_vprintf): New function.
6464 * common/common-utils.h (string_vprintf): Declare.
6465
6466 2017-09-29 Pedro Alves <palves@redhat.com>
6467
6468 * common/rsp-low.c (unpack_varlen_hex): Constify.
6469 * common/rsp-low.h (unpack_varlen_hex): Constify.
6470 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6471 Constify.
6472 * remote.c (remote_set_permissions, read_ptid)
6473 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6474 (remote_static_tracepoint_marker_at)
6475 (remote_static_tracepoint_markers_by_strid)
6476 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6477 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6478 (parse_tracepoint_definition, parse_tsv_definition)
6479 (parse_static_tracepoint_marker_definition): Constify.
6480 * tracepoint.h (parse_static_tracepoint_marker_definition)
6481 (parse_trace_status, parse_tracepoint_status)
6482 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6483
6484 2017-09-29 Pedro Alves <palves@redhat.com>
6485
6486 * remote.c (target_buf, target_buf_size): Delete.
6487 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6488 Use the connection's packet buffer instead.
6489 All callers adjusted.
6490 (_initialize_remote): Remove references to target_buf and
6491 target_buf_size.
6492
6493 2017-09-28 Pedro Alves <palves@redhat.com>
6494
6495 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6496 unittests/common-utils-selftests.c.
6497 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6498 (COMMON_OBS): Remove utils-selftests.o.
6499 * utils-selftests.c: Move to ...
6500 * unittests/common-utils-selftests.c: ... here and rename self
6501 test to "string_printf".
6502
6503 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6504
6505 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6506 having NULL cus or tus.
6507
6508 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6509
6510 * arm-tdep.c: (convert_from_extended): Remove.
6511 (convert_to_extended): Likewise.
6512 (arm_extract_return_value): Use convert_typed_floating.
6513 (arm_store_return_value): Likewise.
6514
6515 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6516 * sh-tdep.c: Do not include "floatformat.h".
6517 (sh_littlebyte_bigword_type): New function.
6518 (sh_register_convert_to_virtual): Use convert_typed_floating.
6519 (sh_register_convert_to_raw): Likewise.
6520 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6521 (sh64_littlebyte_bigword_type): New function.
6522 (sh64_extract_return_value): Use convert_typed_floating.
6523 (sh64_register_convert_to_virtual): Likewise.
6524 (sh64_register_convert_to_raw): Likewise.
6525
6526 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6527
6528 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6529 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6530
6531 * gdbtypes.h (union type_specific): Make field floatformat hold
6532 just a single struct floatformat, not an array.
6533 (floatformat_from_type): Move here.
6534 * gdbtypes.c (floatformat_from_type): Move here. Update to
6535 changed TYPE_FLOATFORMAT definition.
6536 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6537 (recursive_dump_type): Likewise.
6538 (init_float_type): Install correct floatformat for byte order.
6539 (arch_float_type): Likewise.
6540
6541 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6542
6543 * gdbtypes.c (init_type): Change incoming argument from
6544 length-in-bytes to length-in-bits. Assert length is a
6545 multiple of TARGET_CHAR_BITS.
6546 (arch_type, arch_flags_type): Likewise.
6547 (init_integer_type): Update call to init_type.
6548 (init_character_type): Likewise.
6549 (init_boolean_type): Likewise.
6550 (init_float_type): Likewise.
6551 (init_decfloat_type): Likewise.
6552 (init_complex_type): Likewise.
6553 (init_pointer_type): Likewise.
6554 (objfile_type): Likewise.
6555 (arch_integer_type): Update call to arch_type.
6556 (arch_character_type): Likewise.
6557 (arch_boolean_type): Likewise.
6558 (arch_float_type): Likewise.
6559 (arch_decfloat_type): Likewise.
6560 (arch_complex_type): Likewise.
6561 (arch_pointer_type): Likewise.
6562 (gdbtypes_post_init): Likewise.
6563
6564 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6565 (read_base_type): Likewise.
6566 * mdebugread.c (basic_type): Likewise.
6567 * stabsread.c (dbx_init_float_type): Likewise.
6568 (rs6000_builtin_type): Likewise.
6569 (read_range_type): Likewise. Also, fix call to init_integer_type
6570 with erroneous length argument.
6571
6572 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6573 * d-lang.c (build_d_types): Likewise.
6574 * f-lang.c (build_fortran_types): Likewise.
6575 * go-lang.c (build_go_types): Likewise.
6576 * opencl-lang.c (build_opencl_types): Likewise.
6577 * jit.c (finalize_symtab): Likewise.
6578 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6579 (build_std_type_info_type): Likewise.
6580 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6581 update call to arch_flags_type.
6582
6583 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6584 arch_type.
6585 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6586 * windows-tdep.c (windows_get_tlb_type): Likewise.
6587
6588 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6589 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6590 * m32c-tdep.c (make_types): Likewise.
6591 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6592 (rl78_psw_type): Update call to arch_flags_type.
6593 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6594 * rx-tdep.c (rx_psw_type): Likewise.
6595 (rx_fpsw_type): Likewise.
6596 * sparc-tdep.c (sparc_psr_type): Likewise.
6597 (sparc_fsr_type): Likewise.
6598 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6599 (sparc64_ccr_type): Likewise.
6600 (sparc64_fsr_type): Likewise.
6601 (sparc64_fprs_type): Likewise.
6602
6603 2017-09-27 Tom Tromey <tom@tromey.com>
6604
6605 * findcmd.c (find_command): Constify.
6606
6607 2017-09-27 Tom Tromey <tom@tromey.com>
6608
6609 * ada-tasks.c (task_command_1, task_command): Constify.
6610
6611 2017-09-27 Tom Tromey <tom@tromey.com>
6612
6613 * symtab.c (maintenance_print_symbol_cache)
6614 (maintenance_flush_symbol_cache)
6615 (maintenance_print_symbol_cache_statistics): Constify.
6616
6617 2017-09-27 Tom Tromey <tom@tromey.com>
6618
6619 * inferior.c (detach_inferior_command, kill_inferior_command)
6620 (inferior_command): Constify.
6621
6622 2017-09-27 Tom Tromey <tom@tromey.com>
6623
6624 * regcache.c (regcache_print, maintenance_print_registers)
6625 (maintenance_print_raw_registers)
6626 (maintenance_print_cooked_registers)
6627 (maintenance_print_register_groups)
6628 (maintenance_print_remote_registers): Constify.
6629
6630 2017-09-27 Tom Tromey <tom@tromey.com>
6631
6632 * printcmd.c (map_display_numbers, undisplay_command)
6633 (enable_disable_display_command, enable_display_command)
6634 (disable_display_command): Constify.
6635
6636 2017-09-27 Tom Tromey <tom@tromey.com>
6637
6638 * breakpoint.h (delete_command): Don't declare.
6639 * breakpoint.c (delete_command, enable_once_command)
6640 (enable_count_command, enable_delete_command, breakpoint_1)
6641 (maintenance_info_breakpoints, stopin_command, stopat_command)
6642 (delete_command, delete_trace_command, save_breakpoints)
6643 (save_breakpoints_command, save_tracepoints_command): Constify.
6644
6645 2017-09-27 Tom Tromey <tom@tromey.com>
6646
6647 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6648 (skip_ws, extract_identifier, macro_define_command)
6649 (macro_undef_command, macro_list_command): Constify.
6650
6651 2017-09-27 Tom Tromey <tom@tromey.com>
6652
6653 * infcmd.c (environment_info, set_environment_command)
6654 (unset_environment_command, path_info, info_proc_cmd_1)
6655 (info_proc_cmd_mappings, info_proc_cmd_stat)
6656 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6657 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6658
6659 2017-09-27 Tom Tromey <tom@tromey.com>
6660
6661 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6662 Constify.
6663
6664 2017-09-27 Tom Tromey <tom@tromey.com>
6665
6666 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6667
6668 2017-09-27 Tom Tromey <tom@tromey.com>
6669
6670 * demangle.c (demangle_command): Constify.
6671
6672 2017-09-27 Tom Tromey <tom@tromey.com>
6673
6674 * progspace.c (maintenance_info_program_spaces_command):
6675 Constify.
6676
6677 2017-09-27 Tom Tromey <tom@tromey.com>
6678
6679 * compile/compile.c (check_raw_argument, compile_file_command)
6680 (compile_code_command, compile_print_command): Constify.
6681
6682 2017-09-27 Tom Tromey <tom@tromey.com>
6683
6684 * reggroups.c (maintenance_print_reggroups): Constify.
6685
6686 2017-09-27 Tom Tromey <tom@tromey.com>
6687
6688 * dwarf2read.c (save_gdb_index_command): Constify.
6689
6690 2017-09-27 Tom Tromey <tom@tromey.com>
6691
6692 * stap-probe.c (info_probes_stap_command): Constify.
6693
6694 2017-09-27 Tom Tromey <tom@tromey.com>
6695
6696 * fork-child.c (unset_exec_wrapper_command): Constify.
6697
6698 2017-09-27 Tom Tromey <tom@tromey.com>
6699
6700 * btrace.c (get_uint, get_context_size, no_chunk)
6701 (maint_btrace_packet_history_cmd)
6702 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6703 (maint_info_btrace_cmd): Constify.
6704
6705 2017-09-27 Tom Tromey <tom@tromey.com>
6706
6707 * reverse.c (delete_bookmark_command): Constify.
6708
6709 2017-09-27 Tom Tromey <tom@tromey.com>
6710
6711 * remote.c (set_memory_packet_size)
6712 (set_memory_write_packet_size, show_memory_write_packet_size)
6713 (set_memory_read_packet_size, show_memory_read_packet_size)
6714 (compare_sections_command, packet_command, remote_put_command)
6715 (remote_get_command, remote_delete_command): Constify.
6716
6717 2017-09-27 Tom Tromey <tom@tromey.com>
6718
6719 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6720 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6721 (set_mipsfpu_auto_command): Constify.
6722
6723 2017-09-27 Tom Tromey <tom@tromey.com>
6724
6725 * cli/cli-cmds.h (cd_command): Constify.
6726 * cli/cli-cmds.c (cd_command): Constify.
6727
6728 2017-09-27 Tom Tromey <tom@tromey.com>
6729
6730 * thread.c (thread_name_command, thread_find_command): Constify.
6731
6732 2017-09-27 Tom Tromey <tom@tromey.com>
6733
6734 * probe.c (enable_probes_command, disable_probes_command):
6735 Constify.
6736
6737 2017-09-27 Tom Tromey <tom@tromey.com>
6738
6739 * symfile.c (symbol_file_command): Constify.
6740 * gdbcore.h (deprecated_file_changed_hook): Constify.
6741 * exec.c (deprecated_file_changed_hook, exec_file_command)
6742 (file_command): Constify.
6743 * defs.h (symbol_file_command): Constify.
6744
6745 2017-09-27 Tom Tromey <tom@tromey.com>
6746
6747 * remote-fileio.c (set_system_call_allowed)
6748 (show_system_call_allowed): Constify.
6749
6750 2017-09-27 Tom Tromey <tom@tromey.com>
6751
6752 * tracepoint.c (delete_trace_variable_command)
6753 (tfind_end_command, tfind_start_command, tfind_pc_command)
6754 (tfind_tracepoint_command, tfind_line_command)
6755 (tfind_range_command, tfind_outside_command): Constify.
6756
6757 2017-09-27 Tom Tromey <tom@tromey.com>
6758
6759 * ax-gdb.c (maint_agent_printf_command, agent_command)
6760 (agent_eval_command): Constify.
6761
6762 2017-09-27 Tom Tromey <tom@tromey.com>
6763
6764 * tracepoint.c (info_scope_command): Constify.
6765 * python/python.c (gdbpy_decode_line): Constify.
6766 * python/py-breakpoint.c (bppy_init): Constify.
6767 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6768 * location.h: (new_linespec_location)
6769 (string_to_event_location_basic, string_to_event_location):
6770 Constify.
6771 * location.c (new_linespec_location)
6772 (string_to_event_location_basic, string_to_event_location):
6773 Constify.
6774 * linespec.h (decode_line_with_current_source)
6775 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6776 * linespec.c (linespec_lex_to_end)
6777 (decode_line_with_current_source)
6778 (decode_line_with_last_displayed): Constify.
6779 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6780 Constify.
6781 * cli/cli-cmds.c (edit_command, list_command): Constify.
6782 * breakpoint.h (until_break_command, watch_command_wrapper)
6783 (awatch_command_wrapper, rwatch_command_wrapper)
6784 (init_ada_exception_breakpoint): Constify.
6785 * breakpoint.c (break_command_1, dprintf_command)
6786 (break_range_command, watch_command_wrapper)
6787 (rwatch_command_wrapper, awatch_command_wrapper)
6788 (until_break_command, init_ada_exception_breakpoint)
6789 (strace_marker_create_sals_from_location, trace_command)
6790 (ftrace_command, strace_command, struct tracepoint): Constify.
6791 * ax-gdb.c (agent_command_1): Constify.
6792 * ada-lang.c (ada_exception_sal): Constify.
6793
6794 2017-09-27 Tom Tromey <tom@tromey.com>
6795
6796 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6797 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6798 (get_context_size, no_chunk, get_insn_history_modifiers)
6799 (cmd_record_insn_history, get_call_history_modifiers)
6800 (cmd_record_call_history): Constify.
6801
6802 2017-09-27 Tom Tromey <tom@tromey.com>
6803
6804 * source.c (show_substitute_path_command)
6805 (unset_substitute_path_command, set_substitute_path_command):
6806 Constify.
6807
6808 2017-09-27 Tom Tromey <tom@tromey.com>
6809
6810 * typeprint.c (maintenance_print_type): Constify.
6811 * maint.c (maintenance_dump_me, maintenance_demangle)
6812 (maintenance_time_display, maintenance_info_sections)
6813 (maintenance_print_statistics, maintenance_deprecate)
6814 (maintenance_undeprecate): Constify.
6815 (maintenance_do_deprecate): Constify. Use std::string.
6816 (maintenance_selftest): Constify.
6817 * gdbtypes.h (maintenance_print_type): Constify.
6818
6819 2017-09-27 Tom Tromey <tom@tromey.com>
6820
6821 * hppa-tdep.c (unwind_command): Constify.
6822
6823 2017-09-27 Tom Tromey <tom@tromey.com>
6824
6825 * target-descriptions.c (unset_tdesc_filename_cmd)
6826 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6827 Constify.
6828
6829 2017-09-27 Tom Tromey <tom@tromey.com>
6830
6831 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6832
6833 2017-09-27 Tom Tromey <tom@tromey.com>
6834
6835 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6836
6837 2017-09-27 Tom Tromey <tom@tromey.com>
6838
6839 * tui/tui-regs.c (tui_reg_command): Constify.
6840
6841 2017-09-27 Tom Tromey <tom@tromey.com>
6842
6843 * skip.c (skip_file_command, skip_function_command)
6844 (skip_enable_command, skip_disable_command, skip_delete_command):
6845 Constify.
6846
6847 2017-09-27 Tom Tromey <tom@tromey.com>
6848
6849 * record-btrace.c (cmd_record_btrace_bts_start)
6850 (cmd_record_btrace_pt_start): Constify.
6851
6852 2017-09-27 Tom Tromey <tom@tromey.com>
6853
6854 * symmisc.c (maintenance_print_symbols)
6855 (maintenance_print_msymbols, maintenance_print_objfiles)
6856 (maintenance_info_symtabs, maintenance_check_symtabs)
6857 (maintenance_expand_symtabs, maintenance_info_line_tables):
6858 Constify.
6859
6860 2017-09-27 Tom Tromey <tom@tromey.com>
6861
6862 * top.c (new_ui_command): Constify.
6863
6864 2017-09-27 Tom Tromey <tom@tromey.com>
6865
6866 * symfile.c (add_symbol_file_command)
6867 (remove_symbol_file_command, list_overlays_command)
6868 (map_overlay_command, unmap_overlay_command)
6869 (overlay_auto_command, overlay_manual_command)
6870 (overlay_off_command, overlay_load_command): Constify.
6871
6872 2017-09-27 Tom Tromey <tom@tromey.com>
6873
6874 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6875 (info_spu_mailbox_command, info_spu_dma_command)
6876 (info_spu_proxydma_command): Constify.
6877
6878 2017-09-27 Tom Tromey <tom@tromey.com>
6879
6880 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6881
6882 2017-09-27 Tom Tromey <tom@tromey.com>
6883
6884 * cli/cli-script.c (user_defined_command): Constify.
6885
6886 2017-09-27 Tom Tromey <tom@tromey.com>
6887
6888 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6889 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6890 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6891 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6892 (dump_binary_value, append_binary_memory, append_binary_value):
6893 Constify.
6894 (struct dump_context) <func>: Constify.
6895 (add_dump_command): Update.
6896
6897 2017-09-27 Tom Tromey <tom@tromey.com>
6898
6899 * cli/cli-cmds.c (show_version, show_configuration)
6900 (source_command, show_user): Constify.
6901
6902 2017-09-27 Tom Tromey <tom@tromey.com>
6903
6904 * target.c (maintenance_print_target_stack): Constify.
6905
6906 2017-09-27 Tom Tromey <tom@tromey.com>
6907
6908 * interps.c (interpreter_exec_cmd): Constify.
6909
6910 2017-09-27 Tom Tromey <tom@tromey.com>
6911
6912 * record-full.c (cmd_record_full_restore): Constify.
6913
6914 2017-09-27 Tom Tromey <tom@tromey.com>
6915
6916 * memattr.c (enable_mem_command, disable_mem_command)
6917 (delete_mem_command): Constify.
6918
6919 2017-09-27 Tom Tromey <tom@tromey.com>
6920
6921 * value.c (show_convenience): Constify.
6922
6923 2017-09-27 Tom Tromey <tom@tromey.com>
6924
6925 * gdbcore.h (core_file_command): Update.
6926 * corefile.c (core_file_command): Constify.
6927
6928 2017-09-27 Tom Tromey <tom@tromey.com>
6929
6930 * user-regs.c (maintenance_print_user_registers): Constify.
6931
6932 2017-09-27 Tom Tromey <tom@tromey.com>
6933
6934 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6935
6936 2017-09-27 Tom Tromey <tom@tromey.com>
6937
6938 * cp-support.c (first_component_command): Constify.
6939
6940 2017-09-27 Tom Tromey <tom@tromey.com>
6941
6942 * psymtab.c (maintenance_print_psymbols)
6943 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6944 Constify.
6945
6946 2017-09-27 Tom Tromey <tom@tromey.com>
6947
6948 * windows-tdep.c (display_tib): Constify.
6949
6950 2017-09-27 Tom Tromey <tom@tromey.com>
6951
6952 * linux-fork.c (delete_checkpoint_command)
6953 (detach_checkpoint_command): Constify.
6954
6955 2017-09-27 Tom Tromey <tom@tromey.com>
6956
6957 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6958
6959 2017-09-27 Tom Tromey <tom@tromey.com>
6960
6961 * arc-tdep.c (dump_arc_instruction_command): Constify.
6962
6963 2017-09-27 Tom Tromey <tom@tromey.com>
6964
6965 * valprint.c (set_radix, show_radix): Constify.
6966
6967 2017-09-27 Tom Tromey <tom@tromey.com>
6968
6969 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6970
6971 2017-09-27 Tom Tromey <tom@tromey.com>
6972
6973 * command.h (not_just_help_class_command): Update.
6974 * cli/cli-decode.h (not_just_help_class_command): Update.
6975 * cli/cli-decode.c (not_just_help_class_command): Constify.
6976
6977 2017-09-27 Tom Tromey <tom@tromey.com>
6978
6979 * gdb_bfd.c (maintenance_info_bfds): Constify.
6980
6981 2017-09-27 Tom Tromey <tom@tromey.com>
6982
6983 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6984 overloads.
6985 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6986 (do_const_cfunc): New function.
6987 (cmd_cfunc_eq): New overload.
6988 (cli_user_command_p): Check do_const_cfunc.
6989 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6990 const_cfunc.
6991 * command.h (add_cmd): Add const overload and no-function
6992 overload.
6993 (set_cmd_cfunc): Add const overload.
6994 (cmd_const_cfunc_ftype): Declare.
6995 (cmd_cfunc_eq): Add const overload.
6996 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6997 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6998 overload.
6999
7000 2017-09-27 Tom Tromey <tom@tromey.com>
7001
7002 * macroexp.c (get_next_token_for_substitution): New function.
7003 (substitute_args): Call it. Check for __VA_OPT__.
7004
7005 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
7006 Pedro Alves <palves@redhat.com>
7007
7008 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
7009 producer_is_icc_lt_14.
7010 (producer_is_icc_lt_14): New function.
7011 (check_producer): Add code for checking version of ICC.
7012 (producer_is_icc): Move to producer.c.
7013 (read_structure_type): Restrict ICC workaround to ICC<14.
7014 * producer.c: Include selftest.h.
7015 (producer_is_icc, producer_parsing_tests, _initialize_producer):
7016 New functions.
7017 * producer.h (producer_is_icc): New declaration.
7018
7019 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
7020
7021 * Makefile.in (SFILES): Add producer.c.
7022 (COMMON_OBS): Add producer.o
7023 * amd64-tdep.c (producer.h): Add new include.
7024 * dwarf2read.c (producer.h): Add new include.
7025 * producer.c: New file.
7026 * producer.h: New file.
7027 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
7028 producer.c.
7029 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
7030 producer.h.
7031
7032 2017-09-26 Matthias Klose <doko@ubuntu.com>
7033
7034 * configure.ac: Search ncursesw before ncurses.
7035 Check ncursesw/ncurses.h before ncurses/ncurses.h.
7036 * gdb_curses.h: Include <ncursesw/ncurses.h>
7037 * config.in, configure: Regenerate.
7038
7039 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7040
7041 PR gdb/22185
7042 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
7043 obsolete.
7044 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
7045 Remove i386sol2 support.
7046 * configure.nat <i386sol2>: Remove.
7047 <sol2-64>: Fold into ...
7048 <sol2>: ... this.
7049 Move common settings to default section.
7050 Add sol-thread.o.
7051 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
7052 x86_64-*-solaris2.1[0-9]*>: Rename to ...
7053 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
7054 <i[34567]86-*-solaris*>: Remove.
7055 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
7056
7057 * configure.ac: Remove wctype in libw check.
7058 (_MSE_INT_H): Don't define on Solaris 7-9.
7059 <solaris*>: Remove libthread_db.so.1 check.
7060 * configure: Regenerate.
7061 * config.in: Regenerate.
7062
7063 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
7064 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
7065 (gdb_ps_size_t): Remove.
7066 Use base types in users.
7067 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
7068
7069 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
7070
7071 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7072
7073 PR build/22206
7074 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
7075 (adi_is_addr_mapped): Likewise.
7076 (PSR_ICC): Don't redefine.
7077 (PSR_IMPL): Likewise.
7078
7079 2017-09-25 Tom Tromey <tom@tromey.com>
7080
7081 * regcache.c (regcache::dump): Use string_printf.
7082
7083 2017-09-25 Tom Tromey <tom@tromey.com>
7084
7085 * regcache.c (class regcache_invalidator): New.
7086 (struct register_to_invalidate): Remove.
7087 (make_cleanup_regcache_invalidate): Remove.
7088 (regcache::raw_write): Use regcache_invalidator.
7089
7090 2017-09-25 Tom Tromey <tom@tromey.com>
7091
7092 * spu-tdep.c (spu2ppu_sniffer): Update.
7093 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
7094 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
7095 Remove.
7096 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
7097 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
7098 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
7099 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
7100 (frame_pop): Update.
7101
7102 2017-09-25 Tom Tromey <tom@tromey.com>
7103
7104 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
7105 * regcache.h (regcache_xfree): Don't declare.
7106 * regcache.c (regcache_xfree): Remove.
7107 (do_regcache_xfree): Use delete.
7108 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
7109 * linux-fork.c (free_fork): Use delete.
7110 (fork_save_infrun_state): Likewise.
7111 * jit.c (jit_dealloc_cache): Use delete.
7112 * infrun.c (discard_infcall_suspend_state): Use delete.
7113
7114 2017-09-25 Tom Tromey <tom@tromey.com>
7115
7116 * regcache.h (regcache_xmalloc): Don't declare.
7117 (regcache_raw_set_cached_value): Update comment.
7118 * regcache.c (regcache_xmalloc): Remove.
7119 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
7120 * jit.c (jit_frame_sniffer): Use new.
7121 * frame.c (frame_save_as_regcache): Use new.
7122
7123 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7124
7125 * NEWS: Advertise support for guarded-storage registers on IBM z.
7126
7127 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7128
7129 * s390-linux-nat.c (have_regset_gs): New static variable.
7130 (s390_linux_fetch_inferior_registers): Handle guarded-storage
7131 control block and guarded-storage broadcast control regsets.
7132 (s390_read_description): Detect whether the target has
7133 guarded-storage support, return appropriate tdesc.
7134 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
7135 (features/s390x-gs-linux64.c): Likewise.
7136 (struct gdbarch_tdep) <have_gs>: New field.
7137 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
7138 (s390_gsbc_regset): New variables.
7139 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
7140 and s390_gsbc_regset, if applicable.
7141 (s390_core_read_description): Check whether core file was from a
7142 target with guarded-storage support; include appropriate regsets.
7143 (s390_gdbarch_init): Add registers for guarded-storage support.
7144 (_initialize_s390_tdep): Initialize new target descriptions that
7145 include registers for guarded-storage support.
7146 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
7147 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
7148 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
7149 (S390_NUM_REGS): Adjust macro definition.
7150 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
7151 (tdesc_s390x_gs_linux64): New declarations.
7152
7153 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7154
7155 * features/s390-gs-linux64.xml: New file.
7156 * features/s390-gs.xml: New file.
7157 * features/s390-gsbc.xml: New file.
7158 * features/s390x-gs-linux64.xml: New file.
7159 * features/Makefile (WHICH): Add s390-gs-linux64 and
7160 s390x-gs-linux64.
7161 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
7162 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
7163 * features/s390-gs-linux64.c: New generated file.
7164 * features/s390x-gs-linux64.c: New file.
7165 * regformats/s390-gs-linux64.dat: New file.
7166 * regformats/s390x-gs-linux64.dat: New file.
7167
7168 2017-09-23 Tom Tromey <tom@tromey.com>
7169
7170 * defs.h (make_cleanup_override_quit_handler): Don't declare.
7171
7172 2017-09-22 Tom Tromey <tom@tromey.com>
7173
7174 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
7175 type to scoped_restore_tmpl.
7176 <scoped_input_handler>: Initialize m_quit_handler directly.
7177
7178 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7179
7180 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
7181 (cd_command): Likewise. Free "current_directory" before
7182 assigning to it.
7183 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7184 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
7185 * top.c (gdb_dirbuf): Remove global declaration.
7186 * top.h (gdb_dirbuf): Likewise.
7187
7188 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7189
7190 * gnulib/aclocal.m4: Regenerate.
7191 * gnulib/config.in: Regenerate.
7192 * gnulib/configure: Regenerate.
7193 * gnulib/import/Makefile.am: Regenerate.
7194 * gnulib/import/Makefile.in: Regenerate.
7195 * gnulib/import/assure.h: New file.
7196 * gnulib/import/at-func.c: Likewise
7197 * gnulib/import/chdir-long.c: New file.
7198 * gnulib/import/chdir-long.h: New file.
7199 * gnulib/import/cloexec.c: New file.
7200 * gnulib/import/cloexec.h: New file.
7201 * gnulib/import/close.c: New file.
7202 * gnulib/import/closedir.c: New file.
7203 * gnulib/import/dirent-private.h: New file.
7204 * gnulib/import/dup-safer.c: New file.
7205 * gnulib/import/dup.c: New file.
7206 * gnulib/import/dup2.c: New file.
7207 * gnulib/import/error.c: New file.
7208 * gnulib/import/error.h: New file.
7209 * gnulib/import/exitfail.c: New file.
7210 * gnulib/import/exitfail.h: New file.
7211 * gnulib/import/fchdir.c: New file.
7212 * gnulib/import/fcntl.c: New file.
7213 * gnulib/import/fcntl.in.h: New file.
7214 * gnulib/import/fd-hook.c: New file.
7215 * gnulib/import/fd-hook.h: New file.
7216 * gnulib/import/fd-safer.c: New file.
7217 * gnulib/import/fdopendir.c: New file.
7218 * gnulib/import/filename.h: New file.
7219 * gnulib/import/filenamecat-lgpl.c: New file.
7220 * gnulib/import/filenamecat.h: New file.
7221 * gnulib/import/fstat.c: New file.
7222 * gnulib/import/fstatat.c: New file.
7223 * gnulib/import/getcwd-lgpl.c: New file.
7224 * gnulib/import/getcwd.c: New file.
7225 * gnulib/import/getdtablesize.c: New file.
7226 * gnulib/import/getlogin_r.c: New file.
7227 * gnulib/import/getprogname.c: New file.
7228 * gnulib/import/getprogname.h: New file.
7229 * gnulib/import/gettext.h: New file.
7230 * gnulib/import/glob-libc.h: New file.
7231 * gnulib/import/glob.c: New file.
7232 * gnulib/import/glob.in.h: New file.
7233 * gnulib/import/intprops.h: New file.
7234 * gnulib/import/m4/chdir-long.m4: New file.
7235 * gnulib/import/m4/close.m4: New file.
7236 * gnulib/import/m4/closedir.m4: New file.
7237 * gnulib/import/m4/d-ino.m4: New file.
7238 * gnulib/import/m4/d-type.m4: New file.
7239 * gnulib/import/m4/dup.m4: New file.
7240 * gnulib/import/m4/dup2.m4: New file.
7241 * gnulib/import/m4/error.m4: New file.
7242 * gnulib/import/m4/fchdir.m4: New file.
7243 * gnulib/import/m4/fcntl.m4: New file.
7244 * gnulib/import/m4/fcntl_h.m4: New file.
7245 * gnulib/import/m4/fdopendir.m4: New file.
7246 * gnulib/import/m4/filenamecat.m4: New file.
7247 * gnulib/import/m4/fstat.m4: New file.
7248 * gnulib/import/m4/fstatat.m4: New file.
7249 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7250 * gnulib/import/m4/getcwd-path-max.m4: New file.
7251 * gnulib/import/m4/getcwd.m4: New file.
7252 * gnulib/import/m4/getdtablesize.m4: New file.
7253 * gnulib/import/m4/getlogin_r.m4: New file.
7254 * gnulib/import/m4/getprogname.m4: New file.
7255 * gnulib/import/m4/glob.m4: New file.
7256 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7257 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7258 * gnulib/import/m4/mempcpy.m4: New file.
7259 * gnulib/import/m4/memrchr.m4: New file.
7260 * gnulib/import/m4/mode_t.m4: New file.
7261 * gnulib/import/m4/msvc-inval.m4: New file.
7262 * gnulib/import/m4/msvc-nothrow.m4: New file.
7263 * gnulib/import/m4/open.m4: New file.
7264 * gnulib/import/m4/openat.m4: New file.
7265 * gnulib/import/m4/opendir.m4: New file.
7266 * gnulib/import/m4/readdir.m4: New file.
7267 * gnulib/import/m4/realloc.m4: New file.
7268 * gnulib/import/m4/rewinddir.m4: New file.
7269 * gnulib/import/m4/save-cwd.m4: New file.
7270 * gnulib/import/m4/strdup.m4: New file.
7271 * gnulib/import/m4/strerror.m4: New file.
7272 * gnulib/import/m4/unistd-safer.m4: New file.
7273 * gnulib/import/mempcpy.c: New file.
7274 * gnulib/import/memrchr.c: New file.
7275 * gnulib/import/msvc-inval.c: New file.
7276 * gnulib/import/msvc-inval.h: New file.
7277 * gnulib/import/msvc-nothrow.c: New file.
7278 * gnulib/import/msvc-nothrow.h: New file.
7279 * gnulib/import/open.c: New file.
7280 * gnulib/import/openat-die.c: New file.
7281 * gnulib/import/openat-priv.h: New file.
7282 * gnulib/import/openat-proc.c: New file.
7283 * gnulib/import/openat.c: New file.
7284 * gnulib/import/openat.h: New file.
7285 * gnulib/import/opendir.c: New file.
7286 * gnulib/import/pipe-safer.c: New file.
7287 * gnulib/import/readdir.c: New file.
7288 * gnulib/import/realloc.c: New file.
7289 * gnulib/import/rewinddir.c: New file.
7290 * gnulib/import/save-cwd.c: New file.
7291 * gnulib/import/save-cwd.h: New file.
7292 * gnulib/import/strdup.c: New file.
7293 * gnulib/import/strerror-override.c: New file.
7294 * gnulib/import/strerror-override.h: New file.
7295 * gnulib/import/strerror.c: New file.
7296 * gnulib/import/unistd--.h: New file.
7297 * gnulib/import/unistd-safer.h: New file.
7298 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7299 "getcwd" and "glob".
7300 * ser-tcp.c: Undefine "close" before redefining it.
7301
7302 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7303
7304 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7305 get rid of res_val.
7306
7307 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7308
7309 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7310 <sol2,sparc>: Likewise.
7311 <sol2-64,i386>: Likewise.
7312
7313 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7314 -Wdeprecated-declarations on *-*-solaris*.
7315 * configure: Regenerate.
7316
7317 * procfs.c: Include "nat/inferior.h".
7318 (procfs_info_proc): Fix typo.
7319
7320 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7321
7322 * remote.c (vector): Include.
7323 (struct private_thread_info): Add field, thread_handle.
7324 (free_private_thread_info): Deallocate storage associated with
7325 thread handle.
7326 (get_private_info_thread): Initialize `thread_handle' field.
7327 (struct thread_item): Add field, thread_handle.
7328 (clear_threads_listing_context): Deallocate storage associated
7329 with thread handle.
7330 (start_thread): Add support for "handle" attribute.
7331 (thread_attributes): Add "handle".
7332 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7333 field.
7334 (remote_update_thread_list): Update thread_handle.
7335 (remote_thread_handle_to_thread_info): New function.
7336 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7337
7338 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7339
7340 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7341 function.
7342 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7343 * python/python-internal.h (thread_object_type): Declare.
7344
7345 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7346
7347 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7348 (target_thread_handle_to_thread_info): Declare.
7349 * target.c (target_thread_handle_to_thread_info): New function.
7350 * target-delegates.c: Regenerate.
7351 * gdbthread.h (find_thread_by_handle): Declare.
7352 * thread.c (find_thread_by_handle): New function.
7353 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7354 function.
7355 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7356
7357 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7358
7359 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7360
7361 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7362
7363 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7364
7365 2017-09-21 Yao Qi <yao.qi@linaro.org>
7366
7367 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7368 to gdb_target_obs.
7369
7370 2017-09-20 Tom Tromey <tom@tromey.com>
7371
7372 * breakpoint.c (struct counted_command_line): Remove.
7373 (breakpoint_commands): Update.
7374 (alloc_counted_command_line, incref_counted_command_line)
7375 (decref_counted_command_line, do_cleanup_counted_command_line)
7376 (make_cleanup_decref_counted_command_line): Remove.
7377 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7378 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7379 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7380 (save_breakpoints): Update.
7381 * breakpoint.h (counted_command_line): Now a typedef to
7382 shared_ptr.
7383 (struct breakpoint) <commands>: Now a counted_command_line.
7384 (struct bpstats) <command>: Likewise.
7385
7386 2017-09-20 Tom Tromey <tom@tromey.com>
7387
7388 * breakpoint.c (struct commands_info, do_map_commands_command):
7389 Remove.
7390 (commands_command_1): Update.
7391 (iterate_over_related_breakpoints): Take a function_view.
7392 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7393 (delete_command): Update.
7394 (map_breakpoint_numbers): Take a function_view.
7395 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7396 (disable_command): Update.
7397 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7398 (enable_command): Update.
7399 (struct disp_data, do_enable_breakpoint_disp)
7400 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7401 (do_map_enable_delete_breakpoint): Remove.
7402 (enable_once_command, enable_count_command, enable_delete_command)
7403 (delete_trace_variable_command): Update.
7404
7405 2017-09-20 Tom Tromey <tom@tromey.com>
7406
7407 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7408 (bpstat_clear): Use delete.
7409 (bpstats): New constructors.
7410 (bpstat_copy, bpstat_stop_status): Use new.
7411 (dprintf_after_condition_true): Update.
7412 * breakpoint.h (bpstats::bpstats): Add constructors.
7413 (bpstats::~bpstats): Add destructor.
7414
7415 2017-09-20 Pedro Alves <palves@redhat.com>
7416
7417 * eval.c (make_params): Delete, refactored as ...
7418 (class fake_method): ... this new type's ctor.
7419 (fake_method::~fake_method): New.
7420 (evaluate_subexp_standard): Use 'fake_method'.
7421
7422 2017-09-20 Tom Tromey <tom@tromey.com>
7423
7424 * windows-nat.c (get_windows_debug_event, windows_wait)
7425 (do_initial_windows_stuff, windows_attach): Update.
7426 * utils.c (vwarning, internal_vproblem): Update.
7427 (ui_unregister_input_event_handler_cleanup)
7428 (prepare_to_handle_input): Remove.
7429 (class scoped_input_handler): New.
7430 (defaulted_query, prompt_for_continue): Update.
7431 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7432 Update.
7433 * top.c (undo_terminal_modifications_before_exit): Update.
7434 * target/target.h (target_terminal_init, target_terminal_inferior)
7435 (target_terminal_ours): Don't declare.
7436 (class target_terminal): New.
7437 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7438 (target_terminal_ours_for_output)
7439 (make_cleanup_restore_target_terminal): Don't declare.
7440 (target_terminal_info): Remove.
7441 * target.c (enum terminal_state, terminal_state): Remove.
7442 (target_terminal::terminal_state): Define.
7443 (target_terminal::init): Rename from target_terminal_init.
7444 (target_terminal::inferior): Rename from
7445 target_terminal_inferior.
7446 (target_terminal::ours): Rename from target_terminal_ours.
7447 (target_terminal::ours_for_output): Rename from
7448 target_terminal_ours_for_output.
7449 (target_terminal::info): New method.
7450 (cleanup_restore_target_terminal)
7451 (make_cleanup_restore_target_terminal): Remove.
7452 * solib.c (handle_solib_event): Update.
7453 * remote.c (remote_serial_quit_handler): Update.
7454 (remote_terminal_inferior, remote_wait_as): Update.
7455 * record-full.c (record_full_wait_1): Update.
7456 * nto-procfs.c (procfs_create_inferior): Update.
7457 * nat/fork-inferior.c (startup_inferior): Update.
7458 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7459 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7460 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7461 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7462 (mi_breakpoint_created, mi_breakpoint_deleted)
7463 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7464 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7465 (mi_user_selected_context_changed, report_initial_inferior):
7466 Update.
7467 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7468 (linux_nat_terminal_inferior): Update.
7469 * infrun.c (follow_fork_inferior)
7470 (handle_vfork_child_exec_or_exit, do_target_resume)
7471 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7472 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7473 Update.
7474 * inflow.c (child_terminal_init, info_terminal_command): Update.
7475 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7476 (attach_command): Update.
7477 * infcall.c (call_thread_fsm_should_stop): Update.
7478 * gnu-nat.c (gnu_attach): Update.
7479 * extension.c (struct active_ext_lang_state)
7480 (restore_active_ext_lang): Update.
7481 * exceptions.c (print_flush): Update.
7482 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7483 (struct quit_handler_cleanup_data, restore_quit_handler)
7484 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7485 Remove.
7486 * cp-support.c (gdb_demangle): Update.
7487 * breakpoint.c (update_inserted_breakpoint_locations)
7488 (insert_breakpoint_locations, handle_jit_event)
7489 (disable_breakpoints_in_unloaded_shlib): Update.
7490 * annotate.c (annotate_breakpoints_invalid)
7491 (annotate_frames_invalid): Update.
7492
7493 2017-09-20 Tom Tromey <tom@tromey.com>
7494
7495 * main.c (catch_command_errors): Rename from
7496 catch_command_errors_const.
7497 (captured_main_1): Update.
7498
7499 2017-09-20 Pedro Alves <palves@redhat.com>
7500
7501 * cli/cli-cmds.c (list_command): Use print_sal_location.
7502 (print_sal_location): New function.
7503 (ambiguous_line_spec): Use print_sal_location.
7504 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7505 * symtab.c (find_function_start_sal): Likewise.
7506 * symtab.h (symtab_and_line::symbol): New field.
7507
7508 2017-09-20 Pedro Alves <palves@redhat.com>
7509
7510 * linespec.c (minsym_found): Handle non-text minsyms.
7511 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7512
7513 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7514
7515 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7516 backslash.
7517
7518 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7519
7520 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7521 vmovups instead vmovaps.
7522 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7523
7524 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7525
7526 * NEWS (Changes since GDB 8.0): Add starti.
7527 * infcmd.c (enum run_break): New.
7528 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7529 case.
7530 (run_command): Use enum run_how.
7531 (start_command): Likewise.
7532 (starti_command): New function.
7533 (RUN_ARGS_HELP): New macro.
7534 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7535 commands. Add starti command.
7536
7537 2017-09-19 Yao Qi <yao.qi@linaro.org>
7538
7539 * Makefile.in (monitor.o): Remove the rule.
7540
7541 2017-09-19 Yao Qi <yao.qi@linaro.org>
7542
7543 * annotate.h (struct annotate_arg_emitter): Use
7544 DISABLE_COPY_AND_ASSIGN.
7545 * common/refcounted-object.h (refcounted_object): Likewise.
7546 * completer.h (struct completion_result): Likewise.
7547 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7548 * filename-seen-cache.h (filename_seen_cache): Likewise.
7549 * gdbcore.h (thread_section_name): Likewise.
7550 * gdb_regex.h (compiled_regex): Likewise.
7551 * gdbthread.h (scoped_restore_current_thread): Likewise.
7552 * inferior.h (scoped_restore_current_inferior): Likewise.
7553 * jit.c (jit_reader): Likewise.
7554 * linespec.h (struct linespec_result): Likewise.
7555 * mi/mi-parse.h (struct mi_parse): Likewise.
7556 * nat/fork-inferior.c (execv_argv): Likewise.
7557 * progspace.h (scoped_restore_current_program_space): Likewise.
7558 * python/python-internal.h (class gdbpy_enter): Likewise.
7559 * regcache.h (regcache): Likewise.
7560 * target-descriptions.c (struct tdesc_reg): Likewise.
7561 (struct tdesc_type): Likewise.
7562 (struct tdesc_feature): Likewise.
7563 * ui-out.h (ui_out_emit_type): Likewise.
7564
7565 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7566
7567 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7568 label abort_expression.
7569
7570 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7571
7572 * common/buffer.c (buffer_xml_printf): Adjust.
7573 * common/xml-utils.c (xml_escape_text): Change return type to
7574 std::string, update code accordingly.
7575 * common/xml-utils.h (xml_escape_text): Change return type to
7576 std::string.
7577 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7578 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7579 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7580 Adjust.
7581
7582 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7583
7584 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7585 (SUBDIR_UNITTESTS_OBS): Add new object file.
7586 * unittests/xml-utils-selftests.c: New file.
7587
7588 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7589
7590 * common/selftest.h (selftest): New struct/interface.
7591 (register_test): Add name parameter, add new overload.
7592 (run_tests): Add filter parameter.
7593 (for_each_selftest_ftype): New typedef.
7594 (for_each_selftest): New declaration.
7595 * common/selftest.c (tests): Change type to
7596 map<string, unique_ptr<selftest>>.
7597 (simple_selftest): New struct.
7598 (register_test): New function.
7599 (register_test): Add name parameter and use it.
7600 (run_tests): Add filter parameter and use it. Add prints.
7601 Adjust to vector -> map change.
7602 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7603 registering selftests.
7604 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7605 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7606 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7607 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7608 * findvar.c (_initialize_findvar): Likewise.
7609 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7610 * maint.c (maintenance_selftest): Update call to run_tests.
7611 (maintenance_info_selftests): New function.
7612 (_initialize_maint_cmds): Register "maintenance info selftests"
7613 command. Update "maintenance selftest" doc.
7614 * regcache.c (_initialize_regcache): Add names when registering
7615 selftests.
7616 * rust-exp.y (_initialize_rust_exp): Likewise.
7617 * selftest-arch.c (gdbarch_selftest): New struct.
7618 (gdbarch_tests): Remove.
7619 (register_test_foreach_arch): Add name parameter. Call
7620 register_test.
7621 (tests_with_arch): Remove, move most content to
7622 gdbarch_selftest::operator().
7623 (_initialize_selftests_foreach_arch): Remove.
7624 * selftest-arch.h (register_test_foreach_arch): Add name
7625 parameter.
7626 (run_tests_with_arch): New declaration.
7627 * utils-selftests.c (_initialize_utils_selftests): Add names
7628 when registering selftests.
7629 * utils.c (_initialize_utils): Likewise.
7630 * unittests/array-view-selftests.c
7631 (_initialize_array_view_selftests): Likewise.
7632 * unittests/environ-selftests.c (_initialize_environ_selftests):
7633 Likewise.
7634 * unittests/function-view-selftests.c
7635 (_initialize_function_view_selftests): Likewise.
7636 * unittests/offset-type-selftests.c
7637 (_initialize_offset_type_selftests): Likewise.
7638 * unittests/optional-selftests.c
7639 (_initialize_optional_selftests): Likewise.
7640 * unittests/scoped_restore-selftests.c
7641 (_initialize_scoped_restore_selftests): Likewise.
7642 * NEWS: Document "maintenance selftest" and "maint info
7643 selftests".
7644
7645 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7646
7647 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7648 scoped_restore.
7649
7650 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7651
7652 * mi/mi-main.c (mi_load_progress): Make uiout variable
7653 a unique_ptr.
7654
7655 2017-09-15 Pedro Alves <palves@redhat.com>
7656
7657 * compile/compile-c-types.c (convert_enum, convert_int)
7658 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7659
7660 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7661
7662 * dwarf2read.c (copy_string): Remove.
7663 (parse_macro_definition): Replace copy_string with savestring.
7664
7665 2017-09-15 Yao Qi <yao.qi@linaro.org>
7666
7667 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7668 gdb_target_obs.
7669 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7670 Likewise.
7671 (i[34567]86-*-linux*): Likewise.
7672
7673 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7674
7675 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7676 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7677 <stack>: Change type to std::vector.
7678 <stack_len, stack_allocated>: Remove.
7679 <grow_stack>: Remove.
7680 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7681 (dwarf_expr_context::~dwarf_expr_context): Remove.
7682 (dwarf_expr_context::grow_stack): Remove.
7683 (dwarf_expr_context::push): Adjust.
7684 (dwarf_expr_context::pop): Adjust.
7685 (dwarf_expr_context::fetch): Adjust.
7686 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7687 (dwarf_expr_context::stack_empty_p): Adjust.
7688 (dwarf_expr_context::execute_stack_op): Adjust.
7689
7690 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7691
7692 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7693 return type to bool.
7694 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7695
7696 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7697
7698 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7699 Change type to bool.
7700 (dwarf_stack_value) <in_stack_memory>: Likewise.
7701 (dwarf_expr_context) <push_address>: Change parameter type to
7702 bool.
7703 <fetch_in_stack_memory>: Change return type to bool.
7704 <push>: Change parameter type to bool.
7705 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7706 to bool.
7707 (dwarf_expr_context::push_address): Likewise.
7708 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7709 to bool.
7710 (dwarf_expr_context::execute_stack_op): Adjust.
7711 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7712
7713 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7714
7715 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7716 (struct dwarf_expr_context) <n_pieces>: Remove.
7717 <pieces>: Change type to std::vector.
7718 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7719 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7720 pieces.
7721 (dwarf_expr_context::add_piece): Adjust.
7722 * dwarf2loc.c (struct piece_closure): Initialize fields.
7723 <n_pieces>: Remove.
7724 <pieces>: Change type to std::vector.
7725 (allocate_piece_closure): Adjust, change parameter to
7726 std::vector rvalue and std::move it to piece_closure.
7727 (rw_pieced_value): Adjust.
7728 (check_pieced_synthetic_pointer): Adjust.
7729 (indirect_synthetic_pointer): Adjust.
7730 (coerce_pieced_ref): Adjust.
7731 (free_pieced_value_closure): Adjust. Use delete to free
7732 piece_closure.
7733 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7734 to allocate_piece_closure.
7735 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7736
7737 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7738
7739 * probe.h (probe_ops_cp): Remove typedef.
7740 (DEF_VEC_P (probe_ops_cp)): Remove.
7741 (all_probe_ops): Change type to std::vector.
7742 * probe.c (info_probes_for_ops): Adjust to vector change.
7743 (probe_linespec_to_ops): Likewise.
7744 (all_probe_ops): Change type to std::vector.
7745 (_initialize_probe): Adjust to vector change.
7746 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7747 * elfread.c (elf_get_probes): Likewise.
7748 * stap-probe.c (_initialize_stap_probe): Likewise.
7749
7750 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7751
7752 * probe.h (struct bound_probe): Define constructors.
7753 * probe.c (bound_probe_s): Remove typedef.
7754 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7755 (collect_probes): Change return type to std::vector, remove
7756 cleanup.
7757 (compare_probes): Return bool, change parameter type. Change
7758 semantic to "less than".
7759 (gen_ui_out_table_header_info): Change parameter to std::vector
7760 and update.
7761 (exists_probe_with_pops): Likewise.
7762 (info_probes_for_ops): Update to std::vector change.
7763 (enable_probes_command): Likewise.
7764 (disable_probes_command): Likewise.
7765
7766 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7767
7768 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7769 vec to std::vector.
7770 * probe.c (parse_probes_in_pspace): Update.
7771 (find_probes_in_objfile): Update.
7772 (find_probe_by_pc): Update.
7773 (collect_probes): Update.
7774 (probe_any_get_probes): Update.
7775 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7776 return type to reference to std::vector.
7777 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7778 std::vector and update.
7779 (dtrace_process_dof): Likewise.
7780 (dtrace_get_probes): Likewise.
7781 * elfread.c (elf_get_probes): Change return type to std::vector,
7782 store an std::vector in bfd_data.
7783 (probe_key_free): Update to std::vector.
7784 * stap-probe.c (handle_stap_probe): Change parameter to
7785 std::vector and update.
7786 (stap_get_probes): Likewise.
7787 * symfile-debug.c (debug_sym_get_probes): Change return type to
7788 std::vector and update.
7789
7790 2017-09-11 Tom Tromey <tom@tromey.com>
7791
7792 * breakpoint.c (program_breakpoint_here_p): Update.
7793 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7794 from make_show_memory_breakpoints_cleanup. Return a
7795 scoped_restore_tmpl<int>.
7796 (restore_show_memory_breakpoints): Remove.
7797 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7798 * mem-break.c (memory_validate_breakpoint): Update.
7799 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7800 (ia64_memory_remove_breakpoint): Update.
7801 (ia64_breakpoint_from_pc): Update.
7802 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7803 from make_show_memory_breakpoints_cleanup.
7804
7805 2017-09-11 Tom Tromey <tom@tromey.com>
7806
7807 * d-namespace.c (d_lookup_symbol): Use std::string.
7808 (find_symbol_in_baseclass): Likewise.
7809
7810 2017-09-11 Tom Tromey <tom@tromey.com>
7811
7812 * ctf.c (ctf_start): Use std::string.
7813
7814 2017-09-11 Tom Tromey <tom@tromey.com>
7815
7816 * ada-lang.c (is_known_support_routine): Update.
7817 (ada_unhandled_exception_name_addr_from_raise): Update.
7818 * guile/scm-frame.c (gdbscm_frame_name): Update.
7819 * python/py-frame.c (frapy_name): Update.
7820 (frapy_function): Update.
7821 * stack.h (find_frame_funname): Update.
7822 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7823 (print_frame): Update.
7824
7825 2017-09-11 Tom Tromey <tom@tromey.com>
7826
7827 * findcmd.c (put_bits): Take a gdb::byte_vector.
7828 (parse_find_args): Return gdb::byte_vector. "args" now const.
7829 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7830 cleanups.
7831 (find_command): Update.
7832
7833 2017-09-11 Tom Tromey <tom@tromey.com>
7834
7835 * cli/cli-script.c (class scoped_restore_hook_in): New.
7836 (clear_hook_in_cleanup): Remove.
7837 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7838 scoped_restore_hook_in.
7839
7840 2017-09-11 Tom Tromey <tom@tromey.com>
7841
7842 * cli/cli-script.c (restore_interp): Remove.
7843 (read_command_lines): Use scoped_restore_interp.
7844 * interps.c (scoped_restore_interp::set_temp): Rename from
7845 interp_set_temp.
7846 * interps.h (class scoped_restore_interp): New.
7847 (interp_set_temp): Remove.
7848
7849 2017-09-11 Tom Tromey <tom@tromey.com>
7850
7851 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7852 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7853 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7854 scoped_restore.
7855 (mi_cmd_break_insert_1): Update.
7856 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7857 scoped_restore.
7858
7859 2017-09-11 Tom Tromey <tom@tromey.com>
7860
7861 * demangle.c (demangle_command): Update.
7862 * breakpoint.c (disable_command): Update.
7863 (enable_command): Update.
7864 (find_location_by_number): Make "number" const. Use
7865 get_number_trailer.
7866 * cli/cli-utils.c (extract_arg): Return std::string.
7867 * probe.c (parse_probe_linespec): Update. Change types.
7868 (collect_probes): Take string arguments.
7869 (parse_probe_linespec): Likewise.
7870 (info_probes_for_ops): Update.
7871 (enable_probes_command): Update.
7872 (disable_probes_command): Update.
7873 * break-catch-sig.c (catch_signal_split_args): Update.
7874 * mi/mi-parse.c (mi_parse): Update.
7875
7876 2017-09-11 Tom Tromey <tom@tromey.com>
7877
7878 * language.h (language_enum): Make argument const.
7879 * language.c (language_enum): Make argument const.
7880
7881 2017-09-11 Tom Tromey <tom@tromey.com>
7882
7883 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7884 as function.
7885 (skip_to_space): Rename from skip_to_space_const.
7886 * common/common-utils.c (skip_to_space): New function.
7887 (skip_to_space): Rename from skip_to_space_const.
7888 * cli/cli-utils.h (get_number): Rename from get_number_const.
7889 (extract_arg): Rename from extract_arg_const.
7890 * cli/cli-utils.c (get_number): Rename from get_number_const.
7891 (extract_arg): Rename from extract_arg_const.
7892 (number_or_range_parser::get_number): Use ::get_number.
7893 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7894 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7895 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7896 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7897 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7898 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7899 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7900 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7901
7902 2017-09-11 Tom Tromey <tom@tromey.com>
7903
7904 * python/python.c (do_start_initialization): Use
7905 py-event-types.def to initialize types.
7906 Define all object type structures.
7907 * python/python-internal.h: Don't declare event initialization
7908 functions.
7909 * python/py-threadevent.c (thread_event_object_type): Don't
7910 define.
7911 * python/py-stopevent.c (stop_event_object_type): Don't define.
7912 * python/py-signalevent.c (signal_event_object_type): Don't
7913 declare or define.
7914 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7915 (clear_objfiles_event_object_type): Don't declare or define.
7916 * python/py-infevents.c (inferior_call_pre_event_object_type)
7917 (inferior_call_post_event_object_type)
7918 (register_changed_event_object_type)
7919 (memory_changed_event_object_type): Don't declare or define.
7920 * python/py-inferior.c (new_thread_event_object_type)
7921 (new_inferior_event_object_type)
7922 (inferior_deleted_event_object_type): Don't declare or define.
7923 * python/py-exitedevent.c (exited_event_object_type): Don't
7924 declare or define.
7925 * python/py-evts.c (gdbpy_initialize_py_events): Use
7926 py-all-events.def.
7927 * python/py-events.h (thread_event_object_type): Don't declare.
7928 (events_object): Use py-all-events.def.
7929 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7930 py-event-types.def.
7931 * python/py-event-types.def: New file.
7932 * python/py-continueevent.c (create_continue_event_object): Don't
7933 declare or define.
7934 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7935 declare or define.
7936 * python/py-all-events.def: New file.
7937
7938 2017-09-11 Tom Tromey <tom@tromey.com>
7939
7940 * python/py-threadevent.c (create_thread_event_object): Return
7941 gdbpy_ref.
7942 * python/py-stopevent.h (create_stop_event_object)
7943 (create_breakpoint_event_object, create_signal_event_object):
7944 Update.
7945 * python/py-stopevent.c (create_stop_event_object): Return
7946 gdbpy_ref.
7947 (emit_stop_event): Update.
7948 * python/py-signalevent.c (create_signal_event_object): Return
7949 gdbpy_ref.
7950 * python/py-infevents.c (create_inferior_call_event_object):
7951 Update.
7952 * python/py-event.h (create_event_object)
7953 (create_thread_event_object): Update.
7954 * python/py-event.c (create_event_object): Return gdbpy_ref.
7955 * python/py-continueevent.c: Return gdbpy_ref.
7956 * python/py-bpevent.c (create_breakpoint_event_object): Return
7957 gdbpy_ref.
7958
7959 2017-09-11 Tom Tromey <tom@tromey.com>
7960
7961 PR python/15622:
7962 * NEWS: Add entry.
7963 * python/python.c (do_start_initialization): Initialize new event
7964 types.
7965 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7966 (gdbpy_initialize_inferior_deleted_event)
7967 (gdbpy_initialize_new_thread_event): Declare.
7968 * python/py-threadevent.c (create_thread_event_object): Add option
7969 "thread" parameter.
7970 * python/py-inferior.c (new_thread_event_object_type)
7971 (new_inferior_event_object_type)
7972 (inferior_deleted_event_object_type): Declare.
7973 (python_new_inferior, python_inferior_deleted): New functions.
7974 (add_thread_object): Emit new_thread event.
7975 (gdbpy_initialize_inferior): Attach new functions to corresponding
7976 observers.
7977 (new_thread, new_inferior, inferior_deleted): Define new event
7978 types.
7979 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7980 registries.
7981 * python/py-events.h (events_object) <new_inferior,
7982 inferior_deleted, new_thread>: New fields.
7983 * python/py-event.h (create_thread_event_breakpoint): Add optional
7984 "thread" parameter.
7985
7986 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7987
7988 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7989 check current_ui instead.
7990 (internal_vproblem): Likewise.
7991
7992 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7993
7994 * thread.c (print_thread_info_1): Remove unnecessary calls to
7995 uiout->is_mi_like_p.
7996
7997 2017-09-09 Tom Tromey <tom@tromey.com>
7998
7999 * namespace.h (add_using_directive): Update.
8000 * namespace.c (add_using_directive): Change type of excludes to
8001 std::vector.
8002 * dwarf2read.c (read_import_statement): Use std::vector.
8003 (read_namespace): Update.
8004 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
8005
8006 2017-09-09 Tom Tromey <tom@tromey.com>
8007
8008 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
8009
8010 2017-09-09 Tom Tromey <tom@tromey.com>
8011
8012 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
8013
8014 2017-09-09 Tom Tromey <tom@tromey.com>
8015
8016 * stack.c (func_command): Use gdb::def_vector.
8017
8018 2017-09-09 Tom Tromey <tom@tromey.com>
8019
8020 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
8021 ui_out_emit_list, ui_out_emit_tuple.
8022 (mi_cmd_var_update): Likewise.
8023
8024 2017-09-09 Tom Tromey <tom@tromey.com>
8025
8026 * mi/mi-interp.c (mi_user_selected_context_changed): Use
8027 ui_out_redirect_pop.
8028 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8029 ui_out_redirect_pop.
8030 * utils.c (do_ui_out_redirect_pop)
8031 (make_cleanup_ui_out_redirect_pop): Remove.
8032 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
8033 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
8034 * ui-out.h (ui_out_redirect_pop): New class.
8035
8036 2017-09-09 Tom Tromey <tom@tromey.com>
8037
8038 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
8039 (list_available_thread_groups, mi_cmd_list_thread_groups)
8040 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
8041 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
8042 Likewise.
8043
8044 2017-09-09 Tom Tromey <tom@tromey.com>
8045
8046 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
8047 ui_out_emit_tuple.
8048
8049 2017-09-09 Tom Tromey <tom@tromey.com>
8050
8051 * target.c (flash_erase_command): Use ui_out_emit_tuple.
8052 * stack.c (print_frame): Use ui_out_emit_tuple.
8053 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
8054 (info_spu_mailbox_command, info_spu_dma_command)
8055 (info_spu_proxydma_command): Likewise.
8056 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
8057 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
8058 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8059 ui_out_emit_tuple.
8060 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
8061
8062 2017-09-09 Tom Tromey <tom@tromey.com>
8063
8064 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
8065 (class ui_out_emit_table): Update comment.
8066 * ui-out.c (do_cleanup_table_end)
8067 (make_cleanup_ui_out_table_begin_end): Remove.
8068 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
8069 (info_spu_dma_cmdlist): Likewise.
8070 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
8071 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
8072 ui_out_emit_table.
8073
8074 2017-09-09 Tom Tromey <tom@tromey.com>
8075
8076 * thread.c (print_thread_info_1): Use ui_out_emit_table,
8077 ui_out_emit_list, gdb::optional.
8078
8079 2017-09-09 John Baldwin <jhb@FreeBSD.org>
8080
8081 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
8082 prototype.
8083 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
8084 prototype.
8085 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
8086 prototype.
8087 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
8088 * ada-exp.y: Remove _initialize_ada_exp prototype.
8089 * ada-lang.c: Remove _initialize_ada_language prototype.
8090 * ada-tasks.c: Remove _initialize_tasks prototype.
8091 * addrmap.c: Remove _initialize_addrmap prototype.
8092 * agent.c: Remove _initialize_agent prototype.
8093 * aix-thread.c: Remove _initialize_aix_thread prototype.
8094 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
8095 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
8096 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
8097 prototype.
8098 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
8099 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
8100 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
8101 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
8102 prototype.
8103 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
8104 prototype.
8105 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
8106 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
8107 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
8108 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
8109 prototype.
8110 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
8111 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
8112 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
8113 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
8114 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8115 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
8116 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
8117 prototype.
8118 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
8119 prototype.
8120 * annotate.c: Remove _initialize_annotate prototype.
8121 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
8122 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
8123 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
8124 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
8125 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
8126 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
8127 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
8128 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
8129 prototype.
8130 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
8131 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
8132 * auto-load.c: Remove _initialize_auto_load prototype.
8133 * auxv.c: Remove _initialize_auxv prototype.
8134 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
8135 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
8136 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
8137 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
8138 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
8139 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
8140 prototype.
8141 * break-catch-throw.c: Remove _initialize_break_catch_throw
8142 prototype.
8143 * breakpoint.c: Remove _initialize_breakpoint prototype.
8144 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
8145 * btrace.c: Remove _initialize_btrace prototype.
8146 * charset.c: Remove _initialize_charset prototype.
8147 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
8148 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
8149 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
8150 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
8151 * cli/cli-script.c: Remove _initialize_cli_script prototype.
8152 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
8153 * coffread.c: Remove _initialize_coffread prototype.
8154 * compile/compile.c: Remove _initialize_compile prototype.
8155 * complaints.c: Remove _initialize_complaints prototype.
8156 * completer.c: Remove _initialize_completer prototype.
8157 * copying.awk: Remove _initialize_copying prototype.
8158 * copying.c: Regenerate.
8159 * core-regset.c: Remove _initialize_core_regset prototype.
8160 * corefile.c: Remove _initialize_core prototype.
8161 * corelow.c: Remove _initialize_corelow prototype.
8162 * cp-abi.c: Remove _initialize_cp_abi prototype.
8163 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
8164 * cp-support.c: Remove _initialize_cp_support prototype.
8165 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
8166 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
8167 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
8168 * ctf.c: Remove _initialize_ctf prototype.
8169 * d-lang.c: Remove _initialize_d_language prototype.
8170 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
8171 prototype.
8172 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
8173 * dbxread.c: Remove _initialize_dbxread prototype.
8174 * dcache.c: Remove _initialize_dcache prototype.
8175 * demangle.c: Remove _initialize_demangler prototype.
8176 * disasm-selftests.c: Remove _initialize_disasm_selftests
8177 prototype.
8178 * disasm.c: Remove _initialize_disasm prototype.
8179 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
8180 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
8181 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
8182 prototype.
8183 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
8184 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
8185 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
8186 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
8187 * elfread.c: Remove _initialize_elfread prototype.
8188 * exec.c: Remove _initialize_exec prototype.
8189 * extension.c: Remove _initialize_extension prototype.
8190 * f-lang.c: Remove _initialize_f_language prototype.
8191 * f-valprint.c: Remove _initialize_f_valprint prototype.
8192 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
8193 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
8194 * filesystem.c: Remove _initialize_filesystem prototype.
8195 * findcmd.c: Remove _initialize_mem_search prototype.
8196 * fork-child.c: Remove _initialize_fork_child prototype.
8197 * frame-base.c: Remove _initialize_frame_base prototype.
8198 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
8199 * frame.c: Remove _initialize_frame prototype.
8200 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
8201 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
8202 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
8203 * gcore.c: Remove _initialize_gcore prototype.
8204 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
8205 * gdbarch.c: Regenerate.
8206 * gdbarch.sh: Remove _initialize_gdbarch prototype.
8207 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
8208 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
8209 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
8210 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
8211 * go-lang.c: Remove _initialize_go_language prototype.
8212 * go32-nat.c: Remove _initialize_go32_nat prototype.
8213 * guile/guile.c: Remove _initialize_guile prototype.
8214 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
8215 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
8216 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
8217 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
8218 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
8219 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
8220 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
8221 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
8222 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
8223 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
8224 prototype.
8225 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
8226 prototype.
8227 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8228 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8229 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8230 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8231 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8232 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8233 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8234 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8235 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8236 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8237 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8238 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8239 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8240 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8241 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8242 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8243 prototype.
8244 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8245 prototype.
8246 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8247 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8248 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8249 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8250 * infcall.c: Remove _initialize_infcall prototype.
8251 * infcmd.c: Remove _initialize_infcmd prototype.
8252 * inferior.c: Remove _initialize_inferiors prototype.
8253 * inflow.c: Remove _initialize_inflow prototype.
8254 * infrun.c: Remove _initialize_infrun prototype.
8255 * interps.c: Remove _initialize_interpreter prototype.
8256 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8257 * jit.c: Remove _initialize_jit prototype.
8258 * language.c: Remove _initialize_language prototype.
8259 * linux-fork.c: Remove _initialize_linux_fork prototype.
8260 * linux-nat.c: Remove _initialize_linux_nat prototype.
8261 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8262 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8263 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8264 * m2-lang.c: Remove _initialize_m2_language prototype.
8265 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8266 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8267 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8268 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8269 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8270 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8271 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8272 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8273 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8274 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8275 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8276 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8277 * machoread.c: Remove _initialize_machoread prototype.
8278 * macrocmd.c: Remove _initialize_macrocmd prototype.
8279 * macroscope.c: Remove _initialize_macroscope prototype.
8280 * maint.c: Remove _initialize_maint_cmds prototype.
8281 * mdebugread.c: Remove _initialize_mdebugread prototype.
8282 * memattr.c: Remove _initialize_mem prototype.
8283 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8284 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8285 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8286 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8287 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8288 * microblaze-linux-tdep.c: Remove
8289 _initialize_microblaze_linux_tdep prototype.
8290 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8291 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8292 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8293 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8294 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8295 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8296 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8297 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8298 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8299 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8300 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8301 prototype.
8302 * mipsread.c: Remove _initialize_mipsread prototype.
8303 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8304 prototype.
8305 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8306 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8307 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8308 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8309 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8310 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8311 prototype.
8312 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8313 * nto-procfs.c: Remove _initialize_procfs prototype.
8314 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8315 * objc-lang.c: Remove _initialize_objc_language prototype.
8316 * objfiles.c: Remove _initialize_objfiles prototype.
8317 * observer.c: Remove observer_test_first_notification_function,
8318 observer_test_second_notification_function,
8319 observer_test_third_notification_function, and
8320 _initialize_observer prototypes.
8321 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8322 * osabi.c: Remove _initialize_gdb_osabi prototype.
8323 * osdata.c: Remove _initialize_osdata prototype.
8324 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8325 * parse.c: Remove _initialize_parse prototype.
8326 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8327 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8328 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8329 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8330 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8331 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8332 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8333 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8334 * printcmd.c: Remove _initialize_printcmd prototype.
8335 * probe.c: Remove _initialize_probe prototype.
8336 * proc-api.c: Remove _initialize_proc_api prototype.
8337 * proc-events.c: Remove _initialize_proc_events prototype.
8338 * proc-service.c: Remove _initialize_proc_service prototype.
8339 * procfs.c: Remove _initialize_procfs prototype.
8340 * psymtab.c: Remove _initialize_psymtab prototype.
8341 * python/python.c: Remove _initialize_python prototype.
8342 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8343 * record-btrace.c: Remove _initialize_record_btrace prototype.
8344 * record-full.c: Remove _initialize_record_full prototype.
8345 * record.c: Remove _initialize_record prototype.
8346 * regcache.c: Remove _initialize_regcache prototype.
8347 * reggroups.c: Remove _initialize_reggroup prototype.
8348 * remote-notif.c: Remove _initialize_notif prototype.
8349 * remote-sim.c: Remove _initialize_remote_sim prototype.
8350 * remote.c: Remove _initialize_remote prototype.
8351 * reverse.c: Remove _initialize_reverse prototype.
8352 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8353 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8354 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8355 prototype.
8356 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8357 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8358 * rust-exp.y: Remove _initialize_rust_exp prototype.
8359 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8360 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8361 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8362 * score-tdep.c: Remove _initialize_score_tdep prototype.
8363 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8364 prototype.
8365 * ser-go32.c: Remove _initialize_ser_dos prototype.
8366 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8367 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8368 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8369 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8370 * serial.c: Remove _initialize_serial prototype.
8371 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8372 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8373 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8374 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8375 * skip.c: Remove _initialize_step_skip prototype.
8376 * sol-thread.c: Remove _initialize_sol_thread prototype.
8377 * solib-aix.c: Remove _initialize_solib_aix prototype.
8378 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8379 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8380 * solib-frv.c: Remove _initialize_frv_solib prototype.
8381 * solib-spu.c: Remove _initialize_spu_solib prototype.
8382 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8383 * solib-target.c: Remove _initialize_solib_target prototype.
8384 * solib.c: Remove _initialize_solib prototype.
8385 * source.c: Remove _initialize_source prototype.
8386 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8387 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8388 prototype.
8389 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8390 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8391 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8392 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8393 prototype.
8394 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8395 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8396 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8397 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8398 prototype.
8399 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8400 prototype.
8401 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8402 prototype.
8403 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8404 prototype.
8405 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8406 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8407 prototype.
8408 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8409 prototype.
8410 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8411 prototype.
8412 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8413 prototype.
8414 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8415 prototype.
8416 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8417 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8418 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8419 * stabsread.c: Remove _initialize_stabsread prototype.
8420 * stack.c: Remove _initialize_stack prototype.
8421 * stap-probe.c: Remove _initialize_stap_probe prototype.
8422 * std-regs.c: Remove _initialize_frame_reg prototype.
8423 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8424 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8425 * symfile.c: Remove _initialize_symfile prototype.
8426 * symmisc.c: Remove _initialize_symmisc prototype.
8427 * symtab.c: Remove _initialize_symtab prototype.
8428 * target-dcache.c: Remove _initialize_target_dcache prototype.
8429 * target-descriptions.c: Remove _initialize_target_descriptions
8430 prototype.
8431 * thread.c: Remove _initialize_thread prototype.
8432 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8433 prototype.
8434 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8435 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8436 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8437 prototype.
8438 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8439 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8440 * tracefile.c: Remove _initialize_tracefile prototype.
8441 * tracepoint.c: Remove _initialize_tracepoint prototype.
8442 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8443 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8444 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8445 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8446 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8447 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8448 * tui/tui.c: Remove _initialize_tui prototype.
8449 * typeprint.c: Remove _initialize_typeprint prototype.
8450 * user-regs.c: Remove _initialize_user_regs prototype.
8451 * utils.c: Remove _initialize_utils prototype.
8452 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8453 * valarith.c: Remove _initialize_valarith prototype.
8454 * valops.c: Remove _initialize_valops prototype.
8455 * valprint.c: Remove _initialize_valprint prototype.
8456 * value.c: Remove _initialize_values prototype.
8457 * varobj.c: Remove _initialize_varobj prototype.
8458 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8459 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8460 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8461 * windows-nat.c: Remove _initialize_windows_nat,
8462 _initialize_check_for_gdb_ini, and _initialize_loadable
8463 prototypes.
8464 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8465 * xcoffread.c: Remove _initialize_xcoffread prototype.
8466 * xml-support.c: Remove _initialize_xml_support prototype.
8467 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8468 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8469 prototype.
8470 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8471 prototype.
8472 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8473
8474 2017-09-08 Keith Seitz <keiths@redhat.com>
8475
8476 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8477 field.
8478
8479 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8480
8481 * f-valprint.c (f_val_print): Remove check for one byte
8482 sized integers. Remove printing of character type.
8483
8484 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8485 Christoph Weinmann <christoph.t.weinmann@intel.com>
8486 Bernhard Heckel <bernhard.heckel@intel.com>
8487
8488 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8489 to maintain proper indentation when printing pointers/refs.
8490
8491 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8492
8493 GDB 8.0.1 released.
8494
8495 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8496
8497 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8498
8499 2017-09-05 Tom Tromey <tom@tromey.com>
8500
8501 * parse.c (funcall_chain): Now a std::vector.
8502 (start_arglist, end_arglist): Simplify.
8503 (free_funcalls): Remove.
8504 (parse_exp_in_context_1): Remove cleanup.
8505
8506 2017-09-05 Tom Tromey <tom@tromey.com>
8507
8508 * go-exp.y (go_parse): Don't create a cleanup.
8509
8510 2017-09-05 Tom Tromey <tom@tromey.com>
8511
8512 * d-exp.y (PrimaryExpression): Use std::string.
8513 (d_parse): Don't create a cleanup.
8514
8515 2017-09-05 Tom Tromey <tom@tromey.com>
8516
8517 * utils.c (do_clear_parser_state): Remove.
8518 (make_cleanup_clear_parser_state): Remove.
8519 * p-exp.y (pascal_parse): Use scoped_restore.
8520 * m2-exp.y (m2_parse): Use scoped_restore.
8521 * f-exp.y (f_parse): Use scoped_restore.
8522 * d-exp.y (d_parse): Use scoped_restore.
8523 * c-exp.y (c_parse): Use scoped_restore.
8524 * ada-exp.y (ada_parse): Use scoped_restore.
8525 * utils.h (make_cleanup_clear_parser_state): Remove.
8526
8527 2017-09-06 Keith Seitz <keiths@redhat.com>
8528
8529 * dwarf2read.c (dw2_linkage_name_attr): New function.
8530 (dw2_linkage_name): New function.
8531 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8532 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8533 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8534
8535 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8536
8537 * config/djgpp/djconfig.sh: Correct shell portability issue.
8538
8539 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8540
8541 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8542
8543 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8544
8545 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8546 * NEWS: Mention new FreeBSD/mips native configuration.
8547 * configure.host: Add aarch64*-*-freebsd*.
8548 * configure.nat: Likewise.
8549 * aarch64-fbsd-nat.c: New file.
8550
8551 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8552
8553 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8554 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8555 * NEWS: Mention new FreeBSD/aarch64 target.
8556 * configure.tgt: Add aarch64*-*-freebsd*.
8557 * aarch64-fbsd-tdep.c: New file.
8558 * aarch64-fbsd-tdep.h: New file.
8559
8560 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8561
8562 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8563
8564 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8565
8566 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8567 of TLS symbols.
8568
8569 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8570
8571 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8572 call.
8573
8574 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8575
8576 * infrun.c (follow_exec): Call add_thread after
8577 target_find_description.
8578
8579 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8580
8581 * infrun.c (handle_inferior_event_1): When exec'ing, read
8582 stop_pc after follow_exec.
8583
8584 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8585
8586 * remote.c (process_g_packet): Update error message.
8587
8588 2017-09-05 Yao Qi <yao.qi@linaro.org>
8589
8590 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8591 targets.
8592
8593 2017-09-05 Pedro Alves <palves@redhat.com>
8594
8595 * eval.c (eval_call, evaluate_funcall): New functions, factored
8596 out from ...
8597 (evaluate_subexp_standard): ... this.
8598
8599 2017-09-05 Yao Qi <yao.qi@linaro.org>
8600
8601 * amd64-tdep.c (amd64_target_description): Create target
8602 descriptions.
8603 (_initialize_amd64_tdep): Don't call functions
8604 initialize_tdesc_amd64_*. Add self tests.
8605 * arch/amd64.c (amd64_create_target_description): Add parameter
8606 is_linux. Call set_tdesc_osabi if is_linux is true.
8607 * arch/amd64.h (amd64_create_target_description): Update the
8608 declaration.
8609 * arch/i386.c (i386_create_target_description): Add parameter
8610 is_linux. Call set_tdesc_osabi if is_linux is true.
8611 * arch/i386.h (i386_create_target_description): Update
8612 declaration.
8613 * configure.tgt: Add i386.o to gdb_target_obs.
8614 * features/Makefile (XMLTOC): Remove i386/*.xml.
8615 * features/i386/amd64-avx-avx512.c: Remove.
8616 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8617 * features/i386/amd64-avx-mpx.c: Remove.
8618 * features/i386/amd64-avx.c: Remove.
8619 * features/i386/amd64-mpx.c: Remove.
8620 * features/i386/amd64.c: Remove.
8621 * features/i386/i386-avx-avx512.c: Remove.
8622 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8623 * features/i386/i386-avx-mpx.c: Remove.
8624 * features/i386/i386-avx.c: Remove.
8625 * features/i386/i386-mmx.c: Remove.
8626 * features/i386/i386-mpx.c: Remove.
8627 * features/i386/i386.c: Remove.
8628 * i386-tdep.c: Don't include features/i386/i386*.c., include
8629 target-descriptions.h and arch/i386.h.
8630 (i386_target_description): Create target descriptions.
8631 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8632 functions. Do self tests.
8633
8634 2017-09-05 Yao Qi <yao.qi@linaro.org>
8635
8636 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8637 * features/i386/amd64-avx-avx512-linux.c: Removed.
8638 * features/i386/amd64-avx-linux.c: Removed.
8639 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8640 * features/i386/amd64-avx-mpx-linux.c: Removed.
8641 * features/i386/amd64-linux.c: Removed.
8642 * features/i386/amd64-mpx-linux.c: Removed.
8643 * features/i386/x32-avx-avx512-linux.c: Removed.
8644 * features/i386/x32-avx-linux.c: Removed.
8645 * features/i386/x32-linux.c: Removed.
8646
8647 2017-09-05 Yao Qi <yao.qi@linaro.org>
8648
8649 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8650 features/i386/*.c.
8651 (amd64_linux_read_description): Call
8652 amd64_create_target_description.
8653 * arch/amd64.c: New file.
8654 * arch/amd64.h: New file.
8655 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8656 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8657
8658 2017-09-05 Yao Qi <yao.qi@linaro.org>
8659
8660 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8661 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8662 (amd64_linux_read_description): Create target descriptions.
8663 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8664 functions. Add unit tests.
8665 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8666 x32-core.xml.
8667 * features/i386/64bit-avx.c: Generated.
8668 * features/i386/64bit-avx512.c: Generated.
8669 * features/i386/64bit-core.c: Generated.
8670 * features/i386/64bit-linux.c: Generated.
8671 * features/i386/64bit-mpx.c: Generated.
8672 * features/i386/64bit-pkeys.c: Generated.
8673 * features/i386/64bit-segments.c: Generated.
8674 * features/i386/64bit-sse.c: Generated.
8675 * features/i386/x32-core.c: Generated.
8676 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8677 c files for amd64-linux and x32-linux.
8678
8679 2017-09-05 Yao Qi <yao.qi@linaro.org>
8680
8681 * amd64-linux-tdep.c (amd64_linux_read_description): New
8682 function.
8683 (amd64_linux_core_read_description): Call
8684 amd64_linux_read_description.
8685 (amd64_linux_init_abi): Likewise.
8686 (amd64_x32_linux_init_abi): Likewise.
8687 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8688 * x86-linux-nat.c (x86_linux_read_description): Call
8689 amd64_linux_read_description.
8690
8691 2017-09-05 Yao Qi <yao.qi@linaro.org>
8692
8693 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8694 comments.
8695
8696 2017-09-05 Yao Qi <yao.qi@linaro.org>
8697
8698 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8699 * features/i386/i386-avx-avx512-linux.c: Remove.
8700 * features/i386/i386-avx-linux.c: Remove.
8701 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8702 * features/i386/i386-avx-mpx-linux.c: Remove.
8703 * features/i386/i386-linux.c: Remove.
8704 * features/i386/i386-mmx-linux.c: Remove.
8705 * features/i386/i386-mpx-linux.c: Remove.
8706
8707 2017-09-05 Yao Qi <yao.qi@linaro.org>
8708
8709 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8710 (SFILES): Add arch/i386.c.
8711 (HFILES_NO_SRCDIR): Add arch/i386.h.
8712 * arch/i386.c: New file.
8713 * arch/i386.h: New file.
8714 * arch/tdesc.h (allocate_target_description): Declare.
8715 (set_tdesc_architecture): Declare.
8716 (set_tdesc_osabi): Declare.
8717 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8718 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8719 include arch/i386.h.
8720 (i386_linux_read_description): Remove code and call
8721 i386_create_target_description.
8722 (set_tdesc_architecture): New function.
8723 (set_tdesc_osabi): New function.
8724 * target-descriptions.h (allocate_target_description): Remove.
8725
8726 2017-09-05 Yao Qi <yao.qi@linaro.org>
8727
8728 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8729 * target-descriptions.c (tdesc_create_feature): Likewise, and
8730 adjust code.
8731 * features/i386/32bit-avx.c: Re-generated.
8732 * features/i386/32bit-avx512.c: Re-generated.
8733 * features/i386/32bit-core.c: Re-generated.
8734 * features/i386/32bit-linux.c: Re-generated.
8735 * features/i386/32bit-mpx.c: Re-generated.
8736 * features/i386/32bit-pkeys.c: Re-generated.
8737 * features/i386/32bit-sse.c: Re-generated.
8738
8739 2017-09-05 Yao Qi <yao.qi@linaro.org>
8740
8741 * regformats/regdef.h (struct reg): Override operator == and !=.
8742
8743 2017-09-05 Yao Qi <yao.qi@linaro.org>
8744
8745 * arch/tdesc.h: New file.
8746 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8747 * target-descriptions.c: Update comments.
8748 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8749 declarations.
8750 * features/i386/32bit-avx.c: Re-generated.
8751 * features/i386/32bit-avx512.c: Re-generated.
8752 * features/i386/32bit-core.c: Re-generated.
8753 * features/i386/32bit-linux.c: Re-generated.
8754 * features/i386/32bit-mpx.c: Re-generated.
8755 * features/i386/32bit-pkeys.c: Re-generated.
8756 * features/i386/32bit-sse.c: Re-generated.
8757
8758 2017-09-05 Yao Qi <yao.qi@linaro.org>
8759
8760 * regformats/regdat.sh: Update generated code.
8761
8762 2017-09-05 Yao Qi <yao.qi@linaro.org>
8763
8764 * regformats/regdat.sh: Adjust code order.
8765
8766 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8767
8768 * expprint.c (dump_subexp_body_standard): Use constant format
8769 string in fprintf_filtered call.
8770
8771 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8772
8773 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8774 NetBSD/i386.
8775 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8776
8777 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8778
8779 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8780
8781 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8782
8783 * bsd-kvm.o: Define _KMEMUSER.
8784 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8785 * configure: Regenerate.
8786
8787 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8788
8789 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8790 * i386-fbsd-nat.c: Likewise.
8791
8792 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8793
8794 * unittests/array-view-selftests.c: Add include of <array>.
8795
8796 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8797
8798 * spu-tdep.c (flush_ea_cache): Add missing argument to
8799 call_function_by_hand.
8800
8801 2017-09-04 Pedro Alves <palves@redhat.com>
8802
8803 * NEWS (Safer support for debugging with no debug info): New.
8804
8805 2017-09-04 Pedro Alves <palves@redhat.com>
8806
8807 * c-exp.y (function_method, function_method_void): Add current
8808 instance flags to TYPE_INSTANCE.
8809 * dwarf2read.c (check_modifier): New.
8810 (compute_delayed_physnames): Assert that only C++ adds delayed
8811 physnames. Mark fn_fields as const/volatile depending on
8812 physname.
8813 * eval.c (make_params): New type_instance_flags parameter. Use
8814 it as the new type's instance flags.
8815 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8816 flags element and pass it to make_params.
8817 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8818 instance flags element.
8819 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8820 * gdbtypes.h: Include "enum-flags.h".
8821 (type_instance_flags): New enum-flags type.
8822 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8823 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8824 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8825 (follow_type_instance_flags): New function.
8826 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8827 * parser-defs.h (follow_type_instance_flags): Declare.
8828 * valops.c (value_struct_elt_for_reference): const/volatile must
8829 match too.
8830
8831 2017-09-04 Pedro Alves <palves@redhat.com>
8832
8833 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8834 function/method scopes; lookup the nested name as a function local
8835 static variable.
8836
8837 2017-09-04 Pedro Alves <palves@redhat.com>
8838
8839 (%type <voidval>): Add function_method.
8840 * c-exp.y (exp): New production for calls with no arguments.
8841 (function_method, function_method_void_or_typelist): New
8842 productions.
8843 (exp): New production for "method()::static_var".
8844 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8845 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8846 Handle OP_FUNC_STATIC_VAR.
8847 * parse.c (operator_length_standard):
8848 Handle OP_FUNC_STATIC_VAR.
8849
8850 2017-09-04 Pedro Alves <palves@redhat.com>
8851
8852 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8853 handling.
8854 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8855 Ditto.
8856 * parse.c (operator_length_standard, operator_check_standard):
8857 Ditto.
8858 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8859
8860 2017-09-04 Pedro Alves <palves@redhat.com>
8861
8862 * ax-gdb.c: Include "typeprint.h".
8863 (gen_expr_for_cast): New function.
8864 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8865 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8866 type is unknown.
8867 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8868 nodebug_data_symbol.
8869 * eval.c: Include "typeprint.h".
8870 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8871 Error out if symbol has unknown type.
8872 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8873 evaluate_subexp_for_cast.
8874 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8875 OP_VAR_MSYM_VALUE.
8876 (evaluate_subexp_for_cast): New function.
8877 * gdbtypes.c (init_nodebug_var_type): New function.
8878 (objfile_type): Use it to initialize types of variables with no
8879 debug info.
8880 * typeprint.c (error_unknown_type): New.
8881 * typeprint.h (error_unknown_type): New declaration.
8882 * compile/compile-c-types.c (convert_type_basic): Handle
8883 TYPE_CODE_ERROR; warn and fallback to int for variables with
8884 unknown type.
8885
8886 2017-09-04 Pedro Alves <palves@redhat.com>
8887
8888 * eval.c (evaluate_var_value): New function, factored out from ...
8889 (evaluate_subexp_standard): ... here.
8890
8891 2017-09-04 Pedro Alves <palves@redhat.com>
8892
8893 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8894 Remove useless assignments to 'op'.
8895
8896 2017-09-04 Pedro Alves <palves@redhat.com>
8897
8898 * eval.c (eval_skip_value): New function.
8899 (evaluate_subexp_standard): Use it.
8900
8901 2017-09-04 Pedro Alves <palves@redhat.com>
8902
8903 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8904 function name from symbol/minsym and pass it to
8905 error_call_unknown_return_type.
8906
8907 2017-09-04 Pedro Alves <palves@redhat.com>
8908
8909 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8910 * ax-gdb.c (gen_msym_var_ref): New function.
8911 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8912 * eval.c (evaluate_var_msym_value): New function.
8913 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8914 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8915 to call_function_by_hand.
8916 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8917 Handle OP_VAR_MSYM_VALUE.
8918 (union exp_element) <msymbol>: New field.
8919 * minsyms.h (struct type): Forward declare.
8920 (find_minsym_type_and_address): Declare.
8921 * parse.c (write_exp_elt_msym): New function.
8922 (write_exp_msymbol): Delete, refactored as ...
8923 (find_minsym_type_and_address): ... this new function.
8924 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8925 (operator_length_standard, operator_check_standard): Handle
8926 OP_VAR_MSYM_VALUE.
8927 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8928
8929 2017-09-04 Pedro Alves <palves@redhat.com>
8930
8931 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8932 TYPE_GNU_IFUNC specially here. Throw error if return type is
8933 unknown.
8934 * ada-typeprint.c (print_func_type): Handle functions with unknown
8935 return type.
8936 * c-typeprint.c (c_type_print_base): Handle functions and methods
8937 with unknown return type.
8938 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8939 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8940 * compile/compile-c-types.c: Include "objfiles.h".
8941 (convert_func): For functions with unknown return type, warn and
8942 default to int.
8943 * compile/compile-object-run.c (compile_object_run): Adjust call
8944 to call_function_by_hand_dummy.
8945 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8946 call_function_by_hand.
8947 * eval.c (evaluate_subexp_standard): Adjust calls to
8948 call_function_by_hand. Handle functions and methods with unknown
8949 return type. Pass expect_type to call_function_by_hand.
8950 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8951 return type.
8952 * gcore.c (call_target_sbrk): Adjust call to
8953 call_function_by_hand.
8954 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8955 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8956 an integer address type instead of nodebug.
8957 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8958 call_function_by_hand.
8959 * infcall.c (error_call_unknown_return_type): New function.
8960 (call_function_by_hand): New "default_return_type" parameter.
8961 Pass it down.
8962 (call_function_by_hand_dummy): New "default_return_type"
8963 parameter. Use it instead of defaulting to int. If there's no
8964 default and the return type is unknown, throw an error. If
8965 there's a default return type, and the called function has no
8966 debug info, then assume the function is prototyped.
8967 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8968 New "default_return_type" parameter.
8969 (error_call_unknown_return_type): New declaration.
8970 * linux-fork.c (call_lseek): Cast return type of lseek.
8971 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8972 call_function_by_hand.
8973 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8974 calls to call_function_by_hand.
8975 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8976 return type.
8977 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8978 (value_nsstring, print_object_command): Adjust calls to
8979 call_function_by_hand.
8980 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8981 functions with unknown return type.
8982 (pascal_type_print_func_varspec_suffix): New function.
8983 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8984 TYPE_CODE_METHOD>: Use it.
8985 * python/py-value.c (valpy_call): Adjust call to
8986 call_function_by_hand.
8987 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8988 call_function_by_hand.
8989 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8990 call_function_by_hand.
8991 * valops.c (value_allocate_space_in_inferior): Adjust call to
8992 call_function_by_hand.
8993 * typeprint.c (type_print_unknown_return_type): New function.
8994 * typeprint.h (type_print_unknown_return_type): New declaration.
8995
8996 2017-09-04 Pedro Alves <palves@redhat.com>
8997
8998 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8999 types with more than one parameter as prototyped.
9000
9001 2017-09-04 Pedro Alves <palves@redhat.com>
9002
9003 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
9004 (disassemble_command): Use gdb_disassembly_flags instead of bare
9005 int.
9006 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
9007 (dump_insns, do_mixed_source_and_assembly_deprecated)
9008 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
9009 Use gdb_disassembly_flags instead of bare int.
9010 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
9011 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
9012 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
9013 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
9014 (enum gdb_disassembly_flag): ... values of this new enumeration.
9015 (gdb_disassembly_flags): Define.
9016 (gdb_disassembly)
9017 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
9018 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
9019 gdb_disassembly_flags instead of bare int.
9020 * record-btrace.c (btrace_insn_history)
9021 (record_btrace_insn_history, record_btrace_insn_history_range)
9022 (record_btrace_insn_history_from): Use gdb_disassembly_flags
9023 instead of bare int.
9024 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
9025 Use gdb_disassembly_flags instead of bare int.
9026 * target-debug.h (target_debug_print_gdb_disassembly_flags):
9027 Define.
9028 * target-delegates.c: Regenerate.
9029 * target.c (target_insn_history, target_insn_history_from)
9030 (target_insn_history_range): Use gdb_disassembly_flags instead of
9031 bare int.
9032 * target.h: Include "disasm.h".
9033 (struct target_ops) <to_insn_history, to_insn_history_from,
9034 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
9035 int.
9036 (target_insn_history, target_insn_history_from)
9037 (target_insn_history_range): Use gdb_disassembly_flags instead of
9038 bare int.
9039
9040 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9041
9042 * cli/cli-script.c (build_command_line): For if/while commands,
9043 check whether args is empty.
9044
9045 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9046
9047 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
9048 (enum command_control_type): Likewise.
9049 (struct command_line): Likewise.
9050 (free_command_lines): Likewise.
9051 (struct command_lines_deleter): Likewise.
9052 (command_line_up): Likewise.
9053 (read_command_lines): Likewise.
9054 (read_command_lines_1): Likewise.
9055 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
9056 (enum command_control_type): Likewise.
9057 (struct command_line): Likewise.
9058 (free_command_lines): Likewise.
9059 (struct command_lines_deleter): Likewise.
9060 (command_line_up): Likewise.
9061 (read_command_lines): Likewise.
9062 (read_command_lines_1): Likewise.
9063 * breakpoint.h: Include cli/cli-script.h.
9064 * extension-priv.h: Likewise.
9065 * gdbcmd.h: Likewise.
9066
9067 2017-09-04 Pedro Alves <palves@redhat.com>
9068
9069 * ada-lang.c (is_known_support_routine): Move sal declaration to
9070 where it is initialized.
9071 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
9072 (parse_breakpoint_sals, decode_static_tracepoint_spec)
9073 (clear_command, update_static_tracepoint): Remove init_sal
9074 references. Move declarations closer to initializations.
9075 * cli/cli-cmds.c (list_command): Move sal declarations closer to
9076 initializations.
9077 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
9078 references. Move sal declarations closer to initializations.
9079 * frame.c (find_frame_sal): Return a symtab_and_line via function
9080 return instead of output parameter. Remove init_sal references.
9081 * frame.h (find_frame_sal): Return a symtab_and_line via function
9082 return instead of output parameter.
9083 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
9084 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
9085 instead of memset.
9086 (gdbscm_find_pc_line): Remove init_sal reference.
9087 * infcall.c (call_function_by_hand_dummy): Remove init_sal
9088 references. Move declarations closer to initializations.
9089 * infcmd.c (set_step_frame): Update. Move declarations closer to
9090 initializations.
9091 (finish_backward): Remove init_sal references. Move declarations
9092 closer to initializations.
9093 * infrun.c (process_event_stop_test, handle_step_into_function)
9094 (insert_hp_step_resume_breakpoint_at_frame)
9095 (insert_step_resume_breakpoint_at_caller): Likewise.
9096 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
9097 (symbol_to_sal): Likewise.
9098 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
9099 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
9100 to its initialization.
9101 * reverse.c (save_bookmark_command): Use new/delete. Remove
9102 init_sal references. Move declarations closer to initializations.
9103 * source.c (get_current_source_symtab_and_line): Remove brace
9104 initialization.
9105 (set_current_source_symtab_and_line): Now takes the sal by const
9106 reference. Remove brace initialization.
9107 (line_info): Remove init_sal reference.
9108 * source.h (set_current_source_symtab_and_line): Now takes a
9109 symtab_and_line via const reference.
9110 * stack.c (set_current_sal_from_frame): Adjust.
9111 (print_frame_info): Adjust.
9112 (get_last_displayed_sal): Return the sal via function return
9113 instead of via output parameter. Simplify.
9114 (frame_info): Adjust.
9115 * stack.h (get_last_displayed_sal): Return the sal via function
9116 return instead of via output parameter.
9117 * symtab.c (init_sal): Delete.
9118 (find_pc_sect_line): Remove init_sal references. Move
9119 declarations closer to initializations.
9120 (find_function_start_sal): Remove init_sal references. Move
9121 declarations closer to initializations.
9122 * symtab.h (struct symtab_and_line): In-class initialize all
9123 fields.
9124 * tracepoint.c (set_traceframe_context)
9125 (print_one_static_tracepoint_marker): Remove init_sal references.
9126 Move declarations closer to initializations.
9127 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
9128 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
9129 declarations closer to initializations.
9130 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
9131 init_sal references. Adjust.
9132
9133 2017-09-04 Pedro Alves <palves@redhat.com>
9134
9135 * ax-gdb.c (agent_command_1): Use range-for.
9136 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9137 * breakpoint.c: Include "common/array-view.h".
9138 (init_breakpoint_sal, create_breakpoint_sal): Change sals
9139 parameter from struct symtabs_and_lines to
9140 array_view<symtab_and_line>. Adjust. Use range-for. Update.
9141 (breakpoint_sals_to_pc): Change sals parameter from struct
9142 symtabs_and_lines to std::vector reference.
9143 (check_fast_tracepoint_sals): Change sals parameter from struct
9144 symtabs_and_lines to std::array_view. Use range-for.
9145 (decode_static_tracepoint_spec): Return a std::vector instead of
9146 symtabs_and_lines. Update.
9147 (create_breakpoint): Update.
9148 (break_range_command, until_break_command, clear_command): Update.
9149 (base_breakpoint_decode_location, bkpt_decode_location)
9150 (bkpt_probe_create_sals_from_location)
9151 (bkpt_probe_decode_location, tracepoint_decode_location)
9152 (tracepoint_probe_decode_location)
9153 (strace_marker_create_sals_from_location): Return a std::vector
9154 instead of symtabs_and_lines.
9155 (strace_marker_create_breakpoints_sal): Update.
9156 (strace_marker_decode_location): Return a std::vector instead of
9157 symtabs_and_lines. Update.
9158 (update_breakpoint_locations): Change struct symtabs_and_lines
9159 parameters to gdb::array_view. Adjust.
9160 (location_to_sals): Return a std::vector instead of
9161 symtabs_and_lines. Update.
9162 (breakpoint_re_set_default): Use std::vector instead of struct
9163 symtabs_and_lines.
9164 (decode_location_default): Return a std::vector instead of
9165 symtabs_and_lines. Update.
9166 * breakpoint.h: Include "common/array-view.h".
9167 (struct breakpoint_ops) <decode_location>: Now returns a
9168 std::vector instead of returning a symtabs_and_lines via output
9169 parameter.
9170 (update_breakpoint_locations): Change sals parameters to use
9171 gdb::array_view.
9172 * cli/cli-cmds.c (edit_command, list_command): Update to use
9173 std::vector and gdb::array_view.
9174 (ambiguous_line_spec): Adjust to use gdb::array_view and
9175 range-for.
9176 (compare_symtabs): Rename to ...
9177 (cmp_symtabs): ... this. Change parameters to symtab_and_line
9178 const reference and adjust.
9179 (filter_sals): Rewrite using std::vector and standard algorithms.
9180 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
9181 (jump_command): Update to use std::vector.
9182 * linespec.c (struct linespec_state) <canonical_names>: Update
9183 comment.
9184 (add_sal_to_sals_basic): Delete.
9185 (add_sal_to_sals, filter_results, convert_results_to_lsals)
9186 (decode_line_2, create_sals_line_offset)
9187 (convert_address_location_to_sals, convert_linespec_to_sals)
9188 (convert_explicit_location_to_sals, parse_linespec)
9189 (event_location_to_sals, decode_line_full, decode_line_1)
9190 (decode_line_with_current_source)
9191 (decode_line_with_last_displayed, decode_objc)
9192 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
9193 (linespec_result::~linespec_result): Adjust to use std::vector
9194 instead of symtabs_and_lines.
9195 * linespec.h (linespec_sals::sals): Now a std::vector.
9196 (struct linespec_result): Use std::vector, bool, and in-class
9197 initialization.
9198 (decode_line_1, decode_line_with_current_source)
9199 (decode_line_with_last_displayed): Return std::vector.
9200 * macrocmd.c (info_macros_command): Use std::vector.
9201 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
9202 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
9203 std::vector.
9204 * probe.h (parse_probes): Return a std::vector.
9205 * python/python.c (gdbpy_decode_line): Use std::vector and
9206 gdb::array_view.
9207 * source.c (select_source_symtab, line_info): Use std::vector.
9208 * stack.c (func_command): Use std::vector.
9209 * symtab.h (struct symtabs_and_lines): Delete.
9210 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
9211
9212 2017-09-04 Pedro Alves <palves@redhat.com>
9213
9214 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9215 unittests/array-view-selftests.c.
9216 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
9217 * common/array-view.h: New file.
9218 * unittests/array-view-selftests.c: New file.
9219
9220 2017-09-04 Pedro Alves <palves@redhat.com>
9221
9222 * cli/cli-cmds.c (edit_command): Pass message to
9223 ambiguous_line_spec.
9224 (list_command): Pass message to ambiguous_line_spec. Say
9225 "first"/"last" instead of "start" and "end" to be consistent with
9226 the manual.
9227 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
9228 them to print formatted message.
9229
9230 2017-09-04 Pedro Alves <palves@redhat.com>
9231
9232 * btrace.c (ftrace_add_pt): Pass btrace_insn to
9233 ftrace_update_insns by reference instead of pointer.
9234
9235 2017-09-04 Yao Qi <yao.qi@linaro.org>
9236
9237 * i386-go32-tdep.c: Include x86-xstate.h.
9238 (i386_go32_init_abi): Call i386_target_description.
9239 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9240 if xcr0 is X86_XSTATE_X87_MASK.
9241 * i386-tdep.h (tdesc_i386): Remove the declaration.
9242 (tdesc_i386_mmx): Likewise.
9243
9244 2017-09-04 Yao Qi <yao.qi@linaro.org>
9245
9246 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9247 X86_XSTATE_SSE_MASK instead of 0.
9248
9249 2017-09-04 Yao Qi <yao.qi@linaro.org>
9250
9251 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9252 i386_target_description.
9253 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9254 i386_target_description.
9255 * i386-tdep.c (i386_gdbarch_init): Likewise.
9256
9257 2017-09-04 Yao Qi <yao.qi@linaro.org>
9258
9259 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9260 (x86_darwin_init_abi_64): Call amd64_target_description.
9261 * amd64-dicos-tdep.c: Likewise.
9262 * amd64-fbsd-nat.c: Likewise.
9263 * amd64-fbsd-tdep.c: Likewise.
9264 * amd64-nbsd-tdep.c: Likewise.
9265 * amd64-obsd-tdep.c: Likewise.
9266 * amd64-sol2-tdep.c: Likewise.
9267 * amd64-windows-tdep.c: Likewise.
9268 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9269
9270 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9271
9272 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9273 (btrace_function) <insn>: Change type to use std::vector.
9274 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9275 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9276 ftrace_update_insns, ftrace_compute_global_level_offset,
9277 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9278 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9279 change to std::vector.
9280 (ftrace_update_insns): Adjust to change to std::vector, change
9281 type of INSN parameter.
9282 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9283 * record-btrace.c (btrace_call_history_insn_range,
9284 btrace_compute_src_line_range,
9285 record_btrace_frame_prev_register): Adjust to change to
9286 std::vector.
9287 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9288 to change to std::vector.
9289
9290 2017-09-03 Tom Tromey <tom@tromey.com>
9291
9292 * corefile.c (reopen_exec_file): Use std::string.
9293
9294 2017-09-03 Tom Tromey <tom@tromey.com>
9295
9296 * compile/compile.c (compile_register_name_mangled): Return
9297 std::string.
9298 * compile/compile-loc2c.c (pushf_register_address): Update.
9299 (pushf_register): Update.
9300 * compile/compile-c-types.c (convert_array): Update.
9301 * compile/compile-c-symbols.c (generate_vla_size): Update.
9302 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9303 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9304 (convert_one_symbol): Update.
9305 (generate_c_for_for_one_variable): Update.
9306 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9307 std::string.
9308 (generate_register_struct): Update.
9309 * compile/compile-internal.h (c_get_range_decl_name): Return a
9310 std::string.
9311 (compile_register_name_mangled): Return std::string.
9312
9313 2017-09-03 Tom Tromey <tom@tromey.com>
9314
9315 * utils.c (perror_string): Return a std::string.
9316 (throw_perror_with_name, perror_warning_with_name): Update.
9317
9318 2017-09-03 Tom Tromey <tom@tromey.com>
9319
9320 * demangle.c (demangle_command): Use std::string,
9321 unique_xmalloc_ptr.
9322
9323 2017-09-03 Tom Tromey <tom@tromey.com>
9324
9325 * cli/cli-setshow.c (do_set_command): Use std::string.
9326
9327 2017-09-03 Tom Tromey <tom@tromey.com>
9328
9329 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9330
9331 2017-09-03 Tom Tromey <tom@tromey.com>
9332
9333 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9334
9335 2017-09-03 Tom Tromey <tom@tromey.com>
9336
9337 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9338 gdb::unique_xmalloc_ptr.
9339
9340 2017-09-03 Tom Tromey <tom@tromey.com>
9341
9342 * thread.c (print_thread_info_1): Use string_printf.
9343 (thread_apply_command, thread_apply_all_command): Use
9344 std::string.
9345
9346 2017-09-03 Tom Tromey <tom@tromey.com>
9347
9348 * valprint.c (val_print_string): Update.
9349 * gdbcore.h (memory_error_message): Return std::string.
9350 * corefile.c (memory_error_message): Return std::string.
9351 (memory_error): Update.
9352 * breakpoint.c (insert_bp_location): Update.
9353
9354 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9355
9356 * target/waitstatus.h (target_waitstatus_to_string): Change
9357 return type to std::string.
9358 * target/waitstatus.c (target_waitstatus_to_string): Return
9359 std::string.
9360 * target.h (target_waitstatus_to_string): Remove declaration.
9361 * infrun.c (resume, clear_proceed_status_thread,
9362 print_target_wait_results, do_target_wait, save_waitstatus,
9363 stop_all_threads): Adjust.
9364 * record-btrace.c (record_btrace_wait): Adjust.
9365 * target-debug.h
9366 (target_debug_print_struct_target_waitstatus_p): Adjust.
9367
9368 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9369
9370 PR gdb/22046
9371 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9372 detection.
9373
9374 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9375
9376 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9377 for setting/unsetting environment variables on the remote target.
9378 (New remote packets): Add entries for QEnvironmentHexEncoded,
9379 QEnvironmentUnset and QEnvironmentReset.
9380 * common/environ.c (gdb_environ::operator=): Extend method to
9381 handle m_user_set_env_list and m_user_unset_env_list.
9382 (gdb_environ::clear): Likewise.
9383 (match_var_in_string): Change type of first parameter from 'char
9384 *' to 'const char *'.
9385 (gdb_environ::set): Extend method to handle
9386 m_user_set_env_list and m_user_unset_env_list.
9387 (gdb_environ::unset): Likewise.
9388 (gdb_environ::clear_user_set_env): New method.
9389 (gdb_environ::user_set_envp): Likewise.
9390 (gdb_environ::user_unset_envp): Likewise.
9391 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9392 m_user_unset_env_list on move constructor/assignment.
9393 (unset): Add new default parameter 'update_unset_list = true'.
9394 (clear_user_set_env): New method.
9395 (user_set_envp): Likewise.
9396 (user_unset_envp): Likewise.
9397 (m_user_set_env_list): New std::set.
9398 (m_user_unset_env_list): Likewise.
9399 * common/rsp-low.c (hex2str): New function.
9400 (bin2hex): New overload for bin2hex function.
9401 * common/rsp-low.c (hex2str): New prototype.
9402 (str2hex): New overload prototype.
9403 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9404 QEnvironmentUnset and QEnvironmentReset.
9405 (remote_protocol_features): Add QEnvironmentHexEncoded,
9406 QEnvironmentUnset and QEnvironmentReset packets.
9407 (send_environment_packet): New function.
9408 (extended_remote_environment_support): Likewise.
9409 (extended_remote_create_inferior): Call
9410 extended_remote_environment_support.
9411 (_initialize_remote): Add QEnvironmentHexEncoded,
9412 QEnvironmentUnset and QEnvironmentReset packet configs.
9413 * unittests/environ-selftests.c (gdb_selftest_env_var):
9414 New variable.
9415 (test_vector_initialization): New function.
9416 (test_init_from_host_environ): Likewise.
9417 (test_reinit_from_host_environ): Likewise.
9418 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9419 Likewise.
9420 (test_unset_set_empty_vector): Likewise.
9421 (test_vector_clear): Likewise.
9422 (test_std_move): Likewise.
9423 (test_move_constructor):
9424 (test_self_move): Likewise.
9425 (test_set_unset_reset): Likewise.
9426 (run_tests): Rewrite in terms of the functions above.
9427
9428 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
9429
9430 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9431 (adi_available): Use a temp variable of type CORE_ADDR as argument
9432 3 when calling target_auxv_search.
9433 (adi_normalize_address): Use masks and xor operators to calculate
9434 normalized address.
9435 (adi_read_versions, adi_write_versions, adi_print_versions)
9436 (do_examine, do_assign): Use paddress.
9437
9438 2017-08-29 John Baldwin <jhb@FreeBSD.org>
9439
9440 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9441 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9442 out of loop and add supply of FIR.
9443 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9444 add collect of FIR.
9445
9446 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9447
9448 PR gdb/21827
9449 * cli/cli-script.c (define_command): Don't convert command name
9450 to lower case.
9451
9452 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9453
9454 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9455 Update all callers accordingly. Remove all code blocks handling
9456 the case where DISPP is not NULL.
9457
9458 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9459
9460 PR symtab/22003
9461 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9462 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9463 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9464
9465 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9466
9467 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9468 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9469 (read_comp_units_from_section): New parameter abbrev_section, use
9470 read_and_check_comp_unit_head, allocate signatured_type if needed.
9471 (create_all_comp_units): Update read_comp_units_from_section caller.
9472
9473 2017-08-23 Pedro Alves <palves@redhat.com>
9474
9475 PR remote/21852
9476 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9477 to null_ptid and switch to thread without reading the registers
9478 after adding the inferior.
9479
9480 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9481
9482 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9483 compile-gcc.
9484 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9485 (compile_to_object): Implement compile_gcc.
9486 (_initialize_compile): Install "set compile-gcc". Initialize
9487 compile_gcc.
9488
9489 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9490
9491 * compile/compile.c (compile_to_object): Conditionally call
9492 set_verbose. Conditionally call compile or compile_v0.
9493
9494 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9495
9496 * sparc64-tdep.h: (adi_normalize_address): New export.
9497 * sparc-nat.h: (open_adi_tag_fd): New export.
9498 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9499 * sparc64-linux-tdep.c:
9500 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9501 (sparc64_linux_handle_segmentation_fault): New function.
9502 (sparc64_linux_init_abi): Register
9503 sparc64_linux_handle_segmentation_fault
9504 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9505 (sparc64_addr_bits_remove): New function.
9506 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9507 (MAX_PROC_NAME_SIZE): New macro.
9508 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9509 (sparc64adilist): New variable.
9510 (adi_proc_list): New variable.
9511 (find_adi_info): New function.
9512 (add_adi_info): New function.
9513 (get_adi_info_proc): New function.
9514 (get_adi_info): New function.
9515 (info_adi_command): New function.
9516 (read_maps_entry): New function.
9517 (adi_available): New function.
9518 (adi_normalize_address): New function.
9519 (adi_align_address): New function.
9520 (adi_convert_byte_count): New function.
9521 (adi_tag_fd): New function.
9522 (adi_is_addr_mapped): New function.
9523 (adi_read_versions): New function.
9524 (adi_write_versions): New function.
9525 (adi_print_versions): New function.
9526 (do_examine): New function.
9527 (do_assign): New function.
9528 (adi_examine_command): New function.
9529 (adi_assign_command): New function.
9530 (_initialize_sparc64_adi_tdep): New function.
9531
9532 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9533
9534 * breakpoint.c (breakpoints_info): Rename to ...
9535 (info_breakpoints_command): ... this.
9536 (watchpoints_info): Rename to ...
9537 (info_watchpoints_command): ... this.
9538 (tracepoints_info): Rename to ...
9539 (info_tracepoints_command): ... this.
9540 (_initialize_breakpoint): Adjust.
9541 * dcache.c (dcache_info): Rename to ...
9542 (info_display_command): ... this.
9543 (_initialize_dcache): Adjust.
9544 * frame.h (args_info): Rename to ...
9545 (info_args_command): ... this.
9546 (locals_info): Rename to ...
9547 (info_locals_command): ... this.
9548 * infcmd.c (nofp_registers_info): Rename to ...
9549 (info_registers_command): ... this.
9550 (float_info): Rename to ...
9551 (info_float_command): ... this.
9552 (program_info): Rename to ...
9553 (info_program_command): ... this.
9554 (all_registers_info): Rename to ...
9555 (info_all_registers_command): ... this.
9556 (vector_info): Rename to ...
9557 (info_vector_command): ... this.
9558 (float_info): Rename to ...
9559 (info_float_command): ... this.
9560 (_initialize_infcmd): Adjust.
9561 * inferior.h (term_info): Rename to ...
9562 (info_terminal_command): ... this.
9563 * inflow.c (term_info): Rename to ...
9564 (info_terminal_command): ... this.
9565 (_initialize_inflow): Adjust.
9566 * infrun.c (signals_info): Rename to ...
9567 (info_signals_command): ... this.
9568 (_initialize_infrun): Adjust.
9569 * objc-lang.c (classes_info): Rename to ...
9570 (info_classes_command): ... this.
9571 (selectors_info): Rename to ...
9572 (info_selectors_command): ... this.
9573 (_initialize_objc_language): Adjust.
9574 * printcmd.c (sym_info): Rename to ...
9575 (info_symbol_command): ... this.
9576 (address_info): Rename to ...
9577 (info_address_command): ... this.
9578 (display_info): Rename to ...
9579 (info_display_command): ... this.
9580 (_initialize_printcmd): Adjust.
9581 * reverse.c (bookmarks_info): Rename to ...
9582 (info_breakpoints_command): ... this.
9583 (_initialize_reverse): Adjust.
9584 * ser-go32.c (dos_info): Rename to ...
9585 (info_serial_command): ... this.
9586 (_initialize_ser_dos): Adjust.
9587 * skip.c (skip_info): Rename to ...
9588 (info_skip_command): ... this.
9589 (_initialize_step_skip): Adjust.
9590 * source.c (line_info): Rename to ...
9591 (info_line_command): ... this.
9592 (source_info): Rename to ...
9593 (info_source_command)
9594 * stack.c (frame_info): Rename to ...
9595 (info_frame_command): ... this.
9596 (locals_info): Rename to ...
9597 (info_locals_command): ... this.
9598 (args_info): Rename to ...
9599 (info_args_command): ... this.
9600 (_initialize_stack): Adjust.
9601 * symtab.c (sources_info): Rename to ...
9602 (info_sources_command): ... this.
9603 (variables_info): Rename to ...
9604 (info_variables_command): ... this.
9605 (functions_info): Rename to ...
9606 (info_functions_command): ... this.
9607 (types_info): Rename to ...
9608 (info_types_command): ... this.
9609 (_initialize_symtab): Adjust.
9610 * target.c (target_info): Rename to ...
9611 (info_target_command): ... this.
9612 (initialize_targets): Adjust.
9613 * tracepoint.c (tvariables_info): Rename to ...
9614 (info_tvariables_command): ... this.
9615 (scope_info): Rename to ...
9616 (info_scope_command): ... this.
9617 (trace_dump_actions): Adjust.
9618 (_initialize_tracepoint): Adjust.
9619
9620 2017-08-22 Tom Tromey <tom@tromey.com>
9621
9622 * breakpoint.h (install_breakpoint): Update.
9623 * breakpoint.c (add_solib_catchpoint): Update.
9624 (install_breakpoint): Change argument to a std::unique_ptr.
9625 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9626 (create_breakpoint_sal, create_breakpoint): Update.
9627 (watch_command_1, catch_exec_command_1)
9628 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9629 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9630 Return the breakpoint.
9631 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9632 (new_single_step_breakpoint): Update.
9633 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9634 std::unique_ptr.
9635 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9636 std::unique_ptr.
9637 * break-catch-sig.c (create_signal_catchpoint): Use
9638 std::unique_ptr.
9639 * ada-lang.c (create_ada_exception_catchpoint): Use
9640 std::unique_ptr.
9641
9642 2017-08-22 Tom Tromey <tom@tromey.com>
9643
9644 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9645
9646 2017-08-22 Tom Tromey <tom@tromey.com>
9647
9648 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9649 (lookup_partial_symbol): Update.
9650
9651 2017-08-22 Tom Tromey <tom@tromey.com>
9652
9653 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9654 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9655 (find_and_open_source, symtab_to_fullname): Update.
9656 * psymtab.c (psymtab_to_fullname): Update.
9657
9658 2017-08-22 Tom Tromey <tom@tromey.com>
9659
9660 * exec.c (exec_file_attach): Update.
9661 * linux-thread-db.c (try_thread_db_load): Update.
9662 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9663 * utils.c (gdb_realpath): Change return type.
9664 (gdb_realpath_keepfile): Update.
9665 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9666 (_initialize_utils): Register the new self test.
9667 * source.c (openp): Update.
9668 (find_and_open_source): Update.
9669 * nto-tdep.c (nto_find_and_open_solib): Update.
9670 * main.c (set_gdb_data_directory): Update.
9671 (captured_main_1): Update.
9672 * dwarf2read.c (dwarf2_get_dwz_file): Update
9673 (dw2_map_symbol_filenames): Update.
9674 * auto-load.c (auto_load_safe_path_vec_update): Update.
9675 (filename_is_in_auto_load_safe_path_vec): Change type of
9676 "filename_realp".
9677 (auto_load_objfile_script): Update.
9678 (file_is_auto_load_safe): Update. Use std::string.
9679 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9680
9681 2017-08-22 Tom Tromey <tom@tromey.com>
9682
9683 * utils.c (gdb_realpath_keepfile): Return a
9684 gdb::unique_xmalloc_ptr.
9685 * exec.c (exec_file_attach): Update.
9686 * utils.h (gdb_realpath_keepfile): Return a
9687 gdb::unique_xmalloc_ptr.
9688
9689 2017-08-22 Tom Tromey <tom@tromey.com>
9690
9691 * compile/compile.c (compile_file_command): Use
9692 gdb::unique_xmalloc_ptr, std::string.
9693 * utils.c (gdb_abspath): Change return type.
9694 * source.c (openp): Update.
9695 * objfiles.c (allocate_objfile): Update.
9696 * main.c (set_gdb_data_directory): Update.
9697 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9698
9699 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9700
9701 * cli-cmds.c (list_commands): List actual code around more than
9702 one location.
9703
9704 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9705
9706 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9707
9708 2017-08-21 Pedro Alves <palves@redhat.com>
9709
9710 PR gdb/19487
9711 * c-exp.y (variable production): Handle function aliases.
9712 * minsyms.c (msymbol_is_text): New function.
9713 * minsyms.h (msymbol_is_text): Declare.
9714 * symtab.c (find_function_alias_target): New function.
9715 * symtab.h (find_function_alias_target): Declare.
9716
9717 2017-08-21 Pedro Alves <palves@redhat.com>
9718
9719 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9720 typedefs.
9721 * typeprint.c (whatis_exp): If handling "whatis", and expression
9722 is OP_TYPE, strip one typedef level. Otherwise don't strip
9723 typedefs here.
9724 * valops.c (value_cast): Save "to" type before resolving
9725 stubs/typedefs. Use that type as resulting value's type.
9726
9727 2017-08-18 Tom Tromey <tom@tromey.com>
9728 Pedro Alves <palves@redhat.com>
9729
9730 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9731 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9732 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9733 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9734 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9735 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9736 (linux_get_siginfo_data): Add "thread" argument. Use
9737 scoped_restore.
9738 * linux-nat.c (linux_child_follow_fork)
9739 (check_stopped_by_watchpoint): Use scoped_restore.
9740 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9741 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9742 (restore_inferior_ptid, save_inferior_ptid): Remove.
9743 * btrace.c (btrace_fetch): Use scoped_restore.
9744 * bsd-uthread.c (bsd_uthread_fetch_registers)
9745 (bsd_uthread_store_registers): Use scoped_restore.
9746 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9747 scoped_restore.
9748 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9749 (aix_thread_xfer_partial): Use scoped_restore.
9750 * inferior.h (save_inferior_ptid): Remove.
9751
9752 2017-08-18 Yao Qi <yao.qi@linaro.org>
9753
9754 PR tdep/21818
9755 * arm-tdep.c (gdb_print_insn_arm): Mark
9756 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9757
9758 2017-08-18 Yao Qi <yao.qi@linaro.org>
9759
9760 * NEWS: Mention GDBserver's new option "--selftest".
9761 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9762 * selftest.c: Move it to common/selftest.c.
9763 * selftest.h: Move it to common/selftest.h.
9764 * selftest-arch.c (reset): New function.
9765 (tests_with_arch): Call reset.
9766
9767 2017-08-18 Yao Qi <yao.qi@linaro.org>
9768
9769 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9770 instead of exception_fprintf and printf_filtered.
9771
9772 2017-08-18 Yao Qi <yao.qi@linaro.org>
9773
9774 * selftest.c (register_self_test): Rename it to
9775 selftests::register_test.
9776 (run_self_tests): selftest::run_tests.
9777 * selftest.h: Update declarations.
9778 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9779 selftests::register_test_foreach_arch.
9780 * selftest-arch.h: Update declaration.
9781 * aarch64-tdep.c: Update.
9782 * arm-tdep.c: Likewise.
9783 * disasm-selftests.c: Likewise.
9784 * dwarf2loc.c: Likewise.
9785 * dwarf2-frame.c: Likewise.
9786 * findvar.c: Likewise.
9787 * gdbarch-selftests.c: Likewise.
9788 * maint.c (maintenance_selftest): Likewise.
9789 * regcache.c: Likewise.
9790 * rust-exp.y: Likewise.
9791 * selftest-arch.c: Likewise.
9792 * unittests/environ-selftests.c: Likewise.
9793 * unittests/function-view-selftests.c: Likewise.
9794 * unittests/offset-type-selftests.c: Likewise.
9795 * unittests/optional-selftests.c: Likewise.
9796 * unittests/scoped_restore-selftests.c: Likewise.
9797 * utils-selftests.c: Likewise.
9798
9799 2017-08-17 Pedro Alves <palves@redhat.com>
9800
9801 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9802 local.
9803
9804 2017-08-17 Pedro Alves <palves@redhat.com>
9805
9806 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9807 field.
9808 (reset_die_in_process): Delete, replaced by ...
9809 (process_die_scope): ... this new class. Make it responsible for
9810 freeing cu->line_header too.
9811 (process_die): Use process_die_scope.
9812 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9813 cu->line_header_die_owner. Don't release the line header if it's
9814 owned by the CU.
9815 (setup_type_unit_groups): Make the CU/DIE own the line header.
9816 Don't release the line header here.
9817
9818 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9819
9820 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9821
9822 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9823
9824 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9825 Single-Key mode
9826
9827 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9828
9829 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9830 mode command list.
9831
9832 2017-08-15 Stafford Horne <shorne@gmail.com>
9833
9834 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9835
9836 2017-08-15 Stafford Horne <shorne@gmail.com>
9837
9838 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9839
9840 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9841
9842 PR gdb/21954
9843 * infcmd.c (unset_environment_command): Use the 'clear' method on
9844 the environment instead of resetting it.
9845
9846 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9847
9848 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9849 platforms.
9850
9851 2017-08-14 Tom Tromey <tom@tromey.com>
9852
9853 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9854 (print_binary_chars): Likewise.
9855 (BITS_IN_BYTES): Remove.
9856
9857 2017-08-14 Tom Tromey <tom@tromey.com>
9858
9859 PR gdb/21675
9860 * valprint.c (LOW_ZERO): Change value to 034.
9861 (print_octal_chars): Add static_asserts for octal constants.
9862 * printcmd.c (print_scalar_formatted): Add 'd' case.
9863
9864 2017-08-11 Tom Tromey <tom@tromey.com>
9865
9866 * symfile.c (add_symbol_file_command): Use std::vector.
9867
9868 2017-08-14 Tom Tromey <tom@tromey.com>
9869
9870 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9871 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9872 std::move.
9873 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9874
9875 2017-08-11 Pedro Alves <palves@redhat.com>
9876
9877 * infrun.c (process_event_stop_test): Adjust
9878 function_name_is_marked_for_skip call.
9879 * skip.c: Include <list>.
9880 (skiplist_entry): Make it a class with private fields, and
9881 getters/setters.
9882 (skiplist_entry_chain): Delete.
9883 (skiplist_entries): New.
9884 (skiplist_entry_count): Delete.
9885 (highest_skiplist_entry_num): New.
9886 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9887 (add_skiplist_entry): Delete.
9888 (skiplist_entry::skiplist_entry): New.
9889 (skiplist_entry::add_entry): New.
9890 (skip_file_command, skip_function): Adjust.
9891 (compile_skip_regexp): Delete.
9892 (skip_command): Don't compile regexp here. Adjust to use
9893 skiplist_entry::add_entry.
9894 (skip_info): Adjust to use range-for and getters.
9895 (skip_enable_command, skip_disable_command): Adjust to use
9896 range-for and setters.
9897 (skip_delete_command): Adjust to use std::list.
9898 (add_skiplist_entry): Delete.
9899 (skip_file_p): Delete, refactored as ...
9900 (skiplist_entry::do_skip_file_p): ... this new method.
9901 (skip_gfile_p): Delete, refactored as ...
9902 (skiplist_entry::do_gskip_file_p): ... this new method.
9903 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9904 (skiplist_entry::skip_function_p): ... this new method.
9905 (function_name_is_marked_for_skip): Now returns bool, and takes
9906 the function sal by const reference. Adjust to use range-for and
9907 skiplist_entry methods.
9908 (_initialize_step_skip): Remove references to
9909 skiplist_entry_chain, skiplist_entry_count.
9910 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9911 takes the function sal by const reference.
9912
9913 2017-08-11 Yao Qi <yao.qi@linaro.org>
9914
9915 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9916 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9917 (dwarf2_frame_cache):
9918 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9919 RETURN_MASK_ALL and set *this_case to NULL.
9920 * frame-unwind.h: Update comments.
9921
9922 2017-08-11 Yao Qi <yao.qi@linaro.org>
9923
9924 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9925 (dwarf2_frame_state_copy_regs): Remove.
9926 (dwarf2_frame_state_free_regs): Remove.
9927 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9928 (dwarf2_restore_rule): Call method .alloc_regs instead of
9929 dwarf2_frame_state_alloc_regs.
9930 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9931 constructor. Call std::move.
9932 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9933 (dwarf2_frame_cache): Likewise.
9934
9935 [GDB_SELF_TEST]: Include selftest.h and
9936 selftest-arch.h.
9937 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9938 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9939 execute_cfa_program_test.
9940
9941 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9942 copy ctor, assignment operator, move assignment.
9943 <alloc_regs>: New method.
9944 <swap>: New method.
9945 (struct dwarf2_frame_state): Delete dtor.
9946 (dwarf2_frame_state_alloc_regs): Remove declaration.
9947 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9948 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9949
9950 2017-08-11 Yao Qi <yao.qi@linaro.org>
9951
9952 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9953 (dwarf2_frame_state::dwarf2_frame_state): New.
9954 (dwarf2_frame_state::~dwarf2_frame_state): New.
9955 (dwarf2_fetch_cfa_info): Update.
9956 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9957 rather than a pointer. Update code.
9958 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9959 dtor.
9960 <data_align, code_align, retaddr_column>: Change them to const.
9961 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9962 to bool.
9963
9964 2017-08-11 Yao Qi <yao.qi@linaro.org>
9965
9966 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9967 <loc.exp>: New field.
9968 * dwarf2-frame.c (execute_cfa_program): Update.
9969 (dwarf2_frame_prev_register): Update.
9970
9971 2017-08-10 Pedro Alves <palves@redhat.com>
9972
9973 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9974
9975 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9976
9977 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9978 (fbsd_pending_children): Use std::list.
9979 (fbsd_remember_child): Likewise.
9980 (fbsd_is_child_pending): Likewise.
9981 (fbsd_pending_vfork_done): Use std::forward_list.
9982 (fbsd_add_vfork_done): Likewise.
9983 (fbsd_is_vfork_done_pending): Likewise.
9984 (fbsd_next_vfork_done): Likewise.
9985
9986 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9987
9988 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9989 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9990 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9991 for `mapfilename'.
9992 (fbsd_xfer_partial): Use gdb::byte_vector.
9993 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9994
9995 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9996
9997 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9998 "filestuff.h".
9999 (fbsd_find_memory_regions): Fix `mapfile' initialization.
10000
10001 2017-08-09 Tom Tromey <tom@tromey.com>
10002
10003 * skip.c (skiplist_entry): New constructor.
10004 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
10005 (skiplist_entry::file_is_glob): Now bool.
10006 (skiplist_entry::file, skiplist_entry::function): Now
10007 std::string.
10008 (make_skip_entry): Return a unique_ptr. Use new.
10009 (free_skiplist_entry, free_skiplist_entry_cleanup)
10010 (make_free_skiplist_entry_cleanup): Remove.
10011 (skip_command, skip_disable_command, add_skiplist_entry)
10012 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
10013 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
10014 (function_name_is_marked_for_skip): Update.
10015 (skip_delete_command): Update. Use delete.
10016
10017 2017-08-09 Jiong Wang <jiong.wang@arm.com>
10018
10019 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
10020 (aarch64_linux_core_read_description): New function.
10021 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
10022
10023 2017-08-09 Pedro Alves <palves@redhat.com>
10024
10025 * cp-name-parser.y (cp_comp_to_string): Return a
10026 gdb::unique_xmalloc_ptr<char>.
10027 * cp-support.c (replace_typedefs_qualified_name)
10028 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
10029 (cp_canonicalize_string_full): Use op= instead of explicit
10030 convertion.
10031 (cp_class_name_from_physname, method_name_from_physname)
10032 (cp_func_name, cp_remove_params): Adjust to use
10033 gdb::unique_xmalloc_ptr<char>.
10034 * cp-support.h (cp_comp_to_string): Return a
10035 gdb::unique_xmalloc_ptr<char>.
10036 * python/py-type.c (typy_lookup_type): Adjust to use
10037 gdb::unique_xmalloc_ptr<char>.
10038
10039 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
10040
10041 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
10042
10043 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
10044 Yao Qi <yao.qi@linaro.org>
10045
10046 * cp-support.c (cp_canonicalize_string_full): Use
10047 gdb::unique_xmalloc_ptr<char>.
10048 (cp_canonicalize_string): Likewise.
10049
10050 2017-08-09 Yao Qi <yao.qi@linaro.org>
10051
10052 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
10053 * regformats/i386/amd64-avx-avx512.dat: Remove.
10054 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
10055 * regformats/i386/amd64-avx-mpx.dat:Remove.
10056 * regformats/i386/amd64-avx.dat: Remove.
10057 * regformats/i386/amd64-mpx.dat: Remove.
10058 * regformats/i386/i386-avx-avx512.dat: Remove.
10059 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
10060 * regformats/i386/i386-avx-mpx.dat: Remove.
10061 * regformats/i386/i386-mmx.dat: Remove.
10062 * regformats/i386/i386-mpx.dat: Remove.
10063
10064 2017-08-09 Yao Qi <yao.qi@linaro.org>
10065
10066 * amd64-tdep.h (tdesc_x32): Remove the declaration.
10067 * amd64-tdep.c: Don't include features/i386/x32*.c.
10068 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
10069 functions.
10070 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
10071 and i386/x32-avx-avx512.
10072 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
10073 and i386/x32.xml.
10074 * features/i386/x32-avx-avx512.c: Removed.
10075 * features/i386/x32-avx-avx512.xml: Removed.
10076 * features/i386/x32-avx.c: Removed.
10077 * features/i386/x32-avx.xml: Removed.
10078 * features/i386/x32.c: Removed.
10079 * features/i386/x32.xml: Removed.
10080 * regformats/i386/x32-avx-avx512.dat: Removed.
10081 * regformats/i386/x32-avx.dat: Removed.
10082 * regformats/i386/x32.dat: Removed.
10083
10084 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10085
10086 PR breakpoints/21886
10087 * mem-break.c (default_memory_insert_breakpoint): Use
10088 `->placed_address' rather than `->reqstd_address' for the
10089 breakpoint location.
10090
10091 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10092
10093 * arch-utils.c (default_print_insn): Remove arch/mach/endian
10094 assertions.
10095
10096 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
10097
10098 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
10099 a union of `tdep_info', `tdesc_data' and `id'.
10100 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
10101 rather than `info.tdep_info'.
10102 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
10103 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10104 * i386-tdep.c (i386_gdbarch_init): Likewise.
10105 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
10106 * mips-tdep.c (mips_gdbarch_init): Likewise.
10107 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10108 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10109 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
10110 `info.tdep_info'.
10111 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
10112 `info.tdep_info'.
10113 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10114 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
10115 `info.tdep_info'.
10116 * spu-tdep.c (spu_gdbarch_init): Likewise.
10117 * gdbarch.h: Regenerate.
10118
10119 2017-08-07 Leszek Swirski <leszeks@google.com>
10120
10121 PR symtab/20899
10122 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
10123
10124 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
10125
10126 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
10127 (gdbsim_open): Rename gdb_argv args object to argv.
10128
10129 2017-08-05 Tom Tromey <tom@tromey.com>
10130
10131 * compile/compile-object-load.c (compile_object_load): Use
10132 gdb::unique_xmalloc_ptr.
10133 * cli/cli-dump.c (scan_filename): Rename from
10134 scan_filename_with_cleanup. Change return type.
10135 (scan_expression): Rename from scan_expression_with_cleanup.
10136 Change return type.
10137 (dump_memory_to_file, dump_value_to_file, restore_command):
10138 Use gdb::unique_xmalloc_ptr. Update.
10139 * cli/cli-cmds.c (find_and_open_script): Use
10140 gdb::unique_xmalloc_ptr.
10141 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
10142 * symmisc.c (maintenance_print_symbols)
10143 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
10144 * symfile.c (symfile_bfd_open, generic_load)
10145 (add_symbol_file_command, remove_symbol_file_command): Use
10146 gdb::unique_xmalloc_ptr.
10147 * source.c (openp): Use gdb::unique_xmalloc_ptr.
10148 * psymtab.c (maintenance_print_psymbols): Use
10149 gdb::unique_xmalloc_ptr.
10150 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
10151 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
10152 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
10153 (reload_shared_libraries_1): Likewise.
10154
10155 2017-08-05 Tom Tromey <tom@tromey.com>
10156
10157 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
10158 (rust_op_vector, rust_set_vector): New typedefs.
10159 (current_parser): New global.
10160 (work_obstack): Change to pointer type. Update all users.
10161 (rust_ast, pstate): Remove globals.
10162 (struct rust_parser): New.
10163 (%union) <params, field_inits>: Change type.
10164 (start, tuple_expr, unit_expr, struct_expr_list, literal)
10165 (field_expr, expr_list, maybe_expr_list, type_list): Update.
10166 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
10167 (convert_params_to_types, convert_params_to_expression): Change
10168 type of "params".
10169 (ast_string): Change type of "fields".
10170 (rust_parse): Make a rust_parser. Remove cleanups.
10171 (rust_lex_tests): Make and install an auto_obstack.
10172
10173 2017-08-04 Yao Qi <yao.qi@linaro.org>
10174
10175 * configure.srv (ipa_x32_linux_regobj): New.
10176 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
10177 instead of X86_TDESC_AVX512.
10178 (initialize_low_tracepoint): Call
10179 init_registers_x32_avx_avx512_linux.
10180
10181 2017-08-04 Yao Qi <yao.qi@linaro.org>
10182
10183 * utils.h (gdb_argv): Add namespace std for nullptr_t.
10184
10185 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
10186
10187 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
10188
10189 2017-08-03 Tom Tromey <tom@tromey.com>
10190
10191 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
10192 Remove.
10193 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
10194
10195 2017-08-03 Tom Tromey <tom@tromey.com>
10196
10197 * python/py-param.c (compute_enum_values): Use gdb_argv.
10198
10199 2017-08-03 Tom Tromey <tom@tromey.com>
10200
10201 * utils.h (struct gdb_argv_deleter): New.
10202 (gdb_argv): New class.
10203 * utils.c (gdb_argv::reset): New method.
10204 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
10205 * tracefile.c (tsave_command): Use gdb_argv.
10206 * top.c (new_ui_command): Use gdb_argv.
10207 * symmisc.c (maintenance_print_symbols)
10208 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
10209 * symfile.c (symbol_file_command, generic_load)
10210 (remove_symbol_file_command): Use gdb_argv.
10211 * stack.c (backtrace_command): Use gdb_argv.
10212 * source.c (add_path, show_substitute_path_command)
10213 (unset_substitute_path_command, set_substitute_path_command):
10214 Use gdb_argv.
10215 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
10216 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
10217 * remote.c (extended_remote_run, remote_put_command)
10218 (remote_get_command, remote_delete_command): Use gdb_argv.
10219 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
10220 (gdbsim_open): Use gdb_argv.
10221 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
10222 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
10223 * procfs.c (procfs_info_proc): Use gdb_argv.
10224 * interps.c (interpreter_exec_cmd): Use gdb_argv.
10225 * infrun.c (handle_command): Use gdb_argv.
10226 * inferior.c (add_inferior_command, clone_inferior_command):
10227 Use gdb_argv.
10228 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10229 * exec.c (exec_file_command): Use gdb_argv.
10230 * cli/cli-cmds.c (alias_command): Use gdb_argv.
10231 * compile/compile.c (build_argc_argv): Use gdb_argv.
10232
10233 2017-08-03 Tom Tromey <tom@tromey.com>
10234
10235 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10236
10237 2017-08-03 Tom Tromey <tom@tromey.com>
10238
10239 * python/python.c (compute_python_string): Return std::string.
10240 (gdbpy_eval_from_control_command): Update.
10241 (do_start_initialization): Use std::string.
10242 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10243 xstrprintf.
10244 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10245 xstrprintf.
10246
10247 2017-08-03 Tom Tromey <tom@tromey.com>
10248
10249 * top.h (do_restore_instream_cleanup): Remove.
10250 * top.c (do_restore_instream_cleanup): Remove.
10251 (read_command_file): Use scoped_restore.
10252 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10253
10254 2017-08-03 Tom Tromey <tom@tromey.com>
10255
10256 * cli/cli-script.c (execute_user_command)
10257 (execute_control_command): Use scoped_restore.
10258
10259 2017-08-03 Tom Tromey <tom@tromey.com>
10260
10261 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10262 (execute_user_command): Remove user_call_depth; use
10263 user_args_stack's size instead.
10264
10265 2017-08-03 Tom Tromey <tom@tromey.com>
10266
10267 * top.h (in_user_command): Remove.
10268 * top.c (in_user_command): Remove.
10269 * cli/cli-script.c (do_restore_user_call_depth)
10270 (execute_user_command): Update.
10271
10272 2017-08-03 Tom Tromey <tom@tromey.com>
10273
10274 * valops.c (search_struct_method): Use gdb::byte_vector.
10275 * valarith.c (value_concat): Use std::vector.
10276 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10277 (simple_search_memory): Likewise.
10278 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10279 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10280 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10281 * elfread.c (elf_rel_plt_read): Use std::string.
10282 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10283 * cli/cli-dump.c (restore_section_callback): Use
10284 gdb::byte_vector.
10285
10286 2017-08-03 Tom Tromey <tom@tromey.com>
10287
10288 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10289
10290 2017-08-03 Tom Tromey <tom@tromey.com>
10291
10292 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10293 (tui_register_format): Use scoped_restore.
10294
10295 2017-08-03 Tom Tromey <tom@tromey.com>
10296
10297 * reverse.c (exec_direction_default): Remove.
10298 (exec_reverse_once): Use scoped_restore.
10299 * remote.c (restore_remote_timeout): Remove.
10300 (remote_flash_erase, remote_flash_write, remote_flash_done)
10301 (readchar, remote_serial_write): Use scoped_restore.
10302 * cli/cli-script.c (struct source_cleanup_lines_args)
10303 (source_cleanup_lines): Remove.
10304 (script_from_file): Use scoped_restore.
10305 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10306 (source_command): Use scoped_restore.
10307
10308 2017-08-03 Tom Tromey <tom@tromey.com>
10309
10310 * utils.h (make_cleanup_free_so): Remove.
10311 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10312 * solist.h (struct so_deleter): New.
10313 (so_list_up): New typedef.
10314 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10315
10316 2017-08-03 Tom Tromey <tom@tromey.com>
10317
10318 * utils.h (make_cleanup_restore_current_language): Remove.
10319 * utils.c (do_restore_current_language)
10320 (make_cleanup_restore_current_language): Remove.
10321 * parse.c (parse_exp_in_context_1)
10322 (parse_expression_with_language): Use
10323 scoped_restore_current_language.
10324 * mi/mi-main.c (mi_cmd_execute): Use
10325 scoped_restore_current_language.
10326 * language.h (scoped_restore_current_language): New class.
10327
10328 2017-08-03 Tom Tromey <tom@tromey.com>
10329
10330 * compile/compile.c (cleanup_unlink_file): Remove.
10331 (compile_to_object): Use gdb::unlinker.
10332 (eval_compile_command): Likewise.
10333
10334 2017-08-03 Tom Tromey <tom@tromey.com>
10335
10336 * utils.h (make_cleanup_fclose): Remove.
10337 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10338
10339 2017-08-03 Tom Tromey <tom@tromey.com>
10340
10341 * top.c (open_terminal_stream): Return gdb_file_up.
10342 (new_ui_command): Update.
10343
10344 2017-08-03 Tom Tromey <tom@tromey.com>
10345
10346 * source.c (print_source_lines_base, forward_search_command)
10347 (reverse_search_command): Use gdb_file_up.
10348
10349 2017-08-03 Tom Tromey <tom@tromey.com>
10350
10351 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10352
10353 2017-08-03 Tom Tromey <tom@tromey.com>
10354
10355 * cli/cli-cmds.c (find_and_open_script): Change return type.
10356 Remove "streamp" and "full_path" parameters.
10357 (source_script_with_search): Update.
10358 * auto-load.c (source_script_file): Update.
10359 * cli/cli-cmds.h (find_and_open_script): Change type.
10360 (open_script): New struct.
10361
10362 2017-08-03 Tom Tromey <tom@tromey.com>
10363
10364 * xml-support.c (xml_fetch_content_from_file): Update.
10365 * ui-file.c (stdio_file::open): Update.
10366 * tracefile-tfile.c (tfile_start): Update.
10367 * remote.c (remote_file_put, remote_file_get): Update.
10368 * nat/linux-procfs.c (linux_proc_get_int)
10369 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10370 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10371 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10372 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10373 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10374 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10375 * linux-nat.c (linux_proc_pending_signals): Update.
10376 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10377 (file_closer): Remove.
10378 * compile/compile.c (compile_to_object): Update.
10379 * common/filestuff.h (struct gdb_file_deleter): New.
10380 (gdb_file_up): New typedef.
10381 (gdb_fopen_cloexec): Change return type.
10382 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10383 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10384 (dump_binary_file, restore_binary_file): Update.
10385 * auto-load.c (auto_load_objfile_script_1): Update.
10386
10387 2017-08-03 Tom Tromey <tom@tromey.com>
10388
10389 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10390 (info_static_tracepoint_markers_command): Likewise.
10391 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10392 * skip.c (skip_info): Use ui_out_emit_table.
10393 * progspace.c (print_program_space): Use ui_out_emit_table.
10394 * osdata.c (info_osdata): Use ui_out_emit_table.
10395 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10396 ui_out_emit_table.
10397 * linux-thread-db.c (info_auto_load_libthread_db): Use
10398 ui_out_emit_table.
10399 * inferior.c (print_inferior): Use ui_out_emit_table.
10400 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10401 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10402 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10403 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10404 * ui-out.h (class ui_out_emit_table): New.
10405
10406 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10407
10408 * mips-tdep.c (mips_fpu_type_str): New function.
10409 (mips_dump_tdep): Call it.
10410
10411 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10412
10413 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10414 `->mips_fpu_type'.
10415
10416 2017-07-31 Xavier Roirand <roirand@adacore.com>
10417
10418 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10419
10420 2017-07-27 Xavier Roirand <roirand@adacore.com>
10421
10422 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10423
10424 2017-07-26 Yao Qi <yao.qi@linaro.org>
10425
10426 * cli/cli-cmds.c (maintenancechecklist): New variable.
10427 * gdbcmd.h (maintenancechecklist): Declare it.
10428 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10429 Call i386_linux_read_description with different masks.
10430 * maint.c (maintenance_check_command): New function.
10431 (_initialize_maint_cmds): Call add_prefix_cmd.
10432 * target-descriptions.c (tdesc_reg): override operator != and ==.
10433 (tdesc_type): Likewise.
10434 (tdesc_feature): Likewise.
10435 (target_desc): Likewise.
10436 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10437 (maintenance_check_xml_descriptions): New function.
10438 (_initialize_target_descriptions) Add command "xml-descriptions".
10439 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10440
10441 2017-07-26 Yao Qi <yao.qi@linaro.org>
10442
10443 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10444 Include features/i386/32bit-*.c.
10445 (i386_linux_read_description): Generate target description if it
10446 doesn't exist.
10447 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10448 functions.
10449 * features/i386/32bit-linux.c: Re-generated.
10450 * features/i386/32bit-sse.c: Likewise.
10451 * target-descriptions.c (print_c_feature::visit): Print code to
10452 set register number if needed.
10453 (print_c_feature) <m_next_regnum>: New field.
10454
10455 2017-07-26 Yao Qi <yao.qi@linaro.org>
10456
10457 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10458 (FEATURE_XMLFILES): New.
10459 (FEATURE_CFILES): New.
10460 New rules.
10461 (clean-cfiles): Remove generated c files.
10462 * features/i386/32bit-avx.c: Generated.
10463 * features/i386/32bit-avx512.c: Generated.
10464 * features/i386/32bit-core.c: Generated.
10465 * features/i386/32bit-linux.c: Generated.
10466 * features/i386/32bit-mpx.c: Generated.
10467 * features/i386/32bit-pkeys.c: Generated.
10468 * features/i386/32bit-sse.c: Generated.
10469 * target-descriptions.c: Include algorithm.
10470 (tdesc_element_visitor): Add method visit_end.
10471 (print_c_tdesc): Implement visit_end.
10472 (print_c_tdesc:: m_filename_after_features): Move it to
10473 protected.
10474 (print_c_feature): New class.
10475 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10476 name starts with "i386/32bit-".
10477
10478 2017-07-26 Yao Qi <yao.qi@linaro.org>
10479
10480 * target-descriptions.c (tdesc_element_visitor): New class.
10481 (tdesc_element): New class.
10482 (tdesc_reg): Inherit from tdesc_element.
10483 (tdesc_reg::accept): New function.
10484 (tdesc_type): Inherit from tdesc_element.
10485 (tdesc_type::accept): New function.
10486 (tdesc_feature): Inherit from tdesc_element.
10487 (tdesc_feature::accept): New function.
10488 (target_desc): Inherit from tdesc_element.
10489 (target_desc::target_desc): New.
10490 (target_desc::~target_desc): New.
10491 (target_desc::accept): New.
10492 (allocate_target_description): Use new.
10493 (free_target_description): Use delete.
10494 (print_c_tdesc): New class.
10495 (maint_print_c_tdesc_cmd): Adjust.
10496
10497 * features/aarch64.c: Re-generated.
10498 * features/arc-arcompact.c: Re-generated.
10499 * features/arc-v2.c: Re-generated.
10500 * features/arm/arm-with-iwmmxt.c: Re-generated.
10501 * features/arm/arm-with-m.c: Re-generated.
10502 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10503 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10504 * features/arm/arm-with-neon.c: Re-generated.
10505 * features/arm/arm-with-vfpv2.c: Re-generated.
10506 * features/arm/arm-with-vfpv3.c: Re-generated.
10507 * features/i386/amd64-avx-avx512.c: Re-generated.
10508 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10509 * features/i386/amd64-avx.c: Re-generated.
10510 * features/i386/amd64-avx-linux.c: Re-generated.
10511 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10512 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10513 * features/i386/amd64-avx-mpx.c: Re-generated.
10514 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10515 * features/i386/amd64.c: Re-generated.
10516 * features/i386/amd64-linux.c: Re-generated.
10517 * features/i386/amd64-mpx.c: Re-generated.
10518 * features/i386/amd64-mpx-linux.c: Re-generated.
10519 * features/i386/i386-avx-avx512.c: Re-generated.
10520 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10521 * features/i386/i386-avx.c: Re-generated.
10522 * features/i386/i386-avx-linux.c: Re-generated.
10523 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10524 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10525 * features/i386/i386-avx-mpx.c: Re-generated.
10526 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10527 * features/i386/i386.c: Re-generated.
10528 * features/i386/i386-linux.c: Re-generated.
10529 * features/i386/i386-mmx.c: Re-generated.
10530 * features/i386/i386-mmx-linux.c: Re-generated.
10531 * features/i386/i386-mpx.c: Re-generated.
10532 * features/i386/i386-mpx-linux.c: Re-generated.
10533 * features/i386/x32-avx-avx512.c: Re-generated.
10534 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10535 * features/i386/x32-avx.c: Re-generated.
10536 * features/i386/x32-avx-linux.c: Re-generated.
10537 * features/i386/x32.c: Re-generated.
10538 * features/i386/x32-linux.c: Re-generated.
10539 * features/microblaze.c: Re-generated.
10540 * features/microblaze-with-stack-protect.c: Re-generated.
10541 * features/mips64-dsp-linux.c: Re-generated.
10542 * features/mips64-linux.c: Re-generated.
10543 * features/mips-dsp-linux.c: Re-generated.
10544 * features/mips-linux.c: Re-generated.
10545 * features/nds32.c: Re-generated.
10546 * features/nios2.c: Re-generated.
10547 * features/nios2-linux.c: Re-generated.
10548 * features/rs6000/powerpc-32.c: Re-generated.
10549 * features/rs6000/powerpc-32l.c: Re-generated.
10550 * features/rs6000/powerpc-403.c: Re-generated.
10551 * features/rs6000/powerpc-403gc.c : Re-generated.
10552 * features/rs6000/powerpc-405.c: Re-generated.
10553 * features/rs6000/powerpc-505.c: Re-generated.
10554 * features/rs6000/powerpc-601.c: Re-generated.
10555 * features/rs6000/powerpc-602.c: Re-generated.
10556 * features/rs6000/powerpc-603.c: Re-generated.
10557 * features/rs6000/powerpc-604.c: Re-generated.
10558 * features/rs6000/powerpc-64.c: Re-generated.
10559 * features/rs6000/powerpc-64l.c: Re-generated.
10560 * features/rs6000/powerpc-7400.c: Re-generated.
10561 * features/rs6000/powerpc-750.c: Re-generated.
10562 * features/rs6000/powerpc-860.c: Re-generated.
10563 * features/rs6000/powerpc-altivec32.c: Re-generated.
10564 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10565 * features/rs6000/powerpc-altivec64.c: Re-generated.
10566 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10567 * features/rs6000/powerpc-cell32l.c: Re-generated.
10568 * features/rs6000/powerpc-cell64l.c: Re-generated.
10569 * features/rs6000/powerpc-e500.c: Re-generated.
10570 * features/rs6000/powerpc-e500l.c: Re-generated.
10571 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10572 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10573 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10574 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10575 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10576 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10577 * features/rs6000/powerpc-vsx32.c: Re-generated.
10578 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10579 * features/rs6000/powerpc-vsx64.c: Re-generated.
10580 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10581 * features/rs6000/rs6000.c: Re-generated.
10582 * features/s390-linux32.c: Re-generated.
10583 * features/s390-linux32v1.c: Re-generated.
10584 * features/s390-linux32v2.c: Re-generated.
10585 * features/s390-linux64.c: Re-generated.
10586 * features/s390-linux64v1.c: Re-generated.
10587 * features/s390-linux64v2.c: Re-generated.
10588 * features/s390-te-linux64.c: Re-generated.
10589 * features/s390-tevx-linux64.c: Re-generated.
10590 * features/s390-vx-linux64.c: Re-generated.
10591 * features/s390x-linux64.c: Re-generated.
10592 * features/s390x-linux64v1.c: Re-generated.
10593 * features/s390x-linux64v2.c: Re-generated.
10594 * features/s390x-te-linux64.c: Re-generated.
10595 * features/s390x-tevx-linux64.c: Re-generated.
10596 * features/s390x-vx-linux64.c: Re-generated.
10597 * features/sparc/sparc32-solaris.c: Re-generated.
10598 * features/sparc/sparc64-solaris.c: Re-generated.
10599 * features/tic6x-c62x.c: Re-generated.
10600 * features/tic6x-c62x-linux.c: Re-generated.
10601 * features/tic6x-c64x.c: Re-generated.
10602 * features/tic6x-c64x-linux.c: Re-generated.
10603 * features/tic6x-c64xp.c: Re-generated.
10604 * features/tic6x-c64xp-linux.c: Re-generated.
10605
10606 2017-07-26 Yao Qi <yao.qi@linaro.org>
10607
10608 * i386-linux-tdep.c (i386_linux_read_description): New function.
10609 (i386_linux_core_read_description): Call
10610 i386_linux_read_description.
10611 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10612 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10613 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10614 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10615 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10616 * x86-linux-nat.c (x86_linux_read_description): Call
10617 i386_linux_read_description.
10618
10619 2017-07-26 Yao Qi <yao.qi@linaro.org>
10620
10621 * NEWS: Mention it.
10622 * features/Makefile (%.c: %.xml): Pass the xml file name to
10623 command "maint print c-tdesc".
10624 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10625 name from 'arg'.
10626
10627 2017-07-26 Yao Qi <yao.qi@linaro.org>
10628
10629 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10630 in-class initialization.
10631 (tdesc_create_feature): Call new instead of XCNEW.
10632 (free_target_description): Ue delete.
10633
10634 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10635
10636 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10637
10638 2017-07-25 Yao Qi <yao.qi@linaro.org>
10639
10640 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10641 constant.
10642 (amd64_x32_init_abi): Likewise.
10643 * amd64-tdep.h (amd64_init_abi): Update declaration.
10644 (amd64_x32_init_abi): Likewise.
10645
10646 2017-07-25 Yao Qi <yao.qi@linaro.org>
10647
10648 PR tdep/21717
10649 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10650 condition for FPSCR.
10651 (arm_linux_store_inferior_registers): Likewise.
10652
10653 2017-07-22 Tom Tromey <tom@tromey.com>
10654
10655 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10656 <syscalls_counts>: Now a std::vector.
10657 (get_catch_syscall_inferior_data): Use "new".
10658 (catch_syscall_inferior_data_cleanup): Use "delete".
10659 (insert_catch_syscall, remove_catch_syscall)
10660 (clear_syscall_counts): Update.
10661
10662 2017-07-22 Tom Tromey <tom@tromey.com>
10663
10664 * break-catch-syscall.c (syscall_catchpoint)
10665 <syscalls_to_be_caught>: Now a std::vector<int>
10666 (~syscall_catchpoint): Remove.
10667 (insert_catch_syscall, remove_catch_syscall)
10668 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10669 (print_mention_catch_syscall, print_recreate_catch_syscall):
10670 Update.
10671 (create_syscall_event_catchpoint): Change type of "filter"
10672 parameter.
10673 (catch_syscall_split_args): Return a std::vector.
10674 (catch_syscall_command_1, catching_syscall_number_1): Update.
10675
10676 2017-07-22 Tom Tromey <tom@tromey.com>
10677
10678 * break-catch-throw.c (struct exception_catchpoint)
10679 <exception_rx>: Now a std::string.
10680 (~exception_catchpoint): Remove.
10681 (print_one_detail_exception_catchpoint): Update.
10682 (handle_gnu_v3_exceptions): Change type of except_rx.
10683 (extract_exception_regexp): Return a std::string.
10684 (catch_exception_command_1): Update.
10685
10686 2017-07-22 Tom Tromey <tom@tromey.com>
10687
10688 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10689 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10690 std::vector.
10691 <catch_all>: Now a bool.
10692 (~signal_catchpoint): Remove.
10693 (signal_catchpoint_insert_location)
10694 (signal_catchpoint_remove_location)
10695 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10696 (signal_catchpoint_print_mention)
10697 (signal_catchpoint_print_recreate)
10698 (signal_catchpoint_explains_signal): Update.
10699 (create_signal_catchpoint): Change type of "filter" and
10700 "catch_all".
10701 (catch_signal_split_args): Return a std::vector. Change type of
10702 "catch_all".
10703 (catch_signal_command): Update.
10704
10705 2017-07-20 Pedro Alves <palves@redhat.com>
10706
10707 * ada-lang.c (ada_language_defn): Make extern.
10708 (_initialize_ada_language): Remove add_language call.
10709 * c-lang.c (c_language_defn, cplus_language_defn)
10710 (asm_language_defn, minimal_language_defn): Make extern.
10711 (_initialize_c_language): Delete.
10712 * completer.c (compare_cstrings): Delete, moved to utils.h.
10713 * d-lang.c (d_language_defn): Make extern.
10714 (_initialize_d_language): Remove add_language calls.
10715 * defs.h (enum language): Add comment.
10716 * f-lang.c (f_language_defn): Make extern.
10717 (_initialize_f_language): Remove add_language call.
10718 * go-lang.c (go_language_defn): Make extern.
10719 (_initialize_go_language): Remove add_language call.
10720 * language.c: Include <algorithm>.
10721 (languages): Redefine as const array.
10722 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10723 (set_language_command): Handle "local". Use for-range loop.
10724 (set_language): Remove loop.
10725 (language_enum): Rewrite.
10726 (language_def, language_str): Remove loops.
10727 (add_language): Delete.
10728 (add_set_language_command): New, based on add_languages.
10729 (skip_language_trampoline): Adjust.
10730 (local_language_defn): Delete.
10731 (language_gdbarch_post_init): Adjust.
10732 (_initialize_language): Remove add_language calls. Call
10733 add_set_language_command.
10734 * language.h (add_language): Delete.
10735 (auto_language_defn)
10736 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10737 (asm_language_defn, c_language_defn, cplus_language_defn)
10738 (d_language_defn, f_language_defn, go_language_defn)
10739 (m2_language_defn, objc_language_defn, opencl_language_defn)
10740 (pascal_language_defn, rust_language_defn): Declare.
10741 * m2-lang.c (m2_language_defn): Make extern.
10742 (_initialize_m2_language): Remove add_language call.
10743 * objc-lang.c (objc_language_defn): Make extern.
10744 (_initialize_objc_language): Remove add_language call.
10745 * opencl-lang.c (opencl_language_defn): Make extern.
10746 (_initialize_opencl_language): Remove add_language call.
10747 * p-lang.c (pascal_language_defn): Make extern.
10748 (_initialize_pascal_language): Delete.
10749 * rust-lang.c (rust_language_defn): Make extern.
10750 (_initialize_rust_language): Delete.
10751 * utils.h (compare_cstrings): New static inline function.
10752
10753 2017-07-20 Pedro Alves <palves@redhat.com>
10754
10755 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10756 (get_var_value): Constify parameters.
10757 (get_int_var_value): Change prototype.
10758 (to_fixed_range_type): Adjust.
10759 * ada-lang.h (get_int_var_value): Change prototype.
10760
10761 2017-07-20 Pedro Alves <palves@redhat.com>
10762
10763 * dwarf2read.c (dw2_lookup_symbol): Use
10764 SYMBOL_MATCHES_SEARCH_NAME.
10765 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10766
10767 2017-07-20 Pedro Alves <palves@redhat.com>
10768
10769 * block.c (block_iter_name_step, block_iter_name_first)
10770 (block_iter_name_next): Delete.
10771 (block_lookup_symbol_primary): Adjust to use
10772 dict_iter_match_first/dict_iter_match_next.
10773 * block.h (block_iter_name_first, block_iter_name_next): Delete
10774 declarations.
10775 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10776 dict_iter_match_first/dict_iter_match_next.
10777
10778 2017-07-20 Pedro Alves <palves@redhat.com>
10779
10780 * cp-support.c (cp_find_first_component_aux): Add missing case for
10781 end of string.
10782
10783 2017-07-18 David Blaikie <dblaikie@gmail.com>
10784
10785 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10786 of dwo_cu's dwo_file.
10787
10788 2017-07-18 Yao Qi <yao.qi@linaro.org>
10789
10790 * remote.c (store_registers_using_G): Remove one line comment.
10791
10792 2017-07-18 Yao Qi <yao.qi@linaro.org>
10793
10794 * regcache.c (regcache_cpy): Simplify it.
10795 (regcache::cpy_no_passthrough): Remove it.
10796 * regcache.h (cpy_no_passthrough): Remove it.
10797 (regcache_dup, regcache_cpy): Update comments.
10798
10799 2017-07-18 Pedro Alves <palves@redhat.com>
10800
10801 * remote-sim.c (sim_command_completer): Adjust to work with a
10802 completion_tracker instead of a VEC.
10803
10804 2017-07-17 Pedro Alves <palves@redhat.com>
10805
10806 * completer.c (complete_source_filenames): New function.
10807 (complete_address_and_linespec_locations): New function.
10808 (location_completer): Use complete_address_and_linespec_locations.
10809 (completion_tracker::build_completion_result): Honor the tracker's
10810 request to suppress append.
10811 * completer.h (completion_tracker::suppress_append_ws)
10812 (completion_tracker::set_suppress_append_ws): New methods.
10813 (completion_tracker::m_suppress_append_ws): New field.
10814 (complete_source_filenames): New declaration.
10815 * linespec.c (linespec_complete_what): New.
10816 (struct ls_parser) <complete_what, completion_word,
10817 completion_quote_char, completion_quote_end, completion_tracker>:
10818 New fields.
10819 (string_find_incomplete_keyword_at_end): New.
10820 (linespec_lexer_lex_string): Record quote char. If in completion
10821 mode, don't throw.
10822 (linespec_lexer_consume_token): Advance the completion word point.
10823 (linespec_lexer_peek_token): Save/restore completion info.
10824 (save_stream_and_consume_token): New.
10825 (set_completion_after_number): New.
10826 (linespec_parse_basic): Set what to complete next depending on
10827 token. Handle function and label completions specially.
10828 (parse_linespec): Disable objc shortcut in completion mode. Set
10829 what to complete next depending on token type. Skip keyword if in
10830 completion mode.
10831 (complete_linespec_component, linespec_complete): New.
10832 * linespec.h (linespec_complete): Declare.
10833
10834 2017-07-17 Pedro Alves <palves@redhat.com>
10835
10836 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10837 Handle 'operator<' / 'operator<<'.
10838
10839 2017-07-17 Pedro Alves <palves@redhat.com>
10840
10841 * completer.c (collect_explicit_location_matches): Handle
10842 MATCH_LABEL.
10843 (convert_explicit_location_to_linespec): New, factored out from
10844 ...
10845 (convert_explicit_location_to_sals): ... this.
10846 (complete_label): New.
10847 (linespec_complete_label, find_label_symbols_in_block): New.
10848 (find_label_symbols): Add completion_mode parameter and adjust to
10849 call find_label_symbols_in_block.
10850 * linespec.h (linespec_complete_label): Declare.
10851
10852 2017-07-17 Pedro Alves <palves@redhat.com>
10853
10854 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10855 complete_symbol_mode parameter.
10856 * cli/cli-cmds.c (complete_command): Get the completion result out
10857 of the handle_brkchars tracker if used a custom word point.
10858 * completer.c: Include "linespec.h".
10859 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10860 (advance_to_expression_complete_word_point): New.
10861 (completion_tracker::completes_to_completion_word): New.
10862 (complete_files_symbols): Pass down
10863 complete_symbol_mode::EXPRESSION.
10864 (explicit_options, probe_options): New.
10865 (collect_explicit_location_matches): Complete on the
10866 explictit_loc->foo instead of word. Use
10867 linespec_complete_function. Handle MATCH_LINE. Handle offering
10868 keyword and options completions.
10869 (backup_text_ptr): Delete.
10870 (skip_keyword): New.
10871 (complete_explicit_location): Remove 'word' parameter. Add
10872 language, quoted_arg_start and quoted_arg_end parameters.
10873 Rewrite, parsing left to right.
10874 (location_completer): Rewrite.
10875 (location_completer_handle_brkchars): New function.
10876 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10877 (enum complete_line_internal_reason): Adjust comments.
10878 (completion_tracker::discard_completions): New.
10879 (completer_handle_brkchars_func_for_completer): Handle
10880 location_completer.
10881 (gdb_custom_word_point_brkchars)
10882 (gdb_org_rl_basic_quote_characters): New.
10883 (gdb_completion_word_break_characters_throw)
10884 (completion_find_completion_word): Handle trackers that use a
10885 custom word point.
10886 (completion_tracker::advance_custom_word_point_by): New.
10887 (completion_tracker::build_completion_result): Don't rely on
10888 readline appending the quote char.
10889 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10890 use a custom word point.
10891 (gdb_rl_attempted_completion_function): Restore
10892 rl_basic_quote_characters.
10893 * completer.h (class completion_tracker): Extend intro comment.
10894 (completion_tracker::set_quote_char)
10895 (completion_tracker::quote_char)
10896 (completion_tracker::set_use_custom_word_point)
10897 (completion_tracker::use_custom_word_point)
10898 (completion_tracker::custom_word_point)
10899 (completion_tracker::set_custom_word_point)
10900 (completion_tracker::advance_custom_word_point_by)
10901 (completion_tracker::completes_to_completion_word)
10902 (completion_tracker::discard_completions): New methods.
10903 (completion_tracker::m_quote_char)
10904 (completion_tracker::m_use_custom_word_point)
10905 (completion_tracker::m_custom_word_point): New fields.
10906 (advance_to_expression_complete_word_point): Declare.
10907 * f-lang.c (f_collect_symbol_completion_matches): Add
10908 complete_symbol_mode parameter.
10909 * language.h (struct language_defn)
10910 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10911 parameter.
10912 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10913 (linespec_complete_function): New function.
10914 (linespec_lexer_lex_keyword): Adjust.
10915 * linespec.h (linespec_keywords, linespec_complete_function): New
10916 declarations.
10917 * location.c (find_end_quote): New function.
10918 (explicit_location_lex_one): Add explicit_completion_info
10919 parameter. Save quoting info. Don't throw if being called for
10920 completion. Don't handle Ada operators here.
10921 (is_cp_operator, skip_op_false_positives, first_of)
10922 (explicit_location_lex_one_function): New function.
10923 (string_to_explicit_location): Replace 'dont_throw' parameter with
10924 an explicit_completion_info pointer parameter. Handle it. Don't
10925 use explicit_location_lex_one to lex function names. Use
10926 explicit_location_lex_one_function instead.
10927 * location.h (struct explicit_completion_info): New.
10928 (string_to_explicit_location): Replace 'dont_throw' parameter with
10929 an explicit_completion_info pointer parameter.
10930 * symtab.c (default_collect_symbol_completion_matches_break_on):
10931 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10932 (default_collect_symbol_completion_matches)
10933 (collect_symbol_completion_matches): Add complete_symbol_mode
10934 parameter.
10935 (collect_symbol_completion_matches_type): Pass down
10936 complete_symbol_mode::EXPRESSION.
10937 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10938 parameter. Handle LINESPEC mode.
10939 * symtab.h (complete_symbol_mode): New.
10940 (default_collect_symbol_completion_matches_break_on)
10941 (default_collect_symbol_completion_matches)
10942 (collect_symbol_completion_matches)
10943 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10944 parameter.
10945
10946 2017-07-17 Pedro Alves <palves@redhat.com>
10947
10948 * utils.c (enum class strncmp_iw_mode): New.
10949 (strcmp_iw): Rename to ...
10950 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10951 parameters. Handle them.
10952 (strncmp_iw): New.
10953 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10954 * utils.h (strncmp_iw): Declare.
10955 (strcmp_iw): Move describing comments here.
10956
10957 2017-07-17 Pedro Alves <palves@redhat.com>
10958
10959 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10960 CP_OPERATOR_STR.
10961 * c-typeprint.c (is_type_conversion_operator): Use
10962 CP_OPERATOR_STR.
10963 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10964 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10965 CP_OPERATOR_LEN.
10966 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10967 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10968 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10969 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10970 CP_OPERATOR_STR.
10971 * location.c: Include "cp-support.h".
10972 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10973 CP_OPERATOR_STR.
10974 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10975 CP_OPERATOR_LEN.
10976
10977 2017-07-17 Pedro Alves <palves@redhat.com>
10978
10979 * cli/cli-cmds.c (complete_command): Use a completion tracker
10980 along with completion_find_completion_word for handle_brkchars
10981 phase.
10982 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10983 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10984 (struct gdb_rl_completion_word_info): New.
10985 (gdb_rl_find_completion_word): New.
10986 (completion_find_completion_word): New.
10987 * completer.h (completion_find_completion_word): Declare.
10988
10989 2017-07-17 Pedro Alves <palves@redhat.com>
10990
10991 * ada-lang.c (symbol_completion_match): Adjust comments.
10992 (symbol_completion_add): Replace vector parameter with
10993 completion_tracker parameter. Use it.
10994 (ada_make_symbol_completion_list): Rename to...
10995 (ada_collect_symbol_completion_matches): ... this. Add
10996 completion_tracker parameter and use it.
10997 (ada_language_defn): Adjust.
10998 * break-catch-syscall.c (catch_syscall_completer): Adjust
10999 prototype and work with completion_tracker instead of VEC.
11000 * breakpoint.c (condition_completer): Adjust prototype and work
11001 with completion_tracker instead of VEC.
11002 * c-lang.c (c_language_defn, cplus_language_defn)
11003 (asm_language_defn, minimal_language_defn): Adjust to renames.
11004 * cli/cli-cmds.c (complete_command): Rework using
11005 completion_tracker. Catch exceptions when completing.
11006 * cli/cli-decode.c (integer_unlimited_completer)
11007 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
11008 with completion_tracker instead of VEC.
11009 * command.h (struct completion_tracker): Forward declare.
11010 (completer_ftype, completer_handle_brkchars_ftype): Change
11011 types.
11012 (complete_on_cmdlist, complete_on_enum): Adjust.
11013 * completer.c: Include <algorithm>.
11014 (struct gdb_completer_state): New.
11015 (current_completion): New global.
11016 (readline_line_completion_function): Delete.
11017 (noop_completer, filename_completer)
11018 (filename_completer_handle_brkchars, complete_files_symbols)
11019 (linespec_location_completer): Adjust to work with a
11020 completion_tracker instead of a VEC.
11021 (string_or_empty): New.
11022 (collect_explicit_location_matches): Adjust to work with a
11023 completion_tracker instead of a VEC.
11024 (explicit_location_completer): Rename to ...
11025 (complete_explicit_location): ... this and adjust to work with a
11026 completion_tracker instead of a VEC.
11027 (location_completer): Adjust to work with a completion_tracker
11028 instead of a VEC.
11029 (add_struct_fields): Adjust to work with a completion_list instead
11030 of VEC.
11031 (expression_completer): Rename to ...
11032 (complete_expression): ... this and adjust to work with a
11033 completion_tracker instead of a VEC. Use complete_files_symbols.
11034 (expression_completer): Reimplement on top of complete_expression.
11035 (symbol_completer): Adjust to work with a completion_tracker
11036 instead of a VEC.
11037 (enum complete_line_internal_reason): Add describing comments.
11038 (complete_line_internal_normal_command): Adjust to work with a
11039 completion_tracker instead of a VEC.
11040 (complete_line_internal): Rename to ...
11041 (complete_line_internal_1): ... this and adjust to work with a
11042 completion_tracker instead of a VEC. Assert TEXT is NULL in the
11043 handle_brkchars phase.
11044 (new_completion_tracker): Delete.
11045 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
11046 complete_line_internal_1.
11047 (free_completion_tracker): Delete.
11048 (INITIAL_COMPLETION_HTAB_SIZE): New.
11049 (completion_tracker::completion_tracker)
11050 (completion_tracker::~completion_tracker): New.
11051 (maybe_add_completion): Delete.
11052 (completion_tracker::maybe_add_completion)
11053 (completion_tracker::add_completion)
11054 (completion_tracker::add_completions): New.
11055 (throw_max_completions_reached_error): Delete.
11056 (complete_line): Adjust to work with a completion_tracker instead
11057 of a VEC. Don't create a completion_tracker_t or check for max
11058 completions here.
11059 (command_completer, command_completer_handle_brkchars)
11060 (signal_completer, reg_or_group_completer_1)
11061 (reg_or_group_completer, default_completer_handle_brkchars):
11062 Adjust to work with a completion_tracker.
11063 (gdb_completion_word_break_characters_throw): New.
11064 (gdb_completion_word_break_characters): Reimplement.
11065 (line_completion_function): Delete.
11066 (completion_tracker::recompute_lowest_common_denominator)
11067 (expand_preserving_ws)
11068 (completion_tracker::build_completion_result)
11069 (completion_result::completion_result)
11070 (completion_result::completion_result)
11071 (completion_result::~completion_result)
11072 (completion_result::completion_result)
11073 (completion_result::release_match_list, compare_cstrings)
11074 (completion_result::sort_match_list)
11075 (completion_result::reset_match_list)
11076 (gdb_rl_attempted_completion_function_throw)
11077 (gdb_rl_attempted_completion_function): New.
11078 * completer.h (completion_list, struct completion_result)
11079 (class completion_tracker): New.
11080 (complete_line): Add completion_tracker parameter.
11081 (readline_line_completion_function): Delete.
11082 (gdb_rl_attempted_completion_function): New.
11083 (noop_completer, filename_completer, expression_completer)
11084 (location_completer, symbol_completer, command_completer)
11085 (signal_completer, reg_or_group_completer): Update prototypes.
11086 (completion_tracker_t, new_completion_tracker)
11087 (make_cleanup_free_completion_tracker): Delete.
11088 (enum maybe_add_completion_enum): Delete.
11089 (maybe_add_completion): Delete.
11090 (throw_max_completions_reached_error): Delete.
11091 * corefile.c (complete_set_gnutarget): Adjust to work with a
11092 completion_tracker instead of a VEC.
11093 * cp-abi.c (cp_abi_completer): Adjust to work with a
11094 completion_tracker instead of a VEC.
11095 * d-lang.c (d_language_defn): Adjust.
11096 * disasm.c (disassembler_options_completer): Adjust to work with a
11097 completion_tracker instead of a VEC.
11098 * f-lang.c (f_make_symbol_completion_list): Rename to ...
11099 (f_collect_symbol_completion_matches): ... this. Adjust to work
11100 with a completion_tracker instead of a VEC.
11101 (f_language_defn): Adjust.
11102 * go-lang.c (go_language_defn): Adjust.
11103 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
11104 Adjust to work with a completion_tracker instead of a VEC.
11105 * infrun.c (handle_completer): Likewise.
11106 * interps.c (interpreter_completer): Likewise.
11107 * interps.h (interpreter_completer): Likewise.
11108 * language.c (unknown_language_defn, auto_language_defn)
11109 (local_language_defn): Adjust.
11110 * language.h (language_defn::la_make_symbol_completion_list):
11111 Rename to ...
11112 (language_defn::la_collect_symbol_completion_matches): ... this
11113 and adjust to work with a completion_tracker instead of a VEC.
11114 * m2-lang.c (m2_language_defn): Adjust.
11115 * objc-lang.c (objc_language_defn): Adjust.
11116 * opencl-lang.c (opencl_language_defn): Adjust.
11117 * p-lang.c (pascal_language_defn): Adjust.
11118 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
11119 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
11120 with a completion_tracker.
11121 * rust-lang.c (rust_language_defn): Adjust.
11122 * symtab.c (free_completion_list, do_free_completion_list)
11123 (return_val, completion_tracker): Delete.
11124 (completion_list_add_name, completion_list_add_symbol)
11125 (completion_list_add_msymbol, completion_list_objc_symbol)
11126 (completion_list_add_fields, add_symtab_completions): Add
11127 completion_tracker parameter and use it.
11128 (default_make_symbol_completion_list_break_on_1): Rename to...
11129 (default_collect_symbol_completion_matches_break_on): ... this.
11130 Add completion_tracker parameter and use it instead of allocating
11131 a completion tracker here.
11132 (default_make_symbol_completion_list_break_on): Delete old
11133 implementation.
11134 (default_make_symbol_completion_list): Delete.
11135 (default_collect_symbol_completion_matches): New.
11136 (make_symbol_completion_list): Delete.
11137 (collect_symbol_completion_matches): New.
11138 (make_symbol_completion_type): Rename to ...
11139 (collect_symbol_completion_matches_type): ... this. Add
11140 completion_tracker parameter and use it instead of VEC.
11141 (make_file_symbol_completion_list_1): Rename to...
11142 (collect_file_symbol_completion_matches): ... this. Add
11143 completion_tracker parameter and use it instead of VEC.
11144 (make_file_symbol_completion_list): Delete.
11145 (add_filename_to_list): Use completion_list instead of a VEC.
11146 (add_partial_filename_data::list): Now a completion_list.
11147 (make_source_files_completion_list): Work with a completion_list
11148 instead of a VEC.
11149 * symtab.h: Include "completer.h".
11150 (default_make_symbol_completion_list_break_on)
11151 (default_make_symbol_completion_list, make_symbol_completion_list)
11152 (make_symbol_completion_type, make_file_symbol_completion_list)
11153 (make_source_files_completion_list): Delete.
11154 (default_collect_symbol_completion_matches_break_on)
11155 (default_collect_symbol_completion_matches)
11156 (collect_symbol_completion_matches)
11157 (collect_symbol_completion_matches_type)
11158 (collect_file_symbol_completion_matches)
11159 (make_source_files_completion_list): New.
11160 * top.c (init_main): Don't install a rl_completion_entry_function
11161 hook. Install a rl_attempted_completion_function hook instead.
11162 * tui/tui-layout.c (layout_completer): Adjust to work with a
11163 completion_tracker.
11164 * tui/tui-regs.c (tui_reggroup_completer):
11165 * tui/tui-win.c (window_name_completer, focus_completer)
11166 (winheight_completer): Adjust to work with a completion_tracker.
11167 * value.c: Include "completer.h".
11168 (complete_internalvar): Adjust to work with a completion_tracker.
11169 * value.h (complete_internalvar): Likewise.
11170
11171 2017-07-17 Pedro Alves <palves@redhat.com>
11172
11173 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
11174 renames.
11175 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
11176 comments to completer_ftype's declaration.
11177 <completer_handle_brkchars>: Change type to
11178 completer_handle_brkchars_ftype.
11179 * command.h (completer_ftype): Add describing comment and give
11180 names to parameters.
11181 (completer_ftype_void): Rename to ...
11182 (completer_handle_brkchars_ftype) ... this. Add describing comment.
11183 (set_cmd_completer_handle_brkchars): Adjust.
11184 * completer.c (filename_completer_handle_brkchars): New function.
11185 (complete_line_internal_normal_command): New function, factored
11186 out from ...
11187 (complete_line_internal): ... here.
11188 (command_completer_handle_brkchars)
11189 (default_completer_handle_brkchars)
11190 (completer_handle_brkchars_func_for_completer): New functions.
11191 * completer.h (set_gdb_completion_word_break_characters): Delete
11192 declaration.
11193 (completer_handle_brkchars_func_for_completer): New declaration.
11194 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
11195 completer_handle_brkchars_func_for_completer.
11196
11197 2017-07-17 Pedro Alves <palves@redhat.com>
11198
11199 * completer.c (symbol_completer): New function, based on
11200 make_symbol_completion_list_fn.
11201 * completer.h (symbol_completer): New declaration.
11202 * guile/scm-cmd.c (cmdscm_completers): Adjust.
11203 * python/py-cmd.c (completers): Adjust.
11204 * symtab.c (make_symbol_completion_list_fn): Delete.
11205 * symtab.h (make_symbol_completion_list_fn): Delete.
11206 * cli/cli-decode.c (add_cmd): Adjust.
11207
11208 2017-07-17 Pedro Alves <palves@redhat.com>
11209
11210 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
11211 * dwarf2read.c: Include "filename-seen-cache.h".
11212 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
11213 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
11214 * filename-seen-cache.c: New file.
11215 * filename-seen-cache.h: New file.
11216 * symtab.c: Include "filename-seen-cache.h".
11217 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
11218 (create_filename_seen_cache, clear_filename_seen_cache)
11219 (delete_filename_seen_cache, filename_seen): Delete, parts moved
11220 to filename-seen-cache.h/filename-seen-cache.c.
11221 (output_source_filename, sources_info)
11222 (maybe_add_partial_symtab_filename)
11223 (make_source_files_completion_list): Adjust to use
11224 filename_seen_cache.
11225
11226 2017-07-17 Pedro Alves <palves@redhat.com>
11227
11228 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11229 fields.
11230 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11231 dwarf2_debug_sections*)): New.
11232 (dwarf2_per_objfile::dwarf2_per_objfile(const
11233 dwarf2_per_objfile&)): Declare as deleted.
11234 (dwarf2_per_objfile::operator=): Declare as deleted.
11235 (dwarf2_per_objfile::dwarf2_per_objfile)
11236 (dwarf2_per_objfile::~dwarf2_per_objfile)
11237 (dwarf2_per_objfile::free_cached_comp_units): New.
11238 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11239 ctor. Call dwarf2_per_objfile's ctor manually.
11240 (dwarf2_locate_sections): Deleted/refactored as ...
11241 (dwarf2_per_objfile::locate_sections): ... this new method.
11242 (free_cached_comp_units): Defer to
11243 dwarf2_per_objfile::free_cached_comp_units.
11244 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11245
11246 2017-07-14 Tom Tromey <tom@tromey.com>
11247
11248 PR rust/21764:
11249 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11250 parameter.
11251 <UNOP_SIZEOF>: Split into separate case.
11252 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11253
11254 2017-07-14 Tom Tromey <tom@tromey.com>
11255
11256 PR rust/21763:
11257 * symtab.c (symbol_matches_domain): Add language_rust to special
11258 case.
11259 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11260 treat LOC_TYPEDEF symbols as variables.
11261
11262 2017-07-14 Pedro Alves <palves@redhat.com>
11263
11264 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11265 symtabs matching all symtabs with SRCFILE as file name instead of
11266 only considering the first hit, with lookup_symtab.
11267
11268 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11269
11270 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11271 operator_name parameters.
11272 (gen_expr): Update function call.
11273
11274 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11275
11276 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11277 parameter.
11278 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11279 Likewise.
11280 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11281 parameter, use agent_expr::gdbarch instead, update function
11282 calls.
11283 (locexpr_tracepoint_var_ref): Likewise.
11284 (loclist_tracepoint_var_ref): Likewise.
11285 * ax-gdb.c (gen_trace_static_fields): Likewise.
11286 (gen_traced_pop): Likewise.
11287 (gen_frame_args_address): Likewise.
11288 (gen_frame_locals_address): Likewise.
11289 (gen_var_ref): Likewise.
11290 (gen_struct_ref_recursive): Likewise.
11291 (gen_static_field): Likewise.
11292 (gen_maybe_namespace_elt): Likewise.
11293 (gen_expr): Likewise.
11294 (gen_trace_for_var): Likewise.
11295 (gen_trace_for_expr): Likewise.
11296 (gen_trace_for_return_address): Likewise.
11297
11298 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11299
11300 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11301 parameter.
11302 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11303
11304 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11305
11306 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11307 from ax, update calls.
11308 (gen_usual_arithmetic): Likewise.
11309 (gen_integral_promotions): Likewise.
11310 (gen_bitfield_ref): Likewise.
11311 (gen_primitive_field): Likewise.
11312 (gen_struct_ref_recursive): Likewise.
11313 (gen_struct_ref): Likewise.
11314 (gen_maybe_namespace_elt): Likewise.
11315 (gen_struct_elt_for_reference): Likewise.
11316 (gen_namespace_elt): Likewise.
11317 (gen_aggregate_elt_ref): Likewise.
11318 (gen_expr): Get gdbarch from ax, update calls.
11319 (gen_expr_binop_rest): Likewise.
11320
11321 2017-07-13 Pedro Alves <palves@redhat.com>
11322
11323 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11324 as default tdesc.
11325 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11326 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11327 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11328 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11329 tdep.
11330 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11331 Get final tdesc from the tdep.
11332 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11333 default tdesc.
11334 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11335 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11336 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11337 Use it as default tdesc.
11338 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11339 down to amd_init_abi. No longer handle fallback tdesc here.
11340 * amd64-tdep.h (tdesc_x32): Declare.
11341 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11342 parameter.
11343 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11344 as default tdesc.
11345
11346 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11347
11348 * s390-linux-tdep.c (s390_process_record): Add support for
11349 instructions new in arch12.
11350
11351 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11352
11353 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11354 PT_GETFSBASE and PT_GETGSBASE.
11355 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11356 PT_SETGSBASE.
11357
11358 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11359
11360 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11361 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11362 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11363 those rules.
11364 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11365 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11366 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11367 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11368 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11369 * features/i386/amd64.xml: Add 64bit-segments.xml.
11370 * features/i386/amd64-avx-avx512.c: Regenerated.
11371 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11372 * features/i386/amd64-avx-mpx.c: Regenerated.
11373 * features/i386/amd64-avx.c: Regenerated.
11374 * features/i386/amd64-mpx.c: Regenerated.
11375 * features/i386/amd64.c: Regenerated.
11376 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11377 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11378 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11379 * regformats/i386/amd64-avx.dat: Regenerated.
11380 * regformats/i386/amd64-mpx.dat: Regenerated.
11381 * regformats/i386/amd64.dat: Regenerated.
11382
11383 2017-07-10 Yao Qi <yao.qi@linaro.org>
11384
11385 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11386 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11387
11388 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11389
11390 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11391 unsetenv.
11392 * gnulib/aclocal.m4: Regenerate.
11393 * gnulib/config.in: Regenerate.
11394 * gnulib/configure: Regenerate.
11395 * gnulib/import/Makefile.am: Regenerate.
11396 * gnulib/import/Makefile.in: Regenerate.
11397 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11398 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11399 * gnulib/import/m4/environ.m4: New file.
11400 * gnulib/import/m4/setenv.m4: New file.
11401 * gnulib/import/setenv.c: New file.
11402 * gnulib/import/unsetenv.c: New file.
11403
11404 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11405
11406 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11407 address when op is DW_OP_addr.
11408
11409 2017-07-09 Tom Tromey <tom@tromey.com>
11410
11411 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11412 check and apply to outer type.
11413
11414 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11415
11416 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11417 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11418 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11419 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11420
11421 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11422
11423 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11424
11425 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11426
11427 * corelow.c (get_core_siginfo): Remove.
11428 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11429 instead of get_core_siginfo.
11430 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11431 * gdbarch.h: Re-generate.
11432 * gdbarch.c: Re-generate.
11433 * linux-tdep.c (linux_core_xfer_siginfo): New.
11434 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11435
11436 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11437
11438 * corelow.c (thread_section_name): Move to ...
11439 * gdbcore.h (thread_section_name): ... here.
11440
11441 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11442
11443 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11444 (struct siginfo32): New.
11445 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11446 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11447 via ptrace(PT_LWPINFO).
11448
11449 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11450
11451 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11452 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11453 (fbsd_get_siginfo_type): New.
11454 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11455 (_initialize_fbsd_tdep): New.
11456
11457 2017-07-06 David Blaikie <dblaikie@gmail.com>
11458
11459 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11460 a singular dwo_unit*) to support multiple CUs in the same way that
11461 multiple TUs are supported.
11462 (create_cus_hash_table): Replace create_dwo_cu with a function for
11463 parsing multiple CUs from a DWO file.
11464 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11465 create_dwo_cu.
11466 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11467 htab_find, rather than comparing the signature to a singleton CU in
11468 the dwo_file.
11469
11470 2017-07-06 Pedro Alves <palves@redhat.com>
11471
11472 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11473
11474 2017-07-04 Pedro Alves <palves@redhat.com>
11475
11476 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11477 * gdbtypes.h (TYPE_STATIC): Delete.
11478 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11479 is_synchronized, is_native>: Delete.
11480 <dummy>: Bump.
11481 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11482 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11483 (TYPE_FN_FIELD_ABSTRACT): Delete.
11484
11485 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11486
11487 * buffer.h (buffer_finish): Fix spelling mistakes.
11488
11489 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11490
11491 * .dir-locals.el: Automatically switch to C-style comments in
11492 versions of Emacs that support the feature.
11493
11494 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11495 Pedro Alves <palves@redhat.com>
11496
11497 PR cli/21688
11498 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11499 (process_next_line): New variable 'inline_cmd'.
11500 Adjust 'if' clauses for "python", "compile" and "guile" to use
11501 'command_name_equals' and check for '!inline_cmd'.
11502
11503 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11504
11505 PR cli/21688
11506 * cli/cli-script.c (command_name_equals_not_inline): New function.
11507 (process_next_line): Adjust 'if' clauses for "python", "compile"
11508 and "guile" to use command_name_equals_not_inline.
11509
11510 2017-06-29 Pedro Alves <palves@redhat.com>
11511
11512 * completer.c (expression_completer): Call
11513 linespec_location_completer instead of location_completer.
11514
11515 2017-06-29 Pedro Alves <palves@redhat.com>
11516
11517 * completer.c (expression_completer): Remove code that recomputes
11518 'text' from 'word'.
11519
11520 2017-06-29 Yao Qi <yao.qi@linaro.org>
11521
11522 * regformats/regdat.sh: Generate code with
11523 "ifndef IN_PROCESS_AGENT".
11524
11525 2017-06-28 Pedro Alves <palves@redhat.com>
11526
11527 * command.h: Include "common/scoped_restore.h".
11528
11529 2017-06-28 Yao Qi <yao.qi@linaro.org>
11530
11531 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11532 instead of obstack_grow.
11533
11534 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11535
11536 PR gdb/21337
11537 * symfile.c (reread_symbols): Call objfiles_changed just before
11538 read_symbols.
11539
11540 2017-06-27 Pedro Alves <palves@redhat.com>
11541
11542 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11543 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11544 (completion_list_add_symbol, completion_list_add_msymbol):
11545 ... these new functions.
11546 (add_symtab_completions)
11547 (default_make_symbol_completion_list_break_on_1): Adjust.
11548
11549 2017-06-27 Pedro Alves <palves@redhat.com>
11550
11551 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11552 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11553 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11554 dtor.
11555 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11556 'storage_obstack' field an auto_obstack. In-class initialize all
11557 non-bitfield fields. Make minsyms_read bool.
11558 * symfile.c (read_symbols): Adjust.
11559
11560 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11561
11562 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11563 (gdbsim_store_register): Likewise.
11564
11565 2017-06-27 Pedro Alves <palves@redhat.com>
11566
11567 * c-exp.y (name_obstack): Now an auto_obstack.
11568 (yylex): Use auto_obstack::clear.
11569 (c_parse): Use auto_obstack::clear instead of reinitializing and
11570 freeing the obstack.
11571 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11572 * d-exp.y (name_obstack): Now an auto_obstack.
11573 (yylex): Use auto_obstack::clear.
11574 (d_parse): Use auto_obstack::clear instead of reinitializing and
11575 freeing the obstack.
11576 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11577 auto_obstack.
11578 * dwarf2read.c (create_addrmap_from_index)
11579 (dwarf2_build_psymtabs_hard)
11580 (update_enumeration_type_from_children): Likewise.
11581 * gdb_obstack.h (auto_obstack): New type.
11582 * go-exp.y (name_obstack): Now an auto_obstack.
11583 (build_packaged_name): Use auto_obstack::clear.
11584 (go_parse): Use auto_obstack::clear instead of reinitializing and
11585 freeing the obstack.
11586 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11587 auto_obstack.
11588 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11589 * rust-exp.y (work_obstack): Now an auto_obstack.
11590 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11591 reinitializing and freeing the obstack.
11592 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11593 (host_char_to_target): Use auto_obstack.
11594 * utils.h (make_cleanup_obstack_free): Delete declaration.
11595 * valprint.c (generic_emit_char, generic_printstr): Use
11596 auto_obstack.
11597
11598 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11599
11600 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11601 thread.
11602 (darwin_init_thread_list): Don't update dummy thread.
11603 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11604
11605 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11606
11607 * record-full.c (netorder16): Remove.
11608
11609 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11610
11611 * common/diagnostics.h: Define macros for GCC.
11612 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11613 * common/vec.h: Include diagnostics.h.
11614 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11615 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11616 warning.
11617
11618 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11619
11620 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11621 New macro.
11622 * ada-lex.l: Ignore deprecated register warnings.
11623
11624 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11625
11626 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11627 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11628
11629 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11630
11631 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11632 its own line.
11633
11634 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11635
11636 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11637
11638 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11639
11640 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11641 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11642 (xtensa_register_read_masked): Likewise.
11643
11644 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11645
11646 * common/environ.c (gdb_environ::unset): Update comment.
11647
11648 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11649
11650 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11651 registers.
11652
11653 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11654
11655 * record-full.c (record_full_exec_insn): Use byte_vector.
11656
11657 2017-06-22 Yao Qi <yao.qi@linaro.org>
11658
11659 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11660 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11661
11662 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11663
11664 * remote.c (cached_reg): Move from here...
11665 * regcache.h (cached_reg): ...to here.
11666 * python/py-unwind.c (struct reg_info): Remove.
11667 (cached_frame_info): Use cached_reg_t.
11668 (pyuw_prev_register): Likewise.
11669 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11670 (pyuw_dealloc_cache): Free all registers.
11671
11672 2017-06-22 Pedro Alves <palves@redhat.com>
11673 Simon Marchi <simon.marchi@ericsson.com>
11674
11675 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11676 warning.
11677 * common/diagnostics.h: New file.
11678
11679 2017-06-22 Pedro Alves <palves@redhat.com>
11680
11681 * common/agent.h: Add include guards.
11682
11683 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11684
11685 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11686 talk about addressable units instead of bytes.
11687
11688 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11689
11690 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11691 of '::const_iterator'.
11692
11693 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11694
11695 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11696 'unittests/environ-selftests.c'.
11697 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11698 * charset.c (find_charset_names): Declare object 'iconv_env'.
11699 Update code to use 'iconv_env' object. Remove call to
11700 'free_environ'.
11701 * common/environ.c: Include <utility>.
11702 (make_environ): Delete function.
11703 (free_environ): Delete function.
11704 (gdb_environ::clear): New function.
11705 (gdb_environ::operator=): New function.
11706 (gdb_environ::get): Likewise.
11707 (environ_vector): Delete function.
11708 (set_in_environ): Delete function.
11709 (gdb_environ::set): New function.
11710 (unset_in_environ): Delete function.
11711 (gdb_environ::unset): New function.
11712 (gdb_environ::envp): Likewise.
11713 * common/environ.h: Include <vector>.
11714 (struct gdb_environ): Delete; transform into...
11715 (class gdb_environ): ... this class.
11716 (free_environ): Delete prototype.
11717 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11718 environ_vector): Likewise.
11719 * infcmd.c (run_command_1): Update code to call
11720 'envp' from 'gdb_environ' class.
11721 (environment_info): Update code to call methods from 'gdb_environ'
11722 class.
11723 (unset_environment_command): Likewise.
11724 (path_info): Likewise.
11725 (path_command): Likewise.
11726 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11727 (inferior::inferior): Initialize 'environment' using the host's
11728 information.
11729 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11730 Include "environ.h".
11731 (class inferior) <environment>: Change type from 'struct
11732 gdb_environ' to 'gdb_environ'.
11733 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11734 methods from 'gdb_environ' class.
11735 * solib.c (solib_find_1): Likewise
11736 * unittests/environ-selftests.c: New file.
11737
11738 2017-06-20 Yao Qi <yao.qi@linaro.org>
11739
11740 * features/i386/i386-linux.xml: Exchange the order of including
11741 32bit-linux.xml and 32bit-sse.xml.
11742 * features/i386/i386-linux.c: Regenerated.
11743
11744 2017-06-20 Yao Qi <yao.qi@linaro.org>
11745
11746 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11747 Delete copy ctor and assignment operator.
11748 (tdesc_type): Likewise.
11749 (tdesc_feature): Likewise.
11750 (tdesc_free_reg): Remove.
11751 (tdesc_create_reg): Use new.
11752 (tdesc_free_type): Remove.
11753 (tdesc_create_vector): Use new.
11754 (tdesc_create_union): Likewise.
11755 (tdesc_create_flags): Likewise.
11756 (tdesc_create_enum): Likewise.
11757 (tdesc_free_feature): Delete.
11758 (free_target_description): Use delete.
11759
11760 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11761
11762 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11763 registers.
11764
11765 2017-06-19 Pedro Alves <palves@redhat.com>
11766
11767 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11768 after gdb::unlinker.
11769
11770 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11771
11772 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11773 gdb_environ to access an environment variable.
11774
11775 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11776
11777 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11778 gdb_byte*.
11779
11780 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11781
11782 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11783
11784 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11785
11786 * configure: Re-generate.
11787 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11788
11789 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11790
11791 * configure: Re-generate.
11792 * warning.m4: Pass -Werror to compiler when checking for
11793 supported warning flags.
11794
11795 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11796
11797 * Makefile.in (COMPILE.pre): Add "-x c++".
11798
11799 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11800 Pedro Alves <palves@redhat.com>
11801 Yao Qi <yao.qi@linaro.org>
11802
11803 * defs.h (RequireLongest): New.
11804 (extract_integer): Declare function template.
11805 (extract_signed_integer): Remove the declaration, but define it
11806 static inline.
11807 (extract_unsigned_integer): Likewise.
11808 (store_integer): Declare function template.
11809 (store_signed_integer): Remove the declaration, but define it
11810 static inline.
11811 (store_unsigned_integer): Likewise.
11812 * findvar.c (extract_integer): New function template.
11813 (extract_signed_integer): Remove.
11814 (extract_unsigned_integer): Remove.
11815 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11816 instantiations.
11817 (store_integer): New function template.
11818 (store_signed_integer): Remove.
11819 (store_unsigned_integer): Remove.
11820 (store_integer): Explicit instantiations.
11821 * regcache.c (regcache_raw_read_signed): Update.
11822 (regcache::raw_read): New function.
11823 (regcache::raw_read_signed): Remove.
11824 (regcache::raw_read_unsigned): Remove.
11825 (regcache_raw_read_unsigned): Update.
11826 (regcache_raw_write_unsigned): Update.
11827 (regcache::raw_write_signed): Remove.
11828 (regcache::raw_write): New function.
11829 (regcache_cooked_read_signed): Update.
11830 (regcache::raw_write_unsigned): Remove.
11831 (regcache::cooked_read_signed): Remove.
11832 (regcache_cooked_read_unsigned): Update.
11833 (regcache::cooked_read_unsigned): Remove.
11834 (regcache_cooked_write_signed): Update.
11835 (regcache_cooked_write_unsigned): Update.
11836 * regcache.h (regcache) <raw_read_signed>: Remove.
11837 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11838 <raw_read, raw_write>: New.
11839 <cooked_read_signed, cooked_write_signed>: Remove.
11840 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11841 <cooked_read, cooked_write>: New.
11842 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11843 (sh64_pseudo_register_write): Update.
11844
11845 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11846
11847 * arc-tdep.c (arc_disassembler_options): New variable.
11848 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11849 of default_print_insn.
11850 (arc_delayed_print_insn): Set info->section when needed,
11851 use default_print_insn to retrieve a disassembler.
11852
11853 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11854
11855 PR gdb/21574
11856 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11857 to mention $SHELL and startup-with-shell.
11858
11859 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11860
11861 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11862
11863 2017-06-14 Yao Qi <yao.qi@linaro.org>
11864
11865 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11866 default_print_insn instead of print_insn_aarch64.
11867 * arm-tdep.c (gdb_print_insn_arm): Call
11868 default_print_insn instead of print_insn_big_arm
11869 and print_insn_little_arm.
11870 * i386-tdep.c (i386_print_insn): Call default_print_insn
11871 instead of print_insn_i386.
11872 * ia64-tdep.c (ia64_print_insn): Call
11873 default_print_insn instead of print_insn_ia64.
11874 * mips-tdep.c (gdb_print_insn_mips): Call
11875 default_print_insn instead of print_insn_big_mips
11876 and print_insn_little_mips.
11877 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11878 instead of print_insn_spu.
11879
11880 2017-06-14 Pedro Alves <palves@redhat.com>
11881
11882 * ada-lang.c: Include "common/byte-vector.h".
11883 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11884 * charset.c (wchar_iterator::iterate): Resize the vector instead
11885 of reserving it.
11886 * common/byte-vector.h: Include "common/def-vector.h".
11887 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11888 * cli/cli-dump.c: Include "common/byte-vector.h".
11889 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11890 * common/byte-vector.h: New file.
11891 * common/def-vector.h: New file.
11892 * common/default-init-alloc.h: New file.
11893 * dwarf2loc.c: Include "common/byte-vector.h".
11894 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11895 instead of reserving it.
11896 * dwarf2read.c: Include "common/byte-vector.h".
11897 (data_buf::m_vec): Now a gdb::byte_vector.
11898 * gdb_regex.c: Include "common/def-vector.h".
11899 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11900 * mi/mi-main.c: Include "common/byte-vector.h".
11901 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11902 * printcmd.c: Include "common/byte-vector.h".
11903 (print_scalar_formatted): Use gdb::byte_vector.
11904 * valprint.c: Include "common/byte-vector.h".
11905 (maybe_negate_by_bytes, print_decimal_chars): Use
11906 gdb::byte_vector.
11907
11908 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11909
11910 * darwin-nat.c: Include "nat/fork-inferior.h".
11911
11912 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11913
11914 * configure.nat: Factor out Darwin bits that are not
11915 architecture-specific. Add fork-inferior.o.
11916
11917 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11918
11919 * configure.nat: Factor out AIX bits that are not
11920 architecture-specific. Add fork-inferior.o.
11921
11922 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11923
11924 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11925 (read_pieced_value, write_pieced_value): ...here. Reduce to
11926 wrappers that just call rw_pieced_value.
11927
11928 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11929
11930 * dwarf2loc.c (write_pieced_value): When writing the data for a
11931 memory piece, use write_memory_with_notification instead of
11932 write_memory.
11933
11934 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11935
11936 * valops.c (read_value_memory): Change embedded_offset to
11937 represent a bit offset instead of a byte offset.
11938 * value.h (read_value_memory): Adjust comment.
11939
11940 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11941
11942 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11943 dest_offset_bits and source_offset_bits.
11944 (write_pieced_value): Likewise.
11945
11946 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11947
11948 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11949 given by DW_OP_bit_piece.
11950 (write_pieced_value): Likewise.
11951
11952 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11953
11954 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11955 some other preparations to the places where sufficient information
11956 is available.
11957 (write_pieced_value): Likewise.
11958
11959 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11960
11961 * dwarf2loc.c (bits_to_bytes): New function.
11962 (read_pieced_value): Fix offset calculations for register pieces
11963 on big-endian targets.
11964 (write_pieced_value): Likewise.
11965
11966 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11967
11968 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11969 (write_pieced_value): Likewise.
11970
11971 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11972
11973 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11974 transfer the source value's least significant bits, instead of its
11975 lowest-addressed ones. Rename type_len to max_offset.
11976 (read_pieced_value): Mirror above changes to write_pieced_value as
11977 applicable.
11978
11979 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11980
11981 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11982 truncate full bytes from dest_offset_bits before using it as an
11983 offset into the buffer.
11984
11985 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11986
11987 * dwarf2loc.c (write_pieced_value): Include transfer size in
11988 byte-wise check.
11989
11990 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11991
11992 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11993 calculation of this_size.
11994
11995 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11996
11997 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11998 when targeting a bit-field.
11999 (write_pieced_value): Likewise.
12000
12001 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12002
12003 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
12004 (allocate_piece_closure): Drop addr_size parameter.
12005 (dwarf2_evaluate_loc_desc_full): Adjust call to
12006 allocate_piece_closure.
12007
12008 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12009
12010 PR gdb/21226
12011 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
12012 the LSB end, independent of endianness.
12013
12014 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12015
12016 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
12017 size capping.
12018
12019 2017-06-13 Yao Qi <yao.qi@linaro.org>
12020
12021 * mips-linux-nat.c: Move include features/mips*-linux.c to
12022 mips-linux-tdep.c.
12023 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
12024 to mips-linux-tdep.c.
12025 * mips-linux-tdep.c: Include features/mips*-linux.c
12026 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
12027 functions.
12028 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
12029 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
12030 (tdesc_mips64_dsp_linux): Declare.
12031
12032 2017-06-12 Tom Tromey <tom@tromey.com>
12033
12034 * valprint.h (val_print_type_code_int): Remove.
12035 * valprint.c (generic_val_print_int): Always call
12036 val_print_scalar_formatted.
12037 (val_print_type_code_int): Remove.
12038 * printcmd.c (print_scalar_formatted): Handle options->format==0.
12039 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
12040 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
12041 * ada-valprint.c (ada_val_print_num): Use
12042 val_print_scalar_formatted.
12043
12044 2017-06-12 Tom Tromey <tom@tromey.com>
12045
12046 * printcmd.c (print_scalar_formatted): Unify the two switches.
12047 Don't convert scalars to LONGEST.
12048
12049 2017-06-12 Tom Tromey <tom@tromey.com>
12050
12051 PR exp/16225:
12052 * valprint.h (print_decimal_chars): Update.
12053 * valprint.c (maybe_negate_by_bytes): New function.
12054 (print_decimal_chars): Add "is_signed" argument.
12055 * printcmd.c (print_scalar_formatted): Update.
12056
12057 2017-06-12 Tom Tromey <tom@tromey.com>
12058
12059 PR exp/16225:
12060 * valprint.h (print_binary_chars, print_hex_chars): Update.
12061 * valprint.c (val_print_type_code_int): Update.
12062 (print_binary_chars): Add "zero_pad" argument.
12063 (emit_octal_digit): New function.
12064 (print_octal_chars): Don't zero-pad.
12065 (print_decimal_chars): Likewise.
12066 (print_hex_chars): Add "zero_pad" argument.
12067 * sh64-tdep.c (sh64_do_fp_register): Update.
12068 * regcache.c (regcache::dump): Update.
12069 * printcmd.c (print_scalar_formatted): Update.
12070 * infcmd.c (default_print_one_register_info): Update.
12071
12072 2017-06-12 Pedro Alves <palves@redhat.com>
12073 Alan Hayward <alan.hayward@arm.com>
12074
12075 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
12076 (mips_eabi_push_dummy_call): Rename local 'regsize' to
12077 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
12078 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
12079 Assert that abi_regsize bytes fit in 'ref_valbuf'.
12080
12081 2017-06-12 Pedro Alves <palves@redhat.com>
12082
12083 * dwarf2read.c (mapped_symtab::data): Now a vector of
12084 symtab_index_entry instead of vector of
12085 std::unique_ptr<symtab_index_entry>. All users adjusted to check
12086 whether an element's name is NULL instead of checking whether the
12087 element itself is NULL.
12088 (find_slot): Change return type. Adjust.
12089 (hash_expand, , add_index_entry, uniquify_cu_indices)
12090 (write_hash_table): Adjust.
12091
12092 2017-06-12 Pedro Alves <palves@redhat.com>
12093
12094 * dwarf2read.c (recursively_count_psymbols): New function.
12095 (write_psymtabs_to_index): Call it to compute number of psyms and
12096 pass estimate size of psyms_seen to unordered_set's ctor.
12097
12098 2017-06-12 Pedro Alves <palves@redhat.com>
12099
12100 * dwarf2read.c (write_hash_table): Check if key already exists
12101 before emplacing.
12102
12103 2017-06-12 Pedro Alves <palves@redhat.com>
12104
12105 * dwarf2read.c (data_buf::append_space): Rename to...
12106 (data_buf::grow): ... this, and make private. Adjust all callers.
12107 (data_buf::append_uint): New method.
12108 (add_address_entry, write_one_signatured_type)
12109 (write_psymtabs_to_index): Use it.
12110
12111 2017-06-12 Pedro Alves <palves@redhat.com>
12112
12113 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
12114 (file_write (FILE *, const std::vector<Elem>&)): Delete.
12115 (data_buf::file_write): Call ::fwrite directly.
12116
12117 2017-06-12 Pedro Alves <palves@redhat.com>
12118
12119 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
12120 std::vector::erase.
12121
12122 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12123
12124 Code cleanup: C++ify .gdb_index producer.
12125 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
12126 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
12127 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
12128 (create_strtab, add_string): Remove.
12129 (file_write, data_buf): New.
12130 (struct symtab_index_entry): Use std::vector for cu_indices.
12131 (struct mapped_symtab): Use std::vector for data.
12132 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
12133 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
12134 Remove.
12135 (find_slot): Change return type. Update it to the new data structures.
12136 (hash_expand, add_index_entry): Update it to the new data structures.
12137 (offset_type_compare): Remove.
12138 (uniquify_cu_indices): Update it to the new data structures.
12139 (c_str_view, c_str_view_hasher, vector_hasher): New.
12140 (add_indices_to_cpool): Remove.
12141 (write_hash_table): Update it to the new data structures.
12142 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
12143 (eq_psymtab_cu_index): Remove.
12144 (psym_index_map): New typedef.
12145 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
12146 reference and std::unordered_map for cu_index_htab.
12147 (add_address_entry, add_address_entry_worker, write_address_map)
12148 (write_psymbols): Update it to the new data structures.
12149 (write_obstack): Remove.
12150 (struct signatured_type_index_data): Change types_list to a data_buf
12151 reference and psyms_seen to a std::unordered_set reference.
12152 (write_one_signatured_type, recursively_write_psymbols)
12153 (write_psymtabs_to_index): Update it to the new data structures.
12154
12155 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
12156
12157 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
12158 separate-debug-file commands.
12159 * symfile.h (separate_debug_file_debug): New global.
12160 * symfile.c (separate_debug_file_debug): New global.
12161 (separate_debug_file_exists, find_separate_debug_file): Add
12162 debug output.
12163 (_initialize_symfile): Add "set debug separate-debug-file"
12164 command.
12165 * build-id.c (build_id_to_debug_bfd,
12166 find_separate_debug_file_by_buildid): Add debug output.
12167
12168 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
12169
12170 * gdbarch.sh (displaced_step_free_closure): Remove.
12171 * gdbarch.h, gdbarch.c: Re-generate.
12172 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
12173 displaced_step_free_closure.
12174 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
12175 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
12176 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
12177 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12178 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
12179 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12180 * arch-utils.h (simple_displaced_step_free_closure): Remove.
12181 * arch-utils.c (simple_displaced_step_free_closure): Remove.
12182 * infrun.c (displaced_step_clear): Call xfree instead of
12183 gdbarch_displaced_step_free_closure.
12184
12185 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
12186
12187 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
12188 NULL".
12189
12190 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12191
12192 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
12193 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
12194 (mn10300_push_dummy_call): Likewise.
12195
12196 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12197
12198 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
12199
12200 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12201
12202 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
12203
12204 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12205
12206 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
12207 able to start inferiors using a shell.
12208 (New remote packets): Announce new packet "QStartupWithShell".
12209 * remote.c: Add PACKET_QStartupWithShell.
12210 (extended_remote_create_inferior): Handle new
12211 PACKET_QStartupWithShell.
12212 (remote_protocol_features) <QStartupWithShell>: New entry for
12213 PACKET_QStartupWithShell.
12214 (_initialize_remote): Call "add_packet_config_cmd" for
12215 QStartupShell.
12216
12217 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12218 Pedro Alves <palves@redhat.com>
12219
12220 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
12221 and "nat/fork-inferior.h".
12222 * common/common-inferior.h: New file, with contents from
12223 "gdb/inferior.h".
12224 * commom/common-utils.c: Include "common-utils.h".
12225 (stringify_argv): New function.
12226 * common/common-utils.h (stringify_argv): New prototype.
12227 * configure.nat: Add "fork-inferior.o" as a dependency for
12228 "*linux*", "fbsd*" and "nbsd*" hosts.
12229 * corefile.c (get_exec_file): Update comment.
12230 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12231 instead of "startup_inferior".
12232 (darwin_create_inferior): Call "add_thread_silent" after
12233 "fork_inferior".
12234 * fork-child.c: Cleanup unnecessary includes.
12235 (SHELL_FILE): Move to "common/common-fork-child.c".
12236 (environ): Likewise.
12237 (exec_wrapper): Initialize.
12238 (get_exec_wrapper): New function.
12239 (breakup_args): Move to "common/common-fork-child.c"; rename to
12240 "breakup_args_for_exec".
12241 (escape_bang_in_quoted_argument): Move to
12242 "common/common-fork-child.c".
12243 (saved_ui): New variable.
12244 (prefork_hook): New function.
12245 (postfork_hook): Likewise.
12246 (postfork_child_hook): Likewise.
12247 (gdb_startup_inferior): Likewise.
12248 (fork_inferior): Move to "common/common-fork-child.c". Update
12249 function to support gdbserver.
12250 (startup_inferior): Likewise.
12251 * gdbcore.h (get_exec_file): Remove declaration.
12252 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12253 instead of "startup_inferior". Call "add_thread_silent" after
12254 "fork_inferior".
12255 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12256 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12257 instead of "startup_inferior". Call "add_thread_silent" after
12258 "fork_inferior".
12259 * inferior.h: Include "common-inferior.h".
12260 (trace_start_error): Move to "common/common-utils.h".
12261 (trace_start_error_with_name): Likewise.
12262 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12263 (startup_inferior): Likewise.
12264 (gdb_startup_inferior): New prototype.
12265 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12266 * nat/fork-inferior.h: New file.
12267 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12268 instead of "startup_inferior". Call "add_thread_silent" after
12269 "fork_inferior".
12270 * target.h (target_terminal_init): Move prototype to
12271 "target/target.h".
12272 (target_terminal_inferior): Likewise.
12273 (target_terminal_ours): Likewise.
12274 * target/target.h (target_terminal_init): New prototype, moved
12275 from "target.h".
12276 (target_terminal_inferior): Likewise.
12277 (target_terminal_ours): Likewise.
12278 * utils.c (gdb_flush_out_err): New function.
12279
12280 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12281
12282 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12283 * common/common-gdbthread.h: New file, with parts from
12284 "gdb/gdbthread.h".
12285 * gdbthread.h: Include "common-gdbthread.h".
12286 (switch_to_thread): Moved to "common/common-gdbthread.h".
12287
12288 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12289
12290 * Makefile.in (SFILES): Add "common/job-control.c".
12291 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12292 (COMMON_OBS): Add "job-control.o".
12293 * common/job-control.c: New file, with contents from
12294 "gdb/inflow.c".
12295 * common/job-control.h: New file, with contents from "terminal.h".
12296 * fork-child.c: Include "job-control.h".
12297 * inflow.c: Include "job-control.h".
12298 (gdb_setpgid): Move to "common/common-inflow.c".
12299 (_initialize_inflow): Move setting of "job_control" to
12300 "handle_job_control".
12301 * terminal.h (job_control): Moved to "common/common-terminal.h".
12302 (gdb_setpgid): Likewise.
12303 * top.c: Include "job_control.h".
12304 * utils.c: Likewise.
12305 (job_control): Moved to "job-control.c".
12306
12307 2017-06-07 Pedro Alves <palves@redhat.com>
12308
12309 * Makefile.in (SFILES): Add gdb_regex.c.
12310 (COMMON_OBS): Add gdb_regex.o.
12311 * ada-lang.c (ada_add_standard_exceptions)
12312 (ada_add_exceptions_from_frame, name_matches_regex)
12313 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12314 parameter type to compiled_regex. Adjust.
12315 (ada_exceptions_list): Use compiled_regex.
12316 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12317 std::unique_ptr<compiled_regex>.
12318 (exception_catchpoint::~exception_catchpoint): Remove regfree
12319 call.
12320 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12321 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12322 * breakpoint.c (solib_catchpoint::compiled): Now a
12323 std::unique_ptr<compiled_regex>.
12324 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12325 (check_status_catch_solib): Adjust to use compiled_regex.
12326 (add_solib_catchpoint): Adjust to use compiled_regex.
12327 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12328 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12329 compiled_regex reference. Adjust to use it.
12330 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12331 declaration. Include "gdb_regex.h".
12332 (apropos_cmd): Change regex parameter to compiled_regex reference.
12333 * gdb_regex.c: New file.
12334 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12335 declarations.
12336 (class compiled_regex): New.
12337 * linux-tdep.c: Include "common/gdb_optional.h".
12338 (struct mapping_regexes): New, factored out from
12339 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12340 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12341 gdb::optional and remove cleanups. Adjust to compiled_regex.
12342 * probe.c: Include "common/gdb_optional.h".
12343 (collect_probes): Use compiled_regex and gdb::optional and remove
12344 cleanups.
12345 * skip.c: Include "common/gdb_optional.h".
12346 (skiplist_entry::compiled_function_regexp): Now a
12347 gdb::optional<compiled_regex>.
12348 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12349 (free_skiplist_entry): Remove regfree call.
12350 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12351 compiled_regex and gdb::optional.
12352 * symtab.c: Include "common/gdb_optional.h".
12353 (search_symbols): Use compiled_regex and gdb::optional.
12354 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12355 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12356 to gdb_regex.c.
12357
12358 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12359
12360 * regcache.c (regcache::save): Avoid buffer use.
12361 (regcache::dump): Likewise.
12362
12363 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12364
12365 * sh-tdep.c (sh_pseudo_register_read): Remove
12366 MAX_REGISTER_SIZE.
12367 (sh_pseudo_register_write): Likewise.
12368 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12369 (sh64_pseudo_register_write): Likewise
12370
12371 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12372
12373 * aarch64-tdep.c (aarch64_store_return_value): Use
12374 V_REGISTER_SIZE.
12375 (aarch64_pseudo_read_value): Likewise.
12376 (aarch64_pseudo_write): Likewise.
12377
12378 2017-06-06 Yao Qi <yao.qi@linaro.org>
12379
12380 * regformats/regdef.h (set_register_cache): Remove the
12381 declaration.
12382
12383 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12384
12385 * frame.c (frame_unwind_register_signed): Use
12386 frame_unwind_register_value.
12387
12388 2017-06-06 Pedro Alves <palves@redhat.com>
12389
12390 PR breakpoints/21553
12391 * breakpoint.c (create_breakpoints_sal_default)
12392 (init_breakpoint_sal, create_breakpoint_sal): Use
12393 gdb::unique_xmalloc_ptr for string parameters.
12394 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12395 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12396 (base_breakpoint_create_breakpoints_sal)
12397 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12398 (strace_marker_create_breakpoints_sal)
12399 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12400 string parameters.
12401 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12402 gdb::unique_xmalloc_ptr for string parameters.
12403 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12404 parameters.
12405
12406 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12407
12408 * alpha-tdep.c (alpha_register_to_value): Use
12409 get_frame_register_value.
12410 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12411
12412 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12413
12414 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12415 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12416 (ia64_value_to_register): Likewise.
12417 (ia64_extract_return_value): Likewise.
12418 (ia64_store_return_value): Likewise.
12419 (ia64_push_dummy_call): Likewise.
12420
12421 2017-06-04 Joel Brobecker <brobecker@adacore.com>
12422
12423 GDB 8.0 released.
12424
12425 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12426
12427 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12428
12429 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12430
12431 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12432 parameter.
12433 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12434
12435 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12436
12437 * event-loop.c (poll_timers): Unallocate timer using delete
12438 instead of xfree.
12439
12440 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12441
12442 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12443 (struct breakpoint) <~breakpoint>: New.
12444 (struct watchpoint): Inherit from breakpoint.
12445 <~watchpoint>: New.
12446 <base>: Remove.
12447 (struct tracepoint): Inherit from breakpoint.
12448 <base>: Remove.
12449 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12450 (struct longjmp_breakpoint): Inherit from breakpoint.
12451 <~longjmp_breakpoint>: New.
12452 <base>: Remove.
12453 (new_breakpoint_from_type): Remove casts.
12454 (watchpoint_in_thread_scope): Remove reference to base field.
12455 (watchpoint_del_at_next_stop): Likewise.
12456 (update_watchpoint): Likewise.
12457 (watchpoint_check): Likewise.
12458 (bpstat_check_watchpoint): Likewise.
12459 (set_longjmp_breakpoint): Likewise.
12460 (struct fork_catchpoint): Inherit from breakpoint.
12461 <base>: Remove.
12462 (struct solib_catchpoint): Inherit from breakpoint.
12463 <~solib_catchpoint>: New.
12464 <base>: Remove.
12465 (dtor_catch_solib): Change to ...
12466 (solib_catchpoint::~solib_catchpoint): ... this.
12467 (breakpoint_hit_catch_solib): Remove reference to base field.
12468 (add_solib_catchpoint): Likewise.
12469 (create_fork_vfork_event_catchpoint): Likewise.
12470 (struct exec_catchpoint): Inherit from breakpoint.
12471 <~exec_catchpoint>: New.
12472 <base>: Remove.
12473 (dtor_catch_exec): Change to ...
12474 (exec_catchpoint::~exec_catchpoint): ... this.
12475 (dtor_watchpoint): Change to ...
12476 (watchpoint::~watchpoint): ... this.
12477 (watch_command_1): Remove reference to base field.
12478 (catch_exec_command_1): Likewise.
12479 (base_breakpoint_dtor): Change to ...
12480 (breakpoint::~breakpoint): ... this.
12481 (base_breakpoint_ops): Remove dtor field value.
12482 (longjmp_bkpt_dtor): Change to ...
12483 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12484 (strace_marker_create_breakpoints_sal): Remove reference to base
12485 field.
12486 (delete_breakpoint): Don't manually call breakpoint destructor.
12487 (create_tracepoint_from_upload): Remove reference to base field.
12488 (trace_pass_set_count): Likewise.
12489 (initialize_breakpoint_ops): Don't initialize
12490 momentary_breakpoint_ops, don't set dtors.
12491 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12492 <~ada_catchpoint>: New.
12493 <base>: Remove.
12494 (create_excep_cond_exprs): Remove reference to base field.
12495 (dtor_exception): Change to ...
12496 (ada_catchpoint::~ada_catchpoint): ... this.
12497 (dtor_catch_exception): Remove.
12498 (dtor_catch_exception_unhandled): Remove.
12499 (dtor_catch_assert): Remove.
12500 (create_ada_exception_catchpoint): Remove reference to base
12501 field.
12502 (initialize_ada_catchpoint_ops): Don't set dtors.
12503 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12504 breakpoint.
12505 <~signal_catchpoint>: New.
12506 <base>: Remove.
12507 (signal_catchpoint_dtor): Change to ...
12508 (signal_catchpoint::~signal_catchpoint): ... this.
12509 (create_signal_catchpoint): Remove reference to base field.
12510 (initialize_signal_catchpoint_ops): Don't set dtor.
12511 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12512 from breakpoint.
12513 <~syscall_catchpoint>: New.
12514 <base>: Remove.
12515 (dtor_catch_syscall): Change to ...
12516 (syscall_catchpoint::~syscall_catchpoint): ... this.
12517 (create_syscall_event_catchpoint): Remove reference to base
12518 field.
12519 (initialize_syscall_catchpoint_ops): Don't set dtor.
12520 * break-catch-throw.c (struct exception_catchpoint): Inherit
12521 from breakpoint.
12522 <~exception_catchpoint>: New.
12523 <base>: Remove.
12524 (dtor_exception_catchpoint): Change to ...
12525 (exception_catchpoint::~exception_catchpoint): ... this.
12526 (handle_gnu_v3_exceptions): Remove reference to base field.
12527 (initialize_throw_catchpoint_ops): Don't set dtor.
12528 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12529 field.
12530 * remote.c (remote_get_tracepoint_status): Likewise.
12531 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12532 * tracefile.c (tracefile_fetch_registers): Likewise.
12533 * tracepoint.c (actions_command): Likewise.
12534 (validate_actionline): Likewise.
12535 (tfind_1): Likewise.
12536 (get_traceframe_location): Likewise.
12537 (find_matching_tracepoint_location): Likewise.
12538 (parse_tracepoint_status): Likewise.
12539 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12540
12541 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12542
12543 * breakpoint.c (struct longjmp_breakpoint): New struct.
12544 (is_tracepoint_type): Change return type to bool.
12545 (is_longjmp_type): New function.
12546 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12547 (set_raw_breakpoint_without_location): Use
12548 new_breakpoint_from_type.
12549 (set_raw_breakpoint): Likewise.
12550
12551 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12552
12553 * breakpoint.c (new_breakpoint_from_type): New function.
12554 (create_breakpoint_sal): Use new_breakpoint_from_type and
12555 unique_ptr.
12556 (create_breakpoint): Likewise.
12557
12558 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12559
12560 * memattr.c (mem_info_command): Rename to ...
12561 (info_mem_command): ... this.
12562 (mem_enable_command): Rename to ...
12563 (enable_mem_command): ... this.
12564 (mem_disable_command): Rename to ...
12565 (disable_mem_command): ... this.
12566 (mem_delete_command): Rename to ...
12567 (delete_mem_command): ... this.
12568 (_initialize_mem): Adjust function names.
12569
12570 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12571
12572 * btrace.c (handle_pt_insn_events): New.
12573 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12574 STATUS. Split into this and ...
12575 (handle_pt_insn_event_flags): ... this.
12576
12577 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12578
12579 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12580 and struct pt_insn.resynced.
12581 * configure: Regenerated.
12582 * config.in: Regenerated.
12583
12584 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12585
12586 * btrace.c (ftrace_find_call_by_number): New function.
12587 (ftrace_new_function): Store objects, not pointers.
12588 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12589 ftrace_new_gap, ftrace_update_function,
12590 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12591 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12592 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12593 btrace_ends_with_single_insn, btrace_call_get): Account for
12594 btrace_thread_info::functions now storing objects.
12595 * btrace.h (struct btrace_thread_info): Add constructor.
12596 (struct btrace_thread_info) <functions>: Make std::vector.
12597 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12598 Initialize with default values.
12599 * record-btrace.c (record_btrace_frame_sniffer): Account for
12600 btrace_thread_info::functions now storing objects.
12601
12602 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12603
12604 * btrace.c: Remove typedef bfun_s.
12605 (ftrace_new_gap): Directly add gaps to the list of gaps.
12606 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12607 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12608 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12609 instead of gdb VEC.
12610
12611 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12612
12613 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12614 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12615 with btrace_thread_info::next_segment and
12616 btrace_thread_info::prev_segment.
12617 * btrace.h: Remove struct btrace_func_link.
12618 (struct btrace_function): Replace pair of function segment pointers
12619 with pair of indices.
12620 * python/py-record-btrace.c (btpy_call_prev_sibling,
12621 btpy_call_next_sibling): Replace references to
12622 btrace_thread_info::segment with btrace_thread_info::next_segment and
12623 btrace_thread_info::prev_segment.
12624 * record-btrace.c (record_btrace_frame_this_id): Use
12625 btrace_find_call_by_number.
12626
12627 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12628
12629 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12630 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12631 btrace_insn_next, btrace_insn_prev): Remove references to
12632 btrace_thread_info::flow.
12633 * btrace.h (struct btrace_function): Remove FLOW.
12634
12635 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12636
12637 * btrace.c (ftrace_find_call_by_number): New function.
12638 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12639 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12640 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12641 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12642 index.
12643 * btrace.h (struct btrace_function): Turn UP into an index.
12644 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12645 as an index.
12646 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12647 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12648 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12649
12650 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12651
12652 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12653 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12654 ftrace_update_function, ftrace_compute_global_level_offset,
12655 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12656 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12657 btrace_insn_end, btrace_is_empty): Remove references to
12658 btrace_thread_info::begin and btrace_thread_info::end.
12659 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12660 (struct btrace_thread_info) <functions>: Adjust comment.
12661 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12662 btrace_thread_info::begin.
12663
12664 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12665
12666 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12667 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12668 ftrace_update_function): Remove arguments that implicitly were always
12669 BTINFO->END.
12670 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12671 Don't pass BTINFO->END.
12672
12673 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12674
12675 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12676 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12677 btrace_find_insn_by_number): Replace function segment pointer with
12678 index.
12679 (btrace_insn_cmp): Simplify.
12680 * btrace.h: (struct btrace_insn_iterator) Rename index to
12681 insn_index. Replace function segment pointer with index into function
12682 segment vector.
12683 * record-btrace.c (record_btrace_call_history): Replace function
12684 segment pointer use with index.
12685 (record_btrace_frame_sniffer): Retrieve function call segment through
12686 vector.
12687 (record_btrace_set_replay): Remove defunc't safety check.
12688
12689 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12690
12691 * btrace.c (btrace_ends_with_single_insn): New function.
12692 (btrace_call_get, btrace_call_number, btrace_call_begin,
12693 btrace_call_end, btrace_call_next, btrace_call_prev,
12694 btrace_find_call_by_number): Use index into call segment vector
12695 instead of pointer.
12696 (btrace_call_cmp): Simplify.
12697 * btrace.h (struct btrace_call_iterator): Replace function call segment
12698 pointer with index into vector.
12699 * record-btrace.c (record_btrace_call_history): Use index instead of
12700 pointer.
12701
12702 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12703
12704 * btrace.c (btrace_insn_begin, btrace_insn_end,
12705 btrace_find_insn_by_number): Add btinfo to iterator.
12706 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12707
12708 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12709
12710 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12711 and save pointers directly.
12712 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12713 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12714 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12715 changed signature of functions.
12716 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12717 (btrace_fetch): Remove code that adds btrace_function pointers to
12718 vector of btrace_functions.
12719 (btrace_clear): Simplify freeing vector of btrace_functions.
12720
12721 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12722
12723 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12724 Replace VEC_* with std::vector functions.
12725 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12726 (struct btrace_thread_info)<functions>: Change type to std::vector.
12727
12728 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12729
12730 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12731 "Removed targets and native configurations" up. Merge duplicate
12732 "New commands" sub-sections. Add "New options" sub-sections.
12733
12734 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12735
12736 * defs.h (copy_integer_to_size): New declaration.
12737 * findvar.c (copy_integer_to_size): New function.
12738 (do_cint_test): New selftest function.
12739 (copy_integer_to_size_test): Likewise.
12740 (_initialize_findvar): Likewise.
12741 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12742 (mips_fbsd_collect_reg): Use raw_collect_integer.
12743 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12744 (mips64_fill_gregset): Use raw_collect_integer
12745 (mips64_fill_fpregset): Use raw_supply_integer.
12746 * regcache.c (regcache::raw_supply_integer): New function.
12747 (regcache::raw_collect_integer): Likewise.
12748 * regcache.h: (regcache::raw_supply_integer): New declaration.
12749 (regcache::raw_collect_integer): Likewise.
12750
12751 2017-05-24 Yao Qi <yao.qi@linaro.org>
12752
12753 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12754 (COMMON_OBS): Add gdbarch-selftests.o.
12755 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12756 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12757 * gdbarch-selftests.c: New file.
12758 * regcache.h (regcache) <~regcache>: Mark it virtual if
12759 GDB_SELF_TEST.
12760 <raw_write>: Likewise.
12761
12762 2017-05-24 Yao Qi <yao.qi@linaro.org>
12763
12764 * regcache.c (current_regcache): Change it to
12765 regcache::current_regcache.
12766 (regcache_observer_target_changed): Update.
12767 (regcache_thread_ptid_changed): Make it a regcache static
12768 method.
12769 (regcache_thread_ptid_changed): Update.
12770 (class regcache_access): New.
12771 (current_regcache_test): Update.
12772 (_initialize_regcache): Update.
12773 * regcache.h: Include forward_list.
12774 (regcache): Declare regcache_thread_ptid_changed and declare
12775 registers_changed_ptid as friend.
12776
12777 2017-05-24 Yao Qi <yao.qi@linaro.org>
12778
12779 * i387-tdep.c (i387_register_to_value): Use register_size
12780 instead of TYPE_LENGTH.
12781 * m68k-tdep.c (m68k_register_to_value): Likewise.
12782
12783 2017-05-24 Yao Qi <yao.qi@linaro.org>
12784
12785 * i387-tdep.c (i387_convert_register_p): Return false if type
12786 code isn't TYPE_CODE_FLT.
12787
12788 2017-05-24 Yao Qi <yao.qi@linaro.org>
12789
12790 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12791 length is 4.
12792 (alpha_register_to_value): Remove type length check.
12793 (alpha_value_to_register): Likewise.
12794
12795 2017-05-24 Yao Qi <yao.qi@linaro.org>
12796
12797 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12798 TYPE_CODE_FLT.
12799
12800 2017-05-24 Yao Qi <yao.qi@linaro.org>
12801
12802 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12803 TYPE_CODE_FLT or not.
12804
12805 2017-05-24 Yao Qi <yao.qi@linaro.org>
12806
12807 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12808 * avr-tdep.c (avr_gdbarch_init): Likewise.
12809 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12810 * cris-tdep.c (cris_gdbarch_init): Likewise.
12811 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12812 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12813 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12814 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12815 * mep-tdep.c (mep_gdbarch_init): Likewise.
12816 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12817 * mips-tdep.c (mips_gdbarch_init): Likewise.
12818 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12819 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12820 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12821 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12822 * v850-tdep.c (v850_gdbarch_init): Likewise.
12823
12824 2017-05-24 Yao Qi <yao.qi@linaro.org>
12825
12826 * selftest-arch.c (tests_with_arch): Call registers_changed
12827 and reinit_frame_cache.
12828 * selftest.c (run_self_tests): Likewise.
12829
12830 2017-05-24 Yao Qi <yao.qi@linaro.org>
12831
12832 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12833 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12834
12835 2017-05-24 Yao Qi <yao.qi@linaro.org>
12836
12837 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12838 set_gdbarch_print_insn.
12839
12840 2017-05-24 Yao Qi <yao.qi@linaro.org>
12841
12842 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12843 set_gdbarch_print_insn.
12844
12845 2017-05-24 Yao Qi <yao.qi@linaro.org>
12846
12847 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12848 set_gdbarch_print_insn.
12849 * arc-tdep.c (arc_gdbarch_init): Likewise.
12850 * arch-utils.c: include dis-asm.h.
12851 (default_print_insn): New function.
12852 * arch-utils.h (default_print_insn): Declare.
12853 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12854 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12855 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12856 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12857 * frv-tdep.c (frv_gdbarch_init): Likewise.
12858 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12859 * gdbarch.sh (print_insn): Use default_print_insn.
12860 * gdbarch.c: Regenerated.
12861 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12862 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12863 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12864 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12865 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12866 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12867 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12868 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12869 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12870 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12871 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12872 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12873 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12874 * mt-tdep.c (mt_gdbarch_init): Likewise.
12875 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12876 * nios2-tdep.c (nios2_print_insn): Remove.
12877 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12878 * rx-tdep.c (rx_gdbarch_init): Likewise.
12879 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12880 * score-tdep.c (score_print_insn): Remove.
12881 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12882 * sh-tdep.c (sh_gdbarch_init): Likewise.
12883 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12884 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12885 * tic6x-tdep.c (tic6x_print_insn): Remove.
12886 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12887 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12888 * v850-tdep.c (v850_gdbarch_init): Likewise.
12889 * vax-tdep.c (vax_gdbarch_init): Likewise.
12890 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12891 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12892
12893 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12894
12895 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12896 (MIPS_FP0_REGNUM): Remove.
12897 (MIPS_FSR_REGNUM): Remove.
12898 (mips_fbsd_supply_fpregs): Use mips_regnum.
12899 (mips_fbsd_supply_gregs): Likewise.
12900 (mips_fbsd_collect_fpregs): Likewise.
12901 (mips_fbsd_collect_gregs): Likewise.
12902
12903 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12904
12905 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12906 (getpfpregs_supplies): New function.
12907 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12908 getfpregs_supplies.
12909 (mips_fbsd_store_inferior_registers): Likewise.
12910
12911 2017-05-22 Pedro Alves <palves@redhat.com>
12912
12913 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12914 maintainer.
12915
12916 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12917
12918 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12919 (store_register): Likewise.
12920 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12921 (get_decimal_float_return_value): Likewise.
12922 (do_ppc_sysv_return_value): Likewise.
12923 (ppc64_sysv_abi_push_integer): Likewise.
12924 (ppc64_sysv_abi_push_freg): Likewise.
12925 (ppc64_sysv_abi_return_value_base): Likewise.
12926 (ppc64_sysv_abi_return_value): Likewise.
12927 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12928 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12929 * rs6000-nat.c: Likewise.
12930 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12931 (rs6000_value_to_register): Likewise.
12932 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12933
12934 2017-05-21 Tom Tromey <tom@tromey.com>
12935
12936 PR rust/21466:
12937 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12938 arrays as "[T]", not "[T; ]".
12939
12940 2017-05-19 Tom Tromey <tom@tromey.com>
12941
12942 PR rust/21484:
12943 * rust-lang.c (exp_descriptor_rust): New function.
12944 (rust_language_defn): Use it.
12945 * p-lang.c (pascal_language_defn): Update.
12946 * opencl-lang.c (opencl_language_defn): Update.
12947 * objc-lang.c (objc_language_defn): Update.
12948 * m2-lang.c (m2_language_defn): Update.
12949 * language.h (struct language_defn)
12950 <la_watch_location_expression>: New member.
12951 * language.c (unknown_language_defn, auto_language_defn)
12952 (local_language_defn): Update.
12953 * go-lang.c (go_language_defn): Update.
12954 * f-lang.c (f_language_defn): Update.
12955 * d-lang.c (d_language_defn): Update.
12956 * c-lang.h (c_watch_location_expression): Declare.
12957 * c-lang.c (c_watch_location_expression): New function.
12958 (c_language_defn, cplus_language_defn, asm_language_defn)
12959 (minimal_language_defn): Use it.
12960 * breakpoint.c (watch_command_1): Call
12961 la_watch_location_expression.
12962 * ada-lang.c (ada_language_defn): Update.
12963
12964 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12965
12966 PR tui/21482
12967 * gdb_curses.h (NOMACROS): Define.
12968 (NCURSES_NOMACROS): Define.
12969
12970 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12971
12972 PR tui/21482
12973 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12974 arg to char *.
12975 * tui/tui-wingeneral.c (box_win): Likewise.
12976 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12977 (tui_show_source_line): Likewise.
12978 (tui_show_exec_info_content): Likewise.
12979
12980 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12981
12982 * sparc-tdep.c (sparc_structure_return_p)
12983 (sparc_arg_on_registers_p): New functions.
12984 (sparc32_store_arguments): Use them.
12985 * sparc64-tdep.c (sparc64_16_byte_align_p)
12986 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12987 Handle TYPE_CODE_ARRAY.
12988
12989 2017-05-17 Yao Qi <yao.qi@linaro.org>
12990
12991 * cli/cli-decode.c (add_alias_cmd): New function.
12992 * command.h (add_alias_cmd): Declare.
12993 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12994 instead call add_alias_cmd.
12995
12996 2017-05-17 Pedro Alves <palves@redhat.com>
12997
12998 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12999 (nat_makefile_frag): ... this. All references updated.
13000 * configure.ac: Likewise.
13001 * configure.nat: Likewise. Enhance comments.
13002 * configure: Regenerate.
13003
13004 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13005
13006 * procfs.c (procfs_create_inferior): Change prototype to match
13007 definition.
13008
13009 2017-05-13 Eli Zaretskii <eliz@gnu.org>
13010
13011 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
13012 C++ compiler warning.
13013
13014 2017-05-12 Tom Tromey <tom@tromey.com>
13015
13016 PR rust/21483:
13017 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
13018 recurse, just call value_struct_elt directly.
13019
13020 2017-05-12 Tom Tromey <tom@tromey.com>
13021
13022 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
13023 OP_RUST_ARRAY>: Fix.
13024
13025 2017-05-12 Tom Tromey <tom@tromey.com>
13026
13027 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
13028
13029 2017-05-09 Yao Qi <yao.qi@linaro.org>
13030
13031 * regcache.c: Include <forward_list>.
13032 (struct regcache_list): Remove.
13033 (current_regcache): Update.
13034 (get_thread_arch_aspace_regcache): Update for std::forward_list.
13035 (regcache_thread_ptid_changed): Likewise.
13036 (registers_changed_ptid): Likewise.
13037 (current_regcache_size): Likewise.
13038
13039 2017-05-09 Yao Qi <yao.qi@linaro.org>
13040
13041 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
13042 (current_regcache_size): New function.
13043 (current_regcache_test): New function.
13044 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
13045
13046 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13047
13048 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
13049 (print_gp_register_row): Use get_frame_register_value.
13050
13051 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13052
13053 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
13054 (mips_supply_fpregset): Likewise.
13055 (mips64_supply_gregset): Likewise.
13056
13057 2017-05-08 Alan Hayward <alan.hayward@arm.com>
13058
13059 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
13060 regcache->raw_supply_zeroed.
13061
13062 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
13063
13064 * configure.nat: Rearrange 'case' statements to match
13065 host before cpu.
13066
13067 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
13068
13069 * Makefile.in: Remove "@host_makefile_frag@". Add variables
13070 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
13071 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
13072 "@nat_extra_makefile_frag@".
13073 (Makefile): Remove dependency on "@frags@".
13074 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
13075 (data-directory/Makefile): Likewise.
13076 * config/aarch64/linux.mh: Deleted; moved contents to
13077 "gdb/configure.nat".
13078 * config/alpha/alpha-linux.mh: Likewise.
13079 * config/alpha/nbsd.mh: Likewise.
13080 * config/arm/linux.mh: Likewise.
13081 * config/arm/nbsdelf.mh: Likewise.
13082 * config/i386/cygwin.mh: Likewise.
13083 * config/i386/cygwin64.mh: Likewise.
13084 * config/i386/darwin.mh: Likewise.
13085 * config/i386/fbsd.mh: Likewise.
13086 * config/i386/fbsd64.mh: Likewise.
13087 * config/i386/go32.mh: Likewise.
13088 * config/i386/i386gnu.mh: Likewise.
13089 * config/i386/i386sol2.mh: Likewise.
13090 * config/i386/linux.mh: Likewise.
13091 * config/i386/linux64.mh: Likewise.
13092 * config/i386/mingw.mh: Likewise.
13093 * config/i386/mingw64.mh: Likewise.
13094 * config/i386/nbsd64.mh: Likewise.
13095 * config/i386/nbsdelf.mh: Likewise.
13096 * config/i386/nto.mh: Likewise.
13097 * config/i386/obsd.mh: Likewise.
13098 * config/i386/obsd64.mh: Likewise.
13099 * config/i386/sol2-64.mh: Likewise.
13100 * config/ia64/linux.mh: Likewise.
13101 * config/m32r/linux.mh: Likewise.
13102 * config/m68k/linux.mh: Likewise.
13103 * config/m68k/nbsdelf.mh: Likewise.
13104 * config/m68k/obsd.mh: Likewise.
13105 * config/m88k/obsd.mh: Likewise.
13106 * config/mips/fbsd.mh: Likewise.
13107 * config/mips/linux.mh: Likewise.
13108 * config/mips/nbsd.mh: Likewise.
13109 * config/mips/obsd64.mh: Likewise.
13110 * config/pa/linux.mh: Likewise.
13111 * config/pa/nbsd.mh: Likewise.
13112 * config/pa/obsd.mh: Likewise.
13113 * config/powerpc/aix.mh: Likewise.
13114 * config/powerpc/fbsd.mh: Likewise.
13115 * config/powerpc/linux.mh: Likewise.
13116 * config/powerpc/nbsd.mh: Likewise.
13117 * config/powerpc/obsd.mh: Likewise.
13118 * config/powerpc/ppc64-linux.mh: Likewise.
13119 * config/powerpc/spu-linux.mh: Likewise.
13120 * config/s390/linux.mh: Likewise.
13121 * config/sh/nbsd.mh: Likewise.
13122 * config/sparc/fbsd.mh: Likewise.
13123 * config/sparc/linux.mh: Likewise.
13124 * config/sparc/linux64.mh: Likewise.
13125 * config/sparc/nbsd64.mh: Likewise.
13126 * config/sparc/nbsdelf.mh: Likewise.
13127 * config/sparc/obsd64.mh: Likewise.
13128 * config/sparc/sol2.mh: Likewise.
13129 * config/tilegx/linux.mh: Likewise.
13130 * config/vax/nbsdelf.mh: Likewise.
13131 * config/vax/obsd.mh: Likewise.
13132 * config/xtensa/linux.mh: Likewise.
13133 * config/i386/i386gnu.mn: New file, with excerpts from
13134 "config/i386/i386gnu.mh".
13135 * configure: Regenerate.
13136 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
13137 *.mh files under "gdb/config".
13138 * configure.nat: New file, with contents from the
13139 "gdb/config/*/*.mh" files.
13140
13141 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
13142
13143 * btrace.c (btrace_clear): Free insn vector.
13144
13145 2017-05-05 Pedro Alves <palves@redhat.com>
13146
13147 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
13148 * configure: Regenerate.
13149
13150 2017-05-04 Pedro Alves <palves@redhat.com>
13151
13152 * Makefile.in (SFILES): Add progspace-and-thread.c.
13153 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
13154 (COMMON_OBS): Add progspace-and-thread.o.
13155 * breakpoint.c: Include "progspace-and-thread.h".
13156 (update_inserted_breakpoint_locations)
13157 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
13158 Use scoped_restore_current_pspace_and_thread.
13159 (create_std_terminate_master_breakpoint): Use
13160 scoped_restore_current_program_space.
13161 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
13162 (print_breakpoint_location): Use
13163 scoped_restore_current_program_space.
13164 (bp_loc_is_permanent): Use
13165 scoped_restore_current_pspace_and_thread.
13166 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
13167 (download_tracepoint_locations): Use
13168 scoped_restore_current_pspace_and_thread.
13169 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
13170 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
13171 (enum step_over_calls_kind): Moved from inferior.h.
13172 (class scoped_restore_current_thread): New class.
13173 * gdbthread.h (make_cleanup_restore_current_thread): Delete
13174 declaration.
13175 (scoped_restore_current_thread): New class.
13176 * infcmd.c: Include "common/gdb_optional.h".
13177 (continue_1, proceed_after_attach): Use
13178 scoped_restore_current_thread.
13179 (notice_new_inferior): Use scoped_restore_current_thread.
13180 * inferior.c: Include "progspace-and-thread.h".
13181 (restore_inferior, save_current_inferior): Delete.
13182 (add_inferior_command, clone_inferior_command): Use
13183 scoped_restore_current_pspace_and_thread.
13184 * inferior.h (scoped_restore_current_inferior): New class.
13185 * infrun.c: Include "progspace-and-thread.h" and
13186 "common/gdb_optional.h".
13187 (follow_fork_inferior): Use
13188 scoped_restore_current_pspace_and_thread.
13189 (scoped_restore_exited_inferior): New class.
13190 (handle_vfork_child_exec_or_exit): Use
13191 scoped_restore_exited_inferior,
13192 scoped_restore_current_pspace_and_thread,
13193 scoped_restore_current_thread and scoped_restore.
13194 (fetch_inferior_event): Use scoped_restore_current_thread.
13195 * linespec.c (decode_line_full, decode_line_1): Use
13196 scoped_restore_current_program_space.
13197 * mi/mi-main.c: Include "progspace-and-thread.h".
13198 (exec_continue): Use scoped_restore_current_thread.
13199 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
13200 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
13201 * proc-service.c (ps_pglobal_lookup): Use
13202 scoped_restore_current_program_space.
13203 * progspace-and-thread.c: New file.
13204 * progspace-and-thread.h: New file.
13205 * progspace.c (release_program_space, clone_program_space): Use
13206 scoped_restore_current_program_space.
13207 (restore_program_space, save_current_program_space)
13208 (save_current_space_and_thread): Delete.
13209 (switch_to_program_space_and_thread): Moved to
13210 progspace-and-thread.c.
13211 * progspace.h (save_current_program_space)
13212 (save_current_space_and_thread): Delete declarations.
13213 (scoped_restore_current_program_space): New class.
13214 * remote.c (remote_btrace_maybe_reopen): Use
13215 scoped_restore_current_thread.
13216 * symtab.c: Include "progspace-and-thread.h".
13217 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
13218 * thread.c (print_thread_info_1): Use
13219 scoped_restore_current_thread.
13220 (struct current_thread_cleanup): Delete.
13221 (do_restore_current_thread_cleanup)
13222 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
13223 (scoped_restore_current_thread::~scoped_restore_current_thread):
13224 ... this new dtor.
13225 (make_cleanup_restore_current_thread): Rename/convert to ...
13226 (scoped_restore_current_thread::scoped_restore_current_thread):
13227 ... this new ctor.
13228 (thread_apply_all_command): Use scoped_restore_current_thread.
13229 (thread_apply_command): Use scoped_restore_current_thread.
13230 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13231 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13232
13233 2017-05-04 Pedro Alves <palves@redhat.com>
13234
13235 * thread.c (make_cleanup_restore_current_thread): Move
13236 find_thread_ptid call before the is_stopped call. Assert that the
13237 thread is found. Replace is_stopped call by checking the thread's
13238 state directly. Remove unnecessary NULL-thread check.
13239
13240 2017-05-04 Pedro Alves <palves@redhat.com>
13241
13242 * corelow.c (thread_section_name): New class.
13243 (get_core_register_section, get_core_siginfo): Use it.
13244
13245 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13246
13247 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13248 (get_core_register_section): Remove xfree of NULL pointer.
13249
13250 2017-05-03 Alan Hayward <alan.hayward@arm.com>
13251
13252 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13253 * regcache.c (regcache::raw_supply_zeroed): New function.
13254 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13255
13256 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13257
13258 * gdbarch.sh: Remove commented out definition of
13259 TARGET_CHAR_BIT.
13260 * gdbarch.h: Re-generate.
13261
13262 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13263
13264 * configure: Regenerate.
13265
13266 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13267
13268 * solib-target.c (solib_target_relocate_section_addresses):
13269 Remove num_section_bases, num_bases, segment_bases variables.
13270
13271 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13272
13273 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13274
13275 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13276
13277 * solib-target.c: Include <vector>
13278 (struct lm_info_target) <~lm_info_target>: Remove.
13279 <segment_bases, section_bases>: Change type to
13280 std::vector<CORE_ADDR>.
13281 (library_list_start_segment, library_list_start_section,
13282 library_list_end_library,
13283 solib_target_relocate_section_addresses): Adjust.
13284
13285 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13286
13287 * gdbarch.sh (software_single_step): Change return type to
13288 std::vector<CORE_ADDR>.
13289 * gdbarch.c, gdbarch.h: Re-generate.
13290 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13291 Adjust.
13292 (arm_deal_with_atomic_sequence_raw): Adjust.
13293 (thumb_get_next_pcs_raw): Adjust.
13294 (arm_get_next_pcs_raw): Adjust.
13295 (arm_get_next_pcs): Adjust.
13296 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13297 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13298 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13299 (alpha_software_single_step): Adjust.
13300 * alpha-tdep.h (alpha_software_single_step): Adjust.
13301 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13302 * arm-tdep.c (arm_software_single_step): Adjust.
13303 (arm_breakpoint_kind_from_current_state): Adjust.
13304 * arm-tdep.h (arm_software_single_step): Adjust.
13305 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13306 * cris-tdep.c (cris_software_single_step): Adjust.
13307 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13308 (micromips_deal_with_atomic_sequence): Adjust.
13309 (deal_with_atomic_sequence): Adjust.
13310 (mips_software_single_step): Adjust.
13311 * mips-tdep.h (mips_software_single_step): Adjust.
13312 * moxie-tdep.c (moxie_software_single_step): Adjust.
13313 * nios2-tdep.c (nios2_software_single_step): Adjust.
13314 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13315 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13316 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13317 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13318 * sparc-tdep.c (sparc_software_single_step): Adjust.
13319 * spu-tdep.c (spu_software_single_step): Adjust.
13320 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13321
13322 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13323
13324 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13325 * gdbarch.h: Re-generate.
13326
13327 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13328
13329 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13330 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13331 * python/py-instruction.c, python/py-instruction.h: New file.
13332 * python/py-record.c: Add py-instruction.h include.
13333 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13334 gdb.RecordInstruction.
13335 * python/python-internal.h: Add gdbpy_initialize_instruction
13336 declaration.
13337 * python/python.c (do_start_initialization): Add
13338 gdbpy_initialize_instruction.
13339
13340 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13341
13342 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13343 Remove.
13344 (btrace_func_from_recpy_func): New function.
13345 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13346 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13347 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13348 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13349 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13350 Also, use new helper functions.
13351 (btpy_list_item): Use new helper functions.
13352 (recpy_bt_function_call_history): Use new type name.
13353 (btpy_call_getset): Remove.
13354 (gdbpy_initialize_btrace): Remove code to initialize
13355 gdb.BtraceFunctionCall.
13356 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13357 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13358 recpy_bt_func_prev, recpy_bt_func_next): New export.
13359 * python/py-record.c (recpy_func_type): New static object.
13360 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13361 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13362 recpy_func_next): New function.
13363 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13364 (recpy_func_getset): New static object.
13365 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13366 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13367
13368 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13369
13370 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13371 (btpy_object, btpy_insn_type, btpy_new): Remove.
13372 (btpy_list_object): Use gdb.RecordInstruction type instead of
13373 gdb.BtraceInstruction type.
13374 (btrace_insn_from_recpy_insn): New function.
13375 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13376 btpy_new.
13377 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13378 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13379 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13380 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13381 instead of btpy_object.
13382 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13383 btpy_insn_data, btpy_insn_decode): Rename to ...
13384 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13385 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13386 recpy_bt_insn_decode): This. Also, use new helper functions.
13387 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13388 recpy_insn_type.
13389 (btpy_insn_getset): Remove.
13390 (gdbpy_initialize_btrace): Remove code to initialize
13391 gdb.BtraceInstruction. Use recpy_element_object.
13392 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13393 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13394 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13395 * python/py-record.c (recpy_insn_type): New static object.
13396 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13397 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13398 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13399 New function.
13400 (recpy_insn_getset): New static object.
13401 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13402 * python/py-record.h (recpy_element_object): New typedef.
13403 (recpy_insn_type, recpy_insn_new): New export.
13404
13405 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13406
13407 * py-record-btrace.c (btpy_insn_new): Removed.
13408 (btpy_insn_or_gap_new): New function.
13409 (btpy_insn_error): Removed.
13410 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13411 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13412 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13413 btpy_insn_or_gap_new instead of btpy_insn_new.
13414 (btpy_insn_getset): Remove btpy_insn_error.
13415 * py-record.c (recpy_gap_type): New static object.
13416 (recpy_gap_object): New typedef.
13417 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13418 recpy_gap_reason_string): New function.
13419 (recpy_gap_getset): New static object.
13420 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13421 * py-record.h (recpy_gap_new): New export.
13422
13423 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13424
13425 * python/py-record.c (recpy_ptid): Remove.
13426 (recpy_record_getset): Remove recpy_ptid.
13427
13428 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13429
13430 * btrace.c (btrace_fetch): Set inferior_ptid.
13431 * python/py-record-btrace.c: Add "py-record.h" include.
13432 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13433 recpy_bt_end, recpy_bt_instruction_history,
13434 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13435 in gdb.Record object instead of current ptid.
13436 * python/py-record.c: Include new "py-record.h" file.
13437 (recpy_record_object): Moved to py-record.h.
13438 * python/py-record.h: New file.
13439
13440 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13441
13442 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13443 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13444 indentation.
13445
13446 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13447
13448 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13449 the past maintainers section.
13450
13451 2017-04-28 Yao Qi <yao.qi@linaro.org>
13452
13453 * infcmd.c (get_return_value): Use regcache ctor, and remove
13454 cleanup.
13455
13456 2017-04-28 Yao Qi <yao.qi@linaro.org>
13457 Pedro Alves <palves@redhat.com>
13458
13459 * regcache.c (regcache::regcache): New tag dispatch ctor.
13460 (do_cooked_read): Moved above.
13461 (regcache_dup): Use the tag dispatch ctor..
13462 * regcache.h (regcache): Declare ctor, delete copy ctor and
13463 assignment operator, remove friend regcache_dup.
13464
13465 2017-04-28 Yao Qi <yao.qi@linaro.org>
13466
13467 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13468 call method save instead of regcache_cpy.
13469 * regcache.h (struct regcache): Make regcache_dup a friend.
13470
13471 2017-04-28 Yao Qi <yao.qi@linaro.org>
13472
13473 * regcache.c (struct regcache): Move to regcache.h
13474 (regcache::arch): New method.
13475 (regcache_get_ptid): Update.
13476 (get_regcache_arch): Call arch method.
13477 (get_regcache_aspace): Call method aspace.
13478 (register_buffer): Change it to method.
13479 (regcache_save): Change it to regcache::save.
13480 (regcache_restore): Likewise.
13481 (regcache_cpy_no_passthrough): Remove the declaration.
13482 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13483 (regcache_cpy_no_passthrough): Change it to method
13484 cpy_no_passthrough.
13485 (regcache_register_status): Change it to method
13486 get_register_status.
13487 (regcache_invalidate): Change it to method invalidate.
13488 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13489 (regcache_raw_update): Change it to method raw_update.
13490 (regcache_raw_read): Likewise.
13491 (regcache_raw_read_signed): Likewise.
13492 (regcache_raw_read_unsigned): Likewise.
13493 (regcache_raw_write_signed): Likewise.
13494 (regcache_raw_write_unsigned): Likewise.
13495 (regcache_cooked_read): Likewise.
13496 (regcache_cooked_read_value): Likewise.
13497 (regcache_cooked_read_signed): Likewise.
13498 (regcache_cooked_read_unsigned): Likewise.
13499 (regcache_cooked_write_signed): Likewise.
13500 (regcache_cooked_write_unsigned): Likewise.
13501 (regcache_raw_set_cached_value): Likewise.
13502 (regcache_raw_write): Likewise.
13503 (regcache_cooked_write): Likewise.
13504 (regcache_xfer_part): Likewise.
13505 (regcache_raw_read_part): Likewise.
13506 (regcache_raw_write_part): Likewise.
13507 (regcache_cooked_read_part): Likewise.
13508 (regcache_cooked_write_part): Likewise.
13509 (regcache_raw_supply): Likewise.
13510 (regcache_raw_collect): Likewise.
13511 (regcache_transfer_regset): Likewise.
13512 (regcache_supply_regset): Likewise.
13513 (regcache_collect_regset): Likewise.
13514 (regcache_debug_print_register): Likewise.
13515 (enum regcache_dump_what): Move it to regcache.h.
13516 (regcache_dump): Change it to method dump.
13517 * regcache.h (enum regcache_dump_what): New.
13518 (class regcache): New.
13519 * target.c (target_fetch_registers): Call method
13520 debug_print_register.
13521 (target_store_registers): Likewise.
13522
13523 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13524
13525 * windows-nat.c (struct lm_info_windows): Initialize field.
13526 (windows_make_so): Allocate lm_info_windows with new.
13527 (windows_free_so): Free lm_info_windows with delete.
13528
13529 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13530
13531 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13532 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13533 cleanup.
13534 (darwin_free_so): Free lm_info_darwin with delete.
13535
13536 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13537
13538 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13539 <l_addr_p>: Change type to bool.
13540 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13541 (svr4_free_so): Free lm_info_svr4 with delete.
13542 (svr4_copy_library_list): Replace memcpy with call to copy
13543 constructor.
13544 (library_list_start_library, svr4_default_sos): Allocate
13545 lm_info_svr4 with new.
13546
13547 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13548
13549 * solib-target.c (struct lm_info_target): Add destructor,
13550 initialize fields.
13551 <name>: Change type to std::string.
13552 (library_list_start_library): Allocate lm_info_target with new.
13553 (solib_target_free_library_list): Free lm_info_target with
13554 delete.
13555 (solib_target_current_sos): Adapt to std::string.
13556 (solib_target_free_so): Free lm_info_target with delete.
13557
13558 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13559
13560 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13561 fields.
13562 (frv_current_sos): Allocate lm_info_frv with new.
13563 (frv_relocate_main_executable): Free lm_info_frv with delete,
13564 allocate with new.
13565 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13566
13567 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13568
13569 * solib-frv.c (struct lm_info_frv): Fix indentation.
13570
13571 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13572
13573 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13574 map field.
13575 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13576 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13577 and allocate with new.
13578 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13579
13580 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13581
13582 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13583 <filename, member_name>: Change type to std::string.
13584 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13585 (library_list_start_library): Allocate lm_info_aix with new.
13586 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13587 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13588 with copy constructor.
13589
13590 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13591
13592 * solist.h (struct lm_info): Remove.
13593 (struct lm_info_base): New class.
13594 (struct so_list) <lm_info>: Change type to lm_info_base *.
13595 * nto-tdep.c (struct lm_info): Remove.
13596 (lm_addr): Adjust.
13597 * solib-aix.c (struct lm_info): Rename to ...
13598 (struct lm_info_aix): ... this. Extend lm_info_base.
13599 (lm_info_p): Rename to ...
13600 (lm_info_aix_p): ... this, and adjust.
13601 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13602 solib_aix_parse_libraries, library_list_start_library,
13603 solib_aix_free_library_list, solib_aix_parse_libraries,
13604 solib_aix_get_library_list,
13605 solib_aix_relocate_section_addresses, solib_aix_free_so,
13606 solib_aix_get_section_offsets,
13607 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13608 Adjust.
13609 (struct solib_aix_inferior_data) <library_list>: Adjust.
13610 * solib-darwin.c (struct lm_info): Rename to ...
13611 (struct lm_info_darwin): ... this. Extend lm_info_base.
13612 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13613 * solib-dsbt.c (struct lm_info): Rename to ...
13614 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13615 (struct dsbt_info) <main_executable_lm_info): Adjust.
13616 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13617 dsbt_relocate_section_addresses): Adjust.
13618 * solib-frv.c (struct lm_info): Rename to ...
13619 (struct lm_info_frv): ... this. Extend lm_info_base.
13620 (main_executable_lm_info): Adjust.
13621 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13622 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13623 find_canonical_descriptor_in_load_object,
13624 frv_fdpic_find_canonical_descriptor): Adjust.
13625 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13626 to lm_info_svr4.
13627 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13628 svr4_clear_so, svr4_copy_library_list,
13629 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13630 svr4_current_sos, svr4_fetch_objfile_link_map,
13631 solist_update_incremental): Adjust.
13632 * solib-svr4.h (struct lm_info_svr4): Move here from
13633 solib-svr4.c.
13634 * solib-target.c (struct lm_info): Rename to ...
13635 (struct lm_info_target): ... this. Extend lm_info_base.
13636 (lm_info_p): Rename to ...
13637 (lm_info_target_p): ... this.
13638 (solib_target_parse_libraries, library_list_start_segment,
13639 library_list_start_section, library_list_start_library,
13640 library_list_end_library, solib_target_free_library_list,
13641 solib_target_current_sos, solib_target_free_so,
13642 solib_target_relocate_section_addresses): Adjust.
13643 * windows-nat.c (struct lm_info): Rename to ...
13644 (struct lm_info_windows): ... this. Extend lm_info_base.
13645 (windows_make_so, handle_load_dll, handle_unload_dll,
13646 windows_xfer_shared_libraries): Adjust.
13647
13648 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13649
13650 * solib-darwin.c (struct darwin_so_list): Remove.
13651 (darwin_current_sos): Allocate an so_list object instead of a
13652 darwin_so_list, separately allocate an lm_info object.
13653 (darwin_free_so): Free lm_info.
13654
13655 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13656
13657 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13658 with fprintf_filtered.
13659
13660 2017-04-28 Yao Qi <yao.qi@linaro.org>
13661
13662 * regcache.c (regcache::regcache): New function.
13663 (regcache::~regcache): New function.
13664 (regcache_xmalloc_1): Remove.
13665 (regcache_xmalloc): Call new regcache.
13666 (regcache_xfree): Call delete regcache.
13667 (get_thread_arch_aspace_regcache): Call new regcache.
13668
13669 2017-04-28 Yao Qi <yao.qi@linaro.org>
13670
13671 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13672 lwp instead of ptid_get_lwp.
13673
13674 2017-04-28 Yao Qi <yao.qi@linaro.org>
13675
13676 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13677 lwp_info instead of getting from inferior_ptid.
13678
13679 2017-04-27 Keith Seitz <keiths@redhat.com>
13680
13681 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13682 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13683 (CV_CONVERSION_BADNESS): Define.
13684 (rank_one_type): Remove overly restrictive rvalue reference
13685 rank checks.
13686 Add cv-qualifier checks and subranks for type equality.
13687 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13688 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13689 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13690
13691 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13692
13693 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13694 count when creating the object.
13695
13696 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13697 Ulrich Weigand <uweigand@de.ibm.com>
13698
13699 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13700 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13701 is used in AIX.
13702 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13703 (process_xcoff_symbol): Likewise.
13704 (scan_xcoff_symtab): Likewise.
13705
13706 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13707
13708 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13709 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13710 (ia64_access_reg): Use get_frame_register_unsigned.
13711 (ia64_access_rse_reg): Likewise.
13712 (ia64_libunwind_frame_prev_register): Likewise.
13713
13714 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13715
13716 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13717 * gdbarch.c: Regenerated.
13718 * gdbarch.h: Regenerated.
13719 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13720 visibility external.
13721 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13722 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13723 (enum cfa_how_kind): Move to ...
13724 (struct dwarf2_frame_state_reg_info): Likewise.
13725 (struct dwarf2_frame_state): Likewise.
13726 * dwarf2-frame.h: ... here.
13727 (dwarf2_frame_state_alloc_regs): New declaration.
13728 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13729 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13730
13731 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13732
13733 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13734 regcache_raw_read_unsigned.
13735 (xtensa_pseudo_register_write): Likewise.
13736
13737 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13738
13739 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13740 (nds32_pseudo_register_write): Likewise.
13741
13742 2017-04-25 Yao Qi <yao.qi@linaro.org>
13743
13744 * regcache.c (struct regcache) <readonly_p>: Change its type
13745 to bool.
13746 (regcache_xmalloc_1): Update parameter type and callers update.
13747
13748 2017-04-25 Yao Qi <yao.qi@linaro.org>
13749
13750 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13751 set_gdbarch_wchar_bit.
13752 * arm-tdep.c (arm_gdbarch_init): Likewise.
13753
13754 2017-04-25 Pedro Alves <palves@redhat.com>
13755
13756 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13757 (BothAreRelocatable, memcopy, memmove): Don't define.
13758 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13759 macros.
13760
13761 2017-04-25 Pedro Alves <palves@redhat.com>
13762
13763 * common/common-defs.h: Include "common/poison.h".
13764 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13765 and adjust.
13766 * common/poison.h: New file.
13767 * common/traits.h: Include <type_traits>.
13768 (Not, Or, Requires): New, moved from common/function-view.h.
13769
13770 2017-04-25 Pedro Alves <palves@redhat.com>
13771
13772 * breakpoint.h (struct breakpoint): In-class initialize all
13773 fields. Make boolean fields "bool".
13774 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13775 memset call and initializations no longer necessary.
13776
13777 2017-04-25 Pedro Alves <palves@redhat.com>
13778
13779 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13780 reference.
13781 (pt_btrace_insn): New function.
13782 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13783
13784 2017-04-25 Pedro Alves <palves@redhat.com>
13785
13786 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13787 "base" field and inherit from "bp_location" instead. Add
13788 non-default ctor.
13789 (allocate_location_exception): Use new non-default ctor.
13790 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13791 (init_bp_location): Convert to ...
13792 (bp_location::bp_location): ... this new ctor, and remove memset
13793 call.
13794 (base_breakpoint_allocate_location): Use the new non-default ctor.
13795 * breakpoint.h (bp_location): Now a class. Declare default and
13796 non-default ctors. In-class initialize all members.
13797 (init_bp_location): Remove declaration.
13798
13799 2017-04-25 Pedro Alves <palves@redhat.com>
13800
13801 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13802 assignment operator.
13803
13804 2017-04-24 Yao Qi <yao.qi@linaro.org>
13805
13806 * doublest.c (convert_doublest_to_floatformat): Call
13807 floatformat_totalsize_bytes.
13808
13809 2017-04-22 Tom Tromey <tom@tromey.com>
13810
13811 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13812 ui_out_emit_list.
13813 * stack.c (print_frame): Use ui_out_emit_list.
13814 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13815 ui_out_emit_list.
13816 * mi/mi-main.c (print_one_inferior)
13817 (mi_cmd_data_list_register_names)
13818 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13819 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13820 ui_out_emit_list.
13821 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13822 (mi_output_solib_attribs): Use ui_out_emit_list,
13823 ui_out_emit_tuple.
13824 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13825 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13826 (mi_cmd_stack_list_args, list_args_or_locals): Use
13827 ui_out_emit_list.
13828 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13829 * breakpoint.c (print_solib_event, output_thread_groups): Use
13830 ui_out_emit_list.
13831
13832 2017-04-22 Tom Tromey <tom@tromey.com>
13833
13834 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13835 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13836 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13837
13838 2017-04-22 Tom Tromey <tom@tromey.com>
13839
13840 * tracepoint.c (tvariables_info_1)
13841 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13842
13843 2017-04-22 Tom Tromey <tom@tromey.com>
13844
13845 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13846 annotate_arg_emitter.
13847 * breakpoint.c (print_mention_watchpoint)
13848 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13849 * annotate.h (struct annotate_arg_emitter): New.
13850
13851 2017-04-22 Tom Tromey <tom@tromey.com>
13852
13853 * record-btrace.c (record_btrace_insn_history)
13854 (record_btrace_insn_history_range, record_btrace_call_history)
13855 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13856 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13857 ui_out_emit_tuple.
13858 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13859 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13860 * skip.c (skip_info): Use ui_out_emit_tuple.
13861 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13862 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13863 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13864 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13865 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13866 ui_out_emit_tuple.
13867 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13868 (output_register, mi_cmd_data_read_memory)
13869 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13870 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13871 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13872 Use ui_out_emit_tuple.
13873 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13874 ui_out_emit_tuple.
13875 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13876 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13877 * linux-thread-db.c (info_auto_load_libthread_db): Use
13878 ui_out_emit_tuple.
13879 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13880 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13881 * disasm.c (do_mixed_source_and_assembly_deprecated)
13882 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13883 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13884 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13885 * breakpoint.c (print_one_breakpoint_location)
13886 (print_one_breakpoint): Use ui_out_emit_tuple.
13887 * auto-load.c (print_script, info_auto_load_cmd): Use
13888 ui_out_emit_tuple.
13889 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13890
13891 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13892
13893 * thread.c (print_thread_info_1): Remove dead code.
13894
13895 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13896
13897 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13898 GDB_SELF_TEST.
13899 * arm-tdep.c (selftests::arm_record_test): Likewise.
13900
13901 2017-04-21 Yao Qi <yao.qi@linaro.org>
13902
13903 * regcache.c (regcache_restore): Remove argument 2. Replace
13904 argument 3 with regcache. Get register status from
13905 src->register_status and get register contents from
13906 register_buffer (src, regnum).
13907 (regcache_cpy): Update.
13908
13909 2017-04-19 Pedro Alves <palves@redhat.com>
13910
13911 * gdbthread.h (thread): Add missing closing parenthesis in
13912 comment.
13913
13914 2017-04-19 Pedro Alves <palves@redhat.com>
13915
13916 * common/refcounted-object.h: New file.
13917 * gdbthread.h: Include "common/refcounted-object.h".
13918 (thread_info): Inherit from refcounted_object and add comments.
13919 (thread_info::incref, thread_info::decref)
13920 (thread_info::m_refcount): Delete.
13921 (thread_info::deletable): Use the refcounted_object::refcount()
13922 method.
13923 * inferior.c (current_inferior_): Add comment.
13924 (set_current_inferior): Increment/decrement refcounts.
13925 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13926 not-deletable instead of comparing with the current inferior.
13927 (initialize_inferiors): Increment the initial inferior's refcount.
13928 * inferior.h (struct inferior): Forward declare.
13929 Include "common/refcounted-object.h".
13930 (current_inferior, set_current_inferior): Move declaration to
13931 before struct inferior's definition, and fix comment.
13932 (inferior): Inherit from refcounted_object. Add comments.
13933 * thread.c (switch_to_thread_no_regs): Reference the thread's
13934 inferior pointer directly instead of doing a ptid lookup.
13935 (switch_to_no_thread): New function.
13936 (switch_to_thread(thread_info *)): New function, factored out
13937 from ...
13938 (switch_to_thread(ptid_t)): ... this.
13939 (restore_current_thread): Delete.
13940 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13941 fields, and add 'inf' field.
13942 (do_restore_current_thread_cleanup): Check whether old->inf is
13943 alive instead of looking up an inferior by ptid. Use
13944 switch_to_thread and switch_to_no_thread.
13945 (restore_current_thread_cleanup_dtor): Use old->inf directly
13946 instead of lookup up an inferior by id. Decref the inferior.
13947 Don't restore 'removable'.
13948 (make_cleanup_restore_current_thread): Same the inferior pointer
13949 in old, instead of the inferior number. Incref the inferior.
13950 Don't save/clear 'removable'.
13951
13952 2017-04-19 Pedro Alves <palves@redhat.com>
13953
13954 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13955 unittests/scoped_restore-selftests.c.
13956 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13957 * common/scoped_restore.h (scoped_restore_base): Make "class".
13958 (scoped_restore_base::release): New public method.
13959 (scoped_restore_base::scoped_restore_base): New protected ctor.
13960 (scoped_restore_base::m_saved_var): New protected field.
13961 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13962 scoped_restore_base base class instead of m_saved_var directly.
13963 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13964 (scoped_restore_tmpl::scoped_restore_tmpl(const
13965 scoped_restore_tmpl<T>&)): Likewise.
13966 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13967 method.
13968 (scoped_restore_tmpl::saved_var): New method.
13969 (scoped_restore_tmpl::m_saved_var): Delete.
13970 * inferior.h (inferior::detaching): Now a bool.
13971 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13972 cleanup.
13973 * unittests/scoped_restore-selftests.c: New file.
13974
13975 2017-04-19 Pedro Alves <palves@redhat.com>
13976
13977 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13978 Re-sort in alphabetic order.
13979
13980 2017-04-18 Pedro Alves <palves@redhat.com>
13981
13982 * xml-support.c (obstack_xml_printf): Delete.
13983 * xml-support.h (obstack_xml_printf): Delete.
13984
13985 2017-04-18 Pedro Alves <palves@redhat.com>
13986
13987 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13988 vdebug, verror, body_text, start_element, end_element, name,
13989 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13990 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13991 is_xinclude>: Make private and add m_ prefix.
13992 (gdb_xml_parser::body_text): New method, based on ...
13993 (gdb_xml_body_text): ... this. Adjust.
13994 (gdb_xml_parser::vdebug): New method, based on ...
13995 (gdb_xml_debug): ... this. Adjust.
13996 (gdb_xml_parser::verror): New method, based on ...
13997 (gdb_xml_error): ... this. Adjust.
13998 (gdb_xml_parser::start_element): New method, based on ...
13999 (gdb_xml_start_element): ... this. Adjust.
14000 (gdb_xml_start_element_wrapper): Defer to
14001 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
14002 (gdb_xml_parser::end_element): New method, based on ...
14003 (gdb_xml_end_element_wrapper): ... this. Adjust.
14004 (gdb_xml_parser::~gdb_xml_parser): Adjust.
14005 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
14006 (gdb_xml_parser::use_dtd): New method, based on ...
14007 (gdb_xml_use_dtd): ... this. Adjust.
14008 (gdb_xml_parser::parse): New method, based on ...
14009 (gdb_xml_parse): ... this. Adjust.
14010 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
14011 (xinclude_start_include): Adjust to call the parser's name method.
14012 (xml_xinclude_default, xml_xinclude_start_doctype)
14013 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
14014 method.
14015 (xml_process_xincludes): Adjust to call parser methods.
14016 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
14017 declarations.
14018
14019 2017-04-18 Pedro Alves <palves@redhat.com>
14020
14021 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
14022 gdb::optional<std::string>.
14023 * xml-support.c: Include <string>.
14024 (scope_level::scope_level(scope_level &&))
14025 (scope_level::~scope_level): Delete.
14026 (scope_level::body): Now a std::string.
14027 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
14028 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
14029 parameter.
14030 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
14031 (xinclude_parsing_data::output): Now a std::string reference.
14032 (xinclude_start_include): Adjust.
14033 (xml_xinclude_default): Adjust.
14034 (xml_process_xincludes): Add 'output' parameter, and return bool.
14035 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
14036 and return bool.
14037 * xml-tdesc.c: Include <unordered_map> and <string>.
14038 (tdesc_xml_cache): Delete.
14039 (tdesc_xml_cache_s): Delete.
14040 (xml_cache): Now an std::unordered_map.
14041 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
14042 (target_fetch_description_xml): Change return type to
14043 gdb::optional<std::string>, and adjust.
14044 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
14045 (target_fetch_description_xml): Change return type to
14046 gdb::optional<std::string>.
14047
14048 2017-04-18 Pedro Alves <palves@redhat.com>
14049
14050 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14051 unittests/optional-selftests.c.
14052 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
14053 * unittests/optional-selftests.c: New file.
14054 * unittests/optional/assignment/1.cc: New file.
14055 * unittests/optional/assignment/2.cc: New file.
14056 * unittests/optional/assignment/3.cc: New file.
14057 * unittests/optional/assignment/4.cc: New file.
14058 * unittests/optional/assignment/5.cc: New file.
14059 * unittests/optional/assignment/6.cc: New file.
14060 * unittests/optional/assignment/7.cc: New file.
14061 * unittests/optional/cons/copy.cc: New file.
14062 * unittests/optional/cons/default.cc: New file.
14063 * unittests/optional/cons/move.cc: New file.
14064 * unittests/optional/cons/value.cc: New file.
14065 * unittests/optional/in_place.cc: New file.
14066 * unittests/optional/observers/1.cc: New file.
14067 * unittests/optional/observers/2.cc: New file.
14068
14069 2017-04-18 Pedro Alves <palves@redhat.com>
14070
14071 * common/gdb_optional.h: Include common/traits.h.
14072 (in_place_t): New type.
14073 (in_place): New constexpr variable.
14074 (optional::optional): Remove member initialization of
14075 m_instantiated.
14076 (optional::optional(in_place_t...)): New constructor.
14077 (optional::~optional): Use reset.
14078 (optional::optional(const optional&)): New.
14079 (optional::optional(const optional&&)): New.
14080 (optional::optional(T &)): New.
14081 (optional::optional(T &&)): New.
14082 (operator::operator=(const optional &)): New.
14083 (operator::operator=(optional &&)): New.
14084 (operator::operator= (const T &))
14085 (operator::operator= (T &&))
14086 (operator::emplace (Args &&... args)): Return a T&. Use reset.
14087 (operator::reset): New.
14088 (operator::m_instantiated):: Add in-class initializer.
14089 * common/traits.h: Include <type_traits>.
14090 (struct And): New types.
14091
14092 2017-04-18 Pedro Alves <palves@redhat.com>
14093
14094 * xml-support.c: Include <vector>.
14095 (scope_level::scope_level(const gdb_xml_element *))
14096 (scope_level::scope_level(scope_level&&)): New.
14097 (scope_level::~scope_level): New.
14098 (scope_level_s): Delete.
14099 (gdb_xml_parser::scopes): Now a std::vector.
14100 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
14101 Use std::vector.
14102 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
14103 scope cleanup code.
14104 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
14105 of the scopes member. Use std::vector::emplace_back.
14106
14107 2017-04-18 Pedro Alves <palves@redhat.com>
14108
14109 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
14110 a bool.
14111 (gdb_xml_end_element): Change type of first parameter.
14112 (gdb_xml_cleanup): Rename to ...
14113 (gdb_xml_parser::~gdb_xml_parser): ... this.
14114 (gdb_xml_create_parser_and_cleanup): Delete with ...
14115 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
14116 to this new ctor.
14117 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
14118 using gdb_xml_create_parser_and_cleanup.
14119 (xinclude_parsing_data): Add ctor/dtor.
14120 (xml_xinclude_cleanup): Delete.
14121 (xml_process_xincludes): Create a local xinclude_parsing_data
14122 instead of heap-allocating one. Create a local gdb_xml_parser
14123 instead of heap-allocating one with
14124 gdb_xml_create_parser_and_cleanup.
14125
14126 2017-04-18 John Baldwin <jhb@FreeBSD.org>
14127
14128 PR threads/20743
14129 * fbsd-nat.c (resume_one_thread_cb): Remove.
14130 (resume_all_threads_cb): Remove.
14131 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
14132 iterate_over_threads.
14133
14134 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14135
14136 * NEWS: Create a new section for the next release branch.
14137 Rename the section of the current branch, now that it has
14138 been cut.
14139
14140 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14141
14142 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
14143 * version.in: Bump version to 8.0.50.DATE-git.
14144
14145 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
14146
14147 PR gdb/21385
14148 * windows-nat.c (windows_create_inferior): Declare 'allargs'
14149 independently of the host, and fix build breakage on Cygwin.
14150
14151 2017-04-13 Pedro Alves <palves@redhat.com>
14152
14153 * inferior.c (free_inferior): Convert to ...
14154 (inferior::~inferior): ... this dtor.
14155 (inferior::inferior): New ctor, factored out from ...
14156 (add_inferior_silent): ... here. Allocate the inferior with a new
14157 expression.
14158 (delete_inferior): Call delete instead of free_inferior.
14159 * inferior.h (gdb_environ, continuation): Forward declare.
14160 (inferior): Now a class. Add in-class initialization to all
14161 members. Make boolean fields bool, except 'detaching'.
14162 (inferior::inferior): New explicit ctor.
14163 (inferior::~inferior): New.
14164
14165 2017-04-13 Pedro Alves <palves@redhat.com>
14166
14167 * inferior.c (init_inferior_list): Delete.
14168 * inferior.h (init_inferior_list): Delete.
14169
14170 2017-04-13 Pedro Alves <palves@redhat.com>
14171
14172 PR threads/13217
14173 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
14174 (top level): Call it twice, with different thread sets.
14175
14176 2017-04-13 Pedro Alves <palves@redhat.com>
14177
14178 * thread.c: Include <algorithm>.
14179 (thread_array_cleanup): Delete.
14180 (scoped_inc_dec_ref): New class.
14181 (live_threads_count): New function.
14182 (set_thread_refcount): Delete.
14183 (tp_array_compar_ascending): Now a bool.
14184 (tp_array_compar): Convert to a std::sort comparison function.
14185 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
14186 and live_threads_count.
14187
14188 2017-04-13 Pedro Alves <palves@redhat.com>
14189
14190 * infrun.c (follow_fork_inferior): Also switch the current
14191 inferior.
14192
14193 2017-04-13 Pedro Alves <palves@redhat.com>
14194
14195 * breakpoint.c (watch_command_1): Save watchpoint-frame info
14196 before calling create_internal_breakpoint.
14197
14198 2017-04-13 Pedro Alves <palves@redhat.com>
14199
14200 * fork-child.c (execv_argv): New class.
14201 (breakup_args): Refactored as ...
14202 (execv_argv::init_for_no_shell): .. this method of execv_argv.
14203 Copy arguments to storage and replace separators with NULL
14204 terminators in place.
14205 (escape_bang_in_quoted_argument): Adjust to return bool.
14206 (execv_argv::execv_argv): New ctor.
14207 (execv_argv::init_for_shell): New method, factored out from
14208 fork_inferior. Don't strdup strings into the vector.
14209 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
14210 Remove free_vector_argv call.
14211
14212 2017-04-13 Yao Qi <yao.qi@linaro.org>
14213
14214 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
14215 tdep->rx_psw_type.
14216
14217 2017-04-13 Yao Qi <yao.qi@linaro.org>
14218
14219 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
14220 * rx-tdep.c (rx_gdbarch_init): Likewise.
14221
14222 2017-04-13 Pedro Alves <palves@redhat.com>
14223
14224 * breakpoint.h (struct breakpoint): Reindent.
14225
14226 2017-04-13 Pedro Alves <palves@redhat.com>
14227
14228 * breakpoint.c (bp_location): Rename to ...
14229 (bp_locations): ... this. All references updated.
14230 (bp_location_count): Rename to ...
14231 (bp_locations_count): ... this. All references updated.
14232 (bp_location_placed_address_before_address_max): Rename to ...
14233 (bp_locations_placed_address_before_address_max): ... this. All
14234 references updated.
14235 (bp_location_shadow_len_after_address_max): Rename to ...
14236 (bp_locations_shadow_len_after_address_max): ... this. All
14237 references updated.
14238 (bp_location_compare_addrs): Rename to ...
14239 (bp_locations_compare_addrs): ... this. All references updated.
14240 (bp_location_compare):Rename to ...
14241 (bp_locations_compare): ... this. All references updated.
14242 (bp_location_target_extensions_update): Rename to ...
14243 (bp_locations_target_extensions_update): ... this. All references
14244 updated.
14245
14246 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14247
14248 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14249 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14250 'sgtty.h'.
14251 * common/gdb_termios.h: New file, with parts of "terminal.h".
14252 * inflow.c: Include "gdb_termios.h".
14253 * ser-unix.c: Include "gdb_termios.h".
14254 * terminal.h: Move terminal-related defines to
14255 "common/gdb_termios.h".
14256
14257 2017-04-12 Tom Tromey <tom@tromey.com>
14258
14259 * probe.c (parse_probes): Update.
14260 * location.h (delete_event_location): Don't declare.
14261 (event_location_deleter::operator()): Update.
14262 * location.c (event_location_deleter::operator()): Rename from
14263 delete_event_location.
14264 * linespec.h (linespec_result) <location>: Change type to
14265 event_location_up.
14266 * linespec.c (canonicalize_linespec, event_location_to_sals)
14267 (decode_objc): Update.
14268 (linespec_result): Don't call delete_event_location.
14269 * breakpoint.c (create_breakpoints_sal)
14270 (bkpt_probe_create_sals_from_location)
14271 (strace_marker_create_sals_from_location): Update.
14272
14273 2017-04-12 Tom Tromey <tom@tromey.com>
14274
14275 * linespec.h (struct linespec_result): Add constructor and
14276 destructor.
14277 (init_linespec_result, destroy_linespec_result)
14278 (make_cleanup_destroy_linespec_result): Don't declare.
14279 * linespec.c (init_linespec_result): Remove.
14280 (linespec_result::~linespec_result): Rename from
14281 destroy_linespec_result. Update.
14282 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14283 Remove.
14284 * breakpoint.c (create_breakpoint, break_range_command)
14285 (decode_location_default): Update.
14286 * ax-gdb.c (agent_command_1): Update.
14287
14288 2017-04-12 Tom Tromey <tom@tromey.com>
14289
14290 * remote.c (remote_download_tracepoint): Update.
14291 * python/py-breakpoint.c (bppy_get_location): Update.
14292 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14293 (gdbscm_breakpoint_location): Update.
14294 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14295 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14296 Change type to event_location_up.
14297 * breakpoint.c (create_overlay_event_breakpoint)
14298 (create_longjmp_master_breakpoint)
14299 (create_std_terminate_master_breakpoint)
14300 (create_exception_master_breakpoint)
14301 (breakpoint_event_location_empty_p, print_breakpoint_location)
14302 (print_one_breakpoint_location, create_thread_event_breakpoint)
14303 (init_breakpoint_sal, create_breakpoint)
14304 (print_recreate_ranged_breakpoint, break_range_command)
14305 (init_ada_exception_breakpoint, say_where): Update.
14306 (base_breakpoint_dtor): Don't call delete_event_location.
14307 (bkpt_print_recreate, tracepoint_print_recreate)
14308 (dprintf_print_recreate, update_static_tracepoint)
14309 (breakpoint_re_set_default): Update.
14310
14311 2017-04-12 Tom Tromey <tom@tromey.com>
14312
14313 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14314 type of "to_do". Update.
14315 (compute_stack_depth): Use std::vector.
14316
14317 2017-04-12 Tom Tromey <tom@tromey.com>
14318
14319 * printcmd.c (find_instruction_backward): Use std::vector.
14320
14321 2017-04-12 Tom Tromey <tom@tromey.com>
14322
14323 * symfile.c (objfilep): Remove typedef.
14324 (reread_symbols): Use a std::vector.
14325
14326 2017-04-12 Tom Tromey <tom@tromey.com>
14327
14328 * mi/mi-main.c (exec_direction_forward): Remove.
14329 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14330 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14331 scoped_restore.
14332 * guile/guile.c (guile_repl_command, guile_command)
14333 (gdbscm_execute_gdb_command): Use scoped_restore.
14334 * go-exp.y (go_parse): Use scoped_restore.
14335 * d-exp.y (d_parse): Use scoped_restore.
14336 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14337 * c-exp.y (c_parse): Use scoped_restore.
14338
14339 2017-04-12 Tom Tromey <tom@tromey.com>
14340
14341 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14342 (mi_parse): Update return type.
14343 (mi_parse_free): Remove.
14344 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14345 (mi_parse::~mi_parse): Rename from mi_parse_free.
14346 (mi_parse_cleanup): Remove.
14347 (mi_parse): Return a unique_ptr. Use new.
14348 * mi/mi-main.c (mi_execute_command): Update.
14349
14350 2017-04-12 Tom Tromey <tom@tromey.com>
14351
14352 * location.c (explicit_location_lex_one): Return a
14353 unique_xmalloc_ptr.
14354 (string_to_explicit_location): Update. Remove cleanups.
14355
14356 2017-04-12 Tom Tromey <tom@tromey.com>
14357
14358 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14359 (compare_value_and_voffset): Change type. Update.
14360 (compute_vtable_size): Change type of "offset_vec".
14361 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14362 (gnuv3_get_typeid): Remove extraneous declaration.
14363
14364 2017-04-12 Tom Tromey <tom@tromey.com>
14365
14366 * charset.h (wchar_iterator): Fix comment.
14367
14368 2017-04-12 Tom Tromey <tom@tromey.com>
14369
14370 * charset.c (iconv_wrapper): New class.
14371 (cleanup_iconv): Remove.
14372 (convert_between_encodings): Use it.
14373
14374 2017-04-12 Tom Tromey <tom@tromey.com>
14375
14376 * symfile.h (increment_reading_symtab): Update type.
14377 * symfile.c (decrement_reading_symtab): Remove.
14378 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14379 * psymtab.c (psymtab_to_symtab): Update.
14380 * dwarf2read.c (dw2_instantiate_symtab): Update.
14381
14382 2017-04-12 Tom Tromey <tom@tromey.com>
14383
14384 * jit.c (struct jit_reader): Declare separately. Add constructor
14385 and destructor. Change type of "handle".
14386 (loaded_jit_reader): Define separately.
14387 (jit_reader_load): Update. New "new".
14388 (jit_reader_unload_command): Use "delete".
14389 * gdb-dlfcn.h (struct dlclose_deleter): New.
14390 (gdb_dlhandle_up): New typedef.
14391 (gdb_dlopen, gdb_dlsym): Update types.
14392 (gdb_dlclose): Remove.
14393 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14394 (gdb_dlsym): Change type of "handle".
14395 (make_cleanup_dlclose): Remove.
14396 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14397 * compile/compile-c-support.c (load_libcc): Update.
14398
14399 2017-04-12 Tom Tromey <tom@tromey.com>
14400
14401 * symtab.h (find_pcs_for_symtab_line): Change return type.
14402 * symtab.c (find_pcs_for_symtab_line): Change return type.
14403 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14404 type of "vec". Update.
14405 (ltpy_get_pcs_for_line): Update.
14406 * linespec.c (decode_digits_ordinary): Update.
14407
14408 2017-04-12 Tom Tromey <tom@tromey.com>
14409
14410 * tracepoint.c (actions_command): Update.
14411 * python/python.c (python_command, python_interactive_command):
14412 Update.
14413 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14414 * guile/guile.c (guile_command): Update.
14415 * defs.h (read_command_lines, read_command_lines_1): Return
14416 command_line_up.
14417 (command_lines_deleter): New struct.
14418 (command_line_up): New typedef.
14419 * compile/compile.c (compile_code_command)
14420 (compile_print_command): Update.
14421 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14422 command_line_up.
14423 (make_cleanup_free_command_lines): Remove.
14424 * cli/cli-script.c (get_command_line, read_command_lines_1)
14425 (copy_command_lines): Return command_line_up.
14426 (while_command, if_command, read_command_lines, define_command)
14427 (document_command): Update.
14428 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14429 Remove.
14430 * breakpoint.h (breakpoint_set_commands): Change type of
14431 "commands".
14432 * breakpoint.c (breakpoint_set_commands): Change type of
14433 "commands". Update.
14434 (do_map_commands_command, update_dprintf_command_list)
14435 (create_tracepoint_from_upload): Update.
14436
14437 2017-04-12 Tom Tromey <tom@tromey.com>
14438
14439 * tracepoint.c (scope_info): Update.
14440 * spu-tdep.c (spu_catch_start): Update.
14441 * python/python.c (gdbpy_decode_line): Update.
14442 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14443 * python/py-breakpoint.c (bppy_init): Update.
14444 * probe.c (parse_probes): Update.
14445 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14446 * location.h (event_location_deleter): New struct.
14447 (event_location_up): New typedef.
14448 (new_linespec_location, new_address_location, new_probe_location)
14449 (new_explicit_location, copy_event_location)
14450 (string_to_event_location, string_to_event_location_basic)
14451 (string_to_explicit_location): Update return type.
14452 (make_cleanup_delete_event_location): Remove.
14453 * location.c (new_linespec_location, new_address_location)
14454 (new_probe_location, new_explicit_location, copy_event_location):
14455 Return event_location_up.
14456 (delete_event_location_cleanup)
14457 (make_cleanup_delete_event_location): Remove.
14458 (string_to_explicit_location, string_to_event_location_basic)
14459 (string_to_event_location): Return event_location_up.
14460 * linespec.c (canonicalize_linespec, event_location_to_sals)
14461 (decode_line_with_current_source)
14462 (decode_line_with_last_displayed, decode_objc): Update.
14463 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14464 * completer.c (location_completer): Update.
14465 * cli/cli-cmds.c (edit_command, list_command): Update.
14466 * breakpoint.c (create_overlay_event_breakpoint)
14467 (create_longjmp_master_breakpoint)
14468 (create_std_terminate_master_breakpoint)
14469 (create_exception_master_breakpoint)
14470 (create_thread_event_breakpoint): Update.
14471 (init_breakpoint_sal): Update. Remove some dead code.
14472 (create_breakpoint_sal): Change type of "location". Update.
14473 (create_breakpoints_sal, create_breakpoint, break_command_1)
14474 (dprintf_command, break_range_command, until_break_command)
14475 (init_ada_exception_breakpoint)
14476 (strace_marker_create_sals_from_location)
14477 (update_static_tracepoint, trace_command, ftrace_command)
14478 (strace_command, create_tracepoint_from_upload): Update.
14479 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14480 * ax-gdb.c (agent_command_1): Update.
14481
14482 2017-04-12 Pedro Alves <palves@redhat.com>
14483
14484 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14485 * configure.tgt: Handle i[34567]86-*-go32* and
14486 i[34567]86-*-msdosdjgpp*.
14487 * i386-tdep.c (i386_svr4_reg_to_regnum):
14488 Make extern.
14489 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14490 i386-go32-tdep.c.
14491 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14492 * i386-go32-tdep.c: New file.
14493 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14494 declarations.
14495
14496 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14497
14498 * aix-thread.c (pd_status2str): Change return type to const char *.
14499
14500 2017-04-12 Pedro Alves <palves@redhat.com>
14501
14502 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14503 calls to set_gdbarch_gnu_triplet_regexp.
14504
14505 2017-04-12 Pedro Alves <palves@redhat.com>
14506
14507 PR gdb/21323
14508 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14509 New enum value.
14510 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14511 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14512 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14513 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14514 * gdbarch.h, gdbarch.c: Regenerate.
14515 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14516 gdbarch_wchar_bit and gdbarch_wchar_signed.
14517 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14518 * arm-tdep.c (arm_gdbarch_init): Likewise.
14519 * avr-tdep.c (avr_gdbarch_init): Likewise.
14520 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14521 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14522 * i386-tdep.c (i386_go32_init_abi): Likewise.
14523 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14524 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14525 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14526 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14527 * sh-tdep.c (sh_gdbarch_init): Likewise.
14528 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14529 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14530 * windows-tdep.c (windows_init_abi): Likewise.
14531 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14532
14533 2017-04-12 Pedro Alves <palves@redhat.com>
14534
14535 PR c++/21323
14536 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14537 cplus_primitive_type_char32_t>: New enum values.
14538 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14539 and cplus_primitive_type_char32_t.
14540 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14541 32, use the archtecture's built-in type for char16_t and char32_t,
14542 respectively. Otherwise, fallback to init_integer_type as before,
14543 but make the type unsigned, and issue a complaint.
14544 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14545
14546 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14547
14548 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14549 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14550
14551 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14552
14553 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14554 'const char *'.
14555
14556 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14557
14558 * common/common-utils.c (free_vector_argv): New function.
14559 * common/common-utils.h: Include <vector>.
14560 (free_vector_argv): New prototype.
14561 * darwin-nat.c (darwin_create_inferior): Rewrite function
14562 prototype in order to constify "exec_file" and accept a
14563 "std::string" for "allargs".
14564 * fork-child.c: Include <vector>.
14565 (breakup_args): Rewrite function, using C++.
14566 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14567 and accept "std::string" for "allargs". Update the code to
14568 calculate "argv" based on "allargs". Update calls to "exec_fun"
14569 and "execvp".
14570 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14571 order to constify "exec_file" and accept a "std::string" for
14572 "allargs".
14573 * go32-nat.c (go32_create_inferior): Likewise.
14574 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14575 * infcmd.c (run_command_1): Constify "exec_file". Use
14576 "std::string" for inferior arguments.
14577 * inferior.h (fork_inferior): Update prototype.
14578 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14579 prototype in order to constify "exec_file" and accept a
14580 "std::string" for "allargs".
14581 * nto-procfs.c (procfs_create_inferior): Likewise.
14582 * procfs.c (procfs_create_inferior): Likewise.
14583 * remote-sim.c (gdbsim_create_inferior): Likewise.
14584 * remote.c (extended_remote_run): Update code to accept
14585 "std::string" as argument.
14586 (extended_remote_create_inferior): Rewrite function prototype in
14587 order to constify "exec_file" and accept a "std::string" for
14588 "allargs".
14589 * rs6000-nat.c (super_create_inferior): Likewise.
14590 (rs6000_create_inferior): Likewise.
14591 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14592 * windows-nat.c (windows_create_inferior): Likewise.
14593
14594 2017-04-11 Pedro Alves <palves@redhat.com>
14595
14596 * thread.c: Fix whitespace throughout.
14597
14598 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14599
14600 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14601
14602 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14603
14604 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14605
14606 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14607
14608 PR gdb/21364
14609 * osdata.c (info_osdata): Check if 'type' is an empty string
14610 instead of NULL.
14611
14612 2017-04-10 Pedro Alves <palves@redhat.com>
14613
14614 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14615 (ptid_to_global_thread_id, in_thread_list)
14616 (do_captured_list_thread_ids, set_resumed, set_running)
14617 (set_executing, set_stop_requested, finish_thread_state)
14618 (validate_registers_access, can_access_registers_ptid)
14619 (print_thread_info_1, switch_to_thread)
14620 (do_restore_current_thread_cleanup)
14621 (make_cleanup_restore_current_thread, thread_command)
14622 (thread_name_command): Use operator== instead of ptid_equal.
14623
14624 2017-04-10 Pedro Alves <palves@redhat.com>
14625
14626 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14627 (current_thread_cleanup_chain): Delete.
14628 (restore_current_thread_cleanup_dtor)
14629 (make_cleanup_restore_current_thread): Remove references to
14630 current_thread_cleanup_chain.
14631
14632 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14633
14634 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14635 REG_UNKNOWN.
14636
14637 2017-04-10 Yao Qi <yao.qi@linaro.org>
14638
14639 PR gdb/19942
14640 * gdbthread.h (thread_info::deletable): New method.
14641 (thread_info::incref): New method.
14642 (thread_info::decref): New method.
14643 (thread_info::refcount): Move it to private.
14644 * infrun.c (save_stop_context): Call inc_refcount.
14645 (release_stop_context_cleanup): Likewise.
14646 * thread.c (set_thread_exited): New function.
14647 (init_thread_list): Delete "tp" only it is deletable, otherwise
14648 call set_thread_exited.
14649 (delete_thread_1): Call set_thread_exited.
14650 (current_thread_cleanup) <inferior_pid>: Remove.
14651 <thread>: New field.
14652 (restore_current_thread_ptid_changed): Removed.
14653 (do_restore_current_thread_cleanup): Adjust.
14654 (restore_current_thread_cleanup_dtor): Don't call
14655 find_thread_ptid.
14656 (set_thread_refcount): Use dec_refcount.
14657 (make_cleanup_restore_current_thread): Adjust.
14658 (thread_apply_all_command): Call inc_refcount.
14659 (_initialize_thread): Don't call
14660 observer_attach_thread_ptid_changed.
14661
14662 2017-04-10 Yao Qi <yao.qi@linaro.org>
14663
14664 * thread.c (delete_thread_1): Hoist code on marking thread as
14665 exited.
14666
14667 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14668
14669 * windows-nat.c (windows_detach): Initialize ptid with
14670 minus_one_ptid.
14671
14672 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14673
14674 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14675
14676 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14677
14678 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14679 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14680 (bfin_pseudo_register_write): Likewise
14681
14682 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14683
14684 * common/ptid.h (struct ptid): Change to...
14685 (class ptid_t): ... this.
14686 <ptid_t>: New constructors.
14687 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14688 matches>: New methods.
14689 <make_null, make_minus_one>: New static methods.
14690 <pid>: Rename to...
14691 <m_pid>: ...this.
14692 <lwp>: Rename to...
14693 <m_lwp>: ...this.
14694 <tid>: Rename to...
14695 <m_tid>: ...this.
14696 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14697 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14698 as references, move comment to class ptid_t.
14699 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14700 ptid_t static methods.
14701 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14702 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14703 Take ptid arguments as references, implement using ptid_t methods.
14704 * unittests/ptid-selftests.c: New file.
14705 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14706 unittests/ptid-selftests.c.
14707 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14708
14709 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14710
14711 * python/python.c (python_run_simple_file): Cast mode literal to
14712 non-const char pointer as expected by PyFile_FromString.
14713
14714 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14715
14716 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14717 minus_one_ptid and null_ptid.
14718
14719 2017-04-05 Pedro Alves <palves@redhat.com>
14720
14721 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14722 * configure: Regenerate.
14723
14724 2017-04-05 Pedro Alves <palves@redhat.com>
14725
14726 * ada-exp.y (yyerror): Constify.
14727 * ada-lang.c (bound_name, get_selections)
14728 (ada_variant_discrim_type)
14729 (ada_variant_discrim_name, ada_value_struct_elt)
14730 (ada_lookup_struct_elt_type, is_unchecked_variant)
14731 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14732 (catch_ada_exception_command_split)
14733 (catch_ada_assert_command_split, catch_assert_command)
14734 (ada_op_name): Constify.
14735 * ada-lang.h (ada_yyerror, get_selections)
14736 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14737 * arc-tdep.c (arc_print_frame_cache): Constify.
14738 * arm-tdep.c (arm_skip_stub): Constify.
14739 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14740 (gen_aggregate_elt_ref): Constify.
14741 * bcache.c (print_bcache_statistics): Constify.
14742 * bcache.h (print_bcache_statistics): Constify.
14743 * break-catch-throw.c (catch_exception_command_1):
14744 * breakpoint.c (struct ep_type_description::description):
14745 Constify.
14746 (add_solib_catchpoint): Constify.
14747 (catch_fork_command_1): Add cast.
14748 (add_catch_command): Constify.
14749 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14750 Constify.
14751 * bsd-uthread.c (bsd_uthread_state): Constify.
14752 * buildsym.c (patch_subfile_names): Constify.
14753 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14754 Constify.
14755 * c-exp.y (yyerror): Constify.
14756 (token::oper): Constify.
14757 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14758 * c-varobj.c (cplus_describe_child): Constify.
14759 * charset.c (find_charset_names): Add cast.
14760 (find_charset_names): Constify array and add const_cast.
14761 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14762 (edit_command): Constify.
14763 * cli/cli-decode.c (lookup_cmd): Constify.
14764 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14765 Constify.
14766 (struct dump_context): Constify.
14767 (add_dump_command, restore_command): Constify.
14768 * cli/cli-script.c (get_command_line): Constify.
14769 * cli/cli-script.h (get_command_line): Constify.
14770 * cli/cli-utils.c (check_for_argument): Constify.
14771 * cli/cli-utils.h (check_for_argument): Constify.
14772 * coff-pe-read.c (struct read_pe_section_data): Constify.
14773 * command.h (lookup_cmd): Constify.
14774 * common/print-utils.c (decimal2str): Constify.
14775 * completer.c (gdb_print_filename): Constify.
14776 * corefile.c (set_gnutarget): Constify.
14777 * cp-name-parser.y (yyerror): Constify.
14778 * cp-valprint.c (cp_print_class_member): Constify.
14779 * cris-tdep.c (cris_register_name, crisv32_register_name):
14780 Constify.
14781 * d-exp.y (yyerror): Constify.
14782 (struct token::oper): Constify.
14783 * d-lang.h (d_yyerror): Constify.
14784 * dbxread.c (struct header_file_location::name): Constify.
14785 (add_old_header_file, add_new_header_file, last_function_name)
14786 (dbx_next_symbol_text, add_bincl_to_list)
14787 (find_corresponding_bincl_psymtab, set_namestring)
14788 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14789 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14790 * defs.h (command_line_input, print_address_symbolic)
14791 (deprecated_readline_begin_hook): Constify.
14792 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14793 Constify.
14794 * event-top.c (handle_line_of_input): Constify and add cast.
14795 * exceptions.c (catch_errors): Constify.
14796 * exceptions.h (catch_errors): Constify.
14797 * expprint.c (print_subexp_standard, op_string, op_name)
14798 (op_name_standard, dump_raw_expression, dump_raw_expression):
14799 * expression.h (op_name, op_string, dump_raw_expression):
14800 Constify.
14801 * f-exp.y (yyerror): Constify.
14802 (struct token::oper): Constify.
14803 (struct f77_boolean_val::name): Constify.
14804 * f-lang.c (f_word_break_characters): Constify.
14805 * f-lang.h (f_yyerror): Constify.
14806 * fork-child.c (fork_inferior): Add cast.
14807 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14808 (new_variant): Constify.
14809 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14810 * gdbarch.c: Regenerate.
14811 * gdbcore.h (set_gnutarget): Constify.
14812 * go-exp.y (yyerror): Constify.
14813 (token::oper): Constify.
14814 * go-lang.h (go_yyerror): Constify.
14815 * go32-nat.c (go32_sysinfo): Constify.
14816 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14817 * guile/scm-cmd.c (cmdscm_function): Constify.
14818 * guile/scm-param.c (pascm_param_value): Constify.
14819 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14820 (h8300sx_register_name): Constify.
14821 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14822 Constify.
14823 * ia64-tdep.c (ia64_register_names): Constify.
14824 * infcmd.c (construct_inferior_arguments): Constify.
14825 (path_command, attach_post_wait): Constify.
14826 * language.c (show_range_command, show_case_command)
14827 (unk_lang_error): Constify.
14828 * language.h (language_defn::la_error)
14829 (language_defn::la_name_of_this): Constify.
14830 * linespec.c (decode_line_2): Constify.
14831 * linux-thread-db.c (thread_db_err_str): Constify.
14832 * lm32-tdep.c (lm32_register_name): Constify.
14833 * m2-exp.y (yyerror): Constify.
14834 * m2-lang.h (m2_yyerror): Constify.
14835 * m32r-tdep.c (m32r_register_names): Constify and make static.
14836 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14837 * m88k-tdep.c (m88k_register_name): Constify.
14838 * macroexp.c (appendmem): Constify.
14839 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14840 (upgrade_type, parse_external, parse_partial_symbols)
14841 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14842 (new_symbol): Constify.
14843 * memattr.c (mem_info_command): Constify.
14844 * mep-tdep.c (register_name_from_keyword): Constify.
14845 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14846 Constify.
14847 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14848 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14849 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14850 cast.
14851 (mi_execute_async_cli_command): Constify.
14852 * mips-tdep.c (mips_register_name): Constify.
14853 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14854 (am33_register_name, am33_2_register_name)
14855 * moxie-tdep.c (moxie_register_names): Constify.
14856 * nat/linux-osdata.c (osdata_type): Constify fields.
14857 * nto-tdep.c (nto_parse_redirection): Constify.
14858 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14859 (lookup_child_selector): Constify.
14860 (objc_methcall::name): Constify.
14861 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14862 (lookup_struct_typedef): Constify.
14863 * objfiles.c (pc_in_section): Constify.
14864 * objfiles.h (pc_in_section): Constify.
14865 * p-exp.y (struct token::oper): Constify.
14866 (yyerror): Constify.
14867 * p-lang.h (pascal_yyerror): Constify.
14868 * parser-defs.h (op_name_standard): Constify.
14869 (op_print::string): Constify.
14870 (exp_descriptor::op_name): Constify.
14871 * printcmd.c (print_address_symbolic): Constify.
14872 * psymtab.c (print_partial_symbols): Constify.
14873 * python/py-breakpoint.c (stop_func): Constify.
14874 (bppy_get_expression): Constify.
14875 * python/py-cmd.c (cmdpy_completer::name): Constify.
14876 (cmdpy_function): Constify.
14877 * python/py-event.c (evpy_add_attribute)
14878 (gdbpy_initialize_event_generic): Constify.
14879 * python/py-event.h (evpy_add_attribute)
14880 (gdbpy_initialize_event_generic): Constify.
14881 * python/py-evts.c (add_new_registry): Constify.
14882 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14883 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14884 * python/py-inferior.c (get_buffer): Add cast.
14885 * python/py-param.c (parm_constant::name): Constify.
14886 * python/py-unwind.c (fprint_frame_id): Constify.
14887 * python/python.c (gdbpy_parameter_value): Constify.
14888 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14889 * remote.c (memory_packet_config::name): Constify.
14890 (show_packet_config_cmd, remote_write_bytes)
14891 (remote_buffer_add_string):
14892 * reverse.c (exec_reverse_once): Constify.
14893 * rs6000-tdep.c (variant::name, variant::description): Constify.
14894 * rust-exp.y (rustyyerror): Constify.
14895 * rust-lang.c (rust_op_name): Constify.
14896 * rust-lang.h (rustyyerror): Constify.
14897 * serial.h (serial_ops::name): Constify.
14898 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14899 (sh_sh3e_register_name, sh_sh2e_register_name)
14900 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14901 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14902 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14903 (sh_sh4al_dsp_register_name): Constify.
14904 * sh64-tdep.c (sh64_register_name): Constify.
14905 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14906 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14907 * stabsread.c (patch_block_stabs, read_type_number)
14908 (ref_map::stabs, ref_add, process_reference)
14909 (symbol_reference_defined, define_symbol, define_symbol)
14910 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14911 (read_one_struct_field, read_struct_fields, read_baseclasses)
14912 (read_tilde_fields, read_struct_type, read_array_type)
14913 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14914 (read_huge_number, read_range_type, read_args, common_block_start)
14915 (find_name_end): Constify.
14916 * stabsread.h (common_block_start, define_symbol)
14917 (process_one_symbol, symbol_reference_defined, ref_add):
14918 * symfile.c (get_section_index, add_symbol_file_command):
14919 * symfile.h (get_section_index): Constify.
14920 * target-descriptions.c (tdesc_type::name): Constify.
14921 (tdesc_free_type): Add cast.
14922 * target.c (find_default_run_target):
14923 (add_deprecated_target_alias, find_default_run_target)
14924 (target_announce_detach): Constify.
14925 (do_option): Constify.
14926 * target.h (add_deprecated_target_alias): Constify.
14927 * thread.c (print_thread_info_1): Constify.
14928 * top.c (deprecated_readline_begin_hook, command_line_input):
14929 Constify.
14930 (init_main): Add casts.
14931 * top.h (handle_line_of_input): Constify.
14932 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14933 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14934 (tfind_command): Rename to ...
14935 (tfind_command_1): ... this and constify.
14936 (tfind_command): New function.
14937 (tfind_end_command, tfind_start_command): Adjust.
14938 (encode_source_string): Constify.
14939 * tracepoint.h (encode_source_string): Constify.
14940 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14941 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14942 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14943 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14944 * tui/tui-win.c (parse_scrolling_args): Constify.
14945 * tui/tui-windata.c (tui_erase_data_content): Constify.
14946 * tui/tui-windata.h (tui_erase_data_content): Constify.
14947 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14948 * tui/tui.c (tui_enable): Add cast.
14949 * utils.c (defaulted_query): Constify.
14950 (init_page_info): Add cast.
14951 (puts_debug, subset_compare): Constify.
14952 * utils.h (subset_compare): Constify.
14953 * varobj.c (varobj_format_string): Constify.
14954 * varobj.h (varobj_format_string): Constify.
14955 * vax-tdep.c (vax_register_name): Constify.
14956 * windows-nat.c (windows_detach): Constify.
14957 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14958 * xml-support.c (gdb_xml_end_element): Constify.
14959 * xml-tdesc.c (tdesc_start_reg): Constify.
14960 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14961 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14962 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14963
14964 2017-04-05 Pedro Alves <palves@redhat.com>
14965
14966 * proc-api.c (struct trans): Constify.
14967 (procfs_note): Constify.
14968 * proc-events.c (struct trans, syscall_table):
14969 * proc-flags.c (struct trans): Constify.
14970 * proc-utils.h (procfs_note): Constify.
14971 * proc-why.c (struct trans): Constify.
14972 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14973 (procfs_detach): Constify.
14974 * sol-thread.c (struct string_map): Constify.
14975 (td_err_string, td_state_string): Constify.
14976
14977 2017-04-05 Pedro Alves <palves@redhat.com>
14978
14979 * proc-api.c (procfs_filename): Don't initialize
14980 procfs_filename.
14981 (prepare_to_trace): Assume procfs_filename is non-NULL.
14982 (_initialize_proc_api): Give procfs_filename a default value here.
14983
14984 2017-04-05 Pedro Alves <palves@redhat.com>
14985
14986 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14987 'cond_string' parameter.
14988 (extract_exception_regexp): Constify 'string' parameter.
14989 (catch_exception_command_1): Constify.
14990 * breakpoint.c (init_catchpoint)
14991 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14992 parameter.
14993 (ep_parse_optional_if_clause, catch_fork_command_1)
14994 (catch_exec_command_1): Constify.
14995 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14996 parameter.
14997 (ep_parse_optional_if_clause): Constify.
14998 * cli/cli-utils.c (remove_trailing_whitespace)
14999 (check_for_argument): Constify.
15000 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
15001 non-const overload.
15002 (check_for_argument): Likewise.
15003
15004 2017-04-05 Pedro Alves <palves@redhat.com>
15005
15006 * event-top.c (command_line_handler): Add cast to execute_command
15007 call.
15008 * record-btrace.c (cmd_record_btrace_bts_start)
15009 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
15010 (cmd_record_btrace_start): Add cast to execute_command call.
15011 * record-full.c (record_full_goto_insn):
15012 * record.c (record_start, record_stop): Add cast to
15013 execute_command_to_string calls.
15014 (cmd_record_start): Add cast to execute_command calls.
15015
15016 2017-04-05 Pedro Alves <palves@redhat.com>
15017
15018 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
15019 static inline function.
15020 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
15021 array and use gdb_PyArg_ParseTupleAndKeywords.
15022 * python/py-cmd.c (cmdpy_init): Likewise.
15023 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
15024 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
15025 (infpy_search_memory): Likewise.
15026 * python/py-objfile.c (objfpy_add_separate_debug_file)
15027 (gdbpy_lookup_objfile): Likewise.
15028 * python/py-symbol.c (gdbpy_lookup_symbol)
15029 (gdbpy_lookup_global_symbol): Likewise.
15030 * python/py-type.c (gdbpy_lookup_type): Likewise.
15031 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
15032 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
15033 Likewise.
15034
15035 2017-04-05 Pedro Alves <palves@redhat.com>
15036
15037 * python/python-internal.h (gdb_PyGetSetDef): New type.
15038 * python/py-block.c (block_object_getset)
15039 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
15040 * python/py-event.c (event_object_getset)
15041 (finish_breakpoint_object_getset): Likewise.
15042 * python/py-inferior.c (inferior_object_getset): Likewise.
15043 * python/py-infthread.c (thread_object_getset): Likewise.
15044 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
15045 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
15046 * python/py-objfile.c (objfile_getset): Likewise.
15047 * python/py-progspace.c (pspace_getset): Likewise.
15048 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
15049 Likewise.
15050 * python/py-record.c (recpy_record_getset): Likewise.
15051 * python/py-symbol.c (symbol_object_getset): Likewise.
15052 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
15053 Likewise.
15054 * python/py-type.c (type_object_getset, field_object_getset):
15055 Likewise.
15056 * python/py-value.c (value_object_getset): Likewise.
15057
15058 2017-04-05 Pedro Alves <palves@redhat.com>
15059
15060 * python/python-internal.h (gdb_PyObject_CallMethod)
15061 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
15062 New functions.
15063 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
15064 (PySys_GetObject, PySys_SetPath): New macros.
15065
15066 2017-04-05 Pedro Alves <palves@redhat.com>
15067
15068 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
15069 info_osdata_command.
15070 * osdata.c (info_osdata_command): Rename to ...
15071 (info_osdata): ... this. Constify 'type' parameter, and remove
15072 the 'from_tty' parameter. Accept NULL TYPE.
15073 (info_osdata_command): New function.
15074 * osdata.h (info_osdata_command): Remove declaration.
15075 (info_osdata): New declaration.
15076
15077 2017-04-05 Pedro Alves <palves@redhat.com>
15078
15079 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
15080 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
15081 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
15082 parameter.
15083 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
15084 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
15085 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
15086 parameter.
15087 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
15088 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
15089 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
15090 (mi_cmd_file_list_exec_source_files)
15091 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
15092 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
15093 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
15094 parameter.
15095 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
15096 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
15097 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
15098 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
15099 (mi_cmd_stack_info_frame): Constify 'command' parameter.
15100 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
15101 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
15102 'command' parameter.
15103 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
15104 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
15105 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
15106 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
15107 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
15108 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
15109 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
15110 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
15111 (mi_cmd_var_set_update_range): Constify 'command' parameter.
15112 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
15113 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
15114 parameter.
15115 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
15116 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
15117 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
15118 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
15119 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
15120 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
15121 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
15122 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
15123 (mi_cmd_data_list_changed_registers)
15124 (mi_cmd_data_write_register_values)
15125 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
15126 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
15127 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
15128 (mi_cmd_list_features, mi_cmd_list_target_features)
15129 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
15130 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
15131 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
15132 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
15133 (mi_cmd_trace_frame_collected): Constify 'command'
15134 parameter.
15135 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
15136 'command' parameter.
15137
15138 2017-04-05 Pedro Alves <palves@redhat.com>
15139
15140 * ada-lang.c (ada_completer_word_break_characters): Now a const
15141 array.
15142 (ada_get_gdb_completer_word_break_characters): Constify.
15143 * completer.c (gdb_completer_command_word_break_characters)
15144 (gdb_completer_file_name_break_characters)
15145 (gdb_completer_quote_characters): Now const arrays.
15146 (get_gdb_completer_quote_characters): Constify.
15147 (set_rl_completer_word_break_characters): New function.
15148 (set_gdb_completion_word_break_characters)
15149 (complete_line_internal): Use it.
15150 * completer.h (get_gdb_completer_quote_characters): Constify.
15151 (set_rl_completer_word_break_characters): Declare.
15152 * f-lang.c (f_word_break_characters): Constify.
15153 * language.c (default_word_break_characters): Constify.
15154 * language.h (language_defn::la_word_break_characters): Constify.
15155 (default_word_break_characters): Constify.
15156 * top.c (init_main): Use set_rl_completer_word_break_characters.
15157
15158 2017-04-05 Pedro Alves <palves@redhat.com>
15159
15160 * aix-thread.c (aix_thread_pid_to_str)
15161 (aix_thread_extra_thread_info): Constify.
15162 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
15163 * bsd-uthread.c (bsd_uthread_extra_thread_info)
15164 (bsd_uthread_pid_to_str): Constify.
15165 * corelow.c (core_pid_to_str): Constify.
15166 * darwin-nat.c (darwin_pid_to_str): Constify.
15167 * fbsd-nat.c (fbsd_pid_to_str): Constify.
15168 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
15169 Constify.
15170 * gnu-nat.c (gnu_pid_to_str): Constify.
15171 * go32-nat.c (go32_pid_to_str): Constify.
15172 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
15173 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
15174 * inferior.c (inferior_pid_to_str): Constify.
15175 * linux-nat.c (linux_nat_pid_to_str): Constify.
15176 * linux-tdep.c (linux_core_pid_to_str): Constify.
15177 * linux-thread-db.c (thread_db_pid_to_str)
15178 (thread_db_extra_thread_info): Constify.
15179 * nto-tdep.c (nto_extra_thread_info): Constify.
15180 * nto-tdep.h (nto_extra_thread_info): Constify.
15181 * obsd-nat.c (obsd_pid_to_str): Constify.
15182 * procfs.c (procfs_pid_to_str): Constify.
15183 * ravenscar-thread.c (ravenscar_extra_thread_info)
15184 (ravenscar_pid_to_str): Constify.
15185 * remote-sim.c (gdbsim_pid_to_str): Constify.
15186 * remote.c (remote_threads_extra_info, remote_pid_to_str):
15187 Constify.
15188 * sol-thread.c (solaris_pid_to_str): Constify.
15189 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
15190 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
15191 * target.c (default_pid_to_str, target_pid_to_str)
15192 (normal_pid_to_str, default_pid_to_str): Constify.
15193 * target.h (target_ops::to_pid_to_str)
15194 (target_ops::to_extra_thread_info): Constify.
15195 (target_pid_to_str, normal_pid_to_str): Constify.
15196 * windows-nat.c (windows_pid_to_str): Constify.
15197 * gdbarch.sh (core_pid_to_str): Constify.
15198 * target-delegates.c: Regenerate.
15199 * gdbarch.h, gdbarch.c: Regenerate.
15200
15201 2017-04-05 Pedro Alves <palves@redhat.com>
15202
15203 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
15204 the memory of the temporary warning_pre_print override.
15205 * utils.c (warning_pre_print): Constify.
15206 * utils.h (warning_pre_print): Constify.
15207
15208 2017-04-05 Pedro Alves <palves@redhat.com>
15209
15210 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
15211 (shell_command): New function.
15212 (make_command): Use std::string.
15213 (init_cli_cmds): Register shell_command instead of shell_escape.
15214
15215 2017-04-05 Pedro Alves <palves@redhat.com>
15216
15217 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
15218 * tracepoint.c (default_collect): Don't initialize.
15219
15220 2017-04-05 Pedro Alves <palves@redhat.com>
15221
15222 * macroexp.c (macro_buffer::shared): Now a bool.
15223 (init_buffer): Update.
15224 (init_shared_buffer): Constify 'addr' parameter.
15225 (substitute_args, expand, macro_expand, macro_expand_next): Remove
15226 casts.
15227
15228 2017-04-05 Pedro Alves <palves@redhat.com>
15229
15230 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15231 * disasm.c (set_disassembler_options): Constify local.
15232 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15233
15234 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15235
15236 PR gdb/21352
15237 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15238 option.
15239
15240 2017-04-05 Yao Qi <yao.qi@linaro.org>
15241
15242 * frame.c (frame_unwind_register_unsigned): Call
15243 frame_unwind_register_value.
15244
15245 2017-04-05 Yao Qi <yao.qi@linaro.org>
15246
15247 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15248 Use gdb_test_multiple, and don't match anchor.
15249
15250 2017-04-05 Pedro Alves <palves@redhat.com>
15251
15252 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15253 (Write After Approval): Remove Simon Marchi.
15254
15255 2017-04-05 Pedro Alves <palves@redhat.com>
15256
15257 * common/gdb_optional.h (optional::optional): Make constexpr and
15258 initialize m_dummy.
15259
15260 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15261
15262 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15263 (amd64fbsd_jmp_buf_reg_offset): Remove.
15264 (amd64fbsd_supply_uthread): Remove function.
15265 (amd64fbsd_collect_uthread): Remove function.
15266 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15267 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15268 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15269 (fbsd-nat.c): Update comment.
15270 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15271 (i386fbsd_jmp_buf_reg_offset): Remove.
15272 (i386fbsd_supply_uthread): Remove function.
15273 (i386fbsd_collect_uthread): Remove function.
15274 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15275
15276 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15277
15278 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15279 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15280 * NEWS: Mention that support for FreeBSD/alpha was removed.
15281 * alpha-fbsd-tdep.c: Delete file.
15282 * config/alpha/fbsd.mh: Delete file.
15283 * configure.host: Delete alpha*-*-freebsd* and
15284 alpha*-*-kfreebsd*-gnu.
15285 * configure.tgt: Delete alpha*-*-freebsd* and
15286 alpha*-*-kfreebsd*-gnu.
15287
15288 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15289
15290 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15291 amd64bsd_store_inferior_registers): Use ptid from regcache.
15292
15293 2017-04-04 Pedro Alves <palves@redhat.com>
15294
15295 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15296 data fields, make them private and add "m_" prefixes.
15297 (lnp_state_machine::lnp_state_machine): New ctor.
15298 (record_line, check_line_address, handle_set_discriminator)
15299 (handle_set_address, handle_advance_pc, handle_special_opcode)
15300 (handle_advance_line, handle_set_file, handle_negate_stmt)
15301 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15302 (end_sequence, advance_line): New methods.
15303 (m_gdbarch, m_record_lines_p): New fields.
15304 (lnp_reader_state): Delete.
15305 (dwarf_record_line): Rename to ...
15306 (lnp_state_machine::record_line): ... adjust.
15307 (init_lnp_state_machine): Delete.
15308 (lnp_state_machine::lnp_state_machine): New.
15309 (check_line_address): Rename to ...
15310 (lnp_state_machine::check_line_address): This.
15311 (dwarf_decode_lines_1): Remove reference to "reader_state".
15312 Adjust lnp_state_machine having a non-default ctor. Use bool.
15313 State machine internal state manipulation moved to
15314 lnp_state_machine methods.
15315
15316 2017-04-04 Pedro Alves <palves@redhat.com>
15317
15318 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15319 unittests/offset-type-selftests.c.
15320 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15321 * common/offset-type.h: New file.
15322 * common/preprocessor.h: New file.
15323 * common/traits.h: New file.
15324 * common/valid-expr.h: New file.
15325 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15326 sect_offset and cu_offset strong typedefs throughout.
15327 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15328 typedefs throughout.
15329 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15330 sect_offset and cu_offset strong typedefs throughout.
15331 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15332 typedefs throughout.
15333 * gdbtypes.h: Include "common/offset-type.h".
15334 (cu_offset): Now an offset type (strong typedef) instead of a
15335 struct.
15336 (sect_offset): Likewise.
15337 (union call_site_parameter_u): Rename "param_offset" field to
15338 "param_cu_off".
15339 * unittests/offset-type-selftests.c: New file.
15340
15341 2017-04-04 Pedro Alves <palves@redhat.com>
15342
15343 * common/underlying.h: New file.
15344 * dwarf2read.c: Include "common/gdb_optional.h" and
15345 "common/underlying.h".
15346 (dir_index, file_name_index): New types.
15347 (file_entry): Use them.
15348 (file_entry::include): Use to_underlying.
15349 (line_header::add_file_name): Use dir_index.
15350 (read_formatted_entries): Use gdb::optional. Read form before
15351 writting to file_entry.
15352 (dwarf_decode_line_header): Use dir_index.
15353 (lnp_state_machine::current_file): Use to_underlying.
15354 (lnp_state_machine::file): Change type to file_name_index.
15355 (dwarf_record_line): Use to_underlying.
15356 (init_lnp_state_machine): Use file_name_index.
15357 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15358
15359 2017-04-04 Pedro Alves <palves@redhat.com>
15360
15361 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15362 operator bool, has_value and get methods.
15363
15364 2017-04-04 Pedro Alves <palves@redhat.com>
15365
15366 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15367 fields.
15368 (line_header): Initialize all data fields. Change type of
15369 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15370 Change type of include_dirs to std::vector<const char *>. Remove
15371 num_include_dirs, include_dirs_size. Change type of file_names to
15372 std::vector<file_entry>. Remove num_file_names, file_names_size.
15373 (line_header::line_header): New.
15374 (line_header::add_include_dir, line_header::add_file_name): New
15375 methods.
15376 (line_header::include_dir_at): Remove NULL check.
15377 (line_header::file_name_at): Add const overload.
15378 (line_header_up): New unique_ptr typedef.
15379 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15380 std::vector. Remove free_line_header call.
15381 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15382 free_line_header call.
15383 (free_cu_line_header): Delete.
15384 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15385 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15386 Adjust to use std::vector.
15387 (free_line_header): Delete.
15388 (free_line_header_voidp): Use delete.
15389 (add_include_dir): Replace with ...
15390 (line_header::add_include_dir): ... this method. Use std::vector.
15391 (add_file_name): Replace with ...
15392 (line_header::add_file_name): ... this method. Use std::vector.
15393 (add_include_dir_stub): Delete.
15394 (read_formatted_entries): Remove memset.
15395 (dwarf_decode_line_header): Return a line_header_up instead of a
15396 raw pointer. Remove cleanup handling. Pass lambdas to
15397 read_formatted_entries. Adjust to use line_header methods.
15398 (dwarf_decode_lines_1): Adjust to use line_header methods.
15399 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15400 use std::vector.
15401
15402 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15403
15404 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15405 instead of struct ptid.
15406
15407 2017-05-04 Alan Hayward <alan.hayward@arm.com>
15408
15409 * frame.c (get_frame_register_bytes): Unwind using value.
15410 (put_frame_register_bytes): Likewise.
15411
15412 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15413
15414 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15415 aggregate-like.
15416
15417 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15418
15419 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15420
15421 2017-03-29 Yao Qi <yao.qi@linaro.org>
15422
15423 * gdbthread.h (struct thread_info): Declare constructor and
15424 destructor. Add some in-class member initializers.
15425 * thread.c (free_thread): Remove.
15426 (init_thread_list): Call delete instead of free_thread.
15427 (new_thread): Call thread_info constructor.
15428 (thread_info::thread_info): New function.
15429 (thread_info::~thread_info): New function.
15430 (delete_thread_1): Call delete instead of free_thread.
15431 (make_cleanup_restore_current_thread): Move tp and frame to
15432 inner block.
15433
15434 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15435
15436 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15437 (arc_skip_prologue): Likewise.
15438 (arc_make_frame_cache): Likewise.
15439 (arc_pv_get_operand): New function.
15440 (arc_is_in_prologue): Likewise.
15441 (arc_analyze_prologue): Likewise.
15442 (arc_print_frame_cache): Likewise.
15443 (MAX_PROLOGUE_LENGTH): New constant.
15444
15445 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15446
15447 * configure.tgt: Add arc-insn.o.
15448 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15449 (dump_arc_instruction_command): New function.
15450 (arc_fprintf_disasm): Likewise.
15451 (arc_disassemble_info): Likewise.
15452 (arc_insn_get_operand_value): Likewise.
15453 (arc_insn_get_operand_value_signed): Likewise.
15454 (arc_insn_get_memory_base_reg): Likewise.
15455 (arc_insn_get_memory_offset): Likewise.
15456 (arc_insn_get_branch_target): Likewise.
15457 (arc_insn_dump): Likewise.
15458 (arc_insn_get_linear_next_pc): Likewise.
15459 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15460 (arc_disassemble_info): Likewise.
15461 (arc_insn_get_branch_target): Likewise.
15462 (arc_insn_get_linear_next_pc): Likewise.
15463 * NEWS: Mention new "maint print arc arc-instruction".
15464
15465 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15466
15467 * arc-tdep (maintenance_print_arc_list): New variable.
15468 (maintenance_print_arc_command): New function.
15469
15470 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15471
15472 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15473 Add "limm" and "reserved".
15474 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15475 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15476 * arc-tdep.h (arc_regnum): Likewise.
15477
15478 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15479
15480 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15481 for THREADPTR register.
15482 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15483 register.
15484 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15485 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15486 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15487
15488 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15489
15490 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15491 registers above gdbarch_num_regs (gdbarch) as privileged in
15492 call0 ABI.
15493
15494 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15495
15496 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15497 for a single specified register or for all registers in
15498 a0_base..a0_base + C0_NREGS range.
15499 (supply_gregset_reg): Call regcache_raw_supply for a single
15500 specified register or for all registers in a0_base..a0_base +
15501 C0_NREGS range.
15502
15503 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15504
15505 * arch/xtensa.h (C0_NREGS): Add definition.
15506 * xtensa-tdep.c (C0_NREGS): Remove definition.
15507
15508 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15509
15510 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15511 Drop xtensa_default_isa initialization.
15512 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15513
15514 2017-03-27 Pedro Alves <palves@redhat.com>
15515
15516 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15517 (file_entry::include_dir): New method.
15518 (line_header::include_dir_at, line_header::file_name_at): New
15519 methods.
15520 (setup_type_unit_groups, setup_type_unit_groups)
15521 (psymtab_include_file_name): Simplify using the new methods.
15522 (lnp_state_machine) <the_line_header>: New field.
15523 <file>: Add comment.
15524 (lnp_state_machine::current_file): New method.
15525 (dwarf_record_line): Simplify using the new methods.
15526 (init_lnp_state_machine): Initialize the "the_line_header" field.
15527 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15528 Simplify using the new methods.
15529
15530 2017-03-27 Pedro Alves <palves@redhat.com>
15531
15532 * cp-name-parser.y (make_empty): Delete.
15533 (demangler_special, nested_name, ptr_operator, array_indicator)
15534 (direct_declarator, declarator_1): Use fill_comp instead of
15535 make_empty.
15536
15537 2017-03-27 Pedro Alves <palves@redhat.com>
15538
15539 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15540 to ATTRIBUTE_PRINTF.
15541 * solib-target.c (library_list_start_list): Print "string" not
15542 "version".
15543 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15544 gdb_xml_error call.
15545
15546 2017-03-27 Pedro Alves <palves@redhat.com>
15547
15548 * dwarf2read.c (struct file_and_directory): New.
15549 (dwarf2_get_dwz_file): Adjust to use std::string.
15550 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15551 (find_file_and_directory): Adjust to return a file_and_directory
15552 object.
15553 (read_file_scope): Adjust to use file_and_directory. Remove
15554 make_cleanup/do_cleanups calls.
15555 (open_and_init_dwp_file): Adjust to use std::string. Remove
15556 make_cleanup/do_cleanups calls.
15557 * python/python.c (do_start_initialization): Adjust to ldirname
15558 returning a std::string.
15559 * utils.c (ldirname): Now returns a std::string.
15560 * utils.h (ldirname): Change return type to std::string.
15561 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15562 returning a std::string.
15563 * xml-tdesc.c (file_read_description_xml): Likewise.
15564
15565 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15566
15567 * regcache.c (regcache_debug_print_register): New function.
15568 * regcache.h (regcache_debug_print_register): New declaration.
15569 * target.c (debug_print_register): Remove.
15570 (target_fetch_registers): Call regcache_debug_print_register.
15571 (target_store_registers): Likewise.
15572
15573 2017-03-24 Pádraig Brady <pbrady@fb.com>
15574
15575 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15576 reference beyond the 'lh->include_dirs' array before accessing to
15577 it.
15578 (psymtab_include_file_name): Likewise.
15579 (dwarf_decode_lines_1): Likewise.
15580 (dwarf_decode_lines): Likewise.
15581 (file_file_name): Likewise.
15582
15583 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15584
15585 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15586 inferior_ptid.
15587 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15588 ps_lsetfpregs): Likewise.
15589 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15590 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15591 ps_lsetfpregs): Likewise.
15592 * target.c (target_fetch_registers, target_store_registers):
15593 Remove asserts.
15594
15595 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15596
15597 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15598
15599 2017-03-23 Yao Qi <yao.qi@linaro.org>
15600
15601 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15602 (_initialize_aarch64_tdep): Register it.
15603 (aarch64_record_load_store): Handle PRFM instruction.
15604 (aarch64_process_record_test): New function.
15605
15606 2017-03-23 Yao Qi <yao.qi@linaro.org>
15607
15608 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15609 indentation.
15610
15611 2017-03-23 Yao Qi <yao.qi@linaro.org>
15612
15613 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15614
15615 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15616
15617 python/python.c (do_start_initialization): Fix memory leak.
15618
15619 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15620
15621 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15622 using get_ptrace_pid.
15623 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15624 inferior_ptid.
15625 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15626 inferior_ptid instead of pid.
15627
15628 2017-03-22 Yao Qi <yao.qi@linaro.org>
15629
15630 * aarch64-tdep.c: Wrap locally used classes in anonymous
15631 namespace.
15632 * arm-tdep.c: Likewise.
15633 * linespec.c: Likewise.
15634 * ui-out.c: Likewise.
15635
15636 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15637
15638 PR gdb/19637
15639 * python/lib/gdb/printer/bound_registers.py: Import sys.
15640
15641 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15642
15643 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15644 windows_thread_info parameter and use it instead of
15645 current_thread.
15646 (windows_fetch_inferior_registers): Don't set current_thread,
15647 pass the thread to do_windows_fetch_inferior_registers. Use
15648 ptid from regcache instead of inferior_ptid.
15649 (do_windows_store_inferior_registers): Add windows_thread_info
15650 parameter and use it instead of current_thread.
15651 (windows_store_inferior_registers): Don't set current_thread,
15652 pass the thread to do_windows_store_inferior_registers. Use
15653 ptid from regcache instead of inferior_ptid.
15654
15655 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15656
15657 * ser-mingw.c (ser_windows_raw): Remove reference to
15658 struct serial::current_timeout.
15659
15660 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15661
15662 PR tdep/20928
15663 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15664 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15665 (sparc64_fsr_type): Fix %fsr decoding.
15666
15667 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15668
15669 * python/py-record-btrace.c (btpy_insn_data): Change return type
15670 for Python 2.
15671
15672 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15673
15674 * spu-linux-nat.c (spu_fetch_inferior_registers,
15675 spu_store_inferior_registers): Use ptid from regcache, set and
15676 restore inferior_ptid.
15677 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15678 Likewise.
15679
15680 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15681
15682 * i386-linux-nat.c (fetch_register, store_register,
15683 i386_linux_fetch_inferior_registers,
15684 i386_linux_store_inferior_registers): Use ptid from regcache.
15685 * ia64-linux-nat.c (ia64_linux_fetch_register,
15686 ia64_linux_store_register): Likewise.
15687 * inf-ptrace.c (inf_ptrace_fetch_register,
15688 inf_ptrace_store_register): Likewise.
15689 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15690 m32r_linux_store_inferior_registers): Likewise.
15691 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15692 m68kbsd_store_inferior_registers): Likewise.
15693 * m68k-linux-nat.c (fetch_register, store_register,
15694 m68k_linux_fetch_inferior_registers,
15695 m68k_linux_store_inferior_registers): Likewise.
15696 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15697 m88kbsd_store_inferior_registers): Likewise.
15698 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15699 mips_fbsd_store_inferior_registers): Likewise.
15700 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15701 mips64_linux_regsets_store_registers): Likewise.
15702 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15703 mipsnbsd_store_inferior_registers): Likewise.
15704 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15705 mips64obsd_store_inferior_registers): Likewise.
15706 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15707 Likewise.
15708 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15709 ppcfbsd_store_inferior_registers): Likewise.
15710 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15711 ppc_linux_store_inferior_registers): Likewise.
15712 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15713 ppcnbsd_store_inferior_registers): Likewise.
15714 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15715 ppcobsd_store_registers): Likewise.
15716 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15717 Likewise.
15718 * ravenscar-thread.c (ravenscar_fetch_registers,
15719 ravenscar_store_registers, ravenscar_prepare_to_store):
15720 Likewise.
15721 * record-btrace.c (record_btrace_fetch_registers,
15722 record_btrace_store_registers, record_btrace_prepare_to_store):
15723 Likewise.
15724 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15725 Lookup inferior using ptid from regcache, instead of
15726 current_inferior.
15727 * remote.c (remote_fetch_registers, remote_store_registers): Use
15728 ptid from regcache.
15729 * rs6000-nat.c (fetch_register, store_register): Likewise.
15730 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15731 s390_linux_store_inferior_registers): Likewise.
15732 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15733 shnbsd_store_inferior_registers): Likewise.
15734 * sol-thread.c (sol_thread_fetch_registers,
15735 sol_thread_store_registers): Likewise.
15736 * sparc-nat.c (sparc_fetch_inferior_registers,
15737 sparc_store_inferior_registers): Likewise.
15738 * tilegx-linux-nat.c (fetch_inferior_registers,
15739 store_inferior_registers): Likewise.
15740 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15741 vaxbsd_store_inferior_registers): Likewise.
15742 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15743 store_xtregs): Likewise.
15744
15745 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15746
15747 PR gdb/14441
15748 * NEWS: Mention support for rvalue references in GDB and python.
15749 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15750 supports both lvalue and rvalue references.
15751
15752 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15753
15754 PR gdb/14441
15755 * gdbtypes.c (rank_one_type): Implement overloading
15756 resolution rules regarding rvalue references.
15757
15758 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15759
15760 PR gdb/14441
15761 * aarch64-tdep.c (aarch64_type_align)
15762 (aarch64_extract_return_value, aarch64_store_return_value): Change
15763 lvalue reference type checks to general reference type checks.
15764 * amd64-tdep.c (amd64_classify): Likewise.
15765 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15766 Likewise.
15767 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15768 (arm_store_return_value): Likewise.
15769 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15770 * c-typeprint.c (c_print_type): Likewise.
15771 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15772 (cplus_number_of_children, cplus_describe_child): Likewise.
15773 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15774 * completer.c (expression_completer): Likewise.
15775 * cp-support.c (make_symbol_overload_list_adl_namespace):
15776 Likewise.
15777 * darwin-nat-info.c (info_mach_region_command): Likewise.
15778 * dwarf2loc.c (entry_data_value_coerce_ref)
15779 (value_of_dwarf_reg_entry): Likewise.
15780 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15781 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15782 Likewise.
15783 * findvar.c (extract_typed_address, store_typed_address):
15784 Likewise.
15785 * gdbtypes.c (rank_one_type): Likewise.
15786 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15787 * infcall.c (value_arg_coerce): Likewise.
15788 * language.c (pointer_type): Likewise.
15789 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15790 Likewise.
15791 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15792 * mn10300-tdep.c (mn10300_type_align): Likewise.
15793 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15794 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15795 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15796 Likewise.
15797 * printcmd.c (print_formatted, x_command): Likewise.
15798 * python/py-type.c (typy_get_composite, typy_template_argument):
15799 Likewise.
15800 * python/py-value.c (valpy_referenced_value)
15801 (valpy_get_dynamic_type, value_has_field): Likewise.
15802 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15803 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15804 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15805 * spu-tdep.c (spu_scalar_value_p): Likewise.
15806 * symtab.c (lookup_symbol_aux): Likewise.
15807 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15808 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15809 Likewise.
15810 * valops.c (value_cast_pointers, value_cast)
15811 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15812 (value_struct_elt, value_struct_elt_bitpos)
15813 (value_find_oload_method_list, find_overload_match)
15814 (value_rtti_indirect_type): Likewise.
15815 * valprint.c (val_print_scalar_type_p, generic_val_print):
15816 Likewise.
15817 * value.c (value_actual_type, value_as_address, unpack_long)
15818 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15819 (coerce_ref): Likewise.
15820 * varobj.c (varobj_get_value_type): Likewise.
15821
15822 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15823
15824 PR gdb/14441
15825 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15826 table of constants.
15827 * python/lib/gdb/command/explore.py: Support exploring values
15828 of rvalue reference types.
15829 * python/lib/gdb/types.py: Implement get_basic_type() for
15830 rvalue reference types.
15831 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15832 constant.
15833 * python/py-value.c (valpy_getitem): Add an rvalue reference
15834 check.
15835 (valpy_reference_value): Add new parameter "refcode".
15836 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15837 New wrappers for valpy_reference_value().
15838 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15839 (gdbpy_invoke_xmethod): Likewise.
15840
15841 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15842
15843 PR gdb/14441
15844 * dwarf2read.c (process_die, read_type_die_1): Handle the
15845 DW_TAG_rvalue_reference_type DIE.
15846 (read_tag_reference_type): Add new parameter "refcode".
15847
15848 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15849
15850 PR gdb/14441
15851 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15852 (c_type_print_modifier, c_type_print_varspec_suffix)
15853 (c_type_print_base): Support printing rvalue reference types.
15854 * c-valprint.c (c_val_print, c_value_print): Support printing
15855 rvalue reference values.
15856
15857 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15858
15859 PR gdb/14441
15860 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15861 typename.
15862 * cp-support.c (replace_typedefs): Handle
15863 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15864 * python/py-type.c (typy_lookup_type): Likewise.
15865
15866 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15867
15868 PR gdb/14441
15869 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15870 * parse.c (insert_type): Change assert statement.
15871 (follow_types): Handle rvalue reference types.
15872 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15873 constant.
15874
15875 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15876
15877 PR gdb/14441
15878 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15879 value_ref() interface.
15880 * c-valprint.c (c_value_print): Likewise.
15881 * infcall.c (value_arg_coerce): Likewise.
15882 * python/py-value.c (valpy_reference_value): Likewise.
15883 * valops.c (value_cast, value_reinterpret_cast)
15884 (value_dynamic_cast, typecmp): Likewise.
15885 (value_ref): Parameterize by kind of return value reference type.
15886 * value.h (value_ref): Add new parameter "refcode".
15887
15888 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15889
15890 PR gdb/14441
15891 * dwarf2read.c (read_tag_reference_type): Use
15892 lookup_lvalue_reference_type() instead of lookup_reference_type().
15893 * eval.c (evaluate_subexp_standard): Likewise.
15894 * f-exp.y: Likewise.
15895 * gdbtypes.c (make_reference_type, lookup_reference_type):
15896 Generalize with rvalue reference types.
15897 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15898 convenience wrappers for lookup_reference_type().
15899 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15900 reference kind parameter.
15901 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15902 wrappers for lookup_reference_type().
15903 * guile/scm-type.c (gdbscm_type_reference): Use
15904 lookup_lvalue_reference_type() instead of lookup_reference_type().
15905 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15906 * parse.c (follow_types): Likewise.
15907 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15908 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15909 Likewise.
15910 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15911 (gdbpy_invoke_xmethod): Likewise.
15912 * stabsread.c: Provide extra argument to make_reference_type()
15913 call.
15914 * valops.c (value_ref, value_rtti_indirect_type): Use
15915 lookup_lvalue_reference_type() instead of lookup_reference_type().
15916
15917 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15918
15919 PR gdb/14441
15920 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15921 (TYPE_IS_REFERENCE): New macro.
15922 (struct type): Add rvalue_reference_type field.
15923 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15924
15925 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15926
15927 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15928 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15929 New function definition.
15930 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15931 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15932 New function declaration.
15933 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15934 * mi/mi-interp.h: New file.
15935 * solib.c (info_sharedlibrary_command): Replace for loop with
15936 ALL_SO_LIBS macro
15937 * solib.h (update_solib_list): New function declaration.
15938 (so_list_head): Move macro.
15939 * solist.h (ALL_SO_LIBS): New macro.
15940
15941 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15942
15943 * infcmd.c (post_create_inferior): Remove unused argument in
15944 call to solib_add.
15945 * remote.c (remote_start_remote): Likewise.
15946 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15947 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15948 (enable_break): Likewise.
15949 * solib.c (update_solib_list): Remove unused target argument
15950 and its documentation.
15951 (solib_add): Remove unused target argument. Remove unused
15952 argument in call to update_solib_list.
15953 (info_sharedlibrary_command): Remove unused argument in call
15954 to update_solib_list.
15955 (sharedlibrary_command): Remove unused argument in call to
15956 solib_add.
15957 (handle_solib_event): Likewise.
15958 (reload_shared_libraries): Likewise.
15959 * solib.h (solib_add): Remove unused target argument.
15960
15961 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15962
15963 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15964 (s390_displaced_step_fixup): Cover relative branches with the
15965 default fixup handling. This fixes lack of support for some
15966 relative branch instructions.
15967
15968 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15969
15970 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15971 ptid from regcache.
15972
15973 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15974
15975 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15976 i386_darwin_store_inferior_registers): Use ptid from regcache.
15977
15978 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15979
15980 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15981 i386bsd_store_inferior_registers): Use ptid from regcache.
15982
15983 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15984
15985 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15986 hppaobsd_store_registers): Use ptid from regcache.
15987
15988 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15989
15990 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15991 hppanbsd_store_registers): Use ptid from regcache.
15992
15993 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15994
15995 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15996 from regcache. Use get_ptrace_pid.
15997
15998 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15999
16000 * corelow.c (get_core_register_section): Use ptid from regcache,
16001 update doc.
16002
16003 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16004
16005 * bsd-uthread.c (bsd_uthread_fetch_registers,
16006 bsd_uthread_store_registers): Use ptid from regcache, set and
16007 restore inferior_ptid.
16008
16009 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16010
16011 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
16012 fetch_fp_regs, store_register, store_regs, store_fp_register,
16013 store_fp_regs): Use ptid from regcache.
16014
16015 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
16016
16017 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
16018 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
16019 store_vfp_regs): Use ptid from regcache.
16020
16021 2017-03-17 Pedro Alves <palves@redhat.com>
16022
16023 PR remote/21188
16024 * ser-base.c (ser_base_wait_for): Add comment.
16025 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
16026 version.
16027 * ser-unix.c (hardwire_raw): Remove reference to
16028 scb->current_timeout.
16029 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
16030 (hardwire_ops): Install ser_base_readchar instead of
16031 hardwire_readchar.
16032 * serial.h (struct serial) <current_timeout, timeout_remaining>:
16033 Remove fields.
16034
16035 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
16036
16037 PR gdb/19637
16038 * python/lib/gdb/printer/bound_registers.py: Add support for
16039 Python 3.
16040
16041 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
16042
16043 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
16044 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
16045 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
16046 byte_offset to subobj_byte_offset. Fix the handling of
16047 DWARF_VALUE_STACK on big-endian targets when coming via an
16048 implicit pointer.
16049 (dwarf2_evaluate_loc_desc): Adjust call to
16050 dwarf2_evaluate_loc_desc_full.
16051 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
16052 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
16053
16054 2017-03-16 Yao Qi <yao.qi@linaro.org>
16055
16056 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
16057 and REVSH instructions.
16058
16059 2017-03-16 Yao Qi <yao.qi@linaro.org>
16060
16061 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
16062 (arm_record_test): Declare.
16063 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
16064 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
16065 align with the manual.
16066 (thumb_record_misc): Adjust the code order to align with the
16067 manual.
16068 (thumb2_record_decode_insn_handler): Fix instruction matching.
16069 (instruction_reader_thumb): New class.
16070 (arm_record_test): New function.
16071
16072 2017-03-16 Yao Qi <yao.qi@linaro.org>
16073
16074 * arm-tdep.c (abstract_memory_reader): New class.
16075 (instruction_reader): New class.
16076 (extract_arm_insn): Add argument 'reader'. Callers updated.
16077 (decode_insn): Likewise.
16078
16079 2017-03-16 Doug Evans <dje@google.com>
16080
16081 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
16082 member. Change type of TYPE member to SCM. All uses updated.
16083 (lsscm_make_lazy_string_smob): Add assert.
16084 (lsscm_make_lazy_string): Flag bad length values.
16085 (lsscm_elt_type): New function.
16086 (gdbscm_lazy_string_to_value): Rewrite to use
16087 lsscm_safe_lazy_string_to_value.
16088 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
16089 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
16090 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
16091 in incoming type.
16092 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16093 * guile/scm-type.c (tyscm_scm_to_type): New function.
16094
16095 2017-03-15 Doug Evans <dje@google.com>
16096
16097 PR python/17728, python/18439, python/18779
16098 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
16099 member. Change type of TYPE member to PyObject *. All uses updated.
16100 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
16101 (gdbpy_create_lazy_string_object): Flag bad length values.
16102 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
16103 Handle typedefs in incoming type.
16104 (stpy_lazy_string_elt_type): New function.
16105 (gdbpy_extract_lazy_string): Call it.
16106 * python/py-value.c (valpy_lazy_string): Flag bad length values.
16107 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
16108 typedefs in incoming type.
16109
16110 2017-03-16 Doug Evans <dje@google.com>
16111
16112 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16113 * guile/scm-type.c (tyscm_scm_to_type): New function.
16114
16115 2017-03-16 Jiong Wang <jiong.wang@arm.com>
16116
16117 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
16118 "ULONGEST" for "skip".
16119
16120 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16121
16122 PR gdb/21220
16123 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
16124 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
16125 (inf_ptrace_peek_poke): ...here. New function. Now also loop
16126 over ptrace peek/poke until end of buffer or error.
16127
16128 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
16129
16130 * parse.c (length_of_subexp): Make static.
16131 * parser-defs.h (length_of_subexp): Remove.
16132
16133 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16134
16135 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
16136 as well.
16137
16138 2017-03-14 Pedro Alves <palves@redhat.com>
16139
16140 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
16141 (main): Use std::unique_ptr. Remove calls to
16142 cp_demangled_name_parse_free.
16143
16144 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16145
16146 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
16147 alphabsd_store_inferior_registers): Use regcache->ptid instead
16148 of inferior_ptid.
16149
16150 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16151
16152 * aix-thread.c (aix_thread_fetch_registers,
16153 aix_thread_store_registers): Use regcache->ptid instead of
16154 inferior_ptid.
16155
16156 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16157
16158 * aarch64-linux-nat.c (fetch_gregs_from_thread,
16159 store_gregs_to_thread, fetch_fpregs_from_thread,
16160 store_fpregs_to_thread): Use regcache->ptid instead of
16161 inferior_ptid.
16162
16163 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16164
16165 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
16166 amd64_linux_fetch_inferior_registers): Use regcache->ptid
16167 instead of inferior_ptid.
16168
16169 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16170
16171 * target.c (target_fetch_registers, target_store_registers): Add
16172 assert.
16173
16174 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16175
16176 * regcache.h (regcache_get_ptid): New function.
16177 * regcache.c (regcache_get_ptid): New function.
16178
16179 2017-03-13 Mark Wielaard <mark@klomp.org>
16180
16181 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
16182
16183 2017-03-10 Keith Seitz <keiths@redhat.com>
16184
16185 PR c++/8218
16186 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
16187
16188 2017-03-08 Pedro Alves <palves@redhat.com>
16189
16190 PR gdb/18360
16191 * infrun.c (start_step_over, do_target_resume, resume)
16192 (restart_threads): Assert we're not resuming a thread that is
16193 meant to be stopped.
16194 (infrun_thread_stop_requested_callback): Delete.
16195 (infrun_thread_stop_requested): If the thread is internally
16196 stopped, queue a pending stop event and clear the thread's
16197 inline-frame state.
16198 (handle_stop_requested): New function.
16199 (handle_syscall_event, handle_inferior_event_1): Use
16200 handle_stop_requested.
16201 (handle_stop_requested): New function.
16202 (handle_signal_stop): Set the thread's stop_signal here instead of
16203 at caller.
16204 (finish_step_over): Clear step over info unconditionally.
16205 (handle_signal_stop): If the user had interrupted the event
16206 thread, consider the stop a random signal.
16207 (handle_signal_stop) <signal arrived while stepping over
16208 breakpoint>: Don't restart threads here.
16209 (stop_waiting): Don't clear step-over info here.
16210
16211 2017-03-08 Pedro Alves <palves@redhat.com>
16212
16213 PR 21206
16214 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
16215 goes to argument 2, not 1.
16216
16217 2017-03-08 Pedro Alves <palves@redhat.com>
16218
16219 PR cli/21218
16220 * top.c (gdb_readline_wrapper): Avoid passing NULL to
16221 display_gdb_prompt.
16222 (command_line_input): Add comment.
16223
16224 2017-03-08 Pedro Alves <palves@redhat.com>
16225
16226 PR tui/21216
16227 * tui/tui-file.c (tui_file::write): New.
16228 * tui/tui-file.h (tui_file): Override "write".
16229 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16230 factored out from ...
16231 (tui_puts): ... here.
16232 (tui_putc): Use them.
16233 (tui_write): New function.
16234 * tui/tui-io.h (tui_write): Declare.
16235
16236 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16237
16238 * Makefile.in (SFILES): Replace "environ.c" with
16239 "common/environ.c".
16240 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16241 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16242 to...
16243 * common/environ.c: ... here.
16244 * environ.h: Moved to...
16245 * common/environ.h: ... here.
16246
16247 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16248
16249 * gdbarch.sh (pstring_ptr): New static function.
16250 (gdbarch_disassembler_options): Use it.
16251 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16252 not valid_disassembler_option->name.
16253 * gdbarch.c: Regenerate.
16254
16255 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16256
16257 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16258
16259 2017-03-07 Pedro Alves <palves@redhat.com>
16260
16261 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16262
16263 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
16264
16265 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16266 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16267 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16268 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16269
16270 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16271
16272 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16273
16274 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16275
16276 * remote.c (remote_add_target_side_commands): Use range-based
16277 for loop.
16278
16279 2017-03-03 Yao Qi <yao.qi@linaro.org>
16280
16281 PR gdb/21165
16282 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16283 value is lazy.
16284 * valprint.c (common_val_print): Likewise.
16285
16286 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16287
16288 * NEWS: Mention new set/show disassembler-options commands.
16289 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16290 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16291 (prospective_options): New static variable.
16292 (gdb_disassembler::gdb_disassembler): Initialize
16293 m_di.disassembler_options.
16294 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16295 (get_disassembler_options): New function.
16296 (set_disassembler_options): Likewise.
16297 (set_disassembler_options_sfunc): Likewise.
16298 (show_disassembler_options_sfunc): Likewise.
16299 (disassembler_options_completer): Likewise.
16300 (_initialize_disasm): Likewise.
16301 * disasm.h (get_disassembler_options): New prototype.
16302 (set_disassembler_options): Likewise.
16303 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16304 (gdbarch_verify_disassembler_options): Likewise.
16305 * gdbarch.c: Regenerate.
16306 * gdbarch.h: Likewise.
16307 * arm-tdep.c (num_disassembly_options): Delete.
16308 (set_disassembly_style): Likewise.
16309 (arm_disassembler_options): New static variable.
16310 (set_disassembly_style_sfunc): Convert short style name into long
16311 option name. Call set_disassembler_options.
16312 (show_disassembly_style_sfunc): New function.
16313 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16314 set_gdbarch_verify_disassembler_options.
16315 (_initialize_arm_tdep): Delete regnames variable and update callers.
16316 (arm_disassembler_options): Initialize.
16317 (disasm_options): New variable.
16318 (num_disassembly_options): Rename from this...
16319 (num_disassembly_styles): ...to this. Compute by scanning through
16320 disasm_options.
16321 (valid_disassembly_styles): Initialize using disasm_options.
16322 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16323 set_arm_regname_option.
16324 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16325 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16326 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16327 set_gdbarch_verify_disassembler_options.
16328 * s390-tdep.c (s390_disassembler_options): New static variable.
16329 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16330 set_gdbarch_verify_disassembler_options.
16331
16332 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16333
16334 * remote.c (remote_add_target_side_condition): Remove "struct"
16335 keyword from range-based for loop.
16336
16337 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16338
16339 * remote.c (remote_add_target_side_condition): Use range-based
16340 for loop. Update comment.
16341
16342 2017-02-27 Yao Qi <yao.qi@linaro.org>
16343
16344 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16345
16346 2017-02-26 Alan Hayward <alan.hayward@arm.com>
16347
16348 * regcache.c (regcache_raw_update): New function.
16349 (regcache_raw_read): Move code to regcache_raw_update.
16350 * regcache.h (regcache_raw_update): New declaration.
16351 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16352
16353 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16354
16355 * dwarf2read.c (create_debug_type_hash_table): Initialize
16356 header.signature and header.type_offset_in_tu.
16357
16358 2017-02-24 Pedro Alves <palves@redhat.com>
16359
16360 * symtab.c (make_file_symbol_completion_list_1): Use
16361 add_symtab_completions.
16362
16363 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16364
16365 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16366
16367 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16368
16369 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16370 I386_MAX_REGISTER_SIZE.
16371 (i386_pseudo_register_write): Likewise.
16372 (i386_process_record): Likewise.
16373 * i387-tdep.c (i387_supply_xsave): Likewise.
16374 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16375 (store_register): Likewise.
16376
16377 2017-02-23 Pedro Alves <palves@redhat.com>
16378
16379 * ada-lang.c: Include "common/function-view.h".
16380 (ada_iterate_over_symbols): Adjust to use function_view as
16381 callback type.
16382 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16383 (ada_make_symbol_completion_list): Use a lambda.
16384 (ada_exc_search_name_matches): Delete.
16385 (name_matches_regex): New.
16386 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16387 * compile/compile-c-support.c: Include "common/function-view.h".
16388 (print_one_macro): Change prototype to accept a ui_file pointer.
16389 (write_macro_definitions): Use a lambda.
16390 * dwarf2read.c: Include "common/function-view.h".
16391 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16392 (dw2_expand_symtabs_matching): Adjust to use function_view as
16393 callback type.
16394 * language.h: Include "common/function-view.h".
16395 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16396 function_view as callback type.
16397 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16398 * linespec.c: Include "common/function-view.h".
16399 (collect_info::add_symbol): New method.
16400 (struct symbol_and_data_callback, iterate_inline_only, struct
16401 symbol_matcher_data, iterate_name_matcher): Delete.
16402 (iterate_over_all_matching_symtabs): Adjust to use function_view
16403 as callback type and lambdas.
16404 (iterate_over_file_blocks): Adjust to use function_view as
16405 callback type.
16406 (decode_compound_collector): Now a class with private fields.
16407 (decode_compound_collector::release_symbols): New method.
16408 (collect_one_symbol): Rename to...
16409 (decode_compound_collector::operator()): ... this and adjust.
16410 (lookup_prefix_sym): decode_compound_collector construction bits
16411 move to decode_compound_collector ctor. Pass the
16412 decode_compound_collector object directly as callback. Remove
16413 cleanups and use decode_compound_collector::release_symbols
16414 instead.
16415 (symtab_collector): Now a class with private fields.
16416 (symtab_collector::release_symtabs): New method.
16417 (add_symtabs_to_list): Rename to...
16418 (symtab_collector::operator()): ... this and adjust.
16419 (collect_symtabs_from_filename): symtab_collector construction
16420 bits move to symtab_collector ctor. Pass the symtab_collector
16421 object directly as callback. Remove cleanups and use
16422 symtab_collector::release_symtabs instead.
16423 (collect_symbols): Delete.
16424 (add_matching_symbols_to_info): Use lambdas.
16425 * macrocmd.c (print_macro_callback): Delete.
16426 (info_macro_command): Use a lambda.
16427 (info_macros_command): Pass print_macro_definition as callable
16428 directly.
16429 (print_one_macro): Remove 'ignore' parameter.
16430 (macro_list_command): Adjust.
16431 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16432 (macro_for_each_data::user_data): Delete field.
16433 (foreach_macro): Adjust to call the function_view.
16434 (macro_for_each): Adjust to use function_view as callback type.
16435 (foreach_macro_in_scope): Adjust to call the function_view.
16436 (macro_for_each_in_scope): Adjust to use function_view as callback
16437 type.
16438 * macrotab.h: Include "common/function-view.h".
16439 (macro_callback_fn): Declare a prototype instead of a pointer.
16440 Remove "user_data" parameter.
16441 (macro_for_each, macro_for_each_in_scope): Adjust to use
16442 function_view as callback type.
16443 * psymtab.c (partial_map_expand_apply)
16444 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16445 Adjust to use function_view as callback type and to return bool.
16446 (psym_expand_symtabs_matching): Adjust to use function_view as
16447 callback types.
16448 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16449 to use function_view as callback type and to return bool.
16450 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16451 callback types.
16452 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16453 as callback types.
16454 * symfile.h: Include "common/function-view.h".
16455 (expand_symtabs_file_matcher_ftype)
16456 (expand_symtabs_symbol_matcher_ftype)
16457 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16458 return bool.
16459 (quick_symbol_functions::map_symtabs_matching_filename)
16460 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16461 function_view as callback type and return bool.
16462 (expand_symtabs_matching): Adjust to use function_view as callback
16463 type.
16464 (maintenance_expand_name_matcher)
16465 (maintenance_expand_file_matcher): Delete.
16466 (maintenance_expand_symtabs): Use lambdas.
16467 * symtab.c (iterate_over_some_symtabs): Adjust to use
16468 function_view as callback types and return bool.
16469 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16470 of a cleanup.
16471 (lookup_symtab_callback): Delete.
16472 (lookup_symtab): Use a lambda.
16473 (iterate_over_symbols): Adjust to use function_view as callback
16474 type.
16475 (struct search_symbols_data, search_symbols_file_matches)
16476 (search_symbols_name_matches): Delete.
16477 (search_symbols): Use a pair of lambdas.
16478 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16479 (symtab_expansion_callback): Delete.
16480 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16481 * symtab.h: Include "common/function-view.h".
16482 (iterate_over_some_symtabs): Adjust to use function_view as
16483 callback type and return bool.
16484 (iterate_over_symtabs): Adjust to use function_view as callback
16485 type.
16486 (symbol_found_callback_ftype): Remove 'data' parameter and return
16487 bool.
16488 (iterate_over_symbols): Adjust to use function_view as callback
16489 type.
16490
16491 2017-02-23 Pedro Alves <palves@redhat.com>
16492
16493 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16494 (%.o) <unittests/%.c>: New pattern.
16495 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16496 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16497 * common/function-view.h: New file.
16498 * unittests/function-view-selftests.c: New file.
16499 * configure: Regenerate.
16500
16501 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16502
16503 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16504 inferior_ptid.
16505 * go32-nat.c (go32_thread_alive): Likewise.
16506
16507 2017-02-23 Yao Qi <yao.qi@linaro.org>
16508
16509 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16510 delete.
16511
16512 2017-02-23 Yao Qi <yao.qi@linaro.org>
16513
16514 * varobj.c (varobj_clear_saved_item): Use delete instead of
16515 xfree.
16516 (update_dynamic_varobj_children): Likewise.
16517
16518 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16519
16520 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16521
16522 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16523
16524 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16525 m_enum_value to 0 in default constructor.
16526
16527 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16528
16529 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16530 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16531 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16532 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16533 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16534 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16535 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16536 IS_STORE_CONDITIONAL_INSN.
16537
16538 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16539
16540 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16541
16542 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16543
16544 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16545
16546 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16547
16548 * dwarf2read.c (skip_one_die, read_attribute_value)
16549 (dwarf2_const_value_attr, dump_die_shallow)
16550 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16551 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16552
16553 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16554
16555 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16556 (dwarf_parse_macro_header): Accept DWARF version 5.
16557 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16558
16559 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16560
16561 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16562 DW_AT_GNU_*.
16563 * common/common-exceptions.h (enum errors): Likewise.
16564 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16565 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16566 (dwarf_expr_context::execute_stack_op): Likewise.
16567 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16568 Likewise.
16569 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16570 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16571 (show_entry_values_debug, call_site_to_target_addr)
16572 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16573 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16574 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16575 (value_of_dwarf_block_entry, indirect_pieced_value)
16576 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16577 (disassemble_dwarf_expression): Likewise.
16578 * dwarf2read.c (process_die, inherit_abstract_dies)
16579 (read_call_site_scope): Likewise.
16580 * gdbtypes.h (struct func_type, struct call_site_parameter)
16581 (struct call_site): Likewise.
16582 * stack.c (read_frame_arg): Likewise.
16583 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16584
16585 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16586
16587 * defs.h (read_unsigned_leb128): New declaration.
16588 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16589 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16590 (dwarf2_find_location_expression): Call also
16591 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16592 * dwarf2loc.h (dwarf2_version): New declaration.
16593 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16594 rnglists.
16595 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16596 .debug_rnglists.
16597 (struct dwop_section_names): Add loclists_dwo.
16598 (dwop_section_names): Add .debug_loclists.dwo.
16599 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16600 (struct dwarf2_per_cu_data): Add dwarf_version.
16601 (struct dwo_sections): Add loclists.
16602 (struct attr_abbrev): Add implicit_const.
16603 (read_indirect_line_string): New declaration.
16604 (read_unsigned_leb128): Delete declaration.
16605 (rcuh_kind): New definition.
16606 (read_and_check_comp_unit_head): Change parameter
16607 is_debug_types_section to section_kind.
16608 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16609 (read_comp_unit_head): Change parameter abfd to section, add parameter
16610 section_kind. Handle DWARF-5.
16611 (error_check_comp_unit_head): Accept also DWARF version 5.
16612 (read_and_check_comp_unit_head): Change parameter
16613 is_debug_types_section to section_kind.
16614 (read_and_check_type_unit_head): Delete function.
16615 (read_abbrev_offset): Handle DWARF-5.
16616 (create_debug_type_hash_table): Add parameter section_kind. Process
16617 only DW_UT_type. Use signature and type_offset_in_tu from struct
16618 comp_unit_head.
16619 (create_debug_types_hash_table): Update create_debug_type_hash_table
16620 caller.
16621 (create_all_type_units): Call create_debug_type_hash_table.
16622 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16623 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16624 caller.
16625 (skip_one_die): Handle DW_FORM_implicit_const.
16626 (dwarf2_rnglists_process): New function.
16627 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16628 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16629 (read_attribute_value): Handle DW_FORM_implicit_const,
16630 DW_FORM_line_strp.
16631 (read_attribute): Handle DW_FORM_implicit_const.
16632 (read_indirect_string_at_offset_from): New function from
16633 read_indirect_string_at_offset.
16634 (read_indirect_string_at_offset): Call
16635 read_indirect_string_at_offset_from.
16636 (read_indirect_line_string_at_offset): New function.
16637 (read_indirect_string): New function comment.
16638 (read_indirect_line_string): New function.
16639 (read_unsigned_leb128): Make it global.
16640 (dwarf2_string_attr): Handle DWARF-5.
16641 (add_include_dir_stub, read_formatted_entries): New functions.
16642 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16643 Handle DWARF-5.
16644 (per_cu_header_read_in): Update read_comp_unit_head caller.
16645 (dwarf2_version): New function.
16646 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16647 rnglists.
16648 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16649 fields.
16650
16651 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16652
16653 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16654
16655 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16656
16657 * dwarf2read.c (dwarf2_ranges_process): New function from
16658 dwarf2_ranges_read.
16659 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16660 dwarf2_ranges_process.
16661
16662 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16663
16664 * dwarf2read.c (create_debug_type_hash_table): New function from
16665 create_debug_types_hash_table.
16666 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16667 (create_all_type_units, open_and_init_dwo_file): Update
16668 create_debug_types_hash_table callers.
16669
16670 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16671
16672 PR gdb/16188
16673 * fork-child.c (trace_start_error): Fix thinko. va_end should
16674 refer to 'ap', not 'args'.
16675
16676 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16677 Pedro Alves <palves@redhat.com>
16678
16679 PR gdb/16188
16680 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16681 calls succeeded.
16682 * fork-child.c (trace_start_error): New function.
16683 (trace_start_error_with_name): Likewise.
16684 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16685 * inf-ptrace.c (inf_ptrace_me): Likewise.
16686 * inferior.h (trace_start_error): New prototype.
16687 (trace_start_error_with_name): Likewise.
16688
16689 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16690
16691 PR gdb/21164
16692 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16693 NULL before using it.
16694 * symmisc.c (maintenance_print_symbols): Likewise.
16695 (maintenance_print_msymbols): Likewise.
16696
16697 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16698
16699 * NEWS: Add record Python bindings entry.
16700
16701 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16702
16703 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16704 py-record-full.o.
16705 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16706 * python/py-record-btrace.c, python/py-record-btrace.h,
16707 python/py-record-full.c, python/py-record-full.h: New file.
16708 * python/py-record.c: Add include for py-record-btrace.h and
16709 py-record-full.h.
16710 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16711 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16712 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16713 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16714 New definition.
16715 (gdbpy_initialize_btrace): New export.
16716 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16717
16718 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16719
16720 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16721 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16722 * python/py-record.c: New file.
16723 * python/python-internal.h (gdbpy_start_recording,
16724 gdbpy_current_recording, gdpy_stop_recording,
16725 gdbpy_initialize_record): New export.
16726 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16727 (python_GdbMethods): Add gdbpy_start_recording,
16728 gdbpy_current_recording and gdbpy_stop_recording.
16729
16730 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16731
16732 * record-btrace.c (record_btrace_record_method): New function.
16733 (init_record_btrace_ops): Initialize to_record_method.
16734 * record-full.c (record_full_record_method): New function.
16735 (init_record_full_ops, init_record_full_core_ops): Add
16736 record_full_record_method.
16737 * record.h (enum record_method): New enum.
16738 * target-debug.h (target_debug_print_enum_record_method: New define.
16739 * target-delegates.c: Regenerate.
16740 * target.c (target_record_method): New function.
16741 * target.h: Include record.h.
16742 (struct target_ops) <to_record_method>: New field.
16743 (target_record_method): New export.
16744
16745 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16746
16747 * record.h (record_start, record_stop): New export.
16748 * record.c (record_start, record_stop): New function.
16749
16750 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16751
16752 * btrace.c (btrace_fetch): Copy function call segments pointer
16753 into a vector.
16754 (btrace_clear): Clear the vector.
16755 (btrace_find_insn_by_number): Use binary search to find the correct
16756 function call segment.
16757 * btrace.h (brace_fun_p): New typedef.
16758 (struct btrace_thread_info) <functions>: New field.
16759
16760 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16761
16762 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16763 * btrace.c (btrace_decode_error): ... here. New function.
16764 * btrace.h (btrace_decode_error): New export.
16765
16766 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16767
16768 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16769 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16770 btrace_find_insn_by_number): Remove special case for gaps.
16771 * btrace.h (btrace_insn_get_error): New export.
16772 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16773 * record-btrace.c (btrace_insn_history): Print number for gaps.
16774 (record_btrace_info, record_btrace_goto): Handle gaps.
16775
16776 2017-02-14 Tom Tromey <tom@tromey.com>
16777
16778 PR python/13598:
16779 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16780 event.
16781 * python/py-evts.c (gdbpy_initialize_py_events): Add
16782 before_prompt registry.
16783 * python/py-events.h (events_object) <before_prompt>: New field.
16784
16785 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16786
16787 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16788
16789 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16790
16791 * symfile (_initialize_symfile): Add usage text to the load command's
16792 help text.
16793
16794 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16795
16796 * utils.c (defaulted_query): Don't query on secondary UIs.
16797
16798 2017-02-10 Tom Tromey <tom@tromey.com>
16799
16800 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16801
16802 2017-02-10 Tom Tromey <tom@tromey.com>
16803
16804 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16805 "cleanup" local.
16806 * python/py-type.c (typy_legacy_template_argument): Remove
16807 unnecessary "cleanup" local.
16808
16809 2017-02-10 Tom Tromey <tom@tromey.com>
16810
16811 * python/python.c (do_start_initialization): New function, from
16812 _initialize_python.
16813 (_initialize_python): Call do_start_initialization.
16814 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16815 goto.
16816
16817 2017-02-10 Tom Tromey <tom@tromey.com>
16818
16819 * python/py-prettyprint.c (pretty_print_one_value): Use
16820 gdbpy_ref.
16821
16822 2017-02-10 Tom Tromey <tom@tromey.com>
16823
16824 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16825 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16826 gdbpy_ref.
16827 * python/py-type.c (field_new): Use gdbpy_ref.
16828 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16829 gdbpy_ref.
16830 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16831 (py_free_pspace): Likewise.
16832 (pspace_to_pspace_object): Likewise.
16833 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16834 (py_free_objfile): Likewise.
16835 (objfile_to_objfile_object): Likewise.
16836 * python/py-inferior.c (delete_thread_object): Use
16837 gdbpy_ref.
16838 (infpy_read_memory): Likewise.
16839 (py_free_inferior): Likewise.
16840 * python/py-evtregistry.c (create_eventregistry_object): Use
16841 gdbpy_ref.
16842 * python/py-event.c (create_event_object): Use gdbpy_ref.
16843
16844 2017-02-10 Tom Tromey <tom@tromey.com>
16845
16846 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16847 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16848 used.
16849 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16850 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16851 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16852 python/py-framefilter.c, python/py-function.c,
16853 python/py-inferior.c, python/py-infevents.c,
16854 python/py-linetable.c, python/py-newobjfileevent.c,
16855 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16856 python/py-signalevent.c, python/py-stopevent.c,
16857 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16858 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16859 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16860 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16861
16862 2017-02-10 Tom Tromey <tom@tromey.com>
16863
16864 * ui-out.h (ui_out_emit_type): New class.
16865 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16866 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16867 and ui_out_emit_tuple.
16868 (enumerate_locals): Likewise.
16869 (py_mi_print_variables, py_print_locals, py_print_args): Use
16870 ui_out_emit_list.
16871 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16872 ui_out_emit_list.
16873 * common/gdb_optional.h: New file.
16874
16875 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16876
16877 * MAINTAINERS (Write After Approval): Update my e-mail address.
16878
16879 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16880
16881 PR gdb/21122
16882 * breakpoint.c (_initialize_breakpoint): Update the help description
16883 of the 'commands' command to indicate that it takes a list argument.
16884
16885 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16886
16887 * interps.c (current_interp_set_logging): Remove "return".
16888
16889 2017-02-09 Gary Benson <gbenson@redhat.com>
16890
16891 * symtab.c (add_symtab_completions): Prevent NULL pointer
16892 dereference.
16893
16894 2017-02-08 Pedro Alves <palves@redhat.com>
16895
16896 * interps.c (interp::interp): Remove reference to quiet_p.
16897 (interp_set): Make static. Remove dead "Switching to" output
16898 code.
16899 (interp_quiet_p, interp_set_quiet): Delete.
16900 (interpreter_exec_cmd): Don't set the interpreter quiet.
16901 * interps.h (interp_quiet_p): Make static.
16902 (class interp) <quiet_p>: Remove field
16903
16904 2017-02-08 Jerome Guitton <guitton@adacore.com>
16905
16906 * cli/cli-decode.c (find_command_name_length): Make it extern.
16907 * cli/cli-decode.h (find_command_name_length): Declare.
16908 * cli/cli-script.c (command_name_equals, line_first_arg):
16909 New functions.
16910 (process_next_line): Use cli-decode to parse command names.
16911 (build_command_line): Make args a constant pointer.
16912
16913 2017-02-08 Jerome Guitton <guitton@adacore.com>
16914
16915 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16916 Remove case-insensitive search.
16917
16918 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16919
16920 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16921 at the end of the line. Avoids an ARI warning.
16922
16923 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16924
16925 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16926 rdseed instructions.
16927 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16928
16929 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16930
16931 PR tdep/20936
16932 Provide and use sparc32 and sparc64 target description XML files.
16933 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16934 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16935 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16936 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16937 * features/sparc/sparc32-solaris.xml: New file.
16938 * features/sparc/sparc64-solaris.xml: New file.
16939 * features/sparc/sparc32-solaris.c: Generated.
16940 * features/sparc/sparc64-solaris.c: Generated.
16941 * sparc-tdep.h: Account for differences in target descriptions.
16942 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16943 (sparc32_register_type): Use target provided registers.
16944 (validate_tdesc_registers): New function.
16945 (sparc32_gdbarch_init): Use tdesc_has_registers.
16946 Set pseudoregister functions.
16947 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16948 (sparc64_register_type): Use target provided registers.
16949 (sparc64_init_abi): Set pseudoregister functions.
16950
16951 2017-02-03 Tom Tromey <tom@tromey.com>
16952
16953 PR rust/21097:
16954 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16955 with a single member.
16956
16957 2017-02-03 Pedro Alves <palves@redhat.com>
16958
16959 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16960 (cli_interp_base::~cli_interp_base): New.
16961 (cli_interp): New struct.
16962 (as_cli_interp): Cast the interp itself to cli_interp.
16963 (cli_interpreter_pre_command_loop): Rename to ...
16964 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16965 parameter.
16966 (cli_interpreter_init): Rename to ...
16967 (cli_interp::init): ... this. Remove 'self' parameter. Use
16968 boolean. Make extern.
16969 (cli_interpreter_resume): Rename to ...
16970 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16971 extern.
16972 (cli_interpreter_suspend): Rename to ...
16973 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16974 extern.
16975 (cli_interpreter_exec): Rename to ...
16976 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16977 extern.
16978 (cli_interpreter_supports_command_editing): Rename to ...
16979 (cli_interp_base::supports_command_editing): ... this. Remove
16980 'interp' parameter. Make extern.
16981 (cli_ui_out): Rename to ...
16982 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16983 Make extern.
16984 (cli_set_logging): Rename to ...
16985 (cli_interp_base::set_logging): ... this. Remove 'interp'
16986 parameter. Make extern.
16987 (cli_interp_procs): Delete.
16988 (cli_interp_factory): Adjust to use "new".
16989 * cli/cli-interp.h: Include "interps.h".
16990 (struct cli_interp_base): New struct.
16991 * interps.c (struct interp): Delete. Fields moved to interps.h.
16992 (interp_new): Delete.
16993 (interp::interp, interp::~interp): New.
16994 (interp_set): Use bool, and return void. Assume the interpreter
16995 has suspend, init and resume methods, and that the all return
16996 void.
16997 (set_top_level_interpreter): interp_set returns void.
16998 (interp_ui_out): Adapt.
16999 (current_interp_set_logging): Adapt.
17000 (interp_data): Delete.
17001 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
17002 (interp_exec): Adapt.
17003 (top_level_interpreter_data): Delete.
17004 * interps.h (interp_init_ftype, interp_resume_ftype)
17005 (interp_suspend_ftype, interp_exec_ftype)
17006 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
17007 (class interp): New.
17008 (interp_new): Delete.
17009 (interp_set): Now returns void. Use bool.
17010 (interp_data, top_level_interpreter_data): Delete.
17011 * mi/mi-common.h: Include interps.h.
17012 (class mi_interp): Inherit from interp. Define a ctor. Declare
17013 init, resume, suspect, exec, interp_ui_out, set_logging and
17014 pre_command_loop methods.
17015 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
17016 (mi_interpreter_init): Rename to ...
17017 (mi_interp::init): ... this. Remove the 'interp' parameter, use
17018 bool, return void and make extern. Adjust.
17019 (mi_interpreter_resume): ... Rename to ...
17020 (mi_interp::resume): ... this. Remove the 'data' parameter,
17021 return void and make extern. Adjust.
17022 (mi_interpreter_suspend): ... Rename to ...
17023 (mi_interp::suspend): ... this. Remove the 'data' parameter,
17024 return void and make extern. Adjust.
17025 (mi_interpreter_exec): ... Rename to ...
17026 (mi_interp::exec): ... this. Remove the 'data' parameter and make
17027 extern. Adjust.
17028 (mi_interpreter_pre_command_loop): ... Rename to ...
17029 (mi_interp::pre_command_loop): ... this. Remove the 'self'
17030 parameter and make extern.
17031 (mi_on_normal_stop_1): Adjust.
17032 (mi_ui_out): Rename to ...
17033 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
17034 parameter and make extern. Adjust.
17035 (mi_set_logging): Rename to ...
17036 (mi_interp::set_logging): ... this. Remove the 'interp'
17037 parameter and make extern. Adjust.
17038 (mi_interp_procs): Delete.
17039 (mi_interp_factory): Adjust to use 'new'.
17040 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
17041 (mi_print_exception, mi_execute_command, mi_load_progress):
17042 Adjust.
17043 * tui/tui-interp.c (tui_interp): New class.
17044 (as_tui_interp): Return a tui_interp pointer.
17045 (tui_on_normal_stop, tui_on_signal_received)
17046 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
17047 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
17048 to use interp::interp_ui_out.
17049 (tui_init): Rename to ...
17050 (tui_interp::init): ... this. Remove the 'self' parameter, use
17051 bool, return void and make extern. Adjust.
17052 (tui_resume): Rename to ...
17053 (tui_interp::resume): ... this. Remove the 'data' parameter,
17054 return void and make extern. Adjust.
17055 (tui_suspend): Rename to ...
17056 (tui_interp::suspend): ... this. Remove the 'data' parameter,
17057 return void and make extern. Adjust.
17058 (tui_ui_out): Rename to ...
17059 (tui_interp::interp_ui_out): ... this. Remove the 'self'
17060 parameter, and make extern. Adjust.
17061 (tui_exec): Rename to ...
17062 (tui_interp::exec): ... this. Remove the 'data' parameter and
17063 make extern.
17064 (tui_interp_procs): Delete.
17065 (tui_interp_factory): Use "new".
17066
17067 2017-02-02 Tom Tromey <tom@tromey.com>
17068
17069 * rust-exp.y (ends_raw_string, space_then_number)
17070 (rust_identifier_start_p): Return bool.
17071 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
17072 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
17073 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
17074 (rust_chartype_p): Return bool.
17075 (val_print_struct, rust_print_struct_def, rust_print_type):
17076 Update.
17077 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
17078 Return bool.
17079
17080 2017-02-02 Tom Tromey <tom@tromey.com>
17081
17082 * rust-lang.c: Reindent.
17083
17084 2017-02-02 Tom Tromey <tom@tromey.com>
17085
17086 * rust-lang.h (rust_crate_for_block): Update.
17087 * rust-lang.c (rust_crate_for_block): Return std::string.
17088 (rust_get_disr_info): Use std:;string, not
17089 gdb::unique_xmalloc_ptr.
17090 * rust-exp.y (crate_name): Update.
17091
17092 2017-02-02 Pedro Alves <palves@redhat.com>
17093
17094 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
17095 field out of gdb_disassembler_test and make it static.
17096
17097 2017-02-02 Pedro Alves <palves@redhat.com>
17098
17099 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
17100 mi1_interp and mi_interp fields.
17101
17102 2017-02-02 Pedro Alves <palves@redhat.com>
17103
17104 * cli/cli-interp.c (struct saved_output_files, saved_output):
17105 Moved from cli/cli-logging.c.
17106 (cli_set_logging): New function.
17107 (cli_interp_procs): Install cli_set_logging.
17108 * cli/cli-interp.h (make_logging_output, cli_set_logging):
17109 Declare.
17110 * cli/cli-logging.c (struct saved_output_files, saved_output):
17111 Moved to cli/cli-interp.c.
17112 (pop_output_files): Don't save outputs here.
17113 (make_logging_output): New function.
17114 (handle_redirections): Don't build tee nor save previous outputs
17115 here.
17116 * interps.c (current_interp_set_logging): Change prototype.
17117 Assume there's always a set_logging_proc method installed.
17118 * interps.h (interp_set_logging_ftype): Change prototype.
17119 (current_interp_set_logging): Change prototype and adjust comment.
17120 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
17121 use make_logging_output.
17122 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
17123 2017-02-02 Pedro Alves <palves@redhat.com>
17124
17125 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
17126 from ...
17127 (set_logging_overwrite): ... here.
17128 (logging_no_redirect_file): Delete.
17129 (set_logging_redirect): Don't handle redirection on the fly.
17130 Instead warn that "logging off" / "logging on" is necessary.
17131 (pop_output_files): Delete references to logging_no_redirect_file.
17132 (show_logging_command): Always speak in terms of what will happen
17133 once logging is reenabled.
17134
17135 2017-02-02 Pedro Alves <palves@redhat.com>
17136
17137 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
17138
17139 2017-02-02 Pedro Alves <palves@redhat.com>
17140
17141 * disasm.c (gdb_pretty_print_insn): Rename to ...
17142 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
17143 Remove gdbarch parameter. Adapt to clear the object's buffers
17144 instead of allocating new buffers, and to print using the object's
17145 gdb_disassembler instead of calling gdb_print_insn.
17146 (dump_insns): Use gdb_pretty_print_disassembler.
17147 * disasm.h (gdb_pretty_print_insn): Delete declaration.
17148 (gdb_pretty_print_disassembler): New class.
17149 * record-btrace.c (btrace_insn_history): Use
17150 gdb_pretty_print_disassembler.
17151
17152 2017-02-02 Pedro Alves <palves@redhat.com>
17153
17154 * ada-lang.c (type_as_string): Use string_file.
17155 * ada-valprint.c (ada_print_floating): Use string_file.
17156 * ada-varobj.c (ada_varobj_scalar_image)
17157 (ada_varobj_get_value_image): Use string_file.
17158 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
17159 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
17160 * breakpoint.c (update_inserted_breakpoint_locations)
17161 (insert_breakpoint_locations, reattach_breakpoints)
17162 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
17163 (print_it_watchpoint): Use string_file.
17164 (save_breakpoints): Use stdio_file.
17165 * c-exp.y (oper): Use string_file.
17166 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
17167 tee_file.
17168 (pop_output_files): Use delete.
17169 (handle_redirections): Use stdio_file and tee_file.
17170 * cli/cli-setshow.c (do_show_command): Use string_file.
17171 * compile/compile-c-support.c (c_compute_program): Use
17172 string_file.
17173 * compile/compile-c-symbols.c (generate_vla_size): Take a
17174 'string_file &' instead of a 'ui_file *'.
17175 (generate_c_for_for_one_variable): Take a 'string_file &' instead
17176 of a 'ui_file *'. Use string_file.
17177 (generate_c_for_variable_locations): Take a 'string_file &'
17178 instead of a 'ui_file *'.
17179 * compile/compile-internal.h (generate_c_for_for_one_variable):
17180 Take a 'string_file &' instead of a 'ui_file *'.
17181 * compile/compile-loc2c.c (push, pushf, unary, binary)
17182 (print_label, pushf_register_address, pushf_register)
17183 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
17184 'ui_file *'. Adjust.
17185 * compile/compile.c (compile_to_object): Use string_file.
17186 * compile/compile.h (compile_dwarf_expr_to_c)
17187 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
17188 'ui_file *'.
17189 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
17190 (replace_typedefs_qualified_name): Use string_file and
17191 obstack_copy0.
17192 * disasm.c (gdb_pretty_print_insn): Use string_file.
17193 (gdb_disassembly): Adjust reference the null_stream global.
17194 (do_ui_file_delete): Delete.
17195 (gdb_insn_length): Use null_stream.
17196 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
17197 * dwarf2loc.c (dwarf2_compile_property_to_c)
17198 (locexpr_generate_c_location, loclist_generate_c_location): Take a
17199 'string_file &' instead of a 'ui_file *'.
17200 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
17201 * dwarf2read.c (do_ui_file_peek_last): Delete.
17202 (dwarf2_compute_name): Use string_file.
17203 * event-top.c (gdb_setup_readline): Use stdio_file.
17204 * gdbarch.sh (verify_gdbarch): Use string_file.
17205 * gdbtypes.c (safe_parse_type): Use null_stream.
17206 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
17207 string_file.
17208 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
17209 'string_file *' instead of a 'ui_file *'.
17210 (gdbscm_arch_disassemble): Use string_file.
17211 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
17212 * guile/scm-ports.c (class ioscm_file_port): Now a class that
17213 inherits from ui_file.
17214 (ioscm_file_port_delete, ioscm_file_port_rewind)
17215 (ioscm_file_port_put): Delete.
17216 (ioscm_file_port_write): Rename to ...
17217 (ioscm_file_port::write): ... this. Remove file_port_magic
17218 checks.
17219 (ioscm_file_port_new): Delete.
17220 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
17221 ui_file_up.
17222 * guile/scm-type.c (tyscm_type_name): Use string_file.
17223 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
17224 Use string_file.
17225 * infcmd.c (print_return_value_1): Use string_file.
17226 * infrun.c (print_target_wait_results): Use string_file.
17227 * language.c (add_language): Use string_file.
17228 * location.c (explicit_to_string_internal): Use string_file.
17229 * main.c (captured_main_1): Use null_file.
17230 * maint.c (maintenance_print_architecture): Use stdio_file.
17231 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17232 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17233 event_channel>: Change type to mi_console_file pointer.
17234 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17235 (mi_console_file_delete): Delete.
17236 (struct mi_console_file): Delete.
17237 (mi_console_file_magic): Delete.
17238 (mi_console_file_new): Delete.
17239 (mi_console_file::mi_console_file): New.
17240 (mi_console_file_delete): Delete.
17241 (mi_console_file_fputs): Delete.
17242 (mi_console_file::write): New.
17243 (mi_console_raw_packet): Delete.
17244 (mi_console_file::flush): New.
17245 (mi_console_file_flush): Delete.
17246 (mi_console_set_raw): Rename to ...
17247 (mi_console_file::set_raw): ... this.
17248 * mi/mi-console.h (class mi_console_file): New class.
17249 (mi_console_file_new, mi_console_set_raw): Delete.
17250 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17251 (mi_set_logging): Use delete and tee_file. Adjust.
17252 * mi/mi-main.c (output_register): Use string_file.
17253 (mi_cmd_data_evaluate_expression): Use string_file.
17254 (mi_cmd_data_read_memory): Use string_file.
17255 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17256 * mi/mi-out.c (mi_ui_out::main_stream): New.
17257 (mi_ui_out::rewind): Use main_stream and
17258 string_file.
17259 (mi_ui_out::put): Use main_stream and string_file.
17260 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17261 Allocate a 'string_file' instead.
17262 (mi_out_new): Don't allocate a mem_fileopen stream here.
17263 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17264 (mi_ui_out::main_stream): Declare method.
17265 * printcmd.c (eval_command): Use string_file.
17266 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17267 * python/py-arch.c (archpy_disassemble): Use string_file.
17268 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17269 * python/py-frame.c (frapy_str): Use string_file.
17270 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17271 Use string_file.
17272 * python/py-type.c (typy_str): Use string_file.
17273 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17274 * python/py-value.c (valpy_str): Use string_file.
17275 * record-btrace.c (btrace_insn_history): Use string_file.
17276 * regcache.c (regcache_print): Use stdio_file.
17277 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17278 * remote.c (escape_buffer): Use string_file.
17279 * rust-lang.c (rust_get_disr_info): Use string_file.
17280 * serial.c (serial_open_ops_1): Use stdio_file.
17281 (do_serial_close): Use delete.
17282 * stack.c (print_frame_arg): Use string_file.
17283 (print_frame_args): Remove local mem_fileopen stream, not used.
17284 (print_frame): Use string_file.
17285 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17286 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17287 Take a 'string_file *' instead of a 'ui_file *'.
17288 * top.c (new_ui): Use stdio_file and stderr_file.
17289 (free_ui): Use delete.
17290 (execute_command_to_string): Use string_file.
17291 (quit_confirm): Use string_file.
17292 * tracepoint.c (collection_list::append_exp): Use string_file.
17293 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17294 * tui/tui-file.c: Don't include "ui-file.h".
17295 (enum streamtype, struct tui_stream): Delete.
17296 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17297 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17298 (tui_file::tui_file): New method.
17299 (tui_file_fputs): Delete.
17300 (tui_file_get_strbuf): Delete.
17301 (tui_file::puts): New method.
17302 (tui_file_adjust_strbuf): Delete.
17303 (tui_file_flush): Delete.
17304 (tui_file::flush): New method.
17305 * tui/tui-file.h: Tweak intro comment.
17306 Include ui-file.h.
17307 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17308 (tui_file_adjust_strbuf): Delete declarations.
17309 (class tui_file): New class.
17310 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17311 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17312 (tui_register_format): Use string_stream.
17313 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17314 (tui_get_function_from_frame): Use string_file.
17315 * typeprint.c (type_to_string): Use string_file.
17316 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17317 (null_stream): New global.
17318 (ui_file_delete): Delete.
17319 (ui_file::ui_file): New.
17320 (null_file_isatty): Delete.
17321 (ui_file::~ui_file): New.
17322 (null_file_rewind): Delete.
17323 (ui_file::printf): New.
17324 (null_file_put): Delete.
17325 (null_file_flush): Delete.
17326 (ui_file::putstr): New.
17327 (null_file_write): Delete.
17328 (ui_file::putstrn): New.
17329 (null_file_read): Delete.
17330 (ui_file::putc): New.
17331 (null_file_fputs): Delete.
17332 (null_file_write_async_safe): Delete.
17333 (ui_file::vprintf): New.
17334 (null_file_delete): Delete.
17335 (null_file::write): New.
17336 (null_file_fseek): Delete.
17337 (null_file::puts): New.
17338 (ui_file_data): Delete.
17339 (null_file::write_async_safe): New.
17340 (gdb_flush, ui_file_isatty): Adjust.
17341 (ui_file_put, ui_file_rewind): Delete.
17342 (ui_file_write): Adjust.
17343 (ui_file_write_for_put): Delete.
17344 (ui_file_write_async_safe, ui_file_read): Adjust.
17345 (ui_file_fseek): Delete.
17346 (fputs_unfiltered): Adjust.
17347 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17348 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17349 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17350 (set_ui_file_data): Delete.
17351 (string_file::~string_file, string_file::write)
17352 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17353 (do_ui_file_as_string, ui_file_as_string): Delete.
17354 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17355 (struct mem_file): Delete.
17356 (mem_file_new): Delete.
17357 (stdio_file::stdio_file): New.
17358 (mem_file_delete): Delete.
17359 (stdio_file::stdio_file): New.
17360 (mem_fileopen): Delete.
17361 (stdio_file::~stdio_file): New.
17362 (mem_file_rewind): Delete.
17363 (stdio_file::set_stream): New.
17364 (mem_file_put): Delete.
17365 (stdio_file::open): New.
17366 (mem_file_write): Delete.
17367 (stdio_file_magic, struct stdio_file): Delete.
17368 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17369 (stdio_file::flush): New.
17370 (stdio_file_read): Rename to ...
17371 (stdio_file::read): ... this. Adjust.
17372 (stdio_file_write): Rename to ...
17373 (stdio_file::write): ... this. Adjust.
17374 (stdio_file_write_async_safe): Rename to ...
17375 (stdio_file::write_async_safe) ... this. Adjust.
17376 (stdio_file_fputs): Rename to ...
17377 (stdio_file::puts) ... this. Adjust.
17378 (stdio_file_isatty): Delete.
17379 (stdio_file_fseek): Delete.
17380 (stdio_file::isatty): New.
17381 (stderr_file_write): Rename to ...
17382 (stderr_file::write) ... this. Adjust.
17383 (stderr_file_fputs): Rename to ...
17384 (stderr_file::puts) ... this. Adjust.
17385 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17386 (stderr_file::stderr_file): New.
17387 (tee_file_magic): Delete.
17388 (struct tee_file): Delete.
17389 (tee_file::tee_file): New.
17390 (tee_file_new): Delete.
17391 (tee_file::~tee_file): New.
17392 (tee_file_delete): Delete.
17393 (tee_file_flush): Rename to ...
17394 (tee_file::flush): ... this. Adjust.
17395 (tee_file_write): Rename to ...
17396 (tee_file::write): ... this. Adjust.
17397 (tee_file::write_async_safe): New.
17398 (tee_file_fputs): Rename to ...
17399 (tee_file::puts): ... this. Adjust.
17400 (tee_file_isatty): Rename to ...
17401 (tee_file::isatty): ... this. Adjust.
17402 * ui-file.h (struct obstack, struct ui_file): Don't
17403 forward-declare.
17404 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17405 (ui_file_write_ftype)
17406 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17407 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17408 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17409 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17410 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17411 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17412 (set_ui_file_fseek): Delete.
17413 (ui_file_data, ui_file_delete, ui_file_rewind)
17414 (struct ui_file): New.
17415 (ui_file_up): New.
17416 (class null_file): New.
17417 (null_stream): Declare.
17418 (ui_file_write_for_put, ui_file_put): Delete.
17419 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17420 Delete.
17421 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17422 (gdb_fopen, tee_file_new): Delete.
17423 (struct string_file): New.
17424 (struct stdio_file): New.
17425 (stdio_file_up): New.
17426 (struct stderr_file): New.
17427 (class tee_file): New.
17428 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17429 of a 'ui_file *'. Adjust.
17430 * ui-out.h (class ui_out) <field_stream>: Likewise.
17431 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17432 (null_stream): Delete.
17433 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17434 Adjust.
17435 * utils.h (struct ui_file): Delete forward declaration..
17436 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17437 (error_stream): Take a 'string_file &' instead of a
17438 'ui_file *'.
17439 * varobj.c (varobj_value_get_print_value): Use string_file.
17440 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17441 * gdbarch.c: Regenerate.
17442
17443 2017-02-02 Pedro Alves <palves@redhat.com>
17444
17445 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17446 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17447 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17448 Adjust to call gdb_print_insn instead of
17449 gdb_disassembler::print_insn.
17450 (dump_insns, do_mixed_source_and_assembly_deprecated)
17451 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17452 'gdbarch' parameter. Remove gdb_disassembler parameter.
17453 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17454 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17455 declaration.
17456 (gdb_pretty_print_insn): Re-add declaration.
17457 * record-btrace.c (btrace_insn_history): Don't allocate a
17458 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17459
17460 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17461
17462 * disasm.h (gdb_disassembly): Remove file_string parameter.
17463 * disasm.c (gdb_disassembly): Likewise.
17464 * cli/cli-cmds.c (print_disassembly): Adapt.
17465 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17466 * stack.c (do_gdb_disassembly): Likewise.
17467
17468 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17469
17470 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17471 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17472 targets. And if the implicit value is longer than needed, extract
17473 the first bytes instead of the "least significant" ones.
17474
17475 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17476
17477 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17478 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17479 (btrace_fetch): Assert can_access_registers_ptid.
17480 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17481 validate_registers_access.
17482
17483 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17484
17485 * gdbthread.h (can_access_registers_ptid): New.
17486 * thread.c (can_access_registers_ptid): New.
17487
17488 2017-02-01 Pedro Alves <palves@redhat.com>
17489
17490 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17491
17492 2017-01-31 Pedro Alves <palves@redhat.com>
17493
17494 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17495 Fix typos.
17496
17497 2017-01-31 Pedro Alves <palves@redhat.com>
17498
17499 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17500 not used.
17501
17502 2017-01-31 Pedro Alves <palves@redhat.com>
17503
17504 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17505
17506 2017-01-31 Pedro Alves <palves@redhat.com>
17507
17508 * common/scoped_restore.h
17509 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17510 change the value's parameter type to T2.
17511 (make_scoped_restore): Likewise.
17512
17513 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17514 Richard Henderson <rth@redhat.com>
17515
17516 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17517 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17518 GS_BASE for older kernels.
17519 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17520 GS_BASE for older kernels.
17521 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17522 and GS_BASE to the offset table.
17523 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17524 system register group.
17525 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17526 for older kernels.
17527 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17528 amd64 ABI.
17529 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17530 AMD64_GSBASE_REGNUM.
17531 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17532 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17533 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17534 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17535 i386/64bit-segments.xml in those rules.
17536 * features/i386/64bit-segments.xml: New file.
17537 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17538 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17539 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17540 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17541 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17542 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17543 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17544 * features/i386/amd64-avx-linux.c: Regenerated.
17545 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17546 * features/i386/amd64-avx-mpx.c: Regenerated.
17547 * features/i386/amd64-avx512-linux.c: Regenerated.
17548 * features/i386/amd64-linux.c: Regenerated.
17549 * features/i386/amd64-mpx-linux.c: Regenerated.
17550 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17551 * features/i386/i386-avx-mpx.c: Regenerated.
17552 * features/i386/x32-avx-linux.c: Regenerated.
17553 * features/i386/x32-avx512-linux.c: Regenerated.
17554 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17555 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17556 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17557 * regformats/i386/amd64-linux.dat: Regenerated.
17558 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17559 * regformats/i386/x32-avx-linux.dat: Regenerated.
17560 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17561 * regformats/i386/x32-linux.dat: Regenerated.
17562
17563 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17564
17565 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17566 Set to AMD64_NUM_REGS.
17567
17568 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17569
17570 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17571 that checks validity of a register number.
17572
17573 2017-01-27 Kees Cook <keescook@google.com>
17574
17575 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17576 fetch_fpregs if target has fpa registers.
17577 (arm_linux_store_inferior_registers): Call store_fpregs if target
17578 has fpa registers.
17579
17580 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17581
17582 * cris-tdep.c (cris_gdbarch_init): Remove check for
17583 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17584
17585 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17586
17587 * corelow.c (get_core_register_section): Check for regset
17588 existence before checking for REGSET_VARIABLE_SIZE.
17589
17590 2017-01-26 Yao Qi <yao.qi@linaro.org>
17591 Pedro Alves <palves@redhat.com>
17592
17593 PR gdb/20939
17594 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17595 call memory_error, save memaddr instead.
17596 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17597 negative, cal memory_error.
17598 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17599
17600 2017-01-26 Yao Qi <yao.qi@linaro.org>
17601
17602 * disasm-selftests.c (memory_error_test): New function.
17603 (_initialize_disasm_selftests): Register memory_error_test.
17604
17605 2017-01-26 Yao Qi <yao.qi@linaro.org>
17606
17607 * Makefile.in (SFILES): Add disasm-selftests.c and
17608 selftest-arch.c.
17609 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17610 * disasm-selftests.c: New file.
17611 * selftest-arch.c: New file.
17612 * selftest-arch.h: New file.
17613
17614 2017-01-26 Yao Qi <yao.qi@linaro.org>
17615
17616 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17617 to bfd_arch_mep. Don't return 0 if section is not
17618 found. Call print_insn_mep.
17619
17620 2017-01-26 Pedro Alves <palves@redhat.com>
17621 Yao Qi <yao.qi@linaro.org>
17622
17623 * arm-tdep.c: Include "disasm.h".
17624 (gdb_print_insn_arm): Update code to get gdbarch.
17625 * disasm.c (dis_asm_read_memory): Change it to
17626 gdb_disassembler::dis_asm_read_memory.
17627 (dis_asm_memory_error): Likewise.
17628 (dis_asm_print_address): Likewise.
17629 (gdb_pretty_print_insn): Change it to
17630 gdb_disassembler::pretty_print_insn.
17631 (dump_insns): Add one argument gdb_disassemlber. All
17632 callers updated.
17633 (do_mixed_source_and_assembly_deprecated): Likewise.
17634 (do_mixed_source_and_assembly): Likewise.
17635 (do_assembly_only): Likewise.
17636 (gdb_disassembler::gdb_disassembler): New.
17637 (gdb_disassembler::print_insn): New.
17638 * disasm.h (class gdb_disassembler): New.
17639 (gdb_pretty_print_insn): Remove declaration.
17640 (gdb_disassemble_info): Likewise.
17641 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17642 (gdbscm_disasm_read_memory_worker): Update.
17643 (gdbscm_disasm_read_memory): Update.
17644 (gdbscm_disasm_memory_error): Remove.
17645 (gdbscm_disasm_print_address): Remove.
17646 (gdbscm_disassembler::gdbscm_disassembler): New.
17647 (gdbscm_print_insn_from_port): Update.
17648 * mips-tdep.c: Include disasm.h.
17649 (gdb_print_insn_mips): Update code to get gdbarch.
17650 * record-btrace.c (btrace_insn_history): Update.
17651 * spu-tdep.c: Include disasm.h.
17652 (struct spu_dis_asm_data): Remove.
17653 (struct spu_dis_asm_info): New.
17654 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17655 SPU id.
17656 (gdb_print_insn_spu): Cast disassemble_info to
17657 spu_dis_asm_info.
17658
17659 2017-01-26 Yao Qi <yao.qi@linaro.org>
17660
17661 * disasm.c (do_ui_file_delete): Delete.
17662 (gdb_insn_length): Move code creating stream to ...
17663 * utils.c (null_stream): ... here. New function.
17664 * utils.h (null_stream): Declare.
17665
17666 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17667
17668 * python/py-inferior.c (find_thread_object): Return directly
17669 from the loop. Remove "found" variable.
17670
17671 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17672
17673 GDB 7.12.1 released.
17674
17675 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17676
17677 * python/py-function.c (fnpy_call): Reorder declarations to have
17678 the gdbpy_enter object declared first.
17679 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17680
17681 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17682
17683 PR python/21068
17684 * python/python-internal.h (PyMem_RawMalloc): Define for
17685 Python < 3.4.
17686 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17687 PyMem_RawMalloc instead of PyMem_Malloc.
17688
17689 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17690 Luis Machado <lgustavo@codesourcery.com>
17691
17692 * NEWS (New commands): Mention flash-erase.
17693 (New MI commands): Mention target-flash-erase.
17694 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17695 command.
17696 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17697 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17698 * target.c (flash_erase_command): New function.
17699 (initialize_targets): Add new flash-erase command.
17700 * target.h (flash_erase_command): New declaration.
17701
17702 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17703
17704 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17705 HAVE_SYS_PROCFS_H is defined.
17706
17707 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17708
17709 * remote.c (struct cached_reg): Change data into a pointer.
17710 * (stop_reply_dtr): Free data pointers before deleting vector.
17711 (process_stop_reply): Likewise.
17712 (remote_parse_stop_reply): Allocate space for data
17713
17714 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17715
17716 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17717 MAX_REGISTER_SIZE.
17718 (amd64_pseudo_register_read_value): Likewise.
17719 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17720 (store_register_using_P): Likewise.
17721 * regcache.c (regcache_xfer_part): Likewise.
17722
17723 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17724
17725 Split real and pseudo registers.
17726 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17727 (sparc32_pseudo_regnum): New enum.
17728 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17729 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17730 (SPARC32_CP0_REGISTERS): New macro.
17731 (sparc32_pseudo_register_name): New function.
17732 (sparc32_register_name): Use sparc32_pseudo_register_name.
17733 (sparc32_pseudo_register_type): New function.
17734 (sparc32_register_type): Use sparc32_pseudo_register_type.
17735 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17736 pseudo register numbers.
17737 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17738 (SPARC64_CP0_REGISTERS): New macro.
17739 (sparc64_pseudo_register_name): New function.
17740 (sparc64_register_name): Use sparc64_pseudo_register_name.
17741 (sparc64_pseudo_register_type): New function.
17742 (sparc64_register_type): Use sparc64_pseudo_register_type.
17743 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17744 pseudo register numbers.
17745 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17746 sparc64_store_arguments): Handle pseudo register numbers.
17747
17748 2017-01-13 Yao Qi <yao.qi@linaro.org>
17749
17750 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17751 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17752 output.
17753 (getpkt_or_notif_sane_1): Likewise.
17754
17755 2017-01-13 Yao Qi <yao.qi@linaro.org>
17756
17757 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17758 of CC. Pass "-x c++-header" instead of "-x c".
17759
17760 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17761
17762 * remote.c (remote_can_async_p): Update comment.
17763
17764 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17765
17766 * linux-nat.c (linux_nat_can_async_p): Update comment.
17767
17768 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17769
17770 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17771
17772 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17773
17774 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17775
17776 2017-01-10 Tom Tromey <tom@tromey.com>
17777
17778 * python/py-type.c (typy_legacy_template_argument): Update.
17779 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17780 ~demangle_parse_info): Declare new members.
17781 (cp_demangled_name_to_comp): Return unique_ptr.
17782 (cp_demangled_name_parse_free)
17783 (make_cleanup_cp_demangled_name_parse_free)
17784 (cp_new_demangle_parse_info): Remove.
17785 * cp-support.c (do_demangled_name_parse_free_cleanup)
17786 (make_cleanup_cp_demangled_name_parse_free): Remove.
17787 (inspect_type, cp_canonicalize_string_full)
17788 (cp_canonicalize_string): Update.
17789 (mangled_name_to_comp): Change return type.
17790 (cp_class_name_from_physname, method_name_from_physname)
17791 (cp_func_name, cp_remove_params): Update.
17792 * cp-name-parser.y (demangle_parse_info): New constructor, from
17793 cp_new_demangle_parse_info.
17794 (~demangle_parse_info): New destructor, from
17795 cp_demangled_name_parse_free.
17796 (cp_merge_demangle_parse_infos): Update.
17797 (cp_demangled_name_to_comp): Change return type.
17798
17799 2017-01-10 Tom Tromey <tom@tromey.com>
17800
17801 * top.c (prevent_dont_repeat): Change return type.
17802 * python/python.c (execute_gdb_command): Use std::string.
17803 Update.
17804 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17805 * command.h (prevent_dont_repeat): Change return type.
17806 * breakpoint.c (bpstat_do_actions_1): Update.
17807
17808 2017-01-10 Tom Tromey <tom@tromey.com>
17809
17810 * value.h (scoped_value_mark::~scoped_value_mark): Call
17811 free_to_mark.
17812 (scoped_value_mark::free_to_mark): New method.
17813 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17814 scoped_value_mark.
17815
17816 2017-01-10 Tom Tromey <tom@tromey.com>
17817
17818 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17819 (valpy_reference_value, valpy_const_value, valpy_get_address)
17820 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17821 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17822 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17823 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17824 scoped_value_mark.
17825 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17826 * value.h (scoped_value_mark): New class.
17827
17828 2017-01-10 Tom Tromey <tom@tromey.com>
17829
17830 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17831 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17832 * psymtab.c (discard_psymtabs_upto): Remove.
17833 (make_cleanup_discard_psymtabs): Remove.
17834 (struct psymtab_state): Remove.
17835
17836 2017-01-10 Tom Tromey <tom@tromey.com>
17837
17838 * record-full.c (record_full_save_cleanups): Remove.
17839 (record_full_save): Use gdb::unlinker.
17840 * gcore.c (do_bfd_delete_cleanup): Remove.
17841 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17842 cleanups.
17843 * dwarf2read.c (unlink_if_set): Remove.
17844 (write_psymtabs_to_index): Use gdb::unlinker.
17845 * common/gdb_unlinker.h: New file.
17846
17847 2017-01-10 Tom Tromey <tom@tromey.com>
17848
17849 * windows-tdep.c (windows_xfer_shared_library): Update.
17850 * windows-nat.c (windows_make_so): Update.
17851 * utils.h (make_cleanup_bfd_unref): Remove.
17852 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17853 * symfile.h (symfile_bfd_open)
17854 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17855 * symfile.c (read_symbols, symbol_file_add)
17856 (separate_debug_file_exists): Update.
17857 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17858 (generic_load, reread_symbols): Update.
17859 * symfile-mem.c (symbol_file_add_from_memory): Update.
17860 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17861 (spu_symbol_file_add_from_memory): Update.
17862 * solist.h (struct target_so_ops) <bfd_open>: Return
17863 gdb_bfd_ref_ptr.
17864 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17865 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17866 gdb_bfd_ref_ptr.
17867 (solib_map_sections, reload_shared_libraries_1): Update.
17868 * solib-svr4.c (enable_break): Update.
17869 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17870 * solib-frv.c (enable_break2): Update.
17871 * solib-dsbt.c (enable_break): Update.
17872 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17873 gdb_bfd_ref_ptr.
17874 (darwin_solib_get_all_image_info_addr_at_init): Update.
17875 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17876 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17877 * record-full.c (record_full_save): Update.
17878 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17879 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17880 * minidebug.c (find_separate_debug_file_in_section): Return
17881 gdb_bfd_ref_ptr.
17882 * machoread.c (macho_add_oso_symfile): Change abfd to
17883 gdb_bfd_ref_ptr.
17884 (macho_symfile_read_all_oso): Update.
17885 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17886 (macho_symfile_read): Update.
17887 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17888 (jit_bfd_try_read_symtab): Update.
17889 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17890 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17891 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17892 gdb_bfd_ref_ptr.
17893 (gdb_bfd_ref_policy): New struct.
17894 (gdb_bfd_ref_ptr): New typedef.
17895 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17896 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17897 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17898 gdb_bfd_ref_ptr.
17899 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17900 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17901 (gcore_command): Update.
17902 * exec.c (exec_file_attach): Update.
17903 * elfread.c (elf_symfile_read): Update.
17904 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17905 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17906 (open_and_init_dwo_file): Update.
17907 (open_dwp_file): Return gdb_bfd_ref_ptr.
17908 (open_and_init_dwp_file): Update.
17909 * corelow.c (core_open): Update.
17910 * compile/compile-object-load.c (compile_object_load): Update.
17911 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17912 * coffread.c (coff_symfile_read): Update.
17913 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17914 gdb_bfd_ref_ptr. Rename.
17915 (dump_bfd_file, restore_command): Update.
17916 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17917 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17918 (find_separate_debug_file_by_buildid): Update.
17919
17920 2017-01-10 Tom Tromey <tom@tromey.com>
17921
17922 * common/gdb_ref_ptr.h: New file.
17923 * python/py-ref.h (struct gdbpy_ref_policy): New.
17924 (gdbpy_ref): Now a typedef.
17925
17926 2017-01-10 Tom Tromey <tom@tromey.com>
17927
17928 * utils.h (make_cleanup_htab_delete): Don't declare.
17929 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17930 Remove.
17931 * linespec.c (decode_compound_collector): Add constructor,
17932 destructor.
17933 (lookup_prefix_sym): Remove cleanup.
17934 (symtab_collector): Add constructor, destructor.
17935 (collect_symtabs_from_filename): Remove cleanup.
17936 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17937 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17938 Use htab_up.
17939 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17940 * dwarf2read.c (dw2_expand_symtabs_matching)
17941 (dw2_map_symbol_filenames, dwarf_decode_macros)
17942 (write_psymtabs_to_index): Use htab_up.
17943 * dwarf2loc.c (func_verify_no_selftailcall)
17944 (call_site_find_chain_1, func_verify_no_selftailcall)
17945 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17946 std::vector, gdb::unique_xmalloc_ptr.
17947 (call_sitep): Remove typedef.
17948 (dwarf2_locexpr_baton_eval): Remove unused variable.
17949
17950 2017-01-10 Tom Tromey <tom@tromey.com>
17951
17952 * python/python-internal.h (make_cleanup_py_decref)
17953 (make_cleanup_py_xdecref): Don't declare.
17954 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17955 (py_xdecref, make_cleanup_py_xdecref): Remove.
17956
17957 2017-01-10 Tom Tromey <tom@tromey.com>
17958
17959 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17960 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17961
17962 2017-01-10 Tom Tromey <tom@tromey.com>
17963
17964 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17965
17966 2017-01-10 Tom Tromey <tom@tromey.com>
17967
17968 * python/py-utils.c (unicode_to_encoded_string)
17969 (python_string_to_target_string)
17970 (python_string_to_target_python_string)
17971 (python_string_to_host_string, gdbpy_obj_to_string)
17972 (get_addr_from_python): Use gdbpy_ref.
17973
17974 2017-01-10 Tom Tromey <tom@tromey.com>
17975
17976 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17977 gdbpy_ref.
17978
17979 2017-01-10 Tom Tromey <tom@tromey.com>
17980
17981 * python/python.c (eval_python_command, gdbpy_decode_line)
17982 (gdbpy_run_events, gdbpy_start_type_printers)
17983 (gdbpy_apply_type_printers): Use gdbpy_ref.
17984
17985 2017-01-10 Tom Tromey <tom@tromey.com>
17986
17987 * python/py-param.c (get_doc_string, compute_enum_values): Use
17988 gdbpy_ref.
17989
17990 2017-01-10 Tom Tromey <tom@tromey.com>
17991
17992 * python/py-inferior.c (find_thread_object, build_inferior_list):
17993 Use gdbpy_ref.
17994
17995 2017-01-10 Tom Tromey <tom@tromey.com>
17996
17997 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17998
17999 2017-01-10 Tom Tromey <tom@tromey.com>
18000
18001 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
18002 gdbpy_ref.
18003
18004 2017-01-10 Tom Tromey <tom@tromey.com>
18005
18006 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
18007 extra incref.
18008 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
18009 Use gdbpy_ref.
18010
18011 2017-01-10 Tom Tromey <tom@tromey.com>
18012
18013 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18014 gdbpy_ref.
18015
18016 2017-01-10 Tom Tromey <tom@tromey.com>
18017
18018 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
18019 decref results of PyArg_ParseTupleAndKeywords.
18020
18021 2017-01-10 Tom Tromey <tom@tromey.com>
18022
18023 * python/python.c (python_run_simple_file): Use
18024 unique_xmalloc_ptr, gdbpy_ref.
18025
18026 2017-01-10 Tom Tromey <tom@tromey.com>
18027
18028 * python/py-prettyprint.c (print_stack_unless_memory_error)
18029 (print_string_repr, print_children): Use gdbpy_ref.
18030 (dummy_python_frame): New class.
18031 (dummy_python_frame::dummy_python_frame): Rename from
18032 push_dummy_python_frame.
18033 (py_restore_tstate): Remove.
18034
18035 2017-01-10 Tom Tromey <tom@tromey.com>
18036
18037 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
18038
18039 2017-01-10 Tom Tromey <tom@tromey.com>
18040
18041 * python/python.c (ensure_python_env, restore_python_env):
18042 Remove.
18043 * python/python-internal.h (ensure_python_env): Don't declare.
18044 * varobj.h (varobj_ensure_python_env): Don't declare.
18045 * varobj.c (varobj_ensure_python_env): Remove.
18046
18047 2017-01-10 Tom Tromey <tom@tromey.com>
18048
18049 * varobj.c (varobj_value_get_print_value): Use
18050 gdbpy_enter_varobj.
18051
18052 2017-01-10 Tom Tromey <tom@tromey.com>
18053
18054 * python/py-prettyprint.c (print_string_repr, print_children):
18055 Update.
18056 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
18057 of "encoding".
18058 * varobj.c (varobj_value_get_print_value): Update.
18059 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
18060
18061 2017-01-10 Tom Tromey <tom@tromey.com>
18062
18063 * varobj.c (varobj_get_display_hint)
18064 (dynamic_varobj_has_child_method, install_new_value_visualizer)
18065 (varobj_set_visualizer, free_variable): Use
18066 gdbpy_enter_varobj.
18067
18068 2017-01-10 Tom Tromey <tom@tromey.com>
18069
18070 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
18071 (do_finish_initialization): New function. Use gdbpy_ref.
18072 (gdbpy_finish_initialization): Use gdbpy_enter. Call
18073 do_finish_initialization.
18074
18075 2017-01-10 Tom Tromey <tom@tromey.com>
18076
18077 * python/py-param.c (get_set_value, get_show_value): Use
18078 gdbpy_enter, gdbpy_ref.
18079
18080 2017-01-10 Tom Tromey <tom@tromey.com>
18081
18082 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
18083
18084 2017-01-10 Tom Tromey <tom@tromey.com>
18085
18086 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
18087
18088 2017-01-10 Tom Tromey <tom@tromey.com>
18089
18090 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
18091 Use gdbpy_enter_varobj.
18092
18093 2017-01-10 Tom Tromey <tom@tromey.com>
18094
18095 * varobj.c (gdbpy_enter_varobj): New constructor.
18096 * python/python-internal.h (gdbpy_enter_varobj): New class.
18097 * python/py-varobj.c (py_varobj_get_iterator): Use
18098 gdbpy_enter_varobj.
18099
18100 2017-01-10 Tom Tromey <tom@tromey.com>
18101
18102 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
18103 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18104 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
18105 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
18106 unique_xmalloc_ptr.
18107 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
18108
18109 2017-01-10 Tom Tromey <tom@tromey.com>
18110
18111 * python/py-xmethods.c (invoke_match_method): Use
18112 gdbpy_ref.
18113
18114 2017-01-10 Tom Tromey <tom@tromey.com>
18115
18116 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
18117 gdbpy_enter, gdbpy_ref.
18118
18119 2017-01-10 Tom Tromey <tom@tromey.com>
18120
18121 * python/python.c (python_interactive_command): Use gdbpy_enter.
18122
18123 2017-01-10 Tom Tromey <tom@tromey.com>
18124
18125 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
18126 gdbpy_ref.
18127
18128 2017-01-10 Tom Tromey <tom@tromey.com>
18129
18130 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
18131 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18132
18133 2017-01-10 Tom Tromey <tom@tromey.com>
18134
18135 * utils.h (htab_deleter): New struct.
18136 (htab_up): New typedef.
18137 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
18138 gdbpy_enter, gdbpy_ref, htab_up.
18139
18140 2017-01-10 Tom Tromey <tom@tromey.com>
18141
18142 * python/py-unwind.c (pending_frame_invalidate): Remove.
18143 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
18144
18145 2017-01-10 Tom Tromey <tom@tromey.com>
18146
18147 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
18148 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
18149
18150 2017-01-10 Tom Tromey <tom@tromey.com>
18151
18152 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
18153
18154 2017-01-10 Tom Tromey <tom@tromey.com>
18155
18156 * python/python.c (gdbpy_eval_from_control_command)
18157 (gdbpy_source_script, gdbpy_run_events)
18158 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
18159 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
18160 gdbpy_enter.
18161
18162 2017-01-10 Tom Tromey <tom@tromey.com>
18163
18164 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
18165
18166 2017-01-10 Tom Tromey <tom@tromey.com>
18167
18168 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
18169
18170 2017-01-10 Tom Tromey <tom@tromey.com>
18171
18172 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
18173 (python_on_inferior_call_pre, python_on_inferior_call_post)
18174 (python_on_memory_change, python_on_register_change)
18175 (python_inferior_exit, python_new_objfile, add_thread_object)
18176 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
18177
18178 2017-01-10 Tom Tromey <tom@tromey.com>
18179
18180 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
18181 (bpfinishpy_handle_exit): Use gdbpy_enter.
18182
18183 2017-01-10 Tom Tromey <tom@tromey.com>
18184
18185 * python/py-cmd.c (cmdpy_destroyer)
18186 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
18187 gdbpy_enter.
18188
18189 2017-01-10 Tom Tromey <tom@tromey.com>
18190
18191 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18192 gdbpy_enter.
18193 (gdbpy_breakpoint_has_cond): Likewise.
18194
18195 2017-01-10 Tom Tromey <tom@tromey.com>
18196
18197 * python/python.c (gdbpy_enter): New constructor.
18198 (~gdbpy_enter): New destructor.
18199 (restore_python_env, ensure_python_env): Rewrite.
18200 * python/python-internal.h (gdbpy_enter): New class.
18201
18202 2017-01-10 Tom Tromey <tom@tromey.com>
18203
18204 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
18205
18206 2017-01-10 Tom Tromey <tom@tromey.com>
18207
18208 * python/py-value.c (value_has_field, get_field_flag)
18209 (get_field_type, valpy_getitem, convert_value_from_python): Use
18210 gdbpy_ref.
18211
18212 2017-01-10 Tom Tromey <tom@tromey.com>
18213
18214 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
18215 gdbpy_ref.
18216
18217 2017-01-10 Tom Tromey <tom@tromey.com>
18218
18219 * python/py-prettyprint.c (search_pp_list)
18220 (find_pretty_printer_from_objfiles)
18221 (find_pretty_printer_from_progspace)
18222 (find_pretty_printer_from_gdb, find_pretty_printer)
18223 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
18224 gdbpy_ref.
18225
18226 2017-01-10 Tom Tromey <tom@tromey.com>
18227
18228 * python/py-param.c (call_doc_function): Use gdbpy_ref.
18229
18230 2017-01-10 Tom Tromey <tom@tromey.com>
18231
18232 * python/py-linetable.c (build_line_table_tuple_from_pcs)
18233 (ltpy_get_all_source_lines): Use gdbpy_ref.
18234
18235 2017-01-10 Tom Tromey <tom@tromey.com>
18236
18237 * python/py-framefilter.c (extract_sym, extract_value)
18238 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18239 gdbpy_ref.
18240
18241 2017-01-10 Tom Tromey <tom@tromey.com>
18242
18243 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18244
18245 2017-01-10 Tom Tromey <tom@tromey.com>
18246
18247 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18248
18249 2017-01-10 Tom Tromey <tom@tromey.com>
18250
18251 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18252 gdbpy_ref.
18253
18254 2017-01-10 Tom Tromey <tom@tromey.com>
18255
18256 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18257
18258 2017-01-10 Tom Tromey <tom@tromey.com>
18259
18260 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18261 (typy_range): Use gdbpy_ref.
18262
18263 2017-01-10 Tom Tromey <tom@tromey.com>
18264
18265 * python/py-threadevent.c (create_thread_event_object): Use
18266 gdbpy_ref.
18267 * python/py-stopevent.c (create_stop_event_object): Simplify.
18268 (emit_stop_event): Use gdbpy_ref.
18269 * python/py-signalevent.c (create_signal_event_object): Use
18270 gdbpy_ref.
18271 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18272 (emit_new_objfile_event, create_clear_objfiles_event_object)
18273 (emit_clear_objfiles_event): Use gdbpy_ref.
18274 * python/py-infevents.c (create_inferior_call_event_object)
18275 (create_register_changed_event_object)
18276 (create_memory_changed_event_object, emit_inferior_call_event)
18277 (emit_memory_changed_event, emit_register_changed_event): Use
18278 gdbpy_ref.
18279 * python/py-exitedevent.c (create_exited_event_object)
18280 (emit_exited_event): Use gdbpy_ref.
18281 * python/py-event.h (evpy_emit_event): Remove
18282 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18283 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18284 * python/py-continueevent.c (emit_continue_event): Use
18285 gdbpy_ref.
18286 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18287 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18288 gdbpy_ref.
18289 * python/py-bpevent.c (create_breakpoint_event_object): Use
18290 gdbpy_ref.
18291
18292 2017-01-10 Tom Tromey <tom@tromey.com>
18293
18294 * python/py-ref.h: New file.
18295
18296 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18297
18298 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18299 void.
18300 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18301 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18302 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18303 * ui-out.c (ui_out::redirect): Likewise.
18304 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18305 * cli/cli-logging.c (set_logging_redirect): Update call site of
18306 ui_out::redirect.
18307 (handle_redirections): Likewise.
18308 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18309 * top.c (execute_command_to_string): Likewise.
18310 * utils.c (do_ui_out_redirect_pop): Likewise.
18311
18312 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18313
18314 * stack.c (_initialize_stack): Update "frame" command help message.
18315
18316 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18317
18318 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18319
18320 2017-01-06 Yao Qi <yao.qi@linaro.org>
18321
18322 * x86-linux-nat.h: Include gdb_proc_service.h.
18323
18324 2017-01-06 Yao Qi <yao.qi@linaro.org>
18325
18326 * ser-base.h: Include serial.h.
18327
18328 2017-01-06 Yao Qi <yao.qi@linaro.org>
18329
18330 * ppc-linux-tdep.h: Include ppc-tdep.h.
18331
18332 2017-01-06 Yao Qi <yao.qi@linaro.org>
18333
18334 * nat/amd64-linux-siginfo.h: Include signal.h.
18335
18336 2017-01-06 Yao Qi <yao.qi@linaro.org>
18337
18338 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18339
18340 2017-01-06 Yao Qi <yao.qi@linaro.org>
18341
18342 * mi/mi-parse.h: Include mi-cmds.h.
18343
18344 2017-01-06 Yao Qi <yao.qi@linaro.org>
18345
18346 * inf-loop.c: Don't include "target.h".
18347 * inf-loop.h: Include it here.
18348
18349 2017-01-06 Yao Qi <yao.qi@linaro.org>
18350
18351 * dfp.h: Include "dboulest.h" and "expression.h".
18352
18353 2017-01-06 Yao Qi <yao.qi@linaro.org>
18354
18355 * ax-gdb.h: Include "ax.h".
18356
18357 2017-01-06 Yao Qi <yao.qi@linaro.org>
18358
18359 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18360 with nat/gdb_ptrace.h.
18361
18362 2017-01-05 Yao Qi <yao.qi@linaro.org>
18363
18364 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18365 new line.
18366 (mips64_fbsd_sigframe_init): Likewise.
18367
18368 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18369
18370 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18371 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18372
18373 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18374
18375 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18376 * NEWS: Mention new FreeBSD/mips native configuration.
18377 * config/mips/fbsd.mh: New file.
18378 * configure.host: Add mips*-*-freebsd*.
18379 * mips-fbsd-nat.c: New file.
18380
18381 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18382
18383 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18384 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18385 * NEWS: Mention new FreeBSD/mips target.
18386 * configure.tgt: Add mips*-*-freebsd*.
18387 * mips-fbsd-tdep.c: New file.
18388 * mips-fbsd-tdep.h: New file.
18389
18390 2017-01-04 Yao Qi <yao.qi@linaro.org>
18391
18392 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18393 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18394
18395 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18396
18397 Update copyright year range in all GDB files.
18398
18399 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18400
18401 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18402
18403 For older changes see ChangeLog-2016.
18404 \f
18405 Local Variables:
18406 mode: change-log
18407 left-margin: 8
18408 fill-column: 74
18409 version-control: never
18410 coding: utf-8
18411 End:
This page took 0.38163 seconds and 5 git commands to generate.