(Ada) crash assigning to record component which is an array
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
0e2da9f0
JB
12017-12-18 Joel Brobecker <brobecker@adacore.com>
2
3 * ada-lang.c (assign_component): Strip any TYPE_CODE_TYPEDEF
4 layer from lhs' type.
5 (assign_aggregate): Likewise.
6
cb923fcc
XR
72017-12-18 Xavier Roirand <roirand@adacore.com>
8
9 * ada-lang.c (ada_convert_actual): Change the way actual value
10 are passed to the inferior when the inferior expects a pointer type.
11
38af1824
SH
122017-12-17 Stafford Horne <shorne@gmail.com>
13
14 * gdb/or1k-tdep.c (show_or1k_debug): Fix function parameter alignment.
15 (or1k_analyse_inst): Likewise.
16 (or1k_single_step_through_delay): Likewise.
17 (or1k_frame_cache): Fix parameter alignment and use paddress()
18 instead of %x.
19
b282f0f2
SH
202017-12-17 Stafford Horne <shorne@gmail.com>
21
22 * NEWS (Changes since GDB 8.0): Mention new or1k target and new
23 commands to set/show or1k debug.
24
46afe196
SDJ
252017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
26
27 * typeprint.c (whatis_exp): Fix ARI warning and reindent "if"
28 condition.
29
7c161838
SDJ
302017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
31 Pedro Alves <palves@redhat.com>
32
33 PR cli/16224
34 * NEWS (Changes since GDB 8.0): Mention new '/o' flag.
35 * c-typeprint.c (OFFSET_SPC_LEN): New define.
36 (c_type_print_varspec_prefix): New argument 'struct
37 print_offset_data *'.
38 (c_type_print_base_1): New function and prototype.
39 (c_print_type_1): New function, with code from 'c_print_type'.
40 (c_print_type): Use 'c_print_type_1'.
41 (c_type_print_varspec_prefix): New argument 'struct
42 print_offset_data *'. Use it. Call 'c_type_print_base_1'
43 instead of 'c_print_type_base'.
44 (print_spaces_filtered_with_print_options): New function.
45 (output_access_specifier): Take new argument FLAGS. Modify
46 function to call 'print_spaces_filtered_with_print_options'.
47 (c_print_type_vtable_offset_marker): New function.
48 (c_print_type_union_field_offset): New function.
49 (c_print_type_struct_field_offset): New function.
50 (c_print_type_no_offsets): New function.
51 (c_type_print_base_struct_union): New argument 'struct
52 print_offset_data *'. Print offsets and sizes for
53 struct/union/class fields.
54 * typeprint.c (const struct type_print_options
55 type_print_raw_options): Initialize 'print_offsets'.
56 (static struct type_print_options default_ptype_flags):
57 Likewise.
58 (struct print_offset_data print_offset_default_data): New
59 variable.
60 (whatis_exp): Handle '/o' option.
61 (_initialize_typeprint): Add '/o' flag to ptype's help.
62 * typeprint.h (struct print_offset_data): New struct.
63 (struct type_print_options) <print_offsets>: New field.
64
a27ed7d6
SDJ
652017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
66
67 * c-typeprint.c (need_access_label_p): New function.
68 (c_type_print_base_struct_union): New function.
69 (c_type_print_base): Move code to handle
70 TYPE_CODE_{STRUCT,UNION} to the functions mentioned above.
71
68f81d60
RH
722017-12-15 Richard Henderson <rth@redhat.com>
73 Uros Bizjak <ubizjak@gmail.com>
74
75 PR gdb/19061
76 * alpha-tdep.c (alpha_software_single_step): Call
77 alpha_deal_with_atomic_sequence here.
78 (set_gdbarch_software_single_step): Set to
79 alpha_software_single_step.
80 * nat/linux-ptrace.h [__alpha__]: Define GDB_ARCH_IS_TRAP_BRKPT
81 and GDB_ARCH_IS_TRAP_HWBKPT.
82
97d4fac1
YQ
832017-12-15 Yao Qi <yao.qi@linaro.org>
84
85 * unittests/memory-map-selftests.c: Wrap test with HAVE_LIBEXPAT.
86
828d5846
XR
872017-12-15 Xavier Roirand <roirand@adacore.com>
88
89 * ada-lang.c (ada_value_primitive_field): Handle field search
90 in case of homonyms.
91 (find_struct_field): Ditto.
92 (ada_search_struct_field): Ditto.
93 (ada_value_struct_elt): Ditto.
94 (ada_lookup_struct_elt_type): Ditto.
95
8e557e52
SM
962017-12-14 Simon Marchi <simon.marchi@ericsson.com>
97
98 * python/py-breakpoint.c (bppy_init): Use 'O' format specifier
99 for "qualified" and use PyObject_IsTrue.
100
8af5c486
JK
1012017-12-14 Jan Kratochvil <jan.kratochvil@redhat.com>
102
103 * dwarf2read.c (dw2_debug_names_iterator::next): Support
104 DW_IDX_type_unit.
105 (debug_names::dwarf5_offset_size, unit_kind): New.
106 (debug_names::insert): Add parameter kind.
107 (debug_names::build): Support DW_IDX_type_unit.
108 (debug_names::recursively_write_psymbols): Update
109 (debug_names::write_psymbols caller.
110 (debug_names::write_one_signatured_type_data)
111 (debug_names::write_one_signatured_type): New.
112 (debug_names::index_key, debug_names::symbol_value)
113 (debug_names::write_psymbols): Add kind.
114 (debug_names::write_one_signatured_type): New.
115 (write_debug_names): Move dwarf5_offset_size to debug_names.
116 Use debug_names::write_one_signatured_type for type units.
117
79e8fcaa
JB
1182017-12-14 Joel Brobecker <brobecker@adacore.com>
119
120 * ada-lang.c (ada_value_equal): Add handling of typedef types
121 when comparing array objects.
122
e05fa6f9
JB
1232017-12-14 Joel Brobecker <brobecker@adacore.com>
124
125 * ada-tasks.c (read_atcb): Properly set task_info->ptid
126 when !target_has_execution as well.
127 (task_command): Remove error when !target_has_execution.
128
b89641ba
SM
1292017-12-13 Simon Marchi <simon.marchi@ericsson.com>
130
131 * location.h (string_to_event_location): Add match_type
132 parameter.
133 * location.c (string_to_event_location): Likewise.
134 * python/py-breakpoint.c (bppy_init): Handle qualified
135 parameter.
136
a22ecf70
PA
1372017-12-13 Pedro Alves <palves@redhat.com>
138
139 * completer.c (completion_tracker::maybe_add_completion): New
140 'text' and 'word' parameters. Use make_completion_match_str.
141 (completion_tracker::add_completion): New 'text' and 'word'
142 parameters. Pass down.
143 (completion_tracker::recompute_lowest_common_denominator): Change
144 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
145 * completer.h (completion_tracker::add_completion): New 'text' and
146 'word' parameters.
147 (completion_tracker::recompute_lowest_common_denominator): Change
148 parameter type to gdb::unique_xmalloc_ptr rval ref.
149 (completion_tracker::recompute_lowest_common_denominator): Change
150 parameter type to gdb::unique_xmalloc_ptr rval ref.
151 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
152 as well.
153
60a20c19
PA
1542017-12-13 Pedro Alves <palves@redhat.com>
155
156 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
157 make_completion_match_str.
158 * completer.c: Use gdb::unique_xmalloc_ptr and
159 make_completion_match_str.
160 (make_completion_match_str_1): New.
161 (make_completion_match_str(const char *, const char *,
162 const char *)): New.
163 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
164 const char *, const char *)): New.
165 * completer.h (make_completion_match_str(const char *,
166 const char *, const char *)): New.
167 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
168 const char *, const char *)): New.
169 * interps.c (interpreter_completer): Use make_completion_match_str.
170 * symtab.c (completion_list_add_name, add_filename_to_list): Use
171 make_completion_match_str.
172
96647014
SH
1732017-12-13 Stafford Horne <shorne@gmail.com>
174
175 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
176 strings.
177 (or1k_unwind_pc): Use paddress() instead of %p.
178 (or1k_unwind_sp): Likewise.
179 (or1k_frame_cache): Use host_address_to_string()/paddress()
180 instead of %p and use _() wrapper for message strings.
181
3bbd9f18
SM
1822017-12-13 Simon Marchi <simon.marchi@ericsson.com>
183
184 * contrib/ari/gdb_ari.sh: Fix typo in help.
185
9937536c
JB
1862017-12-13 Joel Brobecker <brobecker@adacore.com>
187
188 * event-top.c (handle_line_of_input): Set server_command.
189
a994fec4
FJ
1902017-12-12 Stafford Horne <shorne@gmail.com>
191 Stefan Wallentowitz <stefan@wallentowitz.de>
192 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
193 Franck Jullien <franck.jullien@gmail.com>
194 Jeremy Bennett <jeremy.bennett@embecosm.com>
195
196 * configure.tgt: Add targets for or1k and or1knd.
197 * or1k-tdep.c: New file.
198 * or1k-tdep.h: New file.
199 * features/Makefile: Add or1k.xml to build.
200 * features/or1k.xml: New file.
201 * features/or1k-core.xml: New file.
202 * features/or1k.c: Generated.
203
db9077b7
AM
2042017-12-12 Alan Modra <amodra@gmail.com>
205
206 PR tdep/22576
207 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
208 PLT offset, and retrieve r2 from stack when executing in reverse.
209 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
210 rather than PLT address.
211 (ppc64_standard_linkage2_target): Likewise.
212 (ppc64_standard_linkage3_target): Likewise.
213 (ppc64_standard_linkage4_target): Likewise.
214 (ppc64_skip_trampoline_code_1): Adjust to suit.
215
a9334058
SM
2162017-12-11 Simon Marchi <simon.marchi@ericsson.com>
217
218 PR gdb/22556
219 * remote.c (remote_thread_name): Return NULL if name is empty.
220 (remote_threads_extra_info): Return NULL if extra info is empty.
221
3c0aa29a
PA
2222017-12-11 Pedro Alves <palves@redhat.com>
223
224 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
225 (elf_sym_fns_debug_names): Move to elfread.c.
226 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
227 instead of a sym_fns and add 'index_kind' output parameter. Fill
228 the latter in with the index variant kind if using an index.
229 (enum dw_index_kind): Moved to symfile.h.
230 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
231 (elf_sym_fns_lazy_psyms): Move from defs.h.
232 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
233 interface.
234 * symfile.h (enum class dw_index_kind): New, moved from
235 dwarf2read.c.
236 (dwarf2_initialize_objfile): Change prototype.
237
f2f9e7ec
UW
2382017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
239
240 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
241 instead of mpfr_set_si to convert mantissa bits.
242
08f49010
XR
2432017-12-11 Xavier Roirand <roirand@adacore.com>
244 Joel Brobecker <brobecker@adacore.com>
245
246 * ada-lang.c (ada_tag_value_at_base_address): Change the way
247 tagged type base address is computed.
248 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
249 New enumerate.
250 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
251 element of lai->primitive_type_vector.
252
a3c5fafd
PA
2532017-12-08 Pedro Alves <palves@redhat.com>
254
255 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
256 mapped_index_base.
257 (check_match): Adjust to use mock_index directly.
258 (check_find_bounds_finds)
259 (test_mapped_index_find_name_component_bounds): Adjust to work
260 with a mapped_index_base.
261
44ed8f3e
PA
2622017-12-08 Pedro Alves <palves@redhat.com>
263
264 * dwarf2read.c (struct mapped_index_base): New, partially factored
265 out from ...
266 (struct mapped_index): ... this. Inherit mapped_index_base.
267 (mapped_index::symbol_name_slot_invalid):
268 (mapped_index::symbol_name_at): Add override marker.
269 (mapped_index::symbol_name_count): New.
270 (struct mapped_debug_names): Inherit mapped_index_base.
271 (mapped_debug_names::symbol_name_at): New.
272 (mapped_debug_names::symbol_name_count): New.
273 (mapped_index::find_name_components_bounds): Rename to ...
274 (mapped_index_base::find_name_components_bounds): ... this.
275 (mapped_index::build_name_components): Rename to ...
276 (mapped_index_base::build_name_components): ... this. Adjust to
277 use mapped_index_base::symbol_name_count and
278 mapped_index_base::symbol_name_slot_invalid.
279 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
280 instead of a mapped_index. Use
281 dw2_expand_symtabs_matching_symbol.
282
f00a2de2
PA
2832017-12-08 Pedro Alves <palves@redhat.com>
284
285 * dwarf2read.c (mapped_index::symbol_table_slot): New.
286 (mapped_index::address_table): Now a gdb::array_view of const
287 gdb_byte.
288 (mapped_index::symbol_table): Now a gdb::array_view of
289 symbol_table_slot.
290 (mapped_index::address_table_size)
291 (mapped_index::symbol_table_slots): Delete.
292 (create_addrmap_from_index): Adjust.
293 (find_slot_in_mapped_hash): Adjust.
294 (read_index_from_section): Adjust.
295 (dwarf2_read_index): Adjust.
296
927aa2e7
JK
2972017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
298 Pedro Alves <palves@redhat.com>
299
300 * defs.h (elf_sym_fns_debug_names): New declaration.
301 * dwarf2read.c: Include "hash_enum.h".
302 (mapped_debug_names): New.
303 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
304 debug_names_table.
305 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
306 (struct dwz_file): Add debug_names.
307 (dwarf2_per_objfile::locate_sections): Handle debug_names and
308 debug_aranges.
309 (locate_dwz_sections): Handle debug_names.
310 (create_signatured_type_table_from_debug_names)
311 (create_addrmap_from_aranges): New.
312 (dwarf2_read_index): Update function comment.
313 (dwarf5_augmentation): Moved up.
314 (read_debug_names_from_section, create_cus_from_debug_names_list)
315 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
316 (dwarf5_djb_hash): Moved up.
317 (dw2_debug_names_iterator): New.
318 (read_indirect_string_at_offset): New declaration.
319 (mapped_debug_names::namei_to_name)
320 (dw2_debug_names_iterator::find_vec_in_debug_names)
321 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
322 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
323 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
324 New.
325 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
326 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
327 (debug_names::build): Update djb_hash caller.
328 (write_debug_names): Move out and rename augmentation to
329 dwarf5_augmentation.
330 * elfread.c (elf_sym_fns_debug_names): New.
331 * psymtab.h (dwarf2_debug_names_functions): New declaration.
332 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
333 debug_aranges.
334 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
335
e5fa6583
PA
3362017-12-08 Pedro Alves <palves@redhat.com>
337
338 * common/hash_enum.h: New file.
339
4b514bc8
JK
3402017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
341
342 * dwarf2read.c (create_cu_from_index_list): New from ...
343 (create_cus_from_index_list): ... this function, use it.
344 (dw_expand_symtabs_matching_file_matcher)
345 (dw2_expand_symtabs_matching_one): New from ...
346 (dw2_expand_symtabs_matching): ... this function, use them.
347
abccd1e7
JK
3482017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
349
350 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
351 declarations from elfread.c.
352 (dwarf2_initialize_objfile): Change return value.
353 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
354 declarations to defs.h.
355 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
356 * symfile.h (dwarf2_initialize_objfile): Change return type.
357
437afbb8
JK
3582017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
359 Pedro Alves <palves@redhat.com>
360
361 * contrib/gdb-add-index.sh (index): Rename to ...
362 (index4): ... here.
363 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
364 Support also .debug_names and .debug_str.
365 * dwarf2read.c: Include cmath, set, list.
366 (INDEX_SUFFIX): Rename to ...
367 (INDEX4_SUFFIX): ... here.
368 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
369 (file_write(FILE *, const void *, size_t)): New.
370 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
371 (data_buf::append_unsigned_leb128, data_buf::empty): New.
372 (data_buf::file_write): Use ::file_write.
373 (data_buf::c_str, dwarf5_djb_hash, debug_names)
374 (check_dwarf64_offsets): New.
375 (psyms_seen_size, write_gdbindex): New from
376 write_psymtabs_to_index code.
377 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
378 (enum dw_index_kind): New.
379 (write_psymtabs_to_index): New parameter index_kind. Support
380 filename_str and out_file_str. Move code to write_gdbindex,
381 possibly call write_debug_names.
382 (save_gdb_index_command): New parameter -dwarf-5.
383 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
384
6432ec65
JK
3852017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
386 Pedro Alves <palves@redhat.com>
387
388 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
389 comment.
390 (GDB_ADD_INDEX): New variable.
391 <$want_index>: Call $GDB_ADD_INDEX.
392
92469284
SDJ
3932017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
394
395 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
396 "expression_up" inside the TRY block.
397
f17d9474
YQ
3982017-12-08 Yao Qi <yao.qi@linaro.org>
399
400 * breakpoint.c (update_watchpoint): Call
401 address_significant.
402
a0de8c21
YQ
4032017-12-08 Yao Qi <yao.qi@linaro.org>
404
405 * breakpoint.c (adjust_breakpoint_address): Call
406 address_significant.
407
a738ea1d
YQ
4082017-12-08 Yao Qi <yao.qi@linaro.org>
409
410 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
411 significant_addr_bit.
412 * gdbarch.sh (significant_addr_bit): New.
413 * gdbarch.c, gdbarch.h: Re-generated.
414 * target.c (memory_xfer_partial): Call address_significant.
415 * utils.c (address_significant): New function.
416 * utils.h (address_significant): Declare.
417
8e481c3b
TT
4182017-12-08 Tom Tromey <tom@tromey.com>
419
420 * printcmd.c (ui_printf): Update. Use std::vector.
421 * common/format.h (struct format_piece): Add constructor.
422 <string>: Now const.
423 (class format_pieces): New class.
424 (parse_format_string, free_format_pieces)
425 (free_format_pieces_cleanup): Remove.
426 * common/format.c (format_pieces::format_pieces): Rename from
427 parse_format_string. Update.
428 (free_format_pieces, free_format_pieces_cleanup): Remove.
429 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
430 * ax-gdb.h (gen_printf): Remove argument.
431 * ax-gdb.c (gen_printf): Remove "frags" argument.
432 (maint_agent_printf_command): Update. Use std::vector.
433
6b05c8bd
YQ
4342017-12-08 Yao Qi <yao.qi@linaro.org>
435
436 PR breakpionts/22567
437 * linespec.c (minsym_found): Set sal.section.
438
336ef6d2
AA
4392017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
440
441 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
442
fa6eb693
KS
4432017-12-07 Keith Seitz <keiths@redhat.com>
444
445 PR breakpoints/22569
446 * location.c (string_to_explicit_location): When terminating
447 parsing early, break out of enclosing loop instead of returning.
448
883fd55a
KS
4492017-12-07 Keith Seitz <keiths@redhat.com>
450
451 * NEWS (New commands): Mention set/show print type nested-type-limit.
452 * c-typeprint.c (c_type_print_base): Print out nested types.
453 * dwarf2read.c (struct typedef_field_list): Rename to ...
454 (struct decl_field_list): ... this. Change all uses.
455 (struct field_info) <nested_types_list, nested_types_list_count>:
456 New fields.
457 (add_partial_symbol): Look for nested type definitions in C++, too.
458 (dwarf2_add_typedef): Rename to ...
459 (dwarf2_add_type_defn): ... this.
460 (type_can_define_types): New function.
461 Update assertion to use type_can_define_types.
462 Permit NULL for a field's name.
463 (process_structure_scope): Handle child DIEs of types that can
464 define types.
465 Copy the list of nested types into the type struct.
466 * gdbtypes.h (struct typedef_field): Rename to ...
467 (struct decl_field): ... this. Change all uses.
468 [is_protected, is_private]: New fields.
469 (struct cplus_struct_type) <nested_types, nested_types_count>: New
470 fields.
471 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
472 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
473 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
474 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
475 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
476 default value for print_nested_type_limit.
477 (print_nested_type_limit): New static variable.
478 (set_print_type_nested_types, show_print_type_nested_types): New
479 functions.
480 (_initialize_typeprint): Register new commands for set/show
481 `print-nested-type-limit'.
482 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
483 New field.
484
99598d71
TT
4852017-12-07 Tom Tromey <tom@tromey.com>
486
487 PR breakpoints/22511:
488 * breakpoint.c (commands_command_1): Don't throw an exception when
489 no commands have been read.
490
23a8d186
AS
4912017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
492
493 PR c++/21222
494 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
495 range-for variable.
496
30970df7
SM
4972017-12-07 Simon Marchi <simon.marchi@ericsson.com>
498
499 * common/selftest.h (struct selftest): Add virtual destructor.
500
824cc835
PM
5012017-12-07 Phil Muldoon <pmuldoon@redhat.com>
502
503 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
504 over basic location code. Implement explicit location keywords.
505 (bppy_init_validate_args): New function.
506 * NEWS: Document Python explicit breakpoint locations.
507
9c226a86
JB
5082017-12-07 Joel Brobecker <brobecker@adacore.com>
509
510 * MAINTAINERS: Restore target entries for m68hc11-elf,
511 score-elf and xstormy16-elf, incorrectly removed in a previous
512 patch meant to only update the list of active maintainers.
513
649a140c
PA
5142017-12-06 Pedro Alves <palves@redhat.com>
515
516 * break-catch-syscall.c (insert_catch_syscall)
517 (remove_catch_syscall): Adjust to pass reference to
518 inf_data->syscalls_counts directly via gdb::array_view.
519 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
520 and gdb::array_view.
521 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
522 * remote.c (remote_set_syscall_catchpoint): Likewise.
523 * target-debug.h (target_debug_print_bool): New.
524 (define target_debug_print_gdb_array_view_const_int): New.
525 * target-delegates.c: Regenerate.
526 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
527 gdb::array_view and bool.
528 (target_set_syscall_catchpoint): Likewise.
529
9a93831c
SM
5302017-12-06 Simon Marchi <simon.marchi@ericsson.com>
531
532 * break-catch-syscall.c (catch_syscall_completer): Get pointers
533 to syscall group strings after building the string vector.
534
7cc244de
PA
5352017-12-06 Pedro Alves <palves@redhat.com>
536
537 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
538 "qXfer:features:read"" is disabled.
539 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
540 Check packet_config_support instead of packet->support directly.
541
858c9d13
SM
5422017-12-05 Simon Marchi <simon.marchi@ericsson.com>
543
544 * target-descriptions.c (struct tdesc_feature) <registers>: Use
545 tdesc_reg_up typedef.
546 (struct target_desc) <features>: Use tdesc_feature_up typedef.
547
d4a0e8b5
SM
5482017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
549
550 * target-descriptions.c (struct tdesc_type): Use default
551 destructor.
552 <u>: Remove.
553 <accept>: Remove.
554 (struct tdesc_type_builtin): New.
555 (struct tdesc_type_vector): New.
556 (struct tdesc_type_with_fields): New.
557 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
558 (tdesc_gdb_type): Remove.
559 (tdesc_register_type): Adjust.
560 (tdesc_create_vector): Create tdesc_type_vector.
561 (tdesc_create_struct): Create tdesc_type_with_fields.
562 (tdesc_set_struct_size): Change parameter type.
563 (tdesc_create_union): Create tdesc_type_with_fields.
564 (tdesc_create_flags): Likewise.
565 (tdesc_create_enum): Likewise.
566 (tdesc_add_field): Change parameter type.
567 (tdesc_add_typed_bitfield): Likewise.
568 (tdesc_add_bitfield): Likewise.
569 (tdesc_add_flag): Likewise.
570 (tdesc_add_enum_value): Likewise.
571 (print_c_tdesc) <visit>: Remove overload with tdesc_type
572 parameter, add overloads for tdesc_type_builtin,
573 tdesc_type_with_fields and tdesc_type_vector.
574 <m_printed_type>: Remove.
575 <m_printed_element_type, m_printed_type_with_fields>: Add.
576 * target-descriptions.h (tdesc_create_enum): Change return type.
577 (tdesc_add_typed_bitfield): Change parameter type.
578 (tdesc_add_enum_value): Change parameter type.
579 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
580 type to tdesc_type_with_fields.
581 (tdesc_start_struct): Adjust.
582 (tdesc_start_flags): Adjust.
583 (tdesc_start_enum): Adjust.
584 (tdesc_start_field): Adjust.
585 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
586 (struct tdesc_type_vector): Forward-declare.
587 (struct tdesc_type_with_fields): Forward-declare.
588 (tdesc_create_struct): Change return type.
589 (tdesc_create_union): Likewise.
590 (tdesc_create_flags): Likewise.
591 (tdesc_add_field): Change parameter type.
592 (tdesc_set_struct_size): Likewise.
593 (tdesc_add_bitfield): Likewise.
594 (tdesc_add_flag): Likewise.
595 * features: Re-generate C files.
596
f0cddbef
SM
5972017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
600 (struct tdesc_arch_reg): Add constructor.
601 (DEF_VEC_O (tdesc_arch_reg)): Remove.
602 (struct tdesc_arch_data): Initialize fields.
603 <arch_regs>: Change type to std::vector.
604 (target_find_description): Adjust.
605 (tdesc_find_type): Adjust.
606 (tdesc_data_init): Call tdesc_arch_data constructor.
607 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
608 (tdesc_data_cleanup): Free data with delete.
609 (tdesc_numbered_register): Adjust.
610 (tdesc_find_arch_register): Adjust.
611 (tdesc_use_registers): Adjust.
612
d05200d1
SM
6132017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * target-descriptions.c (tdesc_type_field): Remove typedef.
616 (DEF_VEC_O (tdesc_type_field)): Remove.
617 (struct tdesc_type_field): Add constructor.
618 <name>: Change type to std::string.
619 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
620 kind uses it.
621 <~tdesc_type>: Destroy vector if the type kind uses it.
622 <u::u::fields>: Change type to std::vector.
623 (tdesc_gdb_type): Adjust.
624 (tdesc_add_field): Adjust.
625 (tdesc_add_typed_bitfield): Adjust.
626 (tdesc_add_field): Adjust.
627 (tdesc_add_enum_value): Adjust.
628 (class print_c_tdesc) <visit>: Adjust.
629
082b9140
SM
6302017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
631
632 * target-descriptions.c (struct tdesc_type) <name>: Change type
633 to std::string.
634 <~tdesc_type>: Don't manually free name.
635 <operator==>: Adjust.
636 (tdesc_named_type): Adjust.
637 (tdesc_find_type): Adjust.
638 (tdesc_gdb_type): Adjust.
639 (class print_c_tdesc) <visit>: Adjust.
640
53c934e9
SM
6412017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
642
643 * target-descriptions.c (tdesc_type_p): Remove typedef.
644 (DEF_VEC_P (tdesc_type_p)): Remove.
645 (struct tdesc_feature) <types>: Change type to std::vector.
646 <~tdesc_feature>: Replace with default implementation.
647 <accept>: Adjust.
648 (tdesc_named_type): Adjust.
649 (tdesc_create_vector): Adjust.
650 (tdesc_create_struct): Adjust.
651 (tdesc_create_union): Adjust.
652 (tdesc_create_flags): Adjust.
653 (tdesc_create_enum): Adjust.
654
a8142ee1
SM
6552017-12-05 Simon Marchi <simon.marchi@ericsson.com>
656
657 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
658 type of name_ parameter, adjust to std::string change.
659 <name, group, type>: Change type to std::string.
660 <~tdesc_reg>: Replace with default implementation.
661 <operator==>: Adjust.
662 (tdesc_find_register_early): Adjust.
663 (tdesc_register_name): Adjust.
664 (tdesc_register_type): Adjust.
665 (tdesc_register_in_reggroup_p): Adjust.
666 (class print_c_tdesc) <visit>: Adjust.
667 (class print_c_feature) <visit>: Adjust.
858c9d13
SM
668 * features/arc-arcompact.c: Re-generate.
669 * features/arc-v2.c: Re-generate.
a8142ee1 670
c9c895b9
SM
6712017-12-05 Simon Marchi <simon.marchi@ericsson.com>
672
673 * target-descriptions.c (tdesc_reg_p): Remove typedef.
674 (DEF_VEC_P (tdesc_reg_p)): Remove.
675 (struct tdesc_feature) <registers>: Change type to std::vector.
676 <~tdesc_feature>: Don't manually free registers.
677 <accept>: Adjust.
678 <operator==>: Adjust.
679 (tdesc_has_registers): Adjust.
680 (tdesc_find_register_early): Adjust.
681 (tdesc_use_registers): Adjust.
682 (tdesc_create_reg): Adjust.
683
f65ff9f9
SM
6842017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * target-descriptions.c (tdesc_feature) <name>: Change type to
687 std::string.
688 <~tdesc_feature>: Don't manually free name.
689 <operator==>: Adjust.
690 (tdesc_find_feature): Adjust.
691 (tdesc_feature_name): Adjust.
692 (class print_c_tdesc) <visit_pre>: Adjust.
693 (class print_c_feature) <visit_pre>: Adjust.
694
3eea796c
SM
6952017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
696
697 * target-descriptions.c (tdesc_feature_p): Remove typedef.
698 (DEF_VEC_P (tdesc_feature_p)): Remove.
699 (struct target_desc) <features>: Change type to std::vector.
700 <~target_desc>: Replace with default implementation.
701 <accept>: Adjust.
702 <operator==>: Adjust.
703 (tdesc_has_registers): Adjust.
704 (tdesc_find_feature): Adjust.
705 (tdesc_use_registers): Adjust.
706 (tdesc_create_feature): Adjust.
707
40e2a983
SM
7082017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * target-descriptions.c (arch_p): Remove typedef.
711 (DEF_VEC_P (arch_p)): Remove.
712 (struct target_desc) <compatible>: Change type to std::vector.
713 <~target_desc>: Don't manually free compatible.
714 (tdesc_compatible_p): Adjust.
715 (tdesc_add_compatible): Adjust.
716 (class print_c_tdesc) <visit_pre>: Adjust.
717
129c10bc
SM
7182017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * target-descriptions.c (property_s): Remove typedef.
721 (DEF_VEC_O (property_s)): Remove.
722 (struct target_desc) <properties>: Make an std::vector.
723 <~target_desc>: Don't manually free properties.
724 (tdesc_property): Adjust.
725 (set_tdesc_property): Adjust.
726 (class print_c_tdesc) <visit_pre>: Adjust.
727
ed9376bd
SM
7282017-12-05 Simon Marchi <simon.marchi@ericsson.com>
729
730 * common/gdb_assert.h (gdb_static_assert): Redefine using
731 static_assert.
732
798a7429
SM
7332017-12-05 Simon Marchi <simon.marchi@ericsson.com>
734
735 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
736 unused variables.
737 (ada_is_redundant_range_encoding): Likewise.
738 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
739 Likewise.
740 * alpha-tdep.c (alpha_software_single_step): Likewise.
741 * arm-tdep.c (_initialize_arm_tdep): Likewise.
742 * auto-load.c (info_auto_load_cmd): Likewise.
743 * break-catch-syscall.c (insert_catch_syscall): Likewise.
744 (remove_catch_syscall): Likewise.
745 * breakpoint.c (condition_completer): Likewise.
746 (clear_command): Likewise.
747 (update_breakpoint_locations): Likewise.
748 * btrace.c (btrace_disable): Likewise.
749 (btrace_teardown): Likewise.
750 (btrace_maint_update_pt_packets): Likewise.
751 (maint_btrace_clear_cmd): Likewise.
752 * cli/cli-decode.c (lookup_cmd_1): Likewise.
753 (lookup_cmd_composition): Likewise.
754 * cli/cli-dump.c (scan_filename): Likewise.
755 (restore_command): Likewise.
756 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
757 * compile/compile-object-load.c (compile_object_load): Likewise.
758 * compile/compile-object-run.c (compile_object_run): Likewise.
759 * compile/compile.c (compile_to_object): Likewise.
760 * completer.c (filename_completer): Likewise.
761 (complete_files_symbols): Likewise.
762 (complete_expression): Likewise.
763 * corelow.c (core_open): Likewise.
764 * ctf.c (ctf_start): Likewise.
765 (ctf_write_status): Likewise.
766 (ctf_write_uploaded_tsv): Likewise.
767 (ctf_write_definition_end): Likewise.
768 (ctf_open_dir): Likewise.
769 (ctf_xfer_partial): Likewise.
770 (ctf_trace_find): Likewise.
771 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
772 Likewise.
773 * dwarf2loc.c (allocate_piece_closure): Likewise.
774 (indirect_pieced_value): Likewise.
775 (dwarf2_evaluate_loc_desc_full): Likewise.
776 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
777 (dw2_expand_symtabs_matching): Likewise.
778 (dw2_map_symbol_filenames): Likewise.
779 (read_and_check_comp_unit_head): Likewise.
780 (read_cutu_die_from_dwo): Likewise.
781 (lookup_dwo_unit): Likewise.
782 (read_comp_units_from_section): Likewise.
783 (dwarf2_compute_name): Likewise.
784 (handle_DW_AT_stmt_list): Likewise.
785 (create_cus_hash_table): Likewise.
786 (create_dwp_v2_section): Likewise.
787 (dwarf2_rnglists_process): Likewise.
788 (dwarf2_ranges_process): Likewise.
789 (dwarf2_record_block_ranges): Likewise.
790 (is_vtable_name): Likewise.
791 (read_formatted_entries): Likewise.
792 (skip_form_bytes): Likewise.
793 * elfread.c (elf_symtab_read): Likewise.
794 * exec.c (exec_file_command): Likewise.
795 * f-valprint.c (f_val_print): Likewise.
796 (info_common_command_for_block): Likewise.
797 * guile/guile.c (initialize_scheme_side): Likewise.
798 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
799 * guile/scm-cmd.c (cmdscm_completer): Likewise.
800 (gdbscm_register_command_x): Likewise.
801 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
802 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
803 * guile/scm-ports.c (file_port_magic): Likewise.
804 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
805 (ppscm_pretty_print_one_value): Likewise.
806 (ppscm_print_children): Likewise.
807 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
808 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
809 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
810 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
811 * i386-tdep.c (i386_register_reggroup_p): Likewise.
812 * infcmd.c (run_command_1): Likewise.
813 (until_next_fsm_clean_up): Likewise.
814 * linespec.c (linespec_complete): Likewise.
815 (find_label_symbols): Likewise.
816 * m2-valprint.c (m2_val_print): Likewise.
817 * memattr.c (require_user_regions): Likewise.
818 (lookup_mem_region): Likewise.
819 (disable_mem_command): Likewise.
820 (mem_delete): Likewise.
821 * mep-tdep.c (mep_register_name): Likewise.
822 (mep_analyze_prologue): Likewise.
823 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
824 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
825 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
826 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
827 * minidebug.c (lzma_open): Likewise.
828 * minsyms.c (lookup_minimal_symbol): Likewise.
829 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
830 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
831 (mips_o64_return_value): Likewise.
832 (mips_single_step_through_delay): Likewise.
833 (_initialize_mips_tdep): Likewise.
834 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
835 (nios2_software_single_step): Likewise.
836 * parse.c (find_minsym_type_and_address): Likewise.
837 * psymtab.c (psym_relocate): Likewise.
838 * python/py-breakpoint.c (bppy_get_commands): Likewise.
839 (gdbpy_breakpoint_modified): Likewise.
840 * python/py-infevents.c (create_inferior_call_event_object):
841 Likewise.
842 * python/py-record-btrace.c (btpy_list_item): Likewise.
843 * python/py-type.c (typy_str): Likewise.
844 * python/py-value.c (valpy_call): Likewise.
845 * python/python.c (do_start_initialization): Likewise.
846 * record-btrace.c (record_btrace_insn_history_range): Likewise.
847 (record_btrace_call_history_range): Likewise.
848 (record_btrace_record_method): Likewise.
849 (record_btrace_xfer_partial): Likewise.
850 (btrace_get_frame_function): Likewise.
851 * record-full.c (record_full_open): Likewise.
852 * record.c (get_context_size): Likewise.
853 * registry.h (DEFINE_REGISTRY): Likewise.
854 * remote-fileio.c (remote_fileio_request): Likewise.
855 * remote.c (remote_update_thread_list): Likewise.
856 (remote_check_symbols): Likewise.
857 (remote_commit_resume): Likewise.
858 (remote_interrupt): Likewise.
859 (remote_insert_breakpoint): Likewise.
860 (compare_sections_command): Likewise.
861 * rust-exp.y (super_name): Likewise.
862 (lex_string): Likewise.
863 (convert_ast_to_type): Likewise.
864 (convert_ast_to_expression): Likewise.
865 * rust-lang.c (rust_print_struct_def): Likewise.
866 (rust_print_type): Likewise.
867 (rust_evaluate_subexp): Likewise.
868 * rx-tdep.c (rx_register_type): Likewise.
869 * ser-event.c (serial_event_clear): Likewise.
870 * serial.c (serial_open): Likewise.
871 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
872 * symfile.c (section_is_overlay): Likewise.
873 (overlay_unmapped_address): Likewise.
874 (overlay_mapped_address): Likewise.
875 (simple_overlay_update_1): Likewise.
876 (simple_overlay_update): Likewise.
877 * symtab.c (symbol_find_demangled_name): Likewise.
878 (search_symbols): Likewise.
879 * target-descriptions.c (tdesc_predefined_type): Likewise.
880 * target.c (target_commit_resume): Likewise.
881 * thread.c (print_selected_thread_frame): Likewise.
882 * top.c (new_ui_command): Likewise.
883 (gdb_readline_no_editing): Likewise.
884 * tracefile-tfile.c (tfile_open): Likewise.
885 * tracepoint.c (create_tsv_from_upload): Likewise.
886 * utils.c (quit): Likewise.
887 (defaulted_query): Likewise.
888 * valarith.c (value_concat): Likewise.
889 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
890 * xml-tdesc.c (target_fetch_description_xml): Likewise.
891 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
892 (xtensa_pseudo_register_write): Likewise.
893
7403715e
TT
8942017-12-04 Tom Tromey <tom@tromey.com>
895
896 * NEWS: Mention Rust trait object inspection.
897
50a1fdd5
PA
8982017-12-04 Pedro Alves <palves@redhat.com>
899
900 PR gdb/22499
901 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
902 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
903 (vex2_prefix_p, vex3_prefix_p): New functions.
904 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
905 VEX3 prefixes.
906 (fixup_riprel): Set VEX3.!B.
907
1e97a227
SM
9082017-12-03 Simon Marchi <simon.marchi@ericsson.com>
909
910 * target.h (mem_region_vector): Remove.
911 (struct target_ops) <to_memory_map>: Change return type to
912 std::vector<mem_region>.
913 * target-debug.h (target_debug_print_mem_region_vector): Rename
914 to ...
915 (target_debug_print_std_vector_mem_region): ... this.
916 * target-delegates.c: Re-generate.
917
10f64178
PA
9182017-12-03 Pedro Alves <palves@redhat.com>
919
920 * make-target-delegates (munge_type): Also munge '<', '>', and
921 ':'. Avoid double underscores in identifiers, and trailing
922 underscores.
923 * target-debug.h
924 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
925 ...
926 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
927 * target-delegates.c: Regenerate.
928
6d83e819
SM
9292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
930
931 * common/poison.h (XDELETE): Fix typo.
932
97cbe998
SDJ
9332017-12-01 Andrew Cagney <cagney@redhat.com>
934 Joel Brobecker <brobecker@adacore.com>
935 Sergio Durigan Junior <sergiodj@redhat.com>
936
937 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
938 feature.
939 * coffread.c (coff_symfile_read): Do not map over sections with
940 'coff_locate_sections' if readnever is on.
941 * dwarf2read.c (dwarf2_has_info): Return 0 if
942 readnever is on.
943 * elfread.c (elf_symfile_read): Do not map over sections with
944 'elf_locate_sections' if readnever is on.
945 * main.c (validate_readnow_readnever): New function.
946 (captured_main_1): Add support for --readnever.
947 (print_gdb_help): Document --readnever.
948 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
949 flag.
950 * symfile.c (readnever_symbol_files): New global.
951 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
952 'READNEVER_SYMBOL_FILES' is set.
953 (validate_readnow_readnever): New function.
954 (symbol_file_command): Handle '-readnever' option.
955 Call 'validate_readnow_readnever'.
956 (add_symbol_file_command): Handle '-readnever' option.
957 Call 'validate_readnow_readnever'.
958 (_initialize_symfile): Document new '-readnever' option for
959 both 'symbol-file' and 'add-symbol-file' commands.
960 * top.h (readnever_symbol_files): New extern global.
961 * xcoffread.c (xcoff_initial_scan): Do not read debug
962 information if readnever is on.
963
40fc416f
SDJ
9642017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
965
966 * symfile.c (symbol_file_command): Call
967 'symbol_file_add_main_1' only after processing all command
968 line options.
969 (add_symbol_file_command): Modify logic to make arguments
970 position-independent.
971
ec6a20c2
JB
9722017-12-01 Joel Brobecker <brobecker@adacore.com>
973
974 * ada-lang.c (symbol_list_obstack): Delete.
975 (resolve_subexp): Make sure "candidates" gets xfree'ed.
976 (ada_lookup_symbol_list_worker): Remove the limitation that
977 the result is only good until the next call, now making it
978 the responsibility of the caller to free the result when no
979 longer needed. Adjust the function's intro comment accordingly.
980 (ada_lookup_symbol_list): Adjust the function's intro comment.
981 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
982 (ada_lookup_encoded_symbol, get_var_value): Likewise.
983 (_initialize_ada_language): Remove symbol_list_obstack
984 initialization.
985 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
986 (write_var_or_type, write_name_assoc): Likewise.
987
d0df06af
TT
9882017-12-01 Tom Tromey <tom@tromey.com>
989
990 * Makefile.in (all_deps_files): New variable.
991 Include .Po files using all_deps_files.
992
2ee0c9b3
JB
9932017-12-01 Joel Brobecker <brobecker@adacore.com>
994
995 * MAINTAINERS: Update list of maintainers, moving those who
996 stepped down or became inactive to the "Past Maintainers"
997 section.
998
44122162
RO
9992017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1000
1001 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
1002 sys/proc.h.
1003 (NEW_PROC_API): Remove.
1004 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
1005 Likewise.
1006 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
1007 * configure: Regenerate.
1008 * config.in: Regenerate.
1009 * gdbserver/configure: Regenerate.
1010 * gdbserver/config.in: Regenerate.
1011
1012 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
1013 NEW_PROC_API test.
1014 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
1015
1016 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
1017
1018 * proc-api.c: Remove !NEW_PROC_API support.
1019 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
1020 Remove tests for macros always defined on Solaris.
1021 * proc-events.c: Remove !NEW_PROC_API support.
1022 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
1023 HAVE_SYS_USER_H tests.
1024 (init_syscall_table): Remove non-Solaris syscalls.
1025 Remove tests for syscalls present on all Solaris versions.
1026 Add missing Solaris 10+ syscalls.
1027 (signal_table): Remove non-Solaris signals.
1028 Remove tests for signals present on all Solaris versions.
1029 (fault_table): Remove non-Solaris faults.
1030 Remove tests for faults present on all Solaris versions.
1031 * proc-flags.c: Remove !NEW_PROC_API support.
1032 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
1033 Remove non-Solaris flags.
1034 * proc-why.c: Remove !NEW_PROC_API support.
1035 (pr_why_table): Remove meaningless comments.
1036 Remove tests for reasons present on all Solaris versions.
1037 Remove OSF/1 cases.
1038 (proc_prettyfprint_why): Likewise.
1039
1040 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
1041 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
1042 Remove WA_READ test, IRIX watchpoint support.
1043 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
1044 types. Change users.
1045 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
1046 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
1047 Change callers.
1048 Remove CTL_PROC_NAME_FMT tests.
1049 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
1050 users.
1051 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
1052 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
1053 (proc_modify_flag): Replace GDBRESET by PCUNSET.
1054 Remove PR_ASYNC, PR_KLC tests.
1055 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
1056 (proc_parent_pid): Remove PCWATCH etc. tests.
1057 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
1058 Remove PCAGENT test.
1059 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
1060 Remove SYS_lwpcreate || SYS_lwp_create test.
1061 (proc_get_current_thread): Likewise.
1062 [PIOCNTHR && PIOCTLIST]: Remove.
1063 [PIOCLSTATUS]: Remove.
1064 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
1065 [PRFS_STOPEXEC]: Remove.
1066 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
1067 (syscall_is_exit): Likewise.
1068 (syscall_is_exec): Likewise.
1069 (syscall_is_lwp_create): Likewise.
1070 Remove SYS_syssgi support.
1071 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
1072 [SYS_syssgi]: Remove.
1073 Remove non-Solaris cases, conditionals.
1074 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
1075 Remove.
1076 (procfs_init_inferior) [SYS_syssgi]: Remove.
1077 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
1078 (procfs_inferior_created) [SYS_syssgi]: Remove.
1079 (procfs_set_watchpoint): Remove !AIX5 test.
1080 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
1081 case.
1082 (mappingflags) [MA_PHYS]: Remove.
1083 (info_mappings_callback): Remove PCAGENT test.
1084 Remove PIOCOPENLWP || PCAGENT test.
1085
e8020e54
RO
10862017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1087
1088 * sol-thread.c (info_solthreads): Constify args.
1089 Cast args to void *.
1090
75059544
JB
10912017-11-29 John Baldwin <jhb@FreeBSD.org>
1092
1093 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
1094
f5a91472
JB
10952017-11-29 Joel Brobecker <brobecker@adacore.com>
1096
1097 * ada-lang.c (to_fixed_range_type): Make sure that the size
1098 of the range type being returned is the same as the size
1099 of the range type being fixed.
1100
bd69330d
PA
11012017-11-29 Pedro Alves <palves@redhat.com>
1102
1103 PR c++/19436
1104 * NEWS: Mention setting breakpoints on functions with C++ ABI
1105 tags.
1106 * completer.h (completion_match_for_lcd) <match,
1107 mark_ignored_range>: New methods.
1108 <finish>: Consider ignored ranges.
1109 <clear>: Clear ignored ranges.
1110 <m_ignored_ranges, m_finished_storage>: New fields.
1111 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1112 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1113 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1114 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1115 * language.c (default_symbol_name_matcher): Pass the
1116 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1117 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1118 * utils.c (skip_abi_tag): New function.
1119 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1120 Handle ABI tags.
1121 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1122 parameter.
1123
11242017-11-29 Pedro Alves <palves@redhat.com>
1125
1126 PR c++/19436
1127 * NEWS: Mention setting breakpoints on functions with C++ ABI
1128 tags.
1129 * completer.h (completion_match_for_lcd) <match,
1130 mark_ignored_range>: New methods.
1131 <finish>: Consider ignored ranges.
1132 <clear>: Clear ignored ranges.
1133 <m_ignored_ranges, m_finished_storage>: New fields.
1134 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1135 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1136 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1137 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1138 * language.c (default_symbol_name_matcher): Pass the
1139 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1140 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1141 * utils.c (skip_abi_tag): New function.
1142 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1143 Handle ABI tags.
1144 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1145 parameter.
1146
a20714ff
PA
11472017-11-29 Pedro Alves <palves@redhat.com>
1148
1149 * NEWS: Mention that breakpoints on C++ functions are now set on
1150 on all namespaces/classes by default, and mention "break
1151 -qualified".
1152 * ax-gdb.c (agent_command_1): Adjust to pass a
1153 symbol_name_match_type to new_linespec_location.
1154 * breakpoint.c (parse_breakpoint_sals): Adjust to
1155 get_linespec_location's return type change.
1156 (strace_marker_create_sals_from_location): Adjust to pass a
1157 symbol_name_match_type to new_linespec_location.
1158 (strace_marker_decode_location): Adjust to get_linespec_location's
1159 return type change.
1160 (strace_command): Adjust to pass a symbol_name_match_type to
1161 new_linespec_location.
1162 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1163 mention "-qualified".
1164 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1165 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1166 enumerator.
1167 (complete_address_and_linespec_locations): New parameter
1168 'match_type'. Pass it down.
1169 (explicit_options): Add "-qualified".
1170 (collect_explicit_location_matches): Pass the requested match type
1171 to the linespec completers. Handle MATCH_QUALIFIED.
1172 (location_completer): Handle "-qualified" combined with linespecs.
1173 * cp-support.c (cp_search_name_hash): New.
1174 (cp_symbol_name_matches_1): Implement wild matching for C++.
1175 (cp_fq_symbol_name_matches): Reimplement.
1176 (cp_get_symbol_name_matcher): Return different matchers depending
1177 on the lookup name's match type.
1178 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1179 * cp-support.h (cp_search_name_hash): New declaration.
1180 * dwarf2read.c
1181 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1182 symbols.
1183 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1184 tests.
1185 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1186 pass a symbol_name_match_type to new_linespec_location.
1187 * linespec.c (linespec_parse_basic): Lookup function symbols using
1188 the parser's symbol name match type.
1189 (convert_explicit_location_to_linespec): New
1190 symbol_name_match_type parameter. Pass it down to
1191 find_linespec_symbols.
1192 (convert_explicit_location_to_sals): Pass the location's name
1193 match type to convert_explicit_location_to_linespec.
1194 (parse_linespec): New match_type parameter. Save it in the
1195 parser.
1196 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1197 (linespec_complete_function): New symbol_name_match_type
1198 parameter. Use it.
1199 (complete_linespec_component): Pass down the parser's recorded
1200 name match type.
1201 (linespec_complete_label): New symbol_name_match_type parameter.
1202 Use it.
1203 (linespec_complete): New symbol_name_match_type parameter. Save
1204 it in the parser and pass it down. Adjust to
1205 get_linespec_location's prototype change.
1206 (find_function_symbols, find_linespec_symbols): New
1207 symbol_name_match_type parameter. Pass it down instead of
1208 assuming symbol_name_match_type::WILD.
1209 * linespec.h (linespec_complete, linespec_complete_function)
1210 (linespec_complete_label): New symbol_name_match_type parameter.
1211 * location.c (event_location::linespec_location): Now a struct
1212 linespec_location.
1213 (EL_LINESPEC): Adjust.
1214 (initialize_explicit_location): Default to
1215 symbol_name_match_type::WILD.
1216 (new_linespec_location): New symbol_name_match_type parameter.
1217 Record it in the location.
1218 (get_linespec_location): Now returns a struct linespec_location.
1219 (new_explicit_location): Also copy func_name_match_type.
1220 (explicit_to_string_internal)
1221 (string_to_explicit_location): Handle "-qualified".
1222 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1223 Copy symbol_name_match_type fields.
1224 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1225 type change.
1226 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1227 change. Handle "-qualfied".
1228 (string_to_explicit_location): Handle "-qualified".
1229 (string_to_event_location_basic): New symbol_name_match_type
1230 parameter. Pass it down.
1231 (string_to_event_location): Handle "-qualified".
1232 * location.h (struct linespec_location): New.
1233 (explicit_location::func_name_match_type): New field.
1234 (new_linespec_location): Now returns a const linespec_location *.
1235 (string_to_event_location_basic): New symbol_name_match_type
1236 parameter.
1237 (explicit_completion_info::saw_explicit_location_option): New
1238 field.
1239 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1240 symbol_name_match_type to new_linespec_location.
1241 * python/py-breakpoint.c (bppy_init): Likewise.
1242 * python/python.c (gdbpy_decode_line): Likewise.
1243
a207cff2
PA
12442017-11-29 Pedro Alves <palves@redhat.com>
1245
1246 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1247 parameter from completion_match to completion_match_result.
1248 Adjust.
1249 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1250 * completer.c (completion_tracker::maybe_add_completion): Add
1251 match_for_lcd parameter and use it.
1252 (completion_tracker::add_completion): Likewise.
1253 * completer.h (class completion_match_for_lcd): New class.
1254 (completion_match_result::match_for_lcd): New field.
1255 (completion_match_result::set_match): New method.
1256 (completion_tracker): Add comments.
1257 (completion_tracker::add_completion): Add match_for_lcd parameter.
1258 (completion_tracker::reset_completion_match_result): Reset
1259 match_for_lcd too.
1260 (completion_tracker::maybe_add_completion): Add match_for_lcd
1261 parameter.
1262 (completion_tracker::m_lowest_common_denominator_unique): Extend
1263 comments.
1264 * cp-support.c (cp_symbol_name_matches_1)
1265 (cp_fq_symbol_name_matches): Change type of parameter from
1266 completion_match to completion_match_result. Adjust.
1267 * language.c (default_symbol_name_matcher): Change type of
1268 parameter from completion_match to completion_match_result.
1269 Adjust.
1270 * language.h (completion_match_for_lcd): Forward declare.
1271 (default_symbol_name_matcher): Change type of parameter from
1272 completion_match to completion_match_result.
1273 * symtab.c (compare_symbol_name): Adjust.
1274 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1275 * symtab.h (ada_lookup_name_info::matches): Change type of
1276 parameter from completion_match to completion_match_result.
1277 (symbol_name_matcher_ftype): Likewise, and update comments.
1278
4024cf2b
PA
12792017-11-29 Pedro Alves <palves@redhat.com>
1280
1281 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1282 * minsyms.c (msymbol_is_text): Delete.
1283 (msymbol_is_function): New function.
1284 * minsyms.h (msymbol_is_text): Delete.
1285 (msymbol_is_function): New declaration.
1286 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1287
5dcf52c1
TT
12882017-11-29 Tom Tromey <tom@tromey.com>
1289
1290 * Makefile.in (distclean): Handle the case where rmdir fails.
1291
8ca2f0b9
TT
12922017-11-29 Tom Tromey <tom@tromey.com>
1293
1294 * symfile.c (_initialize_symfile): Update usage text for
1295 add-symbol-file, symbol-file, load.
1296
02ca603a
TT
12972017-11-29 Tom Tromey <tom@tromey.com>
1298
1299 * symfile.c (add_symbol_file_command): Error if some arguments to
1300 -s are missing. Change unrecognized-argument error message.
1301 (_initialize_symfile): Fix usage text for add-symbol-file.
1302
18ca7347
TT
13032017-11-27 Tom Tromey <tom@tromey.com>
1304
1305 * Makefile.in (REMOTE_OBS): Remove.
1306 (SFILES): Remove remote sources.
1307 (COMMON_SFILES): Add remote sources.
1308 (ALLDEPFILES): Remove dcache.c.
1309
66599a7d
TT
13102017-11-27 Tom Tromey <tom@tromey.com>
1311
1312 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1313 variables.
1314 (SFILES): Use SUBDIR_TARGET_SRCS.
1315 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1316 (CONFIG_SRC_SUBDIR): Add target.
1317 (%.o): Remove target rule.
1318
4f04fba8
TT
13192017-11-27 Tom Tromey <tom@tromey.com>
1320
1321 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1322 registry.o, thread-fsm.o, debug.o.
1323 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1324 thread-fsm.c, debug.c.
1325
b5adff3b
TT
13262017-11-27 Tom Tromey <tom@tromey.com>
1327
1328 * Makefile.in (COMMON_SFILES): New.
1329 (SFILES): Move some entries to COMMON_SFILES.
1330 (COMMON_OBS): Use COMMON_SFILES.
1331
afa0a411
TT
13322017-11-27 Tom Tromey <tom@tromey.com>
1333
1334 * Makefile.in (YYFILES): Update comment.
1335 (YYOBJ): Redefine.
1336
8fd8d003
TT
13372017-11-27 Tom Tromey <tom@tromey.com>
1338
1339 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1340 (CONFIG_SRC_SUBDIR): Add python.
1341 (%.o): Remove python rule.
1342 (python/%.o): New rule.
1343 * configure: Rebuild.
1344 * configure.ac (CONFIG_OBS): Refer to python/python.o
1345
bd810fff
TT
13462017-11-27 Tom Tromey <tom@tromey.com>
1347
1348 * configure: Rebuild.
1349 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1350 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1351 (CONFIG_SRC_SUBDIR): Add guile.
1352 (%.o): Remove guile rule.
1353
75787ac1
TT
13542017-11-27 Tom Tromey <tom@tromey.com>
1355
1356 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1357 (%.o): Remove unittests rule.
1358 (CONFIG_SRC_SUBDIR): Add unittests.
1359
5c8a9431
TT
13602017-11-27 Tom Tromey <tom@tromey.com>
1361
1362 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1363 (CONFIG_SRC_SUBDIR): Add tui.
1364 (%.o): Remove tui rule.
1365
a26aa30c
TT
13662017-11-27 Tom Tromey <tom@tromey.com>
1367
1368 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1369 (%.o): Remove compile rule.
1370 (CONFIG_SRC_SUBDIR): Add compile.
1371
6f3cdf9a
TT
13722017-11-27 Tom Tromey <tom@tromey.com>
1373
1374 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1375 (%.o): Remove mi rule.
1376 (CONFIG_SRC_SUBDIR): Add mi.
1377 (COMMON_OBS): Use mi/mi-common.o
1378
f06afa53
TT
13792017-11-27 Tom Tromey <tom@tromey.com>
1380
1381 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1382 (%.o): Remove cli rule.
1383 (CONFIG_SRC_SUBDIR): Add cli.
1384
b22c88c2
TT
13852017-11-27 Tom Tromey <tom@tromey.com>
1386
1387 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1388 * configure: Rebuild.
1389 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1390 (CONFIG_DEP_SUBDIR): New variable.
1391 (%.o): Add order-only dependency.
1392 ($(CONFIG_DEP_SUBDIR)): New target.
1393
ee9a09e9
DC
13942017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1395
1396 PR gdb/21945
1397 * findcmd.c (_initialize_mem_search): Update find command help
1398 text.
1399
e8e7d10c
SM
14002017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1401
1402 * python/python.c (do_start_initialization): Change progname
1403 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1404 Python 2.
1405
6a997029
TT
14062017-11-26 Tom Tromey <tom@tromey.com>
1407
1408 * common/format.h: Add include guards.
1409
41272101
TT
14102017-11-26 Tom Tromey <tom@tromey.com>
1411
1412 * nat/linux-personality.h (class
1413 maybe_disable_address_space_randomization): New class.
1414 (maybe_disable_address_space_randomization): Don't declare
1415 function.
1416 * nat/linux-personality.c (restore_personality)
1417 (make_disable_asr_cleanup): Remove.
1418 (maybe_disable_address_space_randomization): Now a constructor.
1419 (~maybe_disable_address_space_randomization): New destructor.
1420 * linux-nat.c (linux_nat_create_inferior): Update.
1421
44287fd8
TT
14222017-11-26 Tom Tromey <tom@tromey.com>
1423
1424 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1425
5ffd2cb7
UW
14262017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1427
1428 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1429 "cooked" register. Access only first four bytes of branch target
1430 registers.
1431
0e5457dc
SDJ
14322017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1433
1434 PR gdb/22491
1435 * stap-probe.c (relocate_address): New function.
1436 (stap_probe::get_relocated_address): Use 'relocate_address'.
1437 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1438 'm_sem_addr'.
1439 (stap_probe::clear_semaphore): Likewise.
1440
deeeba55
PA
14412017-11-25 Pedro Alves <palves@redhat.com>
1442
1443 * dictionary.c: Include "safe-ctype.h".
1444 * minsyms.c: Include "safe-ctype.h".
1445 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1446
a81aaca0
PA
14472017-11-25 Pedro Alves <palves@redhat.com>
1448
1449 * completer.c (complete_line_internal_1): Skip spaces until the
1450 start of the command.
1451
0662b6a7
PA
14522017-11-24 Pedro Alves <palves@redhat.com>
1453
1454 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1455 cp_fq_symbol_name_matches. Pass language_cplus to
1456 strncmp_with_mode.
1457 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1458 (selftests::test_cp_symbol_name_cmp): New.
1459 (_initialize_cp_support): Register "cp_symbol_name_matches"
1460 selftests.
1461 * language.c (default_symbol_name_matcher): Pass language_minimal
1462 to strncmp_iw_with_mode.
1463 * utils.c: Include "cp-support.h" and <algorithm>.
1464 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1465 (cp_is_operator): New functions.
1466 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1467 skip whitespace in the symbol name when the lookup name doesn't
1468 have spaces, and vice versa.
1469 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1470 * utils.h (strncmp_iw_with_mode): Add language parameter.
1471
e547c119
JB
14722017-11-24 Joel Brobecker <brobecker@adacore.com>
1473
1474 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1475 New functions.
1476 (print_it_exception): If available, display the exception
1477 message as well.
1478 * NEWS: Document new feature.
1479
d7fcdff9
UW
14802017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1481
1482 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1483
30649c14
PR
14842017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1485
1486 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1487 (dtrace_probe::is_enabled, dtrace_probe::enable)
1488 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1489 variable
1490 * probe.c (gen_ui_out_table_header_info)
1491 (print_ui_out_not_applicables): Remove keyword 'struct' at
1492 for-range variable
1493
7696f5c9
AH
14942017-11-24 Alan Hayward <alan.hayward@arm.com>
1495
1496 * configure.tgt: Add arch/aarch64.o
1497
8172f16b
SM
14982017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * common/common-utils.h: Include poison.h.
1501 (xfree): Remove declaration, add definition with static_assert.
1502 * common/common-utils.c (xfree): Remove.
1503 * common/poison.h (IsMallocatable): Define.
1504 (IsFreeable): Define.
1505 (free): Delete for non-freeable types.
1506 (xnew): New.
1507 (XNEW): Undef and redefine.
1508 (xcnew): New.
1509 (XCNEW): Undef and redefine.
1510 (xdelete): New.
1511 (XDELETE): Undef and redefine.
1512 (xnewvec): New.
1513 (XNEWVEC): Undef and redefine.
1514 (xcnewvec): New.
1515 (XCNEWVEC): Undef and redefine.
1516 (xresizevec): New.
1517 (XRESIZEVEC): Undef and redefine.
1518 (xdeletevec): New.
1519 (XDELETEVEC): Undef and redefine.
1520 (xnewvar): New.
1521 (XNEWVAR): Undef and redefine.
1522 (xcnewvar): New.
1523 (XCNEWVAR): Undef and redefine.
1524 (xresizevar): New.
1525 (XRESIZEVAR): Undef and redefine.
1526
7aabaf9d
SM
15272017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * gdbthread.h (private_thread_info): Define structure type, add
1530 virtual pure destructor.
1531 (thread_info) <priv>: Change type to unique_ptr.
1532 <private_dtor>: Remove.
1533 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1534 (private_thread_info::~private_thread_info): Provide default
1535 implementation.
1536 (thread_info::~thread_info): Don't call private_dtor nor
1537 manually free priv.
1538 * aix-thread.c (private_thread_info): Rename to ...
1539 (aix_thread_info): ... this.
1540 (get_aix_thread_info): New.
1541 (sync_threadlists): Adjust.
1542 (iter_tid): Adjust.
1543 (aix_thread_resume): Adjust.
1544 (aix_thread_fetch_registers): Adjust.
1545 (aix_thread_store_registers): Adjust.
1546 (aix_thread_extra_thread_info): Adjust.
1547 * darwin-nat.h (private_thread_info): Rename to ...
1548 (darwin_thread_info): ... this.
1549 (get_darwin_thread_info): New.
1550 * darwin-nat.c (darwin_init_thread_list): Adjust.
1551 (darwin_check_new_threads): Adjust.
1552 (thread_info_from_private_thread_info): Adjust.
1553 * linux-thread-db.c (private_thread_info): Rename to ...
1554 (thread_db_thread_info): ... this, initialize fields.
1555 (get_thread_db_thread_info): New.
1556 <dying>: Change type to bool.
1557 (update_thread_state): Adjust to type rename.
1558 (record_thread): Adjust to type rename an use of unique_ptr.
1559 (thread_db_pid_to_str): Likewise.
1560 (thread_db_extra_thread_info): Likewise.
1561 (thread_db_thread_handle_to_thread_info): Likewise.
1562 (thread_db_get_thread_local_address): Likewise.
1563 * nto-tdep.h (private_thread_info): Rename to ...
1564 (nto_thread_info): ... this, initialize fields.
1565 (get_nto_thread_info): New.
1566 <name>: Change type to std::string.
1567 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1568 use of unique_ptr.
1569 * nto-procfs.c (update_thread_private_data_name): Adjust to
1570 std::string change, allocate nto_private_thread_info with new.
1571 (update_thread_private_data): Adjust to unique_ptr.
1572 * remote.c (private_thread_info): Rename to ...
1573 (remote_thread_info): ... this, initialize data members with
1574 default values.
1575 <extra, name>: Change type to std::string.
1576 <thread_handle>: Change type to non-pointer.
1577 (free_private_thread_info): Remove.
1578 (get_private_info_thread): Rename to...
1579 (get_remote_thread_info): ... this, change return type, adjust to
1580 use of unique_ptr, use remote_thread_info constructor.
1581 (remote_add_thread): Adjust.
1582 (get_private_info_ptid): Rename to...
1583 (get_remote_thread_info): ...this, change return type.
1584 (remote_thread_name): Use get_remote_thread_info, adjust to
1585 change to std::string.
1586 (struct thread_item) <~thread_item>: Remove.
1587 <thread_handle>: Make non pointer.
1588 (start_thread): Adjust to thread_item::thread_handle type
1589 change.
1590 (remote_update_thread_list): Adjust to type name change, move
1591 strings from temporary to long-lived object instead of
1592 duplicating.
1593 (remote_threads_extra_info): Use get_remote_thread_info.
1594 (process_initial_stop_replies): Likewise.
1595 (resume_clear_thread_private_info): Likewise.
1596 (remote_resume): Adjust to type name change.
1597 (remote_commit_resume): Use get_remote_thread_info.
1598 (process_stop_reply): Adjust to type name change.
1599 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1600 (remote_stopped_by_hw_breakpoint): Likewise.
1601 (remote_stopped_by_watchpoint): Likewise.
1602 (remote_stopped_data_address): Likewise.
1603 (remote_core_of_thread): Likewise.
1604 (remote_thread_handle_to_thread_info): Use
1605 get_private_info_thread, adjust to thread_handle field type
1606 change.
1607
21fe1c75
SM
16082017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1609
1610 * remote.c (struct thread_item): Add constructor, disable copy
1611 construction and copy assignment, define default move
1612 construction and move assignment.
1613 <extra, name>: Change type to std::string.
1614 <core>: Initialize.
1615 <thread_handle>: Make non-pointer.
1616 (thread_item_t): Remove typedef.
1617 (DEF_VEC_O(thread_item_t)): Remove.
1618 (threads_listing_context) <contains_thread>: New method.
1619 <remove_thread>: New method.
1620 <items>: Change type to std::vector.
1621 (clear_threads_listing_context): Remove.
1622 (threads_listing_context_remove): Remove.
1623 (remote_newthread_step): Use thread_item constructor, adjust to
1624 change to std::vector.
1625 (start_thread): Use thread_item constructor, adjust to change to
1626 std::vector.
1627 (end_thread): Adjust to change to std::vector and std::string.
1628 (remote_get_threads_with_qthreadinfo): Use thread_item
1629 constructor, adjust to std::vector.
1630 (remote_update_thread_list): Adjust to change to std::vector and
1631 std::string, use threads_listing_context methods.
1632 (remove_child_of_pending_fork): Adjust.
1633 (remove_new_fork_children): Adjust.
1634 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1635 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1636 * unittests/rsp-low-selftests.c: New file.
1637 * common/rsp-low.h: Include common/byte-vector.h.
1638 (hex2bin): New overload.
1639 * common/rsp-low.c (hex2bin): New overload.
1640
089354bb
SM
16412017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * inferior.h (private_inferior): Define structure type, add
1644 virtual pure destructor.
1645 (inferior) <priv>: Change type to unique_ptr.
1646 * inferior.c (private_inferior::~private_inferior): Provide
1647 default implementation.
1648 (inferior::~inferior): Don't free priv field.
1649 (exit_inferior_1): Likewise.
1650 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1651 (darwin_exception_info): Remove typedef.
1652 (DEF_VEC_O (darwin_thread_t)); Remove.
1653 (private_inferior): Rename to ...
1654 (darwin_private_inferior): ... this, extend private_inferior.
1655 (get_darwin_inferior): New.
1656 <threads>: Change type to std::vector of darwin_thread_t pointers.
1657 * darwin-nat.c (darwin_check_new_threads): Adjust.
1658 (find_inferior_task_it): Adjust.
1659 (darwin_find_thread); Adjust.
1660 (darwin_suspend_inferior): Adjust.
1661 (darwin_resume_inferior): Adjust.
1662 (darwin_find_new_inferior): Adjust.
1663 (darwin_decode_notify_message): Adjust.
1664 (darwin_send_reply): Adjust.
1665 (darwin_resume_inferior_threads): Adjust.
1666 (darwin_suspend_inferior_threads): Adjust.
1667 (darwin_decode_message): Adjust.
1668 (darwin_wait): Adjust.
1669 (darwin_interrupt): Adjust.
1670 (darwin_deallocate_threads): Adjust.
1671 (darwin_mourn_inferior): Adjust, don't free private data.
1672 (darwin_reply_to_all_pending_messages): Adjust.
1673 (darwin_stop_inferior): Adjust.
1674 (darwin_setup_exceptions): Adjust.
1675 (darwin_kill_inferior): Adjust.
1676 (darwin_setup_request_notification): Adjust.
1677 (darwin_attach_pid): Adjust.
1678 (darwin_init_thread_list): Adjust.
1679 (darwin_setup_fake_stop_event): Adjust.
1680 (darwin_attach): Adjust.
1681 (darwin_detach): Adjust.
1682 (darwin_xfer_partial): Adjust.
1683 (set_enable_mach_exceptions): Adjust.
1684 (darwin_pid_to_exec_file): Adjust.
1685 (darwin_get_ada_task_ptid): Adjust.
1686 * darwin-nat-info.c (get_task_from_args): Adjust.
1687 (info_mach_ports_command): Adjust.
1688 (info_mach_region_command): Adjust.
1689 (info_mach_exceptions_command): Adjust.
1690 * remote.c (private_inferior): Rename to ...
1691 (remote_private_inferior): ... this, initialize fields.
1692 (get_remote_inferior); New.
1693 (remote_commit_resume): Use get_remote_inferior.
1694 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1695
d044bac8
PA
16962017-11-24 Pedro Alves <palves@redhat.com>
1697
1698 * NEWS: Mention linespecs and explicit locations, and completion
1699 improvements.
1700
e8d58cba
YQ
17012017-11-24 Yao Qi <yao.qi@linaro.org>
1702
1703 * regcache.c (regcache::dump): Remove footnote_register_size.
1704
a63f2d2f
YQ
17052017-11-24 Yao Qi <yao.qi@linaro.org>
1706
1707 * regcache.c (cooked_read_test): Add more test for readonly
1708 regcache.
1709
1b30aaa5
YQ
17102017-11-24 Yao Qi <yao.qi@linaro.org>
1711
1712 * gdbarch-selftests.c (test_target_has_registers): Move it to
1713 target.c.
1714 (test_target_has_stack): Likewise.
1715 (test_target_has_memory): Likewise.
1716 (test_target_prepare_to_store): Likewise.
1717 (test_target_store_registers): Likewise.
1718 (test_target_ops): Likewise.
1719 * regcache.c: Include selftest-arch.h and gdbthread.h.
1720 (target_ops_no_register): New class.
1721 (test_target_fetch_registers): New.
1722 (test_target_store_registers): New.
1723 (test_target_xfer_partial): New.
1724 (readwrite_regcache): New.
1725 (cooked_read_test): New.
1726 (_initialize_regcache): Register the test.
1727 * target.c: (test_target_has_registers): Moved from
1728 gdbarch-selftests.c.
1729 (test_target_has_stack): Likewise.
1730 (test_target_has_memory): Likewise.
1731 (test_target_prepare_to_store): Likewise.
1732 (test_target_store_registers): Likewise.
1733 * target.h (test_target_ops): New class.
1734
6654d750
AH
17352017-11-24 Alan Hayward <alan.hayward@arm.com>
1736
1737 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1738 selftest.
1739
49bdb7ee
AH
17402017-11-24 Alan Hayward <alan.hayward@arm.com>
1741
1742 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1743 * arch/aarch64.c (aarch64_create_target_description): Create
1744 new target description.
1745 * features/Makefile: Add new files.
1746 * features/aarch64.c: Remove file.
1747 * features/aarch64-core.c: New autogenerated file.
1748 * features/aarch64-fpu.c: New autogenerated file.
1749 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
1750
17512017-11-24 Alan Hayward <alan.hayward@arm.com>
1752
1753 * Makefile.in: Add new files.
1754 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1755 aarch64_read_description.
1756 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1757 Call aarch64_read_description.
1758 * aarch64-tdep.c (aarch64_read_description): New function.
1759 (aarch64_gdbarch_init): Call aarch64_read_description.
1760 * aarch64-tdep.h (aarch64_read_description): New function.
1761 * arch/aarch64.c: New file.
1762 * configure.tgt: Add new files.
1763
98ead37e
YQ
17642017-11-24 Yao Qi <yao.qi@linaro.org>
1765
1766 * mi/mi-main.c (register_changed_p): Update.
1767 * value.c (value_contents_bits_eq): Change return type.
1768 (value_contents_eq): Likewise.
1769 * value.h: Update comments.
1770
62ad7ce7
YQ
17712017-11-24 Yao Qi <yao.qi@linaro.org>
1772
1773 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1774 local 'changed'. Remove error.
1775 (register_changed_p): Change return type to bool.
1776
506fe5f4
YQ
17772017-11-24 Yao Qi <yao.qi@linaro.org>
1778
1779 * arch/tic6x.c: New file.
1780 * arch/tic6x.h: New file.
1781 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1782 tic6x-core.xml and tic6x-gp.xml.
1783 * features/tic6x-c6xp.c: Generated.
1784 * features/tic6x-core.c: Generated.
1785 * features/tic6x-gp.c: Generated.
1786 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1787 "tic6x-".
1788
00ea2e2a
SM
17892017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1790
1791 * mi/mi-main.c (list_available_thread_groups): Change map value
1792 type to std::vector.
1793
f45e2a77
SM
17942017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1797
bd046f64
SM
17982017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1801 back to...
1802 <children_requested>: ... this.
1803 (varobj_get_num_children, varobj_update): Adjust.
1804
4c37490d
SM
18052017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1806
1807 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1808 (ada_value_has_mutated): Likewise.
1809 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1810 (c_is_path_expr_parent): Likewise.
1811 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1812 (mi_cmd_var_set_frozen): Likewise.
1813 (mi_cmd_var_update_iter): Likewise.
1814 (mi_cmd_var_update): Likewise.
1815 * varobj.c (pretty_printing): Likewise.
1816 (varobj_enable_pretty_printing): Likewise.
1817 (struct varobj_root) <floating, is_valid>: Likewise.
1818 (struct varobj_dynamic) <children_requested>: Likewise.
1819 (delete_variable): Likewise.
1820 (delete_variable_1): Likewise.
1821 (install_variable): Likewise.
1822 (update_type_if_necessary): Likewise.
1823 (install_new_value): Likewise.
1824 (value_of_root): Likewise.
1825 (is_root_p): Likewise.
1826 (varobj_create): Likewise.
1827 (varobj_delete): Likewise.
1828 (varobj_has_more): Likewise.
1829 (varobj_set_frozen): Likewise.
1830 (varobj_get_frozen): Likewise.
1831 (install_dynamic_child): Likewise.
1832 (dynamic_varobj_has_child_method): Likewise.
1833 (update_dynamic_varobj_children): Likewise.
1834 (varobj_get_num_children): Likewise.
1835 (varobj_list_children): Likewise.
1836 (is_path_expr_parent): Likewise.
1837 (varobj_default_is_path_expr_parent): Likewise.
1838 (varobj_is_dynamic_p): Likewise.
1839 (varobj_set_value): Likewise.
1840 (varobj_value_has_mutated): Likewise.
1841 (varobj_update): Likewise.
1842 (check_scope): Likewise.
1843 (value_of_root_1): Likewise.
1844 (varobj_value_get_print_value): Likewise.
1845 (varobj_editable_p): Likewise.
1846 (varobj_value_is_changeable_p): Likewise.
1847 (varobj_floating_p): Likewise.
1848 (varobj_default_value_is_changeable_p): Likewise.
1849 (varobj_invalidate_iter): Likewise.
1850 * varobj.h (struct varobj_update_result) <type_changed,
1851 children_changed, changed, value_installed>: Likewise.
1852 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1853 (struct lang_varobj_ops) <value_is_changeable_p,
1854 value_has_mutated, is_path_expr_parent>: Likewise.
1855 (varobj_delete): Likewise.
1856 (varobj_set_frozen): Likewise.
1857 (varobj_get_frozen): Likewise.
1858 (varobj_set_value): Likewise.
1859 (varobj_update): Likewise.
1860 (varobj_editable_p): Likewise.
1861 (varobj_floating_p): Likewise.
1862 (varobj_has_more): Likewise.
1863 (varobj_is_dynamic_p): Likewise.
1864 (varobj_default_value_is_changeable_p): Likewise.
1865 (varobj_value_is_changeable_p): Likewise.
1866 (varobj_is_anonymous_child): Likewise.
1867 (varobj_default_is_path_expr_parent): Likewise.
1868
9c23b42f
SDJ
18692017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1870
1871 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1872 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1873 <type_str>: Convert to 'std::string'.
1874 <expr>: Convert to 'expression_up'.
1875 (dtrace_probe_arg_s): Delete type and VEC.
1876 (dtrace_probe_enabler_s): Likewise.
1877 (struct dtrace_probe): Replace by...
1878 (class dtrace_static_probe_ops): ...this and...
1879 (class dtrace_probe): ...this.
1880 (dtrace_probe_is_linespec): Rename to...
1881 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1882 to reflect change.
1883 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1884 Adjust code. Create new instance of 'dtrace_probe'.
1885 (dtrace_build_arg_exprs): Rename to...
1886 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1887 reflect change.
1888 (dtrace_get_probes): Rename to...
1889 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1890 to reflect change.
1891 (dtrace_get_arg): Rename to...
1892 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1893 reflect change.
1894 (dtrace_probe_is_enabled): Rename to...
1895 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1896 change.
1897 (dtrace_get_probe_address): Rename to...
1898 (dtrace_probe::get_relocated_address): ...this. Adjust code
1899 to reflect change.
1900 (dtrace_get_probe_argument_count): Rename to...
1901 (dtrace_probe::get_argument_count): ...this. Adjust code to
1902 reflect change.
1903 (dtrace_can_evaluate_probe_arguments): Rename to...
1904 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1905 to reflect change.
1906 (dtrace_evaluate_probe_argument): Rename to...
1907 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1908 reflect change.
1909 (dtrace_compile_to_ax): Rename to...
1910 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1911 reflect change.
1912 (dtrace_probe_destroy): Delete.
1913 (dtrace_type_name): Rename to...
1914 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1915 reflect change.
1916 (dtrace_probe::get_static_ops): New method.
1917 (dtrace_gen_info_probes_table_header): Rename to...
1918 (dtrace_static_probe_ops::gen_info_probes_table_header):
1919 ...this. Adjust code to reflect change.
1920 (dtrace_gen_info_probes_table_values): Rename to...
1921 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1922 code to reflect change.
1923 (dtrace_enable_probe): Rename to...
1924 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1925 change.
1926 (dtrace_disable_probe): Rename to...
1927 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1928 change.
1929 (struct probe_ops dtrace_probe_ops): Delete.
1930 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1931 instead of 'info_probes_for_ops'.
1932 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1933 of 'all_probe_ops'.
1934
0e9ae10f
SDJ
19352017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1936 Simon Marchi <simark@simark.ca>
1937
1938 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1939 variable.
1940 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1941 <aexpr>: Change type to 'expression_up'.
1942 (stap_probe_arg_s): Delete type and VEC.
1943 (struct stap_probe): Delete. Replace by...
1944 (class stap_static_probe_ops): ...this and...
1945 (class stap_probe): ...this. Rename variables to add 'm_'
1946 prefix. Do not use 'union' for arguments anymore.
1947 (stap_get_expected_argument_type): Receive probe name instead
1948 of 'struct stap_probe'. Adjust code.
1949 (stap_parse_probe_arguments): Rename to...
1950 (stap_probe::parse_arguments): ...this. Adjust code to
1951 reflect change.
1952 (stap_get_probe_address): Rename to...
1953 (stap_probe::get_relocated_address): ...this. Adjust code
1954 to reflect change.
1955 (stap_get_probe_argument_count): Rename to...
1956 (stap_probe::get_argument_count): ...this. Adjust code
1957 to reflect change.
1958 (stap_get_arg): Rename to...
1959 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1960 reflect change.
1961 (can_evaluate_probe_arguments): Rename to...
1962 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1963 to reflect change.
1964 (stap_evaluate_probe_argument): Rename to...
1965 (stap_probe::evaluate_argument): ...this. Adjust code
1966 to reflect change.
1967 (stap_compile_to_ax): Rename to...
1968 (stap_probe::compile_to_ax): ...this. Adjust code to
1969 reflect change.
1970 (stap_probe_destroy): Delete.
1971 (stap_modify_semaphore): Adjust comment.
1972 (stap_set_semaphore): Rename to...
1973 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1974 change.
1975 (stap_clear_semaphore): Rename to...
1976 (stap_probe::clear_semaphore): ...this. Adjust code to
1977 reflect change.
1978 (stap_probe::get_static_ops): New method.
1979 (handle_stap_probe): Adjust code to create instance of
1980 'stap_probe'.
1981 (stap_get_probes): Rename to...
1982 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1983 reflect change.
1984 (stap_probe_is_linespec): Rename to...
1985 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1986 reflect change.
1987 (stap_type_name): Rename to...
1988 (stap_static_probe_ops::type_name): ...this. Adjust code to
1989 reflect change.
1990 (stap_gen_info_probes_table_header): Rename to...
1991 (stap_static_probe_ops::gen_info_probes_table_header):
1992 ...this. Adjust code to reflect change.
1993 (stap_gen_info_probes_table_values): Rename to...
1994 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1995 code to reflect change.
1996 (struct probe_ops stap_probe_ops): Delete.
1997 (info_probes_stap_command): Use 'info_probes_for_spops'
1998 instead of 'info_probes_for_ops'.
1999 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
2000 of 'all_probe_ops'.
2001
935676c9
SDJ
20022017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
2003
2004 * break-catch-throw.c (fetch_probe_arguments): Use
2005 'probe.prob' instead of 'probe.probe'.
2006 * breakpoint.c (create_longjmp_master_breakpoint): Call
2007 'can_evaluate_arguments' and 'get_relocated_address' methods
2008 from probe.
2009 (create_exception_master_breakpoint): Likewise.
2010 (add_location_to_breakpoint): Use 'sal->prob' instead of
2011 'sal->probe'.
2012 (bkpt_probe_insert_location): Call 'set_semaphore' method from
2013 probe.
2014 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
2015 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
2016 of 'probe_ops'.
2017 (probe_key_free): Call 'delete' on probe.
2018 (check_exception_resume): Use 'probe.prob' instead of
2019 'probe.probe'.
2020 * location.c (string_to_event_location_basic): Call
2021 'probe_linespec_to_static_ops'.
2022 * probe.c (class any_static_probe_ops): New class.
2023 (any_static_probe_ops any_static_probe_ops): New variable.
2024 (parse_probes_in_pspace): Receive 'static_probe_ops' as
2025 argument. Adjust code to reflect change.
2026 (parse_probes): Use 'static_probe_ops' instead of
2027 'probe_ops'. Adjust code to reflect change.
2028 (find_probes_in_objfile): Call methods to get name and
2029 provider from probe.
2030 (find_probe_by_pc): Use 'result.prob' instead of
2031 'result.probe'. Call 'get_relocated_address' method from
2032 probe.
2033 (collect_probes): Adjust comment and argument list to receive
2034 'static_probe_ops' instead of 'probe_ops'. Adjust code to
2035 reflect change. Call necessary methods from probe.
2036 (compare_probes): Call methods to get name and provider from
2037 probes.
2038 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
2039 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
2040 adjust code accordingly.
2041 (print_ui_out_not_applicables): Likewise.
2042 (info_probes_for_ops): Rename to...
2043 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
2044 as argument instead of 'probe_ops'. Adjust code. Call
2045 necessary methods from probe.
2046 (info_probes_command): Use 'info_probes_for_spops'.
2047 (enable_probes_command): Pass correct argument to
2048 'collect_probes'. Call methods from probe.
2049 (disable_probes_command): Likewise.
2050 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
2051 (get_probe_argument_count): Move to
2052 'any_static_probe_ops::get_argument_count'.
2053 (can_evaluate_probe_arguments): Move to
2054 'any_static_probe_ops::can_evaluate_arguments'.
2055 (evaluate_probe_argument): Move to
2056 'any_static_probe_ops::evaluate_argument'.
2057 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
2058 'probe.probe'.
2059 (probe_linespec_to_ops): Rename to...
2060 (probe_linespec_to_static_ops): ...this. Adjust code.
2061 (probe_any_is_linespec): Rename to...
2062 (any_static_probe_ops::is_linespec): ...this.
2063 (probe_any_get_probes): Rename to...
2064 (any_static_probe_ops::get_probes): ...this.
2065 (any_static_probe_ops::type_name): New method.
2066 (any_static_probe_ops::gen_info_probes_table_header): New
2067 method.
2068 (compute_probe_arg): Use 'pc_probe.prob' instead of
2069 'pc_probe.probe'. Call methods from probe.
2070 (compile_probe_arg): Likewise.
2071 (std::vector<const probe_ops *> all_probe_ops): Delete.
2072 (std::vector<const static_probe_ops *> all_static_probe_ops):
2073 New variable.
2074 (_initialize_probe): Use 'all_static_probe_ops' instead of
2075 'all_probe_ops'.
2076 * probe.h (struct info_probe_column) <field_name>: Delete
2077 extraneous newline
2078 (info_probe_column_s): Delete type and VEC.
2079 (struct probe_ops): Delete. Replace with...
2080 (class static_probe_ops): ...this and...
2081 (clas probe): ...this.
2082 (struct bound_probe) <bound_probe>: Delete extraneous
2083 newline. Adjust constructor to receive 'probe' instead of
2084 'struct probe'.
2085 <probe>: Rename to...
2086 <prob>: ...this. Delete extraneous newline.
2087 <objfile>: Delete extraneous newline.
2088 (register_probe_ops): Delete unused prototype.
2089 (info_probes_for_ops): Rename to...
2090 (info_probes_for_spops): ...this. Adjust comment.
2091 (get_probe_address): Move to 'probe::get_address'.
2092 (get_probe_argument_count): Move to
2093 'probe::get_argument_count'.
2094 (can_evaluate_probe_arguments): Move to
2095 'probe::can_evaluate_arguments'.
2096 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
2097 * solib-svr4.c (struct svr4_info): Adjust comment.
2098 (struct probe_and_action) <probe>: Rename to...
2099 <prob>: ...this.
2100 (register_solib_event_probe): Receive 'probe' instead of
2101 'struct probe' as argument. Use 'prob' instead of 'probe'
2102 when applicable.
2103 (solib_event_probe_action): Call 'get_argument_count' method
2104 from probe. Adjust comment.
2105 (svr4_handle_solib_event): Adjust comment. Call
2106 'evaluate_argument' method from probe.
2107 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
2108 from probe.
2109 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
2110 'struct probe'. Call 'can_evaluate_arguments' from probe.
2111 * symfile.h: Forward declare 'class probe' instead of 'struct
2112 probe'.
2113 * symtab.h: Likewise.
2114 (struct symtab_and_line) <probe>: Rename to...
2115 <prob>: ...this.
2116 * tracepoint.c (start_tracing): Use 'prob' when applicable.
2117 Call probe methods.
2118 (stop_tracing): Likewise.
2119
8f6cb6c3
JB
21202017-11-22 Joel Brobecker <brobecker@adacore.com>
2121
2122 * ravenscar-thread.c (ravenscar_inferior_created): Remove
2123 trailing newline at end of string in call to warning.
2124
479f8de1
SM
21252017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * osdata.h: Include vector isntead of vec.h.
2128 (osdata_column_s): Remove typedef.
2129 (struct osdata_column): Add constructor.
2130 <name, value>: Change type to std::string.
2131 (DEF_VEC_O (osdata_column_s)): Remove.
2132 (osdata_item_s): Remove typedef.
2133 (struct osdata_item) <columns>: Change type to std::vector.
2134 (DEF_VEC_O (osdata_item_s)): Remove.
2135 (struct osdata): Add constructor.
2136 <type>: Change type to std::string.
2137 <items>: Change type to std::vector.
2138 (osdata_p): Remove typedef.
2139 (DEF_VEC_P (osdata_p)): Remove.
2140 (osdata_parse): Return a unique_ptr.
2141 (osdata_free): Remove.
2142 (make_cleanup_osdata_free): Remove.
2143 (get_osdata): Return a unique_ptr.
2144 (get_osdata_column): Return pointer to std::string, take a
2145 reference to osdata_item as parameter.
2146 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2147 unique_ptr.
2148 <property_name>: Change type to std::string.
2149 (osdata_start_osdata): Allocate osdata with new and adjust.
2150 (osdata_start_item): Adjust.
2151 (osdata_start_column): Adjust.
2152 (osdata_end_column): Adjust.
2153 (clear_parsing_data): Remove.
2154 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2155 (osdata_item_clear): Remove.
2156 (get_osdata): return a unique_ptr and adjust.
2157 (get_osdata_column): Return a pointer to std::string and adjust.
2158 (info_osdata): Adjust.
2159 * mi/mi-main.c: Include <map>.
2160 (free_vector_of_osdata_items): Remove.
2161 (list_available_thread_groups): Adjust, use std::map instead of
2162 splay tree.
2163
41bd68f5
SM
21642017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2167 case in switch.
2168
7e2fd2f4
SM
21692017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2170
2171 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2172
0604393c
SM
21732017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2174
2175 * varobj.h (struct varobj_update_result): Add constructor, add
2176 move constructor, disable copy and assign, initialize fields.
2177 <newobj>: Change type to std::vector.
2178 (varobj_update): Return std::vector.
2179 * varobj.c (install_dynamic_child): Change VEC parameters to
2180 std::vector and adjust.
2181 (update_dynamic_varobj_children): Likewise.
2182 (varobj_update): Return std::vector and adjust.
2183 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2184
ddf0ea08
SM
21852017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2186
2187 * varobj.h (struct varobj) <parent>: Remove const.
2188 <children>: Change type to std::vector.
2189 (varobj_list_children): Return std::vector const reference.
2190 (varobj_restrict_range): Change parameter type to std::vector
2191 const reference.
2192 * varobj.c (varobj_has_more): Adjust.
2193 (varobj_restrict_range): Change parameter type to std::vector
2194 const reference and adjust.
2195 (install_dynamic_child): Adjust.
2196 (update_dynamic_varobj_children): Adjust.
2197 (varobj_list_children): Return std::vector const reference and
2198 adjust.
2199 (varobj_add_child): Adjust.
2200 (update_type_if_necessary): Adjust.
2201 (varobj_update): Adjust.
2202 (delete_variable_1): Adjust.
2203 * ada-varobj.c (ada_value_has_mutated): Adjust.
2204 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2205
9e5b9d2b
SM
22062017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2207
2208 * varobj.h (struct varobj): Add constructor and destructor,
2209 initialize fields.
2210 * varobj.c (struct varobj_root): Initialize fields.
2211 (struct varobj_dynamic): Initialize fields.
2212 (varobj_create): Use unique_ptr instead of cleanup. Create
2213 varobj with new instead of new_root_variable.
2214 (delete_variable_1): Free variable with delete instead of
2215 free_variable.
2216 (create_child_with_value): Create variable with new instead of
2217 new_variable.
2218 (varobj::varobj): New.
2219 (varobj::~varobj): New (body mostly coming from free_variable).
2220 (new_variable): Remove.
2221 (free_variable): Remove.
2222 (do_free_variable_cleanup): Remove.
2223 (make_cleanup_free_variable): Remove.
2224
fc35dab1
UW
22252017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2226
2227 * core-regset.c: Remove file.
2228 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2229
2400729e
UW
22302017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2231
2232 * NEWS: Document use of GNU MPFR.
2233 * README: Likewise.
2234
2235 * Makefile.in (LIBMPFR): Add define.
2236 (CLIBS): Add $(LIBMPFR).
2237 * configure.ac: Add --with-mpfr configure option.
2238 * configure: Regenerate.
2239 * config.in: Regenerate.
2240
2241 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2242 (class mpfr_float_ops): New type.
2243 (mpfr_float_ops::from_target): Two new overloaded functions.
2244 (mpfr_float_ops::to_target): Likewise.
2245 (mpfr_float_ops::to_string): New function.
2246 (mpfr_float_ops::from_string): Likewise.
2247 (mpfr_float_ops::to_longest): Likewise.
2248 (mpfr_float_ops::from_longest): Likewise.
2249 (mpfr_float_ops::from_ulongest): Likewise.
2250 (mpfr_float_ops::to_host_double): Likewise.
2251 (mpfr_float_ops::from_host_double): Likewise.
2252 (mpfr_float_ops::convert): Likewise.
2253 (mpfr_float_ops::binop): Likewise.
2254 (mpfr_float_ops::compare): Likewise.
2255 (get_target_float_ops): Use mpfr_float_ops if available.
2256
7a26362d
UW
22572017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2258
2259 * target-float.c: Do not include <math.h>.
2260 Include <cmath> and <limits>.
2261 (DOUBLEST): Do not define.
2262 (class target_float_ops): New type.
2263 (class host_float_ops): New templated type.
2264 (class decimal_float_ops): New type.
2265
2266 (floatformat_to_doublest): Rename to ...
2267 (host_float_ops<T>::from_target): ... this. Use template type T
2268 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2269 (host_float_ops<T>::from_target): New overload using a type argument.
2270 (floatformat_from_doublest): Rename to ...
2271 (host_float_ops<T>::to_target): ... this. Use template type T
2272 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2273 (host_float_ops<T>::to_target): New overload using a type argument.
2274 (floatformat_printf_format): New function.
2275 (struct printf_length_modifier): New templated type.
2276 (floatformat_to_string): Rename to ...
2277 (host_float_ops<T>::to_string): ... this. Use type instead of
2278 floatformat argument. Use floatformat_printf_format and
2279 printf_length_modifier. Remove special handling of invalid numbers,
2280 infinities and NaN (moved to target_float_to_string).
2281 (struct scanf_length_modifier): New templated type.
2282 (floatformat_from_string): Rename to ...
2283 (host_float_ops<T>::from_string): ... this. Use type instead of
2284 floatformat argument. Use scanf_length_modifier.
2285 (floatformat_to_longest): Rename to ...
2286 (host_float_ops<T>::to_longest): ... this. Use type instead of
2287 floatformat argument. Handle out-of-range values deterministically.
2288 (floatformat_from_longest): Rename to ...
2289 (host_float_ops<T>::from_longest): ... this. Use type instead of
2290 floatformat argument.
2291 (floatformat_from_ulongest): Rename to ...
2292 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2293 floatformat argument.
2294 (floatformat_to_host_double): Rename to ...
2295 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2296 floatformat argument.
2297 (floatformat_from_host_double): Rename to ...
2298 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2299 floatformat argument.
2300 (floatformat_convert): Rename to ...
2301 (host_float_ops<T>::convert): ... this. Use type instead of
2302 floatformat arguments. Remove handling of no-op conversions.
2303 (floatformat_binop): Rename to ...
2304 (host_float_ops<T>::binop): ... this. Use type instead of
2305 floatformat arguments.
2306 (floatformat_compare): Rename to ...
2307 (host_float_ops<T>::compare): ... this. Use type instead of
2308 floatformat arguments.
2309
2310 (match_endianness): Use type instead of length/byte_order arguments.
2311 (set_decnumber_context): Likewise.
2312 (decimal_from_number): Likewise. Update calls.
2313 (decimal_to_number): Likewise.
2314 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2315 (decimal_float_ops::to_host_double): New dummy function.
2316 (decimal_float_ops::from_host_double): Likewise.
2317 (decimal_to_string): Rename to ...
2318 (decimal_float_ops::to_string): ... this. Use type instead of
2319 length/byte_order arguments. Update calls.
2320 (decimal_from_string): Rename to ...
2321 (decimal_float_ops::from_string): ... this. Use type instead of
2322 length/byte_order arguments. Update calls.
2323 (decimal_from_longest): Rename to ...
2324 (decimal_float_ops::from_longest): ... this. Use type instead of
2325 length/byte_order arguments. Update calls.
2326 (decimal_from_ulongest): Rename to ...
2327 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2328 length/byte_order arguments. Update calls.
2329 (decimal_to_longest): Rename to ...
2330 (decimal_float_ops::to_longest): ... this. Use type instead of
2331 length/byte_order arguments. Update calls.
2332 (decimal_binop): Rename to ...
2333 (decimal_float_ops::binop): ... this. Use type instead of
2334 length/byte_order arguments. Update calls.
2335 (decimal_compare): Rename to ...
2336 (decimal_float_ops::compare): ... this. Use type instead of
2337 length/byte_order arguments. Update calls.
2338 (decimal_convert): Rename to ...
2339 (decimal_float_ops::convert): ... this. Use type instead of
2340 length/byte_order arguments. Update calls.
2341
2342 (target_float_same_category_p): New function.
2343 (target_float_same_format_p): Likewise.
2344 (target_float_format_length): Likewise.
2345 (enum target_float_ops_kind): New type.
2346 (get_target_float_ops_kind): New function.
2347 (get_target_float_ops): Three new overloaded functions.
2348
2349 (target_float_is_zero): Update call.
2350 (target_float_to_string): Add special handling of invalid numbers,
2351 infinities and NaN (moved from floatformat_to_string). Use
2352 target_float_ops callback.
2353 (target_float_from_string): Use target_float_ops callback.
2354 (target_float_to_longest): Likewise.
2355 (target_float_from_longest): Likewise.
2356 (target_float_from_ulongest): Likewise.
2357 (target_float_to_host_double): Likewise.
2358 (target_float_from_host_double): Likewise.
2359 (target_float_convert): Add special case for no-op conversions.
2360 Use target_float_ops callback.
2361 (target_float_binop): Use target_float_ops callback.
2362 (target_float_compare): Likewise.
2363
a9f26f60
YQ
23642017-11-22 Yao Qi <yao.qi@linaro.org>
2365
2366 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2367
29f9a567
YQ
23682017-11-22 Yao Qi <yao.qi@linaro.org>
2369
2370 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2371 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2372
3b1b69bf
JG
23732017-11-21 Jerome Guitton <guitton@adacore.com>
2374
2375 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2376 with event ptid from the lower layer before doing the
2377 ravenscar-specific update.
2378
54aa6c67
JB
23792017-11-21 Joel Brobecker <brobecker@adacore.com>
2380
2381 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2382 the ptid's TID is nonzero.
2383
cf3fbed4
JB
23842017-11-21 Joel Brobecker <brobecker@adacore.com>
2385
2386 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2387 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2388 Make non-static. Change return type to char *. Adjust code
2389 accordingly. Rewrite the function's documentation.
2390 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2391 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2392 we have enough debugging information in the runtime to support
2393 Ada task debugging before we enable the ravenscar-thread layer.
2394
9edcc12f
JB
23952017-11-21 Joel Brobecker <brobecker@adacore.com>
2396
2397 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2398 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2399 * ravenscar-thread.c: Add into comment.
2400 (base_magic_null_ptid): Delete.
2401 (base_ptid): Change documentation.
2402 (ravenscar_active_task): Renames ravenscar_running_thread.
2403 All callers updated throughout.
2404 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2405 (ravenscar_task_is_currently_active): Likewise.
2406 (get_base_thread_from_ravenscar_task): Ditto.
2407 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2408 (ravenscar_runtime_initialized): Likewise.
2409 (get_running_thread_id): Add new parameter "cpu". Adjust
2410 implementation to handle this new parameter.
2411 (ravenscar_fetch_registers): Small adjustment to use
2412 is_ravenscar_task and ravenscar_task_is_currently_active in
2413 order to decide whether to use the target beneath or this
2414 module's arch_ops.
2415 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2416 (ravenscar_stopped_by_sw_breakpoint): Use
2417 get_base_thread_from_ravenscar_task to get the underlying
2418 thread, rather than using base_ptid.
2419 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2420 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2421 Likewise.
2422 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2423
65d40437
JB
24242017-11-21 Joel Brobecker <brobecker@adacore.com>
2425
2426 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2427 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2428 (get_tcb_types_info): Set fieldnos.base_cpu.
2429 (read_atcb): Set task_info->base_cpu.
2430 (info_task): Print "Base CPU" info if set by runtime.
2431
e02544b2
JB
24322017-11-21 Joel Brobecker <brobecker@adacore.com>
2433
2434 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2435 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2436 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2437 New functions.
2438 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2439 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2440 to_stopped_data_address and to_core_of_thread fields of
2441 ravenscar_ops.
2442
ed0f4273
UW
24432017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2444
2445 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2446 (struct gdbarch_tdep): New member long_double_abi.
2447 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2448 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2449 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2450 format depending on long_double_abi tdep member.
2451 (ppc_floatformat_for_type): Handle __ibm128 type.
2452
0fc76421
SM
24532017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2454
2455 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2456
e6b2f5ef
PA
24572017-11-21 Pedro Alves <palves@redhat.com>
2458
2459 * dwarf2read.c (mapped_index::find_name_components_bounds)
2460 <completion mode, upper bound>: Use std::lower_bound instead of
2461 std::upper_bound.
2462 (test_mapped_index_find_name_component_bounds): Remove incorrect
2463 "t1_fund" from expected symbols.
2464
5c58de74
PA
24652017-11-21 Pedro Alves <palves@redhat.com>
2466
2467 * dwarf2read.c (mapped_index::name_components_casing): New field.
2468 (mapped_index) <build_name_components,
2469 find_name_components_bounds): Declare new methods.
2470 (mapped_index::find_name_components_bounds)
2471 (mapped_index::build_name_components): New methods, factored out
2472 from dw2_expand_symtabs_matching_symbol.
2473 (check_find_bounds_finds)
2474 (test_mapped_index_find_name_component_bounds): New.
2475 (run_test): Rename to ...
2476 (test_dw2_expand_symtabs_matching_symbol): ... this.
2477 (run_test): Reimplement.
2478
e1ef7d7a
PA
24792017-11-21 Pedro Alves <palves@redhat.com>
2480
2481 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2482 (symbol_end): Use cp_ident_is_alnum.
2483 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2484 * dwarf2read.c (make_sort_after_prefix_name): New function.
2485 (dw2_expand_symtabs_matching_symbol): Use it.
2486 (test_symbols): Add more symbols.
2487 (run_test): Add tests.
2488
cf724bc9
TT
24892017-11-17 Tom Tromey <tom@tromey.com>
2490
2491 * symtab.h (enum symbol_subclass_kind): New.
2492 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2493 Remove.
2494 <subclass>: New member.
2495 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2496 * rust-lang.c (rust_get_trait_object_pointer): Update.
2497 * dwarf2read.c (read_func_scope): Update.
2498 (read_variable): Update.
2499
68e745e3
TT
25002017-11-17 Tom Tromey <tom@tromey.com>
2501
2502 * dwarf2read.c (read_func_scope): Update.
2503 * symtab.h (struct template_symbol): Derive from symbol.
2504 <base>: Remove.
2505
71a3c369
TT
25062017-11-17 Tom Tromey <tom@tromey.com>
2507
2508 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2509 (struct rust_vtable_symbol): New.
2510 (find_symbol_at_address): Declare.
2511 * symtab.c (find_symbol_at_address): New function.
2512 * symfile.h (struct quick_symbol_functions)
2513 <find_compunit_symtab_by_address>: New member.
2514 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2515 function.
2516 (debug_sym_quick_functions): Link to
2517 debug_qf_find_compunit_symtab_by_address.
2518 * rust-lang.c (rust_get_trait_object_pointer): New function.
2519 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2520 rust_get_trait_object_pointer.
2521 * psymtab.c (psym_relocate): Clear psymbol_map.
2522 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2523 functions.
2524 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2525 * objfiles.h (struct objfile) <psymbol_map>: New member.
2526 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2527 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2528 (rust_containing_type, read_variable): New functions.
2529
7468702d
SM
25302017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2531
2532 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2533
37269bc9
SM
25342017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2535
2536 * common/filestuff.c: Include <algorithm>.
2537 (open_fds): Change type to std::vector<int>.
2538 (do_mark_open_fd): Adjust.
2539 (unmark_fd_no_cloexec): Adjust.
2540 (do_close): Adjust.
2541
5c632425
SM
25422017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2543
2544 * breakpoint.c (output_thread_groups): Take an std::vector.
2545 (print_one_breakpoint_location): Adjust.
2546
ced9779b
JB
25472017-11-17 Joel Brobecker <brobecker@adacore.com>
2548
2549 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2550 (ada_evaluate_subexp_for_cast): New function.
2551 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2552 ada_evaluate_subexp_for_cast.
2553 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2554 eval_skip_value.
2555 * eval.c (evaluate_var_value): Make non-static.
2556 (evaluate_var_msym_value, eval_skip_value): Likewise.
2557 * value.h (evaluate_var_value, evaluate_var_msym_value)
2558 (eval_skip_value): Declare.
2559
b7e22850
JB
25602017-11-16 Joel Brobecker <brobecker@adacore.com>
2561
2562 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2563 Update all callers.
2564
9ccabccd
PA
25652017-11-16 Pedro Alves <palves@redhat.com>
2566
2567 * python/py-unwind.c (pyuw_sniffer): Translate
2568 PyExc_KeyboardInterrupt to a GDB Quit exception.
2569
d930703d
PA
25702017-11-16 Pedro Alves <palves@redhat.com>
2571
2572 * infrun.c (resume_cleanups): Delete.
2573 (resume): No longer install a resume_cleanups cleanup nor call
2574 QUIT.
2575 (proceed): Pass the terminal to the inferior.
2576 (keep_going_pass_signal): No longer install a resume_cleanups
2577 cleanup.
2578
38dc2859
PA
25792017-11-16 Pedro Alves <palves@redhat.com>
2580
2581 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2582 if the prompt is blocked.
2583
688fca4f
PA
25842017-11-16 Pedro Alves <palves@redhat.com>
2585
2586 * breakpoint.c (insert_bp_location): Replace bp_err and
2587 bp_err_message locals by a gdb_exception local.
2588
e2c33ac7
PA
25892017-11-16 Pedro Alves <palves@redhat.com>
2590
2591 * inflow.c (scoped_ignore_sigttou): New class.
2592 (child_terminal_ours_1, new_tty): Use it.
2593
d7236961
UW
25942017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2595
2596 * target-float.c (decimal_from_number): Add byte_order argument and
2597 call match_endianness. Error if unknown floating-point type.
2598 (decimal_to_number): Add byte_order argument and call match_endianness.
2599 (decimal_from_longest): Update call. Do not call match_endianness.
2600 (decimal_from_ulongest): Likewise.
2601 (decimal_binop): Likewise.
2602 (decimal_is_zero): Likewise.
2603 (decimal_compare): Likewise.
2604 (decimal_convert): Likewise.
2605
d8ae99a7
PM
26062017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2607
2608 * python/python.c (gdbpy_rbreak): New function.
2609 * NEWS: Document Python rbreak feature.
2610
c632b645
YQ
26112017-11-16 Yao Qi <yao.qi@linaro.org>
2612
2613 * features/tic6x-c62x.xml: Remove.
2614 * features/tic6x-c64x.xml: Remove.
2615 * features/tic6x-c64xp.xml: Remove.
2616
a014b87a
JB
26172017-11-15 John Baldwin <jhb@FreeBSD.org>
2618
2619 * symtab.h: Include <array>.
2620
94765011
JB
26212017-11-15 John Baldwin <jhb@FreeBSD.org>
2622
2623 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2624 (bsd_kvm_proc_cmd): Likewise.
2625
625ad440
SM
26262017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * tui/tui-win.c (window_name_completer): Replace VEC with
2629 std::vector.
2630
c0c11fa9
AC
26312017-11-15 Andrew Cagney <cagney@gnu.org>
2632
2633 * MAINTAINERS: Remove no-longer applicable entries.
2634
34a7ebaf
AC
26352017-11-15 Andrew Cagney <cagney@gnu.org>
2636
2637 * MAINTAINERS: Move self to Past Maintainers.
2638
5334ef39
YQ
26392017-11-15 Yao Qi <yao.qi@linaro.org>
2640
2641 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2642 * features/nios2-linux.c: Remove.
2643 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2644 initialize_tdesc_nios2_linux.
2645
a714b0d6
YQ
26462017-11-15 Yao Qi <yao.qi@linaro.org>
2647
2648 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2649 M68HC11_LAST_HARD_REG + 1.
2650
92ffd475
PC
26512017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2652
2653 PR gdb/22388
2654 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2655 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2656 Return TARGET_XFER_EOF if size of returned data is 0.
2657
07431908
SM
26582017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2661 memory-map-selftests.c.
2662 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2663 * memory-map.c (memory_map_start_memory): Fix computation of hi
2664 address.
2665 * unittests/memory-map-selftests.c: New file.
2666
31432a67
JB
26672017-11-09 Joel Brobecker <brobecker@adacore.com>
2668
2669 * ada-lang.c: Fix some typos in the general command documenting
2670 how Ada expressions are being evaluated and how their result
2671 is printed.
2672
e793c052
TT
26732017-11-09 Tom Tromey <tom@tromey.com>
2674
2675 * psymtab.c (psymbol_hash): Do not hash string contents.
2676 (psymbol_compare): Add comment.
2677
7e8835c5
TT
26782017-11-09 Tom Tromey <tom@tromey.com>
2679
2680 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2681
286acbb5
JB
26822017-11-08 Joel Brobecker <brobecker@adacore.com>
2683
2684 * ada-exp.y (write_var_from_sym): Remove parameter
2685 "orig_left_context". Update all callers.
2686
b44ec619
SM
26872017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2688
2689 * tracepoint.h (class collection_list) <stringify>: Return
2690 std::vector<std::string>.
2691 (encode_actions_rsp): Change parameters to
2692 std::vector<std::string> *.
2693 * tracepoint.c (collection_list::stringify): Return
2694 std::vector<std::string> and adjust accordingly.
2695 (encode_actions_rsp): Changee parameters to
2696 std::vector<std::string> and adjust accordingly.
2697 * remote.c (free_actions_list),
2698 free_actions_list_cleanup_wrapper): Remove.
2699 (remote_download_tracepoint): Adjust to std::vector.
2700
2f4732b0
TT
27012017-11-08 Tom Tromey <tom@tromey.com>
2702
2703 * dwarf2read.c (symbolp): Remove typedef.
2704 (read_func_scope): Use std::vector.
2705 (process_structure_scope): Use std::vector.
2706
f9d67a22
PA
27072017-11-08 Pedro Alves <palves@redhat.com>
2708
2709 * ada-lang.c (ada_make_symbol_completion_list): Use
2710 completion_skip_symbol.
2711 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2712 (symbol_is_function_or_method(symbol*)): New.
2713 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2714 completion_skip_symbol.
2715 (default_collect_symbol_completion_matches_break_on): Use
2716 completion_skip_symbol. Pass down mode.
2717 (collect_file_symbol_completion_matches): Pass down mode.
2718 * symtab.h (symbol_is_function_or_method): New declarations.
2719 (completion_skip_symbol): New template function.
2720
56d87ef7
PA
27212017-11-08 Pedro Alves <palves@redhat.com>
2722
2723 * linespec.c (iterate_over_all_matching_symtabs): Add
2724 search_domain parameter. Pass it down to expand_symtabs_matching.
2725 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2726 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2727 search_domain.
2728 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2729 Pass it down.
2730 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2731 symbols.
2732 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2733 it down.
2734
1b026119
PA
27352017-11-08 Pedro Alves <palves@redhat.com>
2736
2737 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2738 text_len locals and don't pass them down.
2739 * symtab.c (completion_list_add_name): Remove
2740 sym_text/sym_text_len parameters and adjust.
2741 (completion_list_add_symbol, completion_list_add_msymbol)
2742 (completion_list_objc_symbol, completion_list_add_fields)
2743 (add_symtab_completions): Likewise.
2744 (default_collect_symbol_completion_matches_break_on)
2745 (collect_file_symbol_completion_matches): Remove sym_text_len
2746 local and don't pass it down.
2747 * symtab.h (completion_list_add_name): Remove
2748 sym_text/sym_text_len parameters.
2749
c62446b1
PA
27502017-11-08 Pedro Alves <palves@redhat.com>
2751
2752 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2753 unittests/lookup_name_info-selftests.c.
2754 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2755 * cp-support.c: Include "selftest.h".
2756 (cp_remove_params_1): Rename from cp_remove_params. Add
2757 'require_param' parameter, and handle it.
2758 (cp_remove_params): Reimplement.
2759 (cp_remove_params_if_any): New.
2760 (selftests::quote): New.
2761 (selftests::check_remove_params): New.
2762 (selftests::test_cp_remove_params): New.
2763 (_initialize_cp_support): Install
2764 selftests::test_cp_remove_params.
2765 * cp-support.h (cp_remove_params_if_any): Declare.
2766 * dwarf2read.c :Include "selftest.h".
2767 (dw2_expand_symtabs_matching_symbol): Use
2768 lookup_name_info::make_ignore_params.
2769 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2770 (selftests::dw2_expand_symtabs_matching::string_or_null)
2771 (selftests::dw2_expand_symtabs_matching::check_match)
2772 (selftests::dw2_expand_symtabs_matching::test_symbols)
2773 (selftests::dw2_expand_symtabs_matching::run_test): New.
2774 (_initialize_dwarf2_read): Register
2775 selftests::dw2_expand_symtabs_matching::run_test.
2776 * psymtab.c (psym_expand_symtabs_matching): Use
2777 lookup_name_info::make_ignore_params.
2778 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2779 If the lookup name wants to ignore parameters, strip them.
2780 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2781 code handling '('.
2782 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2783 (default_collect_symbol_completion_matches_break_on): Don't try to
2784 strip parameters.
2785 * symtab.h (lookup_name_info::lookup_name_info): Add
2786 'ignore_parameters' parameter.
2787 (lookup_name_info::ignore_parameters)
2788 (lookup_name_info::make_ignore_params): New methods.
2789 (lookup_name_info::m_ignore_parameters): New field.
2790 * unittests/lookup_name_info-selftests.c: New file.
2791
61920122
PA
27922017-11-08 Pedro Alves <palves@redhat.com>
2793
2794 * dwarf2read.c (dw2_expand_marked_cus)
2795 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2796 (dw2_expand_symtabs_matching): Move further below.
2797 (dw2_expand_marked_cus): Reindent.
2798
3f563c84
PA
27992017-11-08 Pedro Alves <palves@redhat.com>
2800
2801 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2802 (struct name_component): New.
2803 (mapped_index::name_components): New field.
2804 (mapped_index::symbol_name_at): New method.
2805 (dwarf2_read_index): Call mapped_index ctor.
2806 (dw2_map_matching_symbols): Add comment about name_components
2807 table.
2808 (dw2_expand_symtabs_matching): Factor part to...
2809 (dw2_expand_symtabs_matching_symbol): ... this new function.
2810 Build name components table, and lookup symbols in it before
2811 calling the name matcher.
2812 (dw2_expand_marked_cus): New, factored out from
2813 dw2_expand_symtabs_matching.
2814 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2815
b5ec771e
PA
28162017-11-08 Pedro Alves <palves@redhat.com>
2817
2818 * ada-lang.c (ada_encode): Rename to ..
2819 (ada_encode_1): ... this. Add throw_errors parameter and handle
2820 it.
2821 (ada_encode): Reimplement.
2822 (match_name): Delete, folded into full_name.
2823 (resolve_subexp): No longer pass the encoded name to
2824 ada_lookup_symbol_list.
2825 (should_use_wild_match): Delete.
2826 (name_match_type_from_name): New.
2827 (ada_lookup_simple_minsym): Use lookup_name_info and the
2828 language's symbol_name_matcher_ftype.
2829 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2830 (ada_add_block_renamings): Adjust to use lookup_name_info.
2831 (ada_lookup_name): New.
2832 (add_nonlocal_symbols, ada_add_all_symbols)
2833 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2834 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2835 (ada_name_for_lookup): Delete.
2836 (ada_lookup_encoded_symbol): Construct a verbatim name.
2837 (wild_match): Reverse sense of return type. Use bool.
2838 (full_match): Reverse sense of return type. Inline bits of old
2839 match_name here.
2840 (ada_add_block_symbols): Adjust to use lookup_name_info.
2841 (symbol_completion_match): Delete, folded into...
2842 (ada_lookup_name_info::matches): ... .this new method.
2843 (symbol_completion_add): Delete.
2844 (ada_collect_symbol_completion_matches): Add name_match_type
2845 parameter. Adjust to use lookup_name_info and
2846 completion_list_add_name.
2847 (get_var_value, ada_add_global_exceptions): Adjust to use
2848 lookup_name_info.
2849 (ada_get_symbol_name_cmp): Delete.
2850 (do_wild_match, do_full_match): New functions.
2851 (ada_lookup_name_info::ada_lookup_name_info): New method.
2852 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2853 functions.
2854 (ada_language_defn): Install ada_get_symbol_name_matcher.
2855 * ada-lex.l (processId): If name starts with '<', copy it
2856 verbatim.
2857 * block.c (block_iter_match_step, block_iter_match_first)
2858 (block_iter_match_next, block_lookup_symbol)
2859 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2860 lookup_name_info.
2861 * block.h (block_iter_match_first, block_iter_match_next)
2862 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2863 * c-lang.c (c_language_defn, cplus_language_defn)
2864 (asm_language_defn, minimal_language_defn): Adjust comments to
2865 refer to la_get_symbol_name_matcher.
2866 * completer.c (complete_files_symbols)
2867 (collect_explicit_location_matches, symbol_completer): Pass a
2868 symbol_name_match_type down.
2869 * completer.h (class completion_match, completion_match_result):
2870 New classes.
2871 (completion_tracker::reset_completion_match_result): New method.
2872 (completion_tracker::m_completion_match_result): New field.
2873 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2874 lookup_name_info.
2875 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2876 functions.
2877 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2878 * d-lang.c: Adjust comments to refer to
2879 la_get_symbol_name_matcher.
2880 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2881 Adjust to use lookup_name_info.
2882 (dict_iter_match_first, dict_iter_match_next)
2883 (iter_match_first_hashed, iter_match_next_hashed)
2884 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2885 with a lookup_name_info.
2886 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2887 Likewise.
2888 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2889 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2890 (gdb_index_symbol_name_matcher): New class.
2891 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2892 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2893 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2894 with a symbol_name_match_type.
2895 (f_language_defn): Adjust comments to refer to
2896 la_get_symbol_name_matcher.
2897 * go-lang.c (go_language_defn): Adjust comments to refer to
2898 la_get_symbol_name_matcher.
2899 * language.c (default_symbol_name_matcher)
2900 (language_get_symbol_name_matcher): New functions.
2901 (unknown_language_defn, auto_language_defn): Adjust comments to
2902 refer to la_get_symbol_name_matcher.
2903 * language.h (symbol_name_cmp_ftype): Delete.
2904 (language_defn) <la_collect_symbol_completion_matches>: Add match
2905 type parameter.
2906 <la_get_symbol_name_cmp>: Delete field.
2907 <la_get_symbol_name_matcher>: New field.
2908 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2909 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2910 Declare.
2911 * linespec.c (iterate_over_all_matching_symtabs)
2912 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2913 (find_methods): Add language parameter, and use lookup_name_info
2914 and the language's symbol_name_matcher_ftype.
2915 (linespec_complete_function): Adjust.
2916 (lookup_prefix_sym): Use lookup_name_info.
2917 (add_all_symbol_names_from_pspace): Adjust.
2918 (find_superclass_methods): Add language parameter and pass it
2919 down.
2920 (find_method): Pass symbol language down.
2921 (find_linespec_symbols): Don't demangle or Ada encode here.
2922 (search_minsyms_for_name): Add lookup_name_info parameter.
2923 (add_matching_symbols_to_info): Add name_match_type parameter.
2924 Use lookup_name_info.
2925 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2926 la_get_symbol_name_matcher.
2927 * minsyms.c: Include <algorithm>.
2928 (add_minsym_to_demangled_hash_table): Remove table parameter and
2929 add objfile parameter. Use search_name_hash, and add language to
2930 demangled languages vector.
2931 (struct found_minimal_symbols): New struct.
2932 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2933 New functions.
2934 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2935 input names here. Use lookup_name_info instead. Lookup up
2936 demangled names once for each language in the demangled names
2937 vector.
2938 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2939 demangled names once for each language in the demangled names
2940 vector.
2941 (build_minimal_symbol_hash_tables): Adjust.
2942 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2943 lookup_name_info.
2944 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2945 la_get_symbol_name_matcher.
2946 * objfiles.h: Include <vector>.
2947 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2948 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2949 la_get_symbol_name_matcher.
2950 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2951 la_get_symbol_name_matcher.
2952 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2953 (match_partial_symbol): Use symbol_name_match_type,
2954 lookup_name_info and psymbol_name_matches.
2955 (lookup_partial_symbol): Use lookup_name_info.
2956 (map_block): Use symbol_name_match_type and lookup_name_info.
2957 (psym_map_matching_symbols): Use symbol_name_match_type.
2958 (psymbol_name_matches): New.
2959 (recursively_search_psymtabs): Use lookup_name_info and
2960 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2961 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2962 'kind' parameter to 'domain'.
2963 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2964 la_get_symbol_name_matcher.
2965 * symfile-debug.c (debug_qf_map_matching_symbols)
2966 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2967 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2968 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2969 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2970 Adjust to use symbol_name_match_type.
2971 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2972 (expand_symtabs_matching): Adjust to use lookup_name_info.
2973 * symmisc.c (maintenance_expand_symtabs): Use
2974 lookup_name_info::match_any ().
2975 * symtab.c (symbol_matches_search_name): New.
2976 (eq_symbol_entry): Adjust to use lookup_name_info and the
2977 language's matcher.
2978 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2979 (lookup_name_info::match_any): New.
2980 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2981 (compare_symbol_name): Add language, lookup_name_info and
2982 completion_match_result parameters, and use them.
2983 (completion_list_add_name): Make extern. Add language and
2984 lookup_name_info parameters. Use them.
2985 (completion_list_add_symbol, completion_list_add_msymbol)
2986 (completion_list_objc_symbol): Add lookup_name_info parameters and
2987 adjust. Pass down language.
2988 (completion_list_add_fields): Add lookup_name_info parameters and
2989 adjust. Pass down language.
2990 (add_symtab_completions): Add lookup_name_info parameters and
2991 adjust.
2992 (default_collect_symbol_completion_matches_break_on): Add
2993 name_match_type parameter, and use it. Use lookup_name_info.
2994 (default_collect_symbol_completion_matches)
2995 (collect_symbol_completion_matches): Add name_match_type
2996 parameter, and pass it down.
2997 (collect_symbol_completion_matches_type): Adjust.
2998 (collect_file_symbol_completion_matches): Add name_match_type
2999 parameter, and use lookup_name_info.
3000 * symtab.h: Include <string> and "common/gdb_optional.h".
3001 (enum class symbol_name_match_type): New.
3002 (class ada_lookup_name_info): New.
3003 (struct demangle_for_lookup_info): New.
3004 (class lookup_name_info): New.
3005 (symbol_name_matcher_ftype): New.
3006 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
3007 (symbol_matches_search_name): Declare.
3008 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
3009 (default_collect_symbol_completion_matches)
3010 (collect_symbol_completion_matches)
3011 (collect_file_symbol_completion_matches): Add name_match_type
3012 parameter.
3013 (iterate_over_symbols): Use lookup_name_info.
3014 (completion_list_add_name): Declare.
3015 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
3016 (strncmp_iw_with_mode): Now extern.
3017 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
3018 (strncmp_iw_with_mode): Declare.
3019
5ffa0793
PA
30202017-11-08 Keith Seitz <keiths@redhat.com>
3021 Pedro Alves <palves@redhat.com>
3022
3023 * ada-lang.c (ada_language_defn): Install
3024 default_search_name_hash.
3025 * buildsym.c (struct buildsym_compunit): <language>: New field.
3026 (finish_block_internal): Pass language when creating dictionaries.
3027 (start_buildsym_compunit, start_symtab): New language parameters.
3028 Use them.
3029 (restart_symtab): Pass down compilation unit's language.
3030 * buildsym.h (enum language): Forward declare.
3031 (start_symtab): New 'language' parameter.
3032 * c-lang.c (c_language_defn, cplus_language_defn)
3033 (asm_language_defn, minimal_language_defn): Install
3034 default_search_name_hash.
3035 * coffread.c (coff_start_symtab): Adjust.
3036 * d-lang.c (d_language_defn): Install default_search_name_hash.
3037 * dbxread.c (struct symloc): Add 'pst_language' field.
3038 (PST_LANGUAGE): Define.
3039 (start_psymtab, read_ofile_symtab): Use it.
3040 (process_one_symbol): New 'language' parameter. Pass it down.
3041 * dictionary.c (struct dictionary) <language>: New field.
3042 (DICT_LANGUAGE): Define.
3043 (dict_create_hashed, dict_create_hashed_expandable)
3044 (dict_create_linear, dict_create_linear_expandable): New parameter
3045 'language'. Set the dictionary's language.
3046 (iter_match_first_hashed): Adjust to rename.
3047 (insert_symbol_hashed): Assert we don't see mismatching
3048 languages. Adjust to rename.
3049 (dict_hash): Rename to ...
3050 (default_search_name_hash): ... this and make extern.
3051 * dictionary.h (struct language_defn): Forward declare.
3052 (dict_create_hashed): New parameter 'language'.
3053 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
3054 * f-lang.c (f_language_defn): Install default_search_name_hash.
3055 * go-lang.c (go_language_defn): Install default_search_name_hash.
3056 * jit.c (finalize_symtab): Pass compunit's language to dictionary
3057 creation.
3058 * language.c (unknown_language_defn, auto_language_defn):
3059 * language.h (language_defn::la_search_name_hash): New field.
3060 (default_search_name_hash): Declare.
3061 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
3062 * mdebugread.c (new_block): New parameter 'language'.
3063 * mdebugread.c (parse_symbol): Pass symbol language to block
3064 allocation.
3065 (psymtab_to_symtab_1): Pass down language.
3066 (new_symtab): Pass compunit's language to block allocation.
3067 * objc-lang.c (objc_language_defn): Install
3068 default_search_name_hash.
3069 * opencl-lang.c (opencl_language_defn):
3070 * p-lang.c (pascal_language_defn): Install
3071 default_search_name_hash.
3072 * rust-lang.c (rust_language_defn): Install
3073 default_search_name_hash.
3074 * stabsread.h (enum language): Forward declare.
3075 (process_one_symbol): Add 'language' parameter.
3076 * symtab.c (search_name_hash): New function.
3077 * symtab.h (search_name_hash): Declare.
3078 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
3079
2a1dde5d
PA
30802017-11-08 Pedro Alves <palves@redhat.com>
3081
3082 * cp-name-parser.y (main): Don't initialize extra_chars.
3083
95a6b0a1
TT
30842017-11-07 Tom Tromey <tom@tromey.com>
3085
3086 * event-top.h (command_handler): Constify.
3087 * record-full.c (cmd_record_full_start): Update.
3088 * thread.c (thread_apply_all_command): Update.
3089 * printcmd.c (eval_command): Update.
3090 * mi/mi-main.c (mi_execute_cli_command): Update.
3091 (mi_execute_async_cli_command): Update.
3092 * tui/tui-stack.c (tui_update_command): Update.
3093 * cli/cli-interp.c (safe_execute_command): Constify.
3094 * record.c (record_start): Update.
3095 (record_start, record_stop, cmd_record_start): Update.
3096 * record-btrace.c (cmd_record_btrace_bts_start): Update.
3097 (cmd_record_btrace_pt_start): Update.
3098 (cmd_record_btrace_start): Update.
3099 (cmd_record_btrace_start): Update.
3100 * reverse.c (exec_reverse_once): Update.
3101 * python/python.c (execute_gdb_command): Don't copy the command.
3102 * event-top.c (command_line_handler): Update.
3103 (command_handler): Constify.
3104 * defs.h (deprecated_call_command_hook): Constify.
3105 * cli/cli-script.h (execute_user_command): Constify.
3106 * cli/cli-script.c (execute_user_command): Constify.
3107 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
3108 (enum command_control_type): Update.
3109 * main.c (catch_command_errors): Remove non-const overload.
3110 (catch_command_errors_ftype): Remove.
3111 * python/py-cmd.c (cmdpy_function): Constify.
3112 * guile/scm-cmd.c (cmdscm_function): Constify.
3113 * cli/cli-dump.c (call_dump_func): Constify.
3114 * cli/cli-decode.c (do_const_cfunc): Constify.
3115 (do_sfunc): Constify.
3116 (cmd_func): Constify.
3117 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
3118 * top.h (execute_command): Constify.
3119 * top.c (execute_command): Constify.
3120 (execute_command_to_string): Constify.
3121 (deprecated_call_command_hook): Constify.
3122 * command.h (cmd_func): Constify.
3123 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
3124
eb4c3f4a
TT
31252017-11-07 Tom Tromey <tom@tromey.com>
3126
3127 * ada-lang.c (catch_ada_exception_command): Constify.
3128 (catch_assert_command): Constify.
3129 * break-catch-throw.c (catch_catch_command, catch_throw_command)
3130 (catch_rethrow_command): Constify.
3131 (catch_exception_command_1): Constify.
3132 * breakpoint.h (add_catch_command): Constify.
3133 * break-catch-syscall.c (catch_syscall_command_1): Constify.
3134 (catch_syscall_split_args): Constify.
3135 * break-catch-sig.c (catch_signal_command): Constify.
3136 (catch_signal_split_args): Constify.
3137 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3138 cmd_const_sfunc_ftype.
3139 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3140 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3141 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3142 (add_setshow_string_cmd, struct cmd_list_element)
3143 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3144 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3145 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3146 Constify.
3147 (set_cmd_sfunc): Constify.
3148 (empty_sfunc): Constify.
3149 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3150 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3151 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3152 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3153 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3154 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3155 Constify.
3156 (set_cmd_sfunc): Constify.
3157 (cmd_sfunc_ftype): Remove.
3158 * compile/compile.c (set_compile_args): Constify.
3159 * infrun.c (set_disable_randomization): Constify.
3160 * infcmd.c (set_args_command, set_cwd_command): Constify.
3161 * breakpoint.c (set_condition_evaluation_mode): Constify.
3162 (add_catch_command): Constify.
3163 (catch_fork_command_1, catch_exec_command_1)
3164 (catch_load_command_1, catch_unload_command_1): Constify.
3165 (catch_load_or_unload): Constify.
3166 * guile/scm-param.c (pascm_set_func): Constify.
3167 (add_setshow_generic): Constify.
3168 * python/py-param.c (get_set_value): Constify.
3169 * top.h (set_verbose): Constify.
3170 * tui/tui-win.c (tui_set_var_cmd): Constify.
3171 * mi/mi-main.c (set_mi_async_command): Constify.
3172 * cli/cli-logging.c (set_logging_overwrite)
3173 (set_logging_redirect): Constify.
3174 * value.c (set_max_value_size): Constify.
3175 * valprint.c (set_input_radix, set_output_radix): Constify.
3176 * utils.c (set_width_command, set_height_command): Constify.
3177 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3178 * tracepoint.c (set_disconnected_tracing)
3179 (set_circular_trace_buffer, set_trace_buffer_size)
3180 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3181 * top.c (set_history_size_command, set_verbose, set_editing)
3182 (set_gdb_datadir, set_history_filename): Constify.
3183 * target.c (set_targetdebug, maint_set_target_async_command)
3184 (maint_set_target_non_stop_command, set_target_permissions)
3185 (set_write_memory_permission): Constify.
3186 (open_target): Constify.
3187 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3188 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3189 * symtab.c (set_symbol_cache_size_handler): Constify.
3190 * symfile.c (set_ext_lang_command): Constify.
3191 * symfile-debug.c (set_debug_symfile): Constify.
3192 * source.c (set_directories_command): Constify.
3193 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3194 * serial.c (set_parity): Constify.
3195 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3196 * remote.c (set_remote_exec_file, set_remotebreak)
3197 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3198 * record.c (set_record_insn_history_size)
3199 (set_record_call_history_size): Constify.
3200 * record-full.c (set_record_full_insn_max_num): Constify.
3201 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3202 * osabi.c (set_osabi): Constify.
3203 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3204 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3205 * maint.c (maintenance_set_profile_cmd): Constify.
3206 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3207 * language.c (set_language_command, set_range_command)
3208 (set_case_command): Constify.
3209 * infrun.c (set_non_stop, set_observer_mode)
3210 (set_stop_on_solib_events, set_schedlock_func)
3211 (set_exec_direction_func): Constify.
3212 * infcmd.c (set_inferior_tty_command): Constify.
3213 * disasm.c (set_disassembler_options_sfunc): Constify.
3214 * demangle.c (set_demangling_command): Constify.
3215 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3216 * cris-tdep.c (set_cris_version, set_cris_mode)
3217 (set_cris_dwarf2_cfi): Constify.
3218 * corefile.c (set_gnutarget_command): Constify.
3219 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3220 (set_target_wide_charset_sfunc): Constify.
3221 * breakpoint.c (update_dprintf_commands): Constify.
3222 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3223 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3224 (set_disassembly_style_sfunc): Constify.
3225 * arch-utils.c (set_endian, set_architecture): Constify.
3226 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3227 * agent.c (set_can_use_agent): Constify.
3228
5fed81ff
TT
32292017-11-07 Tom Tromey <tom@tromey.com>
3230
3231 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3232 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3233 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3234 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3235 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3236 (parse_int_arg, show_thread_default_detach_sc_cmd)
3237 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3238 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3239 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3240 (show_task_pause_cmd, set_task_detach_sc_cmd)
3241 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3242 (set_noninvasive_cmd, set_thread_pause_cmd)
3243 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3244 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3245 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3246 * windows-nat.c (display_selectors): Constify.
3247 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3248 non-const "cfunc".
3249 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3250 (cmd_cfunc_eq): Likewise.
3251 (struct cmd_list_element): Likewise.
3252 (do_cfunc): Remove.
3253 (cli_user_command_p): Update.
3254 * command.h (add_cmd): Remove non-const overload.
3255 (cmd_cfunc_ftype): Remove typedef.
3256 (cmd_cfunc_eq): Remove non-const overload.
3257 * value.c (show_values): Constify.
3258 * thread.c (thread_apply_all_command): Constify.
3259 * symfile.c (load_command): Constify.
3260 * source.c (directory_command): Constify.
3261 * maint.c (maintenance_internal_error)
3262 (maintenance_demangler_warning, maintenance_space_display)
3263 (maintenance_print_architecture, maintenance_translate_address)
3264 (maintenance_info_selftests, maintenance_internal_warning):
3265 Constify.
3266 * breakpoint.c (disable_trace_command, enable_trace_command):
3267 Constify.
3268 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3269 Constify.
3270 (add_auto_load_safe_path): Constify.
3271 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3272 * top.h (show_commands): Constify.
3273 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3274 * sparc64-tdep.c (adi_examine_command): Constify.
3275 (adi_assign_command): Constify.
3276
1d12d88f
TT
32772017-11-07 Tom Tromey <tom@tromey.com>
3278
3279 * frame.h (info_locals_command, info_args_command): Constify.
3280 * auto-load.h (auto_load_info_scripts): Constify.
3281 * inferior.h (registers_info): Constify.
3282 * copying.c: Rebuild.
3283 * copying.awk: Constify generated commands.
3284 * auto-load.c (auto_load_info_scripts)
3285 (info_auto_load_gdb_scripts): Constify.
3286 * cli/cli-decode.c (struct cmd_list_element): Take a
3287 cmd_const_cfunc_ftype.
3288 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3289 * tui/tui-win.c (tui_all_windows_info): Constify.
3290 * python/py-auto-load.c (info_auto_load_python_scripts):
3291 Constify.
3292 * cli/cli-cmds.c (show_command): Remove non-const overload.
3293 * tracepoint.c (info_tvariables_command, info_scope_command):
3294 Constify.
3295 (info_static_tracepoint_markers_command): Constify.
3296 * thread.c (info_threads_command): Constify.
3297 (print_thread_info_1): Constify.
3298 * target.c (info_target_command): Constify.
3299 * symtab.c (info_sources_command, info_functions_command)
3300 (info_types_command): Constify.
3301 (info_variables_command): Remove non-const overload.
3302 * symfile.c (info_ext_lang_command): Constify.
3303 * stack.c (info_frame_command, info_locals_command)
3304 (info_args_command): Constify.
3305 (backtrace_command): Remove non-const overload.
3306 * source.c (info_source_command, info_line_command): Constify.
3307 * solib.c (info_sharedlibrary_command): Constify.
3308 * skip.c (info_skip_command): Constify.
3309 * ser-go32.c (info_serial_command): Constify.
3310 * reverse.c (info_bookmarks_command): Constify.
3311 * printcmd.c (info_symbol_command, info_address_command)
3312 (info_display_command): Constify.
3313 * osdata.c (info_osdata_command): Constify.
3314 * objc-lang.c (info_selectors_command, info_classes_command):
3315 Constify.
3316 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3317 * memattr.c (info_mem_command): Constify.
3318 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3319 * linux-fork.c (info_checkpoints_command): Constify.
3320 * infrun.c (info_signals_command): Constify.
3321 * inflow.c (info_terminal_command): Constify.
3322 * inferior.c (info_inferiors_command): Constify.
3323 (print_inferior): Constify.
3324 * infcmd.c (info_program_command, info_all_registers_command)
3325 (info_registers_command, info_vector_command)
3326 (info_float_command): Constify.
3327 (registers_info): Constify.
3328 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3329 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3330 Constify.
3331 * f-valprint.c (info_common_command): Constify.
3332 * dcache.c (info_dcache_command): Constify.
3333 (dcache_info_1): Constify.
3334 * darwin-nat-info.c (info_mach_tasks_command)
3335 (info_mach_task_command, info_mach_ports_command)
3336 (info_mach_port_command, info_mach_threads_command)
3337 (info_mach_thread_command, info_mach_regions_command)
3338 (info_mach_regions_recurse_command, info_mach_region_command)
3339 (info_mach_exceptions_command): Constify.
3340 (get_task_from_args): Constify.
3341 * cp-support.c (info_vtbl_command): Constify.
3342 * breakpoint.c (info_watchpoints_command)
3343 (info_tracepoints_command): Constify.
3344 (info_breakpoints_command): Remove non-const overload.
3345 * avr-tdep.c (avr_io_reg_read_command): Constify.
3346 * auxv.c (info_auxv_command): Constify.
3347 * ada-tasks.c (info_tasks_command): Constify.
3348 (info_task): Constify.
3349 * ada-lang.c (info_exceptions_command): Constify.
3350
0b39b52e
TT
33512017-11-07 Tom Tromey <tom@tromey.com>
3352
3353 * solib.h (no_shared_libraries): Constify.
3354 * frame.h (return_command): Constify.
3355 * cli/cli-cmds.h (quit_command): Constify.
3356 * top.h (quit_command, execute_command): Constify.
3357 * target.h (flash_erase_command): Constify.
3358 * inferior.h (set_inferior_args, attach_command): Constify.
3359 * tracepoint.h (start_tracing, stop_tracing): Constify.
3360 * breakpoint.h (break_command, tbreak_command)
3361 (hbreak_command_wrapper, thbreak_command_wrapper)
3362 (rbreak_command_wrapper, watch_command_wrapper)
3363 (awatch_command_wrapper, rwatch_command_wrapper)
3364 (get_tracepoint_by_number): Constify.
3365 * symtab.c (info_variables_command, rbreak_command)
3366 (symtab_symbol_info): Constify.
3367 (info_variables_command): Add non-const overload.
3368 * top.c (dont_repeat_command): Constify.
3369 * breakpoint.c (ignore_command, commands_command)
3370 (condition_command, tbreak_command, hbreak_command)
3371 (thbreak_command, clear_command, break_command)
3372 (info_breakpoints_command, watch_command, rwatch_command)
3373 (awatch_command, trace_command, ftrace_command, strace_command)
3374 (trace_pass_command, break_range_command, dprintf_command)
3375 (agent_printf_command, get_tracepoint_by_number)
3376 (watch_maybe_just_location, trace_pass_command): Constify.
3377 (info_breakpoints_command): Add non-const overload.
3378 * tracefile.c (tsave_command): Constify.
3379 * infcmd.c (attach_command, disconnect_command, signal_command)
3380 (queue_signal_command, stepi_command, nexti_command)
3381 (finish_command, next_command, step_command, until_command)
3382 (advance_command, jump_command, continue_command, run_command)
3383 (start_command, starti_command, interrupt_command)
3384 (run_command_1, set_inferior_args, step_1): Constify.
3385 * inferior.c (add_inferior_command, remove_inferior_command)
3386 (clone_inferior_command): Constify.
3387 * linux-fork.c (checkpoint_command, restart_command): Constify.
3388 * windows-nat.c (signal_event_command): Constify.
3389 * guile/guile.c (guile_repl_command, guile_command): Constify.
3390 * printcmd.c (x_command, display_command, printf_command)
3391 (output_command, set_command, call_command, print_command)
3392 (eval_command): Constify.
3393 (non_const_set_command): Remove.
3394 (_initialize_printcmd): Update.
3395 * source.c (forward_search_command, reverse_search_command):
3396 Constify.
3397 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3398 Constify.
3399 * infrun.c (handle_command): Constify.
3400 * memattr.c (mem_command): Constify.
3401 * stack.c (return_command, up_command, up_silently_command)
3402 (down_command, down_silently_command, frame_command)
3403 (backtrace_command, func_command, backtrace_command_1): Constify.
3404 (backtrace_command): Add non-const overload.
3405 * remote-sim.c (simulator_command): Constify.
3406 * exec.c (set_section_command): Constify.
3407 * tracepoint.c (tdump_command, trace_variable_command)
3408 (tstatus_command, tstop_command, tstart_command)
3409 (end_actions_pseudocommand, while_stepping_pseudocommand)
3410 (collect_pseudocommand, teval_pseudocommand, actions_command)
3411 (start_tracing, stop_tracing): Constify.
3412 * value.c (init_if_undefined_command): Constify.
3413 * tui/tui-stack.c (tui_update_command): Constify.
3414 * tui/tui-win.c (tui_refresh_all_command)
3415 (tui_set_tab_width_command, tui_set_win_height_command)
3416 (tui_set_focus_command, tui_scroll_forward_command)
3417 (tui_scroll_backward_command, tui_scroll_left_command)
3418 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3419 (tui_set_win_height): Constify.
3420 * tui/tui-layout.c (tui_layout_command): Constify.
3421 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3422 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3423 (proc_untrace_sysexit_cmd): Constify.
3424 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3425 (threadset_test_cmd, threadlist_update_test_cmd)
3426 (threadalive_test): Constify.
3427 * objc-lang.c (print_object_command): Constify.
3428 * command.h (add_com): Constify.
3429 * cli/cli-dump.c (restore_command): Constify.
3430 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3431 (help_command, complete_command, shell_command, edit_command)
3432 (list_command, disassemble_command, make_command)
3433 (apropos_command, alias_command): Constify.
3434 * cli/cli-script.c (document_command, define_command)
3435 (while_command, if_command, validate_comname): Constify.
3436 * cli/cli-decode.c (struct cmd_list_element): Change type of
3437 "fun".
3438 * target.c (do_monitor_command, flash_erase_command): Constify.
3439 * regcache.c (reg_flush_command): Constify.
3440 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3441 (reverse_nexti, reverse_continue, reverse_finish)
3442 (save_bookmark_command, goto_bookmark_command)
3443 (exec_reverse_once): Constify.
3444 * python/python.c (python_interactive_command, python_command):
3445 Constify.
3446 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3447 Constify.
3448 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3449 * gcore.c (gcore_command): Constify.
3450
85c4be7c
TT
34512017-11-07 Tom Tromey <tom@tromey.com>
3452
3453 * printcmd.c (x_command): Call set_repeat_arguments.
3454 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3455 * top.c (repeat_arguments): New global.
3456 (set_repeat_arguments): New function.
3457 (execute_command): Handle repeat_arguments.
3458 (show_commands): Calls set_repeat_arguments.
3459 * command.h (set_repeat_arguments): Declare.
3460
022643b4
TT
34612017-11-07 Tom Tromey <tom@tromey.com>
3462
3463 * stack.c (backtrace_command): Use std::string.
3464 (backtrace_command_1): Make "count_exp" const.
3465
5614fb77
TT
34662017-11-07 Tom Tromey <tom@tromey.com>
3467
3468 * source.c (directory_switch, mod_path, add_path): Constify.
3469 * defs.h (add_path, mod_path, directory_switch): Constify.
3470 * mi/mi-cmd-env.c (env_mod_path): Constify.
3471
6be9a197
TT
34722017-11-07 Tom Tromey <tom@tromey.com>
3473
3474 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3475 (run_command_1, continue_command, step_1, jump_command)
3476 (signal_command, until_command, advance_command, finish_command)
3477 (attach_command): Update.
3478
c2252c0d
TT
34792017-11-07 Tom Tromey <tom@tromey.com>
3480
3481 * command.h (set_cmd_cfunc): Don't declare.
3482 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3483
1ee870c5
TT
34842017-11-07 Tom Tromey <tom@tromey.com>
3485
3486 * stack.c (select_frame_command): Constify.
3487 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3488 * command.h (add_com_suppress_notification): Constify.
3489
ee7ddd71
TT
34902017-11-07 Tom Tromey <tom@tromey.com>
3491
3492 * breakpoint.c (stop_command): Constify.
3493 * cli/cli-decode.c (struct cmd_list_element): Constify.
3494 * command.h (add_abbrev_prefix_cmd): Constify.
3495
95e95a6d
PA
34962017-11-07 Pedro Alves <palves@redhat.com>
3497
3498 * breakpoint.c (extract_bp_kind): New enum.
3499 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3500 factored out from ...
3501 (extract_bp_number_and_location): ... here.
3502 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3503
cc638e86
PA
35042017-11-07 Pedro Alves <palves@redhat.com>
3505
3506 * breakpoint.c (extract_bp_number_and_location): Change return
3507 type to void. Throw error instead of warning.
3508 (enable_disable_command): Adjust.
3509
d0fe4701
XR
35102017-11-07 Xavier Roirand <roirand@adacore.com>
3511 Pedro Alves <palves@redhat.com>
3512
3513 * breakpoint.c (map_breakpoint_number_range): New, factored out
3514 from ...
3515 (map_breakpoint_numbers): ... here.
3516 (find_location_by_number): Change parameters from string to
3517 breakpoint number and location.
3518 (extract_bp_number_and_location): New function.
3519 (enable_disable_bp_num_loc)
3520 (enable_disable_breakpoint_location_range)
3521 (enable_disable_command): New functions, factored out ...
3522 (enable_command, disable_command): ... these functions, and
3523 adjusted to support ranges.
3524 * NEWS: Document enable/disable breakpoint location range feature.
3525
635dc5b2
LM
35262017-11-06 Luis Machado <luis.machado@linaro.org>
3527
3528 * MAINTAINERS (Write After Approval): Update my e-mail address.
3529
556e5da5
PA
35302017-11-06 Pedro Alves <palves@redhat.com>
3531
3532 * gnu-nat.c (gnu_terminal_init): Delete.
3533 (gnu_target): Don't install gnu_terminal_init.
3534 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3535 (child_terminal_init): ... this function.
3536
d1928160
PA
35372017-11-06 Pedro Alves <palves@redhat.com>
3538
3539 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3540 sgtty.h.
3541 * config.in, configure: Regenerate.
3542
6aa899ce
PA
35432017-11-06 Pedro Alves <palves@redhat.com>
3544
3545 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3546 (async_init_signals): Adjust.
3547 (handle_stop_sig): Rename to ...
3548 (handle_sigtstp): ... this.
3549 (async_stop_sig): Rename to ...
3550 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3551 SIGTSTP path.
3552 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3553 instead of STOP_SIGNAL thoughout.
3554 (handle_stop_sig): Rename to ...
3555 (handle_sigtstp): ... this.
3556 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3557
a94799ac
PA
35582017-11-06 Pedro Alves <palves@redhat.com>
3559
3560 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3561 longer set flags twice in row.
3562
726e1356
PA
35632017-11-06 Pedro Alves <palves@redhat.com>
3564
3565 * Makefile.in (SER_HARDWIRE): Update comment.
3566 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3567 * common/gdb_termios.h: Delete file.
3568 * common/job-control.c: Include termios.h and unistd.h instead of
3569 gdb_termios.h.
3570 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3571 check.
3572 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3573 Remove sgtty code.
3574 * configure.ac: No longer check for termio.h and sgtty.h.
3575 * configure: Regenerate.
3576 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3577 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3578 Replace PROCESS_GROUP_TYPE references with pid_t references
3579 throughout.
3580 (gdb_getpgrp): Delete.
3581 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3582 (child_terminal_inferior): Remove comment. Remove sgtty code.
3583 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3584 gdb_getpgrp. Use serial_set_tty_state instead aof
3585 serial_noflush_set_tty_state. Remove sgtty code.
3586 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3587 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3588 (inferior_process_group): Now returns pid_t.
3589 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3590 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3591 * ser-event.c (serial_event_ops): Update.
3592 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3593 (dos_ops): Update.
3594 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3595 * ser-pipe.c (pipe_ops): Update.
3596 * ser-tcp.c (tcp_ops): Update.
3597 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3598 HAVE_TERMIOS checks.
3599 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3600 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3601 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3602 assume termios.
3603 (hardwire_noflush_set_tty_state): Delete.
3604 (hardwire_print_tty_state, hardwire_drain_output)
3605 (hardwire_flush_output, hardwire_flush_input)
3606 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3607 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3608 code, and assume termios.
3609 (hardwire_ops): Update.
3610 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3611 * serial.c (serial_noflush_set_tty_state): Delete.
3612 * serial.h (serial_noflush_set_tty_state): Delete.
3613 (serial_ops::noflush_set_tty_state): Delete.
3614
1cfb73db
UW
36152017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3616
3617 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3618 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3619 (COMMON_OBS): Remove doublest.o and dfp.o.
3620 Do not build target-float.c (instead of doublest.c)
3621 with -Wformat-nonliteral.
3622
3623 * doublest.c: Remove file.
3624 * doublest.h: Remove file.
3625 * dfp.c: Remove file.
3626 * dfp.h: Remove file.
3627
3628 * target-float.c: Do not include "doublest.h" and "dfp.h".
3629 (DOUBLEST): Move here from doublest.h.
3630 (enum float_kind): Likewise.
3631 (FLOATFORMAT_CHAR_BIT): Likewise.
3632 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3633 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3634 (floatformat_precision): Likewise.
3635 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3636 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3637 Likewise.
3638 (host_float_format, host_double_format, host_long_double_format):
3639 Likewise.
3640 (floatformat_to_string, floatformat_from_string): Likewise.
3641 (floatformat_to_doublest): Likewise. Also, inline the original
3642 convert_floatformat_to_doublest.
3643 (floatformat_from_doublest): Likewise. Also, inline the original
3644 convert_floatformat_from_doublest.
3645
3646 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3647 (MAX_DECIMAL_STRING): Move here from dfp.c.
3648 (match_endianness): Likewise.
3649 (set_decnumber_context, decimal_check_errors): Likewise.
3650 (decimal_from_number, decimal_to_number): Likewise.
3651 (decimal_to_string, decimal_from_string): Likewise. Make static.
3652 (decimal_from_longest, decimal_from_ulongest): Likewise.
3653 (decimal_to_longest): Likewise.
3654 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3655 (decimal_convert): Likewise.
3656
b07e9c46
UW
36572017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3658
3659 * doublest.c: Do not include "gdbtypes.h".
3660 (extract_typed_floating): Remove.
3661 (store_typed_floating): Remove.
3662 (convert_typed_floating): Remove.
3663 * doublest.h (struct type): Remove.
3664 (DOUBLEST_PRINT_FORMAT): Remove.
3665 (DOUBLEST_SCAN_FORMAT): Remove.
3666 (extract_typed_floating): Remove.
3667 (store_typed_floating): Remove.
3668 (convert_typed_floating): Remove.
3669
3670 * dfp.c (decimal_from_doublest): Remove.
3671 (decimal_to_doublest): Remove.
3672 * dfp.h: Do not include "doublest.h".
3673 (decimal_from_doublest): Remove.
3674 (decimal_to_doublest): Remove.
3675
3676 * value.c: Do not include "doublest.h" and "dfp.h".
3677 (value_as_double): Remove.
3678 (unpack_double): Remove.
3679 (value_from_double): Remove.
3680 (value_from_decfloat): Remove.
3681 * value.h: Do not include "doublest.h".
3682 (value_as_double): Remove.
3683 (unpack_double): Remove.
3684 (value_from_double): Remove.
3685 (value_from_decfloat): Remove.
3686
3b2ca824
UW
36872017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3688
3689 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3690 (i386_extract_return_value): Use target_float_convert.
3691 (i386_store_return_value): Likewise.
3692 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3693 (i387_value_to_register): Likewise.
3694 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3695 (ia64_register_to_value): Use target_float_convert.
3696 (ia64_value_to_register): Likewise.
3697 (ia64_extract_return_value): Likewise.
3698 (ia64_store_return_value): Likewise.
3699 (ia64_push_dummy_call): Likewise.
3700 * m68k-tdep.c: Include "target-float.h".
3701 (m68k_register_to_value): Use target_float_convert.
3702 (m68k_value_to_register): Likewise.
3703 (m68k_svr4_extract_return_value): Likewise.
3704 (m68k_svr4_store_return_value): Likewise.
3705 * ppc-sysv-tdep.c: Include "target-float.h".
3706 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3707 (do_ppc_sysv_return_value): Likewise.
3708 (ppc64_sysv_abi_push_freg): Likewise.
3709 (ppc64_sysv_abi_return_value_base): Likewise.
3710 * rs6000-aix-tdep.c: Include "target-float.h".
3711 (rs6000_push_dummy_call): Use target_float_convert.
3712 (rs6000_return_value): Likewise.
3713 * rs6000-lynx178-tdep.c: Include "target-float.h".
3714 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3715 (rs6000_lynx178_return_value): Likewise.
3716 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3717 (rs6000_register_to_value): Use target_float_convert.
3718 (rs6000_value_to_register): Likewise.
3719 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3720 (arm_extract_return_value): Use target_float_convert.
3721 (arm_store_return_value): Likewise.
3722 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3723 (sh_register_convert_to_virtual): Use target_float_convert.
3724 (sh_register_convert_to_raw): Likewise.
3725 * sh64-tdep.c: Include "target-float.h".
3726 (sh64_extract_return_value): Use target_float_convert.
3727 (sh64_register_convert_to_virtual): Likewise.
3728 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3729
14ad9311
UW
37302017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3731
3732 * target-float.c (floatformat_to_host_double): New function.
3733 (floatformat_from_host_double): Likewise.
3734 (target_float_to_host_double): Likewise.
3735 (target_float_from_host_double): Likewise.
3736 * target-float.h (target_float_to_host_double): Add prototype.
3737 (target_float_from_host_double): Likewise.
3738
3739 * guile/scm-value.c: Include "target-float.h".
3740 (gdbscm_value_to_real): Use target_float_to_host_double.
3741 Handle integer source values via value_as_long.
3742 * guile/scm-math.c: Include "target-float.h". Do not include
3743 "doublest.h", "dfp.h", and "expression.h".
3744 (vlscm_convert_typed_number): Use target_float_from_host_double.
3745 (vlscm_convert_number): Likewise.
3746
3747 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3748 (convert_value_from_python): Use target_float_from_host_double.
3749
50eff16b
UW
37502017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3751
3752 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3753 (cast_from_fixed): Likewise.
3754 (ada_scaling_type): New function.
3755 (ada_delta): Return value instead of DOUBLEST. Perform target
3756 arithmetic instead of host arithmetic.
3757 (scaling_factor): Rename to ...
3758 (ada_scaling_factor) ... this. Make non-static. Return value instead
3759 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3760 (ada_fixed_to_float): Remove.
3761 (ada_float_to_fixed): Remove.
3762 * ada-lang.h (ada_fixed_to_float): Remove.
3763 (ada_float_to_fixed): Remove.
3764 (ada_delta): Return value instead of DOUBLEST.
3765 (ada_scaling_factor): Add prototype.
3766
3767 * ada-typeprint.c: Include "target-float.h".
3768 (print_fixed_point_type): Perform target arithmetic instead of
3769 host arithmetic.
3770 * ada-valprint.c: Include "target-float.h".
3771 (ada_val_print_num): Perform target arithmetic instead of
3772 host arithmetic for fixed-point types.
3773
66c02b9e
UW
37742017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3775
3776 * target-float.c: Include <math.h>.
3777 (floatformat_binop): New function.
3778 (floatformat_compare): Likewise.
3779 (target_float_binop): Likewise.
3780 (target_float_compare): Likewise.
3781 * target-float.h: Include "expression.h".
3782 (target_float_binop): Add prototype.
3783 (target_float_compare): Likewise.
3784
3785 * valarith.c: Do not include "doublest.h" and "dfp.h".
3786 Include "common/byte-vector.h".
3787 (value_args_as_decimal): Remove, replace by ...
3788 (value_args_as_target_float): ... this function. Handle both
3789 binary and decimal target floating-point formats.
3790 (scalar_binop): Handle both binary and decimal FP using
3791 value_args_as_target_float and target_float_binop.
3792 (value_equal): Handle both binary and decimal FP using
3793 value_args_as_target_float and target_float_compare.
3794 (value_less): Likewise.
3795 (value_pos): Handle all scalar types as simple copy.
3796 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3797 * dfp.c (decimal_binop): Throw error instead of internal_error
3798 when called with an unsupported operation code.
3799
f69fdf9b
UW
38002017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3801
3802 * target-float.c (target_float_to_string): New function.
3803 (target_float_from_string): New function.
3804 * target-float.h (target_float_to_string): Add prototype.
3805 (target_float_from_string): Add prototype.
3806
3807 * valprint.c: Include "target-float.h". Do not include
3808 "doublest.h" and "dfp.h".
3809 (print_floating): Use target_float_to_string.
3810 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3811 (printf_floating): Use target_float_to_string.
3812 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3813 (print_i387_value): Use target_float_to_string.
3814 * mips-tdep.c: Include "target-float.h".
3815 (mips_print_fp_register): Use target_float_to_string.
3816 * sh64-tdep.c: Include "target-float.h".
3817 (sh64_do_fp_register): Use target_float_to_string.
3818
3819 * parse.c: Include "target-float.h". Do not include
3820 "doublest.h" and "dfp.h".
3821 (parse_float): Use target_float_from_string.
3822 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3823 (define_symbol): Use target_float_from_string.
3824 * gdbarch-selftests.c: Include "target-float.h".
3825 (register_to_value_test): Use target_float_from_string.
3826
70100014
UW
38272017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3828
3829 * Makefile.c (SFILES): Add target-float.c.
3830 (HFILES_NO_SRCDIR): Add target-float.h.
3831 (COMMON_OBS): Add target-float.o.
3832 * target-float.h: New file.
3833 * target-float.c: New file.
3834
3835 * doublest.c (floatformat_classify): Fix detection of float_zero.
3836
3837 * gdbtypes.c (is_floating_type): New function.
3838 * gdbtypes.h (is_floating_type): Add prototype.
3839
3840 * value.c: Do not include "floatformat.h".
3841 (unpack_double): Use target_float_is_valid.
3842 (is_floating_value): New function.
3843 * value.h (is_floating_value): Add prototype-
3844
3845 * valarith.c: Include "target-float.h".
3846 (value_logical_not): Use target_float_is_zero.
3847
3848 * python/py-value.c: Include "target-float.h".
3849 (valpy_nonzero): Use target_float_is_zero.
3850
ab4b1c46
TT
38512017-11-04 Tom Tromey <tom@tromey.com>
3852
3853 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3854
454dafbd
TT
38552017-11-04 Tom Tromey <tom@tromey.com>
3856
3857 * breakpoint.c (set_momentary_breakpoint): Return
3858 breakpoint_up.
3859 (until_break_command): Update.
3860 (new_until_break_fsm): Change argument types to
3861 breakpoint_up.
3862 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3863 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3864 Remove.
3865 * infcmd.c (finish_forward): Update.
3866 * breakpoint.h (set_momentary_breakpoint)
3867 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3868 (make_cleanup_delete_breakpoint): Remove.
3869 (struct breakpoint_deleter): New.
3870 (breakpoint_up): New typedef.
3871 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3872 (insert_exception_resume_breakpoint): Update.
3873 (insert_exception_resume_from_probe): Update.
3874 (insert_longjmp_resume_breakpoint): Update.
3875 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3876 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3877 * infcall.c (call_function_by_hand_dummy): Update
3878
331b71e5
TT
38792017-11-04 Tom Tromey <tom@tromey.com>
3880
3881 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3882
9f584b37
TT
38832017-11-04 Tom Tromey <tom@tromey.com>
3884
3885 * linux-tdep.c (linux_core_info_proc_mappings): Use
3886 gdb::def_vector.
3887 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3888 "size" argument.
3889 (linux_corefile_thread): Update.
3890 (linux_make_corefile_notes): Remove unused variable.
3891
779bc38e
TT
38922017-11-04 Tom Tromey <tom@tromey.com>
3893
3894 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3895 gdb::byte_vector.
3896
ed2b3126
TT
38972017-11-04 Tom Tromey <tom@tromey.com>
3898
3899 * objfiles.c (do_free_objfile_cleanup): Remove.
3900 * compile/compile-object-load.c (compile_object_load): Update.
3901 * objfiles.h (make_cleanup_free_objfile): Remove.
3902
7f6743fd
TT
39032017-11-04 Tom Tromey <tom@tromey.com>
3904
3905 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3906 (adi_read_versions): Change "tags" to "gdb_byte *".
3907 (adi_print_versions): Likewise.
3908
c80049d3
TT
39092017-11-04 Tom Tromey <tom@tromey.com>
3910
3911 * breakpoint.c
3912 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3913 from start_rbreak_breakpoints.
3914 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3915 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3916 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3917 * symtab.c (do_end_rbreak_breakpoints): Remove.
3918 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3919
167b0be1
TT
39202017-11-04 Tom Tromey <tom@tromey.com>
3921
3922 * cp-namespace.c (reset_directive_searched): Remove.
3923 (cp_lookup_symbol_via_imports): Use scoped_restore.
3924 * cp-support.c (reset_directive_searched): Remove.
3925 (make_symbol_overload_list_using): Use scoped_restore.
3926 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3927 (reset_directive_searched): Remove.
3928
5eae7aea
TT
39292017-11-04 Tom Tromey <tom@tromey.com>
3930
3931 * symfile.c (find_separate_debug_file_by_debuglink): Use
3932 unique_xmalloc_ptr.
3933
c6bcad5f
TT
39342017-11-04 Tom Tromey <tom@tromey.com>
3935
3936 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3937 type of "info".
3938 (compute_stack_depth): Likewise.
3939 (do_compile_dwarf_expr_to_c): Use std::vector.
3940
20dcd8ca
TT
39412017-11-04 Tom Tromey <tom@tromey.com>
3942
3943 * compile/compile-object-load.c (link_callbacks_einfo): Use
3944 std::string.
3945
33c7c59d
TT
39462017-11-04 Tom Tromey <tom@tromey.com>
3947
3948 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3949 Use scoped_free_pendings.
3950 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3951 scoped_free_pendings.
3952 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3953 (xcoff_initial_scan): Likewise.
3954 * buildsym.c (reset_symtab_globals): Update comment.
3955 (scoped_free_pendings): Rename from really_free_pendings.
3956 (prepare_for_building): Update comment.
3957 (buildsym_init): Likewise.
3958 * buildsym.h (class scoped_free_pendings): New class.
3959 (really_free_pendings): Don't declare.
3960
67fa57cf
UW
39612017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3962
3963 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3964 output when converting a zero value to a special byteorder format.
3965
f26ae15b
YQ
39662017-11-02 Yao Qi <yao.qi@linaro.org>
3967
3968 * frame.c (do_frame_register_read): Remove aspace.
3969 * jit.c (jit_frame_sniffer): Likwise.
3970 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3971 * regcache.c (regcache::regcache): Pass nullptr.
3972 (regcache_print): Caller updated.
3973 * regcache.h (regcache::regcache): Remove one constructor
3974 parameter aspace.
3975
6c6e9412
YQ
39762017-11-02 Yao Qi <yao.qi@linaro.org>
3977
3978 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3979
8b86c959
YQ
39802017-11-02 Yao Qi <yao.qi@linaro.org>
3981
3982 * breakpoint.c (insert_single_step_breakpoints): Update.
3983 * frame.c (struct frame_info) <aspace>: Add const.
3984 (frame_save_as_regcache): Add const.
3985 (get_frame_address_space): Return const address_space *.
3986 * frame.h (get_frame_address_space): Update declaration.
3987 * infrun.c (struct step_over_info) <aspace>: Add const.
3988 (set_step_over_info): Make aspace const.
3989 (displaced_step_prepare_throw): Change variable const.
3990 (resume): Likewise.
3991 (proceed): Likewise.
3992 (adjust_pc_after_break): Likewise.
3993 (save_waitstatus): Likewise.
3994 (handle_signal_stop): Likewise.
3995 (keep_going_pass_signal): Likewise.
3996 * jit.c (jit_frame_sniffer): Add const.
3997 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3998 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3999 * record-full.c (record_full_wait_1): Likewise.
4000 * regcache.c (regcache::regcache): Change parameter to const.
4001 * regcache.h (regcache::regcache): Likewise.
4002 (regcache::aspace): Return const address_space *.
4003 (regcache) <m_aspace>: Add const.
4004
a01bda52
YQ
40052017-11-02 Yao Qi <yao.qi@linaro.org>
4006
4007 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
4008 * frame.c (create_sentinel_frame): Likewise.
4009 * infrun.c (displaced_step_prepare_throw): Likewise.
4010 (resume): Likewise.
4011 (thread_still_needs_step_over_bp): Likewise.
4012 (proceed): Likewise.
4013 (do_target_wait): Likewise.
4014 (adjust_pc_after_break): Likewise.
4015 (handle_syscall_event): Likewise.
4016 (save_waitstatus): Likewise.
4017 (handle_inferior_event_1): Likewise.
4018 (handle_signal_stop): Likewise.
4019 (keep_going_pass_signal): Likewise.
4020 * linux-nat.c (status_callback): Likewise.
4021 (save_stop_reason): Likewise.
4022 (resume_stopped_resumed_lwps): Likewise.
4023 * record-full.c (record_full_exec_insn): Likewise.
4024 (record_full_wait_1): Likewise.
4025 * regcache.c (get_regcache_aspace): Remove.
4026 * regcache.h (get_regcache_aspace): Remove.
4027
d999647b
YQ
40282017-11-02 Yao Qi <yao.qi@linaro.org>
4029
4030 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4031 (init_regcache_descr): Use gdbarch_num_regs.
4032 (regcache::regcache): Likewise.
4033 (regcache::get_register_status): Likewise.
4034 (regcache::assert_raw_regnum): Likewise.
4035 (regcache::cooked_read): Likewise.
4036 (regcache::cooked_read_value): Likewise.
4037 (regcache::cooked_write): Likewise.
4038 (regcache::dump): Likewise.
4039 (regcache::num_raw_registers): New method.
4040 * regcache.h (class regcache) <num_raw_registers>: New.
4041
4e888c28
YQ
40422017-11-02 Yao Qi <yao.qi@linaro.org>
4043
4044 * regcache.c (regcache::assert_regnum): New method.
4045 (regcache::invalidate): Call assert_regnum.
4046 (regcache::raw_update): Likewise.
4047 (regcache::raw_write): Likewise.
4048 (regcache::raw_read_part): Likewise.
4049 (regcache::raw_write_part): Likewise.
4050 (regcache::raw_supply): Likewise.
4051 (regcache::raw_supply_integer): Likewise.
4052 (regcache::raw_supply_zeroed): Likewise.
4053 (regcache::raw_collect): Likewise.
4054 (regcache::raw_collect_integer): Likewise.
4055 * regcache.h (regcache::assert_regnum): Declare.
4056
2e1b49b3
YQ
40572017-11-02 Yao Qi <yao.qi@linaro.org>
4058
4059 * regcache.c (regcache::dump): Remove code.
4060
6c5218df
YQ
40612017-11-02 Yao Qi <yao.qi@linaro.org>
4062
4063 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
4064 Remove.
4065 <sizeof_cooked_register_status>: Remove.
4066 (init_regcache_descr): Update.
4067 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
4068 (regcache::save): Likewise.
4069 (regcache::dump): Likewise.
4070
dcc31d28
JB
40712017-11-01 James Bowman <james.bowman@ftdichip.com>
4072
4073 * ft32-tdep.c (ft32_fetch_instruction): New function.
4074 (ft32_analyze_prologue): Use ft32_fetch_instruction().
4075
3a87ae65
SM
40762017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
4077
4078 * cli/cli-script.c (execute_control_command): Rename to ...
4079 (execute_control_command_1): ... this.
4080 (execute_control_command): New function.
4081
09b847f3
SM
40822017-10-31 Simon Marchi <simon.marchi@ericsson.com>
4083
4084 * tracepoint.c (tfind_command): Remove const_cast.
4085
f871c485
MG
40862017-10-30 Mike Gulick <mgulick@mathworks.com>
4087
4088 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
4089
b020ff80
SM
40902017-10-30 Simon Marchi <simon.marchi@ericsson.com>
4091
4092 * common/common-utils.h (in_inclusive_range): New function.
4093 * arm-tdep.c (arm_record_extension_space): Use
4094 in_inclusive_range.
4095 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
4096 * cris-tdep.c (cris_spec_reg_applicable): Use
4097 in_inclusive_range.
4098
1b81856f
PA
40992017-10-30 Pedro Alves <palves@redhat.com>
4100 Simon Marchi <simon.marchi@ericsson.com>
4101
4102 * remote.c (remote_set_syscall_catchpoint): Build a std::string
4103 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
4104
31b833b3
PA
41052017-10-30 Pedro Alves <palves@redhat.com>
4106
4107 * common/common-utils.c (string_appendf, string_vappendf): New
4108 functions.
4109 * common/common-utils.h (string_appendf, string_vappendf): New
4110 declarations.
4111 * unittests/common-utils-selftests.c (string_appendf_func)
4112 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
4113 (string_vappendf_tests): New functions.
4114 (_initialize_common_utils_selftests): Register "string_appendf" and
4115 "string_vappendf tests".
4116
4a250334
PA
41172017-10-30 Pedro Alves <palves@redhat.com>
4118
4119 * unittests/common-utils-selftests.c (format_func): New typedef.
4120 (string_printf_tests, string_vprintf_tests): Tests factored out
4121 and merged to ...
4122 (test_format_func): ... this new function.
4123 (string_printf_tests, string_vprintf_tests): Reimplement on top of
4124 test_format_func.
4125
16c5c17e
SM
41262017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4127
4128 * darwin-nat.c: Remove include of gdb.h.
4129
7ca51576
SM
41302017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4131
4132 * xtensa-xtregs.c: Fix formatting issues.
4133
c1342859
SM
41342017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4135
4136 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4137
484d8d36
MD
41382017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4139
4140 PR python/21213
4141 * python/py-infthread.c (thpy_get_inferior): Increment reference
4142 of inferior before returning it.
4143
b5540b5f
SM
41442017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4145
4146 * unittests/common-utils-selftests.c (format): Add
4147 ATTRIBUTE_PRINTF.
4148
5a9dcda1
SM
41492017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4150
4151 * xml-syscall.c (struct syscall_desc): Add constructor.
4152 <name>: Change type to std::string.
4153 (syscall_desc_up): New typedef.
4154 (syscall_desc_p): Remove typeder.
4155 (DEF_VEC_P(syscall_desc_p)): Remove.
4156 (struct syscall_group_desc): Add constructor.
4157 <name>: Change type to std::string.
4158 <syscalls>: Change type to std::vector.
4159 (syscall_group_desc_up): New typedef.
4160 (syscall_group_desc_p): Remove typedef.
4161 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4162 (struct syscalls_info) <syscalls>: Change type to std::vector of
4163 unique_ptr.
4164 <groups>: Likewise.
4165 <my_gdb_datadir>: Change type to std::string.
4166 (syscalls_info_up): New typedef.
4167 (allocate_syscalls_info): Remove.
4168 (syscalls_info_free_syscalls_desc): Remove.
4169 (syscalls_info_free_syscall_group_desc): Remove.
4170 (free_syscalls_info): Remove.
4171 (make_cleanup_free_syscalls_info): Remove.
4172 (syscall_group_create_syscall_group_desc): Adjust.
4173 (syscall_group_add_syscall): Adjust.
4174 (syscall_create_syscall_desc): Adjust.
4175 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4176 (init_syscalls_info): Adjust.
4177 (syscall_group_get_group_by_name): Adjust.
4178 (xml_get_syscall_number): Adjust.
4179 (xml_get_syscall_name): Adjust.
4180 (xml_list_of_syscalls): Adjust.
4181 (xml_list_syscalls_by_group): Adjust.
4182 (xml_list_of_groups): Adjust.
4183
45461e0d
SM
41842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4185
4186 * probe.h: Don't include gdb_vecs.h.
4187 (DEF_VEC_P (probe_p)): Remove.
4188 (find_probes_in_objfile): Return an std::vector.
4189 * probe.c (find_probes_in_objfile): Likewise.
4190 * breakpoint.c (breakpoint_objfile_data)
4191 <longjmp_probes>: Change type to std::vector.
4192 <exception_probes>: Likewise.
4193 (free_breakpoint_probes): Don't manually free vectors.
4194 (create_longjmp_master_breakpoint): Adjust.
4195 (create_exception_master_breakpoint): Adjust.
4196 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4197 parameter type, adjust.
4198 (svr4_create_solib_event_breakpoints): Adjust.
4199
43dce439
SM
42002017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4203 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4204 with new.
4205 (free_breakpoint_probes): Rename to ...
4206 (free_breakpoint_objfile_data): ... this, and call delete on
4207 bp_objfile_data..
4208
6a1b9516
SM
42092017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4210
4211 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4212 (loaded_script_ptr): Remove typedef.
4213 (DEF_VEC_P (loaded_script_ptr)): Remove.
4214 (struct collect_matching_scripts_data): Add constructor.
4215 <scripts_p>: Change type to (pointer to) std::vector.
4216 (collect_matching_scripts_data): Adjust.
4217 (sort_scripts_by_name): Make suitable for std::sort.
4218 (print_scripts): Don't sort vector, adjust to std::vector.
4219 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4220
593e3209
SM
42212017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4222
4223 * symfile.c (filename_language): Make struct, not typedef. Add
4224 constructor.
4225 <ext>: Change type to std::string.
4226 (DEF_VEC_O (filename_language)): Remove.
4227 (filename_language_table): Change type to std::vector.
4228 (add_filename_language): Adjust.
4229 (set_ext_lang_command): Adjust.
4230 (info_ext_lang_command): Adjust.
4231 (deduce_language_from_filename): Adjust.
4232 (class scoped_restore_filename_language_table): Remove.
4233 (test_filename_language): Use scoped_restore.
4234 (test_set_ext_lang_command): Use scoped_restore, adjust to
4235 std::vector change.
4236
32fa66eb
SM
42372017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4238
4239 * symfile.c: Include selftest.h.
4240 (class scoped_restore_filename_language_table): New.
4241 (test_filename_language): New test.
4242 (test_set_ext_lang_command): New test.
4243 (_initialize_symfile): Register tests.
4244
4a27f119
KS
42452017-10-27 Keith Seitz <keiths@redhat.com>
4246
4247 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4248 in the bp_location, falling back to find_pc_sect_function when
4249 needed.
4250 (add_location_to_breakpoint): Save sal->symbol.
4251 * breakpoint.h (struct bp_location) <symbol>: New field.
4252 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4253 * symtab.h (struct symtab_and_line) <symbol>: New field.
4254
a43f3893
PF
42552017-10-26 Patrick Frants <osscontribute@gmail.com>
4256
7453e6b2 4257 PR gdb/13669
a43f3893
PF
4258 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4259 to rewind obstack.
4260
23cc4e1b
PA
42612017-10-26 Pedro Alves <palves@redhat.com>
4262
4263 * remote.c (remote_async_terminal_ours_p): Delete.
4264 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4265 Remove references to 'remote_async_terminal_ours_p'.
4266
6abc18bb
YQ
42672017-10-26 Yao Qi <yao.qi@linaro.org>
4268
4269 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4270
bd522513
YQ
42712017-10-26 Yao Qi <yao.qi@linaro.org>
4272
4273 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4274 aspace const.
4275 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4276 Likewise.
4277 * breakpoint.c (bpstat_check_location): Remove cast.
4278 (breakpoint_hit_catch_fork): Make aspce const.
4279 (breakpoint_hit_catch_solib): Likewise.
4280 (breakpoint_hit_catch_exec): Likewise.
4281 (breakpoint_hit_ranged_breakpoint): Likewise.
4282 (breakpoint_hit_watchpoint): Likewise.
4283 (base_breakpoint_breakpoint_hit): Likewise.
4284 (bkpt_breakpoint_hit): Likewise.
4285 (dprintf_breakpoint_hit): Likewise.
4286 (tracepoint_breakpoint_hit): Likewise.
4287 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4288
accd0bcd
YQ
42892017-10-26 Yao Qi <yao.qi@linaro.org>
4290
4291 * breakpoint.c (breakpoint_location_address_match): Change
4292 "struct address_space *" to "const address_space".
4293 (breakpoint_location_address_range_overlap): Likewise.
4294 (breakpoint_here_p): Likewise.
4295 (breakpoint_in_range_p): Likewise.
4296 (moribund_breakpoint_here_p): Likewise.
4297 (bp_location_inserted_here_p): Likewise.
4298 (software_breakpoint_inserted_here_p): Likewise.
4299 (hardware_breakpoint_inserted_here_p): Likewise.
4300 (hardware_watchpoint_inserted_in_range): Likewise.
4301 (bpstat_check_location): Likewise.
4302 (bpstat_stop_status): Likewise.
4303 (breakpoint_address_match): Likewise.
4304 (breakpoint_address_match_range): Likewise.
4305 (breakpoint_location_address_match): Likewise.
4306 (breakpoint_location_address_range_overlap): Likewise.
4307 (insert_single_step_breakpoint): Likewise.
4308 (breakpoint_has_location_inserted_here): Likewise.
4309 (single_step_breakpoint_inserted_here_p): Likewise.
4310 (pc_at_non_inline_function): Likewise.
4311 * breakpoint.h (bpstat_stop_status): Update declaration.
4312 (breakpoint_here_p): Likewise.
4313 (breakpoint_in_range_p): Likewise.
4314 (moribund_breakpoint_here_p): Likewise.
4315 (breakpoint_inserted_here_p): Likewise.
4316 (software_breakpoint_inserted_here_p): Likewise.
4317 (hardware_breakpoint_inserted_here_p): Likewise.
4318 (breakpoint_has_location_inserted_here): Likewise.
4319 (single_step_breakpoint_inserted_here_p): Likewise.
4320 (hardware_watchpoint_inserted_in_range): Likewise.
4321 (breakpoint_address_match): Likewise.
4322 (insert_single_step_breakpoint): Likewise.
4323 (pc_at_non_inline_function): Likewise.
4324 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4325 * record.c (record_check_stopped_by_breakpoint): Likewise.
4326 * record.h (record_check_stopped_by_breakpoint): Likewise.
4327 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4328
ac7936df
YQ
43292017-10-25 Yao Qi <yao.qi@linaro.org>
4330
4331 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4332 regcache->arch () instead get_regcache_arch.
4333 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4334 Likewise.
4335 (aarch64_fbsd_store_inferior_registers): Likewise.
4336 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4337 (store_gregs_to_thread): Likewise.
4338 (fetch_fpregs_from_thread): Likewise.
4339 (store_fpregs_to_thread): Likewise.
4340 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4341 (aarch64_store_return_value): Likewise.
4342 (aarch64_software_single_step): Likewise.
4343 * aix-thread.c (aix_thread_wait): Likewise.
4344 (supply_reg32): Likewise.
4345 (supply_sprs64): Likewise.
4346 (supply_sprs32): Likewise.
4347 (fill_gprs64): Likewise.
4348 (fill_gprs32): Likewise.
4349 (fill_sprs64): Likewise.
4350 (fill_sprs32): Likewise.
4351 (store_regs_user_thread): Likewise.
4352 (store_regs_kernel_thread): Likewise.
4353 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4354 (alphabsd_store_inferior_registers): Likewise.
4355 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4356 (alpha_store_return_value): Likewise.
4357 (alpha_deal_with_atomic_sequence): Likewise.
4358 (alpha_next_pc): Likewise.
4359 (alpha_software_single_step): Likewise.
4360 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4361 (amd64bsd_store_inferior_registers): Likewise.
4362 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4363 Likewise.
4364 (amd64_linux_store_inferior_registers): Likewise.
4365 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4366 (amd64_collect_native_gregset): Likewise.
4367 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4368 (amd64obsd_collect_uthread): Likewise.
4369 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4370 (amd64_collect_fpregset): Likewise.
4371 (amd64_supply_fxsave): Likewise.
4372 (amd64_supply_xsave): Likewise.
4373 (amd64_collect_fxsave): Likewise.
4374 (amd64_collect_xsave): Likewise.
4375 * arc-tdep.c (arc_write_pc): Likewise.
4376 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4377 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4378 (arm_fbsd_store_inferior_registers): Likewise.
4379 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4380 (store_vfp_regs): Likewise.
4381 (arm_linux_fetch_inferior_registers): Likewise.
4382 (arm_linux_store_inferior_registers): Likewise.
4383 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4384 (arm_linux_sigreturn_next_pc): Likewise.
4385 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4386 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4387 (fetch_register): Likewise.
4388 (store_register): Likewise.
4389 * arm-tdep.c (arm_is_thumb): Likewise.
4390 (displaced_in_arm_mode): Likewise.
4391 (bx_write_pc): Likewise.
4392 (arm_get_next_pcs_addr_bits_remove): Likewise.
4393 (arm_software_single_step): Likewise.
4394 (arm_extract_return_value): Likewise.
4395 (arm_store_return_value): Likewise.
4396 (arm_write_pc): Likewise.
4397 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4398 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4399 (bsd_uthread_store_registers): Likewise.
4400 * core-regset.c (fetch_core_registers): Likewise.
4401 * corelow.c (get_core_registers): Likewise.
4402 * cris-tdep.c (cris_store_return_value): Likewise.
4403 (cris_extract_return_value): Likewise.
4404 (find_step_target): Likewise.
4405 (find_step_target): Likewise.
4406 (cris_software_single_step): Likewise.
4407 * ctf.c (ctf_fetch_registers): Likewise.
4408 * darwin-nat.c (cancel_breakpoint): Likewise.
4409 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4410 * frv-tdep.c (frv_extract_return_value): Likewise.
4411 * ft32-tdep.c (ft32_store_return_value): Likewise.
4412 (ft32_extract_return_value): Likewise.
4413 * go32-nat.c (fetch_register): Likewise.
4414 (go32_fetch_registers): Likewise.
4415 (go32_store_registers): Likewise.
4416 (store_register): Likewise.
4417 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4418 (h8300_store_return_value): Likewise.
4419 * hppa-linux-nat.c (fetch_register): Likewise.
4420 (store_register): Likewise.
4421 (hppa_linux_fetch_inferior_registers): Likewise.
4422 (hppa_linux_store_inferior_registers): Likewise.
4423 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4424 (i386_darwin_store_inferior_registers): Likewise.
4425 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4426 (gnu_store_registers): Likewise.
4427 * i386-linux-nat.c (fetch_register): Likewise.
4428 (store_register): Likewise.
4429 (supply_gregset): Likewise.
4430 (fill_gregset): Likewise.
4431 (i386_linux_fetch_inferior_registers): Likewise.
4432 (i386_linux_store_inferior_registers): Likewise.
4433 (i386_linux_resume): Likewise.
4434 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4435 Likewise.
4436 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4437 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4438 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4439 (i386obsd_collect_uthread): Likewise.
4440 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4441 (i386_supply_gregset): Likewise.
4442 (i386_collect_gregset): Likewise.
4443 (i386_supply_fpregset): Likewise.
4444 (i386_collect_fpregset): Likewise.
4445 (i386_mpx_bd_base): Likewise.
4446 * i386-v4-nat.c (supply_fpregset): Likewise.
4447 (fill_fpregset): Likewise.
4448 * i387-tdep.c (i387_supply_fsave): Likewise.
4449 (i387_collect_fsave): Likewise.
4450 (i387_supply_fxsave): Likewise.
4451 (i387_collect_fxsave): Likewise.
4452 (i387_supply_xsave): Likewise.
4453 (i387_collect_xsave): Likewise.
4454 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4455 (ia64_linux_store_registers): Likewise.
4456 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4457 (ia64_extract_return_value): Likewise.
4458 (ia64_store_return_value): Likewise.
4459 (find_func_descr): Likewise.
4460 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4461 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4462 (inf_ptrace_store_registers): Likewise.
4463 * infrun.c (use_displaced_stepping): Likewise.
4464 (displaced_step_prepare_throw): Likewise.
4465 (resume): Likewise.
4466 (proceed): Likewise.
4467 (do_target_wait): Likewise.
4468 (adjust_pc_after_break): Likewise.
4469 (handle_inferior_event_1): Likewise.
4470 (handle_signal_stop): Likewise.
4471 (save_infcall_suspend_state): Likewise.
4472 (restore_infcall_suspend_state): Likewise.
4473 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4474 * jit.c (jit_frame_prev_register): Likewise.
4475 * linux-nat.c (save_stop_reason): Likewise.
4476 (linux_nat_wait_1): Likewise.
4477 (resume_stopped_resumed_lwps): Likewise.
4478 * linux-record.c (record_linux_sockaddr): Likewise.
4479 (record_linux_msghdr): Likewise.
4480 (record_linux_system_call): Likewise.
4481 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4482 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4483 (lm32_store_return_value): Likewise.
4484 * m32c-tdep.c (m32c_read_flg): Likewise.
4485 (m32c_pseudo_register_read): Likewise.
4486 (m32c_pseudo_register_write): Likewise.
4487 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4488 (m32r_linux_collect_gregset): Likewise.
4489 * m32r-tdep.c (m32r_store_return_value): Likewise.
4490 (m32r_extract_return_value): Likewise.
4491 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4492 (m68kbsd_collect_fpregset): Likewise.
4493 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4494 * m68k-linux-nat.c (fetch_register): Likewise.
4495 (old_fetch_inferior_registers): Likewise.
4496 (old_store_inferior_registers): Likewise.
4497 (store_regs): Likewise.
4498 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4499 (m68k_svr4_store_return_value): Likewise.
4500 * m88k-tdep.c (m88k_store_arguments): Likewise.
4501 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4502 (mi_cmd_data_write_register_values): Likewise.
4503 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4504 (mips_fbsd_store_inferior_registers): Likewise.
4505 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4506 (mips_fbsd_supply_gregs): Likewise.
4507 (mips_fbsd_collect_fpregs): Likewise.
4508 (mips_fbsd_collect_gregs): Likewise.
4509 (mips_fbsd_supply_fpregset): Likewise.
4510 (mips_fbsd_collect_fpregset): Likewise.
4511 (mips_fbsd_supply_gregset): Likewise.
4512 (mips_fbsd_collect_gregset): Likewise.
4513 * mips-linux-nat.c (supply_gregset): Likewise.
4514 (fill_gregset): Likewise.
4515 (supply_fpregset): Likewise.
4516 (fill_fpregset): Likewise.
4517 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4518 (mips_fill_gregset): Likewise.
4519 (mips_supply_fpregset): Likewise.
4520 (mips_fill_fpregset): Likewise.
4521 (mips64_supply_gregset): Likewise.
4522 (micromips_linux_sigframe_validate): Likewise.
4523 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4524 (mipsnbsd_fetch_inferior_registers): Likewise.
4525 (mipsnbsd_store_inferior_registers): Likewise.
4526 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4527 (mipsnbsd_supply_gregset): Likewise.
4528 (mipsnbsd_iterate_over_regset_sections): Likewise.
4529 (mipsnbsd_supply_reg): Likewise.
4530 (mipsnbsd_supply_fpreg): Likewise.
4531 * mips-tdep.c (mips_in_frame_stub): Likewise.
4532 (mips_dummy_id): Likewise.
4533 (is_octeon_bbit_op): Likewise.
4534 (micromips_bc1_pc): Likewise.
4535 (extended_mips16_next_pc): Likewise.
4536 (mips16_next_pc): Likewise.
4537 (deal_with_atomic_sequence): Likewise.
4538 * moxie-tdep.c (moxie_process_readu): Likewise.
4539 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4540 * nto-procfs.c (procfs_store_registers): Likewise.
4541 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4542 (ppcfbsd_store_inferior_registers): Likewise.
4543 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4544 (fetch_altivec_register): Likewise.
4545 (get_spe_registers): Likewise.
4546 (fetch_spe_register): Likewise.
4547 (fetch_altivec_registers): Likewise.
4548 (fetch_all_gp_regs): Likewise.
4549 (fetch_all_fp_regs): Likewise.
4550 (store_vsx_register): Likewise.
4551 (store_altivec_register): Likewise.
4552 (set_spe_registers): Likewise.
4553 (store_spe_register): Likewise.
4554 (store_altivec_registers): Likewise.
4555 (store_all_gp_regs): Likewise.
4556 (store_all_fp_regs): Likewise.
4557 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4558 (ppc_linux_collect_gregset): Likewise.
4559 (ppc_canonicalize_syscall): Likewise.
4560 (ppc_linux_record_signal): Likewise.
4561 (ppu2spu_prev_register): Likewise.
4562 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4563 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4564 (ppcobsd_store_registers): Likewise.
4565 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4566 Likewise.
4567 (ppc_ravenscar_generic_store_registers): Likewise.
4568 * procfs.c (procfs_fetch_registers): Likewise.
4569 (procfs_store_registers): Likewise.
4570 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4571 (ravenscar_store_registers): Likewise.
4572 (ravenscar_prepare_to_store): Likewise.
4573 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4574 * record-full.c (record_full_wait_1): Likewise.
4575 (record_full_registers_change): Likewise.
4576 (record_full_store_registers): Likewise.
4577 (record_full_core_fetch_registers): Likewise.
4578 (record_full_save): Likewise.
4579 (record_full_goto_insn): Likewise.
4580 * regcache.c (regcache_register_size): Likewise.
4581 (get_regcache_arch): Remove.
4582 (regcache_read_pc): Likewise.
4583 * regcache.h (get_regcache_arch): Remove.
4584 * remote-sim.c (gdbsim_fetch_register): Likewise.
4585 (gdbsim_store_register): Likewise.
4586 * remote.c (fetch_register_using_p): Likewise.
4587 (send_g_packet): Likewise.
4588 (remote_prepare_to_store): Likewise.
4589 (store_registers_using_G): Likewise.
4590 * reverse.c (save_bookmark_command): Likewise.
4591 (goto_bookmark_command): Likewise.
4592 * rs6000-aix-tdep.c (branch_dest): Likewise.
4593 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4594 (fetch_register): Likewise.
4595 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4596 (ppc_collect_reg): Likewise.
4597 (ppc_collect_gregset): Likewise.
4598 (ppc_collect_fpregset): Likewise.
4599 (ppc_collect_vsxregset): Likewise.
4600 (ppc_collect_vrregset): Likewise.
4601 (ppc_displaced_step_hw_singlestep): Likewise.
4602 (rs6000_pseudo_register_read): Likewise.
4603 (rs6000_pseudo_register_write): Likewise.
4604 * s390-linux-nat.c (supply_gregset): Likewise.
4605 (fill_gregset): Likewise.
4606 (s390_linux_fetch_inferior_registers): Likewise.
4607 * s390-linux-tdep.c (s390_write_pc): Likewise.
4608 (s390_software_single_step): Likewise.
4609 (s390_all_but_pc_registers_record): Likewise.
4610 (s390_linux_syscall_record): Likewise.
4611 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4612 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4613 (shnbsd_store_inferior_registers): Likewise.
4614 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4615 (sh_extract_return_value_fpu): Likewise.
4616 (sh_store_return_value_nofpu): Likewise.
4617 (sh_corefile_supply_regset): Likewise.
4618 (sh_corefile_collect_regset): Likewise.
4619 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4620 (sh64_store_return_value): Likewise.
4621 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4622 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4623 (sparc_store_inferior_registers): Likewise.
4624 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4625 (sparc_ravenscar_prepare_to_store): Likewise.
4626 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4627 (sparc_analyze_control_transfer): Likewise.
4628 (sparc_step_trap): Likewise.
4629 (sparc_software_single_step): Likewise.
4630 (sparc32_gdbarch_init): Likewise.
4631 (sparc_supply_rwindow): Likewise.
4632 (sparc_collect_rwindow): Likewise.
4633 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4634 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4635 (sparc64nbsd_collect_gregset): Likewise.
4636 (sparc64nbsd_supply_fpregset): Likewise.
4637 (sparc64nbsd_collect_fpregset): Likewise.
4638 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4639 (sparc64_supply_gregset): Likewise.
4640 (sparc64_collect_gregset): Likewise.
4641 (sparc64_supply_fpregset): Likewise.
4642 (sparc64_collect_fpregset): Likewise.
4643 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4644 * spu-tdep.c (spu_unwind_sp): Likewise.
4645 (spu2ppu_prev_register): Likewise.
4646 (spu_memory_remove_breakpoint): Likewise.
4647 * stack.c (return_command): Likewise.
4648 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4649 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4650 * tracefile.c (trace_save_ctf): Likewise.
4651 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4652 (do_windows_store_inferior_registers): Likewise.
4653 (windows_resume): Likewise.
4654 * xtensa-linux-nat.c (fill_gregset): Likewise.
4655 (supply_gregset_reg): Likewise.
4656 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4657 (xtensa_register_read_masked): Likewise.
4658 (xtensa_supply_gregset): Likewise.
4659 (xtensa_extract_return_value): Likewise.
4660 (xtensa_store_return_value): Likewise.
4661
edd079d9
UW
46622017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4663
4664 * doublest.c (floatformat_from_string): New function.
4665 * doublest.h (floatformat_from_string): Add prototype.
4666
4667 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4668 (OP_FLOAT): ... this.
4669 * expression.h: Do not include "doublest.h".
4670 (union exp_element): Replace doubleconst and decfloatconst by
4671 new element floatconst.
4672 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4673 (ada_evaluate_subexp): Likewise.
4674 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4675 OP_DOUBLE and OP_DECFLOAT.
4676 * expprint.c (print_subexp_standard): Likewise.
4677 (dump_subexp_body_standard): Likewise.
4678 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4679
4680 * parse.c: Include "dfp.h".
4681 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4682 (write_exp_elt_floatcst): New function.
4683 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4684 and OP_DECFLOAT.
4685 (operator_check_standard): Likewise.
4686 (parse_float): Do not accept suffix. Take type as input. Return bool.
4687 Return target format buffer instead of host DOUBLEST.
4688 Use floatformat_from_string and decimal_from_string to parse
4689 either binary or decimal floating-point types.
4690 (parse_c_float): Remove.
4691 * parser-defs.h: Do not include "doublest.h".
4692 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4693 (write_exp_elt_floatcst): Add prototype.
4694 (parse_float): Update prototype.
4695 (parse_c_float): Remove.
4696
4697 * c-exp.y: Do not include "dfp.h".
4698 (typed_val_float): Use byte buffer instead of DOUBLEST.
4699 (typed_val_decfloat): Remove.
4700 (DECFLOAT): Remove.
4701 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4702 (parse_number): Update to new parse_float interface.
4703 Parse suffixes and determine type before calling parse_float.
4704 Handle decimal and binary FP types the same way.
4705
4706 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4707 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4708 (parse_number): Update to new parse_float interface.
4709 Parse suffixes and determine type before calling parse_float.
4710
4711 * f-exp.y: Replace dval by typed_val_float.
4712 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4713 (parse_number): Use parse_float instead of atof.
4714
4715 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4716 (parse_go_float): Remove.
4717 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4718 (parse_number): Call parse_float instead of parse_go_float.
4719 Parse suffixes and determine type before calling parse_float.
4720
4721 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4722 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4723 (parse_number): Update to new parse_float interface.
4724 Parse suffixes and determine type before calling parse_float.
4725
4726 * m2-exp.y: Replace dval by byte buffer val.
4727 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4728 (parse_number): Call parse_float instead of atof.
4729
4730 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4731 (lex_number): Call parse_float instead of strtod.
4732 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4733 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4734 Use write_exp_elt_floatcst.
4735 (unit_testing): Remove static variable.
4736 (rust_type): Do not check unit_testing.
4737 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4738
4739 * ada-exp.y (type_float, type_double): Remove.
4740 (typed_val_float): Use byte buffer instead of DOUBLEST.
4741 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4742 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4743
cc628f3d
AH
47442017-10-25 Alan Hayward <alan.hayward@arm.com>
4745
4746 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4747 * arch/aarch64.h: New file.
4748
09a7c6aa
UW
47492017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4750
4751 * dfp.h (decimal_from_string): Use const reference for argument.
4752 * dfp.c (decimal_from_string): Likewise.
4753
8ba0dd51
UW
47542017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4755
4756 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4757 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4758 * mips-tdep.c (mips_print_fp_register): Likewise.
4759
16e812b2
UW
47602017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4761
4762 * common/format.h (enum argclass): Replace decfloat_arg by
4763 dec32float_arg, dec64float_arg, and dec128float_arg.
4764 * common/format.c (parse_format_string): Update to return
4765 new decimal float argument classes.
4766
4767 * printcmd.c (printf_decfloat): Rename to ...
4768 (printf_floating): ... this. Add argclass argument, and use it
4769 instead of parsing the format string again. Add support for
4770 binary floating-point values, using floatformat_to_string.
4771 Convert value to the target format if it doesn't already match.
4772 (ui_printf): Call printf_floating instead of printf_decfloat,
4773 also for double_arg / long_double_arg. Pass argclass.
4774
4775 * dfp.c (decimal_to_string): Add format string argument.
4776 * dfp.h (decimal_to_string): Likewise.
4777
4778 * doublest.c (floatformat_to_string): Add format string argument.
4779 * doublest.h (floatformat_to_string): Likewise.
4780
fdf0cbc2
UW
47812017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4782
4783 * doublest.c (floatformat_precision): New routine.
4784 (floatformat_to_string): Likewise.
4785 * doublest.c (floatformat_to_string): Add prototype.
4786
4787 * printcmd.c (print_scalar_formatted): Only call print_floating
4788 on floating-point types.
4789 * valprint.c: Do not include "floatformat.h".
4790 (generic_val_print_decfloat): Remove.
4791 (generic_val_print): Call generic_val_print_float for both
4792 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4793 (print_floating): Use floatformat_to_string. Handle decimal float.
4794 (print_decimal_floating): Remove, merge into floatformat_to_string.
4795 * value.h (print_decimal_floating): Remove.
4796
4797 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4798
5033013f
UW
47992017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4800
4801 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4802
a664f67e
SM
48032017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4804
4805 * memattr.h: Don't include vec.h.
4806 (struct mem_attrib): Initialize fields.
4807 <unknown>: New static method.
4808 (struct mem_region): Add constructors, operator<, initialize
4809 fields.
4810 * memattr.c: Include algorithm.
4811 (default_mem_attrib, unknown_mem_attrib): Remove.
4812 (user_mem_region_list): New global.
4813 (target_mem_region_list, mem_region_list): Change type to
4814 std::vector<mem_region>.
4815 (mem_use_target): Now a function.
4816 (target_mem_regions_valid): Change type to bool.
4817 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4818 (require_user_regions): Adjust.
4819 (require_target_regions): Adjust.
4820 (create_mem_region): Adjust.
4821 (lookup_mem_region): Adjust.
4822 (invalidate_target_mem_regions): Adjust.
4823 (mem_clear): Rename to...
4824 (user_mem_clear): ... this, and adjust.
4825 (mem_command): Adjust.
4826 (info_mem_command): Adjust.
4827 (mem_enable, enable_mem_command, mem_disable,
4828 disable_mem_command): Adjust.
4829 (mem_delete): Adjust.
4830 (delete_mem_command): Adjust.
4831 * memory-map.h (parse_memory_map): Return an std::vector.
4832 * memory-map.c (parse_memory_map): Likewise.
4833 (struct memory_map_parsing_data): Add constructor.
4834 <memory_map>: Point to std::vector.
4835 (memory_map_start_memory): Adjust.
4836 (memory_map_end_memory): Adjust.
4837 (memory_map_end_property): Adjust.
4838 (clear_result): Remove.
4839 * remote.c (remote_memory_map): Return an std::vector.
4840 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4841 Remove.
4842 (target_debug_print_mem_region_vector): New.
4843 * target-delegates.c: Regenerate.
4844 * target.h (mem_region_vector): New typedef.
4845 (to_memory_map): Return mem_region_vector.
4846 (target_memory_map): Return an std::vector.
4847 * target.c (target_memory_map): Return an std::vector.
4848 (flash_erase_command): Adjust.
4849
6e17c565
SM
48502017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4851
4852 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4853 Change type to std::string.
4854 (memory_map_start_property): Adjust.
4855 (memory_map_end_property): Adjust.
4856
cfba9872
SM
48572017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4858
4859 * infrun.h: Include common/byte-vector.h.
4860 (struct displaced_step_closure): New struct.
4861 (struct buf_displaced_step_closure): New struct.
4862 * infrun.c (displaced_step_closure::~displaced_step_closure):
4863 Provide default implementation.
4864 (displaced_step_clear): Deallocate step closure with delete.
4865 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4866 (aarch64_displaced_step_closure): ... this, extend
4867 displaced_step_closure.
4868 (aarch64_displaced_step_data) <dsc>: Change type to
4869 aarch64_displaced_step_closure.
4870 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4871 unique_ptr.
4872 (aarch64_displaced_step_fixup): Add cast for displaced step
4873 closure.
4874 * amd64-tdep.c (displaced_step_closure): Rename to ...
4875 (amd64_displaced_step_closure): ... this, extend
4876 displaced_step_closure.
4877 <insn_buf>: Change type to std::vector<gdb_byte>.
4878 <max_len>: Remove.
4879 (fixup_riprel): Change type of DSC parameter, adjust to type
4880 change of insn_buf.
4881 (fixup_displaced_copy): Change type of DSC parameter.
4882 (amd64_displaced_step_copy_insn): Instantiate
4883 amd64_displaced_step_closure.
4884 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4885 to type change of insn_buf.
4886 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4887 parameter DSC.
4888 (arm_linux_copy_svc): Likewise.
4889 (cleanup_kernel_helper_return): Likewise.
4890 (arm_catch_kernel_helper_return): Likewise.
4891 (arm_linux_displaced_step_copy_insn): Instantiate
4892 arm_displaced_step_closure.
4893 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4894 (displaced_read_reg): Change type of parameter DSC.
4895 (branch_write_pc): Likewise.
4896 (load_write_pc): Likewise.
4897 (alu_write_pc): Likewise.
4898 (displaced_write_reg): Likewise.
4899 (arm_copy_unmodified): Likewise.
4900 (thumb_copy_unmodified_32bit): Likewise.
4901 (thumb_copy_unmodified_16bit): Likewise.
4902 (cleanup_preload): Likewise.
4903 (install_preload): Likewise.
4904 (arm_copy_preload): Likewise.
4905 (thumb2_copy_preload): Likewise.
4906 (install_preload_reg): Likewise.
4907 (arm_copy_preload_reg): Likewise.
4908 (cleanup_copro_load_store): Likewise.
4909 (install_copro_load_store): Likewise.
4910 (arm_copy_copro_load_store) Likewise.
4911 (thumb2_copy_copro_load_store): Likewise.
4912 (cleanup_branch): Likewise.
4913 (install_b_bl_blx): Likewise.
4914 (arm_copy_b_bl_blx): Likewise.
4915 (thumb2_copy_b_bl_blx): Likewise.
4916 (thumb_copy_b): Likewise.
4917 (install_bx_blx_reg): Likewise.
4918 (arm_copy_bx_blx_reg): Likewise.
4919 (thumb_copy_bx_blx_reg): Likewise.
4920 (cleanup_alu_imm): Likewise.
4921 (arm_copy_alu_imm): Likewise.
4922 (thumb2_copy_alu_imm): Likewise.
4923 (cleanup_alu_reg): Likewise.
4924 (install_alu_reg): Likewise.
4925 (arm_copy_alu_reg): Likewise.
4926 (thumb_copy_alu_reg): Likewise.
4927 (cleanup_alu_shifted_reg): Likewise.
4928 (install_alu_shifted_reg): Likewise.
4929 (arm_copy_alu_shifted_reg): Likewise.
4930 (cleanup_load): Likewise.
4931 (cleanup_store): Likewise.
4932 (arm_copy_extra_ld_st): Likewise.
4933 (install_load_store): Likewise.
4934 (thumb2_copy_load_literal): Likewise.
4935 (thumb2_copy_load_reg_imm): Likewise.
4936 (arm_copy_ldr_str_ldrb_strb): Likewise.
4937 (cleanup_block_load_all): Likewise.
4938 (cleanup_block_store_pc): Likewise.
4939 (cleanup_block_load_pc): Likewise.
4940 (arm_copy_block_xfer): Likewise.
4941 (thumb2_copy_block_xfer): Likewise.
4942 (cleanup_svc): Likewise.
4943 (install_svc): Likewise.
4944 (arm_copy_svc): Likewise.
4945 (thumb_copy_svc): Likewise.
4946 (arm_copy_undef): Likewise.
4947 (thumb_32bit_copy_undef): Likewise.
4948 (arm_copy_unpred): Likewise.
4949 (arm_decode_misc_memhint_neon): Likewise.
4950 (arm_decode_unconditional): Likewise.
4951 (arm_decode_miscellaneous): Likewise.
4952 (arm_decode_dp_misc): Likewise.
4953 (arm_decode_ld_st_word_ubyte): Likewise.
4954 (arm_decode_media): Likewise.
4955 (arm_decode_b_bl_ldmstm): Likewise.
4956 (arm_decode_ext_reg_ld_st): Likewise.
4957 (thumb2_decode_dp_shift_reg): Likewise.
4958 (thumb2_decode_ext_reg_ld_st): Likewise.
4959 (arm_decode_svc_copro): Likewise.
4960 (thumb2_decode_svc_copro): Likewise.
4961 (install_pc_relative): Likewise.
4962 (thumb_copy_pc_relative_16bit): Likewise.
4963 (thumb_decode_pc_relative_16bit): Likewise.
4964 (thumb_copy_pc_relative_32bit): Likewise.
4965 (thumb_copy_16bit_ldr_literal): Likewise.
4966 (thumb_copy_cbnz_cbz): Likewise.
4967 (thumb2_copy_table_branch): Likewise.
4968 (cleanup_pop_pc_16bit_all): Likewise.
4969 (thumb_copy_pop_pc_16bit): Likewise.
4970 (thumb_process_displaced_16bit_insn): Likewise.
4971 (decode_thumb_32bit_ld_mem_hints): Likewise.
4972 (thumb_process_displaced_32bit_insn): Likewise.
4973 (thumb_process_displaced_insn): Likewise.
4974 (arm_process_displaced_insn): Likewise.
4975 (arm_displaced_init_closure): Likewise.
4976 (arm_displaced_step_fixup): Add cast for closure.
4977 * arm-tdep.h: Include infrun.h.
4978 (displaced_step_closure): Rename to ...
4979 (arm_displaced_step_closure): ... this, extend
4980 displaced_step_closure.
4981 <u::svc::copy_svc_os>: Change type of parameter DSC.
4982 <cleanup>: Likewise.
4983 (arm_process_displaced_insn): Likewise.
4984 (arm_displaced_init_closure): Likewise.
4985 (displaced_read_reg): Likewise.
4986 (displaced_write_reg): Likewise.
4987 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4988 Adjust.
4989 * i386-tdep.h: Include infrun.h.
4990 (i386_displaced_step_closure): New typedef.
4991 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4992 i386_displaced_step_closure.
4993 (i386_displaced_step_fixup): Adjust.
4994 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4995 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4996 and unique_ptr.
4997 (ppc_displaced_step_fixup): Adjust.
4998 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4999 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
5000 and unique_ptr.
5001 (s390_displaced_step_fixup): Adjust.
5002
b392b304
SM
50032017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
5004
5005 * interps.h (interp_resume, interp_suspend, interp_set_temp):
5006 Remove declarations.
5007
d5833c62
TT
50082017-10-20 Tom Tromey <tom@tromey.com>
5009
5010 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
5011 std::vector.
5012 (gdb_bfd_record_inclusion): Update.
5013 (bfdp): Remove typedef.
5014
06d5bbc8
TT
50152017-10-20 Tom Tromey <tom@tromey.com>
5016
5017 * gdb_bfd.c (gdb_bfd_ref): Use new.
5018 (struct gdb_bfd_data): Add constructor, destructor, and member
5019 initializers.
5020 (gdb_bfd_unref): Use delete.
5021
2712ce2e
TT
50222017-10-20 Tom Tromey <tom@tromey.com>
5023
5024 * exec.c (exec_file_attach): Use new_bfd_ref.
5025 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
5026 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5027 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
5028 new_bfd_ref.
5029 * gdb_bfd.h (new_bfd_ref): New function.
5030
fcc8fb2f
PA
50312017-10-20 Pedro Alves <palves@redhat.com>
5032
5033 * main.c (captured_command_loop): Add attribute noinline.
5034
4c2287b0
SM
50352017-10-19 Simon Marchi <simon.marchi@ericsson.com>
5036
5037 * interps.c (struct interp_factory): Add constructor.
5038 (interp_factory_p): Remove typedef.
5039 (DEF_VEC_P(interp_factory_p)): Remove.
5040 (interpreter_factories): Change type to std::vector.
5041 (interp_factory_register): Adjust.
5042 (interp_lookup): Adjust.
5043 (interpreter_completer): Adjust.
5044
3d415c26
TT
50452017-10-19 Tom Tromey <tom@tromey.com>
5046
5047 * break-catch-syscall.c (catch_syscall_completer): Use
5048 std::string, gdb::unique_xmalloc_ptr.
5049
395423c4
TT
50502017-10-19 Tom Tromey <tom@tromey.com>
5051
5052 * infcall.c (call_function_by_hand_dummy): Use std::string.
5053
54f70bc1
TT
50542017-10-19 Tom Tromey <tom@tromey.com>
5055
5056 * mi/mi-main.c (mi_cmd_execute): Update.
5057 * top.h (prepare_execute_command): Return scoped_value_mark.
5058 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
5059 Add move constructor.
5060 * top.c (prepare_execute_command): Return scoped_value_mark.
5061 (execute_command): Update.
5062
63929e84
PA
50632017-10-19 Pedro Alves <palves@redhat.com>
5064
5065 * xml-support.c (xml_fetch_content_from_file): Check fread's
5066 return.
5067
a75868f5
PA
50682017-10-19 Pedro Alves <palves@redhat.com>
5069
5070 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
5071 async.
5072 (handle_error_fd): New function.
5073 (ser_base_async): Add/delete an event loop file handler for
5074 error_fd.
5075
2edf834e
PA
50762017-10-19 Pedro Alves <palves@redhat.com>
5077
5078 * xml-support.c (xml_fetch_content_from_file): Don't read in
5079 chunks. Instead use fseek to determine the file's size, and read
5080 it in one go.
5081
c8ba13ad
KS
50822017-11-18 Keith Seitz <keiths@redhat.com>
5083
5084 * c-exp.y (oper): Canonicalize conversion operators of user-defined
5085 types.
5086 Add whitespace to front of type name.
5087
37534686
KS
50882017-10-18 Keith Seitz <keiths@redhat.com>
5089
5090 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
5091 DW_AT_accessibility.
5092
28c7c158
YQ
50932017-10-18 Yao Qi <yao.qi@linaro.org>
5094
5095 * features/tic6x-c62x-linux.c: Remove.
5096
30f0b101
TT
50972017-10-17 Tom Tromey <tom@tromey.com>
5098
5099 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
5100 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5101 (do_mixed_source_and_assembly): Likewise.
5102
57e12da9
TT
51032017-10-17 Tom Tromey <tom@tromey.com>
5104
5105 * regcache.c (regcache::xfer_part): Remove assertion.
5106
7b700999
PA
51072017-10-17 Pedro Alves <palves@redhat.com>
5108
5109 * xml-support.c (xml_fetch_content_from_file): Call
5110 unique_ptr::release() instead unique_ptr::get() when passing
5111 through xrealloc.
5112
d3037ba6
YQ
51132017-10-17 Yao Qi <yao.qi@linaro.org>
5114
5115 * regcache.c (regcache::xfer_part): Remove parameters read and
5116 write, add parameter is_raw. All callers are updated.
5117
83d5a34d
KS
51182017-10-16 Keith Seitz <keiths@redhat.com>
5119
5120 * c-typeprint.c (enum access_specifier): Moved here from
5121 c_type_print_base.
5122 (output_access_specifier): New function.
5123 (c_type_print_base): Consider typedefs when assessing
5124 whether access labels are needed.
5125 Use output_access_specifier as needed.
5126 Output access specifier for typedefs, if needed.
5127 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5128 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5129 fields.
5130 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5131 accessor macros.
5132
87028b87
TT
51332017-10-16 Tom Tromey <tom@tromey.com>
5134
5135 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5136 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5137 * target.c (target_fileio_read_stralloc): Update.
5138 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5139 * target.h (target_fileio_read_stralloc): Return
5140 unique_xmalloc_ptr.
5141
b7b030ad
TT
51422017-10-16 Tom Tromey <tom@tromey.com>
5143
5144 * xml-syscall.c (xml_init_syscalls_info): Update.
5145 * xml-support.c (xinclude_start_include): Update.
5146 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5147 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5148 (xml_fetch_content_from_file): Likewise.
5149 * osdata.c (get_osdata): Update.
5150 * target.h (target_read_stralloc, target_get_osdata): Return
5151 unique_xmalloc_ptr.
5152 * solib-aix.c (solib_aix_get_library_list): Update.
5153 * solib-target.c (solib_target_current_sos): Update.
5154 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5155 * xml-tdesc.c (fetch_available_features_from_target): Update.
5156 (target_fetch_description_xml): Update.
5157 (file_read_description_xml): Update.
5158 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5159 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5160 (remote_pid_to_exec_file): Update.
5161 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5162 (target_get_osdata): Likewise.
5163
b80406ac
TT
51642017-10-16 Tom Tromey <tom@tromey.com>
5165
5166 * remote.c (remote_register_number_and_offset): Use std::vector.
5167 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5168 (putpkt_binary): Use gdb::def_vector.
5169 (compare_sections_command): Use gdb::byte_vector.
5170
a90ecff8
TT
51712017-10-16 Tom Tromey <tom@tromey.com>
5172
5173 * ppc-linux-nat.c (hwdebug_insert_point): Use
5174 gdb::unique_xmalloc_ptr, XDUP.
5175
2dc0e219
TT
51762017-10-16 Tom Tromey <tom@tromey.com>
5177
5178 * probe.c (parse_probes): Use std::string.
5179 (info_probes_for_ops, enable_probes_command)
5180 (disable_probes_command): Remove cleanups.
5181
b05628f0
TT
51822017-10-16 Tom Tromey <tom@tromey.com>
5183
5184 * buildsym.c (block_compar): Remove.
5185 (end_symtab_get_static_block): Use std::vector.
5186
a79b1bc6
SM
51872017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5188
5189 * memrange.h (struct mem_range): Define operator< and operator==.
5190 (mem_range_s): Remove.
5191 (DEF_VEC_O (mem_range_s)): Remove.
5192 (normalize_mem_ranges): Change parameter type to std::vector.
5193 * memrange.c (compare_mem_ranges): Remove.
5194 (normalize_mem_ranges): Change parameter type to std::vector,
5195 adjust to vector change.
5196 * exec.c (section_table_available_memory): Return vector, remove
5197 parameter.
5198 (section_table_read_available_memory): Adjust to std::vector
5199 change.
5200 * remote.c (remote_read_bytes): Adjust to std::vector
5201 change.
5202 * tracepoint.h (traceframe_available_memory): Change parameter
5203 type to std::vector.
5204 * tracepoint.c (traceframe_available_memory): Change parameter
5205 type to std::vector, adjust.
5206 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5207 std::vector change.
5208 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5209 unittests/memrange-selftests.c.
5210 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5211 * gdb/unittests/memrange-selftests.c: New file.
5212
63f0e930
PA
52132017-10-16 Pedro Alves <palves@redhat.com>
5214
5215 * elfread.c (probe_key_free): Rename range-for variable.
5216 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5217 (find_probe_by_pc, collect_probes): Rename range-for variable.
5218
c40c7bfc
YQ
52192017-10-16 Yao Qi <yao.qi@linaro.org>
5220
5221 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5222 * features/tic6x-c62x.c: Remove.
5223 * features/tic6x-c64x-linux.c: Remove.
5224 * features/tic6x-c64x.c: Remove.
5225 * features/tic6x-c64xp-linux.c: Remove.
5226 * features/tic6x-c64xp.c: Remove.
5227 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5228 initialize_tdesc_tic6x_*_linux functions.
5229 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5230 initialize_tdesc_tic6x_* functions.
5231
df27ae6a
YQ
52322017-10-16 Yao Qi <yao.qi@linaro.org>
5233
5234 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5235 tic6x-c62x.
5236 * regformats/tic6x-c62x.dat: Remove.
5237 * regformats/tic6x-c64x.dat: Remove.
5238 * regformats/tic6x-c64xp.dat: Remove.
5239
86766165
SM
52402017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5241
5242 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5243 (the !HAVE_LIBEXPAT version).
5244
824dfcc3
SM
52452017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5246
5247 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5248 const.
5249
2098b393
SM
52502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5251
5252 * target.h: Include tracepoint.h.
5253 (enum trace_find_type): Move to tracepoint.h.
5254 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5255 * tracepoint.h: Don't include target.h
5256 (enum trace_find_type): Move from target.h.
5257 (parse_traceframe_info): Return a unique ptr.
5258 * tracepoint.c (current_traceframe_info): Change type to unique
5259 ptr.
5260 (free_traceframe_info): Remove.
5261 (clear_traceframe_info): Don't manually free
5262 current_traceframe_info.
5263 (free_result): Remove.
5264 (parse_traceframe_info): Return a unique ptr.
5265 (get_traceframe_info): Adjust to unique ptr.
5266 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5267 * remote.c (remote_traceframe_info): Return a unique ptr.
5268 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5269 ptr.
5270 * target-debug.h (target_debug_print_traceframe_info_up): New
5271 macro.
5272 * target-delegates.c: Regenerate.
5273
4cdd21a8
SM
52742017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5275
5276 * memrange.h (struct mem_range): Add constructors.
5277 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5278 std::vector<mem_range>.
5279 * tracepoint.c (free_traceframe_info): Don't manually free
5280 vector.
5281 (traceframe_info_start_memory): Adjust to vector change.
5282 (traceframe_available_memory): Likewise.
5283 * tracefile-tfile.c (build_traceframe_info): Likewise.
5284 * ctf.c (ctf_traceframe_info): Likewise.
5285
d0d292a2
SM
52862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5287
5288 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5289 std::vector<int>.
5290 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5291 (traceframe_info_start_tvar): Adjust to vector change.
5292 (parse_traceframe_info): Allocate with new.
5293 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5294 vector change.
5295 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5296 change.
5297 tfile_traceframe_info): Allocate with new.
5298 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5299 change.
5300
8d3c73ef
SM
53012017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5302
5303 * tracepoint.c (traceframe_info): Rename to...
5304 (current_traceframe_info): ...this.
5305 (clear_traceframe_info): Adjust.
5306 (get_traceframe_info): Adjust.
5307
b129dcac
SM
53082017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5309
5310 * nat/linux-osdata.c: Include algorithm.
5311 (compare_processes): Remove.
5312 (struct pid_pgid_entry): New struct.
5313 (linux_xfer_osdata_processgroups): Use std::vector instead of
5314 XNEWVEC.
5315
af5bf4ad
SM
53162017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5317
5318 * objfiles.h: Don't include symfile.h.
5319 (struct partial_symbol): Remove forward-declaration.
5320 (struct objfile) <global_psymbols, static_psymbols>: Change type
5321 to std::vector<partial_symbol *>.
5322 * objfiles.c (objfile::objfile): Don't memset those fields.
5323 (objfile::~objfile): Don't free those fields.
5324 * psympriv.h (struct psymbol_allocation_list): Remove
5325 forward-declaration.
5326 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5327 to std::vector.
5328 (start_psymtab_common): Change parameters to std::vector.
5329 * psymtab.c: Include algorithm.
5330 (require_partial_symbols): Call shrink_to_fit.
5331 (find_pc_sect_psymbol): Adjust to vector change.
5332 (match_partial_symbol): Likewise.
5333 (lookup_partial_symbol): Likewise.
5334 (psym_relocate): Likewise.
5335 (dump_psymtab): Likewise.
5336 (recursively_search_psymtabs): Likewise.
5337 (compare_psymbols): Remove.
5338 (sort_pst_symbols): Adjust to vector change.
5339 (start_psymtab_common): Likewise.
5340 (end_psymtab_common): Likewise.
5341 (psymbol_bcache_full): De-constify return value.
5342 (add_psymbol_to_bcache): Likewise.
5343 (extend_psymbol_list): Remove.
5344 (append_psymbol_to_list): Adjust to vector change.
5345 (add_psymbol_to_list): Likewise.
5346 (init_psymbol_list): Likewise.
5347 (maintenance_info_psymtabs): Likewise.
5348 (maintenance_check_psymtabs): Likewise.
5349 * symfile.h (struct psymbol_allocation_list): Remove.
5350 * symfile.c (reread_symbols): Adjust to vector change.
5351 * dbxread.c (start_psymtab): Change type of parameters.
5352 (dbx_symfile_read): Adjust to vector change.
5353 (read_dbx_symtab): Likewise.
5354 (start_psymtab): Change type of parameters.
5355 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5356 (create_partial_symtab): Likewise.
5357 (add_partial_symbol): Likewise.
5358 (write_one_signatured_type): Likewise.
5359 (recursively_write_psymbols): Likewise.
5360 * mdebugread.c (parse_partial_symbols): Likewise.
5361 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5362 (scan_xcoff_symtab): Adjust to vector change.
5363 (xcoff_initial_scan): Likewise.
5364
3ec5942f
SM
53652017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5366
5367 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5368
2399fe6a
YQ
53692017-10-13 Yao Qi <yao.qi@linaro.org>
5370
5371 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5372 Remove s390x-*-expedite, add s390x-expedite.
5373
4bf3f4a8
YQ
53742017-10-13 Yao Qi <yao.qi@linaro.org>
5375
5376 * features/s390-gs-linux64.c: Regenerated.
5377 * features/s390x-gs-linux64.c: Regenerated.
5378
9e86da07
TT
53792017-10-13 Tom Tromey <tom@tromey.com>
5380
5381 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5382 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5383 delete.
5384 * symfile.c (symbol_file_add_with_addrs): Use new.
5385 (symbol_file_add_separate): Update comment.
5386 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5387 * jit.c (jit_object_close_impl): Use new.
5388 (jit_unregister_code): Use delete.
5389 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5390 (~objfile): Rename from free_objfile.
5391 (free_objfile_separate_debug, do_free_objfile_cleanup)
5392 (free_all_objfiles, objfile_purge_solibs): Use delete.
5393 * objfiles.h (struct objfile): Add constructor and destructor.
5394 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5395 (allocate_objfile, free_objfile): Don't declare.
5396 (struct objstats): Add initializers.
5397
c2508e90
SM
53982017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5399
5400 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5401 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5402 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5403 * gdbarch.h: Regenerate.
5404 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5405 Adjust comment.
5406 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5407 (i386_displaced_step_fixup): Adjust comment.
5408 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5409
a900ff72
TT
54102017-10-12 Tom Tromey <tom@tromey.com>
5411
5412 * prologue-value.h (pv_area::store_would_trash): Return bool.
5413 (pv_area::find_reg): Likewise.
5414 * prologue-value.c (pv_area::store_would_trash): Return bool.
5415 (pv_area::find_reg): Likewise.
5416
f7b7ed97
TT
54172017-10-12 Tom Tromey <tom@tromey.com>
5418
5419 * s390-linux-tdep.c (s390_store, s390_load)
5420 (s390_check_for_saved, s390_analyze_prologue): Update.
5421 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5422 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5423 * prologue-value.h (class pv_area): Move from prologue-value.c.
5424 Change names of members. Add constructor, destructor, member
5425 functions.
5426 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5427 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5428 (pv_area_fetch, pv_area_scan): Don't declare.
5429 * prologue-value.c (struct pv_area::area_entry): Now member of
5430 pv_area.
5431 (struct pv_area): Move to prologue-value.h.
5432 (pv_area::pv_area): Rename from make_pv_area.
5433 (pv_area::~pv_area): Rename from free_pv_area.
5434 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5435 (clear_entries, find_entry, overlaps, store_would_trash, store)
5436 (fetch, find_reg, scan): Now member of pv_area.
5437 Remove "area" argument. Update.
5438 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5439 Update.
5440 * mn10300-tdep.c (push_reg, check_for_saved)
5441 (mn10300_analyze_prologue): Update.
5442 * mep-tdep.c (is_arg_spill, check_for_saved)
5443 (mep_analyze_prologue): Update.
5444 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5445 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5446 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5447 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5448 Update.
5449 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5450 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5451
466eecee
SM
54522017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5453
5454 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5455 * linux-nat.c (linux_nat_delete_thread): New variable.
5456 (lwp_free): Invoke linux_nat_delete_thread if set.
5457 (linux_nat_set_delete_thread): New function.
5458 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5459 thread delete callback.
5460 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5461 (_initialize_arm_linux_nat): Assign thread delete callback.
5462 * s390-linux-nat.c (s390_delete_thread): New function.
5463 (_initialize_s390_nat): Assign thread delete callback.
5464 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5465 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5466 function.
5467 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5468 declaration.
5469 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5470 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5471
f71c8822
TT
54722017-10-09 Tom Tromey <tom@tromey.com>
5473
5474 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5475 std::string.
5476 * tui/tui-layout.c (enum tui_status): Use std::string.
5477
981a3fb3
TT
54782017-10-11 Tom Tromey <tom@tromey.com>
5479
5480 * gdbthread.h (thread_command): Constify.
5481 * inferior.h (detach_command): Constify.
5482 * top.h (set_history, show_history): Constify.
5483 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5484 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5485 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5486 * printcmd.c (set_command): Constify.
5487 (non_const_set_command): New function.
5488 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5489 * breakpoint.c (enable_command, disable_command, delete_command)
5490 (catch_command, tcatch_command, set_breakpoint_cmd)
5491 (show_breakpoint_cmd): Constify.
5492 * macrocmd.c (macro_command): Constify.
5493 * infcmd.c (unset_command, kill_command, detach_command)
5494 (info_proc_cmd): Constify.
5495 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5496 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5497 (info_auto_load_cmd): Constify.
5498 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5499 (unset_tdesc_cmd): Constify.
5500 * ada-lang.c (set_ada_command, show_ada_command)
5501 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5502 * guile/guile.c (set_guile_command, show_guile_command)
5503 (info_guile_command): Constify.
5504 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5505 Constify.
5506 * skip.c (skip_command): Constify.
5507 * compile/compile.c (_initialize_compile): Constify.
5508 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5509 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5510 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5511 (maint_btrace_pt_show_cmd): Constify.
5512 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5513 Constify.
5514 * python/python.c (user_show_python, user_set_python): Constify.
5515 * mips-tdep.c (set_mips_command, show_mips_command)
5516 (set_mipsfpu_command): Constify.
5517 * record-btrace.c (cmd_record_btrace_start)
5518 (cmd_set_record_btrace, cmd_show_record_btrace)
5519 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5520 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5521 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5522 Constify.
5523 * symfile.c (overlay_command): Constify.
5524 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5525 * cli/cli-logging.c (set_logging_command, show_logging_command):
5526 Constify.
5527 * cli/cli-dump.c (dump_command, append_command)
5528 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5529 (tekhex_dump_command, binary_dump_command)
5530 (binary_append_command): Constify.
5531 * cli/cli-decode.c (struct cmd_list_element): Change type of
5532 "fun".
5533 * cli/cli-cmds.c (info_command, show_command, set_debug)
5534 (show_debug): Constify.
5535 (show_command): Add non-const overload.
5536 * top.c (set_history, show_history): Constify.
5537 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5538 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5539 * target.c (target_command): Constify.
5540 * sparc64-tdep.c (info_adi_command): Constify.
5541 * record-full.c (cmd_record_full_start): Constify.
5542 (set_record_full_command): Constify. Fix typo.
5543 (show_record_full_command): Constify.
5544 * thread.c (thread_command, thread_apply_command): Constify.
5545 * memattr.c (dummy_cmd): Constify.
5546 * value.c (function_command): Constify.
5547 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5548 * probe.c (info_probes_command): Constify.
5549 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5550 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5551 (show_thread_cmd, set_thread_default_cmd)
5552 (show_thread_default_cmd): Constify.
5553 (check_empty): Constify.
5554 * tracepoint.c (tfind_command): Constify.
5555 * cp-support.c (maint_cplus_command): Constify.
5556 * windows-tdep.c (info_w32_command): Constify.
5557 * record.c (cmd_record_start, set_record_command)
5558 (show_record_command, info_record_command, cmd_record_goto):
5559 Constify.
5560 * ravenscar-thread.c (set_ravenscar_command)
5561 (show_ravenscar_command): Constify.
5562 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5563 Constify.
5564 (add_internal_problem_command): Remove casts.
5565 * arc-tdep.c (maintenance_print_arc_command): Constify.
5566 * valprint.c (set_print, show_print, set_print_raw)
5567 (show_print_raw): Constify.
5568 * maint.c (maintenance_command, maintenance_info_command)
5569 (maintenance_print_command, maintenance_set_cmd)
5570 (maintenance_show_cmd, set_per_command_cmd)
5571 (show_per_command_cmd, maintenance_check_command): Constify.
5572 * language.c (set_check, show_check): Constify.
5573 * typeprint.c (show_print_type, set_print_type): Constify.
5574 * go32-nat.c (go32_info_dos_command): Constify.
5575
fdf44873
TT
55762017-10-11 Tom Tromey <tom@tromey.com>
5577
5578 * breakpoint.c (prepare_re_set_context): Remove.
5579 (breakpoint_re_set_one): Update. Don't use cleanups.
5580 (breakpoint_re_set): Use scoped_restore, std::string, and
5581 scoped_restore_current_language.
5582
81b1e71c
TT
55832017-10-11 Tom Tromey <tom@tromey.com>
5584
5585 * breakpoint.c (commands_command_1): Use std::string.
5586 (cleanup_executing_breakpoints): Remove.
5587 (bpstat_do_actions_1): Use scoped_restore.
5588 (bpstat_check_watchpoint): Use std::string.
5589 (decode_static_tracepoint_spec): Likewise.
5590 (break_range_command): Likewise.
5591 (watch_command_1): Likewise.
5592 (compare_breakpoints): Change argument types.
5593 (clear_command): Use std::vector.
5594 (cleanup_executing_breakpoints): Remove.
5595 (update_global_location_list): Use unique_xmalloc_ptr.
5596 (strace_command): Remove unused declaration.
5597
4f9d9906
JB
55982017-10-11 John Baldwin <jhb@FreeBSD.org>
5599
5600 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5601 * NEWS: Mention new FreeBSD/arm native configuration.
5602 * configure.host: Add arm*-*-freebsd*.
5603 * configure.nat: Likewise.
5604 * arm-fbsd-nat.c: New file.
5605
7176dfd2
JB
56062017-10-11 John Baldwin <jhb@FreeBSD.org>
5607
5608 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5609 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5610 * NEWS: Mention new FreeBSD/arm target.
5611 * configure.tgt: Add arm*-*-freebsd*.
5612 * arm-fbsd-tdep.c: New file.
5613 * arm-fbsd-tdep.h: New file.
5614
fe220226
MR
56152017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5616
5617 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5618 `gdbarch_elfcore_write_linux_prpsinfo'.
5619 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5620 method.
5621 (elf_internal_linux_prpsinfo): Remove declaration.
5622 * gdbarch.h: Regenerate.
5623 * gdbarch.c: Regenerate.
5624
a2f63b2e
MR
56252017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5626
5627 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5628 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5629
458ca1d0
PA
56302017-10-11 Pedro Alves <palves@redhat.com>
5631
5632 * breakpoint.c (reattach_breakpoints): Delete.
5633 * breakpoint.h (reattach_breakpoints): Delete.
5634
905014d7
SM
56352017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5636
5637 * symfile.c (registered_sym_fns): Make struct, not typedef.
5638 (DEF_VEC_O (registered_sym_fns)): Remove.
5639 (symtab_fns): Change type to std::vector.
5640 (add_symtab_fns): Adjust.
5641 (find_sym_fns): Adjust.
5642
56d704da
AK
56432017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5644
5645 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5646 * arc-tdep.h (arc_arch_is_em): New function.
5647 (arc_arch_is_hs): Likewise.
5648
7fa29be9
EB
56492017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5650
5651 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5652 parentheses in the declaration.
5653 (macro_lookup_inclusion): Likewise.
5654 (macro_lookup_definition): Likewise.
5655 * p-lang.h (pascal_builtin_types): Likewise.
5656 * tui/tui-data.c (tui_win_list): Likewise.
5657 * tui/tui-data.h (tui_win_list): Likewise.
5658 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5659
d9b477e3
KB
56602017-10-11 Mark Rages <markrages@gmail.com>
5661
5662 * target-memory.c (block_boundaries): Fix for block address not
5663 aligned on block size.
5664
65630365
PA
56652017-10-10 Pedro Alves <palves@redhat.com>
5666 Tom Tromey <tom@tromey.com>
5667
5668 * breakpoint.c (struct captured_breakpoint_query_args)
5669 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5670 (print_breakpoint): New.
5671 * breakpoint.h (print_breakpoint): Declare.
5672 * common/common-exceptions.h (enum return_reason): Remove
5673 references to catch_exceptions.
5674 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5675 Delete.
5676 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5677 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5678 * gdb.h: Delete.
5679 * gdbthread.h (thread_select): Declare.
5680 * mi/mi-cmd-break.c: Don't include gdb.h.
5681 (breakpoint_notify): Use print_breakpoint.
5682 * mi/mi-cmd-catch.c: Don't include gdb.h.
5683 * mi/mi-interp.c: Don't include gdb.h.
5684 (mi_print_breakpoint_for_event): New.
5685 (mi_breakpoint_created, mi_breakpoint_modified): Use
5686 mi_print_breakpoint_for_event.
5687 * mi/mi-main.c: Don't include gdb.h.
5688 (mi_cmd_thread_select): Parse the global thread ID here. Use
5689 thread_select instead of gdb_thread_select.
5690 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5691 of using gdb_list_thread_ids.
5692 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5693 FILEIO_ENOSYS here.
5694 (remote_fileio_request): Use TRY/CATCH instead of
5695 catch_exceptions.
5696 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5697 (symbol_file_add_from_memory_wrapper): Delete.
5698 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5699 * thread.c: Don't include gdb.h.
5700 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5701 (thread_alive): Use thread_select.
5702 (do_captured_thread_select): Delete, parts salvaged as ...
5703 (thread_select): ... this new function.
5704 (gdb_thread_select): Delete.
5705
bf469271
PA
57062017-10-10 Pedro Alves <palves@redhat.com>
5707 Tom Tromey <tom@tromey.com>
5708
5709 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5710 and reverse logic.
5711 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5712 No longer macros. Instead ...
5713 (enum wp_check_result): They're now values of this new
5714 enumeration.
5715 (watchpoint_check): Change return type to wp_check_result and
5716 parameter type to bpstat.
5717 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5718 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5719 catch_errors. Reverse logic of watchpoint_check call.
5720 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5721 pointer as parameter.
5722 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5723 * common/common-exceptions.c (throw_exception_sjlj): Update
5724 comments to avoid mentioning catch_errors.
5725 * exceptions.c (catch_errors): Delete.
5726 * exceptions.h: Update comments to avoid mentioning catch_errors.
5727 (catch_errors_ftype, catch_errors): Delete.
5728 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5729 (hook_stop_stub): Delete.
5730 (restore_selected_frame): Change return type to void, and
5731 parameter type to const frame_id &.
5732 (restore_infcall_control_state): Use TRY/CATCH instead of
5733 catch_errors.
5734 * main.c (captured_command_loop): Return void and remove
5735 parameter. Remove references to catch_errors.
5736 (captured_main): Use TRY/CATCH instead of catch_errors.
5737 * objc-lang.c (objc_submethod_helper_data)
5738 (find_objc_msgcall_submethod_helper): Delete.
5739 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5740 catch_errors.
5741 * record-full.c (record_full_message): Return void.
5742 (record_full_message_args, record_full_message_wrapper): Delete.
5743 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5744 instead of catch_errors.
5745 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5746 parameter type to int.
5747 * solib-darwin.c (open_symbol_file_object): Ditto.
5748 * solib-dsbt.c (open_symbol_file_object): Ditto.
5749 * solib-frv.c (open_symbol_file_object): Ditto.
5750 * solib-svr4.c (open_symbol_file_object): Ditto.
5751 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5752 * solib.c (update_solib_list): Use TRY/CATCH instead of
5753 catch_errors.
5754 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5755 Change type.
5756 * symmisc.c (struct print_symbol_args): Remove.
5757 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5758 (print_symbol): Change type.
5759 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5760 and remove parameters.
5761 (catch_errors): New.
5762 (get_windows_debug_event): Adjust.
5763
1a56bfa5
TT
57642017-10-09 Tom Tromey <tom@tromey.com>
5765
5766 * mi/mi-main.c (free_splay_tree): Remove.
5767 (list_available_thread_groups): Use splay_tree_up.
5768 * common/gdb_splay_tree.h: New file.
5769
0c478e2d
TT
57702017-10-09 Tom Tromey <tom@tromey.com>
5771
5772 * mi/mi-main.c (do_nothing): Remove.
5773 (list_available_thread_groups): Update.
5774
cbd2b4e3
PA
57752017-10-09 Pedro Alves <palves@redhat.com>
5776
5777 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5778 reading registers when switching context.
5779
a181c0bf
JB
57802017-10-09 John Baldwin <jhb@FreeBSD.org>
5781
5782 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5783 (fbsd_convert_siginfo): Likewise.
5784 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5785
6e66f753
SM
57862017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5787
5788 * configure.ac (try_guile_versions): Remove guile-2.2.
5789 * configure: Regenerate.
5790
890e9790
TT
57912017-10-09 Tom Tromey <tom@tromey.com>
5792
5793 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5794 (COMPILE.pre): Use $(CXX).
5795
109483d9
PA
57962017-10-09 Pedro Alves <palves@redhat.com>
5797
5798 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5799 Use bool.
5800 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5801 * cp-support.h (cp_remove_params): Now returns a
5802 gdb::unique_xmalloc_ptr.
5803 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5804 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5805 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5806 returning a gdb::unique_xmalloc_ptr.
5807 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5808 * stack.c (find_frame_funname): Adjust to cp_remove_params
5809 returning a gdb::unique_xmalloc_ptr.
5810
791afaa2
TT
58112017-10-08 Tom Tromey <tom@tromey.com>
5812
5813 * dwarf2read.c (dwarf2_get_dwz_file): Use
5814 gdb::unique_xmalloc_ptr.
5815 (find_slot_in_mapped_hash): Likewise.
5816 (dwarf2_physname): Likewise.
5817 (create_dwo_unit_in_dwp_v1): Use std::string.
5818 (create_dwo_unit_in_dwp_v2): Likewise.
5819 (lookup_dwo_cutu): Likewise.
5820 (inherit_abstract_dies): Use std::vector.
5821 (read_array_type): Likewise.
5822 (dwarf_decode_macros): Remove unused declaration.
5823 (unsigned_int_compar): Remove.
5824 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5825 (psymtabs_addrmap_cleanup): Remove.
5826
30a9c02f
TT
58272017-10-08 Tom Tromey <tom@tromey.com>
5828
5829 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5830 * frame.h (frame_cleanup_after_sniffer): Declare.
5831 (frame_prepare_for_sniffer): Return void.
5832 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5833 type of argument.
5834 (frame_prepare_for_sniffer): Return void.
5835
757325a3
TT
58362017-10-08 Tom Tromey <tom@tromey.com>
5837
5838 * utils.h (make_cleanup_value_free): Remove.
5839 * utils.c (do_value_free, struct cleanup): Remove.
5840 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5841 Use gdb_value_up.
5842 * value.h (struct value_deleter): New.
5843 (gdb_value_up): New typedef.
5844
b9c04fb2
TT
58452017-10-08 Tom Tromey <tom@tromey.com>
5846
5847 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5848 (make_cleanup_free_search_symbols): Remove.
5849 (search_symbols): Return std::vector.
5850 (symbol_search::compare_search_syms): Now member of
5851 symbol_search. Change arguments.
5852 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5853 (symtab_symbol_info, rbreak_command): Update.
5854 * symtab.h (struct symbol_search) <next>: Remove.
5855 Add constructors.
5856 (symbol_search::operator<): New function.
5857 (symbol_search::operator==): New function.
5858 (search_symbols): Remove std::vector.
5859 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5860 (symbol_search::compare_search_syms): Declare.
5861
0d28b0a5
YQ
58622017-10-06 Yao Qi <yao.qi@linaro.org>
5863
5864 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5865 arch/aarch64-insn.o.
5866 Remove one rule.
5867 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5868
71917808
YQ
58692017-10-06 Yao Qi <yao.qi@linaro.org>
5870
5871 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5872 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5873 arch/arm-linux.o respectively.
5874 * configure.tgt: Likewise.
5875
2081b2b2
YQ
58762017-10-06 Yao Qi <yao.qi@linaro.org>
5877
5878 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5879 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5880
a1b85d28
PA
58812017-10-06 Pedro Alves <palves@redhat.com>
5882
5883 * windows-nat.c: Include <algorithm>.
5884
d97987e2
YQ
58852017-10-06 Yao Qi <yao.qi@linaro.org>
5886
5887 * configure.tgt (i386_tobjs): New variable.
5888 (amd64_tobjs): New variable.
5889 Set $cpu_obs and $os_obs.
5890
f38307f5
YQ
58912017-10-06 Yao Qi <yao.qi@linaro.org>
5892
5893 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5894 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5895 (clean): Remove object files and dependency files.
5896 (distclean): Remove the directory.
5897 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5898 * configure: Re-generated.
5899 * configure.tgt: Replace amd64.o with arch/amd64.o.
5900
2f924de6
JM
59012017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5902
5903 PR build/22188
5904 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5905 and SETEND.
5906
2fd9d7ca
PA
59072017-10-05 Pedro Alves <palves@redhat.com>
5908
5909 * linux-nat.c (linux_child_follow_fork): When following the parent
5910 and detaching the child, consult the parent thread's architecture
5911 instead of the child's.
5912
d13b8493
UW
59132017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5914
5915 * ax.h: Do not include "doublest.h".
5916 (union agent_val): Remove.
5917
3b4b2f16
UW
59182017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5919
5920 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5921 (decimal_to_string): Return std::string object.
5922 (decimal_from_string): Accept std::string object. Return bool.
5923 (decimal_from_integral, decimal_from_doublest): Remove.
5924 (decimal_from_longest): Add prototype.
5925 (decimal_from_ulongest): Likewise.
5926 (decimal_to_longest): Likewise.
5927 (decimal_from_doublest): Likewise.
5928 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5929 (MAX_DECIMAL_STRING): Move here.
5930 (decimal_to_string): Return std::string object.
5931 (decimal_from_string): Accept std::string object. Return bool.
5932 (decimal_from_integral): Remove, replace by ...
5933 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5934 (decimal_to_longest): New function.
5935 (decimal_from_floating): Remove, replace by ...
5936 (decimal_from_doublest): ... this new function.
5937 (decimal_to_doublest): Update to new decimal_to_string interface.
5938
5939 * value.c (unpack_long): Use decimal_to_longest.
5940 * valops.c (value_cast): Use decimal_from_doublest instead of
5941 decimal_from_floating. Use decimal_from_[u]longest isntead of
5942 decimal_from_integral.
5943 * valarith.c (value_args_as_decimal): Likewise.
5944 * valprint.c (print_decimal_floating): Update to new
5945 decimal_to_string interface.
5946 * printcmd.c (printf_decfloat): Likewise.
5947 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5948
1841ee5d
UW
59492017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5950
5951 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5952 * gdbtypes.c: Include "floatformat.h".
5953 * value.c: Likewise.
5954 * m68k-tdep.c: Likewise.
5955
5956 * findvar.c: Do not include "floatformat.h".
5957 * amd64-darwin-tdep.c: Likewise.
5958 * arm-linux-tdep.c: Likewise.
5959 * i386-darwin-tdep.c: Likewise.
5960 * i387-tdep.c: Likewise.
5961 * m68k-linux-tdep.c: Likewise.
5962 * mep-tdep.c: Likewise.
5963 * mips-tdep.c: Likewise.
5964 * nios2-tdep.c: Likewise.
5965 * s390-linux-tdep.c: Likewise.
5966 * sparc-obsd-tdep.c: Likewise.
5967 * sparc-tdep.c: Likewise.
5968 * sparc64-tdep.c: Likewise.
5969 * spu-tdep.c: Likewise.
5970 * tic6x-tdep.c: Likewise.
5971 * tilegx-tdep.c: Likewise.
5972 * vax-tdep.c: Likewise.
5973 * xstormy16-tdep.c: Likewise.
5974 * xtensa-tdep.c: Likewise.
5975
5976 * top.c: Do not include "doublest.h".
5977 * aarch64-tdep.c: Likewise.
5978 * alpha-tdep.c: Likewise.
5979 * arm-linux-tdep.c: Likewise.
5980 * m68k-linux-tdep.c: Likewise.
5981 * tilegx-tdep.c: Likewise.
5982 * xstormy16-tdep.c: Likewise.
5983
a80a6471
JB
59842017-10-05 John Baldwin <jhb@FreeBSD.org>
5985
5986 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5987 (mipsn32_fbsd_sigframe): Define.
5988 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5989 for FreeBSD/mipsn32.
5990
12c4bd7f
JB
59912017-10-05 John Baldwin <jhb@FreeBSD.org>
5992
5993 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5994 AT_HWCAP.
5995
c91933e9
TG
59962017-10-05 Tristan Gingold <tgingold@free.fr>
5997
5998 * MAINTAINERS (Misc): Update my email address.
5999
5cd63fda
PA
60002017-10-04 Pedro Alves <palves@redhat.com>
6001
6002 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
6003 it instead of target_gdbarch.
6004 (get_remote_state, get_remote_packet_size): Adjust
6005 get_remote_arch_state calls, passing down target_gdbarch
6006 explicitly.
6007 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
6008 'gdbarch' and use it instead of target_gdbarch.
6009 (get_memory_packet_size): Adjust get_remote_arch_state calls,
6010 passing down target_gdbarch explicitly.
6011 (struct stop_reply) <arch>: New field.
6012 (remote_parse_stop_reply): Use the stopped thread's architecture,
6013 not the current inferior's. Save the architecture in the
6014 stop_reply.
6015 (process_stop_reply): Use the stop reply's architecture.
6016 (process_g_packet, remote_fetch_registers)
6017 (remote_prepare_to_store, store_registers_using_G)
6018 (remote_store_registers): Adjust get_remote_arch_state calls,
6019 using the regcache's architecture.
6020 (remote_get_trace_status): Adjust get_remote_arch_state calls,
6021 passing down target_gdbarch explicitly.
6022 * spu-multiarch.c (spu_thread_architecture): Defer to the target
6023 beneath instead of calling target_gdbarch.
6024 * target.c (default_thread_architecture): Use the specified
6025 inferior's architecture, instead of the current inferior's
6026 architecture (via target_gdbarch).
6027
ed4227b7
PA
60282017-10-04 Pedro Alves <palves@redhat.com>
6029
6030 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
6031 case.
6032 (regcache_print): Handle !target_has_registers here instead.
6033
55b11ddf
PA
60342017-10-04 Pedro Alves <palves@redhat.com>
6035
6036 * frame.c (create_test_frame): Delete.
6037 * frame.h (create_test_frame): Delete.
6038 * gdbarch-selftests.c: Include gdbthread.h and target.h.
6039 (class regcache_test): Delete.
6040 (test_target_has_registers, test_target_has_stack)
6041 (test_target_has_memory, test_target_prepare_to_store)
6042 (test_target_store_registers): New functions.
6043 (test_target_ops): New class.
6044 (register_to_value_test): Error out if there's already a
6045 process_stratum (or higher) target pushed. Create a fuller mock
6046 environment, with mock target_ops, inferior, address space, thread
6047 and inferior_ptid.
6048 * progspace.c (struct address_space): Move to ...
6049 * progspace.h (struct address_space): ... here.
6050 * regcache.h (regcache::~regcache, regcache::raw_write)
6051 [GDB_SELF_TEST]: No longer virtual.
6052
4c71c105
SM
60532017-10-04 Simon Marchi <simon.marchi@ericsson.com>
6054
6055 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
6056
73dcd72d
PA
60572017-10-04 Pedro Alves <palves@redhat.com>
6058
6059 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
6060 out of 'between TRY and CATCH'.
6061
44704526
PA
60622017-10-04 Pedro Alves <palves@redhat.com>
6063
6064 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
6065 * common/common-exceptions.h (TRY): Open an outermost scope.
6066 Expand intro comment.
6067 (CATCH): Reindent.
6068 (END_CATCH): Close the outermost scope.
6069 * completer.c (complete_line_internal): Add missing END_CATCH.
6070
bc3b087d
SDJ
60712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6072
6073 * NEWS (Changes since GDB 8.0): Add entry about new
6074 'set-cwd-on-gdbserver' feature.
6075 (New remote packets): Add entry for QSetWorkingDir.
6076 * common/common-inferior.h (set_inferior_cwd): New prototype.
6077 * infcmd.c (set_inferior_cwd): Remove "static".
6078 (show_cwd_command): Expand text to include remote debugging.
6079 * remote.c: Add PACKET_QSetWorkingDir.
6080 (remote_protocol_features) <QSetWorkingDir>: New entry for
6081 PACKET_QSetWorkingDir.
6082 (extended_remote_set_inferior_cwd): New function.
6083 (extended_remote_create_inferior): Call
6084 "extended_remote_set_inferior_cwd".
6085 (_initialize_remote): Call "add_packet_config_cmd" for
6086 QSetWorkingDir.
6087
d092c5a2
SDJ
60882017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6089
6090 * NEWS (New commands): Mention "set/show cwd".
6091 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
6092 "cd" command's help text.
6093 * common/common-inferior.h (get_inferior_cwd): New prototype.
6094 * infcmd.c (inferior_cwd_scratch): New global variable.
6095 (set_inferior_cwd): New function.
6096 (get_inferior_cwd): Likewise.
6097 (set_cwd_command): Likewise.
6098 (show_cwd_command): Likewise.
6099 (_initialize_infcmd): Add "set/show cwd" commands.
6100 * inferior.h (class inferior) <cwd>: New field.
6101 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
6102 (fork_inferior): Change inferior's cwd before its execution.
6103 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
6104 to CreateProcess.
6105
7da0a886
SDJ
61062017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6107
6108 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
6109 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
6110 (COMMON_OBS): Add gdb_tilde_expand.o.
6111 * common/gdb_tilde_expand.c: New file.
6112 * common/gdb_tilde_expand.h: Likewise.
6113
db8dd160
MR
61142017-10-03 Maciej W. Rozycki <macro@imgtec.com>
6115
6116 * gdbarch.sh (objfile): Remove duplicate declaration.
6117 * gdbarch.h: Regenerate.
6118
f8bfbf22
TT
61192017-10-03 Tom Tromey <tom@tromey.com>
6120
6121 * utils.c (internal_vproblem): Use string_vprintf.
6122
5178ed48
TT
61232017-10-03 Tom Tromey <tom@tromey.com>
6124
6125 * printcmd.c (info_symbol_command): Use std::string.
6126
8cff8730
TT
61272017-10-03 Tom Tromey <tom@tromey.com>
6128
6129 * top.c (gdb_safe_append_history): Use std::string.
6130
895b8f30
TT
61312017-10-03 Tom Tromey <tom@tromey.com>
6132
6133 * event-top.c (stdin_event_handler): Update.
6134 * main.c (captured_main_1): Update.
6135 * top.h (make_delete_ui_cleanup): Remove.
6136 (struct ui): Add constructor and destructor.
6137 (new_ui, delete_ui): Remove.
6138 * top.c (make_delete_ui_cleanup): Remove.
6139 (new_ui_command): Use std::unique_ptr.
6140 (delete_ui_cleanup): Remove.
6141 (ui::ui): Rename from new_ui. Update.
6142 (free_ui): Remove.
6143 (ui::~ui): Rename from delete_ui. Update.
6144
0efef640
TT
61452017-10-03 Tom Tromey <tom@tromey.com>
6146
6147 * symfile.c (load_progress): Use gdb::byte_vector.
6148
245ad7d3
TT
61492017-10-03 Tom Tromey <tom@tromey.com>
6150
6151 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6152 declaration.
6153 * printcmd.c (x_command): Remove unused declaration.
6154 * symfile.c (symbol_file_command): Remove unused declaration.
6155
e05550d7
TT
61562017-10-03 Tom Tromey <tom@tromey.com>
6157
6158 * utils.c (internal_vproblem): Use std::string.
6159 (defaulted_query): Likewise.
6160
b95de2b7
TT
61612017-10-03 Tom Tromey <tom@tromey.com>
6162
6163 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6164 * top.c (execute_command_to_string): Update.
6165 * utils.c (make_cleanup_restore_page_info): Remove.
6166 (do_restore_page_info_cleanup): Remove.
6167 (set_batch_flag_and_restore_page_info):
6168 New.
6169 (make_cleanup_restore_page_info): Remove.
6170 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6171 (~set_batch_flag_and_restore_page_info): New
6172 (make_cleanup_restore_uinteger): Remove.
6173 (make_cleanup_restore_integer): Remove.
6174 (struct restore_integer_closure): Remove.
6175 (restore_integer): Remove.
6176 * utils.h (struct set_batch_flag_and_restore_page_info): New
6177 class.
6178 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6179 (make_cleanup_restore_page_info): Remove.
6180 (make_cleanup_restore_uinteger) Remove.
6181 (make_cleanup_restore_integer) Remove.
6182
07036511
TT
61832017-10-03 Tom Tromey <tom@tromey.com>
6184
6185 * record-full.h (record_full_gdb_operation_disable_set): Return
6186 scoped_restore_tmpl<int>.
6187 * infrun.c (adjust_pc_after_break): Update.
6188 (handle_signal_stop): Update.
6189 * record-full.c (record_full_gdb_operation_disable_set): Return
6190 scoped_restore_tmpl<int>.
6191 (record_full_wait_1, record_full_insert_breakpoint)
6192 (record_full_remove_breakpoint, record_full_save)
6193 (record_full_goto_insn): Update.
6194
45320ffa
TT
61952017-10-02 Tom Tromey <tom@tromey.com>
6196
6197 PR rust/22236:
6198 * rust-lang.c (rust_val_print_str): New function.
6199 (val_print_struct): Call it.
6200 (rust_subscript): Preserve name of slice type.
6201
b3e3859b
TT
62022017-10-02 Tom Tromey <tom@tromey.com>
6203
6204 * rust-lang.c (rust_subscript): Handle slices in
6205 EVAL_AVOID_SIDE_EFFECTS case.
6206
01af5e0d
TT
62072017-10-02 Tom Tromey <tom@tromey.com>
6208
6209 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6210
888e3ddb
TT
62112017-10-02 Tom Tromey <tom@tromey.com>
6212
6213 * rust-lang.h (rust_slice_type): Add "extern".
6214
cc536b21
PA
62152017-10-02 Tom Tromey <tom@tromey.com>
6216 Pedro Alves <palves@redhat.com>
6217
6218 * ada-lang.h (ada_exc_info::operator<): Make const.
6219 (ada_exc_info::operator==): Make const.
6220 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6221 Make const.
6222
386c8614
TT
62232017-09-29 Tom Tromey <tom@tromey.com>
6224
6225 * target.c (read_whatever_is_readable): Change type of "result".
6226 Update.
6227 (free_memory_read_result_vector): Remove.
6228 (read_memory_robust): Change return type. Update.
6229 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6230 bin2hex, std::string.
6231 * target.h (memory_read_result_s): Remove typedef.
6232 (free_memory_read_result_vector): Remove.
6233 (read_memory_robust): Return std::vector.
6234
789c4b5e
TT
62352017-09-29 Tom Tromey <tom@tromey.com>
6236
6237 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6238
ab816a27
TT
62392017-09-29 Tom Tromey <tom@tromey.com>
6240
6241 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6242 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6243 operator< and operator==.
6244 (ada_exceptions_list): Return a std::vector.
6245 * ada-lang.c (ada_exc_info::operator<): Rename from
6246 compare_ada_exception_info.
6247 (ada_exc_info::operator==): New.
6248 (sort_remove_dups_ada_exceptions_list): Change type of
6249 "exceptions".
6250 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6251 (ada_add_global_exceptions): Likewise.
6252 (ada_exceptions_list_1): Return a std::vector.
6253 (ada_exceptions_list): Likewise.
6254
52f9abe4
TT
62552017-09-29 Tom Tromey <tom@tromey.com>
6256
6257 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6258 'std::set *'.
6259 (print_one_inferior): Update.
6260 (free_vector_of_ints): Remove.
6261 (list_available_thread_groups): Change "ids" to std::set.
6262 (mi_cmd_list_thread_groups): Update.
6263 (struct collect_cores_data) <core>: Now a std::set.
6264 (collect_cores): Update.
6265 (unique): Remove.
6266 (print_one_inferior): Update.
6267
dcd5ddcc
TT
62682017-09-29 Tom Tromey <tom@tromey.com>
6269
6270 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6271 (mi_execute_async_cli_command): Likewise.
6272 (mi_cmd_trace_frame_collected): Use field_fmt.
6273
45d288cc
TT
62742017-09-29 Tom Tromey <tom@tromey.com>
6275
6276 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6277 gdb::byte_vector.
6278
6afe2f4a
TT
62792017-09-29 Tom Tromey <tom@tromey.com>
6280
6281 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6282
9813429a
TT
62832017-09-29 Tom Tromey <tom@tromey.com>
6284
6285 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6286
2d6960b4
TT
62872017-09-29 Tom Tromey <tom@tromey.com>
6288
6289 * varobj.h (varobj_gen_name): Return std::string.
6290 * varobj.c (varobj_gen_name): Return std::string.
6291 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6292 (mi_cmd_var_delete): Don't copy "name".
6293
784c453a
TT
62942017-09-29 Tom Tromey <tom@tromey.com>
6295
6296 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6297 (mi_cmd_break_insert_1): Update.
6298
a9bc57b9
TT
62992017-09-29 Tom Tromey <tom@tromey.com>
6300
6301 * target.h (make_scoped_defer_target_commit_resume): Update.
6302 * target.c (make_scoped_defer_target_commit_resume): Rename from
6303 make_cleanup_defer_target_commit_resume. Return a
6304 scoped_restore.
6305 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6306
9754d8c4
TT
63072017-09-29 Tom Tromey <tom@tromey.com>
6308
6309 * main.c (captured_main_1): Remove unused declaration.
6310 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6311
99ef965c
TT
63122017-09-29 Tom Tromey <tom@tromey.com>
6313
6314 * symtab.c (search_symbols): Remove unused outer cleanup.
6315 (make_source_files_completion_list): Remove unused declaration.
6316
42518ba7
TT
63172017-09-29 Tom Tromey <tom@tromey.com>
6318
6319 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6320
726b2169
TT
63212017-09-29 Tom Tromey <tom@tromey.com>
6322
6323 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6324 gdb::byte_vector.
6325
55b06432
TT
63262017-09-29 Tom Tromey <tom@tromey.com>
6327
6328 * complaints.c (vcomplaint): Use std::string.
6329
8abcee91
TT
63302017-09-29 Tom Tromey <tom@tromey.com>
6331
6332 * tracepoint.c (trace_variable_command): Use std::string.
6333 (encode_actions_1): Remove unused declarations.
6334 (create_tsv_from_upload): Use std::string.
6335
6ad94bc7
TT
63362017-09-29 Tom Tromey <tom@tromey.com>
6337
6338 * cp-support.c (gdb_demangle): Use std::string.
6339
2003f3d8
TT
63402017-09-29 Tom Tromey <tom@tromey.com>
6341
6342 * stack.c (parse_frame_specification): Use std::string
6343 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6344
8f8accb5
TT
63452017-09-29 Tom Tromey <tom@tromey.com>
6346
6347 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6348
200aa7b1
TT
63492017-09-29 Tom Tromey <tom@tromey.com>
6350
6351 * utils.c (vfprintf_maybe_filtered): Use std::string.
6352 (vfprintf_unfiltered): Likewise.
6353
606aae8a
TT
63542017-09-29 Tom Tromey <tom@tromey.com>
6355
6356 * event-top.c (top_level_prompt): Return std::string.
6357 (display_gdb_prompt): Update.
6358
bd413795
TT
63592017-09-29 Tom Tromey <tom@tromey.com>
6360
6361 * unittests/common-utils-selftests.c (format): New function.
6362 (string_vprintf_tests): New function.
6363 (_initialize_common_utils_selftests): Register new tests.
6364 * common/common-utils.c (string_vprintf): New function.
6365 * common/common-utils.h (string_vprintf): Declare.
6366
256642e8
PA
63672017-09-29 Pedro Alves <palves@redhat.com>
6368
6369 * common/rsp-low.c (unpack_varlen_hex): Constify.
6370 * common/rsp-low.h (unpack_varlen_hex): Constify.
6371 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6372 Constify.
6373 * remote.c (remote_set_permissions, read_ptid)
6374 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6375 (remote_static_tracepoint_marker_at)
6376 (remote_static_tracepoint_markers_by_strid)
6377 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6378 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6379 (parse_tracepoint_definition, parse_tsv_definition)
6380 (parse_static_tracepoint_marker_definition): Constify.
6381 * tracepoint.h (parse_static_tracepoint_marker_definition)
6382 (parse_trace_status, parse_tracepoint_status)
6383 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6384
b6bb3468
PA
63852017-09-29 Pedro Alves <palves@redhat.com>
6386
6387 * remote.c (target_buf, target_buf_size): Delete.
6388 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6389 Use the connection's packet buffer instead.
6390 All callers adjusted.
6391 (_initialize_remote): Remove references to target_buf and
6392 target_buf_size.
6393
b2f8eb7a
PA
63942017-09-28 Pedro Alves <palves@redhat.com>
6395
6396 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6397 unittests/common-utils-selftests.c.
6398 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6399 (COMMON_OBS): Remove utils-selftests.o.
6400 * utils-selftests.c: Move to ...
6401 * unittests/common-utils-selftests.c: ... here and rename self
6402 test to "string_printf".
6403
08302ed2
DE
64042017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6405
6406 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6407 having NULL cus or tus.
6408
96a5a1d3
UW
64092017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6410
6411 * arm-tdep.c: (convert_from_extended): Remove.
6412 (convert_to_extended): Likewise.
6413 (arm_extract_return_value): Use convert_typed_floating.
6414 (arm_store_return_value): Likewise.
6415
6416 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6417 * sh-tdep.c: Do not include "floatformat.h".
6418 (sh_littlebyte_bigword_type): New function.
6419 (sh_register_convert_to_virtual): Use convert_typed_floating.
6420 (sh_register_convert_to_raw): Likewise.
6421 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6422 (sh64_littlebyte_bigword_type): New function.
6423 (sh64_extract_return_value): Use convert_typed_floating.
6424 (sh64_register_convert_to_virtual): Likewise.
6425 (sh64_register_convert_to_raw): Likewise.
6426
0db7851f
UW
64272017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6428
6429 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6430 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6431
6432 * gdbtypes.h (union type_specific): Make field floatformat hold
6433 just a single struct floatformat, not an array.
6434 (floatformat_from_type): Move here.
6435 * gdbtypes.c (floatformat_from_type): Move here. Update to
6436 changed TYPE_FLOATFORMAT definition.
6437 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6438 (recursive_dump_type): Likewise.
6439 (init_float_type): Install correct floatformat for byte order.
6440 (arch_float_type): Likewise.
6441
77b7c781
UW
64422017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6443
6444 * gdbtypes.c (init_type): Change incoming argument from
6445 length-in-bytes to length-in-bits. Assert length is a
6446 multiple of TARGET_CHAR_BITS.
6447 (arch_type, arch_flags_type): Likewise.
6448 (init_integer_type): Update call to init_type.
6449 (init_character_type): Likewise.
6450 (init_boolean_type): Likewise.
6451 (init_float_type): Likewise.
6452 (init_decfloat_type): Likewise.
6453 (init_complex_type): Likewise.
6454 (init_pointer_type): Likewise.
6455 (objfile_type): Likewise.
6456 (arch_integer_type): Update call to arch_type.
6457 (arch_character_type): Likewise.
6458 (arch_boolean_type): Likewise.
6459 (arch_float_type): Likewise.
6460 (arch_decfloat_type): Likewise.
6461 (arch_complex_type): Likewise.
6462 (arch_pointer_type): Likewise.
6463 (gdbtypes_post_init): Likewise.
6464
6465 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6466 (read_base_type): Likewise.
6467 * mdebugread.c (basic_type): Likewise.
6468 * stabsread.c (dbx_init_float_type): Likewise.
6469 (rs6000_builtin_type): Likewise.
6470 (read_range_type): Likewise. Also, fix call to init_integer_type
6471 with erroneous length argument.
6472
6473 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6474 * d-lang.c (build_d_types): Likewise.
6475 * f-lang.c (build_fortran_types): Likewise.
6476 * go-lang.c (build_go_types): Likewise.
6477 * opencl-lang.c (build_opencl_types): Likewise.
6478 * jit.c (finalize_symtab): Likewise.
6479 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6480 (build_std_type_info_type): Likewise.
6481 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6482 update call to arch_flags_type.
6483
6484 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6485 arch_type.
6486 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6487 * windows-tdep.c (windows_get_tlb_type): Likewise.
6488
6489 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6490 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6491 * m32c-tdep.c (make_types): Likewise.
6492 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6493 (rl78_psw_type): Update call to arch_flags_type.
6494 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6495 * rx-tdep.c (rx_psw_type): Likewise.
6496 (rx_fpsw_type): Likewise.
6497 * sparc-tdep.c (sparc_psr_type): Likewise.
6498 (sparc_fsr_type): Likewise.
6499 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6500 (sparc64_ccr_type): Likewise.
6501 (sparc64_fsr_type): Likewise.
6502 (sparc64_fprs_type): Likewise.
6503
f21b4d5c
TT
65042017-09-27 Tom Tromey <tom@tromey.com>
6505
6506 * findcmd.c (find_command): Constify.
6507
643c2ffa
TT
65082017-09-27 Tom Tromey <tom@tromey.com>
6509
6510 * ada-tasks.c (task_command_1, task_command): Constify.
6511
510e5e56
TT
65122017-09-27 Tom Tromey <tom@tromey.com>
6513
6514 * symtab.c (maintenance_print_symbol_cache)
6515 (maintenance_flush_symbol_cache)
6516 (maintenance_print_symbol_cache_statistics): Constify.
6517
e503b191
TT
65182017-09-27 Tom Tromey <tom@tromey.com>
6519
6520 * inferior.c (detach_inferior_command, kill_inferior_command)
6521 (inferior_command): Constify.
6522
4e001312
TT
65232017-09-27 Tom Tromey <tom@tromey.com>
6524
6525 * regcache.c (regcache_print, maintenance_print_registers)
6526 (maintenance_print_raw_registers)
6527 (maintenance_print_cooked_registers)
6528 (maintenance_print_register_groups)
6529 (maintenance_print_remote_registers): Constify.
6530
77763700
TT
65312017-09-27 Tom Tromey <tom@tromey.com>
6532
6533 * printcmd.c (map_display_numbers, undisplay_command)
6534 (enable_disable_display_command, enable_display_command)
6535 (disable_display_command): Constify.
6536
4495129a
TT
65372017-09-27 Tom Tromey <tom@tromey.com>
6538
6539 * breakpoint.h (delete_command): Don't declare.
6540 * breakpoint.c (delete_command, enable_once_command)
6541 (enable_count_command, enable_delete_command, breakpoint_1)
6542 (maintenance_info_breakpoints, stopin_command, stopat_command)
6543 (delete_command, delete_trace_command, save_breakpoints)
6544 (save_breakpoints_command, save_tracepoints_command): Constify.
6545
3088cf40
TT
65462017-09-27 Tom Tromey <tom@tromey.com>
6547
6548 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6549 (skip_ws, extract_identifier, macro_define_command)
6550 (macro_undef_command, macro_list_command): Constify.
6551
69f476a3
TT
65522017-09-27 Tom Tromey <tom@tromey.com>
6553
6554 * infcmd.c (environment_info, set_environment_command)
6555 (unset_environment_command, path_info, info_proc_cmd_1)
6556 (info_proc_cmd_mappings, info_proc_cmd_stat)
6557 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6558 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6559
c4a3e68e
TT
65602017-09-27 Tom Tromey <tom@tromey.com>
6561
6562 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6563 Constify.
6564
c9d31bd6
TT
65652017-09-27 Tom Tromey <tom@tromey.com>
6566
6567 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6568
1f3f85eb
TT
65692017-09-27 Tom Tromey <tom@tromey.com>
6570
6571 * demangle.c (demangle_command): Constify.
6572
9c504b5d
TT
65732017-09-27 Tom Tromey <tom@tromey.com>
6574
6575 * progspace.c (maintenance_info_program_spaces_command):
6576 Constify.
6577
6663cf91
TT
65782017-09-27 Tom Tromey <tom@tromey.com>
6579
6580 * compile/compile.c (check_raw_argument, compile_file_command)
6581 (compile_code_command, compile_print_command): Constify.
6582
34e5fa26
TT
65832017-09-27 Tom Tromey <tom@tromey.com>
6584
6585 * reggroups.c (maintenance_print_reggroups): Constify.
6586
8384c356
TT
65872017-09-27 Tom Tromey <tom@tromey.com>
6588
6589 * dwarf2read.c (save_gdb_index_command): Constify.
6590
884beb0c
TT
65912017-09-27 Tom Tromey <tom@tromey.com>
6592
6593 * stap-probe.c (info_probes_stap_command): Constify.
6594
e0b2930c
TT
65952017-09-27 Tom Tromey <tom@tromey.com>
6596
6597 * fork-child.c (unset_exec_wrapper_command): Constify.
6598
f938677d
TT
65992017-09-27 Tom Tromey <tom@tromey.com>
6600
6601 * btrace.c (get_uint, get_context_size, no_chunk)
6602 (maint_btrace_packet_history_cmd)
6603 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6604 (maint_info_btrace_cmd): Constify.
6605
8949cb87
TT
66062017-09-27 Tom Tromey <tom@tromey.com>
6607
6608 * reverse.c (delete_bookmark_command): Constify.
6609
ac88e2de
TT
66102017-09-27 Tom Tromey <tom@tromey.com>
6611
6612 * remote.c (set_memory_packet_size)
6613 (set_memory_write_packet_size, show_memory_write_packet_size)
6614 (set_memory_read_packet_size, show_memory_read_packet_size)
6615 (compare_sections_command, packet_command, remote_put_command)
6616 (remote_get_command, remote_delete_command): Constify.
6617
bd4c9dfe
TT
66182017-09-27 Tom Tromey <tom@tromey.com>
6619
6620 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6621 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6622 (set_mipsfpu_auto_command): Constify.
6623
5e93d4c6
TT
66242017-09-27 Tom Tromey <tom@tromey.com>
6625
6626 * cli/cli-cmds.h (cd_command): Constify.
6627 * cli/cli-cmds.c (cd_command): Constify.
6628
fc41a75b
TT
66292017-09-27 Tom Tromey <tom@tromey.com>
6630
6631 * thread.c (thread_name_command, thread_find_command): Constify.
6632
67810076
TT
66332017-09-27 Tom Tromey <tom@tromey.com>
6634
6635 * probe.c (enable_probes_command, disable_probes_command):
6636 Constify.
6637
1d8b34a7
TT
66382017-09-27 Tom Tromey <tom@tromey.com>
6639
6640 * symfile.c (symbol_file_command): Constify.
6641 * gdbcore.h (deprecated_file_changed_hook): Constify.
6642 * exec.c (deprecated_file_changed_hook, exec_file_command)
6643 (file_command): Constify.
6644 * defs.h (symbol_file_command): Constify.
6645
442019e1
TT
66462017-09-27 Tom Tromey <tom@tromey.com>
6647
6648 * remote-fileio.c (set_system_call_allowed)
6649 (show_system_call_allowed): Constify.
6650
2983f7cb
TT
66512017-09-27 Tom Tromey <tom@tromey.com>
6652
6653 * tracepoint.c (delete_trace_variable_command)
6654 (tfind_end_command, tfind_start_command, tfind_pc_command)
6655 (tfind_tracepoint_command, tfind_line_command)
6656 (tfind_range_command, tfind_outside_command): Constify.
6657
4fd41b24
TT
66582017-09-27 Tom Tromey <tom@tromey.com>
6659
6660 * ax-gdb.c (maint_agent_printf_command, agent_command)
6661 (agent_eval_command): Constify.
6662
f2fc3015
TT
66632017-09-27 Tom Tromey <tom@tromey.com>
6664
6665 * tracepoint.c (info_scope_command): Constify.
6666 * python/python.c (gdbpy_decode_line): Constify.
6667 * python/py-breakpoint.c (bppy_init): Constify.
6668 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6669 * location.h: (new_linespec_location)
6670 (string_to_event_location_basic, string_to_event_location):
6671 Constify.
6672 * location.c (new_linespec_location)
6673 (string_to_event_location_basic, string_to_event_location):
6674 Constify.
6675 * linespec.h (decode_line_with_current_source)
6676 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6677 * linespec.c (linespec_lex_to_end)
6678 (decode_line_with_current_source)
6679 (decode_line_with_last_displayed): Constify.
6680 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6681 Constify.
6682 * cli/cli-cmds.c (edit_command, list_command): Constify.
6683 * breakpoint.h (until_break_command, watch_command_wrapper)
6684 (awatch_command_wrapper, rwatch_command_wrapper)
6685 (init_ada_exception_breakpoint): Constify.
6686 * breakpoint.c (break_command_1, dprintf_command)
6687 (break_range_command, watch_command_wrapper)
6688 (rwatch_command_wrapper, awatch_command_wrapper)
6689 (until_break_command, init_ada_exception_breakpoint)
6690 (strace_marker_create_sals_from_location, trace_command)
6691 (ftrace_command, strace_command, struct tracepoint): Constify.
6692 * ax-gdb.c (agent_command_1): Constify.
6693 * ada-lang.c (ada_exception_sal): Constify.
6694
8c2f95f4
TT
66952017-09-27 Tom Tromey <tom@tromey.com>
6696
6697 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6698 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6699 (get_context_size, no_chunk, get_insn_history_modifiers)
6700 (cmd_record_insn_history, get_call_history_modifiers)
6701 (cmd_record_call_history): Constify.
6702
a0d65762
TT
67032017-09-27 Tom Tromey <tom@tromey.com>
6704
6705 * source.c (show_substitute_path_command)
6706 (unset_substitute_path_command, set_substitute_path_command):
6707 Constify.
6708
58971144
TT
67092017-09-27 Tom Tromey <tom@tromey.com>
6710
6711 * typeprint.c (maintenance_print_type): Constify.
6712 * maint.c (maintenance_dump_me, maintenance_demangle)
6713 (maintenance_time_display, maintenance_info_sections)
6714 (maintenance_print_statistics, maintenance_deprecate)
6715 (maintenance_undeprecate): Constify.
6716 (maintenance_do_deprecate): Constify. Use std::string.
6717 (maintenance_selftest): Constify.
6718 * gdbtypes.h (maintenance_print_type): Constify.
6719
c482f52c
TT
67202017-09-27 Tom Tromey <tom@tromey.com>
6721
6722 * hppa-tdep.c (unwind_command): Constify.
6723
e100df1a
TT
67242017-09-27 Tom Tromey <tom@tromey.com>
6725
6726 * target-descriptions.c (unset_tdesc_filename_cmd)
6727 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6728 Constify.
6729
31d56ade
TT
67302017-09-27 Tom Tromey <tom@tromey.com>
6731
6732 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6733
b961da0b
TT
67342017-09-27 Tom Tromey <tom@tromey.com>
6735
6736 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6737
e2d8ae16
TT
67382017-09-27 Tom Tromey <tom@tromey.com>
6739
6740 * tui/tui-regs.c (tui_reg_command): Constify.
6741
863779b0
TT
67422017-09-27 Tom Tromey <tom@tromey.com>
6743
6744 * skip.c (skip_file_command, skip_function_command)
6745 (skip_enable_command, skip_disable_command, skip_delete_command):
6746 Constify.
6747
cdb34d4a
TT
67482017-09-27 Tom Tromey <tom@tromey.com>
6749
6750 * record-btrace.c (cmd_record_btrace_bts_start)
6751 (cmd_record_btrace_pt_start): Constify.
6752
e99c83e7
TT
67532017-09-27 Tom Tromey <tom@tromey.com>
6754
6755 * symmisc.c (maintenance_print_symbols)
6756 (maintenance_print_msymbols, maintenance_print_objfiles)
6757 (maintenance_info_symtabs, maintenance_check_symtabs)
6758 (maintenance_expand_symtabs, maintenance_info_line_tables):
6759 Constify.
6760
32faf971
TT
67612017-09-27 Tom Tromey <tom@tromey.com>
6762
6763 * top.c (new_ui_command): Constify.
6764
2cf311eb
TT
67652017-09-27 Tom Tromey <tom@tromey.com>
6766
6767 * symfile.c (add_symbol_file_command)
6768 (remove_symbol_file_command, list_overlays_command)
6769 (map_overlay_command, unmap_overlay_command)
6770 (overlay_auto_command, overlay_manual_command)
6771 (overlay_off_command, overlay_load_command): Constify.
6772
e6738699
TT
67732017-09-27 Tom Tromey <tom@tromey.com>
6774
6775 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6776 (info_spu_mailbox_command, info_spu_dma_command)
6777 (info_spu_proxydma_command): Constify.
6778
aa360cd5
TT
67792017-09-27 Tom Tromey <tom@tromey.com>
6780
6781 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6782
898241a5
TT
67832017-09-27 Tom Tromey <tom@tromey.com>
6784
6785 * cli/cli-script.c (user_defined_command): Constify.
6786
2d0ac106
TT
67872017-09-27 Tom Tromey <tom@tromey.com>
6788
6789 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6790 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6791 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6792 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6793 (dump_binary_value, append_binary_memory, append_binary_value):
6794 Constify.
6795 (struct dump_context) <func>: Constify.
6796 (add_dump_command): Update.
6797
dede02ce
TT
67982017-09-27 Tom Tromey <tom@tromey.com>
6799
6800 * cli/cli-cmds.c (show_version, show_configuration)
6801 (source_command, show_user): Constify.
6802
d3cb6b99
TT
68032017-09-27 Tom Tromey <tom@tromey.com>
6804
6805 * target.c (maintenance_print_target_stack): Constify.
6806
1970a12f
TT
68072017-09-27 Tom Tromey <tom@tromey.com>
6808
6809 * interps.c (interpreter_exec_cmd): Constify.
6810
41243651
TT
68112017-09-27 Tom Tromey <tom@tromey.com>
6812
6813 * record-full.c (cmd_record_full_restore): Constify.
6814
4465d9db
TT
68152017-09-27 Tom Tromey <tom@tromey.com>
6816
6817 * memattr.c (enable_mem_command, disable_mem_command)
6818 (delete_mem_command): Constify.
6819
ad25e423
TT
68202017-09-27 Tom Tromey <tom@tromey.com>
6821
6822 * value.c (show_convenience): Constify.
6823
d64097b1
TT
68242017-09-27 Tom Tromey <tom@tromey.com>
6825
6826 * gdbcore.h (core_file_command): Update.
6827 * corefile.c (core_file_command): Constify.
6828
4d4589ef
TT
68292017-09-27 Tom Tromey <tom@tromey.com>
6830
6831 * user-regs.c (maintenance_print_user_registers): Constify.
6832
32a7bf17
TT
68332017-09-27 Tom Tromey <tom@tromey.com>
6834
6835 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6836
4a475551
TT
68372017-09-27 Tom Tromey <tom@tromey.com>
6838
6839 * cp-support.c (first_component_command): Constify.
6840
990b9f9f
TT
68412017-09-27 Tom Tromey <tom@tromey.com>
6842
6843 * psymtab.c (maintenance_print_psymbols)
6844 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6845 Constify.
6846
c281872e
TT
68472017-09-27 Tom Tromey <tom@tromey.com>
6848
6849 * windows-tdep.c (display_tib): Constify.
6850
5b64bf74
TT
68512017-09-27 Tom Tromey <tom@tromey.com>
6852
6853 * linux-fork.c (delete_checkpoint_command)
6854 (detach_checkpoint_command): Constify.
6855
4ada038f
TT
68562017-09-27 Tom Tromey <tom@tromey.com>
6857
6858 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6859
57f5a81b
TT
68602017-09-27 Tom Tromey <tom@tromey.com>
6861
6862 * arc-tdep.c (dump_arc_instruction_command): Constify.
6863
b0a8e6c4
TT
68642017-09-27 Tom Tromey <tom@tromey.com>
6865
6866 * valprint.c (set_radix, show_radix): Constify.
6867
8d97dc1c
TT
68682017-09-27 Tom Tromey <tom@tromey.com>
6869
6870 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6871
eb7c454d
TT
68722017-09-27 Tom Tromey <tom@tromey.com>
6873
6874 * command.h (not_just_help_class_command): Update.
6875 * cli/cli-decode.h (not_just_help_class_command): Update.
6876 * cli/cli-decode.c (not_just_help_class_command): Constify.
6877
e4e33335
TT
68782017-09-27 Tom Tromey <tom@tromey.com>
6879
6880 * gdb_bfd.c (maintenance_info_bfds): Constify.
6881
0450cc4c
TT
68822017-09-27 Tom Tromey <tom@tromey.com>
6883
6884 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6885 overloads.
6886 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6887 (do_const_cfunc): New function.
6888 (cmd_cfunc_eq): New overload.
6889 (cli_user_command_p): Check do_const_cfunc.
6890 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6891 const_cfunc.
6892 * command.h (add_cmd): Add const overload and no-function
6893 overload.
6894 (set_cmd_cfunc): Add const overload.
6895 (cmd_const_cfunc_ftype): Declare.
6896 (cmd_cfunc_eq): Add const overload.
6897 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6898 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6899 overload.
6900
a9bbfbd8
TT
69012017-09-27 Tom Tromey <tom@tromey.com>
6902
6903 * macroexp.c (get_next_token_for_substitution): New function.
6904 (substitute_args): Call it. Check for __VA_OPT__.
6905
5230b05a
WT
69062017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6907 Pedro Alves <palves@redhat.com>
6908
6909 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6910 producer_is_icc_lt_14.
6911 (producer_is_icc_lt_14): New function.
6912 (check_producer): Add code for checking version of ICC.
6913 (producer_is_icc): Move to producer.c.
6914 (read_structure_type): Restrict ICC workaround to ICC<14.
6915 * producer.c: Include selftest.h.
6916 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6917 New functions.
6918 * producer.h (producer_is_icc): New declaration.
6919
b32b108a
WT
69202017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6921
6922 * Makefile.in (SFILES): Add producer.c.
6923 (COMMON_OBS): Add producer.o
6924 * amd64-tdep.c (producer.h): Add new include.
6925 * dwarf2read.c (producer.h): Add new include.
6926 * producer.c: New file.
6927 * producer.h: New file.
6928 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6929 producer.c.
6930 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6931 producer.h.
6932
5007d765
MK
69332017-09-26 Matthias Klose <doko@ubuntu.com>
6934
6935 * configure.ac: Search ncursesw before ncurses.
6936 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6937 * gdb_curses.h: Include <ncursesw/ncurses.h>
6938 * config.in, configure: Regenerate.
6939
281c4447
RO
69402017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6941
6942 PR gdb/22185
6943 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6944 obsolete.
6945 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6946 Remove i386sol2 support.
6947 * configure.nat <i386sol2>: Remove.
6948 <sol2-64>: Fold into ...
6949 <sol2>: ... this.
6950 Move common settings to default section.
6951 Add sol-thread.o.
6952 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6953 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6954 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6955 <i[34567]86-*-solaris*>: Remove.
6956 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6957
6958 * configure.ac: Remove wctype in libw check.
6959 (_MSE_INT_H): Don't define on Solaris 7-9.
6960 <solaris*>: Remove libthread_db.so.1 check.
6961 * configure: Regenerate.
6962 * config.in: Regenerate.
6963
6964 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6965 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6966 (gdb_ps_size_t): Remove.
6967 Use base types in users.
6968 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6969
6970 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6971
39b06c20
RO
69722017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6973
6974 PR build/22206
6975 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6976 (adi_is_addr_mapped): Likewise.
6977 (PSR_ICC): Don't redefine.
6978 (PSR_IMPL): Likewise.
6979
6c3e20f1
TT
69802017-09-25 Tom Tromey <tom@tromey.com>
6981
6982 * regcache.c (regcache::dump): Use string_printf.
6983
b292235f
TT
69842017-09-25 Tom Tromey <tom@tromey.com>
6985
6986 * regcache.c (class regcache_invalidator): New.
6987 (struct register_to_invalidate): Remove.
6988 (make_cleanup_regcache_invalidate): Remove.
6989 (regcache::raw_write): Use regcache_invalidator.
6990
9ac86b52
TT
69912017-09-25 Tom Tromey <tom@tromey.com>
6992
6993 * spu-tdep.c (spu2ppu_sniffer): Update.
6994 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6995 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6996 Remove.
6997 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6998 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6999 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
7000 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
7001 (frame_pop): Update.
7002
c0e383c6
TT
70032017-09-25 Tom Tromey <tom@tromey.com>
7004
7005 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
7006 * regcache.h (regcache_xfree): Don't declare.
7007 * regcache.c (regcache_xfree): Remove.
7008 (do_regcache_xfree): Use delete.
7009 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
7010 * linux-fork.c (free_fork): Use delete.
7011 (fork_save_infrun_state): Likewise.
7012 * jit.c (jit_dealloc_cache): Use delete.
7013 * infrun.c (discard_infcall_suspend_state): Use delete.
7014
791199cc
TT
70152017-09-25 Tom Tromey <tom@tromey.com>
7016
7017 * regcache.h (regcache_xmalloc): Don't declare.
7018 (regcache_raw_set_cached_value): Update comment.
7019 * regcache.c (regcache_xmalloc): Remove.
7020 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
7021 * jit.c (jit_frame_sniffer): Use new.
7022 * frame.c (frame_save_as_regcache): Use new.
7023
289e23aa
AA
70242017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7025
7026 * NEWS: Advertise support for guarded-storage registers on IBM z.
7027
1b63490c
AA
70282017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7029
7030 * s390-linux-nat.c (have_regset_gs): New static variable.
7031 (s390_linux_fetch_inferior_registers): Handle guarded-storage
7032 control block and guarded-storage broadcast control regsets.
7033 (s390_read_description): Detect whether the target has
7034 guarded-storage support, return appropriate tdesc.
7035 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
7036 (features/s390x-gs-linux64.c): Likewise.
7037 (struct gdbarch_tdep) <have_gs>: New field.
7038 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
7039 (s390_gsbc_regset): New variables.
7040 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
7041 and s390_gsbc_regset, if applicable.
7042 (s390_core_read_description): Check whether core file was from a
7043 target with guarded-storage support; include appropriate regsets.
7044 (s390_gdbarch_init): Add registers for guarded-storage support.
7045 (_initialize_s390_tdep): Initialize new target descriptions that
7046 include registers for guarded-storage support.
7047 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
7048 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
7049 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
7050 (S390_NUM_REGS): Adjust macro definition.
7051 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
7052 (tdesc_s390x_gs_linux64): New declarations.
7053
96235dc1
AA
70542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7055
7056 * features/s390-gs-linux64.xml: New file.
7057 * features/s390-gs.xml: New file.
7058 * features/s390-gsbc.xml: New file.
7059 * features/s390x-gs-linux64.xml: New file.
7060 * features/Makefile (WHICH): Add s390-gs-linux64 and
7061 s390x-gs-linux64.
7062 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
7063 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
7064 * features/s390-gs-linux64.c: New generated file.
7065 * features/s390x-gs-linux64.c: New file.
7066 * regformats/s390-gs-linux64.dat: New file.
7067 * regformats/s390x-gs-linux64.dat: New file.
7068
b4a7c699
TT
70692017-09-23 Tom Tromey <tom@tromey.com>
7070
7071 * defs.h (make_cleanup_override_quit_handler): Don't declare.
7072
c2f97536
TT
70732017-09-22 Tom Tromey <tom@tromey.com>
7074
7075 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
7076 type to scoped_restore_tmpl.
7077 <scoped_input_handler>: Initialize m_quit_handler directly.
7078
43573013
SDJ
70792017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7080
7081 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
7082 (cd_command): Likewise. Free "current_directory" before
7083 assigning to it.
7084 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7085 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
7086 * top.c (gdb_dirbuf): Remove global declaration.
7087 * top.h (gdb_dirbuf): Likewise.
7088
6ec2e0f5
SDJ
70892017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7090
7091 * gnulib/aclocal.m4: Regenerate.
7092 * gnulib/config.in: Regenerate.
7093 * gnulib/configure: Regenerate.
7094 * gnulib/import/Makefile.am: Regenerate.
7095 * gnulib/import/Makefile.in: Regenerate.
7096 * gnulib/import/assure.h: New file.
7097 * gnulib/import/at-func.c: Likewise
7098 * gnulib/import/chdir-long.c: New file.
7099 * gnulib/import/chdir-long.h: New file.
7100 * gnulib/import/cloexec.c: New file.
7101 * gnulib/import/cloexec.h: New file.
7102 * gnulib/import/close.c: New file.
7103 * gnulib/import/closedir.c: New file.
7104 * gnulib/import/dirent-private.h: New file.
7105 * gnulib/import/dup-safer.c: New file.
7106 * gnulib/import/dup.c: New file.
7107 * gnulib/import/dup2.c: New file.
7108 * gnulib/import/error.c: New file.
7109 * gnulib/import/error.h: New file.
7110 * gnulib/import/exitfail.c: New file.
7111 * gnulib/import/exitfail.h: New file.
7112 * gnulib/import/fchdir.c: New file.
7113 * gnulib/import/fcntl.c: New file.
7114 * gnulib/import/fcntl.in.h: New file.
7115 * gnulib/import/fd-hook.c: New file.
7116 * gnulib/import/fd-hook.h: New file.
7117 * gnulib/import/fd-safer.c: New file.
7118 * gnulib/import/fdopendir.c: New file.
7119 * gnulib/import/filename.h: New file.
7120 * gnulib/import/filenamecat-lgpl.c: New file.
7121 * gnulib/import/filenamecat.h: New file.
7122 * gnulib/import/fstat.c: New file.
7123 * gnulib/import/fstatat.c: New file.
7124 * gnulib/import/getcwd-lgpl.c: New file.
7125 * gnulib/import/getcwd.c: New file.
7126 * gnulib/import/getdtablesize.c: New file.
7127 * gnulib/import/getlogin_r.c: New file.
7128 * gnulib/import/getprogname.c: New file.
7129 * gnulib/import/getprogname.h: New file.
7130 * gnulib/import/gettext.h: New file.
7131 * gnulib/import/glob-libc.h: New file.
7132 * gnulib/import/glob.c: New file.
7133 * gnulib/import/glob.in.h: New file.
7134 * gnulib/import/intprops.h: New file.
7135 * gnulib/import/m4/chdir-long.m4: New file.
7136 * gnulib/import/m4/close.m4: New file.
7137 * gnulib/import/m4/closedir.m4: New file.
7138 * gnulib/import/m4/d-ino.m4: New file.
7139 * gnulib/import/m4/d-type.m4: New file.
7140 * gnulib/import/m4/dup.m4: New file.
7141 * gnulib/import/m4/dup2.m4: New file.
7142 * gnulib/import/m4/error.m4: New file.
7143 * gnulib/import/m4/fchdir.m4: New file.
7144 * gnulib/import/m4/fcntl.m4: New file.
7145 * gnulib/import/m4/fcntl_h.m4: New file.
7146 * gnulib/import/m4/fdopendir.m4: New file.
7147 * gnulib/import/m4/filenamecat.m4: New file.
7148 * gnulib/import/m4/fstat.m4: New file.
7149 * gnulib/import/m4/fstatat.m4: New file.
7150 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7151 * gnulib/import/m4/getcwd-path-max.m4: New file.
7152 * gnulib/import/m4/getcwd.m4: New file.
7153 * gnulib/import/m4/getdtablesize.m4: New file.
7154 * gnulib/import/m4/getlogin_r.m4: New file.
7155 * gnulib/import/m4/getprogname.m4: New file.
7156 * gnulib/import/m4/glob.m4: New file.
7157 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7158 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7159 * gnulib/import/m4/mempcpy.m4: New file.
7160 * gnulib/import/m4/memrchr.m4: New file.
7161 * gnulib/import/m4/mode_t.m4: New file.
7162 * gnulib/import/m4/msvc-inval.m4: New file.
7163 * gnulib/import/m4/msvc-nothrow.m4: New file.
7164 * gnulib/import/m4/open.m4: New file.
7165 * gnulib/import/m4/openat.m4: New file.
7166 * gnulib/import/m4/opendir.m4: New file.
7167 * gnulib/import/m4/readdir.m4: New file.
7168 * gnulib/import/m4/realloc.m4: New file.
7169 * gnulib/import/m4/rewinddir.m4: New file.
7170 * gnulib/import/m4/save-cwd.m4: New file.
7171 * gnulib/import/m4/strdup.m4: New file.
7172 * gnulib/import/m4/strerror.m4: New file.
7173 * gnulib/import/m4/unistd-safer.m4: New file.
7174 * gnulib/import/mempcpy.c: New file.
7175 * gnulib/import/memrchr.c: New file.
7176 * gnulib/import/msvc-inval.c: New file.
7177 * gnulib/import/msvc-inval.h: New file.
7178 * gnulib/import/msvc-nothrow.c: New file.
7179 * gnulib/import/msvc-nothrow.h: New file.
7180 * gnulib/import/open.c: New file.
7181 * gnulib/import/openat-die.c: New file.
7182 * gnulib/import/openat-priv.h: New file.
7183 * gnulib/import/openat-proc.c: New file.
7184 * gnulib/import/openat.c: New file.
7185 * gnulib/import/openat.h: New file.
7186 * gnulib/import/opendir.c: New file.
7187 * gnulib/import/pipe-safer.c: New file.
7188 * gnulib/import/readdir.c: New file.
7189 * gnulib/import/realloc.c: New file.
7190 * gnulib/import/rewinddir.c: New file.
7191 * gnulib/import/save-cwd.c: New file.
7192 * gnulib/import/save-cwd.h: New file.
7193 * gnulib/import/strdup.c: New file.
7194 * gnulib/import/strerror-override.c: New file.
7195 * gnulib/import/strerror-override.h: New file.
7196 * gnulib/import/strerror.c: New file.
7197 * gnulib/import/unistd--.h: New file.
7198 * gnulib/import/unistd-safer.h: New file.
7199 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7200 "getcwd" and "glob".
7201 * ser-tcp.c: Undefine "close" before redefining it.
7202
432ae719
SM
72032017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7204
7205 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7206 get rid of res_val.
7207
4fa7574e
RO
72082017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7209
7210 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7211 <sol2,sparc>: Likewise.
7212 <sol2-64,i386>: Likewise.
7213
7214 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7215 -Wdeprecated-declarations on *-*-solaris*.
7216 * configure: Regenerate.
7217
7218 * procfs.c: Include "nat/inferior.h".
7219 (procfs_info_proc): Fix typo.
7220
f6327dcb
KB
72212017-09-21 Kevin Buettner <kevinb@redhat.com>
7222
7223 * remote.c (vector): Include.
7224 (struct private_thread_info): Add field, thread_handle.
7225 (free_private_thread_info): Deallocate storage associated with
7226 thread handle.
7227 (get_private_info_thread): Initialize `thread_handle' field.
7228 (struct thread_item): Add field, thread_handle.
7229 (clear_threads_listing_context): Deallocate storage associated
7230 with thread handle.
7231 (start_thread): Add support for "handle" attribute.
7232 (thread_attributes): Add "handle".
7233 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7234 field.
7235 (remote_update_thread_list): Update thread_handle.
7236 (remote_thread_handle_to_thread_info): New function.
7237 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7238
fbbe5337
KB
72392017-09-21 Kevin Buettner <kevinb@redhat.com>
7240
7241 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7242 function.
7243 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7244 * python/python-internal.h (thread_object_type): Declare.
7245
e04ee09e
KB
72462017-09-21 Kevin Buettner <kevinb@redhat.com>
7247
7248 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7249 (target_thread_handle_to_thread_info): Declare.
7250 * target.c (target_thread_handle_to_thread_info): New function.
7251 * target-delegates.c: Regenerate.
7252 * gdbthread.h (find_thread_by_handle): Declare.
7253 * thread.c (find_thread_by_handle): New function.
7254 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7255 function.
7256 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7257
1e5b66ed
SM
72582017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7259
7260 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7261
ebe48ba0
SM
72622017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7263
7264 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7265
0a0bf5dc
YQ
72662017-09-21 Yao Qi <yao.qi@linaro.org>
7267
7268 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7269 to gdb_target_obs.
7270
d1b0a7bf
TT
72712017-09-20 Tom Tromey <tom@tromey.com>
7272
7273 * breakpoint.c (struct counted_command_line): Remove.
7274 (breakpoint_commands): Update.
7275 (alloc_counted_command_line, incref_counted_command_line)
7276 (decref_counted_command_line, do_cleanup_counted_command_line)
7277 (make_cleanup_decref_counted_command_line): Remove.
7278 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7279 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7280 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7281 (save_breakpoints): Update.
7282 * breakpoint.h (counted_command_line): Now a typedef to
7283 shared_ptr.
7284 (struct breakpoint) <commands>: Now a counted_command_line.
7285 (struct bpstats) <command>: Likewise.
7286
48649e1b
TT
72872017-09-20 Tom Tromey <tom@tromey.com>
7288
7289 * breakpoint.c (struct commands_info, do_map_commands_command):
7290 Remove.
7291 (commands_command_1): Update.
7292 (iterate_over_related_breakpoints): Take a function_view.
7293 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7294 (delete_command): Update.
7295 (map_breakpoint_numbers): Take a function_view.
7296 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7297 (disable_command): Update.
7298 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7299 (enable_command): Update.
7300 (struct disp_data, do_enable_breakpoint_disp)
7301 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7302 (do_map_enable_delete_breakpoint): Remove.
7303 (enable_once_command, enable_count_command, enable_delete_command)
7304 (delete_trace_variable_command): Update.
7305
04afa70c
TT
73062017-09-20 Tom Tromey <tom@tromey.com>
7307
7308 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7309 (bpstat_clear): Use delete.
7310 (bpstats): New constructors.
7311 (bpstat_copy, bpstat_stop_status): Use new.
7312 (dprintf_after_condition_true): Update.
7313 * breakpoint.h (bpstats::bpstats): Add constructors.
7314 (bpstats::~bpstats): Add destructor.
7315
c83833f4
PA
73162017-09-20 Pedro Alves <palves@redhat.com>
7317
7318 * eval.c (make_params): Delete, refactored as ...
7319 (class fake_method): ... this new type's ctor.
7320 (fake_method::~fake_method): New.
7321 (evaluate_subexp_standard): Use 'fake_method'.
7322
223ffa71
TT
73232017-09-20 Tom Tromey <tom@tromey.com>
7324
7325 * windows-nat.c (get_windows_debug_event, windows_wait)
7326 (do_initial_windows_stuff, windows_attach): Update.
7327 * utils.c (vwarning, internal_vproblem): Update.
7328 (ui_unregister_input_event_handler_cleanup)
7329 (prepare_to_handle_input): Remove.
7330 (class scoped_input_handler): New.
7331 (defaulted_query, prompt_for_continue): Update.
7332 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7333 Update.
7334 * top.c (undo_terminal_modifications_before_exit): Update.
7335 * target/target.h (target_terminal_init, target_terminal_inferior)
7336 (target_terminal_ours): Don't declare.
7337 (class target_terminal): New.
7338 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7339 (target_terminal_ours_for_output)
7340 (make_cleanup_restore_target_terminal): Don't declare.
7341 (target_terminal_info): Remove.
7342 * target.c (enum terminal_state, terminal_state): Remove.
7343 (target_terminal::terminal_state): Define.
7344 (target_terminal::init): Rename from target_terminal_init.
7345 (target_terminal::inferior): Rename from
7346 target_terminal_inferior.
7347 (target_terminal::ours): Rename from target_terminal_ours.
7348 (target_terminal::ours_for_output): Rename from
7349 target_terminal_ours_for_output.
7350 (target_terminal::info): New method.
7351 (cleanup_restore_target_terminal)
7352 (make_cleanup_restore_target_terminal): Remove.
7353 * solib.c (handle_solib_event): Update.
7354 * remote.c (remote_serial_quit_handler): Update.
7355 (remote_terminal_inferior, remote_wait_as): Update.
7356 * record-full.c (record_full_wait_1): Update.
7357 * nto-procfs.c (procfs_create_inferior): Update.
7358 * nat/fork-inferior.c (startup_inferior): Update.
7359 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7360 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7361 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7362 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7363 (mi_breakpoint_created, mi_breakpoint_deleted)
7364 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7365 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7366 (mi_user_selected_context_changed, report_initial_inferior):
7367 Update.
7368 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7369 (linux_nat_terminal_inferior): Update.
7370 * infrun.c (follow_fork_inferior)
7371 (handle_vfork_child_exec_or_exit, do_target_resume)
7372 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7373 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7374 Update.
7375 * inflow.c (child_terminal_init, info_terminal_command): Update.
7376 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7377 (attach_command): Update.
7378 * infcall.c (call_thread_fsm_should_stop): Update.
7379 * gnu-nat.c (gnu_attach): Update.
7380 * extension.c (struct active_ext_lang_state)
7381 (restore_active_ext_lang): Update.
7382 * exceptions.c (print_flush): Update.
7383 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7384 (struct quit_handler_cleanup_data, restore_quit_handler)
7385 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7386 Remove.
7387 * cp-support.c (gdb_demangle): Update.
7388 * breakpoint.c (update_inserted_breakpoint_locations)
7389 (insert_breakpoint_locations, handle_jit_event)
7390 (disable_breakpoints_in_unloaded_shlib): Update.
7391 * annotate.c (annotate_breakpoints_invalid)
7392 (annotate_frames_invalid): Update.
7393
013af3fc
TT
73942017-09-20 Tom Tromey <tom@tromey.com>
7395
7396 * main.c (catch_command_errors): Rename from
7397 catch_command_errors_const.
7398 (captured_main_1): Update.
7399
06871ae8
PA
74002017-09-20 Pedro Alves <palves@redhat.com>
7401
7402 * cli/cli-cmds.c (list_command): Use print_sal_location.
7403 (print_sal_location): New function.
7404 (ambiguous_line_spec): Use print_sal_location.
7405 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7406 * symtab.c (find_function_start_sal): Likewise.
7407 * symtab.h (symtab_and_line::symbol): New field.
7408
e5f25bc5
PA
74092017-09-20 Pedro Alves <palves@redhat.com>
7410
7411 * linespec.c (minsym_found): Handle non-text minsyms.
7412 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7413
1b7fa39e
WT
74142017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7415
7416 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7417 backslash.
7418
37dd0825
WT
74192017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7420
7421 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7422 vmovups instead vmovaps.
7423 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7424
4e5a4f58
JB
74252017-09-19 John Baldwin <jhb@FreeBSD.org>
7426
7427 * NEWS (Changes since GDB 8.0): Add starti.
7428 * infcmd.c (enum run_break): New.
7429 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7430 case.
7431 (run_command): Use enum run_how.
7432 (start_command): Likewise.
7433 (starti_command): New function.
7434 (RUN_ARGS_HELP): New macro.
7435 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7436 commands. Add starti command.
7437
aa70c9f1
YQ
74382017-09-19 Yao Qi <yao.qi@linaro.org>
7439
7440 * Makefile.in (monitor.o): Remove the rule.
7441
d6541620
YQ
74422017-09-19 Yao Qi <yao.qi@linaro.org>
7443
7444 * annotate.h (struct annotate_arg_emitter): Use
7445 DISABLE_COPY_AND_ASSIGN.
7446 * common/refcounted-object.h (refcounted_object): Likewise.
7447 * completer.h (struct completion_result): Likewise.
7448 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7449 * filename-seen-cache.h (filename_seen_cache): Likewise.
7450 * gdbcore.h (thread_section_name): Likewise.
7451 * gdb_regex.h (compiled_regex): Likewise.
7452 * gdbthread.h (scoped_restore_current_thread): Likewise.
7453 * inferior.h (scoped_restore_current_inferior): Likewise.
7454 * jit.c (jit_reader): Likewise.
7455 * linespec.h (struct linespec_result): Likewise.
7456 * mi/mi-parse.h (struct mi_parse): Likewise.
7457 * nat/fork-inferior.c (execv_argv): Likewise.
7458 * progspace.h (scoped_restore_current_program_space): Likewise.
7459 * python/python-internal.h (class gdbpy_enter): Likewise.
7460 * regcache.h (regcache): Likewise.
7461 * target-descriptions.c (struct tdesc_reg): Likewise.
7462 (struct tdesc_type): Likewise.
7463 (struct tdesc_feature): Likewise.
7464 * ui-out.h (ui_out_emit_type): Likewise.
7465
0615127c
SM
74662017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7467
7468 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7469 label abort_expression.
7470
5e187554
SM
74712017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7472
7473 * common/buffer.c (buffer_xml_printf): Adjust.
7474 * common/xml-utils.c (xml_escape_text): Change return type to
7475 std::string, update code accordingly.
7476 * common/xml-utils.h (xml_escape_text): Change return type to
7477 std::string.
7478 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7479 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7480 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7481 Adjust.
7482
c3d7b541
SM
74832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7484
7485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7486 (SUBDIR_UNITTESTS_OBS): Add new object file.
7487 * unittests/xml-utils-selftests.c: New file.
7488
1526853e
SM
74892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7490
7491 * common/selftest.h (selftest): New struct/interface.
7492 (register_test): Add name parameter, add new overload.
7493 (run_tests): Add filter parameter.
7494 (for_each_selftest_ftype): New typedef.
7495 (for_each_selftest): New declaration.
7496 * common/selftest.c (tests): Change type to
7497 map<string, unique_ptr<selftest>>.
7498 (simple_selftest): New struct.
7499 (register_test): New function.
7500 (register_test): Add name parameter and use it.
7501 (run_tests): Add filter parameter and use it. Add prints.
7502 Adjust to vector -> map change.
7503 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7504 registering selftests.
7505 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7506 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7507 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7508 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7509 * findvar.c (_initialize_findvar): Likewise.
7510 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7511 * maint.c (maintenance_selftest): Update call to run_tests.
7512 (maintenance_info_selftests): New function.
7513 (_initialize_maint_cmds): Register "maintenance info selftests"
7514 command. Update "maintenance selftest" doc.
7515 * regcache.c (_initialize_regcache): Add names when registering
7516 selftests.
7517 * rust-exp.y (_initialize_rust_exp): Likewise.
7518 * selftest-arch.c (gdbarch_selftest): New struct.
7519 (gdbarch_tests): Remove.
7520 (register_test_foreach_arch): Add name parameter. Call
7521 register_test.
7522 (tests_with_arch): Remove, move most content to
7523 gdbarch_selftest::operator().
7524 (_initialize_selftests_foreach_arch): Remove.
7525 * selftest-arch.h (register_test_foreach_arch): Add name
7526 parameter.
7527 (run_tests_with_arch): New declaration.
7528 * utils-selftests.c (_initialize_utils_selftests): Add names
7529 when registering selftests.
7530 * utils.c (_initialize_utils): Likewise.
7531 * unittests/array-view-selftests.c
7532 (_initialize_array_view_selftests): Likewise.
7533 * unittests/environ-selftests.c (_initialize_environ_selftests):
7534 Likewise.
7535 * unittests/function-view-selftests.c
7536 (_initialize_function_view_selftests): Likewise.
7537 * unittests/offset-type-selftests.c
7538 (_initialize_offset_type_selftests): Likewise.
7539 * unittests/optional-selftests.c
7540 (_initialize_optional_selftests): Likewise.
7541 * unittests/scoped_restore-selftests.c
7542 (_initialize_scoped_restore_selftests): Likewise.
7543 * NEWS: Document "maintenance selftest" and "maint info
7544 selftests".
7545
5846367a
SM
75462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7547
7548 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7549 scoped_restore.
7550
bd77e8ff
SM
75512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7552
7553 * mi/mi-main.c (mi_load_progress): Make uiout variable
7554 a unique_ptr.
7555
26a67918
PA
75562017-09-15 Pedro Alves <palves@redhat.com>
7557
7558 * compile/compile-c-types.c (convert_enum, convert_int)
7559 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7560
3f8a7804
SM
75612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7562
7563 * dwarf2read.c (copy_string): Remove.
7564 (parse_macro_definition): Replace copy_string with savestring.
7565
8d200706
YQ
75662017-09-15 Yao Qi <yao.qi@linaro.org>
7567
7568 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7569 gdb_target_obs.
7570 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7571 Likewise.
7572 (i[34567]86-*-linux*): Likewise.
7573
d185219d
SM
75742017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7575
7576 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7577 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7578 <stack>: Change type to std::vector.
7579 <stack_len, stack_allocated>: Remove.
7580 <grow_stack>: Remove.
7581 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7582 (dwarf_expr_context::~dwarf_expr_context): Remove.
7583 (dwarf_expr_context::grow_stack): Remove.
7584 (dwarf_expr_context::push): Adjust.
7585 (dwarf_expr_context::pop): Adjust.
7586 (dwarf_expr_context::fetch): Adjust.
7587 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7588 (dwarf_expr_context::stack_empty_p): Adjust.
7589 (dwarf_expr_context::execute_stack_op): Adjust.
7590
eccd80d6
SM
75912017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7594 return type to bool.
7595 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7596
69009882
SM
75972017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7598
7599 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7600 Change type to bool.
7601 (dwarf_stack_value) <in_stack_memory>: Likewise.
7602 (dwarf_expr_context) <push_address>: Change parameter type to
7603 bool.
7604 <fetch_in_stack_memory>: Change return type to bool.
7605 <push>: Change parameter type to bool.
7606 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7607 to bool.
7608 (dwarf_expr_context::push_address): Likewise.
7609 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7610 to bool.
7611 (dwarf_expr_context::execute_stack_op): Adjust.
7612 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7613
1e467161
SM
76142017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7615
7616 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7617 (struct dwarf_expr_context) <n_pieces>: Remove.
7618 <pieces>: Change type to std::vector.
7619 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7620 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7621 pieces.
7622 (dwarf_expr_context::add_piece): Adjust.
7623 * dwarf2loc.c (struct piece_closure): Initialize fields.
7624 <n_pieces>: Remove.
7625 <pieces>: Change type to std::vector.
7626 (allocate_piece_closure): Adjust, change parameter to
7627 std::vector rvalue and std::move it to piece_closure.
7628 (rw_pieced_value): Adjust.
7629 (check_pieced_synthetic_pointer): Adjust.
7630 (indirect_synthetic_pointer): Adjust.
7631 (coerce_pieced_ref): Adjust.
7632 (free_pieced_value_closure): Adjust. Use delete to free
7633 piece_closure.
7634 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7635 to allocate_piece_closure.
7636 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7637
0782db84
SM
76382017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7639
7640 * probe.h (probe_ops_cp): Remove typedef.
7641 (DEF_VEC_P (probe_ops_cp)): Remove.
7642 (all_probe_ops): Change type to std::vector.
7643 * probe.c (info_probes_for_ops): Adjust to vector change.
7644 (probe_linespec_to_ops): Likewise.
7645 (all_probe_ops): Change type to std::vector.
7646 (_initialize_probe): Adjust to vector change.
7647 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7648 * elfread.c (elf_get_probes): Likewise.
7649 * stap-probe.c (_initialize_stap_probe): Likewise.
7650
1eac6bea
SM
76512017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7652
7653 * probe.h (struct bound_probe): Define constructors.
7654 * probe.c (bound_probe_s): Remove typedef.
7655 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7656 (collect_probes): Change return type to std::vector, remove
7657 cleanup.
7658 (compare_probes): Return bool, change parameter type. Change
7659 semantic to "less than".
7660 (gen_ui_out_table_header_info): Change parameter to std::vector
7661 and update.
7662 (exists_probe_with_pops): Likewise.
7663 (info_probes_for_ops): Update to std::vector change.
7664 (enable_probes_command): Likewise.
7665 (disable_probes_command): Likewise.
7666
aaa63a31
SM
76672017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7668
7669 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7670 vec to std::vector.
7671 * probe.c (parse_probes_in_pspace): Update.
7672 (find_probes_in_objfile): Update.
7673 (find_probe_by_pc): Update.
7674 (collect_probes): Update.
7675 (probe_any_get_probes): Update.
7676 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7677 return type to reference to std::vector.
7678 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7679 std::vector and update.
7680 (dtrace_process_dof): Likewise.
7681 (dtrace_get_probes): Likewise.
7682 * elfread.c (elf_get_probes): Change return type to std::vector,
7683 store an std::vector in bfd_data.
7684 (probe_key_free): Update to std::vector.
7685 * stap-probe.c (handle_stap_probe): Change parameter to
7686 std::vector and update.
7687 (stap_get_probes): Likewise.
7688 * symfile-debug.c (debug_sym_get_probes): Change return type to
7689 std::vector and update.
7690
cb85b21b
TT
76912017-09-11 Tom Tromey <tom@tromey.com>
7692
7693 * breakpoint.c (program_breakpoint_here_p): Update.
7694 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7695 from make_show_memory_breakpoints_cleanup. Return a
7696 scoped_restore_tmpl<int>.
7697 (restore_show_memory_breakpoints): Remove.
7698 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7699 * mem-break.c (memory_validate_breakpoint): Update.
7700 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7701 (ia64_memory_remove_breakpoint): Update.
7702 (ia64_breakpoint_from_pc): Update.
7703 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7704 from make_show_memory_breakpoints_cleanup.
7705
8fbc99ef
TT
77062017-09-11 Tom Tromey <tom@tromey.com>
7707
7708 * d-namespace.c (d_lookup_symbol): Use std::string.
7709 (find_symbol_in_baseclass): Likewise.
7710
50feb4bd
TT
77112017-09-11 Tom Tromey <tom@tromey.com>
7712
7713 * ctf.c (ctf_start): Use std::string.
7714
c6dc63a1
TT
77152017-09-11 Tom Tromey <tom@tromey.com>
7716
7717 * ada-lang.c (is_known_support_routine): Update.
7718 (ada_unhandled_exception_name_addr_from_raise): Update.
7719 * guile/scm-frame.c (gdbscm_frame_name): Update.
7720 * python/py-frame.c (frapy_name): Update.
7721 (frapy_function): Update.
7722 * stack.h (find_frame_funname): Update.
7723 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7724 (print_frame): Update.
7725
d6b9b80f
TT
77262017-09-11 Tom Tromey <tom@tromey.com>
7727
7728 * findcmd.c (put_bits): Take a gdb::byte_vector.
7729 (parse_find_args): Return gdb::byte_vector. "args" now const.
7730 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7731 cleanups.
7732 (find_command): Update.
7733
a9921622
TT
77342017-09-11 Tom Tromey <tom@tromey.com>
7735
7736 * cli/cli-script.c (class scoped_restore_hook_in): New.
7737 (clear_hook_in_cleanup): Remove.
7738 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7739 scoped_restore_hook_in.
7740
be0d7abb
TT
77412017-09-11 Tom Tromey <tom@tromey.com>
7742
7743 * cli/cli-script.c (restore_interp): Remove.
7744 (read_command_lines): Use scoped_restore_interp.
7745 * interps.c (scoped_restore_interp::set_temp): Rename from
7746 interp_set_temp.
7747 * interps.h (class scoped_restore_interp): New.
7748 (interp_set_temp): Remove.
7749
00f675ff
TT
77502017-09-11 Tom Tromey <tom@tromey.com>
7751
7752 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7753 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7754 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7755 scoped_restore.
7756 (mi_cmd_break_insert_1): Update.
7757 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7758 scoped_restore.
7759
cb791d59
TT
77602017-09-11 Tom Tromey <tom@tromey.com>
7761
7762 * demangle.c (demangle_command): Update.
7763 * breakpoint.c (disable_command): Update.
7764 (enable_command): Update.
7765 (find_location_by_number): Make "number" const. Use
7766 get_number_trailer.
7767 * cli/cli-utils.c (extract_arg): Return std::string.
7768 * probe.c (parse_probe_linespec): Update. Change types.
7769 (collect_probes): Take string arguments.
7770 (parse_probe_linespec): Likewise.
7771 (info_probes_for_ops): Update.
7772 (enable_probes_command): Update.
7773 (disable_probes_command): Update.
7774 * break-catch-sig.c (catch_signal_split_args): Update.
7775 * mi/mi-parse.c (mi_parse): Update.
7776
2039bd9f
TT
77772017-09-11 Tom Tromey <tom@tromey.com>
7778
7779 * language.h (language_enum): Make argument const.
7780 * language.c (language_enum): Make argument const.
7781
f1735a53
TT
77822017-09-11 Tom Tromey <tom@tromey.com>
7783
7784 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7785 as function.
7786 (skip_to_space): Rename from skip_to_space_const.
7787 * common/common-utils.c (skip_to_space): New function.
7788 (skip_to_space): Rename from skip_to_space_const.
7789 * cli/cli-utils.h (get_number): Rename from get_number_const.
7790 (extract_arg): Rename from extract_arg_const.
7791 * cli/cli-utils.c (get_number): Rename from get_number_const.
7792 (extract_arg): Rename from extract_arg_const.
7793 (number_or_range_parser::get_number): Use ::get_number.
7794 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7795 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7796 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7797 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7798 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7799 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7800 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7801 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7802
7d221d74
TT
78032017-09-11 Tom Tromey <tom@tromey.com>
7804
7805 * python/python.c (do_start_initialization): Use
7806 py-event-types.def to initialize types.
7807 Define all object type structures.
7808 * python/python-internal.h: Don't declare event initialization
7809 functions.
7810 * python/py-threadevent.c (thread_event_object_type): Don't
7811 define.
7812 * python/py-stopevent.c (stop_event_object_type): Don't define.
7813 * python/py-signalevent.c (signal_event_object_type): Don't
7814 declare or define.
7815 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7816 (clear_objfiles_event_object_type): Don't declare or define.
7817 * python/py-infevents.c (inferior_call_pre_event_object_type)
7818 (inferior_call_post_event_object_type)
7819 (register_changed_event_object_type)
7820 (memory_changed_event_object_type): Don't declare or define.
7821 * python/py-inferior.c (new_thread_event_object_type)
7822 (new_inferior_event_object_type)
7823 (inferior_deleted_event_object_type): Don't declare or define.
7824 * python/py-exitedevent.c (exited_event_object_type): Don't
7825 declare or define.
7826 * python/py-evts.c (gdbpy_initialize_py_events): Use
7827 py-all-events.def.
7828 * python/py-events.h (thread_event_object_type): Don't declare.
7829 (events_object): Use py-all-events.def.
7830 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7831 py-event-types.def.
7832 * python/py-event-types.def: New file.
7833 * python/py-continueevent.c (create_continue_event_object): Don't
7834 declare or define.
7835 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7836 declare or define.
7837 * python/py-all-events.def: New file.
7838
35c61a1d
TT
78392017-09-11 Tom Tromey <tom@tromey.com>
7840
7841 * python/py-threadevent.c (create_thread_event_object): Return
7842 gdbpy_ref.
7843 * python/py-stopevent.h (create_stop_event_object)
7844 (create_breakpoint_event_object, create_signal_event_object):
7845 Update.
7846 * python/py-stopevent.c (create_stop_event_object): Return
7847 gdbpy_ref.
7848 (emit_stop_event): Update.
7849 * python/py-signalevent.c (create_signal_event_object): Return
7850 gdbpy_ref.
7851 * python/py-infevents.c (create_inferior_call_event_object):
7852 Update.
7853 * python/py-event.h (create_event_object)
7854 (create_thread_event_object): Update.
7855 * python/py-event.c (create_event_object): Return gdbpy_ref.
7856 * python/py-continueevent.c: Return gdbpy_ref.
7857 * python/py-bpevent.c (create_breakpoint_event_object): Return
7858 gdbpy_ref.
7859
7c96f8c1
TT
78602017-09-11 Tom Tromey <tom@tromey.com>
7861
7862 PR python/15622:
7863 * NEWS: Add entry.
7864 * python/python.c (do_start_initialization): Initialize new event
7865 types.
7866 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7867 (gdbpy_initialize_inferior_deleted_event)
7868 (gdbpy_initialize_new_thread_event): Declare.
7869 * python/py-threadevent.c (create_thread_event_object): Add option
7870 "thread" parameter.
7871 * python/py-inferior.c (new_thread_event_object_type)
7872 (new_inferior_event_object_type)
7873 (inferior_deleted_event_object_type): Declare.
7874 (python_new_inferior, python_inferior_deleted): New functions.
7875 (add_thread_object): Emit new_thread event.
7876 (gdbpy_initialize_inferior): Attach new functions to corresponding
7877 observers.
7878 (new_thread, new_inferior, inferior_deleted): Define new event
7879 types.
7880 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7881 registries.
7882 * python/py-events.h (events_object) <new_inferior,
7883 inferior_deleted, new_thread>: New fields.
7884 * python/py-event.h (create_thread_event_breakpoint): Add optional
7885 "thread" parameter.
7886
72542b8e
AB
78872017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7888
7889 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7890 check current_ui instead.
7891 (internal_vproblem): Likewise.
7892
0d64823e
SM
78932017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7894
7895 * thread.c (print_thread_info_1): Remove unnecessary calls to
7896 uiout->is_mi_like_p.
7897
eb1e02fd
TT
78982017-09-09 Tom Tromey <tom@tromey.com>
7899
7900 * namespace.h (add_using_directive): Update.
7901 * namespace.c (add_using_directive): Change type of excludes to
7902 std::vector.
7903 * dwarf2read.c (read_import_statement): Use std::vector.
7904 (read_namespace): Update.
7905 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7906
0fc21fd8
TT
79072017-09-09 Tom Tromey <tom@tromey.com>
7908
7909 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7910
49663d05
TT
79112017-09-09 Tom Tromey <tom@tromey.com>
7912
7913 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7914
0b868b60
TT
79152017-09-09 Tom Tromey <tom@tromey.com>
7916
7917 * stack.c (func_command): Use gdb::def_vector.
7918
c0470d48
TT
79192017-09-09 Tom Tromey <tom@tromey.com>
7920
7921 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7922 ui_out_emit_list, ui_out_emit_tuple.
7923 (mi_cmd_var_update): Likewise.
7924
ca5909c7
TT
79252017-09-09 Tom Tromey <tom@tromey.com>
7926
7927 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7928 ui_out_redirect_pop.
7929 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7930 ui_out_redirect_pop.
7931 * utils.c (do_ui_out_redirect_pop)
7932 (make_cleanup_ui_out_redirect_pop): Remove.
7933 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7934 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7935 * ui-out.h (ui_out_redirect_pop): New class.
7936
e6a2252a
TT
79372017-09-09 Tom Tromey <tom@tromey.com>
7938
7939 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7940 (list_available_thread_groups, mi_cmd_list_thread_groups)
7941 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7942 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7943 Likewise.
7944
393702cd
TT
79452017-09-09 Tom Tromey <tom@tromey.com>
7946
7947 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7948 ui_out_emit_tuple.
7949
76f9c9cf
TT
79502017-09-09 Tom Tromey <tom@tromey.com>
7951
7952 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7953 * stack.c (print_frame): Use ui_out_emit_tuple.
7954 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7955 (info_spu_mailbox_command, info_spu_dma_command)
7956 (info_spu_proxydma_command): Likewise.
7957 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7958 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7959 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7960 ui_out_emit_tuple.
7961 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7962
dc9fe180
TT
79632017-09-09 Tom Tromey <tom@tromey.com>
7964
7965 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7966 (class ui_out_emit_table): Update comment.
7967 * ui-out.c (do_cleanup_table_end)
7968 (make_cleanup_ui_out_table_begin_end): Remove.
7969 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7970 (info_spu_dma_cmdlist): Likewise.
7971 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7972 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7973 ui_out_emit_table.
7974
f8cc3da6
TT
79752017-09-09 Tom Tromey <tom@tromey.com>
7976
7977 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7978 ui_out_emit_list, gdb::optional.
7979
481695ed
JB
79802017-09-09 John Baldwin <jhb@FreeBSD.org>
7981
7982 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7983 prototype.
7984 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7985 prototype.
7986 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7987 prototype.
7988 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7989 * ada-exp.y: Remove _initialize_ada_exp prototype.
7990 * ada-lang.c: Remove _initialize_ada_language prototype.
7991 * ada-tasks.c: Remove _initialize_tasks prototype.
7992 * addrmap.c: Remove _initialize_addrmap prototype.
7993 * agent.c: Remove _initialize_agent prototype.
7994 * aix-thread.c: Remove _initialize_aix_thread prototype.
7995 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7996 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7997 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7998 prototype.
7999 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
8000 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
8001 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
8002 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
8003 prototype.
8004 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
8005 prototype.
8006 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
8007 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
8008 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
8009 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
8010 prototype.
8011 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
8012 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
8013 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
8014 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
8015 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8016 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
8017 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
8018 prototype.
8019 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
8020 prototype.
8021 * annotate.c: Remove _initialize_annotate prototype.
8022 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
8023 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
8024 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
8025 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
8026 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
8027 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
8028 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
8029 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
8030 prototype.
8031 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
8032 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
8033 * auto-load.c: Remove _initialize_auto_load prototype.
8034 * auxv.c: Remove _initialize_auxv prototype.
8035 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
8036 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
8037 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
8038 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
8039 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
8040 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
8041 prototype.
8042 * break-catch-throw.c: Remove _initialize_break_catch_throw
8043 prototype.
8044 * breakpoint.c: Remove _initialize_breakpoint prototype.
8045 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
8046 * btrace.c: Remove _initialize_btrace prototype.
8047 * charset.c: Remove _initialize_charset prototype.
8048 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
8049 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
8050 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
8051 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
8052 * cli/cli-script.c: Remove _initialize_cli_script prototype.
8053 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
8054 * coffread.c: Remove _initialize_coffread prototype.
8055 * compile/compile.c: Remove _initialize_compile prototype.
8056 * complaints.c: Remove _initialize_complaints prototype.
8057 * completer.c: Remove _initialize_completer prototype.
8058 * copying.awk: Remove _initialize_copying prototype.
8059 * copying.c: Regenerate.
8060 * core-regset.c: Remove _initialize_core_regset prototype.
8061 * corefile.c: Remove _initialize_core prototype.
8062 * corelow.c: Remove _initialize_corelow prototype.
8063 * cp-abi.c: Remove _initialize_cp_abi prototype.
8064 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
8065 * cp-support.c: Remove _initialize_cp_support prototype.
8066 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
8067 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
8068 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
8069 * ctf.c: Remove _initialize_ctf prototype.
8070 * d-lang.c: Remove _initialize_d_language prototype.
8071 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
8072 prototype.
8073 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
8074 * dbxread.c: Remove _initialize_dbxread prototype.
8075 * dcache.c: Remove _initialize_dcache prototype.
8076 * demangle.c: Remove _initialize_demangler prototype.
8077 * disasm-selftests.c: Remove _initialize_disasm_selftests
8078 prototype.
8079 * disasm.c: Remove _initialize_disasm prototype.
8080 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
8081 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
8082 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
8083 prototype.
8084 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
8085 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
8086 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
8087 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
8088 * elfread.c: Remove _initialize_elfread prototype.
8089 * exec.c: Remove _initialize_exec prototype.
8090 * extension.c: Remove _initialize_extension prototype.
8091 * f-lang.c: Remove _initialize_f_language prototype.
8092 * f-valprint.c: Remove _initialize_f_valprint prototype.
8093 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
8094 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
8095 * filesystem.c: Remove _initialize_filesystem prototype.
8096 * findcmd.c: Remove _initialize_mem_search prototype.
8097 * fork-child.c: Remove _initialize_fork_child prototype.
8098 * frame-base.c: Remove _initialize_frame_base prototype.
8099 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
8100 * frame.c: Remove _initialize_frame prototype.
8101 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
8102 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
8103 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
8104 * gcore.c: Remove _initialize_gcore prototype.
8105 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
8106 * gdbarch.c: Regenerate.
8107 * gdbarch.sh: Remove _initialize_gdbarch prototype.
8108 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
8109 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
8110 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
8111 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
8112 * go-lang.c: Remove _initialize_go_language prototype.
8113 * go32-nat.c: Remove _initialize_go32_nat prototype.
8114 * guile/guile.c: Remove _initialize_guile prototype.
8115 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
8116 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
8117 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
8118 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
8119 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
8120 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
8121 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
8122 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
8123 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
8124 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
8125 prototype.
8126 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
8127 prototype.
8128 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8129 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8130 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8131 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8132 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8133 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8134 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8135 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8136 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8137 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8138 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8139 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8140 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8141 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8142 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8143 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8144 prototype.
8145 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8146 prototype.
8147 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8148 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8149 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8150 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8151 * infcall.c: Remove _initialize_infcall prototype.
8152 * infcmd.c: Remove _initialize_infcmd prototype.
8153 * inferior.c: Remove _initialize_inferiors prototype.
8154 * inflow.c: Remove _initialize_inflow prototype.
8155 * infrun.c: Remove _initialize_infrun prototype.
8156 * interps.c: Remove _initialize_interpreter prototype.
8157 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8158 * jit.c: Remove _initialize_jit prototype.
8159 * language.c: Remove _initialize_language prototype.
8160 * linux-fork.c: Remove _initialize_linux_fork prototype.
8161 * linux-nat.c: Remove _initialize_linux_nat prototype.
8162 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8163 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8164 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8165 * m2-lang.c: Remove _initialize_m2_language prototype.
8166 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8167 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8168 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8169 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8170 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8171 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8172 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8173 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8174 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8175 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8176 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8177 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8178 * machoread.c: Remove _initialize_machoread prototype.
8179 * macrocmd.c: Remove _initialize_macrocmd prototype.
8180 * macroscope.c: Remove _initialize_macroscope prototype.
8181 * maint.c: Remove _initialize_maint_cmds prototype.
8182 * mdebugread.c: Remove _initialize_mdebugread prototype.
8183 * memattr.c: Remove _initialize_mem prototype.
8184 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8185 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8186 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8187 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8188 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8189 * microblaze-linux-tdep.c: Remove
8190 _initialize_microblaze_linux_tdep prototype.
8191 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8192 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8193 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8194 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8195 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8196 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8197 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8198 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8199 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8200 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8201 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8202 prototype.
8203 * mipsread.c: Remove _initialize_mipsread prototype.
8204 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8205 prototype.
8206 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8207 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8208 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8209 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8210 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8211 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8212 prototype.
8213 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8214 * nto-procfs.c: Remove _initialize_procfs prototype.
8215 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8216 * objc-lang.c: Remove _initialize_objc_language prototype.
8217 * objfiles.c: Remove _initialize_objfiles prototype.
8218 * observer.c: Remove observer_test_first_notification_function,
8219 observer_test_second_notification_function,
8220 observer_test_third_notification_function, and
8221 _initialize_observer prototypes.
8222 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8223 * osabi.c: Remove _initialize_gdb_osabi prototype.
8224 * osdata.c: Remove _initialize_osdata prototype.
8225 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8226 * parse.c: Remove _initialize_parse prototype.
8227 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8228 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8229 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8230 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8231 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8232 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8233 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8234 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8235 * printcmd.c: Remove _initialize_printcmd prototype.
8236 * probe.c: Remove _initialize_probe prototype.
8237 * proc-api.c: Remove _initialize_proc_api prototype.
8238 * proc-events.c: Remove _initialize_proc_events prototype.
8239 * proc-service.c: Remove _initialize_proc_service prototype.
8240 * procfs.c: Remove _initialize_procfs prototype.
8241 * psymtab.c: Remove _initialize_psymtab prototype.
8242 * python/python.c: Remove _initialize_python prototype.
8243 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8244 * record-btrace.c: Remove _initialize_record_btrace prototype.
8245 * record-full.c: Remove _initialize_record_full prototype.
8246 * record.c: Remove _initialize_record prototype.
8247 * regcache.c: Remove _initialize_regcache prototype.
8248 * reggroups.c: Remove _initialize_reggroup prototype.
8249 * remote-notif.c: Remove _initialize_notif prototype.
8250 * remote-sim.c: Remove _initialize_remote_sim prototype.
8251 * remote.c: Remove _initialize_remote prototype.
8252 * reverse.c: Remove _initialize_reverse prototype.
8253 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8254 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8255 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8256 prototype.
8257 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8258 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8259 * rust-exp.y: Remove _initialize_rust_exp prototype.
8260 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8261 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8262 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8263 * score-tdep.c: Remove _initialize_score_tdep prototype.
8264 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8265 prototype.
8266 * ser-go32.c: Remove _initialize_ser_dos prototype.
8267 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8268 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8269 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8270 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8271 * serial.c: Remove _initialize_serial prototype.
8272 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8273 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8274 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8275 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8276 * skip.c: Remove _initialize_step_skip prototype.
8277 * sol-thread.c: Remove _initialize_sol_thread prototype.
8278 * solib-aix.c: Remove _initialize_solib_aix prototype.
8279 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8280 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8281 * solib-frv.c: Remove _initialize_frv_solib prototype.
8282 * solib-spu.c: Remove _initialize_spu_solib prototype.
8283 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8284 * solib-target.c: Remove _initialize_solib_target prototype.
8285 * solib.c: Remove _initialize_solib prototype.
8286 * source.c: Remove _initialize_source prototype.
8287 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8288 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8289 prototype.
8290 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8291 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8292 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8293 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8294 prototype.
8295 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8296 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8297 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8298 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8299 prototype.
8300 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8301 prototype.
8302 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8303 prototype.
8304 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8305 prototype.
8306 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8307 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8308 prototype.
8309 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8310 prototype.
8311 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8312 prototype.
8313 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8314 prototype.
8315 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8316 prototype.
8317 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8318 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8319 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8320 * stabsread.c: Remove _initialize_stabsread prototype.
8321 * stack.c: Remove _initialize_stack prototype.
8322 * stap-probe.c: Remove _initialize_stap_probe prototype.
8323 * std-regs.c: Remove _initialize_frame_reg prototype.
8324 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8325 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8326 * symfile.c: Remove _initialize_symfile prototype.
8327 * symmisc.c: Remove _initialize_symmisc prototype.
8328 * symtab.c: Remove _initialize_symtab prototype.
8329 * target-dcache.c: Remove _initialize_target_dcache prototype.
8330 * target-descriptions.c: Remove _initialize_target_descriptions
8331 prototype.
8332 * thread.c: Remove _initialize_thread prototype.
8333 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8334 prototype.
8335 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8336 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8337 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8338 prototype.
8339 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8340 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8341 * tracefile.c: Remove _initialize_tracefile prototype.
8342 * tracepoint.c: Remove _initialize_tracepoint prototype.
8343 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8344 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8345 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8346 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8347 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8348 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8349 * tui/tui.c: Remove _initialize_tui prototype.
8350 * typeprint.c: Remove _initialize_typeprint prototype.
8351 * user-regs.c: Remove _initialize_user_regs prototype.
8352 * utils.c: Remove _initialize_utils prototype.
8353 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8354 * valarith.c: Remove _initialize_valarith prototype.
8355 * valops.c: Remove _initialize_valops prototype.
8356 * valprint.c: Remove _initialize_valprint prototype.
8357 * value.c: Remove _initialize_values prototype.
8358 * varobj.c: Remove _initialize_varobj prototype.
8359 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8360 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8361 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8362 * windows-nat.c: Remove _initialize_windows_nat,
8363 _initialize_check_for_gdb_ini, and _initialize_loadable
8364 prototypes.
8365 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8366 * xcoffread.c: Remove _initialize_xcoffread prototype.
8367 * xml-support.c: Remove _initialize_xml_support prototype.
8368 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8369 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8370 prototype.
8371 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8372 prototype.
8373 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8374
a611b5cb
KS
83752017-09-08 Keith Seitz <keiths@redhat.com>
8376
8377 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8378 field.
8379
469412dd
CW
83802017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8381
8382 * f-valprint.c (f_val_print): Remove check for one byte
8383 sized integers. Remove printing of character type.
8384
a5ad232b
FP
83852017-09-08 Frank Penczek <frank.penczek@intel.com>
8386 Christoph Weinmann <christoph.t.weinmann@intel.com>
8387 Bernhard Heckel <bernhard.heckel@intel.com>
8388
8389 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8390 to maintain proper indentation when printing pointers/refs.
8391
e5014227
JB
83922017-09-07 Joel Brobecker <brobecker@adacore.com>
8393
8394 GDB 8.0.1 released.
8395
63c99141
JB
83962017-09-07 Joel Brobecker <brobecker@adacore.com>
8397
8398 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8399
69c1e056
TT
84002017-09-05 Tom Tromey <tom@tromey.com>
8401
8402 * parse.c (funcall_chain): Now a std::vector.
8403 (start_arglist, end_arglist): Simplify.
8404 (free_funcalls): Remove.
8405 (parse_exp_in_context_1): Remove cleanup.
8406
fef704bf
TT
84072017-09-05 Tom Tromey <tom@tromey.com>
8408
8409 * go-exp.y (go_parse): Don't create a cleanup.
8410
5613c585
TT
84112017-09-05 Tom Tromey <tom@tromey.com>
8412
8413 * d-exp.y (PrimaryExpression): Use std::string.
8414 (d_parse): Don't create a cleanup.
8415
eae49211
TT
84162017-09-05 Tom Tromey <tom@tromey.com>
8417
8418 * utils.c (do_clear_parser_state): Remove.
8419 (make_cleanup_clear_parser_state): Remove.
8420 * p-exp.y (pascal_parse): Use scoped_restore.
8421 * m2-exp.y (m2_parse): Use scoped_restore.
8422 * f-exp.y (f_parse): Use scoped_restore.
8423 * d-exp.y (d_parse): Use scoped_restore.
8424 * c-exp.y (c_parse): Use scoped_restore.
8425 * ada-exp.y (ada_parse): Use scoped_restore.
8426 * utils.h (make_cleanup_clear_parser_state): Remove.
8427
73b9be8b
KS
84282017-09-06 Keith Seitz <keiths@redhat.com>
8429
8430 * dwarf2read.c (dw2_linkage_name_attr): New function.
8431 (dw2_linkage_name): New function.
8432 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8433 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8434 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8435
a102602b
KR
84362017-09-06 Kamil Rytarowski <n54@gmx.com>
8437
8438 * config/djgpp/djconfig.sh: Correct shell portability issue.
8439
28ad437d
KR
84402017-09-06 Kamil Rytarowski <n54@gmx.com>
8441
8442 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8443
351787dd
JB
84442017-09-06 John Baldwin <jhb@FreeBSD.org>
8445
8446 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8447 * NEWS: Mention new FreeBSD/mips native configuration.
8448 * configure.host: Add aarch64*-*-freebsd*.
8449 * configure.nat: Likewise.
8450 * aarch64-fbsd-nat.c: New file.
8451
c0f84956
JB
84522017-09-06 John Baldwin <jhb@FreeBSD.org>
8453
8454 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8455 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8456 * NEWS: Mention new FreeBSD/aarch64 target.
8457 * configure.tgt: Add aarch64*-*-freebsd*.
8458 * aarch64-fbsd-tdep.c: New file.
8459 * aarch64-fbsd-tdep.h: New file.
8460
7610297a
KR
84612017-09-06 Kamil Rytarowski <n54@gmx.com>
8462
8463 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8464
fbd1b771
JK
84652017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8466
8467 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8468 of TLS symbols.
8469
5ca79eae
PW
84702017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8471
8472 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8473 call.
8474
bf93d7ba
SM
84752017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8476
8477 * infrun.c (follow_exec): Call add_thread after
8478 target_find_description.
8479
1bb7c059
SM
84802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8481
8482 * infrun.c (handle_inferior_event_1): When exec'ing, read
8483 stop_pc after follow_exec.
8484
fc809827
SM
84852017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8486
8487 * remote.c (process_g_packet): Update error message.
8488
d2fcdd85
YQ
84892017-09-05 Yao Qi <yao.qi@linaro.org>
8490
8491 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8492 targets.
8493
e69570ee
PA
84942017-09-05 Pedro Alves <palves@redhat.com>
8495
8496 * eval.c (eval_call, evaluate_funcall): New functions, factored
8497 out from ...
8498 (evaluate_subexp_standard): ... this.
8499
22916b07
YQ
85002017-09-05 Yao Qi <yao.qi@linaro.org>
8501
8502 * amd64-tdep.c (amd64_target_description): Create target
8503 descriptions.
8504 (_initialize_amd64_tdep): Don't call functions
8505 initialize_tdesc_amd64_*. Add self tests.
8506 * arch/amd64.c (amd64_create_target_description): Add parameter
8507 is_linux. Call set_tdesc_osabi if is_linux is true.
8508 * arch/amd64.h (amd64_create_target_description): Update the
8509 declaration.
8510 * arch/i386.c (i386_create_target_description): Add parameter
8511 is_linux. Call set_tdesc_osabi if is_linux is true.
8512 * arch/i386.h (i386_create_target_description): Update
8513 declaration.
8514 * configure.tgt: Add i386.o to gdb_target_obs.
8515 * features/Makefile (XMLTOC): Remove i386/*.xml.
8516 * features/i386/amd64-avx-avx512.c: Remove.
8517 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8518 * features/i386/amd64-avx-mpx.c: Remove.
8519 * features/i386/amd64-avx.c: Remove.
8520 * features/i386/amd64-mpx.c: Remove.
8521 * features/i386/amd64.c: Remove.
8522 * features/i386/i386-avx-avx512.c: Remove.
8523 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8524 * features/i386/i386-avx-mpx.c: Remove.
8525 * features/i386/i386-avx.c: Remove.
8526 * features/i386/i386-mmx.c: Remove.
8527 * features/i386/i386-mpx.c: Remove.
8528 * features/i386/i386.c: Remove.
8529 * i386-tdep.c: Don't include features/i386/i386*.c., include
8530 target-descriptions.h and arch/i386.h.
8531 (i386_target_description): Create target descriptions.
8532 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8533 functions. Do self tests.
8534
0854b7b1
YQ
85352017-09-05 Yao Qi <yao.qi@linaro.org>
8536
8537 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8538 * features/i386/amd64-avx-avx512-linux.c: Removed.
8539 * features/i386/amd64-avx-linux.c: Removed.
8540 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8541 * features/i386/amd64-avx-mpx-linux.c: Removed.
8542 * features/i386/amd64-linux.c: Removed.
8543 * features/i386/amd64-mpx-linux.c: Removed.
8544 * features/i386/x32-avx-avx512-linux.c: Removed.
8545 * features/i386/x32-avx-linux.c: Removed.
8546 * features/i386/x32-linux.c: Removed.
8547
b4570e4b
YQ
85482017-09-05 Yao Qi <yao.qi@linaro.org>
8549
8550 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8551 features/i386/*.c.
8552 (amd64_linux_read_description): Call
8553 amd64_create_target_description.
8554 * arch/amd64.c: New file.
8555 * arch/amd64.h: New file.
8556 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8557 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8558
6c73f67f
YQ
85592017-09-05 Yao Qi <yao.qi@linaro.org>
8560
8561 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8562 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8563 (amd64_linux_read_description): Create target descriptions.
8564 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8565 functions. Add unit tests.
8566 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8567 x32-core.xml.
8568 * features/i386/64bit-avx.c: Generated.
8569 * features/i386/64bit-avx512.c: Generated.
8570 * features/i386/64bit-core.c: Generated.
8571 * features/i386/64bit-linux.c: Generated.
8572 * features/i386/64bit-mpx.c: Generated.
8573 * features/i386/64bit-pkeys.c: Generated.
8574 * features/i386/64bit-segments.c: Generated.
8575 * features/i386/64bit-sse.c: Generated.
8576 * features/i386/x32-core.c: Generated.
8577 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8578 c files for amd64-linux and x32-linux.
8579
9d3d478b
YQ
85802017-09-05 Yao Qi <yao.qi@linaro.org>
8581
8582 * amd64-linux-tdep.c (amd64_linux_read_description): New
8583 function.
8584 (amd64_linux_core_read_description): Call
8585 amd64_linux_read_description.
8586 (amd64_linux_init_abi): Likewise.
8587 (amd64_x32_linux_init_abi): Likewise.
8588 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8589 * x86-linux-nat.c (x86_linux_read_description): Call
8590 amd64_linux_read_description.
8591
b9f1d50f
YQ
85922017-09-05 Yao Qi <yao.qi@linaro.org>
8593
8594 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8595 comments.
8596
188c9e6d
YQ
85972017-09-05 Yao Qi <yao.qi@linaro.org>
8598
8599 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8600 * features/i386/i386-avx-avx512-linux.c: Remove.
8601 * features/i386/i386-avx-linux.c: Remove.
8602 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8603 * features/i386/i386-avx-mpx-linux.c: Remove.
8604 * features/i386/i386-linux.c: Remove.
8605 * features/i386/i386-mmx-linux.c: Remove.
8606 * features/i386/i386-mpx-linux.c: Remove.
8607
5f035c07
YQ
86082017-09-05 Yao Qi <yao.qi@linaro.org>
8609
8610 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8611 (SFILES): Add arch/i386.c.
8612 (HFILES_NO_SRCDIR): Add arch/i386.h.
8613 * arch/i386.c: New file.
8614 * arch/i386.h: New file.
8615 * arch/tdesc.h (allocate_target_description): Declare.
8616 (set_tdesc_architecture): Declare.
8617 (set_tdesc_osabi): Declare.
8618 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8619 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8620 include arch/i386.h.
8621 (i386_linux_read_description): Remove code and call
8622 i386_create_target_description.
8623 (set_tdesc_architecture): New function.
8624 (set_tdesc_osabi): New function.
8625 * target-descriptions.h (allocate_target_description): Remove.
8626
0abe8a89
YQ
86272017-09-05 Yao Qi <yao.qi@linaro.org>
8628
8629 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8630 * target-descriptions.c (tdesc_create_feature): Likewise, and
8631 adjust code.
8632 * features/i386/32bit-avx.c: Re-generated.
8633 * features/i386/32bit-avx512.c: Re-generated.
8634 * features/i386/32bit-core.c: Re-generated.
8635 * features/i386/32bit-linux.c: Re-generated.
8636 * features/i386/32bit-mpx.c: Re-generated.
8637 * features/i386/32bit-pkeys.c: Re-generated.
8638 * features/i386/32bit-sse.c: Re-generated.
8639
0a188386
YQ
86402017-09-05 Yao Qi <yao.qi@linaro.org>
8641
8642 * regformats/regdef.h (struct reg): Override operator == and !=.
8643
f49ff000
YQ
86442017-09-05 Yao Qi <yao.qi@linaro.org>
8645
8646 * arch/tdesc.h: New file.
8647 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8648 * target-descriptions.c: Update comments.
8649 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8650 declarations.
8651 * features/i386/32bit-avx.c: Re-generated.
8652 * features/i386/32bit-avx512.c: Re-generated.
8653 * features/i386/32bit-core.c: Re-generated.
8654 * features/i386/32bit-linux.c: Re-generated.
8655 * features/i386/32bit-mpx.c: Re-generated.
8656 * features/i386/32bit-pkeys.c: Re-generated.
8657 * features/i386/32bit-sse.c: Re-generated.
8658
f7000548
YQ
86592017-09-05 Yao Qi <yao.qi@linaro.org>
8660
8661 * regformats/regdat.sh: Update generated code.
8662
c9a5e2a5
YQ
86632017-09-05 Yao Qi <yao.qi@linaro.org>
8664
8665 * regformats/regdat.sh: Adjust code order.
8666
d6b687ac
SM
86672017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8668
8669 * expprint.c (dump_subexp_body_standard): Use constant format
8670 string in fprintf_filtered call.
8671
a379bfd0
JB
86722017-09-04 John Baldwin <jhb@FreeBSD.org>
8673
8674 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8675 NetBSD/i386.
8676 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8677
f7efc967
JB
86782017-09-04 John Baldwin <jhb@FreeBSD.org>
8679
8680 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8681
c49fbc6c
JB
86822017-09-04 John Baldwin <jhb@FreeBSD.org>
8683
8684 * bsd-kvm.o: Define _KMEMUSER.
8685 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8686 * configure: Regenerate.
8687
26562e73
JB
86882017-09-04 John Baldwin <jhb@FreeBSD.org>
8689
8690 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8691 * i386-fbsd-nat.c: Likewise.
8692
31cf1487
JB
86932017-09-04 John Baldwin <jhb@FreeBSD.org>
8694
8695 * unittests/array-view-selftests.c: Add include of <array>.
8696
5b9f8a7c
JB
86972017-09-04 John Baldwin <jhb@FreeBSD.org>
8698
8699 * spu-tdep.c (flush_ea_cache): Add missing argument to
8700 call_function_by_hand.
8701
d69cf9b2
PA
87022017-09-04 Pedro Alves <palves@redhat.com>
8703
8704 * NEWS (Safer support for debugging with no debug info): New.
8705
3693fdb3
PA
87062017-09-04 Pedro Alves <palves@redhat.com>
8707
8708 * c-exp.y (function_method, function_method_void): Add current
8709 instance flags to TYPE_INSTANCE.
8710 * dwarf2read.c (check_modifier): New.
8711 (compute_delayed_physnames): Assert that only C++ adds delayed
8712 physnames. Mark fn_fields as const/volatile depending on
8713 physname.
8714 * eval.c (make_params): New type_instance_flags parameter. Use
8715 it as the new type's instance flags.
8716 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8717 flags element and pass it to make_params.
8718 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8719 instance flags element.
8720 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8721 * gdbtypes.h: Include "enum-flags.h".
8722 (type_instance_flags): New enum-flags type.
8723 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8724 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8725 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8726 (follow_type_instance_flags): New function.
8727 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8728 * parser-defs.h (follow_type_instance_flags): Declare.
8729 * valops.c (value_struct_elt_for_reference): const/volatile must
8730 match too.
8731
e68cb8e0
PA
87322017-09-04 Pedro Alves <palves@redhat.com>
8733
8734 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8735 function/method scopes; lookup the nested name as a function local
8736 static variable.
8737
858be34c
PA
87382017-09-04 Pedro Alves <palves@redhat.com>
8739
8740 (%type <voidval>): Add function_method.
8741 * c-exp.y (exp): New production for calls with no arguments.
8742 (function_method, function_method_void_or_typelist): New
8743 productions.
8744 (exp): New production for "method()::static_var".
8745 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8746 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8747 Handle OP_FUNC_STATIC_VAR.
8748 * parse.c (operator_length_standard):
8749 Handle OP_FUNC_STATIC_VAR.
8750
dd5901a6
PA
87512017-09-04 Pedro Alves <palves@redhat.com>
8752
8753 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8754 handling.
8755 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8756 Ditto.
8757 * parse.c (operator_length_standard, operator_check_standard):
8758 Ditto.
8759 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8760
46a4882b
PA
87612017-09-04 Pedro Alves <palves@redhat.com>
8762
8763 * ax-gdb.c: Include "typeprint.h".
8764 (gen_expr_for_cast): New function.
8765 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8766 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8767 type is unknown.
8768 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8769 nodebug_data_symbol.
8770 * eval.c: Include "typeprint.h".
8771 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8772 Error out if symbol has unknown type.
8773 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8774 evaluate_subexp_for_cast.
8775 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8776 OP_VAR_MSYM_VALUE.
8777 (evaluate_subexp_for_cast): New function.
8778 * gdbtypes.c (init_nodebug_var_type): New function.
8779 (objfile_type): Use it to initialize types of variables with no
8780 debug info.
8781 * typeprint.c (error_unknown_type): New.
8782 * typeprint.h (error_unknown_type): New declaration.
8783 * compile/compile-c-types.c (convert_type_basic): Handle
8784 TYPE_CODE_ERROR; warn and fallback to int for variables with
8785 unknown type.
8786
fe13dfec
PA
87872017-09-04 Pedro Alves <palves@redhat.com>
8788
8789 * eval.c (evaluate_var_value): New function, factored out from ...
8790 (evaluate_subexp_standard): ... here.
8791
d008ee21
PA
87922017-09-04 Pedro Alves <palves@redhat.com>
8793
8794 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8795 Remove useless assignments to 'op'.
8796
827d0c51
PA
87972017-09-04 Pedro Alves <palves@redhat.com>
8798
8799 * eval.c (eval_skip_value): New function.
8800 (evaluate_subexp_standard): Use it.
8801
2c5a2be1
PA
88022017-09-04 Pedro Alves <palves@redhat.com>
8803
8804 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8805 function name from symbol/minsym and pass it to
8806 error_call_unknown_return_type.
8807
74ea4be4
PA
88082017-09-04 Pedro Alves <palves@redhat.com>
8809
8810 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8811 * ax-gdb.c (gen_msym_var_ref): New function.
8812 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8813 * eval.c (evaluate_var_msym_value): New function.
8814 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8815 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8816 to call_function_by_hand.
8817 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8818 Handle OP_VAR_MSYM_VALUE.
8819 (union exp_element) <msymbol>: New field.
8820 * minsyms.h (struct type): Forward declare.
8821 (find_minsym_type_and_address): Declare.
8822 * parse.c (write_exp_elt_msym): New function.
8823 (write_exp_msymbol): Delete, refactored as ...
8824 (find_minsym_type_and_address): ... this new function.
8825 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8826 (operator_length_standard, operator_check_standard): Handle
8827 OP_VAR_MSYM_VALUE.
8828 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8829
7022349d
PA
88302017-09-04 Pedro Alves <palves@redhat.com>
8831
8832 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8833 TYPE_GNU_IFUNC specially here. Throw error if return type is
8834 unknown.
8835 * ada-typeprint.c (print_func_type): Handle functions with unknown
8836 return type.
8837 * c-typeprint.c (c_type_print_base): Handle functions and methods
8838 with unknown return type.
8839 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8840 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8841 * compile/compile-c-types.c: Include "objfiles.h".
8842 (convert_func): For functions with unknown return type, warn and
8843 default to int.
8844 * compile/compile-object-run.c (compile_object_run): Adjust call
8845 to call_function_by_hand_dummy.
8846 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8847 call_function_by_hand.
8848 * eval.c (evaluate_subexp_standard): Adjust calls to
8849 call_function_by_hand. Handle functions and methods with unknown
8850 return type. Pass expect_type to call_function_by_hand.
8851 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8852 return type.
8853 * gcore.c (call_target_sbrk): Adjust call to
8854 call_function_by_hand.
8855 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8856 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8857 an integer address type instead of nodebug.
8858 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8859 call_function_by_hand.
8860 * infcall.c (error_call_unknown_return_type): New function.
8861 (call_function_by_hand): New "default_return_type" parameter.
8862 Pass it down.
8863 (call_function_by_hand_dummy): New "default_return_type"
8864 parameter. Use it instead of defaulting to int. If there's no
8865 default and the return type is unknown, throw an error. If
8866 there's a default return type, and the called function has no
8867 debug info, then assume the function is prototyped.
8868 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8869 New "default_return_type" parameter.
8870 (error_call_unknown_return_type): New declaration.
8871 * linux-fork.c (call_lseek): Cast return type of lseek.
8872 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8873 call_function_by_hand.
8874 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8875 calls to call_function_by_hand.
8876 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8877 return type.
8878 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8879 (value_nsstring, print_object_command): Adjust calls to
8880 call_function_by_hand.
8881 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8882 functions with unknown return type.
8883 (pascal_type_print_func_varspec_suffix): New function.
8884 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8885 TYPE_CODE_METHOD>: Use it.
8886 * python/py-value.c (valpy_call): Adjust call to
8887 call_function_by_hand.
8888 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8889 call_function_by_hand.
8890 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8891 call_function_by_hand.
8892 * valops.c (value_allocate_space_in_inferior): Adjust call to
8893 call_function_by_hand.
8894 * typeprint.c (type_print_unknown_return_type): New function.
8895 * typeprint.h (type_print_unknown_return_type): New declaration.
8896
54990598
PA
88972017-09-04 Pedro Alves <palves@redhat.com>
8898
8899 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8900 types with more than one parameter as prototyped.
8901
9a24775b
PA
89022017-09-04 Pedro Alves <palves@redhat.com>
8903
8904 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8905 (disassemble_command): Use gdb_disassembly_flags instead of bare
8906 int.
8907 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8908 (dump_insns, do_mixed_source_and_assembly_deprecated)
8909 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8910 Use gdb_disassembly_flags instead of bare int.
8911 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8912 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8913 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8914 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8915 (enum gdb_disassembly_flag): ... values of this new enumeration.
8916 (gdb_disassembly_flags): Define.
8917 (gdb_disassembly)
8918 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8919 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8920 gdb_disassembly_flags instead of bare int.
8921 * record-btrace.c (btrace_insn_history)
8922 (record_btrace_insn_history, record_btrace_insn_history_range)
8923 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8924 instead of bare int.
8925 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8926 Use gdb_disassembly_flags instead of bare int.
8927 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8928 Define.
8929 * target-delegates.c: Regenerate.
8930 * target.c (target_insn_history, target_insn_history_from)
8931 (target_insn_history_range): Use gdb_disassembly_flags instead of
8932 bare int.
8933 * target.h: Include "disasm.h".
8934 (struct target_ops) <to_insn_history, to_insn_history_from,
8935 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8936 int.
8937 (target_insn_history, target_insn_history_from)
8938 (target_insn_history_range): Use gdb_disassembly_flags instead of
8939 bare int.
8940
80a65e9b
SM
89412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8942
8943 * cli/cli-script.c (build_command_line): For if/while commands,
8944 check whether args is empty.
8945
6b66338c
SM
89462017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8947
8948 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8949 (enum command_control_type): Likewise.
8950 (struct command_line): Likewise.
8951 (free_command_lines): Likewise.
8952 (struct command_lines_deleter): Likewise.
8953 (command_line_up): Likewise.
8954 (read_command_lines): Likewise.
8955 (read_command_lines_1): Likewise.
8956 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8957 (enum command_control_type): Likewise.
8958 (struct command_line): Likewise.
8959 (free_command_lines): Likewise.
8960 (struct command_lines_deleter): Likewise.
8961 (command_line_up): Likewise.
8962 (read_command_lines): Likewise.
8963 (read_command_lines_1): Likewise.
8964 * breakpoint.h: Include cli/cli-script.h.
8965 * extension-priv.h: Likewise.
8966 * gdbcmd.h: Likewise.
8967
51abb421
PA
89682017-09-04 Pedro Alves <palves@redhat.com>
8969
8970 * ada-lang.c (is_known_support_routine): Move sal declaration to
8971 where it is initialized.
8972 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8973 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8974 (clear_command, update_static_tracepoint): Remove init_sal
8975 references. Move declarations closer to initializations.
8976 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8977 initializations.
8978 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8979 references. Move sal declarations closer to initializations.
8980 * frame.c (find_frame_sal): Return a symtab_and_line via function
8981 return instead of output parameter. Remove init_sal references.
8982 * frame.h (find_frame_sal): Return a symtab_and_line via function
8983 return instead of output parameter.
8984 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8985 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8986 instead of memset.
8987 (gdbscm_find_pc_line): Remove init_sal reference.
8988 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8989 references. Move declarations closer to initializations.
8990 * infcmd.c (set_step_frame): Update. Move declarations closer to
8991 initializations.
8992 (finish_backward): Remove init_sal references. Move declarations
8993 closer to initializations.
8994 * infrun.c (process_event_stop_test, handle_step_into_function)
8995 (insert_hp_step_resume_breakpoint_at_frame)
8996 (insert_step_resume_breakpoint_at_caller): Likewise.
8997 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8998 (symbol_to_sal): Likewise.
8999 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
9000 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
9001 to its initialization.
9002 * reverse.c (save_bookmark_command): Use new/delete. Remove
9003 init_sal references. Move declarations closer to initializations.
9004 * source.c (get_current_source_symtab_and_line): Remove brace
9005 initialization.
9006 (set_current_source_symtab_and_line): Now takes the sal by const
9007 reference. Remove brace initialization.
9008 (line_info): Remove init_sal reference.
9009 * source.h (set_current_source_symtab_and_line): Now takes a
9010 symtab_and_line via const reference.
9011 * stack.c (set_current_sal_from_frame): Adjust.
9012 (print_frame_info): Adjust.
9013 (get_last_displayed_sal): Return the sal via function return
9014 instead of via output parameter. Simplify.
9015 (frame_info): Adjust.
9016 * stack.h (get_last_displayed_sal): Return the sal via function
9017 return instead of via output parameter.
9018 * symtab.c (init_sal): Delete.
9019 (find_pc_sect_line): Remove init_sal references. Move
9020 declarations closer to initializations.
9021 (find_function_start_sal): Remove init_sal references. Move
9022 declarations closer to initializations.
9023 * symtab.h (struct symtab_and_line): In-class initialize all
9024 fields.
9025 * tracepoint.c (set_traceframe_context)
9026 (print_one_static_tracepoint_marker): Remove init_sal references.
9027 Move declarations closer to initializations.
9028 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
9029 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
9030 declarations closer to initializations.
9031 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
9032 init_sal references. Adjust.
9033
6c5b2ebe
PA
90342017-09-04 Pedro Alves <palves@redhat.com>
9035
9036 * ax-gdb.c (agent_command_1): Use range-for.
9037 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9038 * breakpoint.c: Include "common/array-view.h".
9039 (init_breakpoint_sal, create_breakpoint_sal): Change sals
9040 parameter from struct symtabs_and_lines to
9041 array_view<symtab_and_line>. Adjust. Use range-for. Update.
9042 (breakpoint_sals_to_pc): Change sals parameter from struct
9043 symtabs_and_lines to std::vector reference.
9044 (check_fast_tracepoint_sals): Change sals parameter from struct
9045 symtabs_and_lines to std::array_view. Use range-for.
9046 (decode_static_tracepoint_spec): Return a std::vector instead of
9047 symtabs_and_lines. Update.
9048 (create_breakpoint): Update.
9049 (break_range_command, until_break_command, clear_command): Update.
9050 (base_breakpoint_decode_location, bkpt_decode_location)
9051 (bkpt_probe_create_sals_from_location)
9052 (bkpt_probe_decode_location, tracepoint_decode_location)
9053 (tracepoint_probe_decode_location)
9054 (strace_marker_create_sals_from_location): Return a std::vector
9055 instead of symtabs_and_lines.
9056 (strace_marker_create_breakpoints_sal): Update.
9057 (strace_marker_decode_location): Return a std::vector instead of
9058 symtabs_and_lines. Update.
9059 (update_breakpoint_locations): Change struct symtabs_and_lines
9060 parameters to gdb::array_view. Adjust.
9061 (location_to_sals): Return a std::vector instead of
9062 symtabs_and_lines. Update.
9063 (breakpoint_re_set_default): Use std::vector instead of struct
9064 symtabs_and_lines.
9065 (decode_location_default): Return a std::vector instead of
9066 symtabs_and_lines. Update.
9067 * breakpoint.h: Include "common/array-view.h".
9068 (struct breakpoint_ops) <decode_location>: Now returns a
9069 std::vector instead of returning a symtabs_and_lines via output
9070 parameter.
9071 (update_breakpoint_locations): Change sals parameters to use
9072 gdb::array_view.
9073 * cli/cli-cmds.c (edit_command, list_command): Update to use
9074 std::vector and gdb::array_view.
9075 (ambiguous_line_spec): Adjust to use gdb::array_view and
9076 range-for.
9077 (compare_symtabs): Rename to ...
9078 (cmp_symtabs): ... this. Change parameters to symtab_and_line
9079 const reference and adjust.
9080 (filter_sals): Rewrite using std::vector and standard algorithms.
9081 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
9082 (jump_command): Update to use std::vector.
9083 * linespec.c (struct linespec_state) <canonical_names>: Update
9084 comment.
9085 (add_sal_to_sals_basic): Delete.
9086 (add_sal_to_sals, filter_results, convert_results_to_lsals)
9087 (decode_line_2, create_sals_line_offset)
9088 (convert_address_location_to_sals, convert_linespec_to_sals)
9089 (convert_explicit_location_to_sals, parse_linespec)
9090 (event_location_to_sals, decode_line_full, decode_line_1)
9091 (decode_line_with_current_source)
9092 (decode_line_with_last_displayed, decode_objc)
9093 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
9094 (linespec_result::~linespec_result): Adjust to use std::vector
9095 instead of symtabs_and_lines.
9096 * linespec.h (linespec_sals::sals): Now a std::vector.
9097 (struct linespec_result): Use std::vector, bool, and in-class
9098 initialization.
9099 (decode_line_1, decode_line_with_current_source)
9100 (decode_line_with_last_displayed): Return std::vector.
9101 * macrocmd.c (info_macros_command): Use std::vector.
9102 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
9103 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
9104 std::vector.
9105 * probe.h (parse_probes): Return a std::vector.
9106 * python/python.c (gdbpy_decode_line): Use std::vector and
9107 gdb::array_view.
9108 * source.c (select_source_symtab, line_info): Use std::vector.
9109 * stack.c (func_command): Use std::vector.
9110 * symtab.h (struct symtabs_and_lines): Delete.
9111 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
9112
7c44b49c
PA
91132017-09-04 Pedro Alves <palves@redhat.com>
9114
9115 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9116 unittests/array-view-selftests.c.
9117 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
9118 * common/array-view.h: New file.
9119 * unittests/array-view-selftests.c: New file.
9120
e439fa14
PA
91212017-09-04 Pedro Alves <palves@redhat.com>
9122
9123 * cli/cli-cmds.c (edit_command): Pass message to
9124 ambiguous_line_spec.
9125 (list_command): Pass message to ambiguous_line_spec. Say
9126 "first"/"last" instead of "start" and "end" to be consistent with
9127 the manual.
9128 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
9129 them to print formatted message.
9130
7525b645
PA
91312017-09-04 Pedro Alves <palves@redhat.com>
9132
9133 * btrace.c (ftrace_add_pt): Pass btrace_insn to
9134 ftrace_update_insns by reference instead of pointer.
9135
badc0020
YQ
91362017-09-04 Yao Qi <yao.qi@linaro.org>
9137
9138 * i386-go32-tdep.c: Include x86-xstate.h.
9139 (i386_go32_init_abi): Call i386_target_description.
9140 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9141 if xcr0 is X86_XSTATE_X87_MASK.
9142 * i386-tdep.h (tdesc_i386): Remove the declaration.
9143 (tdesc_i386_mmx): Likewise.
9144
d78bdb54
YQ
91452017-09-04 Yao Qi <yao.qi@linaro.org>
9146
9147 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9148 X86_XSTATE_SSE_MASK instead of 0.
9149
ca1fa5ee
YQ
91502017-09-04 Yao Qi <yao.qi@linaro.org>
9151
9152 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9153 i386_target_description.
9154 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9155 i386_target_description.
9156 * i386-tdep.c (i386_gdbarch_init): Likewise.
9157
2434b019
YQ
91582017-09-04 Yao Qi <yao.qi@linaro.org>
9159
9160 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9161 (x86_darwin_init_abi_64): Call amd64_target_description.
9162 * amd64-dicos-tdep.c: Likewise.
9163 * amd64-fbsd-nat.c: Likewise.
9164 * amd64-fbsd-tdep.c: Likewise.
9165 * amd64-nbsd-tdep.c: Likewise.
9166 * amd64-obsd-tdep.c: Likewise.
9167 * amd64-sol2-tdep.c: Likewise.
9168 * amd64-windows-tdep.c: Likewise.
9169 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9170
0860c437
SM
91712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9172
9173 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9174 (btrace_function) <insn>: Change type to use std::vector.
9175 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9176 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9177 ftrace_update_insns, ftrace_compute_global_level_offset,
9178 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9179 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9180 change to std::vector.
9181 (ftrace_update_insns): Adjust to change to std::vector, change
9182 type of INSN parameter.
9183 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9184 * record-btrace.c (btrace_call_history_insn_range,
9185 btrace_compute_src_line_range,
9186 record_btrace_frame_prev_register): Adjust to change to
9187 std::vector.
9188 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9189 to change to std::vector.
9190
0638b7f9
TT
91912017-09-03 Tom Tromey <tom@tromey.com>
9192
9193 * corefile.c (reopen_exec_file): Use std::string.
9194
8f84fb0e
TT
91952017-09-03 Tom Tromey <tom@tromey.com>
9196
9197 * compile/compile.c (compile_register_name_mangled): Return
9198 std::string.
9199 * compile/compile-loc2c.c (pushf_register_address): Update.
9200 (pushf_register): Update.
9201 * compile/compile-c-types.c (convert_array): Update.
9202 * compile/compile-c-symbols.c (generate_vla_size): Update.
9203 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9204 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9205 (convert_one_symbol): Update.
9206 (generate_c_for_for_one_variable): Update.
9207 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9208 std::string.
9209 (generate_register_struct): Update.
9210 * compile/compile-internal.h (c_get_range_decl_name): Return a
9211 std::string.
9212 (compile_register_name_mangled): Return std::string.
9213
18e9961f
TT
92142017-09-03 Tom Tromey <tom@tromey.com>
9215
9216 * utils.c (perror_string): Return a std::string.
9217 (throw_perror_with_name, perror_warning_with_name): Update.
9218
45343786
TT
92192017-09-03 Tom Tromey <tom@tromey.com>
9220
9221 * demangle.c (demangle_command): Use std::string,
9222 unique_xmalloc_ptr.
9223
b57af503
TT
92242017-09-03 Tom Tromey <tom@tromey.com>
9225
9226 * cli/cli-setshow.c (do_set_command): Use std::string.
9227
6eecf35f
TT
92282017-09-03 Tom Tromey <tom@tromey.com>
9229
9230 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9231
56496dd4
TT
92322017-09-03 Tom Tromey <tom@tromey.com>
9233
9234 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9235
e91a1fa7
TT
92362017-09-03 Tom Tromey <tom@tromey.com>
9237
9238 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9239 gdb::unique_xmalloc_ptr.
9240
7ffd83d7
TT
92412017-09-03 Tom Tromey <tom@tromey.com>
9242
9243 * thread.c (print_thread_info_1): Use string_printf.
9244 (thread_apply_command, thread_apply_all_command): Use
9245 std::string.
9246
1ccbe998
TT
92472017-09-03 Tom Tromey <tom@tromey.com>
9248
9249 * valprint.c (val_print_string): Update.
9250 * gdbcore.h (memory_error_message): Return std::string.
9251 * corefile.c (memory_error_message): Return std::string.
9252 (memory_error): Update.
9253 * breakpoint.c (insert_bp_location): Update.
9254
23fdd69e
SM
92552017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9256
9257 * target/waitstatus.h (target_waitstatus_to_string): Change
9258 return type to std::string.
9259 * target/waitstatus.c (target_waitstatus_to_string): Return
9260 std::string.
9261 * target.h (target_waitstatus_to_string): Remove declaration.
9262 * infrun.c (resume, clear_proceed_status_thread,
9263 print_target_wait_results, do_target_wait, save_waitstatus,
9264 stop_all_threads): Adjust.
9265 * record-btrace.c (record_btrace_wait): Adjust.
9266 * target-debug.h
9267 (target_debug_print_struct_target_waitstatus_p): Adjust.
9268
5c811d30
JK
92692017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9270
9271 PR gdb/22046
9272 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9273 detection.
9274
0a2dde4a
SDJ
92752017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9276
9277 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9278 for setting/unsetting environment variables on the remote target.
9279 (New remote packets): Add entries for QEnvironmentHexEncoded,
9280 QEnvironmentUnset and QEnvironmentReset.
9281 * common/environ.c (gdb_environ::operator=): Extend method to
9282 handle m_user_set_env_list and m_user_unset_env_list.
9283 (gdb_environ::clear): Likewise.
9284 (match_var_in_string): Change type of first parameter from 'char
9285 *' to 'const char *'.
9286 (gdb_environ::set): Extend method to handle
9287 m_user_set_env_list and m_user_unset_env_list.
9288 (gdb_environ::unset): Likewise.
9289 (gdb_environ::clear_user_set_env): New method.
9290 (gdb_environ::user_set_envp): Likewise.
9291 (gdb_environ::user_unset_envp): Likewise.
9292 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9293 m_user_unset_env_list on move constructor/assignment.
9294 (unset): Add new default parameter 'update_unset_list = true'.
9295 (clear_user_set_env): New method.
9296 (user_set_envp): Likewise.
9297 (user_unset_envp): Likewise.
9298 (m_user_set_env_list): New std::set.
9299 (m_user_unset_env_list): Likewise.
9300 * common/rsp-low.c (hex2str): New function.
9301 (bin2hex): New overload for bin2hex function.
9302 * common/rsp-low.c (hex2str): New prototype.
9303 (str2hex): New overload prototype.
9304 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9305 QEnvironmentUnset and QEnvironmentReset.
9306 (remote_protocol_features): Add QEnvironmentHexEncoded,
9307 QEnvironmentUnset and QEnvironmentReset packets.
9308 (send_environment_packet): New function.
9309 (extended_remote_environment_support): Likewise.
9310 (extended_remote_create_inferior): Call
9311 extended_remote_environment_support.
9312 (_initialize_remote): Add QEnvironmentHexEncoded,
9313 QEnvironmentUnset and QEnvironmentReset packet configs.
9314 * unittests/environ-selftests.c (gdb_selftest_env_var):
9315 New variable.
9316 (test_vector_initialization): New function.
9317 (test_init_from_host_environ): Likewise.
9318 (test_reinit_from_host_environ): Likewise.
9319 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9320 Likewise.
9321 (test_unset_set_empty_vector): Likewise.
9322 (test_vector_clear): Likewise.
9323 (test_std_move): Likewise.
9324 (test_move_constructor):
9325 (test_self_move): Likewise.
9326 (test_set_unset_reset): Likewise.
9327 (run_tests): Rewrite in terms of the functions above.
9328
654670a4
WP
93292017-08-31 Weimin Pan <weimin.pan@oracle.com>
9330
9331 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9332 (adi_available): Use a temp variable of type CORE_ADDR as argument
9333 3 when calling target_auxv_search.
9334 (adi_normalize_address): Use masks and xor operators to calculate
9335 normalized address.
9336 (adi_read_versions, adi_write_versions, adi_print_versions)
9337 (do_examine, do_assign): Use paddress.
9338
7755ddb7
JB
93392017-08-29 John Baldwin <jhb@FreeBSD.org>
9340
9341 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9342 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9343 out of loop and add supply of FIR.
9344 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9345 add collect of FIR.
9346
fd437cbc
SM
93472017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9348
3804a343 9349 PR gdb/21827
fd437cbc
SM
9350 * cli/cli-script.c (define_command): Don't convert command name
9351 to lower case.
9352
988f6b3d
JB
93532017-08-25 Joel Brobecker <brobecker@adacore.com>
9354
9355 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9356 Update all callers accordingly. Remove all code blocks handling
9357 the case where DISPP is not NULL.
9358
663c44ac
JK
93592017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9360
9361 PR symtab/22003
9362 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9363 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9364 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9365
f1902523
JK
93662017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9367
9368 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9369 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9370 (read_comp_units_from_section): New parameter abbrev_section, use
9371 read_and_check_comp_unit_head, allocate signatured_type if needed.
9372 (create_all_comp_units): Update read_comp_units_from_section caller.
9373
87215ad1
SDJ
93742017-08-23 Pedro Alves <palves@redhat.com>
9375
9376 PR remote/21852
9377 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9378 to null_ptid and switch to thread without reading the registers
9379 after adding the inferior.
9380
6e41ddec
JK
93812017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9382
9383 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9384 compile-gcc.
9385 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9386 (compile_to_object): Implement compile_gcc.
9387 (_initialize_compile): Install "set compile-gcc". Initialize
9388 compile_gcc.
9389
e68c32d5
JK
93902017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9391
9392 * compile/compile.c (compile_to_object): Conditionally call
9393 set_verbose. Conditionally call compile or compile_v0.
9394
58afddc6
WP
93952017-08-07 Weimin Pan <weimin.pan@oracle.com>
9396
9397 * sparc64-tdep.h: (adi_normalize_address): New export.
9398 * sparc-nat.h: (open_adi_tag_fd): New export.
9399 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9400 * sparc64-linux-tdep.c:
9401 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9402 (sparc64_linux_handle_segmentation_fault): New function.
9403 (sparc64_linux_init_abi): Register
9404 sparc64_linux_handle_segmentation_fault
9405 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9406 (sparc64_addr_bits_remove): New function.
9407 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9408 (MAX_PROC_NAME_SIZE): New macro.
9409 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9410 (sparc64adilist): New variable.
9411 (adi_proc_list): New variable.
9412 (find_adi_info): New function.
9413 (add_adi_info): New function.
9414 (get_adi_info_proc): New function.
9415 (get_adi_info): New function.
9416 (info_adi_command): New function.
9417 (read_maps_entry): New function.
9418 (adi_available): New function.
9419 (adi_normalize_address): New function.
9420 (adi_align_address): New function.
9421 (adi_convert_byte_count): New function.
9422 (adi_tag_fd): New function.
9423 (adi_is_addr_mapped): New function.
9424 (adi_read_versions): New function.
9425 (adi_write_versions): New function.
9426 (adi_print_versions): New function.
9427 (do_examine): New function.
9428 (do_assign): New function.
9429 (adi_examine_command): New function.
9430 (adi_assign_command): New function.
9431 (_initialize_sparc64_adi_tdep): New function.
9432
11db9430
SM
94332017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9434
9435 * breakpoint.c (breakpoints_info): Rename to ...
9436 (info_breakpoints_command): ... this.
9437 (watchpoints_info): Rename to ...
9438 (info_watchpoints_command): ... this.
9439 (tracepoints_info): Rename to ...
9440 (info_tracepoints_command): ... this.
9441 (_initialize_breakpoint): Adjust.
9442 * dcache.c (dcache_info): Rename to ...
9443 (info_display_command): ... this.
9444 (_initialize_dcache): Adjust.
9445 * frame.h (args_info): Rename to ...
9446 (info_args_command): ... this.
9447 (locals_info): Rename to ...
9448 (info_locals_command): ... this.
9449 * infcmd.c (nofp_registers_info): Rename to ...
9450 (info_registers_command): ... this.
9451 (float_info): Rename to ...
9452 (info_float_command): ... this.
9453 (program_info): Rename to ...
9454 (info_program_command): ... this.
9455 (all_registers_info): Rename to ...
9456 (info_all_registers_command): ... this.
9457 (vector_info): Rename to ...
9458 (info_vector_command): ... this.
9459 (float_info): Rename to ...
9460 (info_float_command): ... this.
9461 (_initialize_infcmd): Adjust.
9462 * inferior.h (term_info): Rename to ...
9463 (info_terminal_command): ... this.
9464 * inflow.c (term_info): Rename to ...
9465 (info_terminal_command): ... this.
9466 (_initialize_inflow): Adjust.
9467 * infrun.c (signals_info): Rename to ...
9468 (info_signals_command): ... this.
9469 (_initialize_infrun): Adjust.
9470 * objc-lang.c (classes_info): Rename to ...
9471 (info_classes_command): ... this.
9472 (selectors_info): Rename to ...
9473 (info_selectors_command): ... this.
9474 (_initialize_objc_language): Adjust.
9475 * printcmd.c (sym_info): Rename to ...
9476 (info_symbol_command): ... this.
9477 (address_info): Rename to ...
9478 (info_address_command): ... this.
9479 (display_info): Rename to ...
9480 (info_display_command): ... this.
9481 (_initialize_printcmd): Adjust.
9482 * reverse.c (bookmarks_info): Rename to ...
9483 (info_breakpoints_command): ... this.
9484 (_initialize_reverse): Adjust.
9485 * ser-go32.c (dos_info): Rename to ...
9486 (info_serial_command): ... this.
9487 (_initialize_ser_dos): Adjust.
9488 * skip.c (skip_info): Rename to ...
9489 (info_skip_command): ... this.
9490 (_initialize_step_skip): Adjust.
9491 * source.c (line_info): Rename to ...
9492 (info_line_command): ... this.
9493 (source_info): Rename to ...
9494 (info_source_command)
9495 * stack.c (frame_info): Rename to ...
9496 (info_frame_command): ... this.
9497 (locals_info): Rename to ...
9498 (info_locals_command): ... this.
9499 (args_info): Rename to ...
9500 (info_args_command): ... this.
9501 (_initialize_stack): Adjust.
9502 * symtab.c (sources_info): Rename to ...
9503 (info_sources_command): ... this.
9504 (variables_info): Rename to ...
9505 (info_variables_command): ... this.
9506 (functions_info): Rename to ...
9507 (info_functions_command): ... this.
9508 (types_info): Rename to ...
9509 (info_types_command): ... this.
9510 (_initialize_symtab): Adjust.
9511 * target.c (target_info): Rename to ...
9512 (info_target_command): ... this.
9513 (initialize_targets): Adjust.
9514 * tracepoint.c (tvariables_info): Rename to ...
9515 (info_tvariables_command): ... this.
9516 (scope_info): Rename to ...
9517 (info_scope_command): ... this.
9518 (trace_dump_actions): Adjust.
9519 (_initialize_tracepoint): Adjust.
9520
b270e6f9
TT
95212017-08-22 Tom Tromey <tom@tromey.com>
9522
9523 * breakpoint.h (install_breakpoint): Update.
9524 * breakpoint.c (add_solib_catchpoint): Update.
9525 (install_breakpoint): Change argument to a std::unique_ptr.
9526 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9527 (create_breakpoint_sal, create_breakpoint): Update.
9528 (watch_command_1, catch_exec_command_1)
9529 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9530 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9531 Return the breakpoint.
9532 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9533 (new_single_step_breakpoint): Update.
9534 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9535 std::unique_ptr.
9536 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9537 std::unique_ptr.
9538 * break-catch-sig.c (create_signal_catchpoint): Use
9539 std::unique_ptr.
9540 * ada-lang.c (create_ada_exception_catchpoint): Use
9541 std::unique_ptr.
9542
36bd8eaa
TT
95432017-08-22 Tom Tromey <tom@tromey.com>
9544
9545 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9546
56f37645
TT
95472017-08-22 Tom Tromey <tom@tromey.com>
9548
9549 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9550 (lookup_partial_symbol): Update.
9551
0b581c69
TT
95522017-08-22 Tom Tromey <tom@tromey.com>
9553
9554 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9555 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9556 (find_and_open_source, symtab_to_fullname): Update.
9557 * psymtab.c (psymtab_to_fullname): Update.
9558
14278e1f
TT
95592017-08-22 Tom Tromey <tom@tromey.com>
9560
9561 * exec.c (exec_file_attach): Update.
9562 * linux-thread-db.c (try_thread_db_load): Update.
9563 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9564 * utils.c (gdb_realpath): Change return type.
9565 (gdb_realpath_keepfile): Update.
9566 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9567 (_initialize_utils): Register the new self test.
9568 * source.c (openp): Update.
9569 (find_and_open_source): Update.
9570 * nto-tdep.c (nto_find_and_open_solib): Update.
9571 * main.c (set_gdb_data_directory): Update.
9572 (captured_main_1): Update.
9573 * dwarf2read.c (dwarf2_get_dwz_file): Update
9574 (dw2_map_symbol_filenames): Update.
9575 * auto-load.c (auto_load_safe_path_vec_update): Update.
9576 (filename_is_in_auto_load_safe_path_vec): Change type of
9577 "filename_realp".
9578 (auto_load_objfile_script): Update.
9579 (file_is_auto_load_safe): Update. Use std::string.
9580 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9581
4971c9a7
TT
95822017-08-22 Tom Tromey <tom@tromey.com>
9583
9584 * utils.c (gdb_realpath_keepfile): Return a
9585 gdb::unique_xmalloc_ptr.
9586 * exec.c (exec_file_attach): Update.
9587 * utils.h (gdb_realpath_keepfile): Return a
9588 gdb::unique_xmalloc_ptr.
9589
e3e41d58
TT
95902017-08-22 Tom Tromey <tom@tromey.com>
9591
9592 * compile/compile.c (compile_file_command): Use
9593 gdb::unique_xmalloc_ptr, std::string.
9594 * utils.c (gdb_abspath): Change return type.
9595 * source.c (openp): Update.
9596 * objfiles.c (allocate_objfile): Update.
9597 * main.c (set_gdb_data_directory): Update.
9598 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9599
0d999a6e
ZZ
96002017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9601
9602 * cli-cmds.c (list_commands): List actual code around more than
9603 one location.
9604
329d5e7e
JB
96052017-08-21 John Baldwin <jhb@FreeBSD.org>
9606
9607 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9608
bf223d3e
PA
96092017-08-21 Pedro Alves <palves@redhat.com>
9610
9611 PR gdb/19487
9612 * c-exp.y (variable production): Handle function aliases.
9613 * minsyms.c (msymbol_is_text): New function.
9614 * minsyms.h (msymbol_is_text): Declare.
9615 * symtab.c (find_function_alias_target): New function.
9616 * symtab.h (find_function_alias_target): Declare.
9617
c973d0aa
PA
96182017-08-21 Pedro Alves <palves@redhat.com>
9619
9620 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9621 typedefs.
9622 * typeprint.c (whatis_exp): If handling "whatis", and expression
9623 is OP_TYPE, strip one typedef level. Otherwise don't strip
9624 typedefs here.
9625 * valops.c (value_cast): Save "to" type before resolving
9626 stubs/typedefs. Use that type as resulting value's type.
9627
2989a365
TT
96282017-08-18 Tom Tromey <tom@tromey.com>
9629 Pedro Alves <palves@redhat.com>
9630
9631 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9632 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9633 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9634 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9635 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9636 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9637 (linux_get_siginfo_data): Add "thread" argument. Use
9638 scoped_restore.
9639 * linux-nat.c (linux_child_follow_fork)
9640 (check_stopped_by_watchpoint): Use scoped_restore.
9641 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9642 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9643 (restore_inferior_ptid, save_inferior_ptid): Remove.
9644 * btrace.c (btrace_fetch): Use scoped_restore.
9645 * bsd-uthread.c (bsd_uthread_fetch_registers)
9646 (bsd_uthread_store_registers): Use scoped_restore.
9647 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9648 scoped_restore.
9649 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9650 (aix_thread_xfer_partial): Use scoped_restore.
9651 * inferior.h (save_inferior_ptid): Remove.
9652
e60eb288
YQ
96532017-08-18 Yao Qi <yao.qi@linaro.org>
9654
9655 PR tdep/21818
9656 * arm-tdep.c (gdb_print_insn_arm): Mark
9657 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9658
6d580b63
YQ
96592017-08-18 Yao Qi <yao.qi@linaro.org>
9660
9661 * NEWS: Mention GDBserver's new option "--selftest".
9662 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9663 * selftest.c: Move it to common/selftest.c.
9664 * selftest.h: Move it to common/selftest.h.
9665 * selftest-arch.c (reset): New function.
9666 (tests_with_arch): Call reset.
9667
86dcbf50
YQ
96682017-08-18 Yao Qi <yao.qi@linaro.org>
9669
9670 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9671 instead of exception_fprintf and printf_filtered.
9672
7649770c
YQ
96732017-08-18 Yao Qi <yao.qi@linaro.org>
9674
9675 * selftest.c (register_self_test): Rename it to
9676 selftests::register_test.
9677 (run_self_tests): selftest::run_tests.
9678 * selftest.h: Update declarations.
9679 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9680 selftests::register_test_foreach_arch.
9681 * selftest-arch.h: Update declaration.
9682 * aarch64-tdep.c: Update.
9683 * arm-tdep.c: Likewise.
9684 * disasm-selftests.c: Likewise.
9685 * dwarf2loc.c: Likewise.
9686 * dwarf2-frame.c: Likewise.
9687 * findvar.c: Likewise.
9688 * gdbarch-selftests.c: Likewise.
9689 * maint.c (maintenance_selftest): Likewise.
9690 * regcache.c: Likewise.
9691 * rust-exp.y: Likewise.
9692 * selftest-arch.c: Likewise.
9693 * unittests/environ-selftests.c: Likewise.
9694 * unittests/function-view-selftests.c: Likewise.
9695 * unittests/offset-type-selftests.c: Likewise.
9696 * unittests/optional-selftests.c: Likewise.
9697 * unittests/scoped_restore-selftests.c: Likewise.
9698 * utils-selftests.c: Likewise.
9699
b0cba12e
PA
97002017-08-17 Pedro Alves <palves@redhat.com>
9701
9702 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9703 local.
9704
4c8aa72d
PA
97052017-08-17 Pedro Alves <palves@redhat.com>
9706
9707 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9708 field.
9709 (reset_die_in_process): Delete, replaced by ...
9710 (process_die_scope): ... this new class. Make it responsible for
9711 freeing cu->line_header too.
9712 (process_die): Use process_die_scope.
9713 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9714 cu->line_header_die_owner. Don't release the line header if it's
9715 owned by the CU.
9716 (setup_type_unit_groups): Make the CU/DIE own the line header.
9717 Don't release the line header here.
9718
ba713918
AL
97192017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9720
9721 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9722
44d0fb3a
RK
97232017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9724
9725 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9726 Single-Key mode
9727
a5afdb16
RK
97282017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9729
9730 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9731 mode command list.
9732
47613aeb
SH
97332017-08-15 Stafford Horne <shorne@gmail.com>
9734
9735 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9736
9c3cc999
SH
97372017-08-15 Stafford Horne <shorne@gmail.com>
9738
9739 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9740
206726fb
SDJ
97412017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9742
9743 PR gdb/21954
9744 * infcmd.c (unset_environment_command): Use the 'clear' method on
9745 the environment instead of resetting it.
9746
0335ac6d
JB
97472017-08-15 John Baldwin <jhb@FreeBSD.org>
9748
9749 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9750 platforms.
9751
d3abe1c8
TT
97522017-08-14 Tom Tromey <tom@tromey.com>
9753
9754 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9755 (print_binary_chars): Likewise.
9756 (BITS_IN_BYTES): Remove.
9757
d6382fff
TT
97582017-08-14 Tom Tromey <tom@tromey.com>
9759
9760 PR gdb/21675
9761 * valprint.c (LOW_ZERO): Change value to 034.
9762 (print_octal_chars): Add static_asserts for octal constants.
9763 * printcmd.c (print_scalar_formatted): Add 'd' case.
9764
f978cb06
TT
97652017-08-11 Tom Tromey <tom@tromey.com>
9766
9767 * symfile.c (add_symbol_file_command): Use std::vector.
9768
2f5404b3
TT
97692017-08-14 Tom Tromey <tom@tromey.com>
9770
9771 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9772 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9773 std::move.
9774 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9775
de7985c3
PA
97762017-08-11 Pedro Alves <palves@redhat.com>
9777
9778 * infrun.c (process_event_stop_test): Adjust
9779 function_name_is_marked_for_skip call.
9780 * skip.c: Include <list>.
9781 (skiplist_entry): Make it a class with private fields, and
9782 getters/setters.
9783 (skiplist_entry_chain): Delete.
9784 (skiplist_entries): New.
9785 (skiplist_entry_count): Delete.
9786 (highest_skiplist_entry_num): New.
9787 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9788 (add_skiplist_entry): Delete.
9789 (skiplist_entry::skiplist_entry): New.
9790 (skiplist_entry::add_entry): New.
9791 (skip_file_command, skip_function): Adjust.
9792 (compile_skip_regexp): Delete.
9793 (skip_command): Don't compile regexp here. Adjust to use
9794 skiplist_entry::add_entry.
9795 (skip_info): Adjust to use range-for and getters.
9796 (skip_enable_command, skip_disable_command): Adjust to use
9797 range-for and setters.
9798 (skip_delete_command): Adjust to use std::list.
9799 (add_skiplist_entry): Delete.
9800 (skip_file_p): Delete, refactored as ...
9801 (skiplist_entry::do_skip_file_p): ... this new method.
9802 (skip_gfile_p): Delete, refactored as ...
9803 (skiplist_entry::do_gskip_file_p): ... this new method.
9804 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9805 (skiplist_entry::skip_function_p): ... this new method.
9806 (function_name_is_marked_for_skip): Now returns bool, and takes
9807 the function sal by const reference. Adjust to use range-for and
9808 skiplist_entry methods.
9809 (_initialize_step_skip): Remove references to
9810 skiplist_entry_chain, skiplist_entry_count.
9811 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9812 takes the function sal by const reference.
9813
be7d3cd5
YQ
98142017-08-11 Yao Qi <yao.qi@linaro.org>
9815
9816 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9817 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9818 (dwarf2_frame_cache):
9819 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9820 RETURN_MASK_ALL and set *this_case to NULL.
9821 * frame-unwind.h: Update comments.
9822
1c90d9f0
YQ
98232017-08-11 Yao Qi <yao.qi@linaro.org>
9824
9825 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9826 (dwarf2_frame_state_copy_regs): Remove.
9827 (dwarf2_frame_state_free_regs): Remove.
9828 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9829 (dwarf2_restore_rule): Call method .alloc_regs instead of
9830 dwarf2_frame_state_alloc_regs.
9831 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9832 constructor. Call std::move.
9833 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9834 (dwarf2_frame_cache): Likewise.
9835
9836 [GDB_SELF_TEST]: Include selftest.h and
9837 selftest-arch.h.
9838 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9839 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9840 execute_cfa_program_test.
9841
9842 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9843 copy ctor, assignment operator, move assignment.
9844 <alloc_regs>: New method.
9845 <swap>: New method.
9846 (struct dwarf2_frame_state): Delete dtor.
9847 (dwarf2_frame_state_alloc_regs): Remove declaration.
9848 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9849 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9850
afe37d6b
YQ
98512017-08-11 Yao Qi <yao.qi@linaro.org>
9852
9853 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9854 (dwarf2_frame_state::dwarf2_frame_state): New.
9855 (dwarf2_frame_state::~dwarf2_frame_state): New.
9856 (dwarf2_fetch_cfa_info): Update.
9857 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9858 rather than a pointer. Update code.
9859 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9860 dtor.
9861 <data_align, code_align, retaddr_column>: Change them to const.
9862 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9863 to bool.
9864
b348037f
YQ
98652017-08-11 Yao Qi <yao.qi@linaro.org>
9866
9867 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9868 <loc.exp>: New field.
9869 * dwarf2-frame.c (execute_cfa_program): Update.
9870 (dwarf2_frame_prev_register): Update.
9871
e7c9de26
PA
98722017-08-10 Pedro Alves <palves@redhat.com>
9873
9874 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9875
e8c6b620
JB
98762017-08-09 John Baldwin <jhb@FreeBSD.org>
9877
9878 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9879 (fbsd_pending_children): Use std::list.
9880 (fbsd_remember_child): Likewise.
9881 (fbsd_is_child_pending): Likewise.
9882 (fbsd_pending_vfork_done): Use std::forward_list.
9883 (fbsd_add_vfork_done): Likewise.
9884 (fbsd_is_vfork_done_pending): Likewise.
9885 (fbsd_next_vfork_done): Likewise.
9886
e4a26669
JB
98872017-08-09 John Baldwin <jhb@FreeBSD.org>
9888
9889 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9890 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9891 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9892 for `mapfilename'.
9893 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 9894 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 9895
142311d3
JB
98962017-08-09 John Baldwin <jhb@FreeBSD.org>
9897
9898 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9899 "filestuff.h".
9900 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9901
42fa2e0e
TT
99022017-08-09 Tom Tromey <tom@tromey.com>
9903
9904 * skip.c (skiplist_entry): New constructor.
9905 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9906 (skiplist_entry::file_is_glob): Now bool.
9907 (skiplist_entry::file, skiplist_entry::function): Now
9908 std::string.
9909 (make_skip_entry): Return a unique_ptr. Use new.
9910 (free_skiplist_entry, free_skiplist_entry_cleanup)
9911 (make_free_skiplist_entry_cleanup): Remove.
9912 (skip_command, skip_disable_command, add_skiplist_entry)
9913 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9914 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9915 (function_name_is_marked_for_skip): Update.
9916 (skip_delete_command): Update. Use delete.
9917
cd3af38d
JW
99182017-08-09 Jiong Wang <jiong.wang@arm.com>
9919
9920 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9921 (aarch64_linux_core_read_description): New function.
9922 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9923
29592bde
PA
99242017-08-09 Pedro Alves <palves@redhat.com>
9925
9926 * cp-name-parser.y (cp_comp_to_string): Return a
9927 gdb::unique_xmalloc_ptr<char>.
9928 * cp-support.c (replace_typedefs_qualified_name)
9929 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9930 (cp_canonicalize_string_full): Use op= instead of explicit
9931 convertion.
9932 (cp_class_name_from_physname, method_name_from_physname)
9933 (cp_func_name, cp_remove_params): Adjust to use
9934 gdb::unique_xmalloc_ptr<char>.
9935 * cp-support.h (cp_comp_to_string): Return a
9936 gdb::unique_xmalloc_ptr<char>.
9937 * python/py-type.c (typy_lookup_type): Adjust to use
9938 gdb::unique_xmalloc_ptr<char>.
9939
b3340438
L
99402017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9941
9942 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9943
e88e8651
YQ
99442017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9945 Yao Qi <yao.qi@linaro.org>
9946
9947 * cp-support.c (cp_canonicalize_string_full): Use
9948 gdb::unique_xmalloc_ptr<char>.
9949 (cp_canonicalize_string): Likewise.
9950
f5a29eb0
YQ
99512017-08-09 Yao Qi <yao.qi@linaro.org>
9952
9953 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9954 * regformats/i386/amd64-avx-avx512.dat: Remove.
9955 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9956 * regformats/i386/amd64-avx-mpx.dat:Remove.
9957 * regformats/i386/amd64-avx.dat: Remove.
9958 * regformats/i386/amd64-mpx.dat: Remove.
9959 * regformats/i386/i386-avx-avx512.dat: Remove.
9960 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9961 * regformats/i386/i386-avx-mpx.dat: Remove.
9962 * regformats/i386/i386-mmx.dat: Remove.
9963 * regformats/i386/i386-mpx.dat: Remove.
9964
57757c2f
YQ
99652017-08-09 Yao Qi <yao.qi@linaro.org>
9966
9967 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9968 * amd64-tdep.c: Don't include features/i386/x32*.c.
9969 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9970 functions.
9971 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9972 and i386/x32-avx-avx512.
9973 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9974 and i386/x32.xml.
9975 * features/i386/x32-avx-avx512.c: Removed.
9976 * features/i386/x32-avx-avx512.xml: Removed.
9977 * features/i386/x32-avx.c: Removed.
9978 * features/i386/x32-avx.xml: Removed.
9979 * features/i386/x32.c: Removed.
9980 * features/i386/x32.xml: Removed.
9981 * regformats/i386/x32-avx-avx512.dat: Removed.
9982 * regformats/i386/x32-avx.dat: Removed.
9983 * regformats/i386/x32.dat: Removed.
9984
ba7b109b
MR
99852017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9986
9987 PR breakpoints/21886
9988 * mem-break.c (default_memory_insert_breakpoint): Use
9989 `->placed_address' rather than `->reqstd_address' for the
9990 breakpoint location.
9991
e347efc3
MR
99922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9993
9994 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9995 assertions.
9996
0dba2a6c
MR
99972017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9998
9999 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
10000 a union of `tdep_info', `tdesc_data' and `id'.
10001 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
10002 rather than `info.tdep_info'.
10003 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
10004 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10005 * i386-tdep.c (i386_gdbarch_init): Likewise.
10006 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
10007 * mips-tdep.c (mips_gdbarch_init): Likewise.
10008 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10009 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10010 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
10011 `info.tdep_info'.
10012 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
10013 `info.tdep_info'.
10014 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10015 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
10016 `info.tdep_info'.
10017 * spu-tdep.c (spu_gdbarch_init): Likewise.
10018 * gdbarch.h: Regenerate.
10019
16eb6b2d
LS
100202017-08-07 Leszek Swirski <leszeks@google.com>
10021
7b005726 10022 PR symtab/20899
16eb6b2d
LS
10023 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
10024
74cbb09e
SM
100252017-08-07 Simon Marchi <simon.marchi@ericsson.com>
10026
10027 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
10028 (gdbsim_open): Rename gdb_argv args object to argv.
10029
ee0c3293
TT
100302017-08-05 Tom Tromey <tom@tromey.com>
10031
10032 * compile/compile-object-load.c (compile_object_load): Use
10033 gdb::unique_xmalloc_ptr.
10034 * cli/cli-dump.c (scan_filename): Rename from
10035 scan_filename_with_cleanup. Change return type.
10036 (scan_expression): Rename from scan_expression_with_cleanup.
10037 Change return type.
10038 (dump_memory_to_file, dump_value_to_file, restore_command):
10039 Use gdb::unique_xmalloc_ptr. Update.
10040 * cli/cli-cmds.c (find_and_open_script): Use
10041 gdb::unique_xmalloc_ptr.
10042 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
10043 * symmisc.c (maintenance_print_symbols)
10044 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
10045 * symfile.c (symfile_bfd_open, generic_load)
10046 (add_symbol_file_command, remove_symbol_file_command): Use
10047 gdb::unique_xmalloc_ptr.
10048 * source.c (openp): Use gdb::unique_xmalloc_ptr.
10049 * psymtab.c (maintenance_print_psymbols): Use
10050 gdb::unique_xmalloc_ptr.
10051 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
10052 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
10053 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
10054 (reload_shared_libraries_1): Likewise.
10055
3232fabd
TT
100562017-08-05 Tom Tromey <tom@tromey.com>
10057
10058 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
10059 (rust_op_vector, rust_set_vector): New typedefs.
10060 (current_parser): New global.
10061 (work_obstack): Change to pointer type. Update all users.
10062 (rust_ast, pstate): Remove globals.
10063 (struct rust_parser): New.
10064 (%union) <params, field_inits>: Change type.
10065 (start, tuple_expr, unit_expr, struct_expr_list, literal)
10066 (field_expr, expr_list, maybe_expr_list, type_list): Update.
10067 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
10068 (convert_params_to_types, convert_params_to_expression): Change
10069 type of "params".
10070 (ast_string): Change type of "fields".
10071 (rust_parse): Make a rust_parser. Remove cleanups.
10072 (rust_lex_tests): Make and install an auto_obstack.
10073
f02fd774
YQ
100742017-08-04 Yao Qi <yao.qi@linaro.org>
10075
10076 * configure.srv (ipa_x32_linux_regobj): New.
10077 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
10078 instead of X86_TDESC_AVX512.
10079 (initialize_low_tracepoint): Call
10080 init_registers_x32_avx_avx512_linux.
10081
91975afd
YQ
100822017-08-04 Yao Qi <yao.qi@linaro.org>
10083
10084 * utils.h (gdb_argv): Add namespace std for nullptr_t.
10085
2331fa3a
RK
100862017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
10087
10088 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
10089
744e4fe1
TT
100902017-08-03 Tom Tromey <tom@tromey.com>
10091
10092 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
10093 Remove.
10094 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
10095
1c034b67
TT
100962017-08-03 Tom Tromey <tom@tromey.com>
10097
10098 * python/py-param.c (compute_enum_values): Use gdb_argv.
10099
773a1edc
TT
101002017-08-03 Tom Tromey <tom@tromey.com>
10101
10102 * utils.h (struct gdb_argv_deleter): New.
10103 (gdb_argv): New class.
10104 * utils.c (gdb_argv::reset): New method.
10105 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
10106 * tracefile.c (tsave_command): Use gdb_argv.
10107 * top.c (new_ui_command): Use gdb_argv.
10108 * symmisc.c (maintenance_print_symbols)
10109 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
10110 * symfile.c (symbol_file_command, generic_load)
10111 (remove_symbol_file_command): Use gdb_argv.
10112 * stack.c (backtrace_command): Use gdb_argv.
10113 * source.c (add_path, show_substitute_path_command)
10114 (unset_substitute_path_command, set_substitute_path_command):
10115 Use gdb_argv.
10116 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
10117 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
10118 * remote.c (extended_remote_run, remote_put_command)
10119 (remote_get_command, remote_delete_command): Use gdb_argv.
10120 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
10121 (gdbsim_open): Use gdb_argv.
10122 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
10123 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
10124 * procfs.c (procfs_info_proc): Use gdb_argv.
10125 * interps.c (interpreter_exec_cmd): Use gdb_argv.
10126 * infrun.c (handle_command): Use gdb_argv.
10127 * inferior.c (add_inferior_command, clone_inferior_command):
10128 Use gdb_argv.
10129 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10130 * exec.c (exec_file_command): Use gdb_argv.
10131 * cli/cli-cmds.c (alias_command): Use gdb_argv.
10132 * compile/compile.c (build_argc_argv): Use gdb_argv.
10133
0d50bde3
TT
101342017-08-03 Tom Tromey <tom@tromey.com>
10135
10136 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10137
7f968c89
TT
101382017-08-03 Tom Tromey <tom@tromey.com>
10139
10140 * python/python.c (compute_python_string): Return std::string.
10141 (gdbpy_eval_from_control_command): Update.
10142 (do_start_initialization): Use std::string.
10143 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10144 xstrprintf.
10145 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10146 xstrprintf.
10147
3c9ebddd
TT
101482017-08-03 Tom Tromey <tom@tromey.com>
10149
10150 * top.h (do_restore_instream_cleanup): Remove.
10151 * top.c (do_restore_instream_cleanup): Remove.
10152 (read_command_file): Use scoped_restore.
10153 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10154
b51b225e
TT
101552017-08-03 Tom Tromey <tom@tromey.com>
10156
10157 * cli/cli-script.c (execute_user_command)
10158 (execute_control_command): Use scoped_restore.
10159
ac991630
TT
101602017-08-03 Tom Tromey <tom@tromey.com>
10161
10162 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10163 (execute_user_command): Remove user_call_depth; use
10164 user_args_stack's size instead.
10165
898e0c8e
TT
101662017-08-03 Tom Tromey <tom@tromey.com>
10167
10168 * top.h (in_user_command): Remove.
10169 * top.c (in_user_command): Remove.
10170 * cli/cli-script.c (do_restore_user_call_depth)
10171 (execute_user_command): Update.
10172
26fcd5d7
TT
101732017-08-03 Tom Tromey <tom@tromey.com>
10174
10175 * valops.c (search_struct_method): Use gdb::byte_vector.
10176 * valarith.c (value_concat): Use std::vector.
10177 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10178 (simple_search_memory): Likewise.
10179 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10180 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10181 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10182 * elfread.c (elf_rel_plt_read): Use std::string.
10183 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10184 * cli/cli-dump.c (restore_section_callback): Use
10185 gdb::byte_vector.
10186
7c218e6c
TT
101872017-08-03 Tom Tromey <tom@tromey.com>
10188
10189 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10190
31b68d4a
TT
101912017-08-03 Tom Tromey <tom@tromey.com>
10192
10193 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10194 (tui_register_format): Use scoped_restore.
10195
2ec845e7
TT
101962017-08-03 Tom Tromey <tom@tromey.com>
10197
10198 * reverse.c (exec_direction_default): Remove.
10199 (exec_reverse_once): Use scoped_restore.
10200 * remote.c (restore_remote_timeout): Remove.
10201 (remote_flash_erase, remote_flash_write, remote_flash_done)
10202 (readchar, remote_serial_write): Use scoped_restore.
10203 * cli/cli-script.c (struct source_cleanup_lines_args)
10204 (source_cleanup_lines): Remove.
10205 (script_from_file): Use scoped_restore.
10206 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10207 (source_command): Use scoped_restore.
10208
b3bc8453
TT
102092017-08-03 Tom Tromey <tom@tromey.com>
10210
10211 * utils.h (make_cleanup_free_so): Remove.
10212 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10213 * solist.h (struct so_deleter): New.
10214 (so_list_up): New typedef.
10215 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10216
e3ad2841
TT
102172017-08-03 Tom Tromey <tom@tromey.com>
10218
10219 * utils.h (make_cleanup_restore_current_language): Remove.
10220 * utils.c (do_restore_current_language)
10221 (make_cleanup_restore_current_language): Remove.
10222 * parse.c (parse_exp_in_context_1)
10223 (parse_expression_with_language): Use
10224 scoped_restore_current_language.
10225 * mi/mi-main.c (mi_cmd_execute): Use
10226 scoped_restore_current_language.
10227 * language.h (scoped_restore_current_language): New class.
10228
b80cf838
TT
102292017-08-03 Tom Tromey <tom@tromey.com>
10230
10231 * compile/compile.c (cleanup_unlink_file): Remove.
10232 (compile_to_object): Use gdb::unlinker.
10233 (eval_compile_command): Likewise.
10234
fad0444a
TT
102352017-08-03 Tom Tromey <tom@tromey.com>
10236
10237 * utils.h (make_cleanup_fclose): Remove.
10238 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10239
6e7bc05c
TT
102402017-08-03 Tom Tromey <tom@tromey.com>
10241
10242 * top.c (open_terminal_stream): Return gdb_file_up.
10243 (new_ui_command): Update.
10244
4a45905b
TT
102452017-08-03 Tom Tromey <tom@tromey.com>
10246
10247 * source.c (print_source_lines_base, forward_search_command)
10248 (reverse_search_command): Use gdb_file_up.
10249
7cd06d6e
TT
102502017-08-03 Tom Tromey <tom@tromey.com>
10251
10252 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10253
ed166945
TT
102542017-08-03 Tom Tromey <tom@tromey.com>
10255
10256 * cli/cli-cmds.c (find_and_open_script): Change return type.
10257 Remove "streamp" and "full_path" parameters.
10258 (source_script_with_search): Update.
10259 * auto-load.c (source_script_file): Update.
10260 * cli/cli-cmds.h (find_and_open_script): Change type.
10261 (open_script): New struct.
10262
d419f42d
TT
102632017-08-03 Tom Tromey <tom@tromey.com>
10264
10265 * xml-support.c (xml_fetch_content_from_file): Update.
10266 * ui-file.c (stdio_file::open): Update.
10267 * tracefile-tfile.c (tfile_start): Update.
10268 * remote.c (remote_file_put, remote_file_get): Update.
10269 * nat/linux-procfs.c (linux_proc_get_int)
10270 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10271 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10272 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10273 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10274 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10275 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10276 * linux-nat.c (linux_proc_pending_signals): Update.
10277 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10278 (file_closer): Remove.
10279 * compile/compile.c (compile_to_object): Update.
10280 * common/filestuff.h (struct gdb_file_deleter): New.
10281 (gdb_file_up): New typedef.
10282 (gdb_fopen_cloexec): Change return type.
10283 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10284 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10285 (dump_binary_file, restore_binary_file): Update.
10286 * auto-load.c (auto_load_objfile_script_1): Update.
10287
4a2b031d
TT
102882017-08-03 Tom Tromey <tom@tromey.com>
10289
10290 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10291 (info_static_tracepoint_markers_command): Likewise.
10292 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10293 * skip.c (skip_info): Use ui_out_emit_table.
10294 * progspace.c (print_program_space): Use ui_out_emit_table.
10295 * osdata.c (info_osdata): Use ui_out_emit_table.
10296 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10297 ui_out_emit_table.
10298 * linux-thread-db.c (info_auto_load_libthread_db): Use
10299 ui_out_emit_table.
10300 * inferior.c (print_inferior): Use ui_out_emit_table.
10301 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10302 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10303 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10304 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10305 * ui-out.h (class ui_out_emit_table): New.
10306
a4f320fd
MR
103072017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10308
10309 * mips-tdep.c (mips_fpu_type_str): New function.
10310 (mips_dump_tdep): Call it.
10311
a2f1f308
MR
103122017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10313
10314 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10315 `->mips_fpu_type'.
10316
7e5ed83b
XR
103172017-07-31 Xavier Roirand <roirand@adacore.com>
10318
10319 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10320
4c9dc811
XR
103212017-07-27 Xavier Roirand <roirand@adacore.com>
10322
10323 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10324
27d41eac
YQ
103252017-07-26 Yao Qi <yao.qi@linaro.org>
10326
10327 * cli/cli-cmds.c (maintenancechecklist): New variable.
10328 * gdbcmd.h (maintenancechecklist): Declare it.
10329 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10330 Call i386_linux_read_description with different masks.
10331 * maint.c (maintenance_check_command): New function.
10332 (_initialize_maint_cmds): Call add_prefix_cmd.
10333 * target-descriptions.c (tdesc_reg): override operator != and ==.
10334 (tdesc_type): Likewise.
10335 (tdesc_feature): Likewise.
10336 (target_desc): Likewise.
10337 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10338 (maintenance_check_xml_descriptions): New function.
10339 (_initialize_target_descriptions) Add command "xml-descriptions".
10340 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10341
ea03d0d3
YQ
103422017-07-26 Yao Qi <yao.qi@linaro.org>
10343
10344 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10345 Include features/i386/32bit-*.c.
10346 (i386_linux_read_description): Generate target description if it
10347 doesn't exist.
10348 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10349 functions.
10350 * features/i386/32bit-linux.c: Re-generated.
10351 * features/i386/32bit-sse.c: Likewise.
10352 * target-descriptions.c (print_c_feature::visit): Print code to
10353 set register number if needed.
10354 (print_c_feature) <m_next_regnum>: New field.
10355
25aa13e5
YQ
103562017-07-26 Yao Qi <yao.qi@linaro.org>
10357
10358 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10359 (FEATURE_XMLFILES): New.
10360 (FEATURE_CFILES): New.
10361 New rules.
10362 (clean-cfiles): Remove generated c files.
10363 * features/i386/32bit-avx.c: Generated.
10364 * features/i386/32bit-avx512.c: Generated.
10365 * features/i386/32bit-core.c: Generated.
10366 * features/i386/32bit-linux.c: Generated.
10367 * features/i386/32bit-mpx.c: Generated.
10368 * features/i386/32bit-pkeys.c: Generated.
10369 * features/i386/32bit-sse.c: Generated.
10370 * target-descriptions.c: Include algorithm.
10371 (tdesc_element_visitor): Add method visit_end.
10372 (print_c_tdesc): Implement visit_end.
10373 (print_c_tdesc:: m_filename_after_features): Move it to
10374 protected.
10375 (print_c_feature): New class.
10376 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10377 name starts with "i386/32bit-".
10378
6eb1e6a8
YQ
103792017-07-26 Yao Qi <yao.qi@linaro.org>
10380
10381 * target-descriptions.c (tdesc_element_visitor): New class.
10382 (tdesc_element): New class.
10383 (tdesc_reg): Inherit from tdesc_element.
10384 (tdesc_reg::accept): New function.
10385 (tdesc_type): Inherit from tdesc_element.
10386 (tdesc_type::accept): New function.
10387 (tdesc_feature): Inherit from tdesc_element.
10388 (tdesc_feature::accept): New function.
10389 (target_desc): Inherit from tdesc_element.
10390 (target_desc::target_desc): New.
10391 (target_desc::~target_desc): New.
10392 (target_desc::accept): New.
10393 (allocate_target_description): Use new.
10394 (free_target_description): Use delete.
10395 (print_c_tdesc): New class.
10396 (maint_print_c_tdesc_cmd): Adjust.
10397
10398 * features/aarch64.c: Re-generated.
10399 * features/arc-arcompact.c: Re-generated.
10400 * features/arc-v2.c: Re-generated.
10401 * features/arm/arm-with-iwmmxt.c: Re-generated.
10402 * features/arm/arm-with-m.c: Re-generated.
10403 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10404 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10405 * features/arm/arm-with-neon.c: Re-generated.
10406 * features/arm/arm-with-vfpv2.c: Re-generated.
10407 * features/arm/arm-with-vfpv3.c: Re-generated.
10408 * features/i386/amd64-avx-avx512.c: Re-generated.
10409 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10410 * features/i386/amd64-avx.c: Re-generated.
10411 * features/i386/amd64-avx-linux.c: Re-generated.
10412 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10413 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10414 * features/i386/amd64-avx-mpx.c: Re-generated.
10415 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10416 * features/i386/amd64.c: Re-generated.
10417 * features/i386/amd64-linux.c: Re-generated.
10418 * features/i386/amd64-mpx.c: Re-generated.
10419 * features/i386/amd64-mpx-linux.c: Re-generated.
10420 * features/i386/i386-avx-avx512.c: Re-generated.
10421 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10422 * features/i386/i386-avx.c: Re-generated.
10423 * features/i386/i386-avx-linux.c: Re-generated.
10424 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10425 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10426 * features/i386/i386-avx-mpx.c: Re-generated.
10427 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10428 * features/i386/i386.c: Re-generated.
10429 * features/i386/i386-linux.c: Re-generated.
10430 * features/i386/i386-mmx.c: Re-generated.
10431 * features/i386/i386-mmx-linux.c: Re-generated.
10432 * features/i386/i386-mpx.c: Re-generated.
10433 * features/i386/i386-mpx-linux.c: Re-generated.
10434 * features/i386/x32-avx-avx512.c: Re-generated.
10435 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10436 * features/i386/x32-avx.c: Re-generated.
10437 * features/i386/x32-avx-linux.c: Re-generated.
10438 * features/i386/x32.c: Re-generated.
10439 * features/i386/x32-linux.c: Re-generated.
10440 * features/microblaze.c: Re-generated.
10441 * features/microblaze-with-stack-protect.c: Re-generated.
10442 * features/mips64-dsp-linux.c: Re-generated.
10443 * features/mips64-linux.c: Re-generated.
10444 * features/mips-dsp-linux.c: Re-generated.
10445 * features/mips-linux.c: Re-generated.
10446 * features/nds32.c: Re-generated.
10447 * features/nios2.c: Re-generated.
10448 * features/nios2-linux.c: Re-generated.
10449 * features/rs6000/powerpc-32.c: Re-generated.
10450 * features/rs6000/powerpc-32l.c: Re-generated.
10451 * features/rs6000/powerpc-403.c: Re-generated.
10452 * features/rs6000/powerpc-403gc.c : Re-generated.
10453 * features/rs6000/powerpc-405.c: Re-generated.
10454 * features/rs6000/powerpc-505.c: Re-generated.
10455 * features/rs6000/powerpc-601.c: Re-generated.
10456 * features/rs6000/powerpc-602.c: Re-generated.
10457 * features/rs6000/powerpc-603.c: Re-generated.
10458 * features/rs6000/powerpc-604.c: Re-generated.
10459 * features/rs6000/powerpc-64.c: Re-generated.
10460 * features/rs6000/powerpc-64l.c: Re-generated.
10461 * features/rs6000/powerpc-7400.c: Re-generated.
10462 * features/rs6000/powerpc-750.c: Re-generated.
10463 * features/rs6000/powerpc-860.c: Re-generated.
10464 * features/rs6000/powerpc-altivec32.c: Re-generated.
10465 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10466 * features/rs6000/powerpc-altivec64.c: Re-generated.
10467 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10468 * features/rs6000/powerpc-cell32l.c: Re-generated.
10469 * features/rs6000/powerpc-cell64l.c: Re-generated.
10470 * features/rs6000/powerpc-e500.c: Re-generated.
10471 * features/rs6000/powerpc-e500l.c: Re-generated.
10472 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10473 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10474 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10475 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10476 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10477 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10478 * features/rs6000/powerpc-vsx32.c: Re-generated.
10479 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10480 * features/rs6000/powerpc-vsx64.c: Re-generated.
10481 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10482 * features/rs6000/rs6000.c: Re-generated.
10483 * features/s390-linux32.c: Re-generated.
10484 * features/s390-linux32v1.c: Re-generated.
10485 * features/s390-linux32v2.c: Re-generated.
10486 * features/s390-linux64.c: Re-generated.
10487 * features/s390-linux64v1.c: Re-generated.
10488 * features/s390-linux64v2.c: Re-generated.
10489 * features/s390-te-linux64.c: Re-generated.
10490 * features/s390-tevx-linux64.c: Re-generated.
10491 * features/s390-vx-linux64.c: Re-generated.
10492 * features/s390x-linux64.c: Re-generated.
10493 * features/s390x-linux64v1.c: Re-generated.
10494 * features/s390x-linux64v2.c: Re-generated.
10495 * features/s390x-te-linux64.c: Re-generated.
10496 * features/s390x-tevx-linux64.c: Re-generated.
10497 * features/s390x-vx-linux64.c: Re-generated.
10498 * features/sparc/sparc32-solaris.c: Re-generated.
10499 * features/sparc/sparc64-solaris.c: Re-generated.
10500 * features/tic6x-c62x.c: Re-generated.
10501 * features/tic6x-c62x-linux.c: Re-generated.
10502 * features/tic6x-c64x.c: Re-generated.
10503 * features/tic6x-c64x-linux.c: Re-generated.
10504 * features/tic6x-c64xp.c: Re-generated.
10505 * features/tic6x-c64xp-linux.c: Re-generated.
10506
35b4818d
YQ
105072017-07-26 Yao Qi <yao.qi@linaro.org>
10508
10509 * i386-linux-tdep.c (i386_linux_read_description): New function.
10510 (i386_linux_core_read_description): Call
10511 i386_linux_read_description.
10512 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10513 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10514 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10515 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10516 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10517 * x86-linux-nat.c (x86_linux_read_description): Call
10518 i386_linux_read_description.
10519
8e2141c6
YQ
105202017-07-26 Yao Qi <yao.qi@linaro.org>
10521
10522 * NEWS: Mention it.
10523 * features/Makefile (%.c: %.xml): Pass the xml file name to
10524 command "maint print c-tdesc".
10525 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10526 name from 'arg'.
10527
b468ff4c
YQ
105282017-07-26 Yao Qi <yao.qi@linaro.org>
10529
10530 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10531 in-class initialization.
10532 (tdesc_create_feature): Call new instead of XCNEW.
10533 (free_target_description): Ue delete.
10534
b9c0e1b4
JB
105352017-07-25 John Baldwin <jhb@FreeBSD.org>
10536
10537 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10538
a04b5337
YQ
105392017-07-25 Yao Qi <yao.qi@linaro.org>
10540
10541 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10542 constant.
10543 (amd64_x32_init_abi): Likewise.
10544 * amd64-tdep.h (amd64_init_abi): Update declaration.
10545 (amd64_x32_init_abi): Likewise.
10546
02ad7fc2
YQ
105472017-07-25 Yao Qi <yao.qi@linaro.org>
10548
10549 PR tdep/21717
10550 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10551 condition for FPSCR.
10552 (arm_linux_store_inferior_registers): Likewise.
10553
b6f48cb0
TT
105542017-07-22 Tom Tromey <tom@tromey.com>
10555
10556 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10557 <syscalls_counts>: Now a std::vector.
10558 (get_catch_syscall_inferior_data): Use "new".
10559 (catch_syscall_inferior_data_cleanup): Use "delete".
10560 (insert_catch_syscall, remove_catch_syscall)
10561 (clear_syscall_counts): Update.
10562
e12c9b7a
TT
105632017-07-22 Tom Tromey <tom@tromey.com>
10564
10565 * break-catch-syscall.c (syscall_catchpoint)
10566 <syscalls_to_be_caught>: Now a std::vector<int>
10567 (~syscall_catchpoint): Remove.
10568 (insert_catch_syscall, remove_catch_syscall)
10569 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10570 (print_mention_catch_syscall, print_recreate_catch_syscall):
10571 Update.
10572 (create_syscall_event_catchpoint): Change type of "filter"
10573 parameter.
10574 (catch_syscall_split_args): Return a std::vector.
10575 (catch_syscall_command_1, catching_syscall_number_1): Update.
10576
4fa8aeac
TT
105772017-07-22 Tom Tromey <tom@tromey.com>
10578
10579 * break-catch-throw.c (struct exception_catchpoint)
10580 <exception_rx>: Now a std::string.
10581 (~exception_catchpoint): Remove.
10582 (print_one_detail_exception_catchpoint): Update.
10583 (handle_gnu_v3_exceptions): Change type of except_rx.
10584 (extract_exception_regexp): Return a std::string.
10585 (catch_exception_command_1): Update.
10586
f746a154
TT
105872017-07-22 Tom Tromey <tom@tromey.com>
10588
10589 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10590 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10591 std::vector.
10592 <catch_all>: Now a bool.
10593 (~signal_catchpoint): Remove.
10594 (signal_catchpoint_insert_location)
10595 (signal_catchpoint_remove_location)
10596 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10597 (signal_catchpoint_print_mention)
10598 (signal_catchpoint_print_recreate)
10599 (signal_catchpoint_explains_signal): Update.
10600 (create_signal_catchpoint): Change type of "filter" and
10601 "catch_all".
10602 (catch_signal_split_args): Return a std::vector. Change type of
10603 "catch_all".
10604 (catch_signal_command): Update.
10605
47e77640
PA
106062017-07-20 Pedro Alves <palves@redhat.com>
10607
10608 * ada-lang.c (ada_language_defn): Make extern.
10609 (_initialize_ada_language): Remove add_language call.
10610 * c-lang.c (c_language_defn, cplus_language_defn)
10611 (asm_language_defn, minimal_language_defn): Make extern.
10612 (_initialize_c_language): Delete.
10613 * completer.c (compare_cstrings): Delete, moved to utils.h.
10614 * d-lang.c (d_language_defn): Make extern.
10615 (_initialize_d_language): Remove add_language calls.
10616 * defs.h (enum language): Add comment.
10617 * f-lang.c (f_language_defn): Make extern.
10618 (_initialize_f_language): Remove add_language call.
10619 * go-lang.c (go_language_defn): Make extern.
10620 (_initialize_go_language): Remove add_language call.
10621 * language.c: Include <algorithm>.
10622 (languages): Redefine as const array.
10623 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10624 (set_language_command): Handle "local". Use for-range loop.
10625 (set_language): Remove loop.
10626 (language_enum): Rewrite.
10627 (language_def, language_str): Remove loops.
10628 (add_language): Delete.
10629 (add_set_language_command): New, based on add_languages.
10630 (skip_language_trampoline): Adjust.
10631 (local_language_defn): Delete.
10632 (language_gdbarch_post_init): Adjust.
10633 (_initialize_language): Remove add_language calls. Call
10634 add_set_language_command.
10635 * language.h (add_language): Delete.
10636 (auto_language_defn)
10637 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10638 (asm_language_defn, c_language_defn, cplus_language_defn)
10639 (d_language_defn, f_language_defn, go_language_defn)
10640 (m2_language_defn, objc_language_defn, opencl_language_defn)
10641 (pascal_language_defn, rust_language_defn): Declare.
10642 * m2-lang.c (m2_language_defn): Make extern.
10643 (_initialize_m2_language): Remove add_language call.
10644 * objc-lang.c (objc_language_defn): Make extern.
10645 (_initialize_objc_language): Remove add_language call.
10646 * opencl-lang.c (opencl_language_defn): Make extern.
10647 (_initialize_opencl_language): Remove add_language call.
10648 * p-lang.c (pascal_language_defn): Make extern.
10649 (_initialize_pascal_language): Delete.
10650 * rust-lang.c (rust_language_defn): Make extern.
10651 (_initialize_rust_language): Delete.
10652 * utils.h (compare_cstrings): New static inline function.
10653
edb0c9cb
PA
106542017-07-20 Pedro Alves <palves@redhat.com>
10655
10656 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10657 (get_var_value): Constify parameters.
10658 (get_int_var_value): Change prototype.
10659 (to_fixed_range_type): Adjust.
10660 * ada-lang.h (get_int_var_value): Change prototype.
10661
a778f165
PA
106622017-07-20 Pedro Alves <palves@redhat.com>
10663
10664 * dwarf2read.c (dw2_lookup_symbol): Use
10665 SYMBOL_MATCHES_SEARCH_NAME.
10666 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10667
42edd901
PA
106682017-07-20 Pedro Alves <palves@redhat.com>
10669
10670 * block.c (block_iter_name_step, block_iter_name_first)
10671 (block_iter_name_next): Delete.
10672 (block_lookup_symbol_primary): Adjust to use
10673 dict_iter_match_first/dict_iter_match_next.
10674 * block.h (block_iter_name_first, block_iter_name_next): Delete
10675 declarations.
10676 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10677 dict_iter_match_first/dict_iter_match_next.
10678
cf325299
PA
106792017-07-20 Pedro Alves <palves@redhat.com>
10680
10681 * cp-support.c (cp_find_first_component_aux): Add missing case for
10682 end of string.
10683
c5ed0576
DB
106842017-07-18 David Blaikie <dblaikie@gmail.com>
10685
10686 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10687 of dwo_cu's dwo_file.
10688
27841e76
YQ
106892017-07-18 Yao Qi <yao.qi@linaro.org>
10690
10691 * remote.c (store_registers_using_G): Remove one line comment.
10692
cfb7e58b
YQ
106932017-07-18 Yao Qi <yao.qi@linaro.org>
10694
10695 * regcache.c (regcache_cpy): Simplify it.
10696 (regcache::cpy_no_passthrough): Remove it.
10697 * regcache.h (cpy_no_passthrough): Remove it.
10698 (regcache_dup, regcache_cpy): Update comments.
10699
386535dd
PA
107002017-07-18 Pedro Alves <palves@redhat.com>
10701
10702 * remote-sim.c (sim_command_completer): Adjust to work with a
10703 completion_tracker instead of a VEC.
10704
c45ec17c
PA
107052017-07-17 Pedro Alves <palves@redhat.com>
10706
10707 * completer.c (complete_source_filenames): New function.
10708 (complete_address_and_linespec_locations): New function.
10709 (location_completer): Use complete_address_and_linespec_locations.
10710 (completion_tracker::build_completion_result): Honor the tracker's
10711 request to suppress append.
10712 * completer.h (completion_tracker::suppress_append_ws)
10713 (completion_tracker::set_suppress_append_ws): New methods.
10714 (completion_tracker::m_suppress_append_ws): New field.
10715 (complete_source_filenames): New declaration.
10716 * linespec.c (linespec_complete_what): New.
10717 (struct ls_parser) <complete_what, completion_word,
10718 completion_quote_char, completion_quote_end, completion_tracker>:
10719 New fields.
10720 (string_find_incomplete_keyword_at_end): New.
10721 (linespec_lexer_lex_string): Record quote char. If in completion
10722 mode, don't throw.
10723 (linespec_lexer_consume_token): Advance the completion word point.
10724 (linespec_lexer_peek_token): Save/restore completion info.
10725 (save_stream_and_consume_token): New.
10726 (set_completion_after_number): New.
10727 (linespec_parse_basic): Set what to complete next depending on
10728 token. Handle function and label completions specially.
10729 (parse_linespec): Disable objc shortcut in completion mode. Set
10730 what to complete next depending on token type. Skip keyword if in
10731 completion mode.
10732 (complete_linespec_component, linespec_complete): New.
10733 * linespec.h (linespec_complete): Declare.
10734
be966d42
PA
107352017-07-17 Pedro Alves <palves@redhat.com>
10736
10737 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10738 Handle 'operator<' / 'operator<<'.
10739
a2459270
PA
107402017-07-17 Pedro Alves <palves@redhat.com>
10741
10742 * completer.c (collect_explicit_location_matches): Handle
10743 MATCH_LABEL.
10744 (convert_explicit_location_to_linespec): New, factored out from
10745 ...
10746 (convert_explicit_location_to_sals): ... this.
10747 (complete_label): New.
10748 (linespec_complete_label, find_label_symbols_in_block): New.
10749 (find_label_symbols): Add completion_mode parameter and adjust to
10750 call find_label_symbols_in_block.
10751 * linespec.h (linespec_complete_label): Declare.
10752
c6756f62
PA
107532017-07-17 Pedro Alves <palves@redhat.com>
10754
10755 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10756 complete_symbol_mode parameter.
10757 * cli/cli-cmds.c (complete_command): Get the completion result out
10758 of the handle_brkchars tracker if used a custom word point.
10759 * completer.c: Include "linespec.h".
10760 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10761 (advance_to_expression_complete_word_point): New.
10762 (completion_tracker::completes_to_completion_word): New.
10763 (complete_files_symbols): Pass down
10764 complete_symbol_mode::EXPRESSION.
10765 (explicit_options, probe_options): New.
10766 (collect_explicit_location_matches): Complete on the
10767 explictit_loc->foo instead of word. Use
10768 linespec_complete_function. Handle MATCH_LINE. Handle offering
10769 keyword and options completions.
10770 (backup_text_ptr): Delete.
10771 (skip_keyword): New.
10772 (complete_explicit_location): Remove 'word' parameter. Add
10773 language, quoted_arg_start and quoted_arg_end parameters.
10774 Rewrite, parsing left to right.
10775 (location_completer): Rewrite.
10776 (location_completer_handle_brkchars): New function.
10777 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10778 (enum complete_line_internal_reason): Adjust comments.
10779 (completion_tracker::discard_completions): New.
10780 (completer_handle_brkchars_func_for_completer): Handle
10781 location_completer.
10782 (gdb_custom_word_point_brkchars)
10783 (gdb_org_rl_basic_quote_characters): New.
10784 (gdb_completion_word_break_characters_throw)
10785 (completion_find_completion_word): Handle trackers that use a
10786 custom word point.
10787 (completion_tracker::advance_custom_word_point_by): New.
10788 (completion_tracker::build_completion_result): Don't rely on
10789 readline appending the quote char.
10790 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10791 use a custom word point.
10792 (gdb_rl_attempted_completion_function): Restore
10793 rl_basic_quote_characters.
10794 * completer.h (class completion_tracker): Extend intro comment.
10795 (completion_tracker::set_quote_char)
10796 (completion_tracker::quote_char)
10797 (completion_tracker::set_use_custom_word_point)
10798 (completion_tracker::use_custom_word_point)
10799 (completion_tracker::custom_word_point)
10800 (completion_tracker::set_custom_word_point)
10801 (completion_tracker::advance_custom_word_point_by)
10802 (completion_tracker::completes_to_completion_word)
10803 (completion_tracker::discard_completions): New methods.
10804 (completion_tracker::m_quote_char)
10805 (completion_tracker::m_use_custom_word_point)
10806 (completion_tracker::m_custom_word_point): New fields.
10807 (advance_to_expression_complete_word_point): Declare.
10808 * f-lang.c (f_collect_symbol_completion_matches): Add
10809 complete_symbol_mode parameter.
10810 * language.h (struct language_defn)
10811 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10812 parameter.
10813 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10814 (linespec_complete_function): New function.
10815 (linespec_lexer_lex_keyword): Adjust.
10816 * linespec.h (linespec_keywords, linespec_complete_function): New
10817 declarations.
10818 * location.c (find_end_quote): New function.
10819 (explicit_location_lex_one): Add explicit_completion_info
10820 parameter. Save quoting info. Don't throw if being called for
10821 completion. Don't handle Ada operators here.
10822 (is_cp_operator, skip_op_false_positives, first_of)
10823 (explicit_location_lex_one_function): New function.
10824 (string_to_explicit_location): Replace 'dont_throw' parameter with
10825 an explicit_completion_info pointer parameter. Handle it. Don't
10826 use explicit_location_lex_one to lex function names. Use
10827 explicit_location_lex_one_function instead.
10828 * location.h (struct explicit_completion_info): New.
10829 (string_to_explicit_location): Replace 'dont_throw' parameter with
10830 an explicit_completion_info pointer parameter.
10831 * symtab.c (default_collect_symbol_completion_matches_break_on):
10832 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10833 (default_collect_symbol_completion_matches)
10834 (collect_symbol_completion_matches): Add complete_symbol_mode
10835 parameter.
10836 (collect_symbol_completion_matches_type): Pass down
10837 complete_symbol_mode::EXPRESSION.
10838 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10839 parameter. Handle LINESPEC mode.
10840 * symtab.h (complete_symbol_mode): New.
10841 (default_collect_symbol_completion_matches_break_on)
10842 (default_collect_symbol_completion_matches)
10843 (collect_symbol_completion_matches)
10844 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10845 parameter.
10846
1d550c82
PA
108472017-07-17 Pedro Alves <palves@redhat.com>
10848
10849 * utils.c (enum class strncmp_iw_mode): New.
10850 (strcmp_iw): Rename to ...
10851 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10852 parameters. Handle them.
10853 (strncmp_iw): New.
10854 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10855 * utils.h (strncmp_iw): Declare.
10856 (strcmp_iw): Move describing comments here.
10857
8090b426
PA
108582017-07-17 Pedro Alves <palves@redhat.com>
10859
10860 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10861 CP_OPERATOR_STR.
10862 * c-typeprint.c (is_type_conversion_operator): Use
10863 CP_OPERATOR_STR.
10864 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10865 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10866 CP_OPERATOR_LEN.
10867 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10868 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10869 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10870 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10871 CP_OPERATOR_STR.
10872 * location.c: Include "cp-support.h".
10873 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10874 CP_OPERATOR_STR.
10875 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10876 CP_OPERATOR_LEN.
10877
6a2c1b87
PA
108782017-07-17 Pedro Alves <palves@redhat.com>
10879
10880 * cli/cli-cmds.c (complete_command): Use a completion tracker
10881 along with completion_find_completion_word for handle_brkchars
10882 phase.
10883 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10884 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10885 (struct gdb_rl_completion_word_info): New.
10886 (gdb_rl_find_completion_word): New.
10887 (completion_find_completion_word): New.
10888 * completer.h (completion_find_completion_word): Declare.
10889
eb3ff9a5
PA
108902017-07-17 Pedro Alves <palves@redhat.com>
10891
10892 * ada-lang.c (symbol_completion_match): Adjust comments.
10893 (symbol_completion_add): Replace vector parameter with
10894 completion_tracker parameter. Use it.
10895 (ada_make_symbol_completion_list): Rename to...
10896 (ada_collect_symbol_completion_matches): ... this. Add
10897 completion_tracker parameter and use it.
10898 (ada_language_defn): Adjust.
10899 * break-catch-syscall.c (catch_syscall_completer): Adjust
10900 prototype and work with completion_tracker instead of VEC.
10901 * breakpoint.c (condition_completer): Adjust prototype and work
10902 with completion_tracker instead of VEC.
10903 * c-lang.c (c_language_defn, cplus_language_defn)
10904 (asm_language_defn, minimal_language_defn): Adjust to renames.
10905 * cli/cli-cmds.c (complete_command): Rework using
10906 completion_tracker. Catch exceptions when completing.
10907 * cli/cli-decode.c (integer_unlimited_completer)
10908 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10909 with completion_tracker instead of VEC.
10910 * command.h (struct completion_tracker): Forward declare.
10911 (completer_ftype, completer_handle_brkchars_ftype): Change
10912 types.
10913 (complete_on_cmdlist, complete_on_enum): Adjust.
10914 * completer.c: Include <algorithm>.
10915 (struct gdb_completer_state): New.
10916 (current_completion): New global.
10917 (readline_line_completion_function): Delete.
10918 (noop_completer, filename_completer)
10919 (filename_completer_handle_brkchars, complete_files_symbols)
10920 (linespec_location_completer): Adjust to work with a
10921 completion_tracker instead of a VEC.
10922 (string_or_empty): New.
10923 (collect_explicit_location_matches): Adjust to work with a
10924 completion_tracker instead of a VEC.
10925 (explicit_location_completer): Rename to ...
10926 (complete_explicit_location): ... this and adjust to work with a
10927 completion_tracker instead of a VEC.
10928 (location_completer): Adjust to work with a completion_tracker
10929 instead of a VEC.
10930 (add_struct_fields): Adjust to work with a completion_list instead
10931 of VEC.
10932 (expression_completer): Rename to ...
10933 (complete_expression): ... this and adjust to work with a
10934 completion_tracker instead of a VEC. Use complete_files_symbols.
10935 (expression_completer): Reimplement on top of complete_expression.
10936 (symbol_completer): Adjust to work with a completion_tracker
10937 instead of a VEC.
10938 (enum complete_line_internal_reason): Add describing comments.
10939 (complete_line_internal_normal_command): Adjust to work with a
10940 completion_tracker instead of a VEC.
10941 (complete_line_internal): Rename to ...
10942 (complete_line_internal_1): ... this and adjust to work with a
10943 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10944 handle_brkchars phase.
10945 (new_completion_tracker): Delete.
10946 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10947 complete_line_internal_1.
10948 (free_completion_tracker): Delete.
10949 (INITIAL_COMPLETION_HTAB_SIZE): New.
10950 (completion_tracker::completion_tracker)
10951 (completion_tracker::~completion_tracker): New.
10952 (maybe_add_completion): Delete.
10953 (completion_tracker::maybe_add_completion)
10954 (completion_tracker::add_completion)
10955 (completion_tracker::add_completions): New.
10956 (throw_max_completions_reached_error): Delete.
10957 (complete_line): Adjust to work with a completion_tracker instead
10958 of a VEC. Don't create a completion_tracker_t or check for max
10959 completions here.
10960 (command_completer, command_completer_handle_brkchars)
10961 (signal_completer, reg_or_group_completer_1)
10962 (reg_or_group_completer, default_completer_handle_brkchars):
10963 Adjust to work with a completion_tracker.
10964 (gdb_completion_word_break_characters_throw): New.
10965 (gdb_completion_word_break_characters): Reimplement.
10966 (line_completion_function): Delete.
10967 (completion_tracker::recompute_lowest_common_denominator)
10968 (expand_preserving_ws)
10969 (completion_tracker::build_completion_result)
10970 (completion_result::completion_result)
10971 (completion_result::completion_result)
10972 (completion_result::~completion_result)
10973 (completion_result::completion_result)
10974 (completion_result::release_match_list, compare_cstrings)
10975 (completion_result::sort_match_list)
10976 (completion_result::reset_match_list)
10977 (gdb_rl_attempted_completion_function_throw)
10978 (gdb_rl_attempted_completion_function): New.
10979 * completer.h (completion_list, struct completion_result)
10980 (class completion_tracker): New.
10981 (complete_line): Add completion_tracker parameter.
10982 (readline_line_completion_function): Delete.
10983 (gdb_rl_attempted_completion_function): New.
10984 (noop_completer, filename_completer, expression_completer)
10985 (location_completer, symbol_completer, command_completer)
10986 (signal_completer, reg_or_group_completer): Update prototypes.
10987 (completion_tracker_t, new_completion_tracker)
10988 (make_cleanup_free_completion_tracker): Delete.
10989 (enum maybe_add_completion_enum): Delete.
10990 (maybe_add_completion): Delete.
10991 (throw_max_completions_reached_error): Delete.
10992 * corefile.c (complete_set_gnutarget): Adjust to work with a
10993 completion_tracker instead of a VEC.
10994 * cp-abi.c (cp_abi_completer): Adjust to work with a
10995 completion_tracker instead of a VEC.
10996 * d-lang.c (d_language_defn): Adjust.
10997 * disasm.c (disassembler_options_completer): Adjust to work with a
10998 completion_tracker instead of a VEC.
10999 * f-lang.c (f_make_symbol_completion_list): Rename to ...
11000 (f_collect_symbol_completion_matches): ... this. Adjust to work
11001 with a completion_tracker instead of a VEC.
11002 (f_language_defn): Adjust.
11003 * go-lang.c (go_language_defn): Adjust.
11004 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
11005 Adjust to work with a completion_tracker instead of a VEC.
11006 * infrun.c (handle_completer): Likewise.
11007 * interps.c (interpreter_completer): Likewise.
11008 * interps.h (interpreter_completer): Likewise.
11009 * language.c (unknown_language_defn, auto_language_defn)
11010 (local_language_defn): Adjust.
11011 * language.h (language_defn::la_make_symbol_completion_list):
11012 Rename to ...
11013 (language_defn::la_collect_symbol_completion_matches): ... this
11014 and adjust to work with a completion_tracker instead of a VEC.
11015 * m2-lang.c (m2_language_defn): Adjust.
11016 * objc-lang.c (objc_language_defn): Adjust.
11017 * opencl-lang.c (opencl_language_defn): Adjust.
11018 * p-lang.c (pascal_language_defn): Adjust.
11019 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
11020 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
11021 with a completion_tracker.
11022 * rust-lang.c (rust_language_defn): Adjust.
11023 * symtab.c (free_completion_list, do_free_completion_list)
11024 (return_val, completion_tracker): Delete.
11025 (completion_list_add_name, completion_list_add_symbol)
11026 (completion_list_add_msymbol, completion_list_objc_symbol)
11027 (completion_list_add_fields, add_symtab_completions): Add
11028 completion_tracker parameter and use it.
11029 (default_make_symbol_completion_list_break_on_1): Rename to...
11030 (default_collect_symbol_completion_matches_break_on): ... this.
11031 Add completion_tracker parameter and use it instead of allocating
11032 a completion tracker here.
11033 (default_make_symbol_completion_list_break_on): Delete old
11034 implementation.
11035 (default_make_symbol_completion_list): Delete.
11036 (default_collect_symbol_completion_matches): New.
11037 (make_symbol_completion_list): Delete.
11038 (collect_symbol_completion_matches): New.
11039 (make_symbol_completion_type): Rename to ...
11040 (collect_symbol_completion_matches_type): ... this. Add
11041 completion_tracker parameter and use it instead of VEC.
11042 (make_file_symbol_completion_list_1): Rename to...
11043 (collect_file_symbol_completion_matches): ... this. Add
11044 completion_tracker parameter and use it instead of VEC.
11045 (make_file_symbol_completion_list): Delete.
11046 (add_filename_to_list): Use completion_list instead of a VEC.
11047 (add_partial_filename_data::list): Now a completion_list.
11048 (make_source_files_completion_list): Work with a completion_list
11049 instead of a VEC.
11050 * symtab.h: Include "completer.h".
11051 (default_make_symbol_completion_list_break_on)
11052 (default_make_symbol_completion_list, make_symbol_completion_list)
11053 (make_symbol_completion_type, make_file_symbol_completion_list)
11054 (make_source_files_completion_list): Delete.
11055 (default_collect_symbol_completion_matches_break_on)
11056 (default_collect_symbol_completion_matches)
11057 (collect_symbol_completion_matches)
11058 (collect_symbol_completion_matches_type)
11059 (collect_file_symbol_completion_matches)
11060 (make_source_files_completion_list): New.
11061 * top.c (init_main): Don't install a rl_completion_entry_function
11062 hook. Install a rl_attempted_completion_function hook instead.
11063 * tui/tui-layout.c (layout_completer): Adjust to work with a
11064 completion_tracker.
11065 * tui/tui-regs.c (tui_reggroup_completer):
11066 * tui/tui-win.c (window_name_completer, focus_completer)
11067 (winheight_completer): Adjust to work with a completion_tracker.
11068 * value.c: Include "completer.h".
11069 (complete_internalvar): Adjust to work with a completion_tracker.
11070 * value.h (complete_internalvar): Likewise.
11071
6e1dbf8c
PA
110722017-07-17 Pedro Alves <palves@redhat.com>
11073
11074 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
11075 renames.
11076 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
11077 comments to completer_ftype's declaration.
11078 <completer_handle_brkchars>: Change type to
11079 completer_handle_brkchars_ftype.
11080 * command.h (completer_ftype): Add describing comment and give
11081 names to parameters.
11082 (completer_ftype_void): Rename to ...
11083 (completer_handle_brkchars_ftype) ... this. Add describing comment.
11084 (set_cmd_completer_handle_brkchars): Adjust.
11085 * completer.c (filename_completer_handle_brkchars): New function.
11086 (complete_line_internal_normal_command): New function, factored
11087 out from ...
11088 (complete_line_internal): ... here.
11089 (command_completer_handle_brkchars)
11090 (default_completer_handle_brkchars)
11091 (completer_handle_brkchars_func_for_completer): New functions.
11092 * completer.h (set_gdb_completion_word_break_characters): Delete
11093 declaration.
11094 (completer_handle_brkchars_func_for_completer): New declaration.
11095 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
11096 completer_handle_brkchars_func_for_completer.
11097
78b13106
PA
110982017-07-17 Pedro Alves <palves@redhat.com>
11099
11100 * completer.c (symbol_completer): New function, based on
11101 make_symbol_completion_list_fn.
11102 * completer.h (symbol_completer): New declaration.
11103 * guile/scm-cmd.c (cmdscm_completers): Adjust.
11104 * python/py-cmd.c (completers): Adjust.
11105 * symtab.c (make_symbol_completion_list_fn): Delete.
11106 * symtab.h (make_symbol_completion_list_fn): Delete.
11107 * cli/cli-decode.c (add_cmd): Adjust.
11108
bbf2f4df
PA
111092017-07-17 Pedro Alves <palves@redhat.com>
11110
11111 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
11112 * dwarf2read.c: Include "filename-seen-cache.h".
11113 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
11114 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
11115 * filename-seen-cache.c: New file.
11116 * filename-seen-cache.h: New file.
11117 * symtab.c: Include "filename-seen-cache.h".
11118 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
11119 (create_filename_seen_cache, clear_filename_seen_cache)
11120 (delete_filename_seen_cache, filename_seen): Delete, parts moved
11121 to filename-seen-cache.h/filename-seen-cache.c.
11122 (output_source_filename, sources_info)
11123 (maybe_add_partial_symtab_filename)
11124 (make_source_files_completion_list): Adjust to use
11125 filename_seen_cache.
11126
330cdd98
PA
111272017-07-17 Pedro Alves <palves@redhat.com>
11128
11129 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11130 fields.
11131 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11132 dwarf2_debug_sections*)): New.
11133 (dwarf2_per_objfile::dwarf2_per_objfile(const
11134 dwarf2_per_objfile&)): Declare as deleted.
11135 (dwarf2_per_objfile::operator=): Declare as deleted.
11136 (dwarf2_per_objfile::dwarf2_per_objfile)
11137 (dwarf2_per_objfile::~dwarf2_per_objfile)
11138 (dwarf2_per_objfile::free_cached_comp_units): New.
11139 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11140 ctor. Call dwarf2_per_objfile's ctor manually.
11141 (dwarf2_locate_sections): Deleted/refactored as ...
11142 (dwarf2_per_objfile::locate_sections): ... this new method.
11143 (free_cached_comp_units): Defer to
11144 dwarf2_per_objfile::free_cached_comp_units.
11145 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11146
8880f2a9
TT
111472017-07-14 Tom Tromey <tom@tromey.com>
11148
11149 PR rust/21764:
11150 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11151 parameter.
11152 <UNOP_SIZEOF>: Split into separate case.
11153 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11154
65547233
TT
111552017-07-14 Tom Tromey <tom@tromey.com>
11156
11157 PR rust/21763:
11158 * symtab.c (symbol_matches_domain): Add language_rust to special
11159 case.
11160 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11161 treat LOC_TYPEDEF symbols as variables.
11162
8f14146e
PA
111632017-07-14 Pedro Alves <palves@redhat.com>
11164
11165 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11166 symtabs matching all symtabs with SRCFILE as file name instead of
11167 only considering the first hit, with lookup_symtab.
11168
2347965c
SM
111692017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11170
11171 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11172 operator_name parameters.
11173 (gen_expr): Update function call.
11174
40f4af28
SM
111752017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11176
11177 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11178 parameter.
11179 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11180 Likewise.
11181 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11182 parameter, use agent_expr::gdbarch instead, update function
11183 calls.
11184 (locexpr_tracepoint_var_ref): Likewise.
11185 (loclist_tracepoint_var_ref): Likewise.
11186 * ax-gdb.c (gen_trace_static_fields): Likewise.
11187 (gen_traced_pop): Likewise.
11188 (gen_frame_args_address): Likewise.
11189 (gen_frame_locals_address): Likewise.
11190 (gen_var_ref): Likewise.
11191 (gen_struct_ref_recursive): Likewise.
11192 (gen_static_field): Likewise.
11193 (gen_maybe_namespace_elt): Likewise.
11194 (gen_expr): Likewise.
11195 (gen_trace_for_var): Likewise.
11196 (gen_trace_for_expr): Likewise.
11197 (gen_trace_for_return_address): Likewise.
11198
053f8057
SM
111992017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11200
11201 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11202 parameter.
11203 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11204
6661ad48
SM
112052017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11206
11207 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11208 from ax, update calls.
11209 (gen_usual_arithmetic): Likewise.
11210 (gen_integral_promotions): Likewise.
11211 (gen_bitfield_ref): Likewise.
11212 (gen_primitive_field): Likewise.
11213 (gen_struct_ref_recursive): Likewise.
11214 (gen_struct_ref): Likewise.
11215 (gen_maybe_namespace_elt): Likewise.
11216 (gen_struct_elt_for_reference): Likewise.
11217 (gen_namespace_elt): Likewise.
11218 (gen_aggregate_elt_ref): Likewise.
11219 (gen_expr): Get gdbarch from ax, update calls.
11220 (gen_expr_binop_rest): Likewise.
11221
c55a47e7
PA
112222017-07-13 Pedro Alves <palves@redhat.com>
11223
11224 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11225 as default tdesc.
11226 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11227 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11228 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11229 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11230 tdep.
11231 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11232 Get final tdesc from the tdep.
11233 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11234 default tdesc.
11235 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11236 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11237 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11238 Use it as default tdesc.
11239 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11240 down to amd_init_abi. No longer handle fallback tdesc here.
11241 * amd64-tdep.h (tdesc_x32): Declare.
11242 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11243 parameter.
11244 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11245 as default tdesc.
11246
55efceab
AA
112472017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11248
11249 * s390-linux-tdep.c (s390_process_record): Add support for
11250 instructions new in arch12.
11251
0aa37b65
JB
112522017-07-11 John Baldwin <jhb@FreeBSD.org>
11253
11254 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11255 PT_GETFSBASE and PT_GETGSBASE.
11256 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11257 PT_SETGSBASE.
11258
48aeef91
JB
112592017-07-11 John Baldwin <jhb@FreeBSD.org>
11260
11261 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11262 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11263 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11264 those rules.
11265 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11266 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11267 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11268 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11269 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11270 * features/i386/amd64.xml: Add 64bit-segments.xml.
11271 * features/i386/amd64-avx-avx512.c: Regenerated.
11272 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11273 * features/i386/amd64-avx-mpx.c: Regenerated.
11274 * features/i386/amd64-avx.c: Regenerated.
11275 * features/i386/amd64-mpx.c: Regenerated.
11276 * features/i386/amd64.c: Regenerated.
11277 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11278 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11279 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11280 * regformats/i386/amd64-avx.dat: Regenerated.
11281 * regformats/i386/amd64-mpx.dat: Regenerated.
11282 * regformats/i386/amd64.dat: Regenerated.
11283
77c501bc
YQ
112842017-07-10 Yao Qi <yao.qi@linaro.org>
11285
11286 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11287 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11288
6dc8d757
AK
112892017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11290
11291 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11292 unsetenv.
11293 * gnulib/aclocal.m4: Regenerate.
11294 * gnulib/config.in: Regenerate.
11295 * gnulib/configure: Regenerate.
11296 * gnulib/import/Makefile.am: Regenerate.
11297 * gnulib/import/Makefile.in: Regenerate.
11298 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11299 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11300 * gnulib/import/m4/environ.m4: New file.
11301 * gnulib/import/m4/setenv.m4: New file.
11302 * gnulib/import/setenv.c: New file.
11303 * gnulib/import/unsetenv.c: New file.
11304
266934d1
SM
113052017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11306
11307 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11308 address when op is DW_OP_addr.
11309
03278692
TT
113102017-07-09 Tom Tromey <tom@tromey.com>
11311
11312 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11313 check and apply to outer type.
11314
4b654465
JB
113152017-07-07 John Baldwin <jhb@FreeBSD.org>
11316
11317 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11318 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11319 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11320 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11321
2af9fc44
JB
113222017-07-07 John Baldwin <jhb@FreeBSD.org>
11323
11324 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11325
382b69bb
JB
113262017-07-07 John Baldwin <jhb@FreeBSD.org>
11327
11328 * corelow.c (get_core_siginfo): Remove.
11329 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11330 instead of get_core_siginfo.
11331 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11332 * gdbarch.h: Re-generate.
11333 * gdbarch.c: Re-generate.
11334 * linux-tdep.c (linux_core_xfer_siginfo): New.
11335 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11336
6e5eab33
JB
113372017-07-07 John Baldwin <jhb@FreeBSD.org>
11338
11339 * corelow.c (thread_section_name): Move to ...
11340 * gdbcore.h (thread_section_name): ... here.
11341
929edea9
JB
113422017-07-07 John Baldwin <jhb@FreeBSD.org>
11343
11344 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11345 (struct siginfo32): New.
11346 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11347 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11348 via ptrace(PT_LWPINFO).
11349
762c974a
JB
113502017-07-07 John Baldwin <jhb@FreeBSD.org>
11351
11352 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11353 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11354 (fbsd_get_siginfo_type): New.
11355 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11356 (_initialize_fbsd_tdep): New.
11357
33c5cd75
DB
113582017-07-06 David Blaikie <dblaikie@gmail.com>
11359
11360 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11361 a singular dwo_unit*) to support multiple CUs in the same way that
11362 multiple TUs are supported.
11363 (create_cus_hash_table): Replace create_dwo_cu with a function for
11364 parsing multiple CUs from a DWO file.
11365 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11366 create_dwo_cu.
11367 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11368 htab_find, rather than comparing the signature to a singleton CU in
11369 the dwo_file.
11370
8455d262
PA
113712017-07-06 Pedro Alves <palves@redhat.com>
11372
11373 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11374
4da3eb35
PA
113752017-07-04 Pedro Alves <palves@redhat.com>
11376
11377 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11378 * gdbtypes.h (TYPE_STATIC): Delete.
11379 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11380 is_synchronized, is_native>: Delete.
11381 <dummy>: Bump.
11382 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11383 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11384 (TYPE_FN_FIELD_ABSTRACT): Delete.
11385
5bfd255c
SM
113862017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11387
11388 * buffer.h (buffer_finish): Fix spelling mistakes.
11389
25c54127
EZ
113902017-07-01 Eli Zaretskii <eliz@gnu.org>
11391
11392 * .dir-locals.el: Automatically switch to C-style comments in
11393 versions of Emacs that support the feature.
11394
dc4bde35
SDJ
113952017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11396 Pedro Alves <palves@redhat.com>
11397
11398 PR cli/21688
11399 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11400 (process_next_line): New variable 'inline_cmd'.
11401 Adjust 'if' clauses for "python", "compile" and "guile" to use
11402 'command_name_equals' and check for '!inline_cmd'.
11403
51ed89aa
SDJ
114042017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11405
11406 PR cli/21688
11407 * cli/cli-script.c (command_name_equals_not_inline): New function.
11408 (process_next_line): Adjust 'if' clauses for "python", "compile"
11409 and "guile" to use command_name_equals_not_inline.
11410
eb17d413
PA
114112017-06-29 Pedro Alves <palves@redhat.com>
11412
11413 * completer.c (expression_completer): Call
11414 linespec_location_completer instead of location_completer.
11415
195bcdd5
PA
114162017-06-29 Pedro Alves <palves@redhat.com>
11417
11418 * completer.c (expression_completer): Remove code that recomputes
11419 'text' from 'word'.
11420
adc764e7
YQ
114212017-06-29 Yao Qi <yao.qi@linaro.org>
11422
11423 * regformats/regdat.sh: Generate code with
11424 "ifndef IN_PROCESS_AGENT".
11425
6e75794e
PA
114262017-06-28 Pedro Alves <palves@redhat.com>
11427
11428 * command.h: Include "common/scoped_restore.h".
11429
bc491f2e
YQ
114302017-06-28 Yao Qi <yao.qi@linaro.org>
11431
11432 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11433 instead of obstack_grow.
11434
41664b45
DG
114352017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11436
11437 PR gdb/21337
11438 * symfile.c (reread_symbols): Call objfiles_changed just before
11439 read_symbols.
11440
6da67eb1
PA
114412017-06-27 Pedro Alves <palves@redhat.com>
11442
11443 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11444 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11445 (completion_list_add_symbol, completion_list_add_msymbol):
11446 ... these new functions.
11447 (add_symtab_completions)
11448 (default_make_symbol_completion_list_break_on_1): Adjust.
11449
23732b1e
PA
114502017-06-27 Pedro Alves <palves@redhat.com>
11451
11452 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11453 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11454 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11455 dtor.
11456 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11457 'storage_obstack' field an auto_obstack. In-class initialize all
11458 non-bitfield fields. Make minsyms_read bool.
11459 * symfile.c (read_symbols): Adjust.
11460
a4d1e79a
AH
114612017-06-27 Alan Hayward <alan.hayward@arm.com>
11462
11463 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11464 (gdbsim_store_register): Likewise.
11465
8268c778
PA
114662017-06-27 Pedro Alves <palves@redhat.com>
11467
11468 * c-exp.y (name_obstack): Now an auto_obstack.
11469 (yylex): Use auto_obstack::clear.
11470 (c_parse): Use auto_obstack::clear instead of reinitializing and
11471 freeing the obstack.
11472 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11473 * d-exp.y (name_obstack): Now an auto_obstack.
11474 (yylex): Use auto_obstack::clear.
11475 (d_parse): Use auto_obstack::clear instead of reinitializing and
11476 freeing the obstack.
11477 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11478 auto_obstack.
11479 * dwarf2read.c (create_addrmap_from_index)
11480 (dwarf2_build_psymtabs_hard)
11481 (update_enumeration_type_from_children): Likewise.
11482 * gdb_obstack.h (auto_obstack): New type.
11483 * go-exp.y (name_obstack): Now an auto_obstack.
11484 (build_packaged_name): Use auto_obstack::clear.
11485 (go_parse): Use auto_obstack::clear instead of reinitializing and
11486 freeing the obstack.
11487 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11488 auto_obstack.
11489 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11490 * rust-exp.y (work_obstack): Now an auto_obstack.
11491 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11492 reinitializing and freeing the obstack.
11493 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11494 (host_char_to_target): Use auto_obstack.
11495 * utils.h (make_cleanup_obstack_free): Delete declaration.
11496 * valprint.c (generic_emit_char, generic_printstr): Use
11497 auto_obstack.
11498
db665f42
SM
114992017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11500
11501 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11502 thread.
11503 (darwin_init_thread_list): Don't update dummy thread.
11504 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11505
873c0814
SM
115062017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11507
11508 * record-full.c (netorder16): Remove.
11509
8b5a7a6e
SM
115102017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11511
11512 * common/diagnostics.h: Define macros for GCC.
11513 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11514 * common/vec.h: Include diagnostics.h.
11515 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11516 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11517 warning.
11518
d1435379
SM
115192017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11520
11521 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11522 New macro.
11523 * ada-lex.l: Ignore deprecated register warnings.
11524
cc75e0fd
SM
115252017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11526
11527 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11528 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11529
07809eaf
SM
115302017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11531
11532 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11533 its own line.
11534
f076f034
SM
115352017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11536
11537 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11538
0dd5cbc5
AH
115392017-06-23 Alan Hayward <alan.hayward@arm.com>
11540
11541 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11542 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11543 (xtensa_register_read_masked): Likewise.
11544
d4c6ce5b
SDJ
115452017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11546
11547 * common/environ.c (gdb_environ::unset): Update comment.
11548
16892a03
AH
115492017-06-22 Alan Hayward <alan.hayward@arm.com>
11550
11551 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11552 registers.
11553
d7dcbefc
AH
115542017-06-22 Alan Hayward <alan.hayward@arm.com>
11555
11556 * record-full.c (record_full_exec_insn): Use byte_vector.
11557
b30ff123
YQ
115582017-06-22 Yao Qi <yao.qi@linaro.org>
11559
11560 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11561 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11562
4fa847d7
AH
115632017-06-22 Alan Hayward <alan.hayward@arm.com>
11564
11565 * remote.c (cached_reg): Move from here...
11566 * regcache.h (cached_reg): ...to here.
11567 * python/py-unwind.c (struct reg_info): Remove.
11568 (cached_frame_info): Use cached_reg_t.
11569 (pyuw_prev_register): Likewise.
11570 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11571 (pyuw_dealloc_cache): Free all registers.
11572
f4906a9a
PA
115732017-06-22 Pedro Alves <palves@redhat.com>
11574 Simon Marchi <simon.marchi@ericsson.com>
11575
11576 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11577 warning.
11578 * common/diagnostics.h: New file.
11579
b45a1208
PA
115802017-06-22 Pedro Alves <palves@redhat.com>
11581
11582 * common/agent.h: Add include guards.
11583
e4da2c61
SM
115842017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11585
11586 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11587 talk about addressable units instead of bytes.
11588
96160d60
SDJ
115892017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11590
11591 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11592 of '::const_iterator'.
11593
9a6c7d9c
SDJ
115942017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11595
11596 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11597 'unittests/environ-selftests.c'.
11598 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11599 * charset.c (find_charset_names): Declare object 'iconv_env'.
11600 Update code to use 'iconv_env' object. Remove call to
11601 'free_environ'.
11602 * common/environ.c: Include <utility>.
11603 (make_environ): Delete function.
11604 (free_environ): Delete function.
11605 (gdb_environ::clear): New function.
11606 (gdb_environ::operator=): New function.
11607 (gdb_environ::get): Likewise.
11608 (environ_vector): Delete function.
11609 (set_in_environ): Delete function.
11610 (gdb_environ::set): New function.
11611 (unset_in_environ): Delete function.
11612 (gdb_environ::unset): New function.
11613 (gdb_environ::envp): Likewise.
11614 * common/environ.h: Include <vector>.
11615 (struct gdb_environ): Delete; transform into...
11616 (class gdb_environ): ... this class.
11617 (free_environ): Delete prototype.
11618 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11619 environ_vector): Likewise.
11620 * infcmd.c (run_command_1): Update code to call
11621 'envp' from 'gdb_environ' class.
11622 (environment_info): Update code to call methods from 'gdb_environ'
11623 class.
11624 (unset_environment_command): Likewise.
11625 (path_info): Likewise.
11626 (path_command): Likewise.
11627 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11628 (inferior::inferior): Initialize 'environment' using the host's
11629 information.
11630 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11631 Include "environ.h".
11632 (class inferior) <environment>: Change type from 'struct
11633 gdb_environ' to 'gdb_environ'.
11634 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11635 methods from 'gdb_environ' class.
11636 * solib.c (solib_find_1): Likewise
11637 * unittests/environ-selftests.c: New file.
11638
75c554cf
YQ
116392017-06-20 Yao Qi <yao.qi@linaro.org>
11640
11641 * features/i386/i386-linux.xml: Exchange the order of including
11642 32bit-linux.xml and 32bit-sse.xml.
11643 * features/i386/i386-linux.c: Regenerated.
11644
72ddacb7
YQ
116452017-06-20 Yao Qi <yao.qi@linaro.org>
11646
11647 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11648 Delete copy ctor and assignment operator.
11649 (tdesc_type): Likewise.
11650 (tdesc_feature): Likewise.
11651 (tdesc_free_reg): Remove.
11652 (tdesc_create_reg): Use new.
11653 (tdesc_free_type): Remove.
11654 (tdesc_create_vector): Use new.
11655 (tdesc_create_union): Likewise.
11656 (tdesc_create_flags): Likewise.
11657 (tdesc_create_enum): Likewise.
11658 (tdesc_free_feature): Delete.
11659 (free_target_description): Use delete.
11660
325c9fd4
JB
116612017-06-19 John Baldwin <jhb@FreeBSD.org>
11662
11663 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11664 registers.
11665
16b7a719
PA
116662017-06-19 Pedro Alves <palves@redhat.com>
11667
11668 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11669 after gdb::unlinker.
11670
1c8e01c9
SDJ
116712017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11672
11673 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11674 gdb_environ to access an environment variable.
11675
ffce45d2
TP
116762017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11677
11678 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11679 gdb_byte*.
11680
1d4fbac9
SM
116812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11682
11683 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11684
8465943a
SM
116852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11686
11687 * configure: Re-generate.
11688 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11689
3e019bdc
SM
116902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11691
11692 * configure: Re-generate.
11693 * warning.m4: Pass -Werror to compiler when checking for
11694 supported warning flags.
11695
cf0dd6f0
SM
116962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11697
11698 * Makefile.in (COMPILE.pre): Add "-x c++".
11699
6f98355c
YQ
117002017-06-16 Alan Hayward <alan.hayward@arm.com>
11701 Pedro Alves <palves@redhat.com>
11702 Yao Qi <yao.qi@linaro.org>
11703
11704 * defs.h (RequireLongest): New.
11705 (extract_integer): Declare function template.
11706 (extract_signed_integer): Remove the declaration, but define it
11707 static inline.
11708 (extract_unsigned_integer): Likewise.
11709 (store_integer): Declare function template.
11710 (store_signed_integer): Remove the declaration, but define it
11711 static inline.
11712 (store_unsigned_integer): Likewise.
11713 * findvar.c (extract_integer): New function template.
11714 (extract_signed_integer): Remove.
11715 (extract_unsigned_integer): Remove.
11716 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11717 instantiations.
11718 (store_integer): New function template.
11719 (store_signed_integer): Remove.
11720 (store_unsigned_integer): Remove.
11721 (store_integer): Explicit instantiations.
11722 * regcache.c (regcache_raw_read_signed): Update.
11723 (regcache::raw_read): New function.
11724 (regcache::raw_read_signed): Remove.
11725 (regcache::raw_read_unsigned): Remove.
11726 (regcache_raw_read_unsigned): Update.
11727 (regcache_raw_write_unsigned): Update.
11728 (regcache::raw_write_signed): Remove.
11729 (regcache::raw_write): New function.
11730 (regcache_cooked_read_signed): Update.
11731 (regcache::raw_write_unsigned): Remove.
11732 (regcache::cooked_read_signed): Remove.
11733 (regcache_cooked_read_unsigned): Update.
11734 (regcache::cooked_read_unsigned): Remove.
11735 (regcache_cooked_write_signed): Update.
11736 (regcache_cooked_write_unsigned): Update.
11737 * regcache.h (regcache) <raw_read_signed>: Remove.
11738 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11739 <raw_read, raw_write>: New.
11740 <cooked_read_signed, cooked_write_signed>: Remove.
11741 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11742 <cooked_read, cooked_write>: New.
11743 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11744 (sh64_pseudo_register_write): Update.
11745
a87dc45a
AK
117462017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11747
11748 * arc-tdep.c (arc_disassembler_options): New variable.
11749 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11750 of default_print_insn.
11751 (arc_delayed_print_insn): Set info->section when needed,
11752 use default_print_insn to retrieve a disassembler.
11753
45159d6a
SDJ
117542017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11755
11756 PR gdb/21574
11757 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11758 to mention $SHELL and startup-with-shell.
11759
b46c4cf0
MF
117602017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11761
11762 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11763
6394c606
YQ
117642017-06-14 Yao Qi <yao.qi@linaro.org>
11765
11766 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11767 default_print_insn instead of print_insn_aarch64.
11768 * arm-tdep.c (gdb_print_insn_arm): Call
11769 default_print_insn instead of print_insn_big_arm
11770 and print_insn_little_arm.
11771 * i386-tdep.c (i386_print_insn): Call default_print_insn
11772 instead of print_insn_i386.
11773 * ia64-tdep.c (ia64_print_insn): Call
11774 default_print_insn instead of print_insn_ia64.
11775 * mips-tdep.c (gdb_print_insn_mips): Call
11776 default_print_insn instead of print_insn_big_mips
11777 and print_insn_little_mips.
11778 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11779 instead of print_insn_spu.
11780
d5722aa2
PA
117812017-06-14 Pedro Alves <palves@redhat.com>
11782
11783 * ada-lang.c: Include "common/byte-vector.h".
11784 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11785 * charset.c (wchar_iterator::iterate): Resize the vector instead
11786 of reserving it.
11787 * common/byte-vector.h: Include "common/def-vector.h".
11788 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11789 * cli/cli-dump.c: Include "common/byte-vector.h".
11790 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11791 * common/byte-vector.h: New file.
11792 * common/def-vector.h: New file.
11793 * common/default-init-alloc.h: New file.
11794 * dwarf2loc.c: Include "common/byte-vector.h".
11795 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11796 instead of reserving it.
11797 * dwarf2read.c: Include "common/byte-vector.h".
11798 (data_buf::m_vec): Now a gdb::byte_vector.
11799 * gdb_regex.c: Include "common/def-vector.h".
11800 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11801 * mi/mi-main.c: Include "common/byte-vector.h".
11802 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11803 * printcmd.c: Include "common/byte-vector.h".
11804 (print_scalar_formatted): Use gdb::byte_vector.
11805 * valprint.c: Include "common/byte-vector.h".
11806 (maybe_negate_by_bytes, print_decimal_chars): Use
11807 gdb::byte_vector.
11808
01ec7a27
SM
118092017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11810
11811 * darwin-nat.c: Include "nat/fork-inferior.h".
11812
848d9074
SM
118132017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11814
11815 * configure.nat: Factor out Darwin bits that are not
11816 architecture-specific. Add fork-inferior.o.
11817
3b912944
SM
118182017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11819
11820 * configure.nat: Factor out AIX bits that are not
11821 architecture-specific. Add fork-inferior.o.
11822
55acdf22
AA
118232017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11824
11825 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11826 (read_pieced_value, write_pieced_value): ...here. Reduce to
11827 wrappers that just call rw_pieced_value.
11828
f65e2044
AA
118292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11830
11831 * dwarf2loc.c (write_pieced_value): When writing the data for a
11832 memory piece, use write_memory_with_notification instead of
11833 write_memory.
11834
23f945bf
AA
118352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11836
11837 * valops.c (read_value_memory): Change embedded_offset to
11838 represent a bit offset instead of a byte offset.
11839 * value.h (read_value_memory): Adjust comment.
11840
f236533e
AA
118412017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11842
11843 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11844 dest_offset_bits and source_offset_bits.
11845 (write_pieced_value): Likewise.
11846
65d84b76
AA
118472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11848
11849 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11850 given by DW_OP_bit_piece.
11851 (write_pieced_value): Likewise.
11852
242d31ab
AA
118532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11854
11855 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11856 some other preparations to the places where sufficient information
11857 is available.
11858 (write_pieced_value): Likewise.
11859
03c8af18
AA
118602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11861
11862 * dwarf2loc.c (bits_to_bytes): New function.
11863 (read_pieced_value): Fix offset calculations for register pieces
11864 on big-endian targets.
11865 (write_pieced_value): Likewise.
11866
840989c1
AA
118672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11868
11869 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11870 (write_pieced_value): Likewise.
11871
359b19bb
AA
118722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11873
11874 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11875 transfer the source value's least significant bits, instead of its
11876 lowest-addressed ones. Rename type_len to max_offset.
11877 (read_pieced_value): Mirror above changes to write_pieced_value as
11878 applicable.
11879
07c9ca3b
AA
118802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11881
11882 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11883 truncate full bytes from dest_offset_bits before using it as an
11884 offset into the buffer.
11885
f1cc9874
AA
118862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11887
11888 * dwarf2loc.c (write_pieced_value): Include transfer size in
11889 byte-wise check.
11890
cdaac320
AA
118912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11892
11893 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11894 calculation of this_size.
11895
af547a96
AA
118962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11897
11898 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11899 when targeting a bit-field.
11900 (write_pieced_value): Likewise.
11901
ddd7882a
AA
119022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11903
11904 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11905 (allocate_piece_closure): Drop addr_size parameter.
11906 (dwarf2_evaluate_loc_desc_full): Adjust call to
11907 allocate_piece_closure.
11908
e9352324
AA
119092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11910
11911 PR gdb/21226
11912 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11913 the LSB end, independent of endianness.
11914
d5d1163e
AA
119152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11916
11917 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11918 size capping.
11919
032bb6ea
YQ
119202017-06-13 Yao Qi <yao.qi@linaro.org>
11921
11922 * mips-linux-nat.c: Move include features/mips*-linux.c to
11923 mips-linux-tdep.c.
11924 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11925 to mips-linux-tdep.c.
11926 * mips-linux-tdep.c: Include features/mips*-linux.c
11927 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11928 functions.
11929 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11930 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11931 (tdesc_mips64_dsp_linux): Declare.
11932
f12f6bad
TT
119332017-06-12 Tom Tromey <tom@tromey.com>
11934
11935 * valprint.h (val_print_type_code_int): Remove.
11936 * valprint.c (generic_val_print_int): Always call
11937 val_print_scalar_formatted.
11938 (val_print_type_code_int): Remove.
11939 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11940 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11941 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11942 * ada-valprint.c (ada_val_print_num): Use
11943 val_print_scalar_formatted.
11944
d9109c80
TT
119452017-06-12 Tom Tromey <tom@tromey.com>
11946
11947 * printcmd.c (print_scalar_formatted): Unify the two switches.
11948 Don't convert scalars to LONGEST.
11949
4ac0cb1c
TT
119502017-06-12 Tom Tromey <tom@tromey.com>
11951
11952 PR exp/16225:
11953 * valprint.h (print_decimal_chars): Update.
11954 * valprint.c (maybe_negate_by_bytes): New function.
11955 (print_decimal_chars): Add "is_signed" argument.
11956 * printcmd.c (print_scalar_formatted): Update.
11957
30a25466
TT
119582017-06-12 Tom Tromey <tom@tromey.com>
11959
11960 PR exp/16225:
11961 * valprint.h (print_binary_chars, print_hex_chars): Update.
11962 * valprint.c (val_print_type_code_int): Update.
11963 (print_binary_chars): Add "zero_pad" argument.
11964 (emit_octal_digit): New function.
11965 (print_octal_chars): Don't zero-pad.
11966 (print_decimal_chars): Likewise.
11967 (print_hex_chars): Add "zero_pad" argument.
11968 * sh64-tdep.c (sh64_do_fp_register): Update.
11969 * regcache.c (regcache::dump): Update.
11970 * printcmd.c (print_scalar_formatted): Update.
11971 * infcmd.c (default_print_one_register_info): Update.
11972
b3464d03
PA
119732017-06-12 Pedro Alves <palves@redhat.com>
11974 Alan Hayward <alan.hayward@arm.com>
11975
11976 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11977 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11978 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11979 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11980 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11981
4b76cda9
PA
119822017-06-12 Pedro Alves <palves@redhat.com>
11983
11984 * dwarf2read.c (mapped_symtab::data): Now a vector of
11985 symtab_index_entry instead of vector of
11986 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11987 whether an element's name is NULL instead of checking whether the
11988 element itself is NULL.
11989 (find_slot): Change return type. Adjust.
11990 (hash_expand, , add_index_entry, uniquify_cu_indices)
11991 (write_hash_table): Adjust.
11992
e8f8bcb3
PA
119932017-06-12 Pedro Alves <palves@redhat.com>
11994
11995 * dwarf2read.c (recursively_count_psymbols): New function.
11996 (write_psymtabs_to_index): Call it to compute number of psyms and
11997 pass estimate size of psyms_seen to unordered_set's ctor.
11998
70a1152b
PA
119992017-06-12 Pedro Alves <palves@redhat.com>
12000
12001 * dwarf2read.c (write_hash_table): Check if key already exists
12002 before emplacing.
12003
c2f134ac
PA
120042017-06-12 Pedro Alves <palves@redhat.com>
12005
12006 * dwarf2read.c (data_buf::append_space): Rename to...
12007 (data_buf::grow): ... this, and make private. Adjust all callers.
12008 (data_buf::append_uint): New method.
12009 (add_address_entry, write_one_signatured_type)
12010 (write_psymtabs_to_index): Use it.
12011
a81e6d4d
PA
120122017-06-12 Pedro Alves <palves@redhat.com>
12013
12014 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
12015 (file_write (FILE *, const std::vector<Elem>&)): Delete.
12016 (data_buf::file_write): Call ::fwrite directly.
12017
6fd931f2
PA
120182017-06-12 Pedro Alves <palves@redhat.com>
12019
12020 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
12021 std::vector::erase.
12022
bc8f2430
JK
120232017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12024
12025 Code cleanup: C++ify .gdb_index producer.
12026 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
12027 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
12028 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
12029 (create_strtab, add_string): Remove.
12030 (file_write, data_buf): New.
12031 (struct symtab_index_entry): Use std::vector for cu_indices.
12032 (struct mapped_symtab): Use std::vector for data.
12033 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
12034 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
12035 Remove.
12036 (find_slot): Change return type. Update it to the new data structures.
12037 (hash_expand, add_index_entry): Update it to the new data structures.
12038 (offset_type_compare): Remove.
12039 (uniquify_cu_indices): Update it to the new data structures.
12040 (c_str_view, c_str_view_hasher, vector_hasher): New.
12041 (add_indices_to_cpool): Remove.
12042 (write_hash_table): Update it to the new data structures.
12043 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
12044 (eq_psymtab_cu_index): Remove.
12045 (psym_index_map): New typedef.
12046 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
12047 reference and std::unordered_map for cu_index_htab.
12048 (add_address_entry, add_address_entry_worker, write_address_map)
12049 (write_psymbols): Update it to the new data structures.
12050 (write_obstack): Remove.
12051 (struct signatured_type_index_data): Change types_list to a data_buf
12052 reference and psyms_seen to a std::unordered_set reference.
12053 (write_one_signatured_type, recursively_write_psymbols)
12054 (write_psymtabs_to_index): Update it to the new data structures.
12055
c4dcb155
SM
120562017-06-11 Simon Marchi <simon.marchi@ericsson.com>
12057
12058 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
12059 separate-debug-file commands.
12060 * symfile.h (separate_debug_file_debug): New global.
12061 * symfile.c (separate_debug_file_debug): New global.
12062 (separate_debug_file_exists, find_separate_debug_file): Add
12063 debug output.
12064 (_initialize_symfile): Add "set debug separate-debug-file"
12065 command.
12066 * build-id.c (build_id_to_debug_bfd,
12067 find_separate_debug_file_by_buildid): Add debug output.
12068
6d45d4b4
SM
120692017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
12070
12071 * gdbarch.sh (displaced_step_free_closure): Remove.
12072 * gdbarch.h, gdbarch.c: Re-generate.
12073 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
12074 displaced_step_free_closure.
12075 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
12076 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
12077 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
12078 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12079 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
12080 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12081 * arch-utils.h (simple_displaced_step_free_closure): Remove.
12082 * arch-utils.c (simple_displaced_step_free_closure): Remove.
12083 * infrun.c (displaced_step_clear): Call xfree instead of
12084 gdbarch_displaced_step_free_closure.
12085
2f91880f
SDJ
120862017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
12087
12088 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
12089 NULL".
12090
b8b6e72f
AH
120912017-06-08 Alan Hayward <alan.hayward@arm.com>
12092
12093 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
12094 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
12095 (mn10300_push_dummy_call): Likewise.
12096
5369082e
AH
120972017-06-08 Alan Hayward <alan.hayward@arm.com>
12098
12099 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
12100
ff4ca5ac
AH
121012017-06-08 Alan Hayward <alan.hayward@arm.com>
12102
12103 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
12104
aefd8b33
SDJ
121052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12106
12107 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
12108 able to start inferiors using a shell.
12109 (New remote packets): Announce new packet "QStartupWithShell".
12110 * remote.c: Add PACKET_QStartupWithShell.
12111 (extended_remote_create_inferior): Handle new
12112 PACKET_QStartupWithShell.
12113 (remote_protocol_features) <QStartupWithShell>: New entry for
12114 PACKET_QStartupWithShell.
12115 (_initialize_remote): Call "add_packet_config_cmd" for
12116 QStartupShell.
12117
2090129c
SDJ
121182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12119 Pedro Alves <palves@redhat.com>
12120
12121 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
12122 and "nat/fork-inferior.h".
12123 * common/common-inferior.h: New file, with contents from
12124 "gdb/inferior.h".
12125 * commom/common-utils.c: Include "common-utils.h".
12126 (stringify_argv): New function.
12127 * common/common-utils.h (stringify_argv): New prototype.
12128 * configure.nat: Add "fork-inferior.o" as a dependency for
12129 "*linux*", "fbsd*" and "nbsd*" hosts.
12130 * corefile.c (get_exec_file): Update comment.
12131 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12132 instead of "startup_inferior".
12133 (darwin_create_inferior): Call "add_thread_silent" after
12134 "fork_inferior".
12135 * fork-child.c: Cleanup unnecessary includes.
12136 (SHELL_FILE): Move to "common/common-fork-child.c".
12137 (environ): Likewise.
12138 (exec_wrapper): Initialize.
12139 (get_exec_wrapper): New function.
12140 (breakup_args): Move to "common/common-fork-child.c"; rename to
12141 "breakup_args_for_exec".
12142 (escape_bang_in_quoted_argument): Move to
12143 "common/common-fork-child.c".
12144 (saved_ui): New variable.
12145 (prefork_hook): New function.
12146 (postfork_hook): Likewise.
12147 (postfork_child_hook): Likewise.
12148 (gdb_startup_inferior): Likewise.
12149 (fork_inferior): Move to "common/common-fork-child.c". Update
12150 function to support gdbserver.
12151 (startup_inferior): Likewise.
12152 * gdbcore.h (get_exec_file): Remove declaration.
12153 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12154 instead of "startup_inferior". Call "add_thread_silent" after
12155 "fork_inferior".
12156 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12157 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12158 instead of "startup_inferior". Call "add_thread_silent" after
12159 "fork_inferior".
12160 * inferior.h: Include "common-inferior.h".
12161 (trace_start_error): Move to "common/common-utils.h".
12162 (trace_start_error_with_name): Likewise.
12163 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12164 (startup_inferior): Likewise.
12165 (gdb_startup_inferior): New prototype.
12166 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12167 * nat/fork-inferior.h: New file.
12168 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12169 instead of "startup_inferior". Call "add_thread_silent" after
12170 "fork_inferior".
12171 * target.h (target_terminal_init): Move prototype to
12172 "target/target.h".
12173 (target_terminal_inferior): Likewise.
12174 (target_terminal_ours): Likewise.
12175 * target/target.h (target_terminal_init): New prototype, moved
12176 from "target.h".
12177 (target_terminal_inferior): Likewise.
12178 (target_terminal_ours): Likewise.
12179 * utils.c (gdb_flush_out_err): New function.
12180
043a4934
SDJ
121812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12182
12183 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12184 * common/common-gdbthread.h: New file, with parts from
12185 "gdb/gdbthread.h".
12186 * gdbthread.h: Include "common-gdbthread.h".
12187 (switch_to_thread): Moved to "common/common-gdbthread.h".
12188
15652511
SDJ
121892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12190
12191 * Makefile.in (SFILES): Add "common/job-control.c".
12192 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12193 (COMMON_OBS): Add "job-control.o".
12194 * common/job-control.c: New file, with contents from
12195 "gdb/inflow.c".
12196 * common/job-control.h: New file, with contents from "terminal.h".
12197 * fork-child.c: Include "job-control.h".
12198 * inflow.c: Include "job-control.h".
12199 (gdb_setpgid): Move to "common/common-inflow.c".
12200 (_initialize_inflow): Move setting of "job_control" to
12201 "handle_job_control".
12202 * terminal.h (job_control): Moved to "common/common-terminal.h".
12203 (gdb_setpgid): Likewise.
12204 * top.c: Include "job_control.h".
12205 * utils.c: Likewise.
12206 (job_control): Moved to "job-control.c".
12207
2d7cc5c7
PA
122082017-06-07 Pedro Alves <palves@redhat.com>
12209
12210 * Makefile.in (SFILES): Add gdb_regex.c.
12211 (COMMON_OBS): Add gdb_regex.o.
12212 * ada-lang.c (ada_add_standard_exceptions)
12213 (ada_add_exceptions_from_frame, name_matches_regex)
12214 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12215 parameter type to compiled_regex. Adjust.
12216 (ada_exceptions_list): Use compiled_regex.
12217 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12218 std::unique_ptr<compiled_regex>.
12219 (exception_catchpoint::~exception_catchpoint): Remove regfree
12220 call.
12221 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12222 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12223 * breakpoint.c (solib_catchpoint::compiled): Now a
12224 std::unique_ptr<compiled_regex>.
12225 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12226 (check_status_catch_solib): Adjust to use compiled_regex.
12227 (add_solib_catchpoint): Adjust to use compiled_regex.
12228 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12229 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12230 compiled_regex reference. Adjust to use it.
12231 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12232 declaration. Include "gdb_regex.h".
12233 (apropos_cmd): Change regex parameter to compiled_regex reference.
12234 * gdb_regex.c: New file.
12235 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12236 declarations.
12237 (class compiled_regex): New.
12238 * linux-tdep.c: Include "common/gdb_optional.h".
12239 (struct mapping_regexes): New, factored out from
12240 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12241 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12242 gdb::optional and remove cleanups. Adjust to compiled_regex.
12243 * probe.c: Include "common/gdb_optional.h".
12244 (collect_probes): Use compiled_regex and gdb::optional and remove
12245 cleanups.
12246 * skip.c: Include "common/gdb_optional.h".
12247 (skiplist_entry::compiled_function_regexp): Now a
12248 gdb::optional<compiled_regex>.
12249 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12250 (free_skiplist_entry): Remove regfree call.
12251 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12252 compiled_regex and gdb::optional.
12253 * symtab.c: Include "common/gdb_optional.h".
12254 (search_symbols): Use compiled_regex and gdb::optional.
12255 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12256 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12257 to gdb_regex.c.
12258
50d6adef
AH
122592017-06-07 Alan Hayward <alan.hayward@arm.com>
12260
12261 * regcache.c (regcache::save): Avoid buffer use.
12262 (regcache::dump): Likewise.
12263
4a8a33c8
AH
122642017-06-07 Alan Hayward <alan.hayward@arm.com>
12265
12266 * sh-tdep.c (sh_pseudo_register_read): Remove
12267 MAX_REGISTER_SIZE.
12268 (sh_pseudo_register_write): Likewise.
12269 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12270 (sh64_pseudo_register_write): Likewise
12271
d1be909e
AH
122722017-06-07 Alan Hayward <alan.hayward@arm.com>
12273
12274 * aarch64-tdep.c (aarch64_store_return_value): Use
12275 V_REGISTER_SIZE.
12276 (aarch64_pseudo_read_value): Likewise.
12277 (aarch64_pseudo_write): Likewise.
12278
f4a65042
YQ
122792017-06-06 Yao Qi <yao.qi@linaro.org>
12280
12281 * regformats/regdef.h (set_register_cache): Remove the
12282 declaration.
12283
9f7fb0aa
AH
122842017-06-06 Alan Hayward <alan.hayward@arm.com>
12285
12286 * frame.c (frame_unwind_register_signed): Use
12287 frame_unwind_register_value.
12288
e1e01040
PA
122892017-06-06 Pedro Alves <palves@redhat.com>
12290
12291 PR breakpoints/21553
12292 * breakpoint.c (create_breakpoints_sal_default)
12293 (init_breakpoint_sal, create_breakpoint_sal): Use
12294 gdb::unique_xmalloc_ptr for string parameters.
12295 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12296 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12297 (base_breakpoint_create_breakpoints_sal)
12298 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12299 (strace_marker_create_breakpoints_sal)
12300 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12301 string parameters.
12302 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12303 gdb::unique_xmalloc_ptr for string parameters.
12304 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12305 parameters.
12306
fbe654c8
AH
123072017-06-06 Alan Hayward <alan.hayward@arm.com>
12308
12309 * alpha-tdep.c (alpha_register_to_value): Use
12310 get_frame_register_value.
12311 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12312
ae0d01d6
AH
123132017-06-06 Alan Hayward <alan.hayward@arm.com>
12314
12315 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12316 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12317 (ia64_value_to_register): Likewise.
12318 (ia64_extract_return_value): Likewise.
12319 (ia64_store_return_value): Likewise.
12320 (ia64_push_dummy_call): Likewise.
12321
49cf576c
JB
123222017-06-04 Joel Brobecker <brobecker@adacore.com>
12323
12324 GDB 8.0 released.
12325
26b6a6ab
SM
123262017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12327
12328 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12329
22827c51
SM
123302017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12331
12332 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12333 parameter.
12334 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12335
0e05cf3a
SM
123362017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12337
12338 * event-loop.c (poll_timers): Unallocate timer using delete
12339 instead of xfree.
12340
c1fc2657
SM
123412017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12342
12343 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12344 (struct breakpoint) <~breakpoint>: New.
12345 (struct watchpoint): Inherit from breakpoint.
12346 <~watchpoint>: New.
12347 <base>: Remove.
12348 (struct tracepoint): Inherit from breakpoint.
12349 <base>: Remove.
12350 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12351 (struct longjmp_breakpoint): Inherit from breakpoint.
12352 <~longjmp_breakpoint>: New.
12353 <base>: Remove.
12354 (new_breakpoint_from_type): Remove casts.
12355 (watchpoint_in_thread_scope): Remove reference to base field.
12356 (watchpoint_del_at_next_stop): Likewise.
12357 (update_watchpoint): Likewise.
12358 (watchpoint_check): Likewise.
12359 (bpstat_check_watchpoint): Likewise.
12360 (set_longjmp_breakpoint): Likewise.
12361 (struct fork_catchpoint): Inherit from breakpoint.
12362 <base>: Remove.
12363 (struct solib_catchpoint): Inherit from breakpoint.
12364 <~solib_catchpoint>: New.
12365 <base>: Remove.
12366 (dtor_catch_solib): Change to ...
12367 (solib_catchpoint::~solib_catchpoint): ... this.
12368 (breakpoint_hit_catch_solib): Remove reference to base field.
12369 (add_solib_catchpoint): Likewise.
12370 (create_fork_vfork_event_catchpoint): Likewise.
12371 (struct exec_catchpoint): Inherit from breakpoint.
12372 <~exec_catchpoint>: New.
12373 <base>: Remove.
12374 (dtor_catch_exec): Change to ...
12375 (exec_catchpoint::~exec_catchpoint): ... this.
12376 (dtor_watchpoint): Change to ...
12377 (watchpoint::~watchpoint): ... this.
12378 (watch_command_1): Remove reference to base field.
12379 (catch_exec_command_1): Likewise.
12380 (base_breakpoint_dtor): Change to ...
12381 (breakpoint::~breakpoint): ... this.
12382 (base_breakpoint_ops): Remove dtor field value.
12383 (longjmp_bkpt_dtor): Change to ...
12384 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12385 (strace_marker_create_breakpoints_sal): Remove reference to base
12386 field.
12387 (delete_breakpoint): Don't manually call breakpoint destructor.
12388 (create_tracepoint_from_upload): Remove reference to base field.
12389 (trace_pass_set_count): Likewise.
12390 (initialize_breakpoint_ops): Don't initialize
12391 momentary_breakpoint_ops, don't set dtors.
12392 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12393 <~ada_catchpoint>: New.
12394 <base>: Remove.
12395 (create_excep_cond_exprs): Remove reference to base field.
12396 (dtor_exception): Change to ...
12397 (ada_catchpoint::~ada_catchpoint): ... this.
12398 (dtor_catch_exception): Remove.
12399 (dtor_catch_exception_unhandled): Remove.
12400 (dtor_catch_assert): Remove.
12401 (create_ada_exception_catchpoint): Remove reference to base
12402 field.
12403 (initialize_ada_catchpoint_ops): Don't set dtors.
12404 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12405 breakpoint.
12406 <~signal_catchpoint>: New.
12407 <base>: Remove.
12408 (signal_catchpoint_dtor): Change to ...
12409 (signal_catchpoint::~signal_catchpoint): ... this.
12410 (create_signal_catchpoint): Remove reference to base field.
12411 (initialize_signal_catchpoint_ops): Don't set dtor.
12412 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12413 from breakpoint.
12414 <~syscall_catchpoint>: New.
12415 <base>: Remove.
12416 (dtor_catch_syscall): Change to ...
12417 (syscall_catchpoint::~syscall_catchpoint): ... this.
12418 (create_syscall_event_catchpoint): Remove reference to base
12419 field.
12420 (initialize_syscall_catchpoint_ops): Don't set dtor.
12421 * break-catch-throw.c (struct exception_catchpoint): Inherit
12422 from breakpoint.
12423 <~exception_catchpoint>: New.
12424 <base>: Remove.
12425 (dtor_exception_catchpoint): Change to ...
12426 (exception_catchpoint::~exception_catchpoint): ... this.
12427 (handle_gnu_v3_exceptions): Remove reference to base field.
12428 (initialize_throw_catchpoint_ops): Don't set dtor.
12429 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12430 field.
12431 * remote.c (remote_get_tracepoint_status): Likewise.
12432 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12433 * tracefile.c (tracefile_fetch_registers): Likewise.
12434 * tracepoint.c (actions_command): Likewise.
12435 (validate_actionline): Likewise.
12436 (tfind_1): Likewise.
12437 (get_traceframe_location): Likewise.
12438 (find_matching_tracepoint_location): Likewise.
12439 (parse_tracepoint_status): Likewise.
12440 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12441
3b0871f4
SM
124422017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12443
12444 * breakpoint.c (struct longjmp_breakpoint): New struct.
12445 (is_tracepoint_type): Change return type to bool.
12446 (is_longjmp_type): New function.
12447 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12448 (set_raw_breakpoint_without_location): Use
12449 new_breakpoint_from_type.
12450 (set_raw_breakpoint): Likewise.
12451
a5e364af
SM
124522017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12453
12454 * breakpoint.c (new_breakpoint_from_type): New function.
12455 (create_breakpoint_sal): Use new_breakpoint_from_type and
12456 unique_ptr.
12457 (create_breakpoint): Likewise.
12458
ae3b3f34
SM
124592017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12460
12461 * memattr.c (mem_info_command): Rename to ...
12462 (info_mem_command): ... this.
12463 (mem_enable_command): Rename to ...
12464 (enable_mem_command): ... this.
12465 (mem_disable_command): Rename to ...
12466 (disable_mem_command): ... this.
12467 (mem_delete_command): Rename to ...
12468 (delete_mem_command): ... this.
12469 (_initialize_mem): Adjust function names.
12470
13ace077
MM
124712017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12472
12473 * btrace.c (handle_pt_insn_events): New.
12474 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12475 STATUS. Split into this and ...
12476 (handle_pt_insn_event_flags): ... this.
12477
c56ccc05
MM
124782017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12479
12480 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12481 and struct pt_insn.resynced.
12482 * configure: Regenerated.
12483 * config.in: Regenerated.
12484
08c3f6d2
TW
124852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12486
12487 * btrace.c (ftrace_find_call_by_number): New function.
12488 (ftrace_new_function): Store objects, not pointers.
12489 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12490 ftrace_new_gap, ftrace_update_function,
12491 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12492 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12493 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12494 btrace_ends_with_single_insn, btrace_call_get): Account for
12495 btrace_thread_info::functions now storing objects.
12496 * btrace.h (struct btrace_thread_info): Add constructor.
12497 (struct btrace_thread_info) <functions>: Make std::vector.
12498 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12499 Initialize with default values.
12500 * record-btrace.c (record_btrace_frame_sniffer): Account for
12501 btrace_thread_info::functions now storing objects.
12502
8ffd39f2
TW
125032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12504
12505 * btrace.c: Remove typedef bfun_s.
12506 (ftrace_new_gap): Directly add gaps to the list of gaps.
12507 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12508 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12509 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12510 instead of gdb VEC.
12511
4aeb0dfc
TW
125122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12513
12514 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12515 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12516 with btrace_thread_info::next_segment and
12517 btrace_thread_info::prev_segment.
12518 * btrace.h: Remove struct btrace_func_link.
12519 (struct btrace_function): Replace pair of function segment pointers
12520 with pair of indices.
12521 * python/py-record-btrace.c (btpy_call_prev_sibling,
12522 btpy_call_next_sibling): Replace references to
12523 btrace_thread_info::segment with btrace_thread_info::next_segment and
12524 btrace_thread_info::prev_segment.
12525 * record-btrace.c (record_btrace_frame_this_id): Use
12526 btrace_find_call_by_number.
12527
eb8f2b9c
TW
125282017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12529
12530 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12531 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12532 btrace_insn_next, btrace_insn_prev): Remove references to
12533 btrace_thread_info::flow.
12534 * btrace.h (struct btrace_function): Remove FLOW.
12535
42bfe59e
TW
125362017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12537
12538 * btrace.c (ftrace_find_call_by_number): New function.
12539 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12540 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12541 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12542 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12543 index.
12544 * btrace.h (struct btrace_function): Turn UP into an index.
12545 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12546 as an index.
12547 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12548 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12549 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12550
b54b03bd
TW
125512017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12552
12553 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12554 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12555 ftrace_update_function, ftrace_compute_global_level_offset,
12556 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12557 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12558 btrace_insn_end, btrace_is_empty): Remove references to
12559 btrace_thread_info::begin and btrace_thread_info::end.
12560 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12561 (struct btrace_thread_info) <functions>: Adjust comment.
12562 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12563 btrace_thread_info::begin.
12564
8286623c
TW
125652017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12566
12567 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12568 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12569 ftrace_update_function): Remove arguments that implicitly were always
12570 BTINFO->END.
12571 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12572 Don't pass BTINFO->END.
12573
a0f1b963
TW
125742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12575
12576 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12577 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12578 btrace_find_insn_by_number): Replace function segment pointer with
12579 index.
12580 (btrace_insn_cmp): Simplify.
12581 * btrace.h: (struct btrace_insn_iterator) Rename index to
12582 insn_index. Replace function segment pointer with index into function
12583 segment vector.
12584 * record-btrace.c (record_btrace_call_history): Replace function
12585 segment pointer use with index.
12586 (record_btrace_frame_sniffer): Retrieve function call segment through
12587 vector.
12588 (record_btrace_set_replay): Remove defunc't safety check.
12589
f158f208
TW
125902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12591
12592 * btrace.c (btrace_ends_with_single_insn): New function.
12593 (btrace_call_get, btrace_call_number, btrace_call_begin,
12594 btrace_call_end, btrace_call_next, btrace_call_prev,
12595 btrace_find_call_by_number): Use index into call segment vector
12596 instead of pointer.
12597 (btrace_call_cmp): Simplify.
12598 * btrace.h (struct btrace_call_iterator): Replace function call segment
12599 pointer with index into vector.
12600 * record-btrace.c (record_btrace_call_history): Use index instead of
12601 pointer.
12602
521103fd
TW
126032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12604
12605 * btrace.c (btrace_insn_begin, btrace_insn_end,
12606 btrace_find_insn_by_number): Add btinfo to iterator.
12607 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12608
17b89b34
TW
126092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12610
12611 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12612 and save pointers directly.
12613 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12614 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12615 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12616 changed signature of functions.
12617 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12618 (btrace_fetch): Remove code that adds btrace_function pointers to
12619 vector of btrace_functions.
12620 (btrace_clear): Simplify freeing vector of btrace_functions.
12621
2b51eddc
TW
126222017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12623
12624 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12625 Replace VEC_* with std::vector functions.
12626 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12627 (struct btrace_thread_info)<functions>: Change type to std::vector.
12628
db6be0d5
SM
126292017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12630
12631 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12632 "Removed targets and native configurations" up. Merge duplicate
12633 "New commands" sub-sections. Add "New options" sub-sections.
12634
b057297a
AH
126352017-05-26 Alan Hayward <alan.hayward@arm.com>
12636
12637 * defs.h (copy_integer_to_size): New declaration.
12638 * findvar.c (copy_integer_to_size): New function.
12639 (do_cint_test): New selftest function.
12640 (copy_integer_to_size_test): Likewise.
12641 (_initialize_findvar): Likewise.
12642 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12643 (mips_fbsd_collect_reg): Use raw_collect_integer.
12644 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12645 (mips64_fill_gregset): Use raw_collect_integer
12646 (mips64_fill_fpregset): Use raw_supply_integer.
12647 * regcache.c (regcache::raw_supply_integer): New function.
12648 (regcache::raw_collect_integer): Likewise.
12649 * regcache.h: (regcache::raw_supply_integer): New declaration.
12650 (regcache::raw_collect_integer): Likewise.
12651
b77b02a5
YQ
126522017-05-24 Yao Qi <yao.qi@linaro.org>
12653
12654 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12655 (COMMON_OBS): Add gdbarch-selftests.o.
12656 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12657 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12658 * gdbarch-selftests.c: New file.
12659 * regcache.h (regcache) <~regcache>: Mark it virtual if
12660 GDB_SELF_TEST.
12661 <raw_write>: Likewise.
12662
e521e87e
YQ
126632017-05-24 Yao Qi <yao.qi@linaro.org>
12664
12665 * regcache.c (current_regcache): Change it to
12666 regcache::current_regcache.
12667 (regcache_observer_target_changed): Update.
12668 (regcache_thread_ptid_changed): Make it a regcache static
12669 method.
12670 (regcache_thread_ptid_changed): Update.
12671 (class regcache_access): New.
12672 (current_regcache_test): Update.
12673 (_initialize_regcache): Update.
12674 * regcache.h: Include forward_list.
12675 (regcache): Declare regcache_thread_ptid_changed and declare
12676 registers_changed_ptid as friend.
12677
d8e07dda
YQ
126782017-05-24 Yao Qi <yao.qi@linaro.org>
12679
12680 * i387-tdep.c (i387_register_to_value): Use register_size
12681 instead of TYPE_LENGTH.
12682 * m68k-tdep.c (m68k_register_to_value): Likewise.
12683
8c8f9122
YQ
126842017-05-24 Yao Qi <yao.qi@linaro.org>
12685
12686 * i387-tdep.c (i387_convert_register_p): Return false if type
12687 code isn't TYPE_CODE_FLT.
12688
68fce50f
YQ
126892017-05-24 Yao Qi <yao.qi@linaro.org>
12690
12691 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12692 length is 4.
12693 (alpha_register_to_value): Remove type length check.
12694 (alpha_value_to_register): Likewise.
12695
88954b49
YQ
126962017-05-24 Yao Qi <yao.qi@linaro.org>
12697
12698 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12699 TYPE_CODE_FLT.
12700
e3ec9b69
YQ
127012017-05-24 Yao Qi <yao.qi@linaro.org>
12702
12703 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12704 TYPE_CODE_FLT or not.
12705
cdd238da
YQ
127062017-05-24 Yao Qi <yao.qi@linaro.org>
12707
12708 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12709 * avr-tdep.c (avr_gdbarch_init): Likewise.
12710 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12711 * cris-tdep.c (cris_gdbarch_init): Likewise.
12712 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12713 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12714 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12715 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12716 * mep-tdep.c (mep_gdbarch_init): Likewise.
12717 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12718 * mips-tdep.c (mips_gdbarch_init): Likewise.
12719 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12720 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12721 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12722 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12723 * v850-tdep.c (v850_gdbarch_init): Likewise.
12724
7a3929c4
YQ
127252017-05-24 Yao Qi <yao.qi@linaro.org>
12726
12727 * selftest-arch.c (tests_with_arch): Call registers_changed
12728 and reinit_frame_cache.
12729 * selftest.c (run_self_tests): Likewise.
12730
f4985dba
YQ
127312017-05-24 Yao Qi <yao.qi@linaro.org>
12732
12733 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12734 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12735
ab20fa4a
YQ
127362017-05-24 Yao Qi <yao.qi@linaro.org>
12737
12738 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12739 set_gdbarch_print_insn.
12740
f532ab94
YQ
127412017-05-24 Yao Qi <yao.qi@linaro.org>
12742
12743 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12744 set_gdbarch_print_insn.
12745
39503f82
YQ
127462017-05-24 Yao Qi <yao.qi@linaro.org>
12747
12748 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12749 set_gdbarch_print_insn.
12750 * arc-tdep.c (arc_gdbarch_init): Likewise.
12751 * arch-utils.c: include dis-asm.h.
12752 (default_print_insn): New function.
12753 * arch-utils.h (default_print_insn): Declare.
12754 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12755 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12756 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12757 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12758 * frv-tdep.c (frv_gdbarch_init): Likewise.
12759 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12760 * gdbarch.sh (print_insn): Use default_print_insn.
12761 * gdbarch.c: Regenerated.
12762 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12763 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12764 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12765 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12766 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12767 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12768 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12769 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12770 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12771 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12772 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12773 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12774 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12775 * mt-tdep.c (mt_gdbarch_init): Likewise.
12776 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12777 * nios2-tdep.c (nios2_print_insn): Remove.
12778 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12779 * rx-tdep.c (rx_gdbarch_init): Likewise.
12780 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12781 * score-tdep.c (score_print_insn): Remove.
12782 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12783 * sh-tdep.c (sh_gdbarch_init): Likewise.
12784 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12785 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12786 * tic6x-tdep.c (tic6x_print_insn): Remove.
12787 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12788 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12789 * v850-tdep.c (v850_gdbarch_init): Likewise.
12790 * vax-tdep.c (vax_gdbarch_init): Likewise.
12791 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12792 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12793
f7241d4f
JB
127942017-05-23 John Baldwin <jhb@FreeBSD.org>
12795
12796 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12797 (MIPS_FP0_REGNUM): Remove.
12798 (MIPS_FSR_REGNUM): Remove.
12799 (mips_fbsd_supply_fpregs): Use mips_regnum.
12800 (mips_fbsd_supply_gregs): Likewise.
12801 (mips_fbsd_collect_fpregs): Likewise.
12802 (mips_fbsd_collect_gregs): Likewise.
12803
d489d81d
JB
128042017-05-23 John Baldwin <jhb@FreeBSD.org>
12805
12806 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12807 (getpfpregs_supplies): New function.
12808 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12809 getfpregs_supplies.
12810 (mips_fbsd_store_inferior_registers): Likewise.
12811
e11b3cdc
PA
128122017-05-22 Pedro Alves <palves@redhat.com>
12813
12814 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12815 maintainer.
12816
0f068fb5
AH
128172017-05-22 Alan Hayward <alan.hayward@arm.com>
12818
12819 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12820 (store_register): Likewise.
12821 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12822 (get_decimal_float_return_value): Likewise.
12823 (do_ppc_sysv_return_value): Likewise.
12824 (ppc64_sysv_abi_push_integer): Likewise.
12825 (ppc64_sysv_abi_push_freg): Likewise.
12826 (ppc64_sysv_abi_return_value_base): Likewise.
12827 (ppc64_sysv_abi_return_value): Likewise.
12828 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12829 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12830 * rs6000-nat.c: Likewise.
12831 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12832 (rs6000_value_to_register): Likewise.
12833 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12834
e6cf65f2
TT
128352017-05-21 Tom Tromey <tom@tromey.com>
12836
12837 PR rust/21466:
12838 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12839 arrays as "[T]", not "[T; ]".
12840
43cc5389
TT
128412017-05-19 Tom Tromey <tom@tromey.com>
12842
12843 PR rust/21484:
12844 * rust-lang.c (exp_descriptor_rust): New function.
12845 (rust_language_defn): Use it.
12846 * p-lang.c (pascal_language_defn): Update.
12847 * opencl-lang.c (opencl_language_defn): Update.
12848 * objc-lang.c (objc_language_defn): Update.
12849 * m2-lang.c (m2_language_defn): Update.
12850 * language.h (struct language_defn)
12851 <la_watch_location_expression>: New member.
12852 * language.c (unknown_language_defn, auto_language_defn)
12853 (local_language_defn): Update.
12854 * go-lang.c (go_language_defn): Update.
12855 * f-lang.c (f_language_defn): Update.
12856 * d-lang.c (d_language_defn): Update.
12857 * c-lang.h (c_watch_location_expression): Declare.
12858 * c-lang.c (c_watch_location_expression): New function.
12859 (c_language_defn, cplus_language_defn, asm_language_defn)
12860 (minimal_language_defn): Use it.
12861 * breakpoint.c (watch_command_1): Call
12862 la_watch_location_expression.
12863 * ada-lang.c (ada_language_defn): Update.
12864
7a6e7fcc
RO
128652017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12866
6e7e1744
RO
12867 PR tui/21482
12868 * gdb_curses.h (NOMACROS): Define.
12869 (NCURSES_NOMACROS): Define.
12870
128712017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12872
12873 PR tui/21482
7a6e7fcc
RO
12874 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12875 arg to char *.
12876 * tui/tui-wingeneral.c (box_win): Likewise.
12877 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12878 (tui_show_source_line): Likewise.
12879 (tui_show_exec_info_content): Likewise.
12880
1933fd8e
VM
128812017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12882
12883 * sparc-tdep.c (sparc_structure_return_p)
12884 (sparc_arg_on_registers_p): New functions.
12885 (sparc32_store_arguments): Use them.
12886 * sparc64-tdep.c (sparc64_16_byte_align_p)
12887 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12888 Handle TYPE_CODE_ARRAY.
12889
21873064
YQ
128902017-05-17 Yao Qi <yao.qi@linaro.org>
12891
12892 * cli/cli-decode.c (add_alias_cmd): New function.
12893 * command.h (add_alias_cmd): Declare.
12894 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12895 instead call add_alias_cmd.
12896
2b351b19
PA
128972017-05-17 Pedro Alves <palves@redhat.com>
12898
12899 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12900 (nat_makefile_frag): ... this. All references updated.
12901 * configure.ac: Likewise.
12902 * configure.nat: Likewise. Enhance comments.
12903 * configure: Regenerate.
12904
5f2ad7a3
RO
129052017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12906
12907 * procfs.c (procfs_create_inferior): Change prototype to match
12908 definition.
12909
adf3dde5
EZ
129102017-05-13 Eli Zaretskii <eliz@gnu.org>
12911
12912 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12913 C++ compiler warning.
12914
6830f270
TT
129152017-05-12 Tom Tromey <tom@tromey.com>
12916
12917 PR rust/21483:
12918 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12919 recurse, just call value_struct_elt directly.
12920
68f2f2e3
TT
129212017-05-12 Tom Tromey <tom@tromey.com>
12922
12923 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12924 OP_RUST_ARRAY>: Fix.
12925
256afbc2
TT
129262017-05-12 Tom Tromey <tom@tromey.com>
12927
12928 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12929
94bb8dfe
YQ
129302017-05-09 Yao Qi <yao.qi@linaro.org>
12931
12932 * regcache.c: Include <forward_list>.
12933 (struct regcache_list): Remove.
12934 (current_regcache): Update.
12935 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12936 (regcache_thread_ptid_changed): Likewise.
12937 (registers_changed_ptid): Likewise.
12938 (current_regcache_size): Likewise.
12939
8248946c
YQ
129402017-05-09 Yao Qi <yao.qi@linaro.org>
12941
12942 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12943 (current_regcache_size): New function.
12944 (current_regcache_test): New function.
12945 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12946
313c5961
AH
129472017-05-08 Alan Hayward <alan.hayward@arm.com>
12948
12949 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12950 (print_gp_register_row): Use get_frame_register_value.
12951
27bfc1d1
AH
129522017-05-08 Alan Hayward <alan.hayward@arm.com>
12953
12954 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12955 (mips_supply_fpregset): Likewise.
12956 (mips64_supply_gregset): Likewise.
12957
146e6c5c
AH
129582017-05-08 Alan Hayward <alan.hayward@arm.com>
12959
12960 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12961 regcache->raw_supply_zeroed.
12962
e50f25ec
SDJ
129632017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12964
12965 * configure.nat: Rearrange 'case' statements to match
12966 host before cpu.
12967
21ea5acd
SDJ
129682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12969
12970 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12971 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12972 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12973 "@nat_extra_makefile_frag@".
12974 (Makefile): Remove dependency on "@frags@".
12975 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12976 (data-directory/Makefile): Likewise.
12977 * config/aarch64/linux.mh: Deleted; moved contents to
12978 "gdb/configure.nat".
12979 * config/alpha/alpha-linux.mh: Likewise.
12980 * config/alpha/nbsd.mh: Likewise.
12981 * config/arm/linux.mh: Likewise.
12982 * config/arm/nbsdelf.mh: Likewise.
12983 * config/i386/cygwin.mh: Likewise.
12984 * config/i386/cygwin64.mh: Likewise.
12985 * config/i386/darwin.mh: Likewise.
12986 * config/i386/fbsd.mh: Likewise.
12987 * config/i386/fbsd64.mh: Likewise.
12988 * config/i386/go32.mh: Likewise.
12989 * config/i386/i386gnu.mh: Likewise.
12990 * config/i386/i386sol2.mh: Likewise.
12991 * config/i386/linux.mh: Likewise.
12992 * config/i386/linux64.mh: Likewise.
12993 * config/i386/mingw.mh: Likewise.
12994 * config/i386/mingw64.mh: Likewise.
12995 * config/i386/nbsd64.mh: Likewise.
12996 * config/i386/nbsdelf.mh: Likewise.
12997 * config/i386/nto.mh: Likewise.
12998 * config/i386/obsd.mh: Likewise.
12999 * config/i386/obsd64.mh: Likewise.
13000 * config/i386/sol2-64.mh: Likewise.
13001 * config/ia64/linux.mh: Likewise.
13002 * config/m32r/linux.mh: Likewise.
13003 * config/m68k/linux.mh: Likewise.
13004 * config/m68k/nbsdelf.mh: Likewise.
13005 * config/m68k/obsd.mh: Likewise.
13006 * config/m88k/obsd.mh: Likewise.
13007 * config/mips/fbsd.mh: Likewise.
13008 * config/mips/linux.mh: Likewise.
13009 * config/mips/nbsd.mh: Likewise.
13010 * config/mips/obsd64.mh: Likewise.
13011 * config/pa/linux.mh: Likewise.
13012 * config/pa/nbsd.mh: Likewise.
13013 * config/pa/obsd.mh: Likewise.
13014 * config/powerpc/aix.mh: Likewise.
13015 * config/powerpc/fbsd.mh: Likewise.
13016 * config/powerpc/linux.mh: Likewise.
13017 * config/powerpc/nbsd.mh: Likewise.
13018 * config/powerpc/obsd.mh: Likewise.
13019 * config/powerpc/ppc64-linux.mh: Likewise.
13020 * config/powerpc/spu-linux.mh: Likewise.
13021 * config/s390/linux.mh: Likewise.
13022 * config/sh/nbsd.mh: Likewise.
13023 * config/sparc/fbsd.mh: Likewise.
13024 * config/sparc/linux.mh: Likewise.
13025 * config/sparc/linux64.mh: Likewise.
13026 * config/sparc/nbsd64.mh: Likewise.
13027 * config/sparc/nbsdelf.mh: Likewise.
13028 * config/sparc/obsd64.mh: Likewise.
13029 * config/sparc/sol2.mh: Likewise.
13030 * config/tilegx/linux.mh: Likewise.
13031 * config/vax/nbsdelf.mh: Likewise.
13032 * config/vax/obsd.mh: Likewise.
13033 * config/xtensa/linux.mh: Likewise.
13034 * config/i386/i386gnu.mn: New file, with excerpts from
13035 "config/i386/i386gnu.mh".
13036 * configure: Regenerate.
13037 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
13038 *.mh files under "gdb/config".
13039 * configure.nat: New file, with contents from the
13040 "gdb/config/*/*.mh" files.
13041
7ed1acaf
TW
130422017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
13043
13044 * btrace.c (btrace_clear): Free insn vector.
13045
e13cb306
PA
130462017-05-05 Pedro Alves <palves@redhat.com>
13047
13048 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
13049 * configure: Regenerate.
13050
5ed8105e
PA
130512017-05-04 Pedro Alves <palves@redhat.com>
13052
13053 * Makefile.in (SFILES): Add progspace-and-thread.c.
13054 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
13055 (COMMON_OBS): Add progspace-and-thread.o.
13056 * breakpoint.c: Include "progspace-and-thread.h".
13057 (update_inserted_breakpoint_locations)
13058 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
13059 Use scoped_restore_current_pspace_and_thread.
13060 (create_std_terminate_master_breakpoint): Use
13061 scoped_restore_current_program_space.
13062 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
13063 (print_breakpoint_location): Use
13064 scoped_restore_current_program_space.
13065 (bp_loc_is_permanent): Use
13066 scoped_restore_current_pspace_and_thread.
13067 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
13068 (download_tracepoint_locations): Use
13069 scoped_restore_current_pspace_and_thread.
13070 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
13071 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
13072 (enum step_over_calls_kind): Moved from inferior.h.
13073 (class scoped_restore_current_thread): New class.
13074 * gdbthread.h (make_cleanup_restore_current_thread): Delete
13075 declaration.
13076 (scoped_restore_current_thread): New class.
13077 * infcmd.c: Include "common/gdb_optional.h".
13078 (continue_1, proceed_after_attach): Use
13079 scoped_restore_current_thread.
13080 (notice_new_inferior): Use scoped_restore_current_thread.
13081 * inferior.c: Include "progspace-and-thread.h".
13082 (restore_inferior, save_current_inferior): Delete.
13083 (add_inferior_command, clone_inferior_command): Use
13084 scoped_restore_current_pspace_and_thread.
13085 * inferior.h (scoped_restore_current_inferior): New class.
13086 * infrun.c: Include "progspace-and-thread.h" and
13087 "common/gdb_optional.h".
13088 (follow_fork_inferior): Use
13089 scoped_restore_current_pspace_and_thread.
13090 (scoped_restore_exited_inferior): New class.
13091 (handle_vfork_child_exec_or_exit): Use
13092 scoped_restore_exited_inferior,
13093 scoped_restore_current_pspace_and_thread,
13094 scoped_restore_current_thread and scoped_restore.
13095 (fetch_inferior_event): Use scoped_restore_current_thread.
13096 * linespec.c (decode_line_full, decode_line_1): Use
13097 scoped_restore_current_program_space.
13098 * mi/mi-main.c: Include "progspace-and-thread.h".
13099 (exec_continue): Use scoped_restore_current_thread.
13100 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
13101 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
13102 * proc-service.c (ps_pglobal_lookup): Use
13103 scoped_restore_current_program_space.
13104 * progspace-and-thread.c: New file.
13105 * progspace-and-thread.h: New file.
13106 * progspace.c (release_program_space, clone_program_space): Use
13107 scoped_restore_current_program_space.
13108 (restore_program_space, save_current_program_space)
13109 (save_current_space_and_thread): Delete.
13110 (switch_to_program_space_and_thread): Moved to
13111 progspace-and-thread.c.
13112 * progspace.h (save_current_program_space)
13113 (save_current_space_and_thread): Delete declarations.
13114 (scoped_restore_current_program_space): New class.
13115 * remote.c (remote_btrace_maybe_reopen): Use
13116 scoped_restore_current_thread.
13117 * symtab.c: Include "progspace-and-thread.h".
13118 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
13119 * thread.c (print_thread_info_1): Use
13120 scoped_restore_current_thread.
13121 (struct current_thread_cleanup): Delete.
13122 (do_restore_current_thread_cleanup)
13123 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
13124 (scoped_restore_current_thread::~scoped_restore_current_thread):
13125 ... this new dtor.
13126 (make_cleanup_restore_current_thread): Rename/convert to ...
13127 (scoped_restore_current_thread::scoped_restore_current_thread):
13128 ... this new ctor.
13129 (thread_apply_all_command): Use scoped_restore_current_thread.
13130 (thread_apply_command): Use scoped_restore_current_thread.
13131 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13132 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13133
f6223dbb
PA
131342017-05-04 Pedro Alves <palves@redhat.com>
13135
13136 * thread.c (make_cleanup_restore_current_thread): Move
13137 find_thread_ptid call before the is_stopped call. Assert that the
13138 thread is found. Replace is_stopped call by checking the thread's
13139 state directly. Remove unnecessary NULL-thread check.
13140
3c3ae77e
PA
131412017-05-04 Pedro Alves <palves@redhat.com>
13142
13143 * corelow.c (thread_section_name): New class.
13144 (get_core_register_section, get_core_siginfo): Use it.
13145
45eba0ab
AA
131462017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13147
13148 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13149 (get_core_register_section): Remove xfree of NULL pointer.
13150
f81fdd35
AH
131512017-05-03 Alan Hayward <alan.hayward@arm.com>
13152
13153 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13154 * regcache.c (regcache::raw_supply_zeroed): New function.
13155 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13156
35837774
SM
131572017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13158
13159 * gdbarch.sh: Remove commented out definition of
13160 TARGET_CHAR_BIT.
13161 * gdbarch.h: Re-generate.
13162
c94fee56
SDJ
131632017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13164
13165 * configure: Regenerate.
13166
d17f7b36
SM
131672017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13168
13169 * solib-target.c (solib_target_relocate_section_addresses):
13170 Remove num_section_bases, num_bases, segment_bases variables.
13171
b560ebd6
SM
131722017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13173
13174 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13175
f2f46dfc
SM
131762017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13177
13178 * solib-target.c: Include <vector>
13179 (struct lm_info_target) <~lm_info_target>: Remove.
13180 <segment_bases, section_bases>: Change type to
13181 std::vector<CORE_ADDR>.
13182 (library_list_start_segment, library_list_start_section,
13183 library_list_end_library,
13184 solib_target_relocate_section_addresses): Adjust.
13185
a0ff9e1a
SM
131862017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13187
13188 * gdbarch.sh (software_single_step): Change return type to
13189 std::vector<CORE_ADDR>.
13190 * gdbarch.c, gdbarch.h: Re-generate.
13191 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13192 Adjust.
13193 (arm_deal_with_atomic_sequence_raw): Adjust.
13194 (thumb_get_next_pcs_raw): Adjust.
13195 (arm_get_next_pcs_raw): Adjust.
13196 (arm_get_next_pcs): Adjust.
13197 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13198 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13199 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13200 (alpha_software_single_step): Adjust.
13201 * alpha-tdep.h (alpha_software_single_step): Adjust.
13202 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13203 * arm-tdep.c (arm_software_single_step): Adjust.
13204 (arm_breakpoint_kind_from_current_state): Adjust.
13205 * arm-tdep.h (arm_software_single_step): Adjust.
13206 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13207 * cris-tdep.c (cris_software_single_step): Adjust.
13208 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13209 (micromips_deal_with_atomic_sequence): Adjust.
13210 (deal_with_atomic_sequence): Adjust.
13211 (mips_software_single_step): Adjust.
13212 * mips-tdep.h (mips_software_single_step): Adjust.
13213 * moxie-tdep.c (moxie_software_single_step): Adjust.
13214 * nios2-tdep.c (nios2_software_single_step): Adjust.
13215 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13216 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13217 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13218 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13219 * sparc-tdep.c (sparc_software_single_step): Adjust.
13220 * spu-tdep.c (spu_software_single_step): Adjust.
13221 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13222
ea480a30
SM
132232017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13224
13225 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13226 * gdbarch.h: Re-generate.
13227
d050f7d7
TW
132282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13229
13230 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13231 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13232 * python/py-instruction.c, python/py-instruction.h: New file.
13233 * python/py-record.c: Add py-instruction.h include.
13234 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13235 gdb.RecordInstruction.
13236 * python/python-internal.h: Add gdbpy_initialize_instruction
13237 declaration.
13238 * python/python.c (do_start_initialization): Add
13239 gdbpy_initialize_instruction.
13240
14f819c8
TW
132412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13242
13243 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13244 Remove.
13245 (btrace_func_from_recpy_func): New function.
13246 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13247 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13248 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13249 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13250 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13251 Also, use new helper functions.
13252 (btpy_list_item): Use new helper functions.
13253 (recpy_bt_function_call_history): Use new type name.
13254 (btpy_call_getset): Remove.
13255 (gdbpy_initialize_btrace): Remove code to initialize
13256 gdb.BtraceFunctionCall.
13257 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13258 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13259 recpy_bt_func_prev, recpy_bt_func_next): New export.
13260 * python/py-record.c (recpy_func_type): New static object.
13261 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13262 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13263 recpy_func_next): New function.
13264 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13265 (recpy_func_getset): New static object.
13266 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13267 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13268
0ed5da75
TW
132692017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13270
13271 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13272 (btpy_object, btpy_insn_type, btpy_new): Remove.
13273 (btpy_list_object): Use gdb.RecordInstruction type instead of
13274 gdb.BtraceInstruction type.
13275 (btrace_insn_from_recpy_insn): New function.
13276 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13277 btpy_new.
13278 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13279 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13280 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13281 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13282 instead of btpy_object.
13283 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13284 btpy_insn_data, btpy_insn_decode): Rename to ...
13285 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13286 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13287 recpy_bt_insn_decode): This. Also, use new helper functions.
13288 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13289 recpy_insn_type.
13290 (btpy_insn_getset): Remove.
13291 (gdbpy_initialize_btrace): Remove code to initialize
13292 gdb.BtraceInstruction. Use recpy_element_object.
13293 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13294 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13295 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13296 * python/py-record.c (recpy_insn_type): New static object.
13297 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13298 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13299 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13300 New function.
13301 (recpy_insn_getset): New static object.
13302 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13303 * python/py-record.h (recpy_element_object): New typedef.
13304 (recpy_insn_type, recpy_insn_new): New export.
13305
913aeadd
TW
133062017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13307
13308 * py-record-btrace.c (btpy_insn_new): Removed.
13309 (btpy_insn_or_gap_new): New function.
13310 (btpy_insn_error): Removed.
13311 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13312 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13313 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13314 btpy_insn_or_gap_new instead of btpy_insn_new.
13315 (btpy_insn_getset): Remove btpy_insn_error.
13316 * py-record.c (recpy_gap_type): New static object.
13317 (recpy_gap_object): New typedef.
13318 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13319 recpy_gap_reason_string): New function.
13320 (recpy_gap_getset): New static object.
13321 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13322 * py-record.h (recpy_gap_new): New export.
13323
a3be24ad
TW
133242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13325
13326 * python/py-record.c (recpy_ptid): Remove.
13327 (recpy_record_getset): Remove recpy_ptid.
13328
ae20e79a
TW
133292017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13330
13331 * btrace.c (btrace_fetch): Set inferior_ptid.
13332 * python/py-record-btrace.c: Add "py-record.h" include.
13333 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13334 recpy_bt_end, recpy_bt_instruction_history,
13335 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13336 in gdb.Record object instead of current ptid.
13337 * python/py-record.c: Include new "py-record.h" file.
13338 (recpy_record_object): Moved to py-record.h.
13339 * python/py-record.h: New file.
13340
8d0050ea
TW
133412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13342
13343 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13344 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13345 indentation.
13346
3f380b50
JB
133472017-05-01 Joel Brobecker <brobecker@adacore.com>
13348
13349 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13350 the past maintainers section.
13351
07495424
YQ
133522017-04-28 Yao Qi <yao.qi@linaro.org>
13353
13354 * infcmd.c (get_return_value): Use regcache ctor, and remove
13355 cleanup.
13356
deb1fa3e
YQ
133572017-04-28 Yao Qi <yao.qi@linaro.org>
13358 Pedro Alves <palves@redhat.com>
13359
13360 * regcache.c (regcache::regcache): New tag dispatch ctor.
13361 (do_cooked_read): Moved above.
13362 (regcache_dup): Use the tag dispatch ctor..
13363 * regcache.h (regcache): Declare ctor, delete copy ctor and
13364 assignment operator, remove friend regcache_dup.
13365
b421c83c
YQ
133662017-04-28 Yao Qi <yao.qi@linaro.org>
13367
13368 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13369 call method save instead of regcache_cpy.
13370 * regcache.h (struct regcache): Make regcache_dup a friend.
13371
ef79d9a3
YQ
133722017-04-28 Yao Qi <yao.qi@linaro.org>
13373
13374 * regcache.c (struct regcache): Move to regcache.h
13375 (regcache::arch): New method.
13376 (regcache_get_ptid): Update.
13377 (get_regcache_arch): Call arch method.
13378 (get_regcache_aspace): Call method aspace.
13379 (register_buffer): Change it to method.
13380 (regcache_save): Change it to regcache::save.
13381 (regcache_restore): Likewise.
13382 (regcache_cpy_no_passthrough): Remove the declaration.
13383 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13384 (regcache_cpy_no_passthrough): Change it to method
13385 cpy_no_passthrough.
13386 (regcache_register_status): Change it to method
13387 get_register_status.
13388 (regcache_invalidate): Change it to method invalidate.
13389 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13390 (regcache_raw_update): Change it to method raw_update.
13391 (regcache_raw_read): Likewise.
13392 (regcache_raw_read_signed): Likewise.
13393 (regcache_raw_read_unsigned): Likewise.
13394 (regcache_raw_write_signed): Likewise.
13395 (regcache_raw_write_unsigned): Likewise.
13396 (regcache_cooked_read): Likewise.
13397 (regcache_cooked_read_value): Likewise.
13398 (regcache_cooked_read_signed): Likewise.
13399 (regcache_cooked_read_unsigned): Likewise.
13400 (regcache_cooked_write_signed): Likewise.
13401 (regcache_cooked_write_unsigned): Likewise.
13402 (regcache_raw_set_cached_value): Likewise.
13403 (regcache_raw_write): Likewise.
13404 (regcache_cooked_write): Likewise.
13405 (regcache_xfer_part): Likewise.
13406 (regcache_raw_read_part): Likewise.
13407 (regcache_raw_write_part): Likewise.
13408 (regcache_cooked_read_part): Likewise.
13409 (regcache_cooked_write_part): Likewise.
13410 (regcache_raw_supply): Likewise.
13411 (regcache_raw_collect): Likewise.
13412 (regcache_transfer_regset): Likewise.
13413 (regcache_supply_regset): Likewise.
13414 (regcache_collect_regset): Likewise.
13415 (regcache_debug_print_register): Likewise.
13416 (enum regcache_dump_what): Move it to regcache.h.
13417 (regcache_dump): Change it to method dump.
13418 * regcache.h (enum regcache_dump_what): New.
13419 (class regcache): New.
13420 * target.c (target_fetch_registers): Call method
13421 debug_print_register.
13422 (target_store_registers): Likewise.
13423
f8fdb78e
SM
134242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13425
13426 * windows-nat.c (struct lm_info_windows): Initialize field.
13427 (windows_make_so): Allocate lm_info_windows with new.
13428 (windows_free_so): Free lm_info_windows with delete.
13429
9ccbfd7b
SM
134302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13431
13432 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13433 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13434 cleanup.
13435 (darwin_free_so): Free lm_info_darwin with delete.
13436
76e75227
SM
134372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13438
13439 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13440 <l_addr_p>: Change type to bool.
13441 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13442 (svr4_free_so): Free lm_info_svr4 with delete.
13443 (svr4_copy_library_list): Replace memcpy with call to copy
13444 constructor.
13445 (library_list_start_library, svr4_default_sos): Allocate
13446 lm_info_svr4 with new.
13447
51046d9e
SM
134482017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13449
13450 * solib-target.c (struct lm_info_target): Add destructor,
13451 initialize fields.
13452 <name>: Change type to std::string.
13453 (library_list_start_library): Allocate lm_info_target with new.
13454 (solib_target_free_library_list): Free lm_info_target with
13455 delete.
13456 (solib_target_current_sos): Adapt to std::string.
13457 (solib_target_free_so): Free lm_info_target with delete.
13458
4023ae76
SM
134592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13460
13461 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13462 fields.
13463 (frv_current_sos): Allocate lm_info_frv with new.
13464 (frv_relocate_main_executable): Free lm_info_frv with delete,
13465 allocate with new.
13466 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13467
af43057b
SM
134682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13469
13470 * solib-frv.c (struct lm_info_frv): Fix indentation.
13471
b0911207
SM
134722017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13473
13474 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13475 map field.
13476 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13477 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13478 and allocate with new.
13479 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13480
6c401f72
SM
134812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13482
13483 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13484 <filename, member_name>: Change type to std::string.
13485 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13486 (library_list_start_library): Allocate lm_info_aix with new.
13487 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13488 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13489 with copy constructor.
13490
d0e449a1
SM
134912017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13492
13493 * solist.h (struct lm_info): Remove.
13494 (struct lm_info_base): New class.
13495 (struct so_list) <lm_info>: Change type to lm_info_base *.
13496 * nto-tdep.c (struct lm_info): Remove.
13497 (lm_addr): Adjust.
13498 * solib-aix.c (struct lm_info): Rename to ...
13499 (struct lm_info_aix): ... this. Extend lm_info_base.
13500 (lm_info_p): Rename to ...
13501 (lm_info_aix_p): ... this, and adjust.
13502 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13503 solib_aix_parse_libraries, library_list_start_library,
13504 solib_aix_free_library_list, solib_aix_parse_libraries,
13505 solib_aix_get_library_list,
13506 solib_aix_relocate_section_addresses, solib_aix_free_so,
13507 solib_aix_get_section_offsets,
13508 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13509 Adjust.
13510 (struct solib_aix_inferior_data) <library_list>: Adjust.
13511 * solib-darwin.c (struct lm_info): Rename to ...
13512 (struct lm_info_darwin): ... this. Extend lm_info_base.
13513 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13514 * solib-dsbt.c (struct lm_info): Rename to ...
13515 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13516 (struct dsbt_info) <main_executable_lm_info): Adjust.
13517 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13518 dsbt_relocate_section_addresses): Adjust.
13519 * solib-frv.c (struct lm_info): Rename to ...
13520 (struct lm_info_frv): ... this. Extend lm_info_base.
13521 (main_executable_lm_info): Adjust.
13522 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13523 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13524 find_canonical_descriptor_in_load_object,
13525 frv_fdpic_find_canonical_descriptor): Adjust.
13526 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13527 to lm_info_svr4.
13528 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13529 svr4_clear_so, svr4_copy_library_list,
13530 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13531 svr4_current_sos, svr4_fetch_objfile_link_map,
13532 solist_update_incremental): Adjust.
13533 * solib-svr4.h (struct lm_info_svr4): Move here from
13534 solib-svr4.c.
13535 * solib-target.c (struct lm_info): Rename to ...
13536 (struct lm_info_target): ... this. Extend lm_info_base.
13537 (lm_info_p): Rename to ...
13538 (lm_info_target_p): ... this.
13539 (solib_target_parse_libraries, library_list_start_segment,
13540 library_list_start_section, library_list_start_library,
13541 library_list_end_library, solib_target_free_library_list,
13542 solib_target_current_sos, solib_target_free_so,
13543 solib_target_relocate_section_addresses): Adjust.
13544 * windows-nat.c (struct lm_info): Rename to ...
13545 (struct lm_info_windows): ... this. Extend lm_info_base.
13546 (windows_make_so, handle_load_dll, handle_unload_dll,
13547 windows_xfer_shared_libraries): Adjust.
13548
434a4023
SM
135492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13550
13551 * solib-darwin.c (struct darwin_so_list): Remove.
13552 (darwin_current_sos): Allocate an so_list object instead of a
13553 darwin_so_list, separately allocate an lm_info object.
13554 (darwin_free_so): Free lm_info.
13555
428544e8
JB
135562017-04-28 John Baldwin <jhb@FreeBSD.org>
13557
13558 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13559 with fprintf_filtered.
13560
4621115f
YQ
135612017-04-28 Yao Qi <yao.qi@linaro.org>
13562
13563 * regcache.c (regcache::regcache): New function.
13564 (regcache::~regcache): New function.
13565 (regcache_xmalloc_1): Remove.
13566 (regcache_xmalloc): Call new regcache.
13567 (regcache_xfree): Call delete regcache.
13568 (get_thread_arch_aspace_regcache): Call new regcache.
13569
339053c2
YQ
135702017-04-28 Yao Qi <yao.qi@linaro.org>
13571
13572 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13573 lwp instead of ptid_get_lwp.
13574
7974a605
YQ
135752017-04-28 Yao Qi <yao.qi@linaro.org>
13576
13577 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13578 lwp_info instead of getting from inferior_ptid.
13579
e15c3eb4
KS
135802017-04-27 Keith Seitz <keiths@redhat.com>
13581
13582 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13583 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13584 (CV_CONVERSION_BADNESS): Define.
13585 (rank_one_type): Remove overly restrictive rvalue reference
13586 rank checks.
13587 Add cv-qualifier checks and subranks for type equality.
13588 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13589 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13590 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13591
72bc1d24
SM
135922017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13593
13594 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13595 count when creating the object.
13596
55bcecda
UW
135972017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13598 Ulrich Weigand <uweigand@de.ibm.com>
13599
13600 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13601 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13602 is used in AIX.
13603 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13604 (process_xcoff_symbol): Likewise.
13605 (scan_xcoff_symtab): Likewise.
13606
5c99fcf8
AH
136072017-04-26 Alan Hayward <alan.hayward@arm.com>
13608
13609 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13610 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13611 (ia64_access_reg): Use get_frame_register_unsigned.
13612 (ia64_access_rse_reg): Likewise.
13613 (ia64_libunwind_frame_prev_register): Likewise.
13614
b41c5a85
JW
136152017-04-26 Jiong Wang <jiong.wang@arm.com>
13616
13617 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13618 * gdbarch.c: Regenerated.
13619 * gdbarch.h: Regenerated.
13620 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13621 visibility external.
13622 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13623 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13624 (enum cfa_how_kind): Move to ...
13625 (struct dwarf2_frame_state_reg_info): Likewise.
13626 (struct dwarf2_frame_state): Likewise.
13627 * dwarf2-frame.h: ... here.
13628 (dwarf2_frame_state_alloc_regs): New declaration.
13629 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13630 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13631
c185f580
AH
136322017-04-26 Alan Hayward <alan.hayward@arm.com>
13633
13634 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13635 regcache_raw_read_unsigned.
13636 (xtensa_pseudo_register_write): Likewise.
13637
19c45594
AH
136382017-04-26 Alan Hayward <alan.hayward@arm.com>
13639
13640 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13641 (nds32_pseudo_register_write): Likewise.
13642
4658f12e
YQ
136432017-04-25 Yao Qi <yao.qi@linaro.org>
13644
13645 * regcache.c (struct regcache) <readonly_p>: Change its type
13646 to bool.
13647 (regcache_xmalloc_1): Update parameter type and callers update.
13648
d581dda8
YQ
136492017-04-25 Yao Qi <yao.qi@linaro.org>
13650
13651 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13652 set_gdbarch_wchar_bit.
13653 * arm-tdep.c (arm_gdbarch_init): Likewise.
13654
debed3db
PA
136552017-04-25 Pedro Alves <palves@redhat.com>
13656
13657 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13658 (BothAreRelocatable, memcopy, memmove): Don't define.
13659 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13660 macros.
13661
b0b92aeb
PA
136622017-04-25 Pedro Alves <palves@redhat.com>
13663
13664 * common/common-defs.h: Include "common/poison.h".
13665 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13666 and adjust.
13667 * common/poison.h: New file.
13668 * common/traits.h: Include <type_traits>.
13669 (Not, Or, Requires): New, moved from common/function-view.h.
13670
16c4d54a
PA
136712017-04-25 Pedro Alves <palves@redhat.com>
13672
13673 * breakpoint.h (struct breakpoint): In-class initialize all
13674 fields. Make boolean fields "bool".
13675 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13676 memset call and initializations no longer necessary.
13677
b5c36682
PA
136782017-04-25 Pedro Alves <palves@redhat.com>
13679
13680 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13681 reference.
13682 (pt_btrace_insn): New function.
13683 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13684
5625a286
PA
136852017-04-25 Pedro Alves <palves@redhat.com>
13686
13687 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13688 "base" field and inherit from "bp_location" instead. Add
13689 non-default ctor.
13690 (allocate_location_exception): Use new non-default ctor.
13691 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13692 (init_bp_location): Convert to ...
13693 (bp_location::bp_location): ... this new ctor, and remove memset
13694 call.
13695 (base_breakpoint_allocate_location): Use the new non-default ctor.
13696 * breakpoint.h (bp_location): Now a class. Declare default and
13697 non-default ctors. In-class initialize all members.
13698 (init_bp_location): Remove declaration.
13699
23bcc18f
PA
137002017-04-25 Pedro Alves <palves@redhat.com>
13701
13702 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13703 assignment operator.
13704
e1ba3053
YQ
137052017-04-24 Yao Qi <yao.qi@linaro.org>
13706
13707 * doublest.c (convert_doublest_to_floatformat): Call
13708 floatformat_totalsize_bytes.
13709
10f489e5
TT
137102017-04-22 Tom Tromey <tom@tromey.com>
13711
13712 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13713 ui_out_emit_list.
13714 * stack.c (print_frame): Use ui_out_emit_list.
13715 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13716 ui_out_emit_list.
13717 * mi/mi-main.c (print_one_inferior)
13718 (mi_cmd_data_list_register_names)
13719 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13720 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13721 ui_out_emit_list.
13722 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13723 (mi_output_solib_attribs): Use ui_out_emit_list,
13724 ui_out_emit_tuple.
13725 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13726 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13727 (mi_cmd_stack_list_args, list_args_or_locals): Use
13728 ui_out_emit_list.
13729 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13730 * breakpoint.c (print_solib_event, output_thread_groups): Use
13731 ui_out_emit_list.
13732
0092b74d
TT
137332017-04-22 Tom Tromey <tom@tromey.com>
13734
13735 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13736 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13737 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13738
a14a62dd
TT
137392017-04-22 Tom Tromey <tom@tromey.com>
13740
13741 * tracepoint.c (tvariables_info_1)
13742 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13743
46b9c129
TT
137442017-04-22 Tom Tromey <tom@tromey.com>
13745
13746 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13747 annotate_arg_emitter.
13748 * breakpoint.c (print_mention_watchpoint)
13749 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13750 * annotate.h (struct annotate_arg_emitter): New.
13751
2e783024
TT
137522017-04-22 Tom Tromey <tom@tromey.com>
13753
13754 * record-btrace.c (record_btrace_insn_history)
13755 (record_btrace_insn_history_range, record_btrace_call_history)
13756 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13757 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13758 ui_out_emit_tuple.
13759 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13760 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13761 * skip.c (skip_info): Use ui_out_emit_tuple.
13762 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13763 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13764 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13765 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13766 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13767 ui_out_emit_tuple.
13768 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13769 (output_register, mi_cmd_data_read_memory)
13770 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13771 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13772 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13773 Use ui_out_emit_tuple.
13774 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13775 ui_out_emit_tuple.
13776 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13777 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13778 * linux-thread-db.c (info_auto_load_libthread_db): Use
13779 ui_out_emit_tuple.
13780 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13781 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13782 * disasm.c (do_mixed_source_and_assembly_deprecated)
13783 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13784 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13785 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13786 * breakpoint.c (print_one_breakpoint_location)
13787 (print_one_breakpoint): Use ui_out_emit_tuple.
13788 * auto-load.c (print_script, info_auto_load_cmd): Use
13789 ui_out_emit_tuple.
13790 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13791
9be21bb4
SM
137922017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13793
13794 * thread.c (print_thread_info_1): Remove dead code.
13795
0d4c07af
JK
137962017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13797
13798 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13799 GDB_SELF_TEST.
13800 * arm-tdep.c (selftests::arm_record_test): Likewise.
13801
4daf993d
YQ
138022017-04-21 Yao Qi <yao.qi@linaro.org>
13803
13804 * regcache.c (regcache_restore): Remove argument 2. Replace
13805 argument 3 with regcache. Get register status from
13806 src->register_status and get register contents from
13807 register_buffer (src, regnum).
13808 (regcache_cpy): Update.
13809
a6c21d4a
PA
138102017-04-19 Pedro Alves <palves@redhat.com>
13811
13812 * gdbthread.h (thread): Add missing closing parenthesis in
13813 comment.
13814
3a3fd0fd
PA
138152017-04-19 Pedro Alves <palves@redhat.com>
13816
13817 * common/refcounted-object.h: New file.
13818 * gdbthread.h: Include "common/refcounted-object.h".
13819 (thread_info): Inherit from refcounted_object and add comments.
13820 (thread_info::incref, thread_info::decref)
13821 (thread_info::m_refcount): Delete.
13822 (thread_info::deletable): Use the refcounted_object::refcount()
13823 method.
13824 * inferior.c (current_inferior_): Add comment.
13825 (set_current_inferior): Increment/decrement refcounts.
13826 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13827 not-deletable instead of comparing with the current inferior.
13828 (initialize_inferiors): Increment the initial inferior's refcount.
13829 * inferior.h (struct inferior): Forward declare.
13830 Include "common/refcounted-object.h".
13831 (current_inferior, set_current_inferior): Move declaration to
13832 before struct inferior's definition, and fix comment.
13833 (inferior): Inherit from refcounted_object. Add comments.
13834 * thread.c (switch_to_thread_no_regs): Reference the thread's
13835 inferior pointer directly instead of doing a ptid lookup.
13836 (switch_to_no_thread): New function.
13837 (switch_to_thread(thread_info *)): New function, factored out
13838 from ...
13839 (switch_to_thread(ptid_t)): ... this.
13840 (restore_current_thread): Delete.
13841 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13842 fields, and add 'inf' field.
13843 (do_restore_current_thread_cleanup): Check whether old->inf is
13844 alive instead of looking up an inferior by ptid. Use
13845 switch_to_thread and switch_to_no_thread.
13846 (restore_current_thread_cleanup_dtor): Use old->inf directly
13847 instead of lookup up an inferior by id. Decref the inferior.
13848 Don't restore 'removable'.
13849 (make_cleanup_restore_current_thread): Same the inferior pointer
13850 in old, instead of the inferior number. Incref the inferior.
13851 Don't save/clear 'removable'.
13852
9bcb1f16
PA
138532017-04-19 Pedro Alves <palves@redhat.com>
13854
13855 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13856 unittests/scoped_restore-selftests.c.
13857 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13858 * common/scoped_restore.h (scoped_restore_base): Make "class".
13859 (scoped_restore_base::release): New public method.
13860 (scoped_restore_base::scoped_restore_base): New protected ctor.
13861 (scoped_restore_base::m_saved_var): New protected field.
13862 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13863 scoped_restore_base base class instead of m_saved_var directly.
13864 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13865 (scoped_restore_tmpl::scoped_restore_tmpl(const
13866 scoped_restore_tmpl<T>&)): Likewise.
13867 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13868 method.
13869 (scoped_restore_tmpl::saved_var): New method.
13870 (scoped_restore_tmpl::m_saved_var): Delete.
13871 * inferior.h (inferior::detaching): Now a bool.
13872 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13873 cleanup.
13874 * unittests/scoped_restore-selftests.c: New file.
13875
26fcd539
PA
138762017-04-19 Pedro Alves <palves@redhat.com>
13877
13878 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13879 Re-sort in alphabetic order.
13880
fdd243b0
PA
138812017-04-18 Pedro Alves <palves@redhat.com>
13882
13883 * xml-support.c (obstack_xml_printf): Delete.
13884 * xml-support.h (obstack_xml_printf): Delete.
13885
4895cde2
PA
138862017-04-18 Pedro Alves <palves@redhat.com>
13887
13888 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13889 vdebug, verror, body_text, start_element, end_element, name,
13890 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13891 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13892 is_xinclude>: Make private and add m_ prefix.
13893 (gdb_xml_parser::body_text): New method, based on ...
13894 (gdb_xml_body_text): ... this. Adjust.
13895 (gdb_xml_parser::vdebug): New method, based on ...
13896 (gdb_xml_debug): ... this. Adjust.
13897 (gdb_xml_parser::verror): New method, based on ...
13898 (gdb_xml_error): ... this. Adjust.
13899 (gdb_xml_parser::start_element): New method, based on ...
13900 (gdb_xml_start_element): ... this. Adjust.
13901 (gdb_xml_start_element_wrapper): Defer to
13902 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13903 (gdb_xml_parser::end_element): New method, based on ...
13904 (gdb_xml_end_element_wrapper): ... this. Adjust.
13905 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13906 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13907 (gdb_xml_parser::use_dtd): New method, based on ...
13908 (gdb_xml_use_dtd): ... this. Adjust.
13909 (gdb_xml_parser::parse): New method, based on ...
13910 (gdb_xml_parse): ... this. Adjust.
13911 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13912 (xinclude_start_include): Adjust to call the parser's name method.
13913 (xml_xinclude_default, xml_xinclude_start_doctype)
13914 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13915 method.
13916 (xml_process_xincludes): Adjust to call parser methods.
13917 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13918 declarations.
13919
bd8a901f
PA
139202017-04-18 Pedro Alves <palves@redhat.com>
13921
13922 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13923 gdb::optional<std::string>.
13924 * xml-support.c: Include <string>.
13925 (scope_level::scope_level(scope_level &&))
13926 (scope_level::~scope_level): Delete.
13927 (scope_level::body): Now a std::string.
13928 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13929 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13930 parameter.
13931 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13932 (xinclude_parsing_data::output): Now a std::string reference.
13933 (xinclude_start_include): Adjust.
13934 (xml_xinclude_default): Adjust.
13935 (xml_process_xincludes): Add 'output' parameter, and return bool.
13936 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13937 and return bool.
13938 * xml-tdesc.c: Include <unordered_map> and <string>.
13939 (tdesc_xml_cache): Delete.
13940 (tdesc_xml_cache_s): Delete.
13941 (xml_cache): Now an std::unordered_map.
13942 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13943 (target_fetch_description_xml): Change return type to
13944 gdb::optional<std::string>, and adjust.
13945 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13946 (target_fetch_description_xml): Change return type to
13947 gdb::optional<std::string>.
13948
d35d1958
PA
139492017-04-18 Pedro Alves <palves@redhat.com>
13950
13951 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13952 unittests/optional-selftests.c.
13953 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13954 * unittests/optional-selftests.c: New file.
13955 * unittests/optional/assignment/1.cc: New file.
13956 * unittests/optional/assignment/2.cc: New file.
13957 * unittests/optional/assignment/3.cc: New file.
13958 * unittests/optional/assignment/4.cc: New file.
13959 * unittests/optional/assignment/5.cc: New file.
13960 * unittests/optional/assignment/6.cc: New file.
13961 * unittests/optional/assignment/7.cc: New file.
13962 * unittests/optional/cons/copy.cc: New file.
13963 * unittests/optional/cons/default.cc: New file.
13964 * unittests/optional/cons/move.cc: New file.
13965 * unittests/optional/cons/value.cc: New file.
13966 * unittests/optional/in_place.cc: New file.
13967 * unittests/optional/observers/1.cc: New file.
13968 * unittests/optional/observers/2.cc: New file.
13969
22796e97
PA
139702017-04-18 Pedro Alves <palves@redhat.com>
13971
13972 * common/gdb_optional.h: Include common/traits.h.
13973 (in_place_t): New type.
13974 (in_place): New constexpr variable.
13975 (optional::optional): Remove member initialization of
13976 m_instantiated.
13977 (optional::optional(in_place_t...)): New constructor.
13978 (optional::~optional): Use reset.
13979 (optional::optional(const optional&)): New.
13980 (optional::optional(const optional&&)): New.
13981 (optional::optional(T &)): New.
13982 (optional::optional(T &&)): New.
13983 (operator::operator=(const optional &)): New.
13984 (operator::operator=(optional &&)): New.
13985 (operator::operator= (const T &))
13986 (operator::operator= (T &&))
13987 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13988 (operator::reset): New.
13989 (operator::m_instantiated):: Add in-class initializer.
13990 * common/traits.h: Include <type_traits>.
13991 (struct And): New types.
13992
a7fc9b61
PA
139932017-04-18 Pedro Alves <palves@redhat.com>
13994
13995 * xml-support.c: Include <vector>.
13996 (scope_level::scope_level(const gdb_xml_element *))
13997 (scope_level::scope_level(scope_level&&)): New.
13998 (scope_level::~scope_level): New.
13999 (scope_level_s): Delete.
14000 (gdb_xml_parser::scopes): Now a std::vector.
14001 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
14002 Use std::vector.
14003 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
14004 scope cleanup code.
14005 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
14006 of the scopes member. Use std::vector::emplace_back.
14007
010151c9
PA
140082017-04-18 Pedro Alves <palves@redhat.com>
14009
14010 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
14011 a bool.
14012 (gdb_xml_end_element): Change type of first parameter.
14013 (gdb_xml_cleanup): Rename to ...
14014 (gdb_xml_parser::~gdb_xml_parser): ... this.
14015 (gdb_xml_create_parser_and_cleanup): Delete with ...
14016 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
14017 to this new ctor.
14018 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
14019 using gdb_xml_create_parser_and_cleanup.
14020 (xinclude_parsing_data): Add ctor/dtor.
14021 (xml_xinclude_cleanup): Delete.
14022 (xml_process_xincludes): Create a local xinclude_parsing_data
14023 instead of heap-allocating one. Create a local gdb_xml_parser
14024 instead of heap-allocating one with
14025 gdb_xml_create_parser_and_cleanup.
14026
d56060f0
JB
140272017-04-18 John Baldwin <jhb@FreeBSD.org>
14028
14029 PR threads/20743
14030 * fbsd-nat.c (resume_one_thread_cb): Remove.
14031 (resume_all_threads_cb): Remove.
14032 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
14033 iterate_over_threads.
14034
305d16a9
JB
140352017-04-17 Joel Brobecker <brobecker@adacore.com>
14036
14037 * NEWS: Create a new section for the next release branch.
14038 Rename the section of the current branch, now that it has
14039 been cut.
14040
8bb57231
JB
140412017-04-17 Joel Brobecker <brobecker@adacore.com>
14042
14043 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
14044 * version.in: Bump version to 8.0.50.DATE-git.
14045
096c92dd
SDJ
140462017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
14047
14048 PR gdb/21385
14049 * windows-nat.c (windows_create_inferior): Declare 'allargs'
14050 independently of the host, and fix build breakage on Cygwin.
14051
0550c955
PA
140522017-04-13 Pedro Alves <palves@redhat.com>
14053
14054 * inferior.c (free_inferior): Convert to ...
14055 (inferior::~inferior): ... this dtor.
14056 (inferior::inferior): New ctor, factored out from ...
14057 (add_inferior_silent): ... here. Allocate the inferior with a new
14058 expression.
14059 (delete_inferior): Call delete instead of free_inferior.
14060 * inferior.h (gdb_environ, continuation): Forward declare.
14061 (inferior): Now a class. Add in-class initialization to all
14062 members. Make boolean fields bool, except 'detaching'.
14063 (inferior::inferior): New explicit ctor.
14064 (inferior::~inferior): New.
14065
e3d60dfc
PA
140662017-04-13 Pedro Alves <palves@redhat.com>
14067
14068 * inferior.c (init_inferior_list): Delete.
14069 * inferior.h (init_inferior_list): Delete.
14070
5fd69d0a
PA
140712017-04-13 Pedro Alves <palves@redhat.com>
14072
14073 PR threads/13217
14074 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
14075 (top level): Call it twice, with different thread sets.
14076
c6609450
PA
140772017-04-13 Pedro Alves <palves@redhat.com>
14078
14079 * thread.c: Include <algorithm>.
14080 (thread_array_cleanup): Delete.
14081 (scoped_inc_dec_ref): New class.
14082 (live_threads_count): New function.
14083 (set_thread_refcount): Delete.
14084 (tp_array_compar_ascending): Now a bool.
14085 (tp_array_compar): Convert to a std::sort comparison function.
14086 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
14087 and live_threads_count.
14088
2a00d7ce
PA
140892017-04-13 Pedro Alves <palves@redhat.com>
14090
14091 * infrun.c (follow_fork_inferior): Also switch the current
14092 inferior.
14093
441d7c93
PA
140942017-04-13 Pedro Alves <palves@redhat.com>
14095
14096 * breakpoint.c (watch_command_1): Save watchpoint-frame info
14097 before calling create_internal_breakpoint.
14098
808480f6
PA
140992017-04-13 Pedro Alves <palves@redhat.com>
14100
14101 * fork-child.c (execv_argv): New class.
14102 (breakup_args): Refactored as ...
14103 (execv_argv::init_for_no_shell): .. this method of execv_argv.
14104 Copy arguments to storage and replace separators with NULL
14105 terminators in place.
14106 (escape_bang_in_quoted_argument): Adjust to return bool.
14107 (execv_argv::execv_argv): New ctor.
14108 (execv_argv::init_for_shell): New method, factored out from
14109 fork_inferior. Don't strdup strings into the vector.
14110 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
14111 Remove free_vector_argv call.
14112
ad3d022a
YQ
141132017-04-13 Yao Qi <yao.qi@linaro.org>
14114
14115 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
14116 tdep->rx_psw_type.
14117
e6ddc3bf
YQ
141182017-04-13 Yao Qi <yao.qi@linaro.org>
14119
14120 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
14121 * rx-tdep.c (rx_gdbarch_init): Likewise.
14122
bfb8cf90
PA
141232017-04-13 Pedro Alves <palves@redhat.com>
14124
14125 * breakpoint.h (struct breakpoint): Reindent.
14126
f5336ca5
PA
141272017-04-13 Pedro Alves <palves@redhat.com>
14128
14129 * breakpoint.c (bp_location): Rename to ...
14130 (bp_locations): ... this. All references updated.
14131 (bp_location_count): Rename to ...
14132 (bp_locations_count): ... this. All references updated.
14133 (bp_location_placed_address_before_address_max): Rename to ...
14134 (bp_locations_placed_address_before_address_max): ... this. All
14135 references updated.
14136 (bp_location_shadow_len_after_address_max): Rename to ...
14137 (bp_locations_shadow_len_after_address_max): ... this. All
14138 references updated.
14139 (bp_location_compare_addrs): Rename to ...
14140 (bp_locations_compare_addrs): ... this. All references updated.
14141 (bp_location_compare):Rename to ...
14142 (bp_locations_compare): ... this. All references updated.
14143 (bp_location_target_extensions_update): Rename to ...
14144 (bp_locations_target_extensions_update): ... this. All references
14145 updated.
14146
be628ab8
SDJ
141472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14148
14149 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14150 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14151 'sgtty.h'.
14152 * common/gdb_termios.h: New file, with parts of "terminal.h".
14153 * inflow.c: Include "gdb_termios.h".
14154 * ser-unix.c: Include "gdb_termios.h".
14155 * terminal.h: Move terminal-related defines to
14156 "common/gdb_termios.h".
14157
8e9e35b1
TT
141582017-04-12 Tom Tromey <tom@tromey.com>
14159
14160 * probe.c (parse_probes): Update.
14161 * location.h (delete_event_location): Don't declare.
14162 (event_location_deleter::operator()): Update.
14163 * location.c (event_location_deleter::operator()): Rename from
14164 delete_event_location.
14165 * linespec.h (linespec_result) <location>: Change type to
14166 event_location_up.
14167 * linespec.c (canonicalize_linespec, event_location_to_sals)
14168 (decode_objc): Update.
14169 (linespec_result): Don't call delete_event_location.
14170 * breakpoint.c (create_breakpoints_sal)
14171 (bkpt_probe_create_sals_from_location)
14172 (strace_marker_create_sals_from_location): Update.
14173
16e802b9
TT
141742017-04-12 Tom Tromey <tom@tromey.com>
14175
14176 * linespec.h (struct linespec_result): Add constructor and
14177 destructor.
14178 (init_linespec_result, destroy_linespec_result)
14179 (make_cleanup_destroy_linespec_result): Don't declare.
14180 * linespec.c (init_linespec_result): Remove.
14181 (linespec_result::~linespec_result): Rename from
14182 destroy_linespec_result. Update.
14183 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14184 Remove.
14185 * breakpoint.c (create_breakpoint, break_range_command)
14186 (decode_location_default): Update.
14187 * ax-gdb.c (agent_command_1): Update.
14188
d28cd78a
TT
141892017-04-12 Tom Tromey <tom@tromey.com>
14190
14191 * remote.c (remote_download_tracepoint): Update.
14192 * python/py-breakpoint.c (bppy_get_location): Update.
14193 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14194 (gdbscm_breakpoint_location): Update.
14195 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14196 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14197 Change type to event_location_up.
14198 * breakpoint.c (create_overlay_event_breakpoint)
14199 (create_longjmp_master_breakpoint)
14200 (create_std_terminate_master_breakpoint)
14201 (create_exception_master_breakpoint)
14202 (breakpoint_event_location_empty_p, print_breakpoint_location)
14203 (print_one_breakpoint_location, create_thread_event_breakpoint)
14204 (init_breakpoint_sal, create_breakpoint)
14205 (print_recreate_ranged_breakpoint, break_range_command)
14206 (init_ada_exception_breakpoint, say_where): Update.
14207 (base_breakpoint_dtor): Don't call delete_event_location.
14208 (bkpt_print_recreate, tracepoint_print_recreate)
14209 (dprintf_print_recreate, update_static_tracepoint)
14210 (breakpoint_re_set_default): Update.
14211
711799d5
TT
142122017-04-12 Tom Tromey <tom@tromey.com>
14213
14214 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14215 type of "to_do". Update.
14216 (compute_stack_depth): Use std::vector.
14217
52d214d3
TT
142182017-04-12 Tom Tromey <tom@tromey.com>
14219
14220 * printcmd.c (find_instruction_backward): Use std::vector.
14221
4c404b8b
TT
142222017-04-12 Tom Tromey <tom@tromey.com>
14223
14224 * symfile.c (objfilep): Remove typedef.
14225 (reread_symbols): Use a std::vector.
14226
156d9eab
TT
142272017-04-12 Tom Tromey <tom@tromey.com>
14228
14229 * mi/mi-main.c (exec_direction_forward): Remove.
14230 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14231 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14232 scoped_restore.
14233 * guile/guile.c (guile_repl_command, guile_command)
14234 (gdbscm_execute_gdb_command): Use scoped_restore.
14235 * go-exp.y (go_parse): Use scoped_restore.
14236 * d-exp.y (d_parse): Use scoped_restore.
14237 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14238 * c-exp.y (c_parse): Use scoped_restore.
14239
4d89769a
TT
142402017-04-12 Tom Tromey <tom@tromey.com>
14241
14242 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14243 (mi_parse): Update return type.
14244 (mi_parse_free): Remove.
14245 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14246 (mi_parse::~mi_parse): Rename from mi_parse_free.
14247 (mi_parse_cleanup): Remove.
14248 (mi_parse): Return a unique_ptr. Use new.
14249 * mi/mi-main.c (mi_execute_command): Update.
14250
4b217cc7
TT
142512017-04-12 Tom Tromey <tom@tromey.com>
14252
14253 * location.c (explicit_location_lex_one): Return a
14254 unique_xmalloc_ptr.
14255 (string_to_explicit_location): Update. Remove cleanups.
14256
59d3651b
TT
142572017-04-12 Tom Tromey <tom@tromey.com>
14258
14259 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14260 (compare_value_and_voffset): Change type. Update.
14261 (compute_vtable_size): Change type of "offset_vec".
14262 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14263 (gnuv3_get_typeid): Remove extraneous declaration.
14264
b24b0d6c
TT
142652017-04-12 Tom Tromey <tom@tromey.com>
14266
14267 * charset.h (wchar_iterator): Fix comment.
14268
80a3b8c5
TT
142692017-04-12 Tom Tromey <tom@tromey.com>
14270
14271 * charset.c (iconv_wrapper): New class.
14272 (cleanup_iconv): Remove.
14273 (convert_between_encodings): Use it.
14274
c83dd867
TT
142752017-04-12 Tom Tromey <tom@tromey.com>
14276
14277 * symfile.h (increment_reading_symtab): Update type.
14278 * symfile.c (decrement_reading_symtab): Remove.
14279 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14280 * psymtab.c (psymtab_to_symtab): Update.
14281 * dwarf2read.c (dw2_instantiate_symtab): Update.
14282
0e8621a0
TT
142832017-04-12 Tom Tromey <tom@tromey.com>
14284
14285 * jit.c (struct jit_reader): Declare separately. Add constructor
14286 and destructor. Change type of "handle".
14287 (loaded_jit_reader): Define separately.
14288 (jit_reader_load): Update. New "new".
14289 (jit_reader_unload_command): Use "delete".
14290 * gdb-dlfcn.h (struct dlclose_deleter): New.
14291 (gdb_dlhandle_up): New typedef.
14292 (gdb_dlopen, gdb_dlsym): Update types.
14293 (gdb_dlclose): Remove.
14294 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14295 (gdb_dlsym): Change type of "handle".
14296 (make_cleanup_dlclose): Remove.
14297 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14298 * compile/compile-c-support.c (load_libcc): Update.
14299
67d89901
TT
143002017-04-12 Tom Tromey <tom@tromey.com>
14301
14302 * symtab.h (find_pcs_for_symtab_line): Change return type.
14303 * symtab.c (find_pcs_for_symtab_line): Change return type.
14304 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14305 type of "vec". Update.
14306 (ltpy_get_pcs_for_line): Update.
14307 * linespec.c (decode_digits_ordinary): Update.
14308
93921405
TT
143092017-04-12 Tom Tromey <tom@tromey.com>
14310
14311 * tracepoint.c (actions_command): Update.
14312 * python/python.c (python_command, python_interactive_command):
14313 Update.
14314 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14315 * guile/guile.c (guile_command): Update.
14316 * defs.h (read_command_lines, read_command_lines_1): Return
14317 command_line_up.
14318 (command_lines_deleter): New struct.
14319 (command_line_up): New typedef.
14320 * compile/compile.c (compile_code_command)
14321 (compile_print_command): Update.
14322 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14323 command_line_up.
14324 (make_cleanup_free_command_lines): Remove.
14325 * cli/cli-script.c (get_command_line, read_command_lines_1)
14326 (copy_command_lines): Return command_line_up.
14327 (while_command, if_command, read_command_lines, define_command)
14328 (document_command): Update.
14329 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14330 Remove.
14331 * breakpoint.h (breakpoint_set_commands): Change type of
14332 "commands".
14333 * breakpoint.c (breakpoint_set_commands): Change type of
14334 "commands". Update.
14335 (do_map_commands_command, update_dprintf_command_list)
14336 (create_tracepoint_from_upload): Update.
14337
ffc2605c
TT
143382017-04-12 Tom Tromey <tom@tromey.com>
14339
14340 * tracepoint.c (scope_info): Update.
14341 * spu-tdep.c (spu_catch_start): Update.
14342 * python/python.c (gdbpy_decode_line): Update.
14343 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14344 * python/py-breakpoint.c (bppy_init): Update.
14345 * probe.c (parse_probes): Update.
14346 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14347 * location.h (event_location_deleter): New struct.
14348 (event_location_up): New typedef.
14349 (new_linespec_location, new_address_location, new_probe_location)
14350 (new_explicit_location, copy_event_location)
14351 (string_to_event_location, string_to_event_location_basic)
14352 (string_to_explicit_location): Update return type.
14353 (make_cleanup_delete_event_location): Remove.
14354 * location.c (new_linespec_location, new_address_location)
14355 (new_probe_location, new_explicit_location, copy_event_location):
14356 Return event_location_up.
14357 (delete_event_location_cleanup)
14358 (make_cleanup_delete_event_location): Remove.
14359 (string_to_explicit_location, string_to_event_location_basic)
14360 (string_to_event_location): Return event_location_up.
14361 * linespec.c (canonicalize_linespec, event_location_to_sals)
14362 (decode_line_with_current_source)
14363 (decode_line_with_last_displayed, decode_objc): Update.
14364 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14365 * completer.c (location_completer): Update.
14366 * cli/cli-cmds.c (edit_command, list_command): Update.
14367 * breakpoint.c (create_overlay_event_breakpoint)
14368 (create_longjmp_master_breakpoint)
14369 (create_std_terminate_master_breakpoint)
14370 (create_exception_master_breakpoint)
14371 (create_thread_event_breakpoint): Update.
14372 (init_breakpoint_sal): Update. Remove some dead code.
14373 (create_breakpoint_sal): Change type of "location". Update.
14374 (create_breakpoints_sal, create_breakpoint, break_command_1)
14375 (dprintf_command, break_range_command, until_break_command)
14376 (init_ada_exception_breakpoint)
14377 (strace_marker_create_sals_from_location)
14378 (update_static_tracepoint, trace_command, ftrace_command)
14379 (strace_command, create_tracepoint_from_upload): Update.
14380 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14381 * ax-gdb.c (agent_command_1): Update.
14382
8f10c932
PA
143832017-04-12 Pedro Alves <palves@redhat.com>
14384
14385 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14386 * configure.tgt: Handle i[34567]86-*-go32* and
14387 i[34567]86-*-msdosdjgpp*.
14388 * i386-tdep.c (i386_svr4_reg_to_regnum):
14389 Make extern.
14390 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14391 i386-go32-tdep.c.
14392 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14393 * i386-go32-tdep.c: New file.
14394 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14395 declarations.
14396
0a31ccfb
SM
143972017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14398
14399 * aix-thread.c (pd_status2str): Change return type to const char *.
14400
e9bb3fbb
PA
144012017-04-12 Pedro Alves <palves@redhat.com>
14402
14403 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14404 calls to set_gdbarch_gnu_triplet_regexp.
14405
53375380
PA
144062017-04-12 Pedro Alves <palves@redhat.com>
14407
14408 PR gdb/21323
14409 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14410 New enum value.
14411 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14412 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14413 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14414 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14415 * gdbarch.h, gdbarch.c: Regenerate.
14416 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14417 gdbarch_wchar_bit and gdbarch_wchar_signed.
14418 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14419 * arm-tdep.c (arm_gdbarch_init): Likewise.
14420 * avr-tdep.c (avr_gdbarch_init): Likewise.
14421 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14422 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14423 * i386-tdep.c (i386_go32_init_abi): Likewise.
14424 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14425 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14426 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14427 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14428 * sh-tdep.c (sh_gdbarch_init): Likewise.
14429 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14430 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14431 * windows-tdep.c (windows_init_abi): Likewise.
14432 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14433
53e710ac
PA
144342017-04-12 Pedro Alves <palves@redhat.com>
14435
14436 PR c++/21323
14437 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14438 cplus_primitive_type_char32_t>: New enum values.
14439 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14440 and cplus_primitive_type_char32_t.
14441 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14442 32, use the archtecture's built-in type for char16_t and char32_t,
14443 respectively. Otherwise, fallback to init_integer_type as before,
14444 but make the type unsigned, and issue a complaint.
14445 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14446
ab0538b8
AH
144472017-04-12 Alan Hayward <alan.hayward@arm.com>
14448
5e0e0422 14449 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
14450 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14451
5430098f
SDJ
144522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14453
14454 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14455 'const char *'.
14456
7c5ded6a
SDJ
144572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14458
14459 * common/common-utils.c (free_vector_argv): New function.
14460 * common/common-utils.h: Include <vector>.
14461 (free_vector_argv): New prototype.
14462 * darwin-nat.c (darwin_create_inferior): Rewrite function
14463 prototype in order to constify "exec_file" and accept a
14464 "std::string" for "allargs".
14465 * fork-child.c: Include <vector>.
14466 (breakup_args): Rewrite function, using C++.
14467 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14468 and accept "std::string" for "allargs". Update the code to
14469 calculate "argv" based on "allargs". Update calls to "exec_fun"
14470 and "execvp".
14471 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14472 order to constify "exec_file" and accept a "std::string" for
14473 "allargs".
14474 * go32-nat.c (go32_create_inferior): Likewise.
14475 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14476 * infcmd.c (run_command_1): Constify "exec_file". Use
14477 "std::string" for inferior arguments.
14478 * inferior.h (fork_inferior): Update prototype.
14479 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14480 prototype in order to constify "exec_file" and accept a
14481 "std::string" for "allargs".
14482 * nto-procfs.c (procfs_create_inferior): Likewise.
14483 * procfs.c (procfs_create_inferior): Likewise.
14484 * remote-sim.c (gdbsim_create_inferior): Likewise.
14485 * remote.c (extended_remote_run): Update code to accept
14486 "std::string" as argument.
14487 (extended_remote_create_inferior): Rewrite function prototype in
14488 order to constify "exec_file" and accept a "std::string" for
14489 "allargs".
14490 * rs6000-nat.c (super_create_inferior): Likewise.
14491 (rs6000_create_inferior): Likewise.
14492 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14493 * windows-nat.c (windows_create_inferior): Likewise.
14494
ae0eee42
PA
144952017-04-11 Pedro Alves <palves@redhat.com>
14496
14497 * thread.c: Fix whitespace throughout.
14498
a6acac06
PR
144992017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14500
14501 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14502
64403bd1
AH
145032017-04-11 Alan Hayward <alan.hayward@arm.com>
14504
14505 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14506
a5bef50f
SDJ
145072017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14508
14509 PR gdb/21364
14510 * osdata.c (info_osdata): Check if 'type' is an empty string
14511 instead of NULL.
14512
9295a5a9
PA
145132017-04-10 Pedro Alves <palves@redhat.com>
14514
14515 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14516 (ptid_to_global_thread_id, in_thread_list)
14517 (do_captured_list_thread_ids, set_resumed, set_running)
14518 (set_executing, set_stop_requested, finish_thread_state)
14519 (validate_registers_access, can_access_registers_ptid)
14520 (print_thread_info_1, switch_to_thread)
14521 (do_restore_current_thread_cleanup)
14522 (make_cleanup_restore_current_thread, thread_command)
14523 (thread_name_command): Use operator== instead of ptid_equal.
14524
996812e3
PA
145252017-04-10 Pedro Alves <palves@redhat.com>
14526
14527 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14528 (current_thread_cleanup_chain): Delete.
14529 (restore_current_thread_cleanup_dtor)
14530 (make_cleanup_restore_current_thread): Remove references to
14531 current_thread_cleanup_chain.
14532
845b344f
AH
145332017-04-10 Alan Hayward <alan.hayward@arm.com>
14534
14535 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14536 REG_UNKNOWN.
14537
803bdfe4
YQ
145382017-04-10 Yao Qi <yao.qi@linaro.org>
14539
14540 PR gdb/19942
14541 * gdbthread.h (thread_info::deletable): New method.
14542 (thread_info::incref): New method.
14543 (thread_info::decref): New method.
14544 (thread_info::refcount): Move it to private.
14545 * infrun.c (save_stop_context): Call inc_refcount.
14546 (release_stop_context_cleanup): Likewise.
14547 * thread.c (set_thread_exited): New function.
14548 (init_thread_list): Delete "tp" only it is deletable, otherwise
14549 call set_thread_exited.
14550 (delete_thread_1): Call set_thread_exited.
14551 (current_thread_cleanup) <inferior_pid>: Remove.
14552 <thread>: New field.
14553 (restore_current_thread_ptid_changed): Removed.
14554 (do_restore_current_thread_cleanup): Adjust.
14555 (restore_current_thread_cleanup_dtor): Don't call
14556 find_thread_ptid.
14557 (set_thread_refcount): Use dec_refcount.
14558 (make_cleanup_restore_current_thread): Adjust.
14559 (thread_apply_all_command): Call inc_refcount.
14560 (_initialize_thread): Don't call
14561 observer_attach_thread_ptid_changed.
14562
8c25b497
YQ
145632017-04-10 Yao Qi <yao.qi@linaro.org>
14564
14565 * thread.c (delete_thread_1): Hoist code on marking thread as
14566 exited.
14567
8473b447
SM
145682017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14569
14570 * windows-nat.c (windows_detach): Initialize ptid with
14571 minus_one_ptid.
14572
6670ec13
SM
145732017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14574
14575 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14576
ba2f91bb
AH
145772017-04-07 Alan Hayward <alan.hayward@arm.com>
14578
14579 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14580 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14581 (bfin_pseudo_register_write): Likewise
14582
436252de
SM
145832017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14584
14585 * common/ptid.h (struct ptid): Change to...
14586 (class ptid_t): ... this.
14587 <ptid_t>: New constructors.
14588 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14589 matches>: New methods.
14590 <make_null, make_minus_one>: New static methods.
14591 <pid>: Rename to...
14592 <m_pid>: ...this.
14593 <lwp>: Rename to...
14594 <m_lwp>: ...this.
14595 <tid>: Rename to...
14596 <m_tid>: ...this.
14597 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14598 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14599 as references, move comment to class ptid_t.
14600 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14601 ptid_t static methods.
14602 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14603 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14604 Take ptid arguments as references, implement using ptid_t methods.
14605 * unittests/ptid-selftests.c: New file.
14606 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14607 unittests/ptid-selftests.c.
14608 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14609
0dedf377
TP
146102017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14611
14612 * python/python.c (python_run_simple_file): Cast mode literal to
14613 non-const char pointer as expected by PyFile_FromString.
14614
4e9868d4
SM
146152017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14616
14617 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14618 minus_one_ptid and null_ptid.
14619
9bf2a700
PA
146202017-04-05 Pedro Alves <palves@redhat.com>
14621
14622 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14623 * configure: Regenerate.
14624
a121b7c1
PA
146252017-04-05 Pedro Alves <palves@redhat.com>
14626
14627 * ada-exp.y (yyerror): Constify.
14628 * ada-lang.c (bound_name, get_selections)
14629 (ada_variant_discrim_type)
14630 (ada_variant_discrim_name, ada_value_struct_elt)
14631 (ada_lookup_struct_elt_type, is_unchecked_variant)
14632 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14633 (catch_ada_exception_command_split)
14634 (catch_ada_assert_command_split, catch_assert_command)
14635 (ada_op_name): Constify.
14636 * ada-lang.h (ada_yyerror, get_selections)
14637 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14638 * arc-tdep.c (arc_print_frame_cache): Constify.
14639 * arm-tdep.c (arm_skip_stub): Constify.
14640 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14641 (gen_aggregate_elt_ref): Constify.
14642 * bcache.c (print_bcache_statistics): Constify.
14643 * bcache.h (print_bcache_statistics): Constify.
14644 * break-catch-throw.c (catch_exception_command_1):
14645 * breakpoint.c (struct ep_type_description::description):
14646 Constify.
14647 (add_solib_catchpoint): Constify.
14648 (catch_fork_command_1): Add cast.
14649 (add_catch_command): Constify.
14650 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14651 Constify.
14652 * bsd-uthread.c (bsd_uthread_state): Constify.
14653 * buildsym.c (patch_subfile_names): Constify.
14654 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14655 Constify.
14656 * c-exp.y (yyerror): Constify.
14657 (token::oper): Constify.
14658 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14659 * c-varobj.c (cplus_describe_child): Constify.
14660 * charset.c (find_charset_names): Add cast.
14661 (find_charset_names): Constify array and add const_cast.
14662 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14663 (edit_command): Constify.
14664 * cli/cli-decode.c (lookup_cmd): Constify.
14665 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14666 Constify.
14667 (struct dump_context): Constify.
14668 (add_dump_command, restore_command): Constify.
14669 * cli/cli-script.c (get_command_line): Constify.
14670 * cli/cli-script.h (get_command_line): Constify.
14671 * cli/cli-utils.c (check_for_argument): Constify.
14672 * cli/cli-utils.h (check_for_argument): Constify.
14673 * coff-pe-read.c (struct read_pe_section_data): Constify.
14674 * command.h (lookup_cmd): Constify.
14675 * common/print-utils.c (decimal2str): Constify.
14676 * completer.c (gdb_print_filename): Constify.
14677 * corefile.c (set_gnutarget): Constify.
14678 * cp-name-parser.y (yyerror): Constify.
14679 * cp-valprint.c (cp_print_class_member): Constify.
14680 * cris-tdep.c (cris_register_name, crisv32_register_name):
14681 Constify.
14682 * d-exp.y (yyerror): Constify.
14683 (struct token::oper): Constify.
14684 * d-lang.h (d_yyerror): Constify.
14685 * dbxread.c (struct header_file_location::name): Constify.
14686 (add_old_header_file, add_new_header_file, last_function_name)
14687 (dbx_next_symbol_text, add_bincl_to_list)
14688 (find_corresponding_bincl_psymtab, set_namestring)
14689 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14690 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14691 * defs.h (command_line_input, print_address_symbolic)
14692 (deprecated_readline_begin_hook): Constify.
14693 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14694 Constify.
14695 * event-top.c (handle_line_of_input): Constify and add cast.
14696 * exceptions.c (catch_errors): Constify.
14697 * exceptions.h (catch_errors): Constify.
14698 * expprint.c (print_subexp_standard, op_string, op_name)
14699 (op_name_standard, dump_raw_expression, dump_raw_expression):
14700 * expression.h (op_name, op_string, dump_raw_expression):
14701 Constify.
14702 * f-exp.y (yyerror): Constify.
14703 (struct token::oper): Constify.
14704 (struct f77_boolean_val::name): Constify.
14705 * f-lang.c (f_word_break_characters): Constify.
14706 * f-lang.h (f_yyerror): Constify.
14707 * fork-child.c (fork_inferior): Add cast.
14708 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14709 (new_variant): Constify.
14710 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14711 * gdbarch.c: Regenerate.
14712 * gdbcore.h (set_gnutarget): Constify.
14713 * go-exp.y (yyerror): Constify.
14714 (token::oper): Constify.
14715 * go-lang.h (go_yyerror): Constify.
14716 * go32-nat.c (go32_sysinfo): Constify.
14717 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14718 * guile/scm-cmd.c (cmdscm_function): Constify.
14719 * guile/scm-param.c (pascm_param_value): Constify.
14720 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14721 (h8300sx_register_name): Constify.
14722 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14723 Constify.
14724 * ia64-tdep.c (ia64_register_names): Constify.
14725 * infcmd.c (construct_inferior_arguments): Constify.
14726 (path_command, attach_post_wait): Constify.
14727 * language.c (show_range_command, show_case_command)
14728 (unk_lang_error): Constify.
14729 * language.h (language_defn::la_error)
14730 (language_defn::la_name_of_this): Constify.
14731 * linespec.c (decode_line_2): Constify.
14732 * linux-thread-db.c (thread_db_err_str): Constify.
14733 * lm32-tdep.c (lm32_register_name): Constify.
14734 * m2-exp.y (yyerror): Constify.
14735 * m2-lang.h (m2_yyerror): Constify.
14736 * m32r-tdep.c (m32r_register_names): Constify and make static.
14737 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14738 * m88k-tdep.c (m88k_register_name): Constify.
14739 * macroexp.c (appendmem): Constify.
14740 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14741 (upgrade_type, parse_external, parse_partial_symbols)
14742 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14743 (new_symbol): Constify.
14744 * memattr.c (mem_info_command): Constify.
14745 * mep-tdep.c (register_name_from_keyword): Constify.
14746 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14747 Constify.
14748 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14749 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14750 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14751 cast.
14752 (mi_execute_async_cli_command): Constify.
14753 * mips-tdep.c (mips_register_name): Constify.
14754 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14755 (am33_register_name, am33_2_register_name)
14756 * moxie-tdep.c (moxie_register_names): Constify.
14757 * nat/linux-osdata.c (osdata_type): Constify fields.
14758 * nto-tdep.c (nto_parse_redirection): Constify.
14759 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14760 (lookup_child_selector): Constify.
14761 (objc_methcall::name): Constify.
14762 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14763 (lookup_struct_typedef): Constify.
14764 * objfiles.c (pc_in_section): Constify.
14765 * objfiles.h (pc_in_section): Constify.
14766 * p-exp.y (struct token::oper): Constify.
14767 (yyerror): Constify.
14768 * p-lang.h (pascal_yyerror): Constify.
14769 * parser-defs.h (op_name_standard): Constify.
14770 (op_print::string): Constify.
14771 (exp_descriptor::op_name): Constify.
14772 * printcmd.c (print_address_symbolic): Constify.
14773 * psymtab.c (print_partial_symbols): Constify.
14774 * python/py-breakpoint.c (stop_func): Constify.
14775 (bppy_get_expression): Constify.
14776 * python/py-cmd.c (cmdpy_completer::name): Constify.
14777 (cmdpy_function): Constify.
14778 * python/py-event.c (evpy_add_attribute)
14779 (gdbpy_initialize_event_generic): Constify.
14780 * python/py-event.h (evpy_add_attribute)
14781 (gdbpy_initialize_event_generic): Constify.
14782 * python/py-evts.c (add_new_registry): Constify.
14783 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14784 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14785 * python/py-inferior.c (get_buffer): Add cast.
14786 * python/py-param.c (parm_constant::name): Constify.
14787 * python/py-unwind.c (fprint_frame_id): Constify.
14788 * python/python.c (gdbpy_parameter_value): Constify.
14789 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14790 * remote.c (memory_packet_config::name): Constify.
14791 (show_packet_config_cmd, remote_write_bytes)
14792 (remote_buffer_add_string):
14793 * reverse.c (exec_reverse_once): Constify.
14794 * rs6000-tdep.c (variant::name, variant::description): Constify.
14795 * rust-exp.y (rustyyerror): Constify.
14796 * rust-lang.c (rust_op_name): Constify.
14797 * rust-lang.h (rustyyerror): Constify.
14798 * serial.h (serial_ops::name): Constify.
14799 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14800 (sh_sh3e_register_name, sh_sh2e_register_name)
14801 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14802 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14803 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14804 (sh_sh4al_dsp_register_name): Constify.
14805 * sh64-tdep.c (sh64_register_name): Constify.
14806 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14807 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14808 * stabsread.c (patch_block_stabs, read_type_number)
14809 (ref_map::stabs, ref_add, process_reference)
14810 (symbol_reference_defined, define_symbol, define_symbol)
14811 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14812 (read_one_struct_field, read_struct_fields, read_baseclasses)
14813 (read_tilde_fields, read_struct_type, read_array_type)
14814 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14815 (read_huge_number, read_range_type, read_args, common_block_start)
14816 (find_name_end): Constify.
14817 * stabsread.h (common_block_start, define_symbol)
14818 (process_one_symbol, symbol_reference_defined, ref_add):
14819 * symfile.c (get_section_index, add_symbol_file_command):
14820 * symfile.h (get_section_index): Constify.
14821 * target-descriptions.c (tdesc_type::name): Constify.
14822 (tdesc_free_type): Add cast.
14823 * target.c (find_default_run_target):
14824 (add_deprecated_target_alias, find_default_run_target)
14825 (target_announce_detach): Constify.
14826 (do_option): Constify.
14827 * target.h (add_deprecated_target_alias): Constify.
14828 * thread.c (print_thread_info_1): Constify.
14829 * top.c (deprecated_readline_begin_hook, command_line_input):
14830 Constify.
14831 (init_main): Add casts.
14832 * top.h (handle_line_of_input): Constify.
14833 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14834 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14835 (tfind_command): Rename to ...
14836 (tfind_command_1): ... this and constify.
14837 (tfind_command): New function.
14838 (tfind_end_command, tfind_start_command): Adjust.
14839 (encode_source_string): Constify.
14840 * tracepoint.h (encode_source_string): Constify.
14841 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14842 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14843 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14844 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14845 * tui/tui-win.c (parse_scrolling_args): Constify.
14846 * tui/tui-windata.c (tui_erase_data_content): Constify.
14847 * tui/tui-windata.h (tui_erase_data_content): Constify.
14848 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14849 * tui/tui.c (tui_enable): Add cast.
14850 * utils.c (defaulted_query): Constify.
14851 (init_page_info): Add cast.
14852 (puts_debug, subset_compare): Constify.
14853 * utils.h (subset_compare): Constify.
14854 * varobj.c (varobj_format_string): Constify.
14855 * varobj.h (varobj_format_string): Constify.
14856 * vax-tdep.c (vax_register_name): Constify.
14857 * windows-nat.c (windows_detach): Constify.
14858 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14859 * xml-support.c (gdb_xml_end_element): Constify.
14860 * xml-tdesc.c (tdesc_start_reg): Constify.
14861 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14862 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14863 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14864
995816ba
PA
148652017-04-05 Pedro Alves <palves@redhat.com>
14866
14867 * proc-api.c (struct trans): Constify.
14868 (procfs_note): Constify.
14869 * proc-events.c (struct trans, syscall_table):
14870 * proc-flags.c (struct trans): Constify.
14871 * proc-utils.h (procfs_note): Constify.
14872 * proc-why.c (struct trans): Constify.
14873 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14874 (procfs_detach): Constify.
14875 * sol-thread.c (struct string_map): Constify.
14876 (td_err_string, td_state_string): Constify.
14877
3e83a920
PA
148782017-04-05 Pedro Alves <palves@redhat.com>
14879
14880 * proc-api.c (procfs_filename): Don't initialize
14881 procfs_filename.
14882 (prepare_to_trace): Assume procfs_filename is non-NULL.
14883 (_initialize_proc_api): Give procfs_filename a default value here.
14884
63160a43
PA
148852017-04-05 Pedro Alves <palves@redhat.com>
14886
14887 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14888 'cond_string' parameter.
14889 (extract_exception_regexp): Constify 'string' parameter.
14890 (catch_exception_command_1): Constify.
14891 * breakpoint.c (init_catchpoint)
14892 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14893 parameter.
14894 (ep_parse_optional_if_clause, catch_fork_command_1)
14895 (catch_exec_command_1): Constify.
14896 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14897 parameter.
14898 (ep_parse_optional_if_clause): Constify.
14899 * cli/cli-utils.c (remove_trailing_whitespace)
14900 (check_for_argument): Constify.
14901 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14902 non-const overload.
14903 (check_for_argument): Likewise.
14904
9b2eba3d
PA
149052017-04-05 Pedro Alves <palves@redhat.com>
14906
14907 * event-top.c (command_line_handler): Add cast to execute_command
14908 call.
14909 * record-btrace.c (cmd_record_btrace_bts_start)
14910 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14911 (cmd_record_btrace_start): Add cast to execute_command call.
14912 * record-full.c (record_full_goto_insn):
14913 * record.c (record_start, record_stop): Add cast to
14914 execute_command_to_string calls.
14915 (cmd_record_start): Add cast to execute_command calls.
14916
2adadf51
PA
149172017-04-05 Pedro Alves <palves@redhat.com>
14918
14919 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14920 static inline function.
14921 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14922 array and use gdb_PyArg_ParseTupleAndKeywords.
14923 * python/py-cmd.c (cmdpy_init): Likewise.
14924 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14925 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14926 (infpy_search_memory): Likewise.
14927 * python/py-objfile.c (objfpy_add_separate_debug_file)
14928 (gdbpy_lookup_objfile): Likewise.
14929 * python/py-symbol.c (gdbpy_lookup_symbol)
14930 (gdbpy_lookup_global_symbol): Likewise.
14931 * python/py-type.c (gdbpy_lookup_type): Likewise.
14932 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14933 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14934 Likewise.
14935
0d1f4ceb
PA
149362017-04-05 Pedro Alves <palves@redhat.com>
14937
14938 * python/python-internal.h (gdb_PyGetSetDef): New type.
14939 * python/py-block.c (block_object_getset)
14940 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14941 * python/py-event.c (event_object_getset)
14942 (finish_breakpoint_object_getset): Likewise.
14943 * python/py-inferior.c (inferior_object_getset): Likewise.
14944 * python/py-infthread.c (thread_object_getset): Likewise.
14945 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14946 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14947 * python/py-objfile.c (objfile_getset): Likewise.
14948 * python/py-progspace.c (pspace_getset): Likewise.
14949 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14950 Likewise.
14951 * python/py-record.c (recpy_record_getset): Likewise.
14952 * python/py-symbol.c (symbol_object_getset): Likewise.
14953 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14954 Likewise.
14955 * python/py-type.c (type_object_getset, field_object_getset):
14956 Likewise.
14957 * python/py-value.c (value_object_getset): Likewise.
14958
4d759979
PA
149592017-04-05 Pedro Alves <palves@redhat.com>
14960
14961 * python/python-internal.h (gdb_PyObject_CallMethod)
14962 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14963 New functions.
14964 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14965 (PySys_GetObject, PySys_SetPath): New macros.
14966
fdf9e36f
PA
149672017-04-05 Pedro Alves <palves@redhat.com>
14968
14969 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14970 info_osdata_command.
14971 * osdata.c (info_osdata_command): Rename to ...
14972 (info_osdata): ... this. Constify 'type' parameter, and remove
14973 the 'from_tty' parameter. Accept NULL TYPE.
14974 (info_osdata_command): New function.
14975 * osdata.h (info_osdata_command): Remove declaration.
14976 (info_osdata): New declaration.
14977
9f33b8b7
PA
149782017-04-05 Pedro Alves <palves@redhat.com>
14979
14980 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14981 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14982 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14983 parameter.
14984 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14985 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14986 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14987 parameter.
14988 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14989 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14990 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14991 (mi_cmd_file_list_exec_source_files)
14992 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14993 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14994 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14995 parameter.
14996 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14997 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14998 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14999 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
15000 (mi_cmd_stack_info_frame): Constify 'command' parameter.
15001 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
15002 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
15003 'command' parameter.
15004 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
15005 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
15006 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
15007 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
15008 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
15009 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
15010 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
15011 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
15012 (mi_cmd_var_set_update_range): Constify 'command' parameter.
15013 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
15014 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
15015 parameter.
15016 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
15017 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
15018 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
15019 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
15020 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
15021 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
15022 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
15023 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
15024 (mi_cmd_data_list_changed_registers)
15025 (mi_cmd_data_write_register_values)
15026 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
15027 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
15028 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
15029 (mi_cmd_list_features, mi_cmd_list_target_features)
15030 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
15031 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
15032 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
15033 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
15034 (mi_cmd_trace_frame_collected): Constify 'command'
15035 parameter.
15036 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
15037 'command' parameter.
15038
67cb5b2d
PA
150392017-04-05 Pedro Alves <palves@redhat.com>
15040
15041 * ada-lang.c (ada_completer_word_break_characters): Now a const
15042 array.
15043 (ada_get_gdb_completer_word_break_characters): Constify.
15044 * completer.c (gdb_completer_command_word_break_characters)
15045 (gdb_completer_file_name_break_characters)
15046 (gdb_completer_quote_characters): Now const arrays.
15047 (get_gdb_completer_quote_characters): Constify.
15048 (set_rl_completer_word_break_characters): New function.
15049 (set_gdb_completion_word_break_characters)
15050 (complete_line_internal): Use it.
15051 * completer.h (get_gdb_completer_quote_characters): Constify.
15052 (set_rl_completer_word_break_characters): Declare.
15053 * f-lang.c (f_word_break_characters): Constify.
15054 * language.c (default_word_break_characters): Constify.
15055 * language.h (language_defn::la_word_break_characters): Constify.
15056 (default_word_break_characters): Constify.
15057 * top.c (init_main): Use set_rl_completer_word_break_characters.
15058
7a114964
PA
150592017-04-05 Pedro Alves <palves@redhat.com>
15060
15061 * aix-thread.c (aix_thread_pid_to_str)
15062 (aix_thread_extra_thread_info): Constify.
15063 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
15064 * bsd-uthread.c (bsd_uthread_extra_thread_info)
15065 (bsd_uthread_pid_to_str): Constify.
15066 * corelow.c (core_pid_to_str): Constify.
15067 * darwin-nat.c (darwin_pid_to_str): Constify.
15068 * fbsd-nat.c (fbsd_pid_to_str): Constify.
15069 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
15070 Constify.
15071 * gnu-nat.c (gnu_pid_to_str): Constify.
15072 * go32-nat.c (go32_pid_to_str): Constify.
15073 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
15074 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
15075 * inferior.c (inferior_pid_to_str): Constify.
15076 * linux-nat.c (linux_nat_pid_to_str): Constify.
15077 * linux-tdep.c (linux_core_pid_to_str): Constify.
15078 * linux-thread-db.c (thread_db_pid_to_str)
15079 (thread_db_extra_thread_info): Constify.
15080 * nto-tdep.c (nto_extra_thread_info): Constify.
15081 * nto-tdep.h (nto_extra_thread_info): Constify.
15082 * obsd-nat.c (obsd_pid_to_str): Constify.
15083 * procfs.c (procfs_pid_to_str): Constify.
15084 * ravenscar-thread.c (ravenscar_extra_thread_info)
15085 (ravenscar_pid_to_str): Constify.
15086 * remote-sim.c (gdbsim_pid_to_str): Constify.
15087 * remote.c (remote_threads_extra_info, remote_pid_to_str):
15088 Constify.
15089 * sol-thread.c (solaris_pid_to_str): Constify.
15090 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
15091 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
15092 * target.c (default_pid_to_str, target_pid_to_str)
15093 (normal_pid_to_str, default_pid_to_str): Constify.
15094 * target.h (target_ops::to_pid_to_str)
15095 (target_ops::to_extra_thread_info): Constify.
15096 (target_pid_to_str, normal_pid_to_str): Constify.
15097 * windows-nat.c (windows_pid_to_str): Constify.
15098 * gdbarch.sh (core_pid_to_str): Constify.
15099 * target-delegates.c: Regenerate.
15100 * gdbarch.h, gdbarch.c: Regenerate.
15101
69bbf465
PA
151022017-04-05 Pedro Alves <palves@redhat.com>
15103
15104 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
15105 the memory of the temporary warning_pre_print override.
15106 * utils.c (warning_pre_print): Constify.
15107 * utils.h (warning_pre_print): Constify.
15108
be47f9e8
PA
151092017-04-05 Pedro Alves <palves@redhat.com>
15110
15111 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
15112 (shell_command): New function.
15113 (make_command): Use std::string.
15114 (init_cli_cmds): Register shell_command instead of shell_escape.
15115
bde6261a
PA
151162017-04-05 Pedro Alves <palves@redhat.com>
15117
15118 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
15119 * tracepoint.c (default_collect): Don't initialize.
15120
b38ef47f
PA
151212017-04-05 Pedro Alves <palves@redhat.com>
15122
15123 * macroexp.c (macro_buffer::shared): Now a bool.
15124 (init_buffer): Update.
15125 (init_shared_buffer): Constify 'addr' parameter.
15126 (substitute_args, expand, macro_expand, macro_expand_next): Remove
15127 casts.
15128
f995bbe8
PA
151292017-04-05 Pedro Alves <palves@redhat.com>
15130
15131 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15132 * disasm.c (set_disassembler_options): Constify local.
15133 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15134
4a596fe2
SDJ
151352017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15136
15137 PR gdb/21352
15138 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15139 option.
15140
2cad08ea
YQ
151412017-04-05 Yao Qi <yao.qi@linaro.org>
15142
15143 * frame.c (frame_unwind_register_unsigned): Call
15144 frame_unwind_register_value.
15145
55a98976
YQ
151462017-04-05 Yao Qi <yao.qi@linaro.org>
15147
15148 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15149 Use gdb_test_multiple, and don't match anchor.
15150
4ac40124
PA
151512017-04-05 Pedro Alves <palves@redhat.com>
15152
15153 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15154 (Write After Approval): Remove Simon Marchi.
15155
c053b654
PA
151562017-04-05 Pedro Alves <palves@redhat.com>
15157
15158 * common/gdb_optional.h (optional::optional): Make constexpr and
15159 initialize m_dummy.
15160
4c7bf4f9
JB
151612017-04-04 John Baldwin <jhb@FreeBSD.org>
15162
15163 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15164 (amd64fbsd_jmp_buf_reg_offset): Remove.
15165 (amd64fbsd_supply_uthread): Remove function.
15166 (amd64fbsd_collect_uthread): Remove function.
15167 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15168 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15169 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15170 (fbsd-nat.c): Update comment.
15171 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15172 (i386fbsd_jmp_buf_reg_offset): Remove.
15173 (i386fbsd_supply_uthread): Remove function.
15174 (i386fbsd_collect_uthread): Remove function.
15175 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15176
1e1a8bef
JB
151772017-04-04 John Baldwin <jhb@FreeBSD.org>
15178
15179 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15180 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15181 * NEWS: Mention that support for FreeBSD/alpha was removed.
15182 * alpha-fbsd-tdep.c: Delete file.
15183 * config/alpha/fbsd.mh: Delete file.
15184 * configure.host: Delete alpha*-*-freebsd* and
15185 alpha*-*-kfreebsd*-gnu.
15186 * configure.tgt: Delete alpha*-*-freebsd* and
15187 alpha*-*-kfreebsd*-gnu.
15188
49907934
JB
151892017-04-04 John Baldwin <jhb@FreeBSD.org>
15190
15191 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15192 amd64bsd_store_inferior_registers): Use ptid from regcache.
15193
6f77053d
PA
151942017-04-04 Pedro Alves <palves@redhat.com>
15195
15196 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15197 data fields, make them private and add "m_" prefixes.
15198 (lnp_state_machine::lnp_state_machine): New ctor.
15199 (record_line, check_line_address, handle_set_discriminator)
15200 (handle_set_address, handle_advance_pc, handle_special_opcode)
15201 (handle_advance_line, handle_set_file, handle_negate_stmt)
15202 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15203 (end_sequence, advance_line): New methods.
15204 (m_gdbarch, m_record_lines_p): New fields.
15205 (lnp_reader_state): Delete.
15206 (dwarf_record_line): Rename to ...
15207 (lnp_state_machine::record_line): ... adjust.
15208 (init_lnp_state_machine): Delete.
15209 (lnp_state_machine::lnp_state_machine): New.
15210 (check_line_address): Rename to ...
15211 (lnp_state_machine::check_line_address): This.
15212 (dwarf_decode_lines_1): Remove reference to "reader_state".
15213 Adjust lnp_state_machine having a non-default ctor. Use bool.
15214 State machine internal state manipulation moved to
15215 lnp_state_machine methods.
15216
9c541725
PA
152172017-04-04 Pedro Alves <palves@redhat.com>
15218
15219 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15220 unittests/offset-type-selftests.c.
15221 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15222 * common/offset-type.h: New file.
15223 * common/preprocessor.h: New file.
15224 * common/traits.h: New file.
15225 * common/valid-expr.h: New file.
15226 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15227 sect_offset and cu_offset strong typedefs throughout.
15228 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15229 typedefs throughout.
15230 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15231 sect_offset and cu_offset strong typedefs throughout.
15232 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15233 typedefs throughout.
15234 * gdbtypes.h: Include "common/offset-type.h".
15235 (cu_offset): Now an offset type (strong typedef) instead of a
15236 struct.
15237 (sect_offset): Likewise.
15238 (union call_site_parameter_u): Rename "param_offset" field to
15239 "param_cu_off".
15240 * unittests/offset-type-selftests.c: New file.
15241
ecfb656c
PA
152422017-04-04 Pedro Alves <palves@redhat.com>
15243
15244 * common/underlying.h: New file.
15245 * dwarf2read.c: Include "common/gdb_optional.h" and
15246 "common/underlying.h".
15247 (dir_index, file_name_index): New types.
15248 (file_entry): Use them.
15249 (file_entry::include): Use to_underlying.
15250 (line_header::add_file_name): Use dir_index.
15251 (read_formatted_entries): Use gdb::optional. Read form before
15252 writting to file_entry.
15253 (dwarf_decode_line_header): Use dir_index.
15254 (lnp_state_machine::current_file): Use to_underlying.
15255 (lnp_state_machine::file): Change type to file_name_index.
15256 (dwarf_record_line): Use to_underlying.
15257 (init_lnp_state_machine): Use file_name_index.
15258 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15259
d194f1fe
PA
152602017-04-04 Pedro Alves <palves@redhat.com>
15261
15262 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15263 operator bool, has_value and get methods.
15264
fff8551c
PA
152652017-04-04 Pedro Alves <palves@redhat.com>
15266
15267 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15268 fields.
15269 (line_header): Initialize all data fields. Change type of
15270 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15271 Change type of include_dirs to std::vector<const char *>. Remove
15272 num_include_dirs, include_dirs_size. Change type of file_names to
15273 std::vector<file_entry>. Remove num_file_names, file_names_size.
15274 (line_header::line_header): New.
15275 (line_header::add_include_dir, line_header::add_file_name): New
15276 methods.
15277 (line_header::include_dir_at): Remove NULL check.
15278 (line_header::file_name_at): Add const overload.
15279 (line_header_up): New unique_ptr typedef.
15280 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15281 std::vector. Remove free_line_header call.
15282 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15283 free_line_header call.
15284 (free_cu_line_header): Delete.
15285 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15286 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15287 Adjust to use std::vector.
15288 (free_line_header): Delete.
15289 (free_line_header_voidp): Use delete.
15290 (add_include_dir): Replace with ...
15291 (line_header::add_include_dir): ... this method. Use std::vector.
15292 (add_file_name): Replace with ...
15293 (line_header::add_file_name): ... this method. Use std::vector.
15294 (add_include_dir_stub): Delete.
15295 (read_formatted_entries): Remove memset.
15296 (dwarf_decode_line_header): Return a line_header_up instead of a
15297 raw pointer. Remove cleanup handling. Pass lambdas to
15298 read_formatted_entries. Adjust to use line_header methods.
15299 (dwarf_decode_lines_1): Adjust to use line_header methods.
15300 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15301 use std::vector.
15302
d62a8ae2
SM
153032017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15304
15305 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15306 instead of struct ptid.
15307
db3a1dc7
AH
153082017-05-04 Alan Hayward <alan.hayward@arm.com>
15309
15310 * frame.c (get_frame_register_bytes): Unwind using value.
15311 (put_frame_register_bytes): Likewise.
15312
b1b45502
IB
153132017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15314
15315 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15316 aggregate-like.
15317
ec13808e
JK
153182017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15319
15320 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15321
12316564
YQ
153222017-03-29 Yao Qi <yao.qi@linaro.org>
15323
15324 * gdbthread.h (struct thread_info): Declare constructor and
15325 destructor. Add some in-class member initializers.
15326 * thread.c (free_thread): Remove.
15327 (init_thread_list): Call delete instead of free_thread.
15328 (new_thread): Call thread_info constructor.
15329 (thread_info::thread_info): New function.
15330 (thread_info::~thread_info): New function.
15331 (delete_thread_1): Call delete instead of free_thread.
15332 (make_cleanup_restore_current_thread): Move tp and frame to
15333 inner block.
15334
fe5f7374
AK
153352017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15336
15337 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15338 (arc_skip_prologue): Likewise.
15339 (arc_make_frame_cache): Likewise.
15340 (arc_pv_get_operand): New function.
15341 (arc_is_in_prologue): Likewise.
15342 (arc_analyze_prologue): Likewise.
15343 (arc_print_frame_cache): Likewise.
15344 (MAX_PROLOGUE_LENGTH): New constant.
15345
eea78757
AK
153462017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15347
15348 * configure.tgt: Add arc-insn.o.
15349 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15350 (dump_arc_instruction_command): New function.
15351 (arc_fprintf_disasm): Likewise.
15352 (arc_disassemble_info): Likewise.
15353 (arc_insn_get_operand_value): Likewise.
15354 (arc_insn_get_operand_value_signed): Likewise.
15355 (arc_insn_get_memory_base_reg): Likewise.
15356 (arc_insn_get_memory_offset): Likewise.
15357 (arc_insn_get_branch_target): Likewise.
15358 (arc_insn_dump): Likewise.
15359 (arc_insn_get_linear_next_pc): Likewise.
15360 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15361 (arc_disassemble_info): Likewise.
15362 (arc_insn_get_branch_target): Likewise.
15363 (arc_insn_get_linear_next_pc): Likewise.
15364 * NEWS: Mention new "maint print arc arc-instruction".
15365
3be78afd
AK
153662017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15367
15368 * arc-tdep (maintenance_print_arc_list): New variable.
15369 (maintenance_print_arc_command): New function.
15370
296ec4fa
AK
153712017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15372
15373 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15374 Add "limm" and "reserved".
15375 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15376 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15377 * arc-tdep.h (arc_regnum): Likewise.
15378
f74f865e
MF
153792017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15380
15381 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15382 for THREADPTR register.
15383 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15384 register.
15385 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15386 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15387 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15388
0d0bf81a
MF
153892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15390
15391 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15392 registers above gdbarch_num_regs (gdbarch) as privileged in
15393 call0 ABI.
15394
0ce4291e
MF
153952017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15396
15397 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15398 for a single specified register or for all registers in
15399 a0_base..a0_base + C0_NREGS range.
15400 (supply_gregset_reg): Call regcache_raw_supply for a single
15401 specified register or for all registers in a0_base..a0_base +
15402 C0_NREGS range.
15403
c56054f9
MF
154042017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15405
15406 * arch/xtensa.h (C0_NREGS): Add definition.
15407 * xtensa-tdep.c (C0_NREGS): Remove definition.
15408
a4398628
MF
154092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15410
15411 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15412 Drop xtensa_default_isa initialization.
15413 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15414
8c43009f
PA
154152017-03-27 Pedro Alves <palves@redhat.com>
15416
15417 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15418 (file_entry::include_dir): New method.
15419 (line_header::include_dir_at, line_header::file_name_at): New
15420 methods.
15421 (setup_type_unit_groups, setup_type_unit_groups)
15422 (psymtab_include_file_name): Simplify using the new methods.
15423 (lnp_state_machine) <the_line_header>: New field.
15424 <file>: Add comment.
15425 (lnp_state_machine::current_file): New method.
15426 (dwarf_record_line): Simplify using the new methods.
15427 (init_lnp_state_machine): Initialize the "the_line_header" field.
15428 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15429 Simplify using the new methods.
15430
a7e80b9e
PA
154312017-03-27 Pedro Alves <palves@redhat.com>
15432
15433 * cp-name-parser.y (make_empty): Delete.
15434 (demangler_special, nested_name, ptr_operator, array_indicator)
15435 (direct_declarator, declarator_1): Use fill_comp instead of
15436 make_empty.
15437
21047726
PA
154382017-03-27 Pedro Alves <palves@redhat.com>
15439
15440 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15441 to ATTRIBUTE_PRINTF.
15442 * solib-target.c (library_list_start_list): Print "string" not
15443 "version".
15444 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15445 gdb_xml_error call.
15446
d721ba37
PA
154472017-03-27 Pedro Alves <palves@redhat.com>
15448
15449 * dwarf2read.c (struct file_and_directory): New.
15450 (dwarf2_get_dwz_file): Adjust to use std::string.
15451 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15452 (find_file_and_directory): Adjust to return a file_and_directory
15453 object.
15454 (read_file_scope): Adjust to use file_and_directory. Remove
15455 make_cleanup/do_cleanups calls.
15456 (open_and_init_dwp_file): Adjust to use std::string. Remove
15457 make_cleanup/do_cleanups calls.
15458 * python/python.c (do_start_initialization): Adjust to ldirname
15459 returning a std::string.
15460 * utils.c (ldirname): Now returns a std::string.
15461 * utils.h (ldirname): Change return type to std::string.
15462 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15463 returning a std::string.
15464 * xml-tdesc.c (file_read_description_xml): Likewise.
15465
ed771251
AH
154662017-03-24 Alan Hayward <alan.hayward@arm.com>
15467
15468 * regcache.c (regcache_debug_print_register): New function.
15469 * regcache.h (regcache_debug_print_register): New declaration.
15470 * target.c (debug_print_register): Remove.
15471 (target_fetch_registers): Call regcache_debug_print_register.
15472 (target_store_registers): Likewise.
15473
568c1b9f
PB
154742017-03-24 Pádraig Brady <pbrady@fb.com>
15475
15476 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15477 reference beyond the 'lh->include_dirs' array before accessing to
15478 it.
15479 (psymtab_include_file_name): Likewise.
15480 (dwarf_decode_lines_1): Likewise.
15481 (dwarf_decode_lines): Likewise.
15482 (file_file_name): Likewise.
15483
3e00d44f
SM
154842017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15485
15486 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15487 inferior_ptid.
15488 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15489 ps_lsetfpregs): Likewise.
15490 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15491 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15492 ps_lsetfpregs): Likewise.
15493 * target.c (target_fetch_registers, target_store_registers):
15494 Remove asserts.
15495
077ae656
AH
154962017-03-23 Alan Hayward <alan.hayward@arm.com>
15497
15498 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15499
1e2b521d
YQ
155002017-03-23 Yao Qi <yao.qi@linaro.org>
15501
15502 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15503 (_initialize_aarch64_tdep): Register it.
15504 (aarch64_record_load_store): Handle PRFM instruction.
15505 (aarch64_process_record_test): New function.
15506
33877125
YQ
155072017-03-23 Yao Qi <yao.qi@linaro.org>
15508
15509 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15510 indentation.
15511
a0eef940
YQ
155122017-03-23 Yao Qi <yao.qi@linaro.org>
15513
15514 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15515
3f2a3564
PR
155162017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15517
15518 python/python.c (do_start_initialization): Fix memory leak.
15519
b67aeab0
SM
155202017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15521
15522 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15523 using get_ptrace_pid.
15524 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15525 inferior_ptid.
15526 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15527 inferior_ptid instead of pid.
15528
ffdbe864
YQ
155292017-03-22 Yao Qi <yao.qi@linaro.org>
15530
15531 * aarch64-tdep.c: Wrap locally used classes in anonymous
15532 namespace.
15533 * arm-tdep.c: Likewise.
15534 * linespec.c: Likewise.
15535 * ui-out.c: Likewise.
15536
9d736fbf
JG
155372017-03-22 Jonah Graham <jonah@kichwacoders.com>
15538
15539 PR gdb/19637
15540 * python/lib/gdb/printer/bound_registers.py: Import sys.
15541
3de88e9a
SM
155422017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15543
15544 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15545 windows_thread_info parameter and use it instead of
15546 current_thread.
15547 (windows_fetch_inferior_registers): Don't set current_thread,
15548 pass the thread to do_windows_fetch_inferior_registers. Use
15549 ptid from regcache instead of inferior_ptid.
15550 (do_windows_store_inferior_registers): Add windows_thread_info
15551 parameter and use it instead of current_thread.
15552 (windows_store_inferior_registers): Don't set current_thread,
15553 pass the thread to do_windows_store_inferior_registers. Use
15554 ptid from regcache instead of inferior_ptid.
15555
0e7b8f61
SM
155562017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15557
15558 * ser-mingw.c (ser_windows_raw): Remove reference to
15559 struct serial::current_timeout.
15560
5badf10a
IR
155612017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15562
15563 PR tdep/20928
15564 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15565 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15566 (sparc64_fsr_type): Fix %fsr decoding.
15567
cee59b3f
TW
155682017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15569
15570 * python/py-record-btrace.c (btpy_insn_data): Change return type
15571 for Python 2.
15572
639a9038
SM
155732017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15574
15575 * spu-linux-nat.c (spu_fetch_inferior_registers,
15576 spu_store_inferior_registers): Use ptid from regcache, set and
15577 restore inferior_ptid.
15578 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15579 Likewise.
15580
bcc0c096
SM
155812017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15582
15583 * i386-linux-nat.c (fetch_register, store_register,
15584 i386_linux_fetch_inferior_registers,
15585 i386_linux_store_inferior_registers): Use ptid from regcache.
15586 * ia64-linux-nat.c (ia64_linux_fetch_register,
15587 ia64_linux_store_register): Likewise.
15588 * inf-ptrace.c (inf_ptrace_fetch_register,
15589 inf_ptrace_store_register): Likewise.
15590 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15591 m32r_linux_store_inferior_registers): Likewise.
15592 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15593 m68kbsd_store_inferior_registers): Likewise.
15594 * m68k-linux-nat.c (fetch_register, store_register,
15595 m68k_linux_fetch_inferior_registers,
15596 m68k_linux_store_inferior_registers): Likewise.
15597 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15598 m88kbsd_store_inferior_registers): Likewise.
15599 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15600 mips_fbsd_store_inferior_registers): Likewise.
15601 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15602 mips64_linux_regsets_store_registers): Likewise.
15603 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15604 mipsnbsd_store_inferior_registers): Likewise.
15605 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15606 mips64obsd_store_inferior_registers): Likewise.
15607 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15608 Likewise.
15609 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15610 ppcfbsd_store_inferior_registers): Likewise.
15611 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15612 ppc_linux_store_inferior_registers): Likewise.
15613 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15614 ppcnbsd_store_inferior_registers): Likewise.
15615 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15616 ppcobsd_store_registers): Likewise.
15617 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15618 Likewise.
15619 * ravenscar-thread.c (ravenscar_fetch_registers,
15620 ravenscar_store_registers, ravenscar_prepare_to_store):
15621 Likewise.
15622 * record-btrace.c (record_btrace_fetch_registers,
15623 record_btrace_store_registers, record_btrace_prepare_to_store):
15624 Likewise.
15625 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15626 Lookup inferior using ptid from regcache, instead of
15627 current_inferior.
15628 * remote.c (remote_fetch_registers, remote_store_registers): Use
15629 ptid from regcache.
15630 * rs6000-nat.c (fetch_register, store_register): Likewise.
15631 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15632 s390_linux_store_inferior_registers): Likewise.
15633 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15634 shnbsd_store_inferior_registers): Likewise.
15635 * sol-thread.c (sol_thread_fetch_registers,
15636 sol_thread_store_registers): Likewise.
15637 * sparc-nat.c (sparc_fetch_inferior_registers,
15638 sparc_store_inferior_registers): Likewise.
15639 * tilegx-linux-nat.c (fetch_inferior_registers,
15640 store_inferior_registers): Likewise.
15641 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15642 vaxbsd_store_inferior_registers): Likewise.
15643 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15644 store_xtregs): Likewise.
15645
c0f55cc6
AV
156462017-03-20 Artemiy Volkov <artemiyv@acm.org>
15647
15648 PR gdb/14441
15649 * NEWS: Mention support for rvalue references in GDB and python.
15650 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15651 supports both lvalue and rvalue references.
15652
15c0a2a9
AV
156532017-03-20 Artemiy Volkov <artemiyv@acm.org>
15654
15655 PR gdb/14441
15656 * gdbtypes.c (rank_one_type): Implement overloading
15657 resolution rules regarding rvalue references.
15658
aa006118
AV
156592017-03-20 Artemiy Volkov <artemiyv@acm.org>
15660
15661 PR gdb/14441
15662 * aarch64-tdep.c (aarch64_type_align)
15663 (aarch64_extract_return_value, aarch64_store_return_value): Change
15664 lvalue reference type checks to general reference type checks.
15665 * amd64-tdep.c (amd64_classify): Likewise.
15666 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15667 Likewise.
15668 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15669 (arm_store_return_value): Likewise.
15670 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15671 * c-typeprint.c (c_print_type): Likewise.
15672 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15673 (cplus_number_of_children, cplus_describe_child): Likewise.
15674 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15675 * completer.c (expression_completer): Likewise.
15676 * cp-support.c (make_symbol_overload_list_adl_namespace):
15677 Likewise.
15678 * darwin-nat-info.c (info_mach_region_command): Likewise.
15679 * dwarf2loc.c (entry_data_value_coerce_ref)
15680 (value_of_dwarf_reg_entry): Likewise.
15681 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15682 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15683 Likewise.
15684 * findvar.c (extract_typed_address, store_typed_address):
15685 Likewise.
15686 * gdbtypes.c (rank_one_type): Likewise.
15687 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15688 * infcall.c (value_arg_coerce): Likewise.
15689 * language.c (pointer_type): Likewise.
15690 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15691 Likewise.
15692 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15693 * mn10300-tdep.c (mn10300_type_align): Likewise.
15694 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15695 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15696 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15697 Likewise.
15698 * printcmd.c (print_formatted, x_command): Likewise.
15699 * python/py-type.c (typy_get_composite, typy_template_argument):
15700 Likewise.
15701 * python/py-value.c (valpy_referenced_value)
15702 (valpy_get_dynamic_type, value_has_field): Likewise.
15703 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15704 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15705 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15706 * spu-tdep.c (spu_scalar_value_p): Likewise.
15707 * symtab.c (lookup_symbol_aux): Likewise.
15708 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15709 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15710 Likewise.
15711 * valops.c (value_cast_pointers, value_cast)
15712 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15713 (value_struct_elt, value_struct_elt_bitpos)
15714 (value_find_oload_method_list, find_overload_match)
15715 (value_rtti_indirect_type): Likewise.
15716 * valprint.c (val_print_scalar_type_p, generic_val_print):
15717 Likewise.
15718 * value.c (value_actual_type, value_as_address, unpack_long)
15719 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15720 (coerce_ref): Likewise.
15721 * varobj.c (varobj_get_value_type): Likewise.
15722
3fcf899d
AV
157232017-03-20 Artemiy Volkov <artemiyv@acm.org>
15724
15725 PR gdb/14441
15726 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15727 table of constants.
15728 * python/lib/gdb/command/explore.py: Support exploring values
15729 of rvalue reference types.
15730 * python/lib/gdb/types.py: Implement get_basic_type() for
15731 rvalue reference types.
15732 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15733 constant.
15734 * python/py-value.c (valpy_getitem): Add an rvalue reference
15735 check.
15736 (valpy_reference_value): Add new parameter "refcode".
15737 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15738 New wrappers for valpy_reference_value().
15739 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15740 (gdbpy_invoke_xmethod): Likewise.
15741
4297a3f0
AV
157422017-03-20 Artemiy Volkov <artemiyv@acm.org>
15743
15744 PR gdb/14441
15745 * dwarf2read.c (process_die, read_type_die_1): Handle the
15746 DW_TAG_rvalue_reference_type DIE.
15747 (read_tag_reference_type): Add new parameter "refcode".
15748
e1cb3213
AV
157492017-03-20 Artemiy Volkov <artemiyv@acm.org>
15750
15751 PR gdb/14441
15752 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15753 (c_type_print_modifier, c_type_print_varspec_suffix)
15754 (c_type_print_base): Support printing rvalue reference types.
15755 * c-valprint.c (c_val_print, c_value_print): Support printing
15756 rvalue reference values.
15757
e4347c89
AV
157582017-03-20 Artemiy Volkov <artemiyv@acm.org>
15759
15760 PR gdb/14441
15761 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15762 typename.
15763 * cp-support.c (replace_typedefs): Handle
15764 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15765 * python/py-type.c (typy_lookup_type): Likewise.
15766
53cc15f5
AV
157672017-03-20 Artemiy Volkov <artemiyv@acm.org>
15768
15769 PR gdb/14441
15770 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15771 * parse.c (insert_type): Change assert statement.
15772 (follow_types): Handle rvalue reference types.
15773 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15774 constant.
15775
a65cfae5
AV
157762017-03-20 Artemiy Volkov <artemiyv@acm.org>
15777
15778 PR gdb/14441
15779 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15780 value_ref() interface.
15781 * c-valprint.c (c_value_print): Likewise.
15782 * infcall.c (value_arg_coerce): Likewise.
15783 * python/py-value.c (valpy_reference_value): Likewise.
15784 * valops.c (value_cast, value_reinterpret_cast)
15785 (value_dynamic_cast, typecmp): Likewise.
15786 (value_ref): Parameterize by kind of return value reference type.
15787 * value.h (value_ref): Add new parameter "refcode".
15788
3b224330
AV
157892017-03-20 Artemiy Volkov <artemiyv@acm.org>
15790
15791 PR gdb/14441
15792 * dwarf2read.c (read_tag_reference_type): Use
15793 lookup_lvalue_reference_type() instead of lookup_reference_type().
15794 * eval.c (evaluate_subexp_standard): Likewise.
15795 * f-exp.y: Likewise.
15796 * gdbtypes.c (make_reference_type, lookup_reference_type):
15797 Generalize with rvalue reference types.
15798 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15799 convenience wrappers for lookup_reference_type().
15800 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15801 reference kind parameter.
15802 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15803 wrappers for lookup_reference_type().
15804 * guile/scm-type.c (gdbscm_type_reference): Use
15805 lookup_lvalue_reference_type() instead of lookup_reference_type().
15806 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15807 * parse.c (follow_types): Likewise.
15808 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15809 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15810 Likewise.
15811 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15812 (gdbpy_invoke_xmethod): Likewise.
15813 * stabsread.c: Provide extra argument to make_reference_type()
15814 call.
15815 * valops.c (value_ref, value_rtti_indirect_type): Use
15816 lookup_lvalue_reference_type() instead of lookup_reference_type().
15817
f9aeb8d4
AV
158182017-03-20 Artemiy Volkov <artemiyv@acm.org>
15819
15820 PR gdb/14441
15821 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15822 (TYPE_IS_REFERENCE): New macro.
15823 (struct type): Add rvalue_reference_type field.
15824 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15825
51457a05
MAL
158262017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15827
15828 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15829 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15830 New function definition.
15831 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15832 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15833 New function declaration.
15834 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15835 * mi/mi-interp.h: New file.
15836 * solib.c (info_sharedlibrary_command): Replace for loop with
15837 ALL_SO_LIBS macro
15838 * solib.h (update_solib_list): New function declaration.
15839 (so_list_head): Move macro.
15840 * solist.h (ALL_SO_LIBS): New macro.
15841
e696b3ad
MAL
158422017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15843
15844 * infcmd.c (post_create_inferior): Remove unused argument in
15845 call to solib_add.
15846 * remote.c (remote_start_remote): Likewise.
15847 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15848 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15849 (enable_break): Likewise.
15850 * solib.c (update_solib_list): Remove unused target argument
15851 and its documentation.
15852 (solib_add): Remove unused target argument. Remove unused
15853 argument in call to update_solib_list.
15854 (info_sharedlibrary_command): Remove unused argument in call
15855 to update_solib_list.
15856 (sharedlibrary_command): Remove unused argument in call to
15857 solib_add.
15858 (handle_solib_event): Likewise.
15859 (reload_shared_libraries): Likewise.
15860 * solib.h (solib_add): Remove unused target argument.
15861
dcb84eda
AA
158622017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15863
15864 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15865 (s390_displaced_step_fixup): Cover relative branches with the
15866 default fixup handling. This fixes lack of support for some
15867 relative branch instructions.
15868
d9cb6cdc
SM
158692017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15870
15871 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15872 ptid from regcache.
15873
1afaf9f4
SM
158742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15875
15876 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15877 i386_darwin_store_inferior_registers): Use ptid from regcache.
15878
aac12e24
SM
158792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15880
15881 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15882 i386bsd_store_inferior_registers): Use ptid from regcache.
15883
bbe1eef1
SM
158842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15885
15886 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15887 hppaobsd_store_registers): Use ptid from regcache.
15888
10799020
SM
158892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15890
15891 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15892 hppanbsd_store_registers): Use ptid from regcache.
15893
00204cf7
SM
158942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15895
15896 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15897 from regcache. Use get_ptrace_pid.
15898
11a33714
SM
158992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15900
15901 * corelow.c (get_core_register_section): Use ptid from regcache,
15902 update doc.
15903
317cd492
SM
159042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15905
15906 * bsd-uthread.c (bsd_uthread_fetch_registers,
15907 bsd_uthread_store_registers): Use ptid from regcache, set and
15908 restore inferior_ptid.
15909
9ac8a7c2
SM
159102017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15911
15912 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15913 fetch_fp_regs, store_register, store_regs, store_fp_register,
15914 store_fp_regs): Use ptid from regcache.
15915
4ac4bb6a
SM
159162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15917
15918 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15919 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15920 store_vfp_regs): Use ptid from regcache.
15921
9bcbdca8
PA
159222017-03-17 Pedro Alves <palves@redhat.com>
15923
15924 PR remote/21188
15925 * ser-base.c (ser_base_wait_for): Add comment.
15926 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15927 version.
15928 * ser-unix.c (hardwire_raw): Remove reference to
15929 scb->current_timeout.
15930 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15931 (hardwire_ops): Install ser_base_readchar instead of
15932 hardwire_readchar.
15933 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15934 Remove fields.
15935
7503099f
JG
159362017-03-17 Jonah Graham <jonah@kichwacoders.com>
15937
15938 PR gdb/19637
15939 * python/lib/gdb/printer/bound_registers.py: Add support for
15940 Python 3.
15941
7942e96e
AA
159422017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15943
15944 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15945 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15946 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15947 byte_offset to subobj_byte_offset. Fix the handling of
15948 DWARF_VALUE_STACK on big-endian targets when coming via an
15949 implicit pointer.
15950 (dwarf2_evaluate_loc_desc): Adjust call to
15951 dwarf2_evaluate_loc_desc_full.
15952 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15953 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15954
ba14f379
YQ
159552017-03-16 Yao Qi <yao.qi@linaro.org>
15956
15957 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15958 and REVSH instructions.
15959
b121eeb9
YQ
159602017-03-16 Yao Qi <yao.qi@linaro.org>
15961
15962 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15963 (arm_record_test): Declare.
15964 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15965 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15966 align with the manual.
15967 (thumb_record_misc): Adjust the code order to align with the
15968 manual.
15969 (thumb2_record_decode_insn_handler): Fix instruction matching.
15970 (instruction_reader_thumb): New class.
15971 (arm_record_test): New function.
15972
728a7913
YQ
159732017-03-16 Yao Qi <yao.qi@linaro.org>
15974
15975 * arm-tdep.c (abstract_memory_reader): New class.
15976 (instruction_reader): New class.
15977 (extract_arm_insn): Add argument 'reader'. Callers updated.
15978 (decode_insn): Likewise.
15979
34b43320
DE
159802017-03-16 Doug Evans <dje@google.com>
15981
a7c0469f
DE
15982 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15983 member. Change type of TYPE member to SCM. All uses updated.
15984 (lsscm_make_lazy_string_smob): Add assert.
15985 (lsscm_make_lazy_string): Flag bad length values.
15986 (lsscm_elt_type): New function.
15987 (gdbscm_lazy_string_to_value): Rewrite to use
15988 lsscm_safe_lazy_string_to_value.
15989 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15990 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15991 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15992 in incoming type.
15993 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15994 * guile/scm-type.c (tyscm_scm_to_type): New function.
15995
159962017-03-15 Doug Evans <dje@google.com>
15997
34b43320
DE
15998 PR python/17728, python/18439, python/18779
15999 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
16000 member. Change type of TYPE member to PyObject *. All uses updated.
16001 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
16002 (gdbpy_create_lazy_string_object): Flag bad length values.
16003 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
16004 Handle typedefs in incoming type.
16005 (stpy_lazy_string_elt_type): New function.
16006 (gdbpy_extract_lazy_string): Call it.
16007 * python/py-value.c (valpy_lazy_string): Flag bad length values.
16008 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
16009 typedefs in incoming type.
16010
a3a5fecc
DE
160112017-03-16 Doug Evans <dje@google.com>
16012
16013 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16014 * guile/scm-type.c (tyscm_scm_to_type): New function.
16015
28f1c605
JW
160162017-03-16 Jiong Wang <jiong.wang@arm.com>
16017
16018 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
16019 "ULONGEST" for "skip".
16020
87c336f6
AA
160212017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16022
16023 PR gdb/21220
16024 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
16025 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
16026 (inf_ptrace_peek_poke): ...here. New function. Now also loop
16027 over ptrace peek/poke until end of buffer or error.
16028
cf81cf60
SM
160292017-03-14 Simon Marchi <simon.marchi@ericsson.com>
16030
16031 * parse.c (length_of_subexp): Make static.
16032 * parser-defs.h (length_of_subexp): Remove.
16033
a379284a
AA
160342017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16035
16036 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
16037 as well.
16038
8a6200ba
PA
160392017-03-14 Pedro Alves <palves@redhat.com>
16040
16041 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
16042 (main): Use std::unique_ptr. Remove calls to
16043 cp_demangled_name_parse_free.
16044
f79ec206
SM
160452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16046
16047 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
16048 alphabsd_store_inferior_registers): Use regcache->ptid instead
16049 of inferior_ptid.
16050
edb5fb00
SM
160512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16052
16053 * aix-thread.c (aix_thread_fetch_registers,
16054 aix_thread_store_registers): Use regcache->ptid instead of
16055 inferior_ptid.
16056
55119686
SM
160572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16058
16059 * aarch64-linux-nat.c (fetch_gregs_from_thread,
16060 store_gregs_to_thread, fetch_fpregs_from_thread,
16061 store_fpregs_to_thread): Use regcache->ptid instead of
16062 inferior_ptid.
16063
6a06fbb7
SM
160642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16065
16066 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
16067 amd64_linux_fetch_inferior_registers): Use regcache->ptid
16068 instead of inferior_ptid.
16069
c6386875
SM
160702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16071
16072 * target.c (target_fetch_registers, target_store_registers): Add
16073 assert.
16074
ddaaf0fb
SM
160752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16076
16077 * regcache.h (regcache_get_ptid): New function.
16078 * regcache.c (regcache_get_ptid): New function.
16079
b9da89d1 160802017-03-13 Mark Wielaard <mark@klomp.org>
16081
16082 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
16083
5f4d1085
KS
160842017-03-10 Keith Seitz <keiths@redhat.com>
16085
16086 PR c++/8218
16087 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
16088
c65d6b55
PA
160892017-03-08 Pedro Alves <palves@redhat.com>
16090
16091 PR gdb/18360
16092 * infrun.c (start_step_over, do_target_resume, resume)
16093 (restart_threads): Assert we're not resuming a thread that is
16094 meant to be stopped.
16095 (infrun_thread_stop_requested_callback): Delete.
16096 (infrun_thread_stop_requested): If the thread is internally
16097 stopped, queue a pending stop event and clear the thread's
16098 inline-frame state.
16099 (handle_stop_requested): New function.
16100 (handle_syscall_event, handle_inferior_event_1): Use
16101 handle_stop_requested.
16102 (handle_stop_requested): New function.
16103 (handle_signal_stop): Set the thread's stop_signal here instead of
16104 at caller.
16105 (finish_step_over): Clear step over info unconditionally.
16106 (handle_signal_stop): If the user had interrupted the event
16107 thread, consider the stop a random signal.
16108 (handle_signal_stop) <signal arrived while stepping over
16109 breakpoint>: Don't restart threads here.
16110 (stop_waiting): Don't clear step-over info here.
16111
15c22686
PA
161122017-03-08 Pedro Alves <palves@redhat.com>
16113
16114 PR 21206
16115 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
16116 goes to argument 2, not 1.
16117
6e5d74e7
PA
161182017-03-08 Pedro Alves <palves@redhat.com>
16119
16120 PR cli/21218
16121 * top.c (gdb_readline_wrapper): Avoid passing NULL to
16122 display_gdb_prompt.
16123 (command_line_input): Add comment.
16124
9753a2f6
PA
161252017-03-08 Pedro Alves <palves@redhat.com>
16126
16127 PR tui/21216
16128 * tui/tui-file.c (tui_file::write): New.
16129 * tui/tui-file.h (tui_file): Override "write".
16130 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16131 factored out from ...
16132 (tui_puts): ... here.
16133 (tui_putc): Use them.
16134 (tui_write): New function.
16135 * tui/tui-io.h (tui_write): Declare.
16136
1672e0d9
SDJ
161372017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16138
16139 * Makefile.in (SFILES): Replace "environ.c" with
16140 "common/environ.c".
16141 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16142 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16143 to...
16144 * common/environ.c: ... here.
16145 * environ.h: Moved to...
16146 * common/environ.h: ... here.
16147
f7bb4e3a
PB
161482017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16149
16150 * gdbarch.sh (pstring_ptr): New static function.
16151 (gdbarch_disassembler_options): Use it.
16152 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16153 not valid_disassembler_option->name.
16154 * gdbarch.c: Regenerate.
16155
e45ced6c
PB
161562017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16157
16158 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16159
5f6fd321
PA
161602017-03-07 Pedro Alves <palves@redhat.com>
16161
16162 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16163
6dbb839a 161642017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
16165
16166 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16167 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16168 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 16169 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 16170
d274ecf4
SM
161712017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16172
16173 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16174
df97be55
SM
161752017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16176
16177 * remote.c (remote_add_target_side_commands): Use range-based
16178 for loop.
16179
7d45f3df
YQ
161802017-03-03 Yao Qi <yao.qi@linaro.org>
16181
16182 PR gdb/21165
16183 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16184 value is lazy.
16185 * valprint.c (common_val_print): Likewise.
16186
65b48a81
PB
161872017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16188
16189 * NEWS: Mention new set/show disassembler-options commands.
16190 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16191 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16192 (prospective_options): New static variable.
16193 (gdb_disassembler::gdb_disassembler): Initialize
16194 m_di.disassembler_options.
16195 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16196 (get_disassembler_options): New function.
16197 (set_disassembler_options): Likewise.
16198 (set_disassembler_options_sfunc): Likewise.
16199 (show_disassembler_options_sfunc): Likewise.
16200 (disassembler_options_completer): Likewise.
16201 (_initialize_disasm): Likewise.
16202 * disasm.h (get_disassembler_options): New prototype.
16203 (set_disassembler_options): Likewise.
16204 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16205 (gdbarch_verify_disassembler_options): Likewise.
16206 * gdbarch.c: Regenerate.
16207 * gdbarch.h: Likewise.
16208 * arm-tdep.c (num_disassembly_options): Delete.
16209 (set_disassembly_style): Likewise.
16210 (arm_disassembler_options): New static variable.
16211 (set_disassembly_style_sfunc): Convert short style name into long
16212 option name. Call set_disassembler_options.
16213 (show_disassembly_style_sfunc): New function.
16214 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16215 set_gdbarch_verify_disassembler_options.
16216 (_initialize_arm_tdep): Delete regnames variable and update callers.
16217 (arm_disassembler_options): Initialize.
16218 (disasm_options): New variable.
16219 (num_disassembly_options): Rename from this...
16220 (num_disassembly_styles): ...to this. Compute by scanning through
16221 disasm_options.
16222 (valid_disassembly_styles): Initialize using disasm_options.
16223 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16224 set_arm_regname_option.
16225 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16226 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16227 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16228 set_gdbarch_verify_disassembler_options.
16229 * s390-tdep.c (s390_disassembler_options): New static variable.
16230 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16231 set_gdbarch_verify_disassembler_options.
16232
d538e36d
SM
162332017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16234
16235 * remote.c (remote_add_target_side_condition): Remove "struct"
16236 keyword from range-based for loop.
16237
83621223
SM
162382017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16239
16240 * remote.c (remote_add_target_side_condition): Use range-based
16241 for loop. Update comment.
16242
2123df0e
YQ
162432017-02-27 Yao Qi <yao.qi@linaro.org>
16244
16245 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16246
8e368124
AH
162472017-02-26 Alan Hayward <alan.hayward@arm.com>
16248
16249 * regcache.c (regcache_raw_update): New function.
16250 (regcache_raw_read): Move code to regcache_raw_update.
16251 * regcache.h (regcache_raw_update): New declaration.
16252 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16253
a49dd8dd
JK
162542017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16255
16256 * dwarf2read.c (create_debug_type_hash_table): Initialize
16257 header.signature and header.type_offset_in_tu.
16258
34e4bae9
PA
162592017-02-24 Pedro Alves <palves@redhat.com>
16260
16261 * symtab.c (make_file_symbol_completion_list_1): Use
16262 add_symtab_completions.
16263
b0e4b369
AH
162642017-02-24 Alan Hayward <alan.hayward@arm.com>
16265
16266 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16267
975c21ab
AH
162682017-02-24 Alan Hayward <alan.hayward@arm.com>
16269
16270 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16271 I386_MAX_REGISTER_SIZE.
16272 (i386_pseudo_register_write): Likewise.
16273 (i386_process_record): Likewise.
16274 * i387-tdep.c (i387_supply_xsave): Likewise.
16275 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16276 (store_register): Likewise.
16277
14bc53a8
PA
162782017-02-23 Pedro Alves <palves@redhat.com>
16279
16280 * ada-lang.c: Include "common/function-view.h".
16281 (ada_iterate_over_symbols): Adjust to use function_view as
16282 callback type.
16283 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16284 (ada_make_symbol_completion_list): Use a lambda.
16285 (ada_exc_search_name_matches): Delete.
16286 (name_matches_regex): New.
16287 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16288 * compile/compile-c-support.c: Include "common/function-view.h".
16289 (print_one_macro): Change prototype to accept a ui_file pointer.
16290 (write_macro_definitions): Use a lambda.
16291 * dwarf2read.c: Include "common/function-view.h".
16292 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16293 (dw2_expand_symtabs_matching): Adjust to use function_view as
16294 callback type.
16295 * language.h: Include "common/function-view.h".
16296 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16297 function_view as callback type.
16298 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16299 * linespec.c: Include "common/function-view.h".
16300 (collect_info::add_symbol): New method.
16301 (struct symbol_and_data_callback, iterate_inline_only, struct
16302 symbol_matcher_data, iterate_name_matcher): Delete.
16303 (iterate_over_all_matching_symtabs): Adjust to use function_view
16304 as callback type and lambdas.
16305 (iterate_over_file_blocks): Adjust to use function_view as
16306 callback type.
16307 (decode_compound_collector): Now a class with private fields.
16308 (decode_compound_collector::release_symbols): New method.
16309 (collect_one_symbol): Rename to...
16310 (decode_compound_collector::operator()): ... this and adjust.
16311 (lookup_prefix_sym): decode_compound_collector construction bits
16312 move to decode_compound_collector ctor. Pass the
16313 decode_compound_collector object directly as callback. Remove
16314 cleanups and use decode_compound_collector::release_symbols
16315 instead.
16316 (symtab_collector): Now a class with private fields.
16317 (symtab_collector::release_symtabs): New method.
16318 (add_symtabs_to_list): Rename to...
16319 (symtab_collector::operator()): ... this and adjust.
16320 (collect_symtabs_from_filename): symtab_collector construction
16321 bits move to symtab_collector ctor. Pass the symtab_collector
16322 object directly as callback. Remove cleanups and use
16323 symtab_collector::release_symtabs instead.
16324 (collect_symbols): Delete.
16325 (add_matching_symbols_to_info): Use lambdas.
16326 * macrocmd.c (print_macro_callback): Delete.
16327 (info_macro_command): Use a lambda.
16328 (info_macros_command): Pass print_macro_definition as callable
16329 directly.
16330 (print_one_macro): Remove 'ignore' parameter.
16331 (macro_list_command): Adjust.
16332 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16333 (macro_for_each_data::user_data): Delete field.
16334 (foreach_macro): Adjust to call the function_view.
16335 (macro_for_each): Adjust to use function_view as callback type.
16336 (foreach_macro_in_scope): Adjust to call the function_view.
16337 (macro_for_each_in_scope): Adjust to use function_view as callback
16338 type.
16339 * macrotab.h: Include "common/function-view.h".
16340 (macro_callback_fn): Declare a prototype instead of a pointer.
16341 Remove "user_data" parameter.
16342 (macro_for_each, macro_for_each_in_scope): Adjust to use
16343 function_view as callback type.
16344 * psymtab.c (partial_map_expand_apply)
16345 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16346 Adjust to use function_view as callback type and to return bool.
16347 (psym_expand_symtabs_matching): Adjust to use function_view as
16348 callback types.
16349 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16350 to use function_view as callback type and to return bool.
16351 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16352 callback types.
16353 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16354 as callback types.
16355 * symfile.h: Include "common/function-view.h".
16356 (expand_symtabs_file_matcher_ftype)
16357 (expand_symtabs_symbol_matcher_ftype)
16358 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16359 return bool.
16360 (quick_symbol_functions::map_symtabs_matching_filename)
16361 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16362 function_view as callback type and return bool.
16363 (expand_symtabs_matching): Adjust to use function_view as callback
16364 type.
16365 (maintenance_expand_name_matcher)
16366 (maintenance_expand_file_matcher): Delete.
16367 (maintenance_expand_symtabs): Use lambdas.
16368 * symtab.c (iterate_over_some_symtabs): Adjust to use
16369 function_view as callback types and return bool.
16370 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16371 of a cleanup.
16372 (lookup_symtab_callback): Delete.
16373 (lookup_symtab): Use a lambda.
16374 (iterate_over_symbols): Adjust to use function_view as callback
16375 type.
16376 (struct search_symbols_data, search_symbols_file_matches)
16377 (search_symbols_name_matches): Delete.
16378 (search_symbols): Use a pair of lambdas.
16379 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16380 (symtab_expansion_callback): Delete.
16381 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16382 * symtab.h: Include "common/function-view.h".
16383 (iterate_over_some_symtabs): Adjust to use function_view as
16384 callback type and return bool.
16385 (iterate_over_symtabs): Adjust to use function_view as callback
16386 type.
16387 (symbol_found_callback_ftype): Remove 'data' parameter and return
16388 bool.
16389 (iterate_over_symbols): Adjust to use function_view as callback
16390 type.
16391
07e253aa
PA
163922017-02-23 Pedro Alves <palves@redhat.com>
16393
16394 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16395 (%.o) <unittests/%.c>: New pattern.
16396 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16397 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16398 * common/function-view.h: New file.
16399 * unittests/function-view-selftests.c: New file.
16400 * configure: Regenerate.
16401
8eaf5320
SM
164022017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16403
16404 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16405 inferior_ptid.
16406 * go32-nat.c (go32_thread_alive): Likewise.
16407
38768751
YQ
164082017-02-23 Yao Qi <yao.qi@linaro.org>
16409
16410 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16411 delete.
16412
0a8beaba
YQ
164132017-02-23 Yao Qi <yao.qi@linaro.org>
16414
16415 * varobj.c (varobj_clear_saved_item): Use delete instead of
16416 xfree.
16417 (update_dynamic_varobj_children): Likewise.
16418
58fdfd2c
JK
164192017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16420
16421 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16422
1b90b139
SM
164232017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16424
16425 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16426 m_enum_value to 0 in default constructor.
16427
2039d74e
EBM
164282017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16429
16430 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16431 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16432 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16433 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16434 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16435 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16436 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16437 IS_STORE_CONDITIONAL_INSN.
16438
7814882a
JK
164392017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16440
16441 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16442
0ae60b63
JK
164432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16444
16445 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16446
0224619f
JK
164472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16448
16449 * dwarf2read.c (skip_one_die, read_attribute_value)
16450 (dwarf2_const_value_attr, dump_die_shallow)
16451 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16452 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16453
0af92d60
JK
164542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16455
16456 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16457 (dwarf_parse_macro_header): Accept DWARF version 5.
16458 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16459
216f72a1
JK
164602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16461
16462 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16463 DW_AT_GNU_*.
16464 * common/common-exceptions.h (enum errors): Likewise.
16465 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16466 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16467 (dwarf_expr_context::execute_stack_op): Likewise.
16468 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16469 Likewise.
16470 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16471 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16472 (show_entry_values_debug, call_site_to_target_addr)
16473 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16474 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16475 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16476 (value_of_dwarf_block_entry, indirect_pieced_value)
16477 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16478 (disassemble_dwarf_expression): Likewise.
16479 * dwarf2read.c (process_die, inherit_abstract_dies)
16480 (read_call_site_scope): Likewise.
16481 * gdbtypes.h (struct func_type, struct call_site_parameter)
16482 (struct call_site): Likewise.
16483 * stack.c (read_frame_arg): Likewise.
16484 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16485
43988095
JK
164862017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16487
16488 * defs.h (read_unsigned_leb128): New declaration.
16489 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16490 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16491 (dwarf2_find_location_expression): Call also
16492 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16493 * dwarf2loc.h (dwarf2_version): New declaration.
16494 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16495 rnglists.
16496 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16497 .debug_rnglists.
16498 (struct dwop_section_names): Add loclists_dwo.
16499 (dwop_section_names): Add .debug_loclists.dwo.
16500 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16501 (struct dwarf2_per_cu_data): Add dwarf_version.
16502 (struct dwo_sections): Add loclists.
16503 (struct attr_abbrev): Add implicit_const.
16504 (read_indirect_line_string): New declaration.
16505 (read_unsigned_leb128): Delete declaration.
16506 (rcuh_kind): New definition.
16507 (read_and_check_comp_unit_head): Change parameter
16508 is_debug_types_section to section_kind.
16509 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16510 (read_comp_unit_head): Change parameter abfd to section, add parameter
16511 section_kind. Handle DWARF-5.
16512 (error_check_comp_unit_head): Accept also DWARF version 5.
16513 (read_and_check_comp_unit_head): Change parameter
16514 is_debug_types_section to section_kind.
16515 (read_and_check_type_unit_head): Delete function.
16516 (read_abbrev_offset): Handle DWARF-5.
16517 (create_debug_type_hash_table): Add parameter section_kind. Process
16518 only DW_UT_type. Use signature and type_offset_in_tu from struct
16519 comp_unit_head.
16520 (create_debug_types_hash_table): Update create_debug_type_hash_table
16521 caller.
16522 (create_all_type_units): Call create_debug_type_hash_table.
16523 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16524 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16525 caller.
16526 (skip_one_die): Handle DW_FORM_implicit_const.
16527 (dwarf2_rnglists_process): New function.
16528 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16529 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16530 (read_attribute_value): Handle DW_FORM_implicit_const,
16531 DW_FORM_line_strp.
16532 (read_attribute): Handle DW_FORM_implicit_const.
16533 (read_indirect_string_at_offset_from): New function from
16534 read_indirect_string_at_offset.
16535 (read_indirect_string_at_offset): Call
16536 read_indirect_string_at_offset_from.
16537 (read_indirect_line_string_at_offset): New function.
16538 (read_indirect_string): New function comment.
16539 (read_indirect_line_string): New function.
16540 (read_unsigned_leb128): Make it global.
16541 (dwarf2_string_attr): Handle DWARF-5.
16542 (add_include_dir_stub, read_formatted_entries): New functions.
16543 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16544 Handle DWARF-5.
16545 (per_cu_header_read_in): Update read_comp_unit_head caller.
16546 (dwarf2_version): New function.
16547 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16548 rnglists.
16549 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16550 fields.
16551
22d2f3ab
JK
165522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16553
16554 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16555
5f46c5a5
JK
165562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16557
16558 * dwarf2read.c (dwarf2_ranges_process): New function from
16559 dwarf2_ranges_read.
16560 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16561 dwarf2_ranges_process.
16562
78d4d2c5
JK
165632017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16564
16565 * dwarf2read.c (create_debug_type_hash_table): New function from
16566 create_debug_types_hash_table.
16567 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16568 (create_all_type_units, open_and_init_dwo_file): Update
16569 create_debug_types_hash_table callers.
16570
1b076f25
SDJ
165712017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16572
16573 PR gdb/16188
16574 * fork-child.c (trace_start_error): Fix thinko. va_end should
16575 refer to 'ap', not 'args'.
16576
0db8980c
SDJ
165772017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16578 Pedro Alves <palves@redhat.com>
16579
16580 PR gdb/16188
16581 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16582 calls succeeded.
16583 * fork-child.c (trace_start_error): New function.
16584 (trace_start_error_with_name): Likewise.
16585 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16586 * inf-ptrace.c (inf_ptrace_me): Likewise.
16587 * inferior.h (trace_start_error): New prototype.
16588 (trace_start_error_with_name): Likewise.
16589
99e8a4f9
SDJ
165902017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16591
16592 PR gdb/21164
16593 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16594 NULL before using it.
16595 * symmisc.c (maintenance_print_symbols): Likewise.
16596 (maintenance_print_msymbols): Likewise.
16597
4e746bb6
TW
165982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16599
16600 * NEWS: Add record Python bindings entry.
16601
166022017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16603
16604 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16605 py-record-full.o.
16606 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16607 * python/py-record-btrace.c, python/py-record-btrace.h,
16608 python/py-record-full.c, python/py-record-full.h: New file.
16609 * python/py-record.c: Add include for py-record-btrace.h and
16610 py-record-full.h.
16611 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16612 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16613 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16614 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16615 New definition.
16616 (gdbpy_initialize_btrace): New export.
16617 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16618
166192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16620
16621 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16622 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16623 * python/py-record.c: New file.
16624 * python/python-internal.h (gdbpy_start_recording,
16625 gdbpy_current_recording, gdpy_stop_recording,
16626 gdbpy_initialize_record): New export.
16627 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16628 (python_GdbMethods): Add gdbpy_start_recording,
16629 gdbpy_current_recording and gdbpy_stop_recording.
16630
166312017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16632
16633 * record-btrace.c (record_btrace_record_method): New function.
16634 (init_record_btrace_ops): Initialize to_record_method.
16635 * record-full.c (record_full_record_method): New function.
16636 (init_record_full_ops, init_record_full_core_ops): Add
16637 record_full_record_method.
16638 * record.h (enum record_method): New enum.
16639 * target-debug.h (target_debug_print_enum_record_method: New define.
16640 * target-delegates.c: Regenerate.
16641 * target.c (target_record_method): New function.
16642 * target.h: Include record.h.
16643 (struct target_ops) <to_record_method>: New field.
16644 (target_record_method): New export.
16645
166462017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16647
16648 * record.h (record_start, record_stop): New export.
16649 * record.c (record_start, record_stop): New function.
16650
166512017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16652
16653 * btrace.c (btrace_fetch): Copy function call segments pointer
16654 into a vector.
16655 (btrace_clear): Clear the vector.
16656 (btrace_find_insn_by_number): Use binary search to find the correct
16657 function call segment.
16658 * btrace.h (brace_fun_p): New typedef.
16659 (struct btrace_thread_info) <functions>: New field.
16660
166612017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16662
16663 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16664 * btrace.c (btrace_decode_error): ... here. New function.
16665 * btrace.h (btrace_decode_error): New export.
16666
166672017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16668
16669 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16670 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16671 btrace_find_insn_by_number): Remove special case for gaps.
16672 * btrace.h (btrace_insn_get_error): New export.
16673 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16674 * record-btrace.c (btrace_insn_history): Print number for gaps.
16675 (record_btrace_info, record_btrace_goto): Handle gaps.
16676
3f77c769
TT
166772017-02-14 Tom Tromey <tom@tromey.com>
16678
16679 PR python/13598:
16680 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16681 event.
16682 * python/py-evts.c (gdbpy_initialize_py_events): Add
16683 before_prompt registry.
16684 * python/py-events.h (events_object) <before_prompt>: New field.
16685
4c2c7ac6
MM
166862017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16687
16688 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16689
5cf30ebf
LM
166902017-02-13 Luis Machado <lgustavo@codesourcery.com>
16691
16692 * symfile (_initialize_symfile): Add usage text to the load command's
16693 help text.
16694
26a06916
SM
166952017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16696
16697 * utils.c (defaulted_query): Don't query on secondary UIs.
16698
0b145e37
TT
166992017-02-10 Tom Tromey <tom@tromey.com>
16700
16701 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16702
2d8365c4
TT
167032017-02-10 Tom Tromey <tom@tromey.com>
16704
16705 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16706 "cleanup" local.
16707 * python/py-type.c (typy_legacy_template_argument): Remove
16708 unnecessary "cleanup" local.
16709
2bb8f231
TT
167102017-02-10 Tom Tromey <tom@tromey.com>
16711
16712 * python/python.c (do_start_initialization): New function, from
16713 _initialize_python.
16714 (_initialize_python): Call do_start_initialization.
16715 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16716 goto.
16717
1bdfaf42
TT
167182017-02-10 Tom Tromey <tom@tromey.com>
16719
16720 * python/py-prettyprint.c (pretty_print_one_value): Use
16721 gdbpy_ref.
16722
88b6faea
TT
167232017-02-10 Tom Tromey <tom@tromey.com>
16724
16725 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16726 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16727 gdbpy_ref.
16728 * python/py-type.c (field_new): Use gdbpy_ref.
16729 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16730 gdbpy_ref.
16731 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16732 (py_free_pspace): Likewise.
16733 (pspace_to_pspace_object): Likewise.
16734 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16735 (py_free_objfile): Likewise.
16736 (objfile_to_objfile_object): Likewise.
16737 * python/py-inferior.c (delete_thread_object): Use
16738 gdbpy_ref.
16739 (infpy_read_memory): Likewise.
16740 (py_free_inferior): Likewise.
16741 * python/py-evtregistry.c (create_eventregistry_object): Use
16742 gdbpy_ref.
16743 * python/py-event.c (create_event_object): Use gdbpy_ref.
16744
7780f186
TT
167452017-02-10 Tom Tromey <tom@tromey.com>
16746
16747 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16748 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16749 used.
16750 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16751 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16752 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16753 python/py-framefilter.c, python/py-function.c,
16754 python/py-inferior.c, python/py-infevents.c,
16755 python/py-linetable.c, python/py-newobjfileevent.c,
16756 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16757 python/py-signalevent.c, python/py-stopevent.c,
16758 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16759 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16760 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16761 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16762
d4b0bb18
TT
167632017-02-10 Tom Tromey <tom@tromey.com>
16764
16765 * ui-out.h (ui_out_emit_type): New class.
16766 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16767 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16768 and ui_out_emit_tuple.
16769 (enumerate_locals): Likewise.
16770 (py_mi_print_variables, py_print_locals, py_print_args): Use
16771 ui_out_emit_list.
16772 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16773 ui_out_emit_list.
16774 * common/gdb_optional.h: New file.
16775
f67f945c
MG
167762017-02-10 Martin Galvan <martingalvan@sourceware.org>
16777
16778 * MAINTAINERS (Write After Approval): Update my e-mail address.
16779
18da0c51
MG
167802017-02-10 Martin Galvan <martingalvan@sourceware.org>
16781
16782 PR gdb/21122
16783 * breakpoint.c (_initialize_breakpoint): Update the help description
16784 of the 'commands' command to indicate that it takes a list argument.
16785
62c14536
SM
167862017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16787
16788 * interps.c (current_interp_set_logging): Remove "return".
16789
ff6fa247
GB
167902017-02-09 Gary Benson <gbenson@redhat.com>
16791
16792 * symtab.c (add_symtab_completions): Prevent NULL pointer
16793 dereference.
16794
a474bd8e
PA
167952017-02-08 Pedro Alves <palves@redhat.com>
16796
16797 * interps.c (interp::interp): Remove reference to quiet_p.
16798 (interp_set): Make static. Remove dead "Switching to" output
16799 code.
16800 (interp_quiet_p, interp_set_quiet): Delete.
16801 (interpreter_exec_cmd): Don't set the interpreter quiet.
16802 * interps.h (interp_quiet_p): Make static.
16803 (class interp) <quiet_p>: Remove field
16804
3d7b173c
JG
168052017-02-08 Jerome Guitton <guitton@adacore.com>
16806
604c4576
JG
16807 * cli/cli-decode.c (find_command_name_length): Make it extern.
16808 * cli/cli-decode.h (find_command_name_length): Declare.
16809 * cli/cli-script.c (command_name_equals, line_first_arg):
16810 New functions.
16811 (process_next_line): Use cli-decode to parse command names.
16812 (build_command_line): Make args a constant pointer.
16813
168142017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 16815
3d7b173c
JG
16816 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16817 Remove case-insensitive search.
16818
1291063d
JM
168192017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16820
16821 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16822 at the end of the line. Avoids an ARI warning.
16823
20b477a7
LM
168242017-02-06 Luis Machado <lgustavo@codesourcery.com>
16825
16826 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16827 rdseed instructions.
16828 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16829
3f7b46f2
IR
168302017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16831
16832 PR tdep/20936
16833 Provide and use sparc32 and sparc64 target description XML files.
16834 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16835 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16836 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16837 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16838 * features/sparc/sparc32-solaris.xml: New file.
16839 * features/sparc/sparc64-solaris.xml: New file.
16840 * features/sparc/sparc32-solaris.c: Generated.
16841 * features/sparc/sparc64-solaris.c: Generated.
16842 * sparc-tdep.h: Account for differences in target descriptions.
16843 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16844 (sparc32_register_type): Use target provided registers.
16845 (validate_tdesc_registers): New function.
16846 (sparc32_gdbarch_init): Use tdesc_has_registers.
16847 Set pseudoregister functions.
16848 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16849 (sparc64_register_type): Use target provided registers.
16850 (sparc64_init_abi): Set pseudoregister functions.
16851
f0fd41c1
TT
168522017-02-03 Tom Tromey <tom@tromey.com>
16853
16854 PR rust/21097:
16855 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16856 with a single member.
16857
d6f9b0fb
PA
168582017-02-03 Pedro Alves <palves@redhat.com>
16859
16860 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16861 (cli_interp_base::~cli_interp_base): New.
16862 (cli_interp): New struct.
16863 (as_cli_interp): Cast the interp itself to cli_interp.
16864 (cli_interpreter_pre_command_loop): Rename to ...
16865 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16866 parameter.
16867 (cli_interpreter_init): Rename to ...
16868 (cli_interp::init): ... this. Remove 'self' parameter. Use
16869 boolean. Make extern.
16870 (cli_interpreter_resume): Rename to ...
16871 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16872 extern.
16873 (cli_interpreter_suspend): Rename to ...
16874 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16875 extern.
16876 (cli_interpreter_exec): Rename to ...
16877 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16878 extern.
16879 (cli_interpreter_supports_command_editing): Rename to ...
16880 (cli_interp_base::supports_command_editing): ... this. Remove
16881 'interp' parameter. Make extern.
16882 (cli_ui_out): Rename to ...
16883 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16884 Make extern.
16885 (cli_set_logging): Rename to ...
16886 (cli_interp_base::set_logging): ... this. Remove 'interp'
16887 parameter. Make extern.
16888 (cli_interp_procs): Delete.
16889 (cli_interp_factory): Adjust to use "new".
16890 * cli/cli-interp.h: Include "interps.h".
16891 (struct cli_interp_base): New struct.
16892 * interps.c (struct interp): Delete. Fields moved to interps.h.
16893 (interp_new): Delete.
16894 (interp::interp, interp::~interp): New.
16895 (interp_set): Use bool, and return void. Assume the interpreter
16896 has suspend, init and resume methods, and that the all return
16897 void.
16898 (set_top_level_interpreter): interp_set returns void.
16899 (interp_ui_out): Adapt.
16900 (current_interp_set_logging): Adapt.
16901 (interp_data): Delete.
16902 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16903 (interp_exec): Adapt.
16904 (top_level_interpreter_data): Delete.
16905 * interps.h (interp_init_ftype, interp_resume_ftype)
16906 (interp_suspend_ftype, interp_exec_ftype)
16907 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16908 (class interp): New.
16909 (interp_new): Delete.
16910 (interp_set): Now returns void. Use bool.
16911 (interp_data, top_level_interpreter_data): Delete.
16912 * mi/mi-common.h: Include interps.h.
16913 (class mi_interp): Inherit from interp. Define a ctor. Declare
16914 init, resume, suspect, exec, interp_ui_out, set_logging and
16915 pre_command_loop methods.
16916 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16917 (mi_interpreter_init): Rename to ...
16918 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16919 bool, return void and make extern. Adjust.
16920 (mi_interpreter_resume): ... Rename to ...
16921 (mi_interp::resume): ... this. Remove the 'data' parameter,
16922 return void and make extern. Adjust.
16923 (mi_interpreter_suspend): ... Rename to ...
16924 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16925 return void and make extern. Adjust.
16926 (mi_interpreter_exec): ... Rename to ...
16927 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16928 extern. Adjust.
16929 (mi_interpreter_pre_command_loop): ... Rename to ...
16930 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16931 parameter and make extern.
16932 (mi_on_normal_stop_1): Adjust.
16933 (mi_ui_out): Rename to ...
16934 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16935 parameter and make extern. Adjust.
16936 (mi_set_logging): Rename to ...
16937 (mi_interp::set_logging): ... this. Remove the 'interp'
16938 parameter and make extern. Adjust.
16939 (mi_interp_procs): Delete.
16940 (mi_interp_factory): Adjust to use 'new'.
16941 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16942 (mi_print_exception, mi_execute_command, mi_load_progress):
16943 Adjust.
16944 * tui/tui-interp.c (tui_interp): New class.
16945 (as_tui_interp): Return a tui_interp pointer.
16946 (tui_on_normal_stop, tui_on_signal_received)
16947 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16948 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16949 to use interp::interp_ui_out.
16950 (tui_init): Rename to ...
16951 (tui_interp::init): ... this. Remove the 'self' parameter, use
16952 bool, return void and make extern. Adjust.
16953 (tui_resume): Rename to ...
16954 (tui_interp::resume): ... this. Remove the 'data' parameter,
16955 return void and make extern. Adjust.
16956 (tui_suspend): Rename to ...
16957 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16958 return void and make extern. Adjust.
16959 (tui_ui_out): Rename to ...
16960 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16961 parameter, and make extern. Adjust.
16962 (tui_exec): Rename to ...
16963 (tui_interp::exec): ... this. Remove the 'data' parameter and
16964 make extern.
16965 (tui_interp_procs): Delete.
16966 (tui_interp_factory): Use "new".
16967
65c40c95
TT
169682017-02-02 Tom Tromey <tom@tromey.com>
16969
16970 * rust-exp.y (ends_raw_string, space_then_number)
16971 (rust_identifier_start_p): Return bool.
16972 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16973 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16974 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16975 (rust_chartype_p): Return bool.
16976 (val_print_struct, rust_print_struct_def, rust_print_type):
16977 Update.
16978 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16979 Return bool.
16980
b50f188d
TT
169812017-02-02 Tom Tromey <tom@tromey.com>
16982
16983 * rust-lang.c: Reindent.
16984
03c85b11
TT
169852017-02-02 Tom Tromey <tom@tromey.com>
16986
16987 * rust-lang.h (rust_crate_for_block): Update.
16988 * rust-lang.c (rust_crate_for_block): Return std::string.
16989 (rust_get_disr_info): Use std:;string, not
16990 gdb::unique_xmalloc_ptr.
16991 * rust-exp.y (crate_name): Update.
16992
9b6da501
PA
169932017-02-02 Pedro Alves <palves@redhat.com>
16994
16995 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16996 field out of gdb_disassembler_test and make it static.
16997
ec4cb20b
PA
169982017-02-02 Pedro Alves <palves@redhat.com>
16999
17000 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
17001 mi1_interp and mi_interp fields.
17002
5be5dbf0
PA
170032017-02-02 Pedro Alves <palves@redhat.com>
17004
616268b6
PA
17005 * cli/cli-interp.c (struct saved_output_files, saved_output):
17006 Moved from cli/cli-logging.c.
17007 (cli_set_logging): New function.
17008 (cli_interp_procs): Install cli_set_logging.
17009 * cli/cli-interp.h (make_logging_output, cli_set_logging):
17010 Declare.
17011 * cli/cli-logging.c (struct saved_output_files, saved_output):
17012 Moved to cli/cli-interp.c.
17013 (pop_output_files): Don't save outputs here.
17014 (make_logging_output): New function.
17015 (handle_redirections): Don't build tee nor save previous outputs
17016 here.
17017 * interps.c (current_interp_set_logging): Change prototype.
17018 Assume there's always a set_logging_proc method installed.
17019 * interps.h (interp_set_logging_ftype): Change prototype.
17020 (current_interp_set_logging): Change prototype and adjust comment.
17021 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
17022 use make_logging_output.
17023 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
170242017-02-02 Pedro Alves <palves@redhat.com>
17025
5be5dbf0
PA
17026 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
17027 from ...
17028 (set_logging_overwrite): ... here.
17029 (logging_no_redirect_file): Delete.
17030 (set_logging_redirect): Don't handle redirection on the fly.
17031 Instead warn that "logging off" / "logging on" is necessary.
17032 (pop_output_files): Delete references to logging_no_redirect_file.
17033 (show_logging_command): Always speak in terms of what will happen
17034 once logging is reenabled.
17035
c99cc448
PA
170362017-02-02 Pedro Alves <palves@redhat.com>
17037
17038 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
17039
8b172ce7
PA
170402017-02-02 Pedro Alves <palves@redhat.com>
17041
17042 * disasm.c (gdb_pretty_print_insn): Rename to ...
17043 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
17044 Remove gdbarch parameter. Adapt to clear the object's buffers
17045 instead of allocating new buffers, and to print using the object's
17046 gdb_disassembler instead of calling gdb_print_insn.
17047 (dump_insns): Use gdb_pretty_print_disassembler.
17048 * disasm.h (gdb_pretty_print_insn): Delete declaration.
17049 (gdb_pretty_print_disassembler): New class.
17050 * record-btrace.c (btrace_insn_history): Use
17051 gdb_pretty_print_disassembler.
17052
d7e74731
PA
170532017-02-02 Pedro Alves <palves@redhat.com>
17054
17055 * ada-lang.c (type_as_string): Use string_file.
17056 * ada-valprint.c (ada_print_floating): Use string_file.
17057 * ada-varobj.c (ada_varobj_scalar_image)
17058 (ada_varobj_get_value_image): Use string_file.
17059 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
17060 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
17061 * breakpoint.c (update_inserted_breakpoint_locations)
17062 (insert_breakpoint_locations, reattach_breakpoints)
17063 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
17064 (print_it_watchpoint): Use string_file.
17065 (save_breakpoints): Use stdio_file.
17066 * c-exp.y (oper): Use string_file.
17067 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
17068 tee_file.
17069 (pop_output_files): Use delete.
17070 (handle_redirections): Use stdio_file and tee_file.
17071 * cli/cli-setshow.c (do_show_command): Use string_file.
17072 * compile/compile-c-support.c (c_compute_program): Use
17073 string_file.
17074 * compile/compile-c-symbols.c (generate_vla_size): Take a
17075 'string_file &' instead of a 'ui_file *'.
17076 (generate_c_for_for_one_variable): Take a 'string_file &' instead
17077 of a 'ui_file *'. Use string_file.
17078 (generate_c_for_variable_locations): Take a 'string_file &'
17079 instead of a 'ui_file *'.
17080 * compile/compile-internal.h (generate_c_for_for_one_variable):
17081 Take a 'string_file &' instead of a 'ui_file *'.
17082 * compile/compile-loc2c.c (push, pushf, unary, binary)
17083 (print_label, pushf_register_address, pushf_register)
17084 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
17085 'ui_file *'. Adjust.
17086 * compile/compile.c (compile_to_object): Use string_file.
17087 * compile/compile.h (compile_dwarf_expr_to_c)
17088 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
17089 'ui_file *'.
17090 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
17091 (replace_typedefs_qualified_name): Use string_file and
17092 obstack_copy0.
17093 * disasm.c (gdb_pretty_print_insn): Use string_file.
17094 (gdb_disassembly): Adjust reference the null_stream global.
17095 (do_ui_file_delete): Delete.
17096 (gdb_insn_length): Use null_stream.
17097 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
17098 * dwarf2loc.c (dwarf2_compile_property_to_c)
17099 (locexpr_generate_c_location, loclist_generate_c_location): Take a
17100 'string_file &' instead of a 'ui_file *'.
17101 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
17102 * dwarf2read.c (do_ui_file_peek_last): Delete.
17103 (dwarf2_compute_name): Use string_file.
17104 * event-top.c (gdb_setup_readline): Use stdio_file.
17105 * gdbarch.sh (verify_gdbarch): Use string_file.
17106 * gdbtypes.c (safe_parse_type): Use null_stream.
17107 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
17108 string_file.
17109 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
17110 'string_file *' instead of a 'ui_file *'.
17111 (gdbscm_arch_disassemble): Use string_file.
17112 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
17113 * guile/scm-ports.c (class ioscm_file_port): Now a class that
17114 inherits from ui_file.
17115 (ioscm_file_port_delete, ioscm_file_port_rewind)
17116 (ioscm_file_port_put): Delete.
17117 (ioscm_file_port_write): Rename to ...
17118 (ioscm_file_port::write): ... this. Remove file_port_magic
17119 checks.
17120 (ioscm_file_port_new): Delete.
17121 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
17122 ui_file_up.
17123 * guile/scm-type.c (tyscm_type_name): Use string_file.
17124 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
17125 Use string_file.
17126 * infcmd.c (print_return_value_1): Use string_file.
17127 * infrun.c (print_target_wait_results): Use string_file.
17128 * language.c (add_language): Use string_file.
17129 * location.c (explicit_to_string_internal): Use string_file.
17130 * main.c (captured_main_1): Use null_file.
17131 * maint.c (maintenance_print_architecture): Use stdio_file.
17132 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17133 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17134 event_channel>: Change type to mi_console_file pointer.
17135 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17136 (mi_console_file_delete): Delete.
17137 (struct mi_console_file): Delete.
17138 (mi_console_file_magic): Delete.
17139 (mi_console_file_new): Delete.
17140 (mi_console_file::mi_console_file): New.
17141 (mi_console_file_delete): Delete.
17142 (mi_console_file_fputs): Delete.
17143 (mi_console_file::write): New.
17144 (mi_console_raw_packet): Delete.
17145 (mi_console_file::flush): New.
17146 (mi_console_file_flush): Delete.
17147 (mi_console_set_raw): Rename to ...
17148 (mi_console_file::set_raw): ... this.
17149 * mi/mi-console.h (class mi_console_file): New class.
17150 (mi_console_file_new, mi_console_set_raw): Delete.
17151 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17152 (mi_set_logging): Use delete and tee_file. Adjust.
17153 * mi/mi-main.c (output_register): Use string_file.
17154 (mi_cmd_data_evaluate_expression): Use string_file.
17155 (mi_cmd_data_read_memory): Use string_file.
17156 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17157 * mi/mi-out.c (mi_ui_out::main_stream): New.
17158 (mi_ui_out::rewind): Use main_stream and
17159 string_file.
17160 (mi_ui_out::put): Use main_stream and string_file.
17161 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17162 Allocate a 'string_file' instead.
17163 (mi_out_new): Don't allocate a mem_fileopen stream here.
17164 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17165 (mi_ui_out::main_stream): Declare method.
17166 * printcmd.c (eval_command): Use string_file.
17167 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17168 * python/py-arch.c (archpy_disassemble): Use string_file.
17169 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17170 * python/py-frame.c (frapy_str): Use string_file.
17171 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17172 Use string_file.
17173 * python/py-type.c (typy_str): Use string_file.
17174 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17175 * python/py-value.c (valpy_str): Use string_file.
17176 * record-btrace.c (btrace_insn_history): Use string_file.
17177 * regcache.c (regcache_print): Use stdio_file.
17178 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17179 * remote.c (escape_buffer): Use string_file.
17180 * rust-lang.c (rust_get_disr_info): Use string_file.
17181 * serial.c (serial_open_ops_1): Use stdio_file.
17182 (do_serial_close): Use delete.
17183 * stack.c (print_frame_arg): Use string_file.
17184 (print_frame_args): Remove local mem_fileopen stream, not used.
17185 (print_frame): Use string_file.
17186 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17187 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17188 Take a 'string_file *' instead of a 'ui_file *'.
17189 * top.c (new_ui): Use stdio_file and stderr_file.
17190 (free_ui): Use delete.
17191 (execute_command_to_string): Use string_file.
17192 (quit_confirm): Use string_file.
17193 * tracepoint.c (collection_list::append_exp): Use string_file.
17194 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17195 * tui/tui-file.c: Don't include "ui-file.h".
17196 (enum streamtype, struct tui_stream): Delete.
17197 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17198 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17199 (tui_file::tui_file): New method.
17200 (tui_file_fputs): Delete.
17201 (tui_file_get_strbuf): Delete.
17202 (tui_file::puts): New method.
17203 (tui_file_adjust_strbuf): Delete.
17204 (tui_file_flush): Delete.
17205 (tui_file::flush): New method.
17206 * tui/tui-file.h: Tweak intro comment.
17207 Include ui-file.h.
17208 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17209 (tui_file_adjust_strbuf): Delete declarations.
17210 (class tui_file): New class.
17211 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17212 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17213 (tui_register_format): Use string_stream.
17214 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17215 (tui_get_function_from_frame): Use string_file.
17216 * typeprint.c (type_to_string): Use string_file.
17217 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17218 (null_stream): New global.
17219 (ui_file_delete): Delete.
17220 (ui_file::ui_file): New.
17221 (null_file_isatty): Delete.
17222 (ui_file::~ui_file): New.
17223 (null_file_rewind): Delete.
17224 (ui_file::printf): New.
17225 (null_file_put): Delete.
17226 (null_file_flush): Delete.
17227 (ui_file::putstr): New.
17228 (null_file_write): Delete.
17229 (ui_file::putstrn): New.
17230 (null_file_read): Delete.
17231 (ui_file::putc): New.
17232 (null_file_fputs): Delete.
17233 (null_file_write_async_safe): Delete.
17234 (ui_file::vprintf): New.
17235 (null_file_delete): Delete.
17236 (null_file::write): New.
17237 (null_file_fseek): Delete.
17238 (null_file::puts): New.
17239 (ui_file_data): Delete.
17240 (null_file::write_async_safe): New.
17241 (gdb_flush, ui_file_isatty): Adjust.
17242 (ui_file_put, ui_file_rewind): Delete.
17243 (ui_file_write): Adjust.
17244 (ui_file_write_for_put): Delete.
17245 (ui_file_write_async_safe, ui_file_read): Adjust.
17246 (ui_file_fseek): Delete.
17247 (fputs_unfiltered): Adjust.
17248 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17249 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17250 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17251 (set_ui_file_data): Delete.
17252 (string_file::~string_file, string_file::write)
17253 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17254 (do_ui_file_as_string, ui_file_as_string): Delete.
17255 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17256 (struct mem_file): Delete.
17257 (mem_file_new): Delete.
17258 (stdio_file::stdio_file): New.
17259 (mem_file_delete): Delete.
17260 (stdio_file::stdio_file): New.
17261 (mem_fileopen): Delete.
17262 (stdio_file::~stdio_file): New.
17263 (mem_file_rewind): Delete.
17264 (stdio_file::set_stream): New.
17265 (mem_file_put): Delete.
17266 (stdio_file::open): New.
17267 (mem_file_write): Delete.
17268 (stdio_file_magic, struct stdio_file): Delete.
17269 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17270 (stdio_file::flush): New.
17271 (stdio_file_read): Rename to ...
17272 (stdio_file::read): ... this. Adjust.
17273 (stdio_file_write): Rename to ...
17274 (stdio_file::write): ... this. Adjust.
17275 (stdio_file_write_async_safe): Rename to ...
17276 (stdio_file::write_async_safe) ... this. Adjust.
17277 (stdio_file_fputs): Rename to ...
17278 (stdio_file::puts) ... this. Adjust.
17279 (stdio_file_isatty): Delete.
17280 (stdio_file_fseek): Delete.
17281 (stdio_file::isatty): New.
17282 (stderr_file_write): Rename to ...
17283 (stderr_file::write) ... this. Adjust.
17284 (stderr_file_fputs): Rename to ...
17285 (stderr_file::puts) ... this. Adjust.
17286 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17287 (stderr_file::stderr_file): New.
17288 (tee_file_magic): Delete.
17289 (struct tee_file): Delete.
17290 (tee_file::tee_file): New.
17291 (tee_file_new): Delete.
17292 (tee_file::~tee_file): New.
17293 (tee_file_delete): Delete.
17294 (tee_file_flush): Rename to ...
17295 (tee_file::flush): ... this. Adjust.
17296 (tee_file_write): Rename to ...
17297 (tee_file::write): ... this. Adjust.
17298 (tee_file::write_async_safe): New.
17299 (tee_file_fputs): Rename to ...
17300 (tee_file::puts): ... this. Adjust.
17301 (tee_file_isatty): Rename to ...
17302 (tee_file::isatty): ... this. Adjust.
17303 * ui-file.h (struct obstack, struct ui_file): Don't
17304 forward-declare.
17305 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17306 (ui_file_write_ftype)
17307 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17308 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17309 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17310 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17311 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17312 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17313 (set_ui_file_fseek): Delete.
17314 (ui_file_data, ui_file_delete, ui_file_rewind)
17315 (struct ui_file): New.
17316 (ui_file_up): New.
17317 (class null_file): New.
17318 (null_stream): Declare.
17319 (ui_file_write_for_put, ui_file_put): Delete.
17320 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17321 Delete.
17322 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17323 (gdb_fopen, tee_file_new): Delete.
17324 (struct string_file): New.
17325 (struct stdio_file): New.
17326 (stdio_file_up): New.
17327 (struct stderr_file): New.
17328 (class tee_file): New.
17329 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17330 of a 'ui_file *'. Adjust.
17331 * ui-out.h (class ui_out) <field_stream>: Likewise.
17332 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17333 (null_stream): Delete.
17334 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17335 Adjust.
17336 * utils.h (struct ui_file): Delete forward declaration..
17337 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17338 (error_stream): Take a 'string_file &' instead of a
17339 'ui_file *'.
17340 * varobj.c (varobj_value_get_print_value): Use string_file.
17341 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17342 * gdbarch.c: Regenerate.
17343
187808b0
PA
173442017-02-02 Pedro Alves <palves@redhat.com>
17345
17346 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17347 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17348 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17349 Adjust to call gdb_print_insn instead of
17350 gdb_disassembler::print_insn.
17351 (dump_insns, do_mixed_source_and_assembly_deprecated)
17352 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17353 'gdbarch' parameter. Remove gdb_disassembler parameter.
17354 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17355 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17356 declaration.
17357 (gdb_pretty_print_insn): Re-add declaration.
17358 * record-btrace.c (btrace_insn_history): Don't allocate a
17359 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17360
7a8eb317
SM
173612017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17362
17363 * disasm.h (gdb_disassembly): Remove file_string parameter.
17364 * disasm.c (gdb_disassembly): Likewise.
17365 * cli/cli-cmds.c (print_disassembly): Adapt.
17366 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17367 * stack.c (do_gdb_disassembly): Likewise.
17368
7346ef59
AA
173692017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17370
17371 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17372 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17373 targets. And if the implicit value is longer than needed, extract
17374 the first bytes instead of the "least significant" ones.
17375
cd4007e4
MM
173762017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17377
17378 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17379 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17380 (btrace_fetch): Assert can_access_registers_ptid.
17381 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17382 validate_registers_access.
17383
cf77c34e
MM
173842017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17385
17386 * gdbthread.h (can_access_registers_ptid): New.
17387 * thread.c (can_access_registers_ptid): New.
17388
be85ce7d
PA
173892017-02-01 Pedro Alves <palves@redhat.com>
17390
17391 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17392
29b0b251
PA
173932017-01-31 Pedro Alves <palves@redhat.com>
17394
17395 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17396 Fix typos.
17397
289b5b24
PA
173982017-01-31 Pedro Alves <palves@redhat.com>
17399
17400 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17401 not used.
17402
b47413b4
PA
174032017-01-31 Pedro Alves <palves@redhat.com>
17404
17405 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17406
60adb36c
PA
174072017-01-31 Pedro Alves <palves@redhat.com>
17408
17409 * common/scoped_restore.h
17410 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17411 change the value's parameter type to T2.
17412 (make_scoped_restore): Likewise.
17413
2735833d
WT
174142017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17415 Richard Henderson <rth@redhat.com>
17416
17417 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17418 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17419 GS_BASE for older kernels.
17420 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17421 GS_BASE for older kernels.
17422 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17423 and GS_BASE to the offset table.
17424 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17425 system register group.
17426 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17427 for older kernels.
17428 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17429 amd64 ABI.
17430 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17431 AMD64_GSBASE_REGNUM.
17432 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17433 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17434 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17435 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17436 i386/64bit-segments.xml in those rules.
17437 * features/i386/64bit-segments.xml: New file.
17438 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17439 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17440 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17441 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17442 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17443 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17444 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17445 * features/i386/amd64-avx-linux.c: Regenerated.
17446 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17447 * features/i386/amd64-avx-mpx.c: Regenerated.
17448 * features/i386/amd64-avx512-linux.c: Regenerated.
17449 * features/i386/amd64-linux.c: Regenerated.
17450 * features/i386/amd64-mpx-linux.c: Regenerated.
17451 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17452 * features/i386/i386-avx-mpx.c: Regenerated.
17453 * features/i386/x32-avx-linux.c: Regenerated.
17454 * features/i386/x32-avx512-linux.c: Regenerated.
17455 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17456 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17457 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17458 * regformats/i386/amd64-linux.dat: Regenerated.
17459 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17460 * regformats/i386/x32-avx-linux.dat: Regenerated.
17461 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17462 * regformats/i386/x32-linux.dat: Regenerated.
17463
8884e97e
WT
174642017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17465
17466 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17467 Set to AMD64_NUM_REGS.
17468
7005d26a
WT
174692017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17470
17471 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17472 that checks validity of a register number.
17473
4bd2e1b2
KC
174742017-01-27 Kees Cook <keescook@google.com>
17475
17476 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17477 fetch_fpregs if target has fpa registers.
17478 (arm_linux_store_inferior_registers): Call store_fpregs if target
17479 has fpa registers.
17480
7cf1de6c
AA
174812017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17482
17483 * cris-tdep.c (cris_gdbarch_init): Remove check for
17484 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17485
874a1c8c
AT
174862017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17487
17488 * corelow.c (get_core_register_section): Check for regset
17489 existence before checking for REGSET_VARIABLE_SIZE.
17490
d8b49cf0
YQ
174912017-01-26 Yao Qi <yao.qi@linaro.org>
17492 Pedro Alves <palves@redhat.com>
17493
17494 PR gdb/20939
17495 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17496 call memory_error, save memaddr instead.
17497 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17498 negative, cal memory_error.
17499 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17500
658ca58c
YQ
175012017-01-26 Yao Qi <yao.qi@linaro.org>
17502
17503 * disasm-selftests.c (memory_error_test): New function.
17504 (_initialize_disasm_selftests): Register memory_error_test.
17505
79843d45
YQ
175062017-01-26 Yao Qi <yao.qi@linaro.org>
17507
17508 * Makefile.in (SFILES): Add disasm-selftests.c and
17509 selftest-arch.c.
17510 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17511 * disasm-selftests.c: New file.
17512 * selftest-arch.c: New file.
17513 * selftest-arch.h: New file.
17514
8cafda32
YQ
175152017-01-26 Yao Qi <yao.qi@linaro.org>
17516
17517 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17518 to bfd_arch_mep. Don't return 0 if section is not
17519 found. Call print_insn_mep.
17520
e47ad6c0
YQ
175212017-01-26 Pedro Alves <palves@redhat.com>
17522 Yao Qi <yao.qi@linaro.org>
17523
17524 * arm-tdep.c: Include "disasm.h".
17525 (gdb_print_insn_arm): Update code to get gdbarch.
17526 * disasm.c (dis_asm_read_memory): Change it to
17527 gdb_disassembler::dis_asm_read_memory.
17528 (dis_asm_memory_error): Likewise.
17529 (dis_asm_print_address): Likewise.
17530 (gdb_pretty_print_insn): Change it to
17531 gdb_disassembler::pretty_print_insn.
17532 (dump_insns): Add one argument gdb_disassemlber. All
17533 callers updated.
17534 (do_mixed_source_and_assembly_deprecated): Likewise.
17535 (do_mixed_source_and_assembly): Likewise.
17536 (do_assembly_only): Likewise.
17537 (gdb_disassembler::gdb_disassembler): New.
17538 (gdb_disassembler::print_insn): New.
17539 * disasm.h (class gdb_disassembler): New.
17540 (gdb_pretty_print_insn): Remove declaration.
17541 (gdb_disassemble_info): Likewise.
17542 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17543 (gdbscm_disasm_read_memory_worker): Update.
17544 (gdbscm_disasm_read_memory): Update.
17545 (gdbscm_disasm_memory_error): Remove.
17546 (gdbscm_disasm_print_address): Remove.
17547 (gdbscm_disassembler::gdbscm_disassembler): New.
17548 (gdbscm_print_insn_from_port): Update.
17549 * mips-tdep.c: Include disasm.h.
17550 (gdb_print_insn_mips): Update code to get gdbarch.
17551 * record-btrace.c (btrace_insn_history): Update.
17552 * spu-tdep.c: Include disasm.h.
17553 (struct spu_dis_asm_data): Remove.
17554 (struct spu_dis_asm_info): New.
17555 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17556 SPU id.
17557 (gdb_print_insn_spu): Cast disassemble_info to
17558 spu_dis_asm_info.
17559
80d75874
YQ
175602017-01-26 Yao Qi <yao.qi@linaro.org>
17561
17562 * disasm.c (do_ui_file_delete): Delete.
17563 (gdb_insn_length): Move code creating stream to ...
17564 * utils.c (null_stream): ... here. New function.
17565 * utils.h (null_stream): Declare.
17566
60685cd0
SM
175672017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17568
17569 * python/py-inferior.c (find_thread_object): Return directly
17570 from the loop. Remove "found" variable.
17571
eb1cdb62
JB
175722017-01-21 Joel Brobecker <brobecker@adacore.com>
17573
17574 GDB 7.12.1 released.
17575
b1ce6568
SM
175762017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17577
17578 * python/py-function.c (fnpy_call): Reorder declarations to have
17579 the gdbpy_enter object declared first.
17580 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17581
6f8b0407
SM
175822017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17583
fec93fb1 17584 PR python/21068
6f8b0407
SM
17585 * python/python-internal.h (PyMem_RawMalloc): Define for
17586 Python < 3.4.
17587 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17588 PyMem_RawMalloc instead of PyMem_Malloc.
17589
78cbbba8
LM
175902017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17591 Luis Machado <lgustavo@codesourcery.com>
17592
17593 * NEWS (New commands): Mention flash-erase.
17594 (New MI commands): Mention target-flash-erase.
17595 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17596 command.
17597 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17598 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17599 * target.c (flash_erase_command): New function.
17600 (initialize_targets): Add new flash-erase command.
17601 * target.h (flash_erase_command): New declaration.
17602
2132fe85
JB
176032017-01-20 Joel Brobecker <brobecker@adacore.com>
17604
17605 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17606 HAVE_SYS_PROCFS_H is defined.
17607
d1dff226
AH
176082017-01-18 Alan Hayward <alan.hayward@arm.com>
17609
17610 * remote.c (struct cached_reg): Change data into a pointer.
17611 * (stop_reply_dtr): Free data pointers before deleting vector.
17612 (process_stop_reply): Likewise.
17613 (remote_parse_stop_reply): Allocate space for data
17614
9890e433
AH
176152017-01-18 Alan Hayward <alan.hayward@arm.com>
17616
17617 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17618 MAX_REGISTER_SIZE.
17619 (amd64_pseudo_register_read_value): Likewise.
17620 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17621 (store_register_using_P): Likewise.
17622 * regcache.c (regcache_xfer_part): Likewise.
17623
7a36499a
IR
176242017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17625
17626 Split real and pseudo registers.
17627 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17628 (sparc32_pseudo_regnum): New enum.
17629 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17630 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17631 (SPARC32_CP0_REGISTERS): New macro.
17632 (sparc32_pseudo_register_name): New function.
17633 (sparc32_register_name): Use sparc32_pseudo_register_name.
17634 (sparc32_pseudo_register_type): New function.
17635 (sparc32_register_type): Use sparc32_pseudo_register_type.
17636 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17637 pseudo register numbers.
17638 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17639 (SPARC64_CP0_REGISTERS): New macro.
17640 (sparc64_pseudo_register_name): New function.
17641 (sparc64_register_name): Use sparc64_pseudo_register_name.
17642 (sparc64_pseudo_register_type): New function.
17643 (sparc64_register_type): Use sparc64_pseudo_register_type.
17644 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17645 pseudo register numbers.
17646 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17647 sparc64_store_arguments): Handle pseudo register numbers.
17648
6f8976bf
YQ
176492017-01-13 Yao Qi <yao.qi@linaro.org>
17650
17651 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17652 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17653 output.
17654 (getpkt_or_notif_sane_1): Likewise.
17655
e4241ace
YQ
176562017-01-13 Yao Qi <yao.qi@linaro.org>
17657
17658 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17659 of CC. Pass "-x c++-header" instead of "-x c".
17660
3015c064
SM
176612017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17662
17663 * remote.c (remote_can_async_p): Update comment.
17664
fde1b17d
SM
176652017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17666
17667 * linux-nat.c (linux_nat_can_async_p): Update comment.
17668
ca1ca08b
SM
176692017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17670
17671 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17672
4ad2da73
SM
176732017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17674
17675 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17676
c8b23b3f
TT
176772017-01-10 Tom Tromey <tom@tromey.com>
17678
17679 * python/py-type.c (typy_legacy_template_argument): Update.
17680 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17681 ~demangle_parse_info): Declare new members.
17682 (cp_demangled_name_to_comp): Return unique_ptr.
17683 (cp_demangled_name_parse_free)
17684 (make_cleanup_cp_demangled_name_parse_free)
17685 (cp_new_demangle_parse_info): Remove.
17686 * cp-support.c (do_demangled_name_parse_free_cleanup)
17687 (make_cleanup_cp_demangled_name_parse_free): Remove.
17688 (inspect_type, cp_canonicalize_string_full)
17689 (cp_canonicalize_string): Update.
17690 (mangled_name_to_comp): Change return type.
17691 (cp_class_name_from_physname, method_name_from_physname)
17692 (cp_func_name, cp_remove_params): Update.
17693 * cp-name-parser.y (demangle_parse_info): New constructor, from
17694 cp_new_demangle_parse_info.
17695 (~demangle_parse_info): New destructor, from
17696 cp_demangled_name_parse_free.
17697 (cp_merge_demangle_parse_infos): Update.
17698 (cp_demangled_name_to_comp): Change return type.
17699
1ac32117
TT
177002017-01-10 Tom Tromey <tom@tromey.com>
17701
17702 * top.c (prevent_dont_repeat): Change return type.
17703 * python/python.c (execute_gdb_command): Use std::string.
17704 Update.
17705 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17706 * command.h (prevent_dont_repeat): Change return type.
17707 * breakpoint.c (bpstat_do_actions_1): Update.
17708
0cf08227
TT
177092017-01-10 Tom Tromey <tom@tromey.com>
17710
17711 * value.h (scoped_value_mark::~scoped_value_mark): Call
17712 free_to_mark.
17713 (scoped_value_mark::free_to_mark): New method.
17714 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17715 scoped_value_mark.
17716
eb115069
TT
177172017-01-10 Tom Tromey <tom@tromey.com>
17718
17719 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17720 (valpy_reference_value, valpy_const_value, valpy_get_address)
17721 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17722 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17723 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17724 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17725 scoped_value_mark.
17726 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17727 * value.h (scoped_value_mark): New class.
17728
906768f9
TT
177292017-01-10 Tom Tromey <tom@tromey.com>
17730
17731 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17732 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17733 * psymtab.c (discard_psymtabs_upto): Remove.
17734 (make_cleanup_discard_psymtabs): Remove.
17735 (struct psymtab_state): Remove.
17736
bef155c3
TT
177372017-01-10 Tom Tromey <tom@tromey.com>
17738
17739 * record-full.c (record_full_save_cleanups): Remove.
17740 (record_full_save): Use gdb::unlinker.
17741 * gcore.c (do_bfd_delete_cleanup): Remove.
17742 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17743 cleanups.
17744 * dwarf2read.c (unlink_if_set): Remove.
17745 (write_psymtabs_to_index): Use gdb::unlinker.
17746 * common/gdb_unlinker.h: New file.
17747
192b62ce
TT
177482017-01-10 Tom Tromey <tom@tromey.com>
17749
17750 * windows-tdep.c (windows_xfer_shared_library): Update.
17751 * windows-nat.c (windows_make_so): Update.
17752 * utils.h (make_cleanup_bfd_unref): Remove.
17753 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17754 * symfile.h (symfile_bfd_open)
17755 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17756 * symfile.c (read_symbols, symbol_file_add)
17757 (separate_debug_file_exists): Update.
17758 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17759 (generic_load, reread_symbols): Update.
17760 * symfile-mem.c (symbol_file_add_from_memory): Update.
17761 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17762 (spu_symbol_file_add_from_memory): Update.
17763 * solist.h (struct target_so_ops) <bfd_open>: Return
17764 gdb_bfd_ref_ptr.
17765 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17766 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17767 gdb_bfd_ref_ptr.
17768 (solib_map_sections, reload_shared_libraries_1): Update.
17769 * solib-svr4.c (enable_break): Update.
17770 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17771 * solib-frv.c (enable_break2): Update.
17772 * solib-dsbt.c (enable_break): Update.
17773 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17774 gdb_bfd_ref_ptr.
17775 (darwin_solib_get_all_image_info_addr_at_init): Update.
17776 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17777 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17778 * record-full.c (record_full_save): Update.
17779 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17780 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17781 * minidebug.c (find_separate_debug_file_in_section): Return
17782 gdb_bfd_ref_ptr.
17783 * machoread.c (macho_add_oso_symfile): Change abfd to
17784 gdb_bfd_ref_ptr.
17785 (macho_symfile_read_all_oso): Update.
17786 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17787 (macho_symfile_read): Update.
17788 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17789 (jit_bfd_try_read_symtab): Update.
17790 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17791 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17792 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17793 gdb_bfd_ref_ptr.
17794 (gdb_bfd_ref_policy): New struct.
17795 (gdb_bfd_ref_ptr): New typedef.
17796 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17797 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17798 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17799 gdb_bfd_ref_ptr.
17800 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17801 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17802 (gcore_command): Update.
17803 * exec.c (exec_file_attach): Update.
17804 * elfread.c (elf_symfile_read): Update.
17805 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17806 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17807 (open_and_init_dwo_file): Update.
17808 (open_dwp_file): Return gdb_bfd_ref_ptr.
17809 (open_and_init_dwp_file): Update.
17810 * corelow.c (core_open): Update.
17811 * compile/compile-object-load.c (compile_object_load): Update.
17812 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17813 * coffread.c (coff_symfile_read): Update.
17814 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17815 gdb_bfd_ref_ptr. Rename.
17816 (dump_bfd_file, restore_command): Update.
17817 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17818 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17819 (find_separate_debug_file_by_buildid): Update.
17820
50315b21
TT
178212017-01-10 Tom Tromey <tom@tromey.com>
17822
17823 * common/gdb_ref_ptr.h: New file.
17824 * python/py-ref.h (struct gdbpy_ref_policy): New.
17825 (gdbpy_ref): Now a typedef.
17826
fc4007c9
TT
178272017-01-10 Tom Tromey <tom@tromey.com>
17828
17829 * utils.h (make_cleanup_htab_delete): Don't declare.
17830 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17831 Remove.
17832 * linespec.c (decode_compound_collector): Add constructor,
17833 destructor.
17834 (lookup_prefix_sym): Remove cleanup.
17835 (symtab_collector): Add constructor, destructor.
17836 (collect_symtabs_from_filename): Remove cleanup.
17837 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17838 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17839 Use htab_up.
17840 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17841 * dwarf2read.c (dw2_expand_symtabs_matching)
17842 (dw2_map_symbol_filenames, dwarf_decode_macros)
17843 (write_psymtabs_to_index): Use htab_up.
17844 * dwarf2loc.c (func_verify_no_selftailcall)
17845 (call_site_find_chain_1, func_verify_no_selftailcall)
17846 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17847 std::vector, gdb::unique_xmalloc_ptr.
17848 (call_sitep): Remove typedef.
17849 (dwarf2_locexpr_baton_eval): Remove unused variable.
17850
8dbcee67
TT
178512017-01-10 Tom Tromey <tom@tromey.com>
17852
17853 * python/python-internal.h (make_cleanup_py_decref)
17854 (make_cleanup_py_xdecref): Don't declare.
17855 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17856 (py_xdecref, make_cleanup_py_xdecref): Remove.
17857
13df46cc
TT
178582017-01-10 Tom Tromey <tom@tromey.com>
17859
17860 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17861 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17862
06fc9bf7
TT
178632017-01-10 Tom Tromey <tom@tromey.com>
17864
17865 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17866
830a4934
TT
178672017-01-10 Tom Tromey <tom@tromey.com>
17868
17869 * python/py-utils.c (unicode_to_encoded_string)
17870 (python_string_to_target_string)
17871 (python_string_to_target_python_string)
17872 (python_string_to_host_string, gdbpy_obj_to_string)
17873 (get_addr_from_python): Use gdbpy_ref.
17874
4586d543
TT
178752017-01-10 Tom Tromey <tom@tromey.com>
17876
17877 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17878 gdbpy_ref.
17879
59876f8f
TT
178802017-01-10 Tom Tromey <tom@tromey.com>
17881
17882 * python/python.c (eval_python_command, gdbpy_decode_line)
17883 (gdbpy_run_events, gdbpy_start_type_printers)
17884 (gdbpy_apply_type_printers): Use gdbpy_ref.
17885
97d83487
TT
178862017-01-10 Tom Tromey <tom@tromey.com>
17887
17888 * python/py-param.c (get_doc_string, compute_enum_values): Use
17889 gdbpy_ref.
17890
9205649a
TT
178912017-01-10 Tom Tromey <tom@tromey.com>
17892
17893 * python/py-inferior.c (find_thread_object, build_inferior_list):
17894 Use gdbpy_ref.
17895
74c49d45
TT
178962017-01-10 Tom Tromey <tom@tromey.com>
17897
17898 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17899
16361ffb
TT
179002017-01-10 Tom Tromey <tom@tromey.com>
17901
17902 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17903 gdbpy_ref.
17904
905f2cca
TT
179052017-01-10 Tom Tromey <tom@tromey.com>
17906
17907 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17908 extra incref.
17909 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17910 Use gdbpy_ref.
17911
64081434
TT
179122017-01-10 Tom Tromey <tom@tromey.com>
17913
17914 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17915 gdbpy_ref.
17916
59e9e831
TT
179172017-01-10 Tom Tromey <tom@tromey.com>
17918
17919 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17920 decref results of PyArg_ParseTupleAndKeywords.
17921
9de10f6d
TT
179222017-01-10 Tom Tromey <tom@tromey.com>
17923
17924 * python/python.c (python_run_simple_file): Use
17925 unique_xmalloc_ptr, gdbpy_ref.
17926
2bd5759d
TT
179272017-01-10 Tom Tromey <tom@tromey.com>
17928
17929 * python/py-prettyprint.c (print_stack_unless_memory_error)
17930 (print_string_repr, print_children): Use gdbpy_ref.
17931 (dummy_python_frame): New class.
17932 (dummy_python_frame::dummy_python_frame): Rename from
17933 push_dummy_python_frame.
17934 (py_restore_tstate): Remove.
17935
3b4e0e01
TT
179362017-01-10 Tom Tromey <tom@tromey.com>
17937
17938 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17939
17a22718
TT
179402017-01-10 Tom Tromey <tom@tromey.com>
17941
17942 * python/python.c (ensure_python_env, restore_python_env):
17943 Remove.
17944 * python/python-internal.h (ensure_python_env): Don't declare.
17945 * varobj.h (varobj_ensure_python_env): Don't declare.
17946 * varobj.c (varobj_ensure_python_env): Remove.
17947
68cdc557
TT
179482017-01-10 Tom Tromey <tom@tromey.com>
17949
17950 * varobj.c (varobj_value_get_print_value): Use
17951 gdbpy_enter_varobj.
17952
1eba6383
TT
179532017-01-10 Tom Tromey <tom@tromey.com>
17954
17955 * python/py-prettyprint.c (print_string_repr, print_children):
17956 Update.
17957 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17958 of "encoding".
17959 * varobj.c (varobj_value_get_print_value): Update.
17960 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17961
bde7b3e3
TT
179622017-01-10 Tom Tromey <tom@tromey.com>
17963
17964 * varobj.c (varobj_get_display_hint)
17965 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17966 (varobj_set_visualizer, free_variable): Use
17967 gdbpy_enter_varobj.
17968
a7785f8c
TT
179692017-01-10 Tom Tromey <tom@tromey.com>
17970
17971 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17972 (do_finish_initialization): New function. Use gdbpy_ref.
17973 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17974 do_finish_initialization.
17975
2865bfce
TT
179762017-01-10 Tom Tromey <tom@tromey.com>
17977
17978 * python/py-param.c (get_set_value, get_show_value): Use
17979 gdbpy_enter, gdbpy_ref.
17980
0e9dcc75
TT
179812017-01-10 Tom Tromey <tom@tromey.com>
17982
17983 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17984
12a5cedd
TT
179852017-01-10 Tom Tromey <tom@tromey.com>
17986
17987 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17988
788f2586
TT
179892017-01-10 Tom Tromey <tom@tromey.com>
17990
17991 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17992 Use gdbpy_enter_varobj.
17993
6cd67bea
TT
179942017-01-10 Tom Tromey <tom@tromey.com>
17995
17996 * varobj.c (gdbpy_enter_varobj): New constructor.
17997 * python/python-internal.h (gdbpy_enter_varobj): New class.
17998 * python/py-varobj.c (py_varobj_get_iterator): Use
17999 gdbpy_enter_varobj.
18000
14b122bf
TT
180012017-01-10 Tom Tromey <tom@tromey.com>
18002
18003 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
18004 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18005 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
18006 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
18007 unique_xmalloc_ptr.
18008 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
18009
bf1ca3b9
TT
180102017-01-10 Tom Tromey <tom@tromey.com>
18011
18012 * python/py-xmethods.c (invoke_match_method): Use
18013 gdbpy_ref.
18014
572a5524
TT
180152017-01-10 Tom Tromey <tom@tromey.com>
18016
18017 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
18018 gdbpy_enter, gdbpy_ref.
18019
396a78b6
TT
180202017-01-10 Tom Tromey <tom@tromey.com>
18021
18022 * python/python.c (python_interactive_command): Use gdbpy_enter.
18023
a88b13c7
TT
180242017-01-10 Tom Tromey <tom@tromey.com>
18025
18026 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
18027 gdbpy_ref.
18028
e9f0c363
TT
180292017-01-10 Tom Tromey <tom@tromey.com>
18030
18031 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
18032 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18033
6349f452
TT
180342017-01-10 Tom Tromey <tom@tromey.com>
18035
18036 * utils.h (htab_deleter): New struct.
18037 (htab_up): New typedef.
18038 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
18039 gdbpy_enter, gdbpy_ref, htab_up.
18040
c0171de6
TT
180412017-01-10 Tom Tromey <tom@tromey.com>
18042
18043 * python/py-unwind.c (pending_frame_invalidate): Remove.
18044 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
18045
f18e226f
TT
180462017-01-10 Tom Tromey <tom@tromey.com>
18047
18048 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
18049 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
18050
c57af3f1
TT
180512017-01-10 Tom Tromey <tom@tromey.com>
18052
18053 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
18054
60e600ec
TT
180552017-01-10 Tom Tromey <tom@tromey.com>
18056
18057 * python/python.c (gdbpy_eval_from_control_command)
18058 (gdbpy_source_script, gdbpy_run_events)
18059 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
18060 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
18061 gdbpy_enter.
18062
bf7da5b0
TT
180632017-01-10 Tom Tromey <tom@tromey.com>
18064
18065 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
18066
2d38bced
TT
180672017-01-10 Tom Tromey <tom@tromey.com>
18068
18069 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
18070
07bc7329
TT
180712017-01-10 Tom Tromey <tom@tromey.com>
18072
18073 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
18074 (python_on_inferior_call_pre, python_on_inferior_call_post)
18075 (python_on_memory_change, python_on_register_change)
18076 (python_inferior_exit, python_new_objfile, add_thread_object)
18077 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
18078
6e7c365e
TT
180792017-01-10 Tom Tromey <tom@tromey.com>
18080
18081 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
18082 (bpfinishpy_handle_exit): Use gdbpy_enter.
18083
6ba0cd40
TT
180842017-01-10 Tom Tromey <tom@tromey.com>
18085
18086 * python/py-cmd.c (cmdpy_destroyer)
18087 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
18088 gdbpy_enter.
18089
de2dc875
TT
180902017-01-10 Tom Tromey <tom@tromey.com>
18091
18092 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18093 gdbpy_enter.
18094 (gdbpy_breakpoint_has_cond): Likewise.
18095
4ecee2c4
TT
180962017-01-10 Tom Tromey <tom@tromey.com>
18097
18098 * python/python.c (gdbpy_enter): New constructor.
18099 (~gdbpy_enter): New destructor.
18100 (restore_python_env, ensure_python_env): Rewrite.
18101 * python/python-internal.h (gdbpy_enter): New class.
18102
37fce74f
TT
181032017-01-10 Tom Tromey <tom@tromey.com>
18104
18105 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
18106
53a0cca3
TT
181072017-01-10 Tom Tromey <tom@tromey.com>
18108
18109 * python/py-value.c (value_has_field, get_field_flag)
18110 (get_field_type, valpy_getitem, convert_value_from_python): Use
18111 gdbpy_ref.
18112
ff3724f5
TT
181132017-01-10 Tom Tromey <tom@tromey.com>
18114
18115 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
18116 gdbpy_ref.
18117
0700aea5
TT
181182017-01-10 Tom Tromey <tom@tromey.com>
18119
18120 * python/py-prettyprint.c (search_pp_list)
18121 (find_pretty_printer_from_objfiles)
18122 (find_pretty_printer_from_progspace)
18123 (find_pretty_printer_from_gdb, find_pretty_printer)
18124 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
18125 gdbpy_ref.
18126
1bb44c9f
TT
181272017-01-10 Tom Tromey <tom@tromey.com>
18128
18129 * python/py-param.c (call_doc_function): Use gdbpy_ref.
18130
87ce03fd
TT
181312017-01-10 Tom Tromey <tom@tromey.com>
18132
18133 * python/py-linetable.c (build_line_table_tuple_from_pcs)
18134 (ltpy_get_all_source_lines): Use gdbpy_ref.
18135
ee0a3fb8
TT
181362017-01-10 Tom Tromey <tom@tromey.com>
18137
18138 * python/py-framefilter.c (extract_sym, extract_value)
18139 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18140 gdbpy_ref.
18141
bf2a52fa
TT
181422017-01-10 Tom Tromey <tom@tromey.com>
18143
18144 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18145
f59fe7f8
TT
181462017-01-10 Tom Tromey <tom@tromey.com>
18147
18148 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18149
80bd970a
TT
181502017-01-10 Tom Tromey <tom@tromey.com>
18151
18152 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18153 gdbpy_ref.
18154
d1b3de2e
TT
181552017-01-10 Tom Tromey <tom@tromey.com>
18156
18157 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18158
3bb43384
TT
181592017-01-10 Tom Tromey <tom@tromey.com>
18160
18161 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18162 (typy_range): Use gdbpy_ref.
18163
abf5651e
TT
181642017-01-10 Tom Tromey <tom@tromey.com>
18165
18166 * python/py-threadevent.c (create_thread_event_object): Use
18167 gdbpy_ref.
18168 * python/py-stopevent.c (create_stop_event_object): Simplify.
18169 (emit_stop_event): Use gdbpy_ref.
18170 * python/py-signalevent.c (create_signal_event_object): Use
18171 gdbpy_ref.
18172 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18173 (emit_new_objfile_event, create_clear_objfiles_event_object)
18174 (emit_clear_objfiles_event): Use gdbpy_ref.
18175 * python/py-infevents.c (create_inferior_call_event_object)
18176 (create_register_changed_event_object)
18177 (create_memory_changed_event_object, emit_inferior_call_event)
18178 (emit_memory_changed_event, emit_register_changed_event): Use
18179 gdbpy_ref.
18180 * python/py-exitedevent.c (create_exited_event_object)
18181 (emit_exited_event): Use gdbpy_ref.
18182 * python/py-event.h (evpy_emit_event): Remove
18183 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18184 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18185 * python/py-continueevent.c (emit_continue_event): Use
18186 gdbpy_ref.
18187 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18188 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18189 gdbpy_ref.
18190 * python/py-bpevent.c (create_breakpoint_event_object): Use
18191 gdbpy_ref.
18192
a68ff33e
TT
181932017-01-10 Tom Tromey <tom@tromey.com>
18194
18195 * python/py-ref.h: New file.
18196
7becfd03
SM
181972017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18198
18199 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18200 void.
18201 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18202 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18203 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18204 * ui-out.c (ui_out::redirect): Likewise.
18205 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18206 * cli/cli-logging.c (set_logging_redirect): Update call site of
18207 ui_out::redirect.
18208 (handle_redirections): Likewise.
18209 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18210 * top.c (execute_command_to_string): Likewise.
18211 * utils.c (do_ui_out_redirect_pop): Likewise.
18212
df294654
SM
182132017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18214
18215 * stack.c (_initialize_stack): Update "frame" command help message.
18216
f5e6296e
IB
182172017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18218
18219 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18220
0e2d6fa6
YQ
182212017-01-06 Yao Qi <yao.qi@linaro.org>
18222
18223 * x86-linux-nat.h: Include gdb_proc_service.h.
18224
44d6d3f9
YQ
182252017-01-06 Yao Qi <yao.qi@linaro.org>
18226
18227 * ser-base.h: Include serial.h.
18228
656731fe
YQ
182292017-01-06 Yao Qi <yao.qi@linaro.org>
18230
18231 * ppc-linux-tdep.h: Include ppc-tdep.h.
18232
1ca8f924
YQ
182332017-01-06 Yao Qi <yao.qi@linaro.org>
18234
18235 * nat/amd64-linux-siginfo.h: Include signal.h.
18236
bc3008c4
YQ
182372017-01-06 Yao Qi <yao.qi@linaro.org>
18238
18239 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18240
66c80d03
YQ
182412017-01-06 Yao Qi <yao.qi@linaro.org>
18242
18243 * mi/mi-parse.h: Include mi-cmds.h.
18244
051d2dda
YQ
182452017-01-06 Yao Qi <yao.qi@linaro.org>
18246
18247 * inf-loop.c: Don't include "target.h".
18248 * inf-loop.h: Include it here.
18249
8018d34f
YQ
182502017-01-06 Yao Qi <yao.qi@linaro.org>
18251
18252 * dfp.h: Include "dboulest.h" and "expression.h".
18253
c0b8369c
YQ
182542017-01-06 Yao Qi <yao.qi@linaro.org>
18255
18256 * ax-gdb.h: Include "ax.h".
18257
ad5cba2a
YQ
182582017-01-06 Yao Qi <yao.qi@linaro.org>
18259
18260 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18261 with nat/gdb_ptrace.h.
18262
1c33cd7f
YQ
182632017-01-05 Yao Qi <yao.qi@linaro.org>
18264
18265 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18266 new line.
18267 (mips64_fbsd_sigframe_init): Likewise.
18268
c988ac1d
JB
182692017-01-04 John Baldwin <jhb@FreeBSD.org>
18270
18271 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18272 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18273
b268007c
JB
182742017-01-04 John Baldwin <jhb@FreeBSD.org>
18275
18276 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18277 * NEWS: Mention new FreeBSD/mips native configuration.
18278 * config/mips/fbsd.mh: New file.
18279 * configure.host: Add mips*-*-freebsd*.
18280 * mips-fbsd-nat.c: New file.
18281
387360da
JB
182822017-01-04 John Baldwin <jhb@FreeBSD.org>
18283
18284 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18285 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18286 * NEWS: Mention new FreeBSD/mips target.
18287 * configure.tgt: Add mips*-*-freebsd*.
18288 * mips-fbsd-tdep.c: New file.
18289 * mips-fbsd-tdep.h: New file.
18290
2aaaf250
YQ
182912017-01-04 Yao Qi <yao.qi@linaro.org>
18292
18293 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18294 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18295
61baf725
JB
182962017-01-01 Joel Brobecker <brobecker@adacore.com>
18297
6dbb839a 18298 Update copyright year range in all GDB files.
61baf725 18299
c113e7ff 183002017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 18301
c113e7ff 18302 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 18303
c113e7ff 18304For older changes see ChangeLog-2016.
c906108c
SS
18305\f
18306Local Variables:
18307mode: change-log
18308left-margin: 8
18309fill-column: 74
18310version-control: never
57da7796 18311coding: utf-8
c906108c 18312End:
This page took 2.759768 seconds and 4 git commands to generate.