1 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3 * unittests/basic_string_view/capacity/1.cc: New file.
4 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5 * unittests/basic_string_view/cons/char/1.cc: New file.
6 * unittests/basic_string_view/cons/char/2.cc: New file.
7 * unittests/basic_string_view/cons/char/3.cc: New file.
8 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11 * unittests/basic_string_view/element_access/char/1.cc: New file.
12 * unittests/basic_string_view/element_access/char/2.cc: New file.
13 * unittests/basic_string_view/element_access/char/empty.cc: New file.
14 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
15 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
16 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
17 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
18 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
19 * unittests/basic_string_view/include.cc: New file.
20 * unittests/basic_string_view/inserters/char/1.cc: New file.
21 * unittests/basic_string_view/inserters/char/2.cc: New file.
22 * unittests/basic_string_view/inserters/char/3.cc: New file.
23 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
24 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
25 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
26 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
27 * unittests/basic_string_view/literals/types.cc: New file.
28 * unittests/basic_string_view/literals/values.cc: New file.
29 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
30 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
31 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
32 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
33 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
34 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
35 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
36 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
37 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
38 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
39 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
40 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
41 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
42 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
43 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
44 * unittests/basic_string_view/operations/data/char/1.cc: New file.
45 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
46 * unittests/basic_string_view/operations/find/char/1.cc: New file.
47 * unittests/basic_string_view/operations/find/char/2.cc: New file.
48 * unittests/basic_string_view/operations/find/char/3.cc: New file.
49 * unittests/basic_string_view/operations/find/char/4.cc: New file.
50 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
51 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
52 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
53 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
54 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
55 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
56 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
57 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
58 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
59 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
60 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
61 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
62 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
63 * unittests/basic_string_view/operators/char/2.cc: New file.
64 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
65 * unittests/basic_string_view/range_access/char/1.cc: New file.
66 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
67 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
68 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
69 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
70 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
71 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
72 * unittests/basic_string_view/requirements/typedefs.cc: New file.
73 * unittests/basic_string_view/typedefs.cc: New file.
74 * unittests/basic_string_view/types/1.cc: New file.
76 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
78 * common/gdb_string_view.h: Remove libstdc++ implementation
79 details, adjust to gdb reality.
80 * common/gdb_string_view.tcc: Likewise.
81 * cli/cli-script.c (struct string_view): Remove.
82 (user_args) <m_args>: Change element type to gdb::string_view.
83 (user_args::insert_args): Adjust.
85 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
87 * common/gdb_string_view.h: New file.
88 * common/gdb_string_view.tcc: New file.
90 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
92 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
93 * configure: Re-generate.
95 2018-04-09 Pedro Alves <palves@redhat.com>
97 * gdbarch.sh: Include "observable.h" instead of "observer.h".
98 (set_target_gdbarch): Call
99 gdb::observers::architecture_changed.notify instead of
100 observer_notify_architecture_changed.
102 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
104 * tracepoint.c (struct current_traceframe_cleanup): Remove.
105 (do_restore_current_traceframe_cleanup): Remove.
106 (restore_current_traceframe_cleanup_dtor): Remove.
107 (make_cleanup_restore_current_traceframe): Remove.
108 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
110 * tracepoint.h (struct scoped_restore_current_traceframe): New.
111 * infrun.c (fetch_inferior_event): Use
112 scoped_restore_current_traceframe.
114 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
116 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
118 <n_allocated_type_units>: Remove.
119 <all_type_units>: Change to std::vector.
120 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
121 to std::vector change.
122 (dwarf2_per_objfile::get_cutu): Likewise.
123 (dwarf2_per_objfile::get_tu): Likewise.
124 (create_signatured_type_table_from_index): Likewise.
125 (create_signatured_type_table_from_debug_names): Likewise.
126 (dw2_symtab_iter_next): Likewise.
127 (dw2_print_stats): Likewise.
128 (dw2_expand_all_symtabs): Likewise.
129 (dw2_expand_marked_cus): Likewise.
130 (dw2_debug_names_iterator::next): Likewise.
131 (dwarf2_initialize_objfile): Likewise.
132 (add_signatured_type_cu_to_table): Likewise.
133 (create_all_type_units): Likewise.
134 (add_type_unit): Likewise.
135 (struct tu_abbrev_offset): Add constructor.
136 (build_type_psymtabs_1): Adjust to std::vector change.
137 (print_tu_stats): Likewise.
138 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
139 (write_debug_names): Likewise.
141 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
143 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
145 <n_comp_units>: Remove.
146 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
147 to std::vector change.
148 (dwarf2_per_objfile::get_cutu): Likewise.
149 (dwarf2_per_objfile::get_cu): Likewise.
150 (create_cus_from_index): Likewise.
151 (create_addrmap_from_index): Likewise.
152 (create_addrmap_from_aranges): Likewise.
153 (dwarf2_read_index): Likewise.
154 (dw2_find_last_source_symtab): Likewise.
155 (dw2_map_symtabs_matching_filename): Likewise.
156 (dw2_symtab_iter_next): Likewise.
157 (dw2_print_stats): Likewise.
158 (dw2_expand_all_symtabs): Likewise.
159 (dw2_expand_symtabs_with_fullname): Likewise.
160 (dw2_expand_marked_cus): Likewise.
161 (dw2_map_symbol_filenames): Likewise.
162 (create_cus_from_debug_names): Likewise.
163 (dwarf2_read_debug_names): Likewise.
164 (dw2_debug_names_iterator::next): Likewise.
165 (dwarf2_initialize_objfile): Likewise.
166 (set_partial_user): Likewise.
167 (dwarf2_build_psymtabs_hard): Likewise.
168 (read_comp_units_from_section): Remove arguments, adjust to
170 (create_all_comp_units): Adjust to std::vector and
171 read_comp_units_from_section changes.
172 (dwarf2_find_containing_comp_unit): Adjust to std::vector
174 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
175 (psyms_seen_size): Likewise.
176 (write_gdbindex): Likewise.
177 (write_debug_names): Likewise.
179 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
181 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
182 with dwarf2_per_objfile.
183 (create_cus_from_index): Likewise.
184 (create_signatured_type_table_from_index): Likewise.
185 (dwarf2_read_index): Likewise.
186 (dwarf2_initialize_objfile): Likewise.
187 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
188 per_cu rather than get_dwarf2_per_objfile.
190 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
192 * dwarf2read.h (struct signatured_type): Forward declare.
193 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
195 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
196 (dw2_get_cutu): ...this.
197 (dwarf2_per_objfile::get_cu): Rename from...
198 (dw2_get_cu): ...this.
199 (dwarf2_per_objfile::get_tu): New.
200 (create_addrmap_from_index): Adjust.
201 (create_addrmap_from_aranges): Adjust.
202 (dw2_find_last_source_symtab): Adjust.
203 (dw2_map_symtabs_matching_filename): Adjust.
204 (dw2_symtab_iter_next): Adjust.
205 (dw2_print_stats): Adjust.
206 (dw2_expand_all_symtabs): Adjust.
207 (dw2_expand_symtabs_with_fullname): Adjust.
208 (dw2_expand_marked_cus): Adjust.
209 (dw_expand_symtabs_matching_file_matcher): Adjust.
210 (dw2_map_symbol_filenames): Adjust.
211 (dw2_debug_names_iterator::next): Adjust.
212 (dwarf2_initialize_objfile): Adjust.
213 (set_partial_user): Adjust.
214 (dwarf2_build_psymtabs_hard): Adjust.
216 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
218 * dwarf2read.c (create_signatured_type_table_from_debug_names):
219 Remove unused variables.
220 (dw2_map_symtabs_matching_filename): Likewise.
221 (dwarf2_record_block_ranges): Likewise.
222 (dwarf2_read_addr_index): Likewise.
223 (follow_die_offset): Likewise.
225 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
227 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
228 to symbol_file_add_main.
230 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
233 * mi/mi-console.c (do_fputc_async_safe): New.
234 (mi_console_file::write_async_safe): New.
235 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
236 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
238 * ui-file.c (ui_file::putstrn): Adjust call to
240 * utils.c (printchar): Replace do_fputs and do_fprintf
241 parameters by do_fputc.
242 (fputstr_filtered): Adjust call to printchar.
243 (fputstr_unfiltered): Likewise.
244 (fputstrn_filtered): Likewise.
245 (fputstrn_unfiltered): Add do_fputc parameter, pass to
247 * utils.h (do_fputc_ftype): New typedef.
248 (fputstrn_unfiltered): Add do_fputc parameter.
250 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
252 * regformats/i386/i386-avx.dat: Remove.
254 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
257 * amd64-tdep.c (amd64_none_init_abi): New function.
258 (amd64_x32_none_init_abi): New function.
259 (_initialize_amd64_tdep): Register handlers for x86-64 and
260 x64_32 with GDB_OSABI_NONE.
261 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
262 GDB_OSABI_NONE osabi.
264 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
267 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
269 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
270 * osabi.c (gdb_osabi_names): Add "unknown" entry.
272 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
274 * common/byte-vector.h (char_vector): New type.
275 * target.h (target_read_alloc): Return
276 gdb::optional<byte_vector>.
277 (target_read_stralloc): Return gdb::optional<char_vector>.
278 (target_get_osdata): Return gdb::optional<char_vector>.
279 * target.c (target_read_alloc_1): Templatize. Replacement
280 manual memory management with vector.
281 (target_read_alloc): Change return type, adjust.
282 (target_read_stralloc): Change return type, adjust.
283 (target_get_osdata): Change return type, adjust.
284 * auxv.c (struct auxv_info) <length>: Remove.
285 <data>: Change type to gdb::optional<byte_vector>.
286 (auxv_inferior_data_cleanup): Free auxv_info with delete.
287 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
288 (target_auxv_search): Adjust.
289 (fprint_target_auxv): Adjust.
290 * avr-tdep.c (avr_io_reg_read_command): Adjust.
291 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
292 (linux_make_corefile_notes): Adjust.
293 * osdata.c (get_osdata): Adjust.
294 * remote.c (remote_get_threads_with_qxfer): Adjust.
295 (remote_memory_map): Adjust.
296 (remote_traceframe_info): Adjust.
297 (btrace_read_config): Adjust.
298 (remote_read_btrace): Adjust.
299 (remote_pid_to_exec_file): Adjust.
300 * solib-aix.c (solib_aix_get_library_list): Adjust.
301 * solib-dsbt.c (decode_loadmap): Don't free buf.
302 (dsbt_get_initial_loadmaps): Adjust.
303 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
304 * solib-target.c (solib_target_current_sos): Adjust.
305 * tracepoint.c (sdata_make_value): Adjust.
306 * xml-support.c (xinclude_start_include): Adjust.
307 (xml_fetch_content_from_file): Adjust.
308 * xml-support.h (xml_fetch_another): Change return type.
309 (xml_fetch_content_from_file): Change return type.
310 * xml-syscall.c (xml_init_syscalls_info): Adjust.
311 * xml-tdesc.c (file_read_description_xml): Adjust.
312 (fetch_available_features_from_target): Change return type.
313 (target_fetch_description_xml): Adjust.
314 (target_read_description_xml): Adjust.
316 2018-04-06 Tom Tromey <tom@tromey.com>
318 * value.c (~value): Update.
319 (struct value) <contents>: Now unique_xmalloc_ptr.
320 (value_contents_bits_eq, allocate_value_contents)
321 (value_contents_raw, value_contents_all_raw)
322 (value_contents_for_printing, value_contents_for_printing_const)
323 (set_value_enclosing_type): Update.
325 2018-04-06 Tom Tromey <tom@tromey.com>
327 * value.c (range_s): Remove typedef, VEC.
328 (struct range): Add operator<.
329 (range_lessthan): Remove.
330 (ranges_contain): Change type.
332 (struct value) <unavailable, optimized_out>: Now std::vector.
333 (value_entirely_available)
334 (value_entirely_covered_by_range_vector)
335 (value_entirely_unavailable, value_entirely_optimized_out):
337 (insert_into_bit_range_vector): Change argument type.
338 (find_first_range_overlap): Likewise.
339 (struct ranges_and_idx, value_contents_bits_eq)
340 (require_not_optimized_out, require_available): Update.
341 (ranges_copy_adjusted): Change argument types.
342 (value_optimized_out, value_copy, value_fetch_lazy): Update.
344 2018-04-06 Tom Tromey <tom@tromey.com>
346 * value.c (~value): Update.
347 (struct value) <parent>: Now a value_ref_ptr.
348 (value_parent, set_value_parent, value_address, value_copy):
351 2018-04-06 Tom Tromey <tom@tromey.com>
353 * value.c (struct value): Add constructor, destructor, and member
355 (allocate_value_lazy, value_decref): Update.
357 2018-04-06 Tom Tromey <tom@tromey.com>
359 * value.c (struct value) <released, next>: Remove.
360 (all_values): Now a std::vector.
361 (allocate_value_lazy): Update.
362 (value_next): Remove.
363 (value_mark, value_free_to_mark, release_value)
364 (value_release_to_mark): Update.
366 2018-04-06 Tom Tromey <tom@tromey.com>
368 * value.h (fetch_subexp_value, value_release_to_mark): Update.
369 (free_value_chain): Remove.
370 * value.c (free_value_chain): Remove.
371 (value_release_to_mark): Return a std::vector.
372 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
374 (check_condition): Update.
375 * eval.c (fetch_subexp_value): Change "val_chain" to a
377 * breakpoint.c (update_watchpoint): Update.
378 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
380 2018-04-06 Tom Tromey <tom@tromey.com>
382 * value.h (free_all_values): Remove.
383 * value.c (free_all_values): Remove.
385 2018-04-06 Tom Tromey <tom@tromey.com>
387 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
388 (value_history_chain, value_history_count): Remove.
389 (value_history): New global.
390 (record_latest_value, access_value_history, show_values)
391 (preserve_values): Update.
393 2018-04-06 Tom Tromey <tom@tromey.com>
395 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
396 * varobj.c (varobj_set_display_format, varobj_set_value)
397 (install_default_visualizer, construct_visualizer)
398 (install_new_value, ~varobj, varobj_get_value_type)
399 (my_value_of_variable, varobj_editable_p): Update.
400 * c-varobj.c (c_describe_child, c_value_of_variable)
401 (cplus_number_of_children, cplus_describe_child): Update.
402 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
403 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
404 (ada_value_of_variable, ada_value_is_changeable_p): Update.
406 2018-04-06 Tom Tromey <tom@tromey.com>
408 * printcmd.c (last_examine_address): Change type to
410 (do_examine, x_command): Update.
412 2018-04-06 Tom Tromey <tom@tromey.com>
414 * value.c (release_value): Update.
415 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
416 (struct bpstats) <val>: Now a value_ref_ptr.
417 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
418 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
419 (~watchpoint, print_it_watchpoint, watch_command_1)
420 (invalidate_bp_value_on_memory_change): Update.
422 2018-04-06 Tom Tromey <tom@tromey.com>
424 * varobj.c (varobj_clear_saved_item)
425 (update_dynamic_varobj_children, install_new_value, ~varobj):
427 * value.h (value_incref): Move declaration earlier.
428 (value_decref): Rename from value_free.
429 (struct value_ref_policy): New.
430 (value_ref_ptr): New typedef.
431 (struct value_deleter): Remove.
432 (gdb_value_up): Remove typedef.
433 (release_value): Change return type.
434 (release_value_or_incref): Remove.
435 * value.c (set_value_parent): Update.
436 (value_incref): Change return type.
437 (value_decref): Rename from value_free.
438 (value_free_to_mark, free_all_values, free_value_chain): Update.
439 (release_value): Return value_ref_ptr.
440 (release_value_or_incref): Remove.
441 (record_latest_value, set_internalvar, clear_internalvar):
443 * stack.c (info_frame_command): Don't call value_free.
444 * python/py-value.c (valpy_dealloc, valpy_new)
445 (value_to_value_object): Update.
446 * printcmd.c (do_examine): Update.
447 * opencl-lang.c (lval_func_free_closure): Update.
448 * mi/mi-main.c (register_changed_p): Don't call value_free.
449 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
450 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
451 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
453 * guile/scm-value.c (vlscm_free_value_smob)
454 (vlscm_scm_from_value): Update.
455 * frame.c (frame_register_unwind, frame_unwind_register_signed)
456 (frame_unwind_register_unsigned, get_frame_register_bytes)
457 (put_frame_register_bytes): Don't call value_free.
458 * findvar.c (address_from_register): Don't call value_free.
459 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
460 * dwarf2loc.c (entry_data_value_free_closure)
461 (value_of_dwarf_reg_entry, free_pieced_value_closure)
462 (dwarf2_evaluate_loc_desc_full): Update.
463 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
464 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
465 (~watchpoint, watch_command_1)
466 (invalidate_bp_value_on_memory_change): Update.
467 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
469 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
472 * warning.m4: Add -Wno-error=deprecated-register.
473 * configure: Re-generate.
475 2018-04-05 Tom Tromey <tom@tromey.com>
477 * linespec.h: Remove include of "vec.h".
479 2018-04-05 Tom Tromey <tom@tromey.com>
481 * linespec.c (typep): Remove typedef.
482 (find_methods, find_superclass_methods): Take a std::vector.
483 (find_method): Use std::vector.
485 2018-04-05 Tom Tromey <tom@tromey.com>
487 * utils.c (compare_strings): Remove.
488 * utils.h (compare_strings): Remove.
489 * objc-lang.h (find_imps): Update.
490 * objc-lang.c (find_methods): Take a std::vector.
491 (uniquify_strings, find_imps): Likewise.
492 * linespec.c (find_methods): Take a std::vector.
493 (decode_objc): Use std::vector.
494 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
496 (find_method, find_function_symbols): Use std::vector.
498 2018-04-05 Tom Tromey <tom@tromey.com>
500 * completer.c (completion_tracker::completion_tracker): Remove
502 (completion_tracker::discard_completions): Likewise.
503 * breakpoint.c (ambiguous_names_p): Remove cast.
504 * ada-lang.c (_initialize_ada_language): Remove cast.
505 * utils.h (streq): Update.
506 (streq_hash): Add new declaration.
507 * utils.c (streq): Return bool.
508 (streq_hash): New function.
510 2018-04-05 Tom Tromey <tom@tromey.com>
512 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
513 Remove a string copy.
515 2018-04-05 Tom Tromey <tom@tromey.com>
517 * linespec.c (filter_results): Use std::vector.
518 (decode_line_2, decode_line_full): Update.
520 2018-04-05 Tom Tromey <tom@tromey.com>
522 * linespec.c (canonical_to_fullform): Return std::string.
523 (filter_results): Update.
524 (struct decode_line_2_item): Add constructor.
525 <fullform, displayform>: Now std::string.
526 (decode_line_2_compare_items): Now a std::sort comparator.
527 (decode_line_2): Update.
529 2018-04-05 Tom Tromey <tom@tromey.com>
531 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
532 (unexpected_linespec_error): Update.
533 (linespec_parse_basic, parse_linespec): Update.
535 2018-04-05 Tom Tromey <tom@tromey.com>
537 * linespec.c (linespec_parse_basic): Reindent.
539 2018-04-05 Tom Tromey <tom@tromey.com>
541 * minsyms.h (iterate_over_minimal_symbols): Update.
542 * minsyms.c (iterate_over_minimal_symbols): Take a
544 * linespec.c (struct collect_minsyms): Remove.
545 (compare_msyms): Now a std::sort comparator.
546 (add_minsym): Add parameters.
547 (search_minsyms_for_name): Update. Use std::vector.
549 2018-04-03 Tom Tromey <tom@tromey.com>
551 * mipsread.c (read_alphacoff_dynamic_symtab): Use
554 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
556 * MAINTAINERS (Write After Approval): Add Weimin Pan.
558 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
561 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
562 printing static type.
564 2018-04-01 Tom Tromey <tom@tromey.com>
566 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
567 (rs6000_xfer_shared_libraries): Update.
569 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
571 * common/gdb_vecs.h (char_ptr): Remove.
572 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
574 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
576 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
578 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
580 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
582 * tracepoint.h (struct uploaded_tp): Initialize fields.
583 <actions, step_actions, cmd_strings>: Change type to
585 * tracepoint.c (get_uploaded_tp): Allocate with new.
586 (free_uploaded_tps): Free with delete.
587 (parse_tracepoint_definition): Adjust to std::vector change.
588 * breakpoint.c (read_uploaded_action): Likewise.
589 (create_tracepoint_from_upload): Likewise.
590 * ctf.c (ctf_write_uploaded_tp): Likewise.
591 (SET_ARRAY_FIELD): Likewise.
592 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
594 2018-03-30 Tom Tromey <tom@tromey.com>
596 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
598 (svr4_keep_data_in_core): Update.
599 (svr4_read_so_list): Update.
601 2018-03-30 Tom Tromey <tom@tromey.com>
603 * windows-nat.c (handle_output_debug_string, handle_exception):
605 * target.h (target_read_string): Update.
606 * target.c (target_read_string): Change "string" to
608 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
610 * solib-frv.c (frv_current_sos): Update.
611 * solib-dsbt.c (dsbt_current_sos): Update.
612 * solib-darwin.c (darwin_current_sos): Update.
613 * linux-thread-db.c (inferior_has_bug): Update.
614 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
615 Update. Remove alloca.
616 * ada-lang.c (ada_main_name): Update.
618 2018-03-30 Tom Tromey <tom@tromey.com>
620 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
621 (struct dwo_file_deleter): New.
622 (dwo_file_up): New typedef.
623 (open_and_init_dwo_file): Use dwo_file_up.
624 (free_dwo_file_cleanup): Remove.
626 2018-03-30 Tom Tromey <tom@tromey.com>
628 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
629 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
631 2018-03-30 Tom Tromey <tom@tromey.com>
633 * dwarf2read.c (class free_cached_comp_units): New class.
634 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
635 (free_cached_comp_units): Remove function.
637 2018-03-30 Tom Tromey <tom@tromey.com>
639 * utils.h (make_cleanup_unpush_target): Remove.
640 * inf-ptrace.c (struct target_unpusher): New.
641 (target_unpush_up) New typedef.
642 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
644 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
646 2018-03-27 Tom Tromey <tom@tromey.com>
648 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
650 2018-03-27 Pedro Alves <palves@redhat.com>
651 Tom Tromey <tom@tromey.com>
653 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
654 destructor. Now a class.
655 (gdb_readline_wrapper_cleanup): Remove function.
656 (gdb_readline_wrapper): Remove cleanups.
658 2018-03-27 Tom Tromey <tom@tromey.com>
660 * typeprint.h (struct type_print_options) <local_typedefs,
661 global_typedefs>: Remove "struct" keyword.
662 (class typedef_hash_table): New class.
663 (recursively_update_typedef_hash, add_template_parameters)
664 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
665 (find_typedef_in_hash): Don't declare.
666 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
667 (typedef_hash_table::recursively_update): Rename from
668 recursively_update_typedef_hash. Now a member.
669 (typedef_hash_table::add_template_parameters): Rename from
670 add_template_parameters. Now a member.
671 (typedef_hash_table::typedef_hash_table): Now a constructor;
672 rename from create_typedef_hash.
673 (typedef_hash_table::~typedef_hash_table): Now a destructor;
674 rename from free_typedef_hash.
675 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
676 (do_free_global_table): Remove.
677 (typedef_hash_table::typedef_hash_table): New constructor; renamed
678 from copy_type_recursive.
679 (create_global_typedef_table): Remove.
680 (typedef_hash_table::find_global_typedef): Now a member of
682 (typedef_hash_table::find_typedef): Rename from
683 find_typedef_in_hash; now a member.
684 (whatis_exp): Update.
685 * extension.h (struct ext_lang_type_printers): Add constructor and
687 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
689 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
690 Now a constructor; rename from start_ext_lang_type_printers.
691 (ext_lang_type_printers): Now a destructor; rename from
692 free_ext_lang_type_printers.
693 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
695 (c_type_print_base_struct_union): Update. Remove cleanups.
697 2018-03-27 Tom Tromey <tom@tromey.com>
699 * dwarf-index-write.c: Include <cmath>.
701 2018-03-27 Joel Brobecker <brobecker@adacore.com>
703 * NEWS: Add entry describing new "set|show varsize-limit" command.
704 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
706 * printcmd.c (_initialize_printcmd): Add "set var" alias of
709 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
711 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
713 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
714 * dwarf-index-common.c: New file.
715 * dwarf-index-common.h: New file.
716 * dwarf-index-write.c: New file.
717 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
718 (struct dwarf2_section_info): Move from here.
719 (dwarf2_section_info_def): Likewise.
720 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
721 (offset_type): Likewise.
722 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
723 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
724 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
725 (byte_swap): Likewise.
726 (MAYBE_SWAP): Likewise.
727 (dwarf2_per_cu_ptr): Likewise.
728 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
729 (struct tu_stats): Likewise.
730 (struct dwarf2_per_objfile): Likewise.
731 (struct dwarf2_per_cu_data): Likewise.
732 (struct signatured_type): Likewise.
733 (sig_type_ptr): Likewise.
734 (DEF_VEC_P (sig_type_ptr)): Likewise.
735 (INDEX4_SUFFIX): Likewise.
736 (INDEX5_SUFFIX): Likewise.
737 (DEBUG_STR_SUFFIX): Likewise.
738 (dwarf2_read_section): Make non-static.
739 (mapped_index_string_hash): Move from here.
740 (dwarf5_djb_hash): Likewise.
741 (file_write): Likewise.
742 (class data_buf): Likewise.
743 (struct symtab_index_entry): Likewise.
744 (struct mapped_symtab): Likewise.
745 (find_slot): Likewise.
746 (hash_expand): Likewise.
747 (add_index_entry): Likewise.
748 (uniquify_cu_indices): Likewise.
749 (class c_str_view): Likewise.
750 (class c_str_view_hasher): Likewise.
751 (class vector_hasher): Likewise.
752 (write_hash_table): Likewise.
753 (psym_index_map): Likewise.
754 (struct addrmap_index_data): Likewise.
755 (add_address_entry): Likewise.
756 (add_address_entry_worker): Likewise.
757 (write_address_map): Likewise.
758 (symbol_kind): Likewise.
759 (write_psymbols): Likewise.
760 (struct signatured_type_index_data): Likewise.
761 (write_one_signatured_type): Likewise.
762 (recursively_count_psymbols): Likewise.
763 (recursively_write_psymbols): Likewise.
764 (class debug_names): Likewise.
765 (check_dwarf64_offsets): Likewise.
766 (psyms_seen_size): Likewise.
767 (write_gdbindex): Likewise.
768 (write_debug_names): Likewise.
769 (assert_file_size): Likewise.
770 (write_psymtabs_to_index): Likewise.
771 (save_gdb_index_command): Likewise.
772 (_initialize_dwarf2_read): Don't register the "save gdb-index"
774 * dwarf2read.h: New file.
776 2018-03-27 Joel Brobecker <brobecker@adacore.com>
779 * dwarf2read.c (dwarf2_physname): Do not return the demangled
780 symbol name if the CU's language stores symbol names in linkage
782 * language.h (struct language_defn)
783 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
784 all instances of this struct.
786 2018-03-26 Tom Tromey <tom@tromey.com>
788 * stack.c (backtrace_command_1): Remove verbose code.
790 2018-03-26 Tom Tromey <tom@tromey.com>
792 * python/py-framefilter.c (py_print_type): Don't catch
793 exceptions. Return void.
794 (py_print_value): Likewise.
795 (py_print_single_arg): Likewise.
796 (enumerate_args): Don't catch exceptions.
797 (py_print_args): Likewise.
798 (py_print_frame): Likewise.
799 (gdbpy_apply_frame_filter): Catch exceptions here.
801 2018-03-26 Tom Tromey <tom@tromey.com>
803 * stack.c (_initialize_stack): Remove trailing newlines from help
804 text. Add "Usage" line to "backtrace" help.
806 2018-03-26 Tom Tromey <tom@tromey.com>
809 * python/py-framefilter.c (py_print_args): Call wrap_hint.
811 2018-03-26 Tom Tromey <tom@tromey.com>
813 * python/py-framefilter.c (py_print_single_arg): Return
814 EXT_LANG_BT_ERROR from catch.
816 2018-03-26 Tom Tromey <tom@tromey.com>
819 * stack.c (backtrace_command_1): Move some code into no-filters
822 2018-03-26 Tom Tromey <tom@tromey.com>
824 * python/py-framefilter.c (throw_quit_or_print_exception): New
826 (gdbpy_apply_frame_filter): Use it.
828 2018-03-26 Tom Tromey <tom@tromey.com>
831 * python/py-framefilter.c (py_print_type, py_print_value)
832 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
835 2018-03-26 Tom Tromey <tom@tromey.com>
837 * python/py-framefilter.c (enumerate_args): Use
838 gdb::unique_xmalloc_ptr.
840 2018-03-26 Tom Tromey <tom@tromey.com>
842 * python/py-framefilter.c (py_print_frame): Return
844 (gdbpy_apply_frame_filter): Update comment.
845 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
847 <EXT_LANG_BT_NO_FILTERS>: Change value.
849 2018-03-26 Tom Tromey <tom@tromey.com>
852 * stack.c (backtrace_command): Parse "hide" argument.
853 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
854 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
857 2018-03-26 Tom Tromey <tom@tromey.com>
859 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
861 (backtrace_command): Remove "fulltrace", add "flags".
863 2018-03-26 Tom Tromey <tom@tromey.com>
865 * stack.c (backtrace_command): Rewrite command line parsing.
867 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
869 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
871 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
873 * filename-seen-cache.h: Add include guard.
875 2018-03-26 Keith Seitz <keiths@redhat.com>
877 * symfile.c (place_section): Remove "struct" from section_addr_info
879 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
880 "struct" keyword from section_addr_info.
882 2018-03-26 Alan Hayward <alan.hayward@arm.com>
884 * regformats/regdef.h (reg): Add constructors.
886 2018-03-25 Pedro Alves <palves@redhat.com>
888 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
889 if then/else bodies in var_func_name extraction.
891 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
893 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
894 lookup_minimal_symbol() to find symbol entry.
895 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
897 2018-03-23 Keith Seitz <keiths@redhat.com>
900 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
901 nested type definitions for C++, too.
903 2018-03-23 Tom Tromey <tom@tromey.com>
905 * machoread.c (struct oso_el): Add a constructor. Don't define as
907 (macho_register_oso): Remove.
908 (macho_symtab_read): Take a std::vector.
909 (oso_el_compare_name): Now a std::sort comparator.
910 (macho_symfile_read_all_oso): Take a std::vector.
911 (macho_symfile_read): Use std::vector. Remove cleanups.
913 2018-03-22 Tom Tromey <tom@tromey.com>
915 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
916 (record_full_goto_bookmark): Use std::string.
918 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
921 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
924 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
926 * rs6000-tdep.c (store_insn_p): New function.
927 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
928 and cr_reg to their unshifted values. Use store_insn_p to
929 match LR saves using either R1 or fdata->alloca_reg. Use
930 store_insn_p to match CR saves. Set alloca_reg_offset
931 when alloca_reg and framep are set. Remove lr_reg shift
932 when assigning to fdata->lr_register.
934 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
936 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
937 command line args instead of emitting a warning.
939 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
941 * tracepoint.h (struct static_tracepoint_marker): Initialize
942 fields, define default constructor, move constructor and move
943 assignment, disable the rest.
944 <str_id, extra>: Make std::string.
945 (release_static_tracepoint_marker): Remove.
946 (free_current_marker): Remove.
947 * tracepoint.c (free_current_marker): Remove.
948 (parse_static_tracepoint_marker_definition): Adjust to
949 std::string, use new hex2str overload.
950 (release_static_tracepoint_marker): Remove.
951 (print_one_static_tracepoint_marker): Get marker by reference
952 and adjust to std::string.
953 (info_static_tracepoint_markers_command): Adjust to std::vector
955 * target.h (static_tracepoint_marker_p): Remove typedef.
956 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
957 (struct target_ops) <to_static_tracepoint_marker_at>: Return
959 <to_static_tracepoint_markers_by_strid>: Return std::vector.
961 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
962 (target_debug_print_std_vector_static_tracepoint_marker): New.
963 (target_debug_print_struct_static_tracepoint_marker_p): Rename
965 (target_debug_print_static_tracepoint_marker_p): ... this.
966 * target-delegates.c: Re-generate.
967 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
969 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
970 (decode_static_tracepoint_spec): Adjust to std::vector.
971 (tracepoint_print_one_detail): Adjust to std::string.
972 (strace_marker_decode_location): Adjust to std::string.
973 (update_static_tracepoint): Adjust to std::string, remove call
974 to release_static_tracepoint_marker.
975 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
976 Adjust to std::vector.
977 * remote.c (remote_static_tracepoint_marker_at): Return bool.
978 (remote_static_tracepoint_markers_by_strid): Adjust to
980 * common/rsp-low.h (hex2str): New overload with explicit count
982 * common/rsp-low.c (hex2str): New overload with explicit count
984 * unittests/rsp-low-selftests.c (test_hex2str): New function.
985 (_initialize_rsp_low_selftests): Add test_hex2str test.
986 * unittests/tracepoint-selftests.c
987 (test_parse_static_tracepoint_marker_definition): Adjust to
990 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
992 * tracepoint.c (parse_static_tracepoint_marker_definition):
993 Consider case where the definition is followed by more
995 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
996 tracepoint-selftests.c.
997 * unittests/tracepoint-selftests.c: New.
999 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1001 * MAINTAINERS (Write After Approval): Add Pedro Franco de
1004 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1006 * symtab.c (find_pc_sect_line): fixed indentation.
1008 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1010 * symtab.c (find_pc_sect_line): now uses binary search.
1012 2018-03-19 Tom Tromey <tom@tromey.com>
1014 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1017 2018-03-19 Pedro Alves <palves@redhat.com>
1018 Tom Tromey <tom@tromey.com>
1020 * unittests/observable-selftests.c: New file.
1021 * common/observable.h: New file.
1022 * observable.h: New file.
1023 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1024 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1025 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1026 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1027 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1028 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1029 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1030 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1031 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1032 python/py-breakpoint.c, python/py-finishbreakpoint.c,
1033 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1034 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1035 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1036 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1037 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1038 tui/tui-interp.c, valops.c: Update all users.
1039 * tui/tui-hooks.c (tui_bp_created_observer)
1040 (tui_bp_deleted_observer, tui_bp_modified_observer)
1041 (tui_inferior_exit_observer, tui_before_prompt_observer)
1042 (tui_normal_stop_observer, tui_register_changed_observer):
1044 (tui_observers_token): New global.
1045 (attach_or_detach, tui_attach_detach_observers): New functions.
1046 (tui_install_hooks, tui_remove_hooks): Use
1047 tui_attach_detach_observers.
1048 * record-btrace.c (record_btrace_thread_observer): Remove.
1049 (record_btrace_thread_observer_token): New global.
1050 * observer.sh: Remove.
1051 * observer.c: Rename to observable.c.
1052 * observable.c (namespace gdb_observers): Define new objects.
1053 (observer_debug): Move into gdb_observers namespace.
1054 (struct observer, struct observer_list, xalloc_observer_list_node)
1055 (xfree_observer_list_node, generic_observer_attach)
1056 (generic_observer_detach, generic_observer_notify): Remove.
1057 (_initialize_observer): Update.
1058 Don't include observer.inc.
1059 * Makefile.in (generated_files): Remove observer.h, observer.inc.
1060 (clean mostlyclean): Likewise.
1061 (observer.h, observer.inc): Remove targets.
1062 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1063 (COMMON_SFILES): Use observable.c, not observer.c.
1064 * .gitignore: Remove observer.h.
1066 2018-03-18 Tom Tromey <tom@tromey.com>
1068 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1070 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1072 2018-03-17 Tom Tromey <tom@tromey.com>
1074 * auto-load.c (auto_load_objfile_script_1): Use std::string.
1076 2018-03-17 Tom Tromey <tom@tromey.com>
1078 * target.c (class scoped_target_fd): New.
1079 (target_fileio_close_cleanup): Remove.
1080 (target_fileio_read_alloc_1): Use scoped_target_fd.
1082 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1084 * silent-rules.mk: New.
1085 * Makefile.in: Include silent-rules.mk
1086 (srcdir, VPATH, top_srcdir): Move up.
1087 (COMPILE): Add ECHO_CXX.
1088 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
1089 (init.c): Add ECHO_INIT_C.
1090 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1091 (version.c): Add ECHO_GEN.
1092 (printcmd.o): Add ECHO_CXX.
1093 (target-float.o): Add ECHO_CXX.
1094 (ada-exp.o): Add ECHO_CXX.
1095 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
1096 (insight$(EXEEXT)): Add ECHO_CXXLD.
1097 * gnulib/configure.ac: Add AM_SILENT_RULES.
1098 * gnulib/aclocal.m4: Re-generate.
1099 * gnulib/configure: Re-generate.
1100 * gnulib/import/Makefile.in: Re-generate.
1102 2018-03-16 Tom Tromey <tom@tromey.com>
1104 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
1105 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
1106 * utils.c (do_free_section_addr_info)
1107 (make_cleanup_free_section_addr_info): Remove.
1108 * symfile.h (struct other_sections): Add constructor.
1109 (struct section_addr_info): Remove.
1110 (section_addr_info): New typedef.
1111 (struct sym_fns) <sym_offsets>: Change type of parameter.
1112 (build_section_addr_info_from_objfile)
1113 (relative_addr_info_to_section_offsets, addr_info_make_relative)
1114 (default_symfile_offsets, symbol_file_add)
1115 (symbol_file_add_from_bfd)
1116 (build_section_addr_info_from_section_table): Update.
1117 (alloc_section_addr_info, free_section_addr_info): Don't declare.
1118 * symfile.c (alloc_section_addr_info): Remove.
1119 (build_section_addr_info_from_section_table): Change return type.
1121 (build_section_addr_info_from_bfd)
1122 (build_section_addr_info_from_objfile): Likewise.
1123 (free_section_addr_info): Remove.
1124 (relative_addr_info_to_section_offsets): Change type of "addrs".
1125 (addrs_section_compar): Now a std::sort comparator.
1126 (addrs_section_sort): Change return type.
1127 (addr_info_make_relative): Change type of "addrs". Update.
1128 (default_symfile_offsets, syms_from_objfile_1)
1129 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
1130 (symbol_file_add_separate): Update.
1131 (symbol_file_add): Change type of "addrs". Update.
1132 (add_symbol_file_command): Update. Remove cleanups.
1133 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
1135 * symfile-debug.c (debug_sym_offsets): Change type of "info".
1136 * solib.c (solib_read_symbols): Update.
1137 * objfiles.c (objfile_relocate): Update. Remove cleanups.
1138 * machoread.c (macho_symfile_offsets): Update.
1139 * jit.c (jit_bfd_try_read_symtab): Update.
1141 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
1143 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1144 unittests/utils-selftests.c.
1145 * unittests/utils-selftests.c: New file.
1147 2018-03-14 Tom Tromey <tom@tromey.com>
1150 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
1153 2018-03-14 Tom Tromey <tom@tromey.com>
1156 * printcmd.c (printf_pointer): Allow "-" in format.
1158 2018-03-14 Tom Tromey <tom@tromey.com>
1160 * printcmd.c (_initialize_printcmd): Add usage to printf.
1162 2018-03-14 Yao Qi <qiyao@sourceware.org>
1164 * MAINTAINERS: Update my email address.
1166 2018-03-13 Tom Tromey <tom@tromey.com>
1168 * machoread.c (macho_check_dsym): Change filenamep to a
1170 (macho_symfile_read): Update.
1171 * symfile.c (load_command): Use std::string.
1173 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
1175 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
1176 to error message string.
1177 (riscv_register_name): Use xsnprintf instead of sprintf.
1178 (riscv_insn::fetch_instruction): Use gdb_assert instead of
1180 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
1182 (riscv_push_dummy_call): Likewise.
1184 2018-03-12 Tom Tromey <tom@tromey.com>
1186 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
1187 Use gdb::byte_vector.
1188 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
1190 2018-03-12 Yao Qi <yao.qi@linaro.org>
1192 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
1193 parameter type to readable_regcache.
1194 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
1197 2018-03-11 Tom Tromey <tom@tromey.com>
1199 * dwarf2read.c (struct nextfield): Add initializers.
1200 (struct nextfnfield): Remove.
1201 (struct fnfieldlist): Add initializers. Remove "length" and
1202 "head", use std::vector.
1203 (struct decl_field_list): Remove.
1204 (struct field_info): Add initializers.
1205 <fields, baseclasses>: Now std::vector.
1206 <nbaseclasses, nfnfields, typedef_field_list_count,
1207 nested_types_list_count>: Remove.
1208 (dwarf2_add_field, dwarf2_add_type_defn)
1209 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
1210 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
1211 (process_structure_scope): Update.
1213 2018-03-11 Tom Tromey <tom@tromey.com>
1215 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
1216 for use by std::sort.
1217 (build_type_psymtabs_1): Use std::vector.
1219 2018-03-09 Eli Zaretskii <eliz@gnu.org>
1221 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
1222 and LIBMPFR in the printed configuration.
1224 2018-03-08 Tom Tromey <tom@tromey.com>
1226 * source.c (get_filename_and_charpos): Use scoped_fd.
1227 * nto-procfs.c (procfs_open_1): Use scoped_fd.
1228 (procfs_pidlist): Likewise.
1229 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
1230 (iterate_over_mappings): Likewise.
1232 2018-03-08 Tom Tromey <tom@tromey.com>
1234 * infcall.c (struct call_return_meta_info)
1235 <stack_temporaries_enabled>: Remove.
1236 (get_call_return_value, call_function_by_hand_dummy): Update.
1237 * thread.c (disable_thread_stack_temporaries): Remove.
1238 (enable_thread_stack_temporaries): Remove.
1239 (thread_stack_temporaries_enabled_p): Return bool.
1240 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
1241 (get_last_thread_stack_temporary): Update.
1242 * eval.c (evaluate_subexp): Update.
1243 * gdbthread.h (class enable_thread_stack_temporaries): Now a
1244 class, not a function.
1245 (value_ptr, value_vec): Remove typedefs.
1246 (class thread_info) <stack_temporaries_enabled>: Now bool.
1247 <stack_temporaries>: Now a std::vector.
1248 (thread_stack_temporaries_enabled_p)
1249 (value_in_thread_stack_temporaries): Return bool.
1251 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
1253 * remote.c (putpkt_binary): Fix omitted bytes reporting.
1254 (getpkt_or_notif_sane_1): Likewise.
1256 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1258 * build-id.c (build_id_to_debug_bfd): Use std::string.
1260 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1262 * build-id.c (find_separate_debug_file_by_buildid): Return
1264 * build-id.h (find_separate_debug_file_by_buildid): Return
1266 * coffread.c (coff_symfile_read): Adjust to std::string.
1267 * elfread.c (elf_symfile_read): Adjust to std::string.
1268 * symfile.c (separate_debug_file_exists): Change parameter to
1270 (find_separate_debug_file): Return std::string.
1271 (find_separate_debug_file_by_debuglink): Return std::string.
1272 * symfile.h (find_separate_debug_file_by_debuglink): Return
1275 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1277 * common/xml-utils.c (xml_escape_text): Move code to...
1278 (xml_escape_text_append): ... this new function.
1279 * common/xml-utils.h (xml_escape_text_append): New declaration.
1280 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
1282 (_initialize_xml_utils): register test_xml_escape_text_append as
1285 2018-03-07 Alan Hayward <alan.hayward@arm.com>
1287 * defs.h: Remove MAX_REGISTER_SIZE.
1288 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
1290 * python/py-unwind.c (pyuw_sniffer): Likewise.
1292 2018-03-07 Tom Tromey <tom@tromey.com>
1294 * linux-tdep.c (linux_info_proc): Update.
1295 * target.h (struct target_ops) <to_fileio_readlink>: Return
1297 (target_fileio_readlink): Return optional<string>.
1298 * remote.c (remote_hostio_readlink): Return optional<string>.
1299 * inf-child.c (inf_child_fileio_readlink): Return
1301 * target.c (target_fileio_readlink): Return optional<string>.
1303 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
1305 * regcache.c (cooked_read_test): Add riscv to the list of
1306 architectures that have a save_reggroup.
1308 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
1310 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
1311 value is not a dynamic class object.
1313 2018-03-06 Tom Tromey <tom@tromey.com>
1315 * rust-exp.y: Formatting fixes.
1317 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1319 * riscv-tdep.c (riscv_register_name): Remove target description
1321 (riscv_gdbarch_init): Remove target description check.
1323 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1325 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
1327 * riscv-tdep.h: Likewise.
1329 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1331 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
1332 (riscv_pseudo_register_write): Delete.
1333 (riscv_gdbarch_init): Remove all use of pseudo registers.
1335 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1337 * record-btrace.c (btrace_print_lines): Replace cleanup
1338 parameter with RAII equivalents.
1339 (btrace_insn_history): Replace cleanup with RAII equivalents.
1340 * ui-out.h (make_cleanup_ui_out_list_begin_end,
1341 make_cleanup_ui_out_tuple_begin_end): Remove.
1342 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
1343 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
1344 make_cleanup_ui_out_list_begin_end): Remove.
1346 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1348 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
1349 parameter types to std::vector. Use bool.
1350 (record_btrace_wait): Replace VEC(tp_t) with
1351 std::vector<thread_info *>.
1352 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
1354 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1356 * record-btrace.c (record_btrace_disable_callback): Remove.
1357 (struct scoped_btrace_disable): New.
1358 (record_btrace_open): Use scoped_btrace_disable.
1360 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1362 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
1363 reading values from registers.
1365 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1367 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
1370 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1372 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
1373 change parameter type. Use GDB's print functions, and use
1374 core_addr_to_string where appropriate.
1375 (riscv_push_dummy_call): Use core_addr_to_string where
1376 appropriate, update call to riscv_print_arg_location, and reindent
1378 (riscv_return_value): Update call to riscv_print_arg_location.
1380 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1381 Tim Newsome <tim@sifive.com>
1382 Albert Ou <a0u@eecs.berkeley.edu>
1383 Darius Rad <darius@bluespec.com>
1385 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
1386 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
1387 (ALLDEPFILES): Add riscv-tdep.c
1388 * configure.tgt: Add riscv support.
1389 * riscv-tdep.c: New file.
1390 * riscv-tdep.h: New file.
1391 * NEWS: Mention new target.
1392 * MAINTAINERS: Add entry for riscv.
1394 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1396 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
1397 fields within aggregates.
1399 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
1401 * record-btrace.c (btrace_print_lines): Change type of flags to
1402 gdb_disassembly_flags.
1404 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1406 * fbsd-nat.c: Include "inf-ptrace.h".
1407 (USE_SIGTRAP_SIGINFO): Conditionally define.
1408 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
1409 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
1410 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
1412 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
1414 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
1416 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
1417 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
1418 "supports_stopped_by_hw_breakpoint" target methods.
1420 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1422 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
1423 * fbsd-nat.c (debug_fbsd_nat): New variable.
1424 (show_fbsd_nat_debug): New function.
1425 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
1426 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
1428 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1430 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
1431 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
1433 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
1434 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
1437 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1439 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
1440 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
1442 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1444 * charset.c (struct charset_vector): New.
1445 (charsets): Change type to charset_vector.
1446 (find_charset_names): Adjust.
1448 (_initialize_charset): Adjust.
1450 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1452 * progspace.h (struct program_space) <deleted_solibs>: Change
1453 type to std::vector<std::string>.
1454 * progspace.c (clear_program_space_solib_cache): Adjust.
1455 * breakpoint.c (print_solib_event): Adjust.
1456 (check_status_catch_solib): Adjust.
1457 * solib.c (update_solib_list): Adjust.
1458 * ui-out.h (class ui_out) <field_string>: New overload.
1459 * ui-out.c (ui_out::field_string): New overload.
1461 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1463 * progspace.h (struct program_space): Add constructor and
1464 destructor, initialize fields.
1465 (add_program_space): Remove.
1466 * progspace.c (add_program_space): Rename to...
1467 (program_space::program_space): ... this.
1468 (release_program_space): Rename to...
1469 (program_space::~program_space): ... this.
1470 (delete_program_space): Use delete to delete program_space.
1471 (initialize_progspace): Use new to allocate program_space.
1472 * inferior.c (add_inferior_with_spaces): Likewise.
1473 (clone_inferior_command): Likewise.
1474 * infrun.c (follow_fork_inferior): Likewise.
1475 (handle_vfork_child_exec_or_exit): Likewise.
1477 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1479 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
1480 (delim_string_to_char_ptr_vec): Return std::vector of
1481 gdb::unique_xmalloc_ptr.
1482 (dirnames_to_char_ptr_vec_append): Take std::vector of
1483 gdb::unique_xmalloc_ptr.
1484 (dirnames_to_char_ptr_vec): Return std::vector of
1485 gdb::unique_xmalloc_ptr.
1486 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
1487 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
1488 (delim_string_to_char_ptr_vec): Return an std::vector of
1489 gdb::unique_xmalloc_ptr, adjust the code.
1490 (dirnames_to_char_ptr_vec_append): Take an std::vector of
1491 gdb::unique_xmalloc_ptr, adjust the code.
1492 (dirnames_to_char_ptr_vec): Return an std::vector of
1493 gdb::unique_xmalloc_ptr, adjust the code.
1494 * auto-load.c (auto_load_safe_path_vec): Change type to
1495 std::vector of gdb::unique_xmalloc_ptr.
1496 (auto_load_expand_dir_vars): Return an std::vector of
1497 gdb::unique_xmalloc_ptr, adjust the code.
1498 (auto_load_safe_path_vec_update): Adjust.
1499 (filename_is_in_auto_load_safe_path_vec): Adjust.
1500 (auto_load_objfile_script_1): Adjust.
1501 * build-id.c (build_id_to_debug_bfd): Adjust.
1502 * linux-thread-db.c (thread_db_load_search): Adjust.
1503 * source.c (add_path): Adjust.
1505 * symfile.c (find_separate_debug_file): Adjust.
1506 * utils.c (do_free_char_ptr_vec): Remove.
1507 (make_cleanup_free_char_ptr_vec): Remove.
1509 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
1512 * common/pathstuff.c: Conditionally include "<windows.h>".
1514 2018-03-01 Georg Sauthoff <mail@georg.so>
1517 * gcore.in: Quote variables and switch interpreter to bash.
1519 2018-03-01 Tom Tromey <tom@tromey.com>
1521 * dwarf2read.c (alloc_discriminant_info): Fix default_index
1522 assertion. Add assertion for discriminant_index.
1523 (quirk_rust_enum): Use correct base type name in univariant case.
1525 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
1527 * record.c (get_call_history_modifiers): Return a
1529 (cmd_record_call_history): Adjust.
1530 * record-btrace.c (record_btrace_call_history): Adjust.
1531 (record_btrace_call_history_range): Adjust.
1532 (record_btrace_call_history_from): Adjust.
1533 * target-debug.h (target_debug_print_record_print_flags): New.
1534 * target-delegates.c: Re-generate.
1535 * target.c (target_call_history): Change flags type.
1536 (target_call_history_from): Likewise.
1537 (target_call_history_range): Likewise.
1538 * target.h (struct target_ops) <target_call_history>: Likewise.
1539 (target_call_history_from): Likewise.
1540 (target_call_history_range): Likewise.
1542 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1543 Simon Marchi <simon.marchi@polymtl.ca>
1545 * common/common-utils.c: Include "sys/stat.h".
1546 (is_regular_file): Move here from "source.c"; change return
1548 * common/common-utils.h (is_regular_file): New prototype.
1549 * common/pathstuff.c (contains_dir_separator): New function.
1550 * common/pathstuff.h (contains_dir_separator): New prototype.
1551 * source.c: Don't include "sys/stat.h".
1552 (is_regular_file): Move to "common/common-utils.c".
1554 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1556 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
1557 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
1558 * auto-load.c: Include "common/pathstuff.h".
1559 * common/common-def.h (current_directory): Move here.
1560 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
1562 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
1564 * common/pathstuff.c: New file.
1565 * common/pathstuff.h: New file.
1566 * compile/compile.c: Include "common/pathstuff.h".
1567 * defs.h (current_directory): Move to "common/common-defs.h".
1568 * dwarf2read.c: Include "common/pathstuff.h".
1570 * guile/scm-safe-call.c: Likewise.
1571 * linux-thread-db.c: Likewise.
1573 * nto-tdep.c: Likewise.
1574 * objfiles.c: Likewise.
1575 * source.c: Likewise.
1576 * symtab.c: Likewise.
1577 * utils.c: Include "common/pathstuff.h".
1578 (gdb_realpath): Move to "common/pathstuff.c".
1579 (gdb_realpath_keepfile): Likewise.
1580 (gdb_abspath): Likewise.
1581 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
1582 (gdb_realpath_keepfile): Likewise.
1583 (gdb_abspath): Likewise.
1585 2018-02-28 John Baldwin <jhb@FreeBSD.org>
1587 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
1588 wildcard process pid for super_resume for kernels with a
1591 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
1593 * compile/compile.c (get_args): Add additional comments
1594 explaining function.
1596 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
1597 Tom Tromey <tom@tromey.com>
1599 * target.h (memory_write_request_s): Remove typedef. Don't define
1601 (target_write_memory_blocks): Change argument to std::vector.
1602 (struct memory_write_request): Add constructor.
1603 * target-memory.c (compare_block_starting_address): Return bool.
1604 Change argument types.
1605 (claim_memory): Change arguments to use std::vector.
1606 (split_regular_and_flash_blocks, blocks_to_erase)
1607 (compute_garbled_blocks): Likewise.
1608 (cleanup_request_data, cleanup_write_requests_vector): Remove.
1609 (target_write_memory_blocks): Change argument to std::vector.
1610 * symfile.c (struct load_section_data): Add constructor and
1611 destructor. Use std::vector for "requests".
1612 (struct load_progress_data): Add initializers.
1613 (load_section_callback): Update. Use "new".
1614 (clear_memory_write_data): Remove.
1615 (generic_load): Update.
1617 2018-02-27 Alan Hayward <alan.hayward@arm.com>
1619 * arch/aarch64.h: Use common/tdesc.h.
1621 2018-02-26 Maciej W. Rozycki <macro@mips.com>
1623 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
1624 architecture with a 64-bit ABI.
1626 2018-02-26 Maciej W. Rozycki <macro@mips.com>
1628 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
1629 ahead of target description loading.
1631 2018-02-26 Tom Tromey <tom@tromey.com>
1633 * stack.c (backtrace_command_1): Update.
1634 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
1636 * python/py-framefilter.c (py_print_frame)
1637 (gdbpy_apply_frame_filter): Change type of "flags".
1638 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
1640 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
1641 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
1642 * extension.h (enum frame_filter_flag): Rename from
1644 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
1645 (apply_ext_lang_frame_filter): Change type of "flags".
1646 * extension.c (apply_ext_lang_frame_filter): Change type of
1648 * extension-priv.h (struct extension_language_ops)
1649 <apply_frame_filter>: Change type of "flags".
1651 2018-02-26 Tom Tromey <tom@tromey.com>
1654 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
1655 off-by-one in py_end computation.
1656 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
1658 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
1661 2018-02-26 Tom Tromey <tom@tromey.com>
1663 * dwarf2read.c (struct variant_field): New.
1664 (struct nextfield) <variant>: New field.
1665 (dwarf2_add_field): Handle DW_TAG_variant_part.
1666 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
1667 discriminated union.
1668 (read_structure_type): Handle DW_TAG_variant_part.
1669 (handle_struct_member_die): New function, extracted from
1670 process_structure_scope. Handle DW_TAG_variant.
1671 (process_structure_scope): Handle discriminated unions. Call
1672 handle_struct_member_die.
1674 2018-02-26 Tom Tromey <tom@tromey.com>
1676 * rust-lang.h (rust_last_path_segment): Declare.
1677 * rust-lang.c (rust_last_path_segment): Now public. Change
1679 (struct disr_info): Remove.
1680 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
1681 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
1682 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
1683 (rust_enum_p, rust_enum_variant): New function.
1684 (rust_underscore_fields): Remove "offset" parameter.
1685 (rust_print_enum): New function.
1686 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
1687 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
1688 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
1690 (rust_internal_print_type): New function, from rust_print_type.
1692 (rust_print_type): Call rust_internal_print_type.
1693 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
1694 Update enum handling.
1695 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
1696 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
1697 (rust_union_quirks): New functions.
1698 (process_full_comp_unit, process_full_type_unit): Call
1700 (process_structure_scope): Update rust_unions if necessary.
1702 2018-02-26 Tom Tromey <tom@tromey.com>
1704 * value.h (value_union_variant): Declare.
1705 * valops.c (value_union_variant): New function.
1706 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
1707 (struct discriminant_info): New.
1708 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
1710 (struct main_type) <flag_discriminated_union>: New field.
1712 2018-02-26 Tom Tromey <tom@tromey.com>
1714 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1715 unittests/unpack-selftests.c.
1716 * unittests/unpack-selftests.c: New file.
1717 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
1719 2018-02-26 Yao Qi <yao.qi@linaro.org>
1721 * dwarf2read.c (struct partial_die_info) <read>: New method.
1722 (read_partial_die): Remove the declaration.
1723 (load_partial_dies): Update.
1724 (partial_die_info::partial_die_info):
1725 (read_partial_die): Change it to partial_die_info::read.
1727 2018-02-26 Yao Qi <yao.qi@linaro.org>
1729 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
1730 (fixup_partial_die): Remove declaration.
1731 (scan_partial_symbols): Update.
1732 (partial_die_parent_scope): Likewise.
1733 (partial_die_full_name): Likewise.
1734 (fixup_partial_die): Change it to partial_die_info::fixup.
1736 2018-02-26 Yao Qi <yao.qi@linaro.org>
1738 * dwarf2read.c (read_partial_die): Update the declaration.
1739 (load_partial_dies): Caller update.
1740 (read_partial_die): Remove one argument abbrev_len.
1742 2018-02-26 Yao Qi <yao.qi@linaro.org>
1744 * dwarf2read.c (struct partial_die_info): Add ctor, delete
1745 assignment operator.
1746 (load_partial_dies): Use ctor and copy ctor.
1747 (read_partial_die): Update.
1748 (dwarf2_cu::find_partial_die): Use ctor.
1750 2018-02-26 Yao Qi <yao.qi@linaro.org>
1752 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
1753 (find_partial_die_in_comp_unit): Change it to
1754 dwarf2_cu::find_partial_die.
1755 (find_partial_die): Update.
1757 2018-02-26 Yao Qi <yao.qi@linaro.org>
1759 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
1762 2018-02-26 Yao Qi <yao.qi@linaro.org>
1764 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
1766 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1768 * arch/amd64.h: Use common/tdesc.h.
1769 * arch/i386.c: Likewise.
1770 * arch/i386.h: Likewise.
1771 * arch/tic6x.c: Likewise.
1772 * arch/tdesc.h: Move file from here...
1773 * common/tdesc.h: ...to here.
1774 * features/aarch64-core.c: Regenerate.
1775 * features/aarch64-fpu.c: Regenerate.
1776 * features/i386/32bit-avx.c: Regenerate.
1777 * features/i386/32bit-avx512.c: Regenerate.
1778 * features/i386/32bit-core.c: Regenerate.
1779 * features/i386/32bit-linux.c: Regenerate.
1780 * features/i386/32bit-mpx.c: Regenerate.
1781 * features/i386/32bit-pkeys.c: Regenerate.
1782 * features/i386/32bit-sse.c: Regenerate.
1783 * features/i386/64bit-avx.c: Regenerate.
1784 * features/i386/64bit-avx512.c: Regenerate.
1785 * features/i386/64bit-core.c: Regenerate.
1786 * features/i386/64bit-linux.c: Regenerate.
1787 * features/i386/64bit-mpx.c: Regenerate.
1788 * features/i386/64bit-pkeys.c: Regenerate.
1789 * features/i386/64bit-segments.c: Regenerate.
1790 * features/i386/64bit-sse.c: Regenerate.
1791 * features/i386/x32-core.c: Regenerate.
1792 * features/tic6x-c6xp.c: Regenerate.
1793 * features/tic6x-core.c: Regenerate.
1794 * features/tic6x-gp.c: Regenerate.
1795 * target-descriptions.c: Use common/tdesc.h.
1796 * target-descriptions.h: Likewise.
1798 2018-02-24 Tom Tromey <tom@tromey.com>
1800 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
1801 (try_thread_db_load_from_dir, thread_db_load_search): Use
1803 (info_auto_load_libthread_db_compare): Return bool. Change
1805 (info_auto_load_libthread_db): Use std::vector, std::string.
1808 2018-02-24 Tom Tromey <tom@tromey.com>
1810 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
1812 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
1814 * gdbarch.c: Rebuild.
1815 * gdbarch.h: Rebuild.
1816 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
1817 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
1818 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
1821 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
1823 * gdbtypes.h (sect_offset): Change type to uint64_t.
1824 (sect_offset_str): New function.
1825 * dwarf2read.c (create_addrmap_from_aranges): Use
1827 (error_check_comp_unit_head): Likewise.
1828 (create_debug_type_hash_table): Likewise.
1829 (read_cutu_die_from_dwo): Likewise.
1830 (init_cutu_and_read_dies): Likewise.
1831 (init_cutu_and_read_dies_no_follow): Likewise.
1832 (process_psymtab_comp_unit_reader): Likewise.
1833 (partial_die_parent_scope): Likewise.
1834 (peek_die_abbrev): Likewise.
1835 (process_queue): Likewise.
1836 (dwarf2_physname): Likewise.
1837 (read_namespace_alias): Likewise.
1838 (read_import_statement): Likewise.
1839 (create_dwo_cu_reader): Likewise.
1840 (create_cus_hash_table): Likewise.
1841 (lookup_dwo_cutu): Likewise.
1842 (inherit_abstract_dies): Likewise.
1843 (read_func_scope): Likewise.
1844 (read_call_site_scope): Likewise.
1845 (dwarf2_add_member_fn): Likewise.
1846 (read_common_block): Likewise.
1847 (read_module_type): Likewise.
1848 (read_typedef): Likewise.
1849 (read_subrange_type): Likewise.
1850 (load_partial_dies): Likewise.
1851 (read_partial_die): Likewise.
1852 (find_partial_die): Likewise.
1853 (read_str_index): Likewise.
1854 (dwarf2_string_attr): Likewise.
1855 (build_error_marker_type): Likewise.
1856 (lookup_die_type): Likewise.
1857 (dump_die_shallow): Likewise.
1858 (follow_die_ref): Likewise.
1859 (dwarf2_fetch_die_loc_sect_off): Likewise.
1860 (dwarf2_fetch_constant_bytes): Likewise.
1861 (follow_die_sig): Likewise.
1862 (get_signatured_type): Likewise.
1863 (get_DW_AT_signature_type): Likewise.
1864 (dwarf2_find_containing_comp_unit): Likewise.
1865 (set_die_type): Likewise.
1867 2018-02-21 John Baldwin <jhb@FreeBSD.org>
1869 * arch/aarch64.c: Include "common-defs.h".
1870 * arch/amd64.c: Likewise.
1871 * arch/i386.c: Likewise.
1873 2018-02-21 Tom Tromey <tom@tromey.com>
1875 * value.h: (extract_field_op): Update.
1876 * eval.c (extract_field_op): Return a const char *.
1877 * expression.h (parse_expression_for_completion): Update.
1878 * completer.c (complete_expression): Update.
1879 (add_struct_fields): Make fieldname const.
1880 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
1881 (mark_completion_tag, parse_exp_in_context_1): Update.
1882 (parse_expression_for_completion): Change "name" to
1883 unique_xmalloc_ptr*.
1885 2018-02-21 Tom Tromey <tom@tromey.com>
1887 * infcall.c (call_function_by_hand_dummy): Use std::vector.
1889 2018-02-21 Yao Qi <yao.qi@linaro.org>
1891 * avr-tdep.c (avr_read_pc): Change parameter type to
1893 * gdbarch.sh (read_pc): Likewise.
1894 * gdbarch.c: Re-generated.
1895 * gdbarch.h: Re-generated.
1896 * hppa-tdep.c (hppa_read_pc): Change parameter type to
1898 * ia64-tdep.c (ia64_read_pc): Likewise.
1899 * mips-tdep.c (mips_read_pc): Likewise.
1900 * spu-tdep.c (spu_read_pc): Likewise.
1902 2018-02-21 Yao Qi <yao.qi@linaro.org>
1904 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
1905 * regcache-dump.c: New file.
1906 * regcache.c: Move register_dump to regcache-dump.c.
1907 (maintenance_print_registers): Likewise.
1908 (maintenance_print_raw_registers): Likewise.
1909 (maintenance_print_cooked_registers): Likewise.
1910 (maintenance_print_register_groups): Likewise.
1911 (maintenance_print_remote_registers): Likewise.
1912 (_initialize_regcache): Likewise.
1913 * regcache.h (register_dump): Moved from regcache.c.
1915 2018-02-21 Yao Qi <yao.qi@linaro.org>
1917 * regcache.c (regcache::regcache): Update.
1918 (regcache::invalidate): Move it to detached_regcache::invalidate.
1919 (get_thread_arch_aspace_regcache): Update.
1920 (regcache::raw_update): Update.
1921 (regcache::cooked_read): Remove some code.
1922 (regcache::cooked_read_value): Likewise.
1923 (regcache::raw_write): Remove assert on m_readonly_p.
1924 (regcache::raw_supply_integer): Move it to
1925 detached_regcache::raw_supply_integer.
1926 (regcache::raw_supply_zeroed): Likewise.
1927 * regcache.h (detached_regcache) <raw_supply_integer>: New
1929 <raw_supply_zeroed, invalidate>: Likewise.
1930 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
1931 <invalidate>: Likewise.
1932 <m_readonly_p>: Removed.
1934 2018-02-21 Yao Qi <yao.qi@linaro.org>
1936 * infcmd.c (get_return_value): Let stop_regs point to
1937 get_current_regcache.
1938 * regcache.c (regcache::regcache): Remove.
1939 (register_dump_reg_buffer): New class.
1940 (regcache_print): Adjust.
1941 * regcache.h (regcache): Remove constructors.
1943 2018-02-21 Yao Qi <yao.qi@linaro.org>
1945 * regcache.c (class register_dump): New class.
1946 (register_dump_regcache, register_dump_none): New class.
1947 (register_dump_remote, register_dump_groups): New class.
1948 (regcache_print): Update.
1949 * regcache.h (regcache_dump_what): Move it to regcache.c.
1950 (regcache) <dump>: Remove.
1952 2018-02-21 Yao Qi <yao.qi@linaro.org>
1954 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
1956 (jit_unwind_reg_set_impl): Call raw_supply.
1957 (jit_frame_sniffer): Use reg_buffer_rw.
1958 * record-full.c (record_full_core_regbuf): Change its type.
1959 (record_full_core_open_1): Use reg_buffer_rw.
1960 (record_full_close): Likewise.
1961 (record_full_core_fetch_registers): Use regcache->raw_supply.
1962 (record_full_core_store_registers): Likewise.
1963 * regcache.c (regcache::get_register_status): Move it to
1965 (regcache_raw_set_cached_value): Remove.
1966 (regcache::raw_set_cached_value): Remove.
1967 (regcache::raw_write): Call raw_supply.
1968 (regcache::raw_supply): Move it to reg_buffer_rw.
1969 * regcache.h (regcache_raw_set_cached_value): Remove.
1970 (reg_buffer_rw): New class.
1972 2018-02-21 Yao Qi <yao.qi@linaro.org>
1974 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
1975 readonly_detached_regcache.
1976 (dummy_frame_prev_register): Use regcache->cooked_read.
1977 * frame.c (frame_save_as_regcache): Change return type.
1978 (frame_pop): Update.
1979 * frame.h (frame_save_as_regcache): Update declaration.
1980 * inferior.h (get_infcall_suspend_state_regcache): Update
1982 * infrun.c (infcall_suspend_state) <registers>: use
1983 readonly_detached_regcache.
1984 (save_infcall_suspend_state): Don't use regcache_dup.
1985 (get_infcall_suspend_state_regcache): Change return type.
1986 * linux-fork.c (struct fork_info) <savedregs>: Change to
1987 readonly_detached_regcache.
1989 (fork_save_infrun_state): Don't use regcache_dup.
1990 (info_checkpoints_command): Adjust.
1991 * mi/mi-main.c (register_changed_p): Update declaration.
1992 (mi_cmd_data_list_changed_registers): Use
1993 readonly_detached_regcache.
1994 (register_changed_p): Change parameter type to
1995 readonly_detached_regcache.
1996 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
1997 readonly_detached_regcache.
1998 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
1999 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2001 (regcache::save): Move it to reg_buffer.
2002 (regcache::restore): Change parameter type.
2003 (regcache_dup): Remove.
2004 * regcache.h (reg_buffer) <save>: New method.
2005 (readonly_detached_regcache): New class.
2006 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2007 readonly_detached_regcache.
2008 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2010 2018-02-21 Yao Qi <yao.qi@linaro.org>
2012 * frame.c (frame_save_as_regcache): Use regcache method save.
2013 (frame_pop): Use regcache method restore.
2014 * infrun.c (restore_infcall_suspend_state): Likewise.
2015 * linux-fork.c (fork_load_infrun_state): Likewise.
2016 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2018 * regcache.c (regcache_save): Remove.
2019 (regcache::restore): More asserts.
2020 (regcache_cpy): Remove.
2021 * regcache.h (regcache_save): Remove the declaration.
2022 (regcache::restore): Move from private to public.
2023 Remove the friend declaration of regcache_cpy.
2024 (regcache_cpy): Remove declaration.
2026 2018-02-21 Yao Qi <yao.qi@linaro.org>
2028 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2029 parameter type to 'readable_regcache *'.
2030 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2031 * arm-tdep.c (arm_neon_quad_read): Likewise.
2032 (arm_pseudo_read): Likewise.
2033 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2034 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2035 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2036 * gdbarch.c: Re-generated.
2037 * gdbarch.h: Re-generated.
2038 * gdbarch.sh (pseudo_register_read): Change parameter type to
2039 'readable_regcache *'.
2040 (pseudo_register_read_value): Likewise.
2041 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2042 (h8300_pseudo_register_read): Likewise.
2043 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2044 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2045 (i386_pseudo_register_read_into_value): Likewise.
2046 (i386_pseudo_register_read_value): Likewise.
2047 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2049 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2050 * m32c-tdep.c (m32c_raw_read): Likewise.
2051 (m32c_read_flg): Likewise.
2052 (m32c_banked_register): Likewise.
2053 (m32c_banked_read): Likewise.
2054 (m32c_sb_read): Likewise.
2055 (m32c_part_read): Likewise.
2056 (m32c_cat_read): Likewise.
2057 (m32c_r3r2r1r0_read): Likewise.
2058 (m32c_pseudo_register_read): Likewise.
2059 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2060 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2061 (mep_pseudo_cr64_read): Likewise.
2062 (mep_pseudo_register_read): Likewise.
2063 * mips-tdep.c (mips_pseudo_register_read): Likewise.
2064 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2065 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2066 * regcache.c (regcache::raw_read): Move it to readable_regcache.
2067 (regcache::cooked_read): Likewise.
2068 (regcache::cooked_read_value): Likewise.
2069 (regcache_cooked_read_signed):
2070 (regcache::cooked_read): Likewise.
2071 * regcache.h (readable_regcache): New class.
2072 (regcache): Inherit readable_regcache. Move some methods to
2074 * rl78-tdep.c (rl78_pseudo_register_read): Change
2075 parameter type to 'readable_regcache *'.
2076 * rs6000-tdep.c (do_regcache_raw_read): Remove.
2077 (e500_pseudo_register_read): Change parameter type to
2078 'readable_regcache *'.
2079 (dfp_pseudo_register_read): Likewise.
2080 (vsx_pseudo_register_read): Likewise.
2081 (efpr_pseudo_register_read): Likewise.
2082 * s390-tdep.c (s390_pseudo_register_read): Likewise.
2083 * sh-tdep.c (sh_pseudo_register_read): Likewise.
2084 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
2085 (sh64_pseudo_register_read): Likewise.
2086 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2087 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2088 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2089 (spu_pseudo_register_read): Likewise.
2090 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2091 (xtensa_pseudo_register_read): Likewise.
2093 2018-02-21 Yao Qi <yao.qi@linaro.org>
2095 * regcache.c (regcache::regcache): Call reg_buffer ctor.
2096 (regcache::arch): Move it to reg_buffer::arch.
2097 (regcache::register_buffer): Likewise.
2098 (regcache::assert_regnum): Likewise.
2099 (regcache::num_raw_registers): Likewise.
2100 * regcache.h (reg_buffer): New class.
2101 (regcache): Inherit reg_buffer.
2103 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
2105 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
2106 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
2108 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
2110 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
2112 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2114 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
2115 (SFILES): Remove common/*.c files.
2116 (COMMON_OBS): Remove some *.o files built from common/*.c files.
2117 * common/common.host: Add common reference.
2118 * configure.ac: Likewise.
2119 * configure: Regenerate.
2121 2018-02-16 Yao Qi <yao.qi@linaro.org>
2123 * block.c (block_namespace_info): Inherit allocate_on_obstack.
2124 (block_initialize_namespace): Use new.
2125 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
2126 (dwarf2_free_objfile): Use delete.
2127 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
2128 (copy_type_recursive): Use new.
2129 * gdb_obstack.h (allocate_on_obstack): New.
2131 2018-02-15 Yao Qi <yao.qi@linaro.org>
2134 * inferior.c (exit_inferior_1): Reset inf->control.
2136 2018-02-15 Joel Brobecker <brobecker@adacore.com>
2138 * ada-lang.c (ada_to_fixed_value_create): Delete advance
2141 2018-02-14 Pedro Alves <palves@redhat.com>
2143 * frame-unwind.c (frame_unwind_try_unwinder): Always call
2144 frame_cleanup_after_sniffer on exception.
2146 2018-02-14 Tom Tromey <tom@tromey.com>
2148 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
2150 (solib_bfd_open): Make pathname const.
2151 * solib.c (solib_bfd_open): Make pathname const.
2152 * solib-spu.c (spu_bfd_fopen): Make name const.
2153 (spu_bfd_open): Make pathname const.
2154 * solib-darwin.c (darwin_bfd_open): Make pathname const.
2155 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
2157 2018-02-14 Tom Tromey <tom@tromey.com>
2159 * symfile.c (symfile_bfd_open): Update.
2160 * source.h (openp, source_full_path_of, find_and_open_source):
2161 Change argument type to unique_xmalloc_ptr.
2162 * source.c (openp): Take a unique_xmalloc_ptr.
2163 (source_full_path_of, find_and_open_source): Likewise.
2164 (open_source_file, symtab_to_fullname): Update.
2165 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
2167 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
2168 (exec_file_find): Update.
2169 * psymtab.c (psymtab_to_fullname): Update.
2170 * nto-tdep.h (nto_find_and_open_solib): Update.
2171 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
2173 * exec.c (exec_file_attach): Update.
2174 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
2175 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
2177 2018-02-14 Tom Tromey <tom@tromey.com>
2179 * solib.c: Include source.h.
2180 * nto-tdep.c: Include source.h.
2181 * mi/mi-cmd-env.c: Include source.h.
2182 * infcmd.c: Include source.h.
2183 * exec.c: Include source.h.
2184 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
2185 (add_path, directory_switch, source_path, init_source_path): Move
2187 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
2188 (add_path, directory_switch, source_path, init_source_path):
2191 2018-02-14 Tom Tromey <tom@tromey.com>
2193 * solist.h (exec_file_find, solib_find): Return
2195 (solib_bfd_fopen): Take a const char *.
2196 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
2197 (exec_file_find, solib_find): Likewise.
2198 (solib_bfd_fopen): Do not take ownership of "pathname".
2199 (solib_bfd_open): Use unique_xmalloc_ptr.
2200 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
2201 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
2202 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
2203 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
2205 2018-02-14 Joel Brobecker <brobecker@adacore.com>
2207 * ada-lang.c (name_match_type_from_name): Remove reference to
2208 ada_name_for_lookup in function's documentation.
2209 * ada-lang.h (ada_name_for_lookup): Delete declaration.
2211 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2213 * defs.h (enum openp_flags): New enum.
2214 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
2215 Move to enum openp_flags.
2216 (openp_flags): New enum flags.
2217 (openp): Change parameter type to openp_flags.
2218 * source.c (openp): Change parameter type to openp_flags.
2219 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
2220 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
2222 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2224 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
2227 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
2229 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
2231 (class dwarf2_queue_guard): ...the destructor of this new class.
2232 (dw2_do_instantiate_symtab): Create instance of the new class
2233 dwarf2_queue_guard, remove cleanup.
2235 2018-02-09 Tom Tromey <tom@tromey.com>
2237 * source.c (find_source_lines): Don't reference past the end of
2240 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2242 * remote.c (remote_btrace_maybe_reopen): Change error message.
2243 * btrace.c (btrace_enable): Likewise.
2244 (parse_xml_btrace): Likewise.
2245 (parse_xml_btrace_conf): Likewise.
2247 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2249 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
2250 (linux_enable_pt, linux_enable_bts): Call
2251 diagnose_perf_event_open_fail.
2253 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2255 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
2256 Remove parameter and change return type. Update callers. Move it.
2257 (linux_enable_bts, linux_enable_pt): Improve error message.
2258 (linux_enable_pt): Remove zero buffer size check.
2259 (linux_enable_btrace): Improve error messages. Remove NULL return
2262 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2264 * btrace.c (btrace_enable): Remove target_supports_btrace call.
2265 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
2266 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
2267 (linux_supports_pt, linux_supports_btrace): Remove.
2268 (linux_enable_bts): Call cpu_supports_bts.
2269 * nat/linux-btrace.h (linux_supports_btrace): Remove.
2270 * remote.c (remote_supports_btrace): Remove.
2271 (init_remote_ops): Remove remote_supports_btrace.
2272 * target-delegates.c: Regenerated.
2273 * target.c (target_supports_btrace): Remove.
2274 * target.h (target_ops) <to_supports_btrace>: Remove
2275 (target_supports_btrace): Remove.
2276 * x86-linux-nat.c (x86_linux_create_target): Remove
2277 linux_supports_btrace.
2279 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2281 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
2283 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
2284 exception and use message in own exception.
2286 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2288 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
2289 (perf_event_pt_event_type): Use gdb_file_up.
2290 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
2291 scoped_fd, and scoped_mmap.
2293 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2295 * common/scoped_mmap.h: New.
2296 * unittests/scoped_mmap-selftest.c: New.
2297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2298 unittests/scoped_mmap-selftest.c.
2300 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2302 * common/scoped_fd.h: New.
2303 * unittests/scoped_fd-selftest.c: New.
2304 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2305 unittests/scoped_fd-selftest.c.
2307 2018-02-09 Tom Tromey <tom@tromey.com>
2309 * auto-load.c (auto_load_section_scripts): Use
2310 gdb::unique_xmalloc_ptr.
2312 2018-02-09 Tom Tromey <tom@tromey.com>
2314 * auto-load.c (execute_script_contents): Use std::string.
2316 2018-02-09 Joel Brobecker <brobecker@adacore.com>
2318 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
2319 Python function, rather than a new command.
2321 2018-02-08 Tom Tromey <tom@tromey.com>
2323 * solib.c (solib_find_1): Use std::string.
2324 (solib_bfd_fopen): Use unique_xmalloc_ptr.
2326 2018-02-08 Tom Tromey <tom@tromey.com>
2328 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
2330 2018-02-08 Tom Tromey <tom@tromey.com>
2332 * source.c (find_source_lines): Use gdb::def_vector.
2334 2018-02-08 Tom Tromey <tom@tromey.com>
2336 * macrocmd.c (struct temporary_macro_definition): New.
2337 (macro_define_command): Use temporary_macro_definition. Remove
2339 (free_macro_definition_ptr): Remove.
2341 2018-02-08 Tom Tromey <tom@tromey.com>
2343 * macroexp.c (maybe_expand): Use std::string.
2345 2018-02-08 Tom Tromey <tom@tromey.com>
2347 * macroexp.c (struct macro_buffer): Add initializers for some
2349 (init_buffer, init_shared_buffer, free_buffer)
2350 (free_buffer_return_text): Remove.
2351 (macro_buffer): New constructors.
2352 (~macro_buffer): New destructor.
2353 (macro_buffer::set_shared): New method.
2354 (macro_buffer::resize_buffer, macro_buffer::appendc)
2355 (macro_buffer::appendmem): Now methods, not free functions.
2356 (set_token, append_tokens_without_splicing, stringify)
2357 (macro_stringify): Update.
2358 (gather_arguments): Change return type. Remove argc_p argument,
2359 add args_ptr argument. Use std::vector.
2360 (substitute_args): Remove argc argument. Accept std::vector.
2361 (expand): Update. Use std::vector.
2362 (scan, macro_expand, macro_expand_next): Update.
2364 2018-02-08 Tom Tromey <tom@tromey.com>
2366 * symtab.c (default_collect_symbol_completion_matches_break_on):
2367 Use unique_xmalloc_ptr.
2368 * macroscope.h: (sal_macro_scope, user_macro_scope)
2369 (default_macro_scope): Return unique_xmalloc_ptr.
2370 * macroscope.c (sal_macro_scope, user_macro_scope)
2371 (default_macro_scope): Return unique_xmalloc_ptr.
2372 * macroexp.h (macro_expand, macro_expand_once): Return
2374 * macroexp.c (macro_expand, macro_expand_once): Return
2376 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2377 (info_macro_command, info_macros_command): Use
2379 * compile/compile-c-support.c (write_macro_definitions): Use
2381 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
2383 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
2385 * value.c (value_static_field): Assign field type instead of
2386 containing type when returning an optimized out value.
2388 2018-02-06 Yao Qi <yao.qi@linaro.org>
2390 * ft32-tdep.c (ft32_read_pc): Remove.
2391 (ft32_write_pc): Remove.
2392 (ft32_gdbarch_init): Update.
2393 * m32r-tdep.c (m32r_read_pc): Remove.
2394 (m32r_gdbarch_init): Update.
2395 * mep-tdep.c (mep_read_pc): Remove.
2396 (mep_gdbarch_init): Update.
2397 * microblaze-tdep.c (microblaze_write_pc): Remove.
2398 (microblaze_gdbarch_init): Update.
2399 * mn10300-tdep.c (mn10300_read_pc): Remove.
2400 (mn10300_write_pc): Remove.
2401 (mn10300_gdbarch_init): Update.
2402 * moxie-tdep.c (moxie_read_pc): Remove.
2403 (moxie_write_pc): Remove.
2404 (moxie_gdbarch_init): Update.
2406 2018-02-06 Yao Qi <yao.qi@linaro.org>
2408 * expprint.c (print_subexp_standard): Handle
2409 OP_F77_UNDETERMINED_ARGLIST.
2410 (dump_subexp_body_standard): Likewise.
2412 2018-02-05 Alan Hayward <alan.hayward@arm.com>
2414 * target-descriptions.c (tdesc_element_visitor) Add empty
2416 (tdesc_type): Move make_gdb_type from here.
2417 (tdesc_type_builtin): Likewise.
2418 (tdesc_type_vector): Likewise.
2419 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
2420 (make_gdb_type_struct): Move from tdesc_type_with_fields.
2421 (make_gdb_type_union): Likewise.
2422 (make_gdb_type_flags): Likewise.
2423 (make_gdb_type_enum): Likewise.
2424 (make_gdb_type): New function.
2425 (tdesc_register_type): Use static make_gdb_type.
2427 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
2429 * infcmd.c (default_print_one_register_info): Align natural-format
2430 column values consistently one under another.
2431 (pad_to_column): New function.
2433 2018-02-05 Joel Brobecker <brobecker@adacore.com>
2435 * dwarf2read.c (dwarf2_physname): Move commment.
2437 2018-02-01 Leszek Swirski <leszeks@google.com>
2439 * varobj.c (varobj_formatted_print_options): Allow recursive
2440 pretty printing if pretty printing is enabled.
2442 2018-02-01 Leszek Swirski <leszeks@google.com>
2444 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
2445 names after a structop as a filename.
2447 2018-02-01 Yao Qi <yao.qi@linaro.org>
2449 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
2450 (arm_record_coproc_data_proc): Likewise.
2452 2018-02-01 Yao Qi <yao.qi@linaro.org>
2454 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
2456 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
2458 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
2459 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
2461 2018-01-31 Pedro Alves <palves@redhat.com>
2463 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
2464 * inflow.c (child_terminal_save_inferior): Wrap reference to
2465 tcgetpgrp in HAVE_TERMIOS_H.
2466 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
2468 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
2469 always iterate over all inferiors.
2470 (gdbsim_cntrl_c): Adjust.
2471 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
2473 2018-01-31 Joel Brobecker <brobecker@adacore.com>
2475 * gdbtypes.c (lookup_array_range_type): Make sure the array's
2476 index type is objfile-owned if the element type is as well.
2478 2018-01-31 Joel Brobecker <brobecker@adacore.com>
2482 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
2484 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
2485 "features/s390x-linux64.c".
2486 (_initialize_s390_linux_tdep): Remove initialization of tdescs
2487 s390_linux32 and s390x_linux64.
2488 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
2490 * s390-tdep.c: Include "features/s390-linux32.c" and
2491 "features/s390x-linux64.c".
2492 (s390_tdesc_valid): Add check for tdesc_has_registers.
2493 (s390_gdbarch_init): Make sure there is always a valid tdesc.
2494 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
2495 tdesc_s390x_linux64.
2496 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
2497 tdesc_s390x_linux64 to...
2498 * s390-tdep.h: ...here.
2500 2018-01-30 Pedro Alves <palves@redhat.com>
2503 * config.in, configure: Regenerate.
2504 * configure.ac: Check for getpgid.
2505 * go32-nat.c (go32_pass_ctrlc): New.
2506 (go32_target): Install it.
2507 * inf-child.c (inf_child_target): Install
2508 child_terminal_save_inferior, child_pass_ctrlc and
2510 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
2511 (inf_ptrace_target): No longer install it.
2512 * infcmd.c (interrupt_target_1): Adjust.
2513 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
2514 (child_interrupt): Declare.
2515 (inferior::terminal_state): New.
2516 * inflow.c (struct terminal_info): Update comments.
2517 (inferior_process_group): Delete.
2518 (terminal_is_ours): Delete.
2519 (gdb_tty_state): New.
2520 (child_terminal_init): Adjust.
2521 (is_gdb_terminal, sharing_input_terminal_1)
2522 (sharing_input_terminal): New functions.
2523 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
2524 Set the process's actual process group in the foreground if
2525 possible. Handle is_ours_for_output/is_ours distinction. Don't
2526 mark terminal as the inferior's if not sharing GDB's terminal.
2527 Don't check attach_flag.
2528 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
2529 pass down a target_terminal_state.
2530 (child_terminal_save_inferior): New, factored out from ...
2531 (child_terminal_ours_1): ... this. Handle
2532 target_terminal_state::is_ours_for_output.
2533 (child_interrupt, child_pass_ctrlc): New.
2534 (inflow_inferior_exit): Clear the inferior's terminal_state.
2535 (copy_terminal_info): Copy the inferior's terminal state.
2536 (_initialize_inflow): Remove reference to terminal_is_ours.
2537 * inflow.h (inferior_process_group): Delete.
2538 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
2539 * procfs.c (procfs_target): Don't install procfs_interrupt.
2540 (procfs_interrupt): Delete.
2541 * remote.c (remote_serial_quit_handler): Adjust.
2542 (remote_interrupt): Remove ptid parameter. Adjust.
2543 * target-delegates.c: Regenerate.
2544 * target.c: Include "terminal.h".
2545 (target_terminal::terminal_state): Rename to ...
2546 (target_terminal::m_terminal_state): ... this.
2547 (target_terminal::init): Adjust.
2548 (target_terminal::inferior): Adjust to per-inferior
2550 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
2551 (target_terminal::ours, target_terminal::ours_for_output): Use
2552 target_terminal_is_ours_kind.
2553 (target_interrupt): Remove ptid parameter. Adjust.
2554 (default_target_pass_ctrlc): Adjust.
2555 * target.h (target_ops::to_terminal_save_inferior): New field.
2556 (target_ops::to_interrupt): Remove ptid_t parameter.
2557 (target_interrupt): Remove ptid_t parameter. Update comment.
2558 (target_pass_ctrlc): Update comment.
2559 * target/target.h (target_terminal_state): New scoped enum,
2561 (target_terminal::terminal_state): ... here.
2562 (target_terminal::inferior): Update comments.
2563 (target_terminal::restore_inferior): New.
2564 (target_terminal::is_inferior, target_terminal::is_ours)
2565 (target_terminal::is_ours_for_output): Adjust.
2566 (target_terminal::scoped_restore_terminal_state): Adjust to
2567 rename, and call restore_inferior() instead of inferior().
2568 (target_terminal::scoped_restore_terminal_state::m_state): Change
2570 (target_terminal::terminal_state): Rename to ...
2571 (target_terminal::m_terminal_state): ... this and change type.
2573 2018-01-30 Pedro Alves <palves@redhat.com>
2575 * linux-nat.c (wait_for_signal): New function.
2576 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
2578 (async_terminal_is_ours)
2579 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
2580 (linux_nat_add_target): Don't override
2581 to_terminal_inferior/to_terminal_ours.
2583 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
2585 * remote.c (remote_follow_fork): Don't call "detach_inferior".
2587 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
2589 * dwarf2read.c (free_dwo_files): Add forward-declaration.
2590 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
2591 dwarf2_per_objfile_free here.
2592 (dwarf2_per_objfile_free): Remove.
2593 (_initialize_dwarf2_read): Don't register
2594 dwarf2_per_objfile_free as a registry cleanup.
2596 2018-01-27 Eli Zaretskii <eliz@gnu.org>
2598 Avoid compilation errors in MinGW native builds
2600 The error is triggered by including python-internal.h, and the
2603 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
2604 from build-gnulib/import/math.h:27,
2605 from d:/usr/Python26/include/pyport.h:235,
2606 from d:/usr/Python26/include/Python.h:58,
2607 from python/python-internal.h:94,
2608 from python/py-arch.c:24:
2609 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
2613 This happens because Python headers define 'hypot' to expand t
2614 '_hypot' in the Windows builds.
2615 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
2616 'hypoth'. This avoids a compilation error.
2618 2018-01-26 Alan Hayward <alan.hayward@arm.com>
2620 * MAINTAINERS (Write After Approval): Fix ordering.
2622 2018-01-26 Alan Hayward <alan.hayward@arm.com>
2624 * MAINTAINERS (Write After Approval): Add Alan Hayward.
2626 2018-01-26 Alan Modra <amodra@gmail.com>
2628 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
2629 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
2630 Remove nop. Make const. Comment.
2631 (powerpc32_plt_stub_so_2): New.
2632 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
2633 Correct count. Update uses.
2634 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
2635 Move common code reading PLT entry word. Correct
2636 powerpc32_plt_stub PLT address calculation.
2637 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
2638 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
2639 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
2640 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
2641 (ppc64_standard_linkage8): Likewise.
2642 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
2643 Correct insns description.
2644 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
2646 2018-01-24 Pedro Alves <palves@redhat.com>
2648 GCC PR libstdc++/83906
2649 * gdbtypes.c (operator==(const dynamic_prop &,
2650 const dynamic_prop &)): New.
2651 (operator==(const range_bounds &, const range_bounds &)): New.
2652 (check_types_equal): Use them instead of memcmp.
2653 * gdbtypes.h (operator==(const dynamic_prop &,
2654 const dynamic_prop &)): Declare.
2655 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
2656 (operator==(const range_bounds &, const range_bounds &)): Declare.
2657 (operator!=(const range_bounds &, const range_bounds &)): Declare.
2659 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2661 * s390-linux-tdep.c (s390_record_address_mask)
2662 (s390_record_calc_disp_common, s390_record_calc_disp)
2663 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2664 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2665 (s390_process_record): Move to s390-tdep.c.
2666 (s390_linux_init_abi_any): Adjust.
2667 * s390-tdep.c (s390_record_address_mask)
2668 (s390_record_calc_disp_common, s390_record_calc_disp)
2669 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2670 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2671 (s390_process_record): Moved from s390-linux-tdep.c
2672 (s390_gdbarch_init): Adjust.
2674 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2676 * s390-linux-nat.c (s390-tdep.h): New include.
2677 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
2678 (HFILES_NO_SRCDIR): Add s390-tdep.h.
2679 (ALLDEPFILES): Add s390-tdep.c.
2680 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
2681 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
2682 * s390-tdep.h: ...this. New file.
2683 * s390-linux-tdep.c (s390-tdep.h): New include.
2684 (_initialize_s390_tdep): Rename to...
2685 (_initialize_s390_linux_tdep): ...this and adjust.
2686 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
2687 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
2689 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
2690 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
2691 (s390_is_partial_instruction, s390_software_single_step)
2692 (is_non_branch_ril, s390_displaced_step_copy_insn)
2693 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
2694 (s390_prologue_data, s390_addr, s390_store, s390_load)
2695 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
2696 (s390_register_call_saved, s390_guess_tracepoint_registers)
2697 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
2698 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
2699 (s390_pseudo_register_name, s390_pseudo_register_type)
2700 (s390_pseudo_register_read, s390_pseudo_register_write)
2701 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
2702 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
2703 (s390_addr_bits_remove, s390_address_class_type_flags)
2704 (s390_address_class_type_flags_to_name)
2705 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
2706 (s390_function_arg_float, s390_function_arg_vector)
2707 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
2708 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
2709 (s390_frame_align, s390_register_return_value, s390_return_value)
2710 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
2711 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
2712 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
2713 (s390_trad_frame_prev_register, s390_unwind_cache)
2714 (s390_prologue_frame_unwind_cache)
2715 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
2716 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
2717 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
2718 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
2719 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
2720 (s390_frame_base_address, s390_local_base_address)
2721 (s390_frame_base, s390_gcc_target_options)
2722 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
2723 (s390_validate_reg_range, s390_tdesc_valid)
2724 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
2725 * s390-tdep.c: ...this. New file.
2727 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2729 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
2730 (s390_process_record, s390_gdbarch_tdep_alloc)
2731 (s390_linux_init_abi_any): Use/set new hook.
2733 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2735 * s390-linux-tdep.c (osabi.h): New include.
2736 (s390_linux_init_abi_31, s390_linux_init_abi_64)
2737 (s390_linux_init_abi_any): New functions.
2738 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
2740 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2742 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
2743 tdesc_has_registers check
2745 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2747 * s390-linux-tdep.c (s390_tdesc_valid): New function.
2748 (s390_validate_reg_range): New macro.
2749 (s390_gdbarch_init): Adjust.
2751 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2753 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
2754 (s390_gdbarch_tdep_alloc): Adjust.
2755 (s390_gdbarch_init): Adjust.
2757 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2759 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
2760 <have_tdb>: Change type to bool.
2761 (s390_gdbarch_tdep_alloc): Adjust.
2762 (s390_gdbarch_init): Adjust.
2764 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2766 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
2767 (gdbarch_tdep) <have_upper, have_vx>: New fields.
2768 (s390_gdbarch_tdep_alloc): New function.
2769 (s390_gdbarch_init): Allocate tdep at start and use its fields
2770 instead of separate variables.
2772 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2774 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
2775 when looking for cached gdbarch and add comment for remaining.
2777 2018-01-22 Pedro Alves <palves@redhat.com>
2778 Sergio Durigan Junior <sergiodj@redhat.com>
2780 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
2783 2018-01-22 Maciej W. Rozycki <macro@mips.com>
2785 * MAINTAINERS: Update my company e-mail address.
2787 2018-01-22 Yao Qi <yao.qi@linaro.org>
2789 * regcache.c (cooked_write_test): New function.
2790 (_initialize_regcache): Register the test.
2792 2018-01-22 Yao Qi <yao.qi@linaro.org>
2794 * ia64-tdep.c (ia64_pseudo_register_read): Call
2795 regcache->cooked_read instead of regcache_cooked_read_unsigned.
2796 * m32c-tdep.c (m32c_cat_read): Likewise.
2797 (m32c_r3r2r1r0_read): Likewise.
2798 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2799 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2801 2018-01-22 Yao Qi <yao.qi@linaro.org>
2803 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
2804 method raw_read instead of regcache_raw_read.
2805 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2806 * arm-tdep.c (arm_neon_quad_read): Likewise.
2807 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2808 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2809 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2810 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
2811 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2812 (i386_pseudo_register_read_into_value): Likewise.
2813 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2814 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2815 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2816 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
2817 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
2818 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2819 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2820 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2821 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
2823 2018-01-22 Yao Qi <yao.qi@linaro.org>
2825 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
2826 * configure.tgt: Remove target mt.
2827 * mt-tdep.c: Remove.
2828 * regcache.c (cooked_read_test): Remove the check for mt.
2830 2018-01-22 Yao Qi <yao.qi@linaro.org>
2832 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
2833 instead of gdbarch_pseudo_register_read_value.
2835 2018-01-22 Joel Brobecker <brobecker@adacore.com>
2837 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
2840 2018-01-22 Joel Brobecker <brobecker@adacore.com>
2842 * linespec.c (create_sals_line_offset): Remove code that preserved
2843 the symtab_and_line's line number.
2845 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2847 * varobj.c (varobj_create): Don't set valid_block when creating a
2850 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2852 * varobj.c (varobj_create): Remove out of date comment.
2854 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2857 * ada-exp.y (write_var_from_sym): Pass extra parameter when
2858 updating innermost block.
2859 * parse.c (innermost_block_tracker::update): Take extra type
2860 parameter, and check types match before updating innermost block.
2861 (write_dollar_variable): Update innermost block for registers.
2862 * parser-defs.h (enum innermost_block_tracker_type): New enum.
2863 (innermost_block_tracker::innermost_block_tracker): Initialise
2865 (innermost_block_tracker::reset): Take type parameter.
2866 (innermost_block_tracker::update): Take type parameter, and pass
2867 type through as needed.
2868 (innermost_block_tracker::m_types): New member.
2869 * varobj.c (varobj_create): Pass type when reseting innermost
2872 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2874 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
2875 * ada-lang.c (resolve_subexp): Likewise.
2876 * breakpoint.c (set_breakpoint_condition) Likewise.
2877 (watch_command_1) Likewise.
2878 * c-exp.y (variable): Likewise.
2879 * d-exp.y (PrimaryExpression): Likewise.
2880 * f-exp.y (variable): Likewise.
2881 * go-exp.y (variable): Likewise.
2882 * m2-exp.y (variable): Likewise.
2883 * objfiles.c (objfile::~objfile): Likewise.
2884 * p-exp.y (variable): Likewise.
2885 * parse.c (innermost_block): Change type.
2886 * parser-defs.h (class innermost_block_tracker): New.
2887 (innermost_block): Change to innermost_block_tracker.
2888 * printcmd.c (display_command): Switch to innermost_block API.
2889 (do_one_display): Likewise.
2890 * rust-exp.y (do_one_display): Likewise.
2891 * symfile.c (clear_symtab_users): Likewise.
2892 * varobj.c (varobj_create): Switch to innermost_block API, replace
2893 use of innermost_block with block stored on varobj object.
2895 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2897 * expression.h (innermost_block): Remove declaration.
2898 * varobj.c: Add 'parser-defs.h' include.
2900 2018-01-19 Tom Tromey <tom@tromey.com>
2902 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
2903 symbols in the static and global blocks.
2905 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2907 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
2908 gdb_ptrace.h, and move including gdb_wait.h ...
2909 * nat/linux-ptrace.h: ... to here.
2911 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2913 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
2914 inf_ptrace_detach_success.
2915 (inf_ptrace_detach_success): Add inferior parameter, use it
2916 instead of inferior_ptid, pass it to detach_inferior.
2917 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
2919 * inferior.c (detach_inferior): Add overload that takes an
2921 * inferior.h (detach_inferior): Likewise.
2922 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
2923 use inferior_ptid, adjust call to inf_ptrace_detach_success.
2924 * linux-thread-db.c (thread_db_detach): Use inf parameter.
2926 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2928 * target.h (struct target_ops) <to_detach>: Add inferior
2930 (target_detach): Likewise.
2931 * target.c (dispose_inferior): Pass inferior down.
2932 (target_detach): Pass inferior down. Assert that it is equal to
2933 the current inferior.
2934 * aix-thread.c (aix_thread_detach): Pass inferior down.
2935 * corefile.c (core_file_command): Pass current_inferior() down.
2936 * corelow.c (core_detach): Add inferior parameter.
2937 * darwin-nat.c (darwin_detach): Likewise.
2938 * gnu-nat.c (gnu_detach): Likewise.
2939 * inf-ptrace.c (inf_ptrace_detach): Likewise.
2940 * infcmd.c (detach_command): Pass current_inferior() down to
2942 * infrun.c (follow_fork_inferior): Pass parent_inf to
2944 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
2946 * linux-nat.c (linux_nat_detach): Add inferior parameter.
2947 * linux-thread-db.c (thread_db_detach): Likewise.
2948 * nto-procfs.c (procfs_detach): Likewise.
2949 * procfs.c (procfs_detach): Likewise.
2950 * record.c (record_detach): Likewise.
2951 * record.h (struct inferior): Forward-declare.
2952 (record_detach): Add inferior parameter.
2953 * remote-sim.c (gdbsim_detach): Likewise.
2954 * remote.c (remote_detach_1): Likewise.
2955 (remote_detach): Likewise.
2956 (extended_remote_detach): Likewise.
2957 * sol-thread.c (sol_thread_detach): Likewise.
2958 * target-debug.h (target_debug_print_inferior_p): New macro.
2959 * target-delegates.c: Re-generate.
2960 * top.c (kill_or_detach): Pass inferior down to target_detach.
2961 * windows-nat.c (windows_detach): Add inferior parameter.
2963 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2965 * target.h (struct target_ops) <to_detach>: Remove args
2967 (target_detach): Likewise.
2968 * target.c (dispose_inferior): Adjust.
2969 (target_detach): Remove args parameter, adjust.
2970 * aix-thread.c (aix_thread_detach): Adjust.
2971 * corefile.c (core_file_command): Adjust.
2972 * corelow.c (core_detach): Adjust.
2973 * darwin-nat.c (darwin_detach): Adjust.
2974 * gnu-nat.c (gnu_detach): Adjust.
2975 * inf-ptrace.c (inf_ptrace_detach): Adjust.
2976 * infcmd.c (detach_command): Adjust
2977 * infrun.c (follow_fork_inferior): Adjust.
2978 (handle_vfork_child_exec_or_exit): Adjust.
2979 * linux-fork.c (linux_fork_detach): Remove args parameter.
2980 * linux-fork.h (linux_fork_detach): Likewise.
2981 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
2982 * linux-thread-db.c (thread_db_detach): Likewise.
2983 * nto-procfs.c (procfs_detach): Likewise.
2984 * procfs.c (procfs_detach): Likewise.
2985 (do_detach): Remove signo parameter.
2986 * record.c (record_detach): Remove args parameter.
2987 * record.h (record_detach): Likewise.
2988 * remote-sim.c (gdbsim_detach): Likewise.
2989 * remote.c (remote_detach_1): Likewise.
2990 (remote_detach): Likewise.
2991 (extended_remote_detach): Likewise.
2992 * sol-thread.c (sol_thread_detach): Likewise.
2993 * target-delegates.c: Re-generate.
2994 * top.c (struct qt_args) <args>: Remove field.
2995 (kill_or_detach): Don't pass args.
2996 (quit_force): Don't set args.
2997 * windows-nat.c (windows_detach): Remove args parameter.
2999 2018-01-19 Yao Qi <yao.qi@linaro.org>
3001 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3002 (arm_linux_init_abi): Install it.
3004 2018-01-19 Yao Qi <yao.qi@linaro.org>
3006 * osabi.c (gdb_osabi_names): Extend the regexp for
3007 arm-linux-gnueabihf.
3009 2018-01-18 Yao Qi <yao.qi@linaro.org>
3011 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3013 (abbrev_table::add_abbrev): Update.
3014 (abbrev_table::lookup_abbrev): Update.
3016 2018-01-18 Yao Qi <yao.qi@linaro.org>
3018 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3020 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
3022 * compile/compile.c (compile_to_object): Convert "triplet_rx"
3025 2018-01-17 Tom Tromey <tom@tromey.com>
3027 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
3029 2018-01-17 Tom Tromey <tom@tromey.com>
3031 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3032 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3033 (create_array_type_with_stride): Update.
3034 * dwarf2read.c (set_die_type): Update.
3036 2018-01-17 Tom Tromey <tom@tromey.com>
3038 * dwarf2read.c (delayed_method_info): Remove typedef.
3039 (dwarf2_cu::method_info): Now a std::vector.
3040 (add_to_method_list): Update.
3041 (free_delayed_list): Remove.
3042 (compute_delayed_physnames): Update.
3043 (process_full_comp_unit, process_full_type_unit): Clear the method
3044 list. Remove cleanups.
3045 (psymtab_include_file_name): Add name_holder parameter. Use
3047 (dwarf_decode_lines): Update.
3049 2018-01-17 Tom Tromey <tom@tromey.com>
3050 Simon Marchi <simon.marchi@ericsson.com>
3052 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3053 (dwarf2_per_objfile::free_cached_comp_units)
3054 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3055 (init_cutu_and_read_dies_no_follow): Update.
3056 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3057 (dwarf2_cu::~dwarf2_cu): New.
3058 (free_heap_comp_unit, free_stack_comp_unit): Remove.
3059 (age_cached_comp_units, free_one_cached_comp_unit): Update.
3061 2018-01-17 Tom Tromey <tom@tromey.com>
3062 Simon Marchi <simon.marchi@ericsson.com>
3064 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3065 (struct die_reader_specs) <abbrev_table>: New member.
3066 (struct abbrev_table): Add constructor.
3067 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3068 <abbrev_obstack>: Now an auto_obstack.
3069 (abbrev_table_up): New typedef.
3070 (init_cu_die_reader): Add abbrev_table parameter.
3071 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3072 Add result_dwo_abbrev_table.
3073 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3074 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3076 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3078 (skip_children): Update.
3079 (abbrev_table::alloc_abbrev): Rename from
3080 abbrev_table_alloc_abbrev.
3081 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
3082 (abbrev_table::lookup_abbrev): Rename from
3083 abbrev_table_lookup_abbrev.
3084 (abbrev_table_read_table): Return abbrev_table_up.
3085 (abbrev_table_free, abbrev_table_free_cleanup)
3086 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
3087 (load_partial_dies): Update.
3089 2018-01-17 Tom Tromey <tom@tromey.com>
3091 * dwarf2read.c (dwarf2_compute_name): Update comment.
3092 (read_func_scope, read_variable): Update.
3093 (new_symbol): Remove.
3094 (new_symbol_full): Rename to new_symbol.
3096 2018-01-17 Mike Gulick <mgulick@mathworks.com>
3099 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
3100 a warning instead of throwing an error, set section size to 0 and return
3102 * gdb_bfd.h (gdb_bfd_map_section): Update description.
3104 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3106 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
3108 (linux_ptrace_attach_fail_reason_string): Likewise.
3109 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
3111 (linux_ptrace_attach_fail_reason_string): Likewise.
3112 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
3114 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3116 * linux-nat.c (linux_nat_attach): Remove xstrdup.
3118 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3121 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3122 checking for fs_base/gs_base fields in struct user_regs_struct.
3123 * configure: Regenerate.
3125 2018-01-17 Yao Qi <yao.qi@linaro.org>
3127 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
3129 (aarch64_linux_init_abi): Install it to gdbarch hook
3132 2018-01-15 Pedro Alves <palves@redhat.com>
3134 * common/signals-state-save-restore.c
3135 (save_original_signals_state): Fix typos.
3137 2017-01-12 Tom Tromey <tom@tromey.com>
3138 Sergio Durigan Junior <sergiodj@redhat.com>
3140 * Makefile.in (install-only): Install gdb-add-index.
3142 2018-01-12 John Baldwin <jhb@FreeBSD.org>
3144 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
3146 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3148 * infrun.c (keep_going_pass_signal): Clear step-over info when
3149 insert_breakpoints fails.
3151 2018-01-11 Pedro Alves <palves@redhat.com>
3154 * infrun.c (resume): Rename to ...
3155 (resume_1): ... this.
3156 (resume): Reimplement as wrapper around resume_1.
3158 2018-01-11 Pedro Alves <palves@redhat.com>
3161 * remote.c (remote_parse_stop_reply): Default to the last-set
3162 general thread instead of to 'magic_null_ptid'.
3164 2018-01-10 Pedro Alves <palves@redhat.com>
3166 * language.h (language_get_symbol_name_matcher): Rename ...
3167 (get_symbol_name_matcher): ... this.
3168 * language.c (language_get_symbol_name_matcher): Ditto.
3169 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
3172 2018-01-10 Pedro Alves <palves@redhat.com>
3176 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
3177 Adjust to use language_get_symbol_name_matcher instead of
3178 language_defn::la_get_symbol_name_matcher.
3179 * language.c (language_get_symbol_name_matcher): If in Ada mode
3180 and the lookup name is a verbatim match, return Ada's matcher.
3181 * language.h (language_get_symbol_name_matcher): Adjust comment.
3182 (ada_lookup_name_info::verbatim_p):: New method.
3184 2018-01-10 Pedro Alves <palves@redhat.com>
3187 * ada-lang.c (ada_collect_symbol_completion_matches): If the
3188 minsym's language is language_auto or language_cplus, pass down
3189 language_ada instead.
3190 * symtab.c (compare_symbol_name): Don't frob symbol language here.
3192 2018-01-10 Pedro Alves <palves@redhat.com>
3195 * minsyms.c (linkage_name_str): New function.
3196 (iterate_over_minimal_symbols): Use it.
3198 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3200 * NEWS: Document that 'info proc' now works on FreeBSD.
3202 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3204 * configure.ac: Check for kinfo_getfile in libutil.
3205 * configure: Regenerate.
3206 * config.in: Regenerate.
3207 * fbsd-nat.c: Include "fbsd-tdep.h".
3208 (fbsd_fetch_cmdline): New.
3209 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
3210 rather than calling error.
3211 (fbsd_info_proc): New.
3212 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
3213 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
3214 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
3216 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3218 * fbsd-nat.c (struct free_deleter): Remove.
3219 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
3221 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3223 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
3224 NULL for an empty pathname.
3226 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3228 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
3229 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
3230 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
3231 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
3232 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
3233 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
3234 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
3235 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
3236 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
3237 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
3238 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
3239 (fbsd_core_fetch_timeval, fbsd_print_sigset)
3240 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
3241 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
3242 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
3244 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
3246 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
3247 (gnu_xfer_auxv): New function.
3248 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
3251 2018-01-08 Yao Qi <yao.qi@linaro.org>
3252 Simon Marchi <simon.marchi@ericsson.com>
3254 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
3256 (COMMON_OBS): Remove selftest.o.
3257 * configure.ac: Append selftest-arch.c and common/selftest.c to
3258 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
3259 * configure: Re-generated.
3260 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
3262 (maintenance_info_selftests): Likewise.
3264 2018-01-08 Xavier Roirand <roirand@adacore.com>
3266 * ada-valprint.c (val_print_packed_array_elements): Use
3267 proper number of elements when printing an array indexed
3268 by an enumeration type.
3270 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3272 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
3273 (dw2_get_file_names_reader): Adjust.
3274 (lookup_dwo_signatured_type): Adjust.
3275 (lookup_dwp_signatured_type): Adjust.
3276 (lookup_signatured_type): Adjust.
3277 (create_type_unit_group): Adjust.
3278 (get_type_unit_group): Adjust.
3279 (process_psymtab_comp_unit_reader): Adjust.
3280 (build_type_psymtabs_reader): Adjust.
3281 (scan_partial_symbols): Adjust.
3282 (add_partial_symbol): Adjust.
3283 (add_partial_subprogram): Adjust.
3284 (peek_die_abbrev): Adjust.
3285 (fixup_go_packaging): Adjust.
3286 (process_imported_unit_die): Adjust.
3287 (dwarf2_compute_name): Adjust.
3288 (dwarf2_physname): Adjust.
3289 (read_import_statement): Adjust.
3290 (handle_DW_AT_stmt_list): Adjust.
3291 (read_file_scope): Adjust.
3292 (read_func_scope): Adjust.
3293 (read_lexical_block_scope): Adjust.
3294 (read_call_site_scope): Adjust.
3295 (read_variable): Adjust.
3296 (dwarf2_rnglists_process): Adjust.
3297 (dwarf2_ranges_process): Adjust.
3298 (dwarf2_ranges_read): Adjust.
3299 (dwarf2_get_pc_bounds): Adjust.
3300 (dwarf2_record_block_ranges): Adjust.
3301 (dwarf2_add_field): Adjust.
3302 (dwarf2_add_member_fn): Adjust.
3303 (read_structure_type): Adjust.
3304 (process_structure_scope): Adjust.
3305 (read_enumeration_type): Adjust.
3306 (read_array_type): Adjust.
3307 (mark_common_block_symbol_computed): Adjust.
3308 (read_common_block): Adjust.
3309 (read_namespace_type): Adjust.
3310 (read_namespace): Adjust.
3311 (read_module_type): Adjust.
3312 (read_tag_pointer_type): Adjust.
3313 (read_tag_ptr_to_member_type): Adjust.
3314 (read_tag_string_type): Adjust.
3315 (read_subroutine_type): Adjust.
3316 (read_typedef): Adjust.
3317 (read_base_type): Adjust.
3318 (attr_to_dynamic_prop): Adjust.
3319 (read_subrange_type): Adjust.
3320 (read_unspecified_type): Adjust.
3321 (dwarf2_read_abbrevs): Adjust.
3322 (load_partial_dies): Adjust.
3323 (read_partial_die): Adjust.
3324 (find_partial_die): Adjust.
3325 (guess_partial_die_structure_name): Adjust.
3326 (fixup_partial_die): Adjust.
3327 (read_attribute_value): Adjust.
3328 (read_addr_index): Adjust.
3329 (read_addr_index_from_leb128): Adjust.
3330 (read_str_index): Adjust.
3331 (dwarf2_string_attr): Adjust.
3332 (get_debug_line_section): Adjust.
3333 (dwarf_decode_line_header): Adjust.
3334 (lnp_state_machine::check_line_address): Adjust.
3335 (dwarf_decode_lines_1): Adjust.
3336 (dwarf_decode_lines): Adjust.
3337 (dwarf2_start_symtab): Adjust.
3338 (var_decode_location): Adjust.
3339 (new_symbol_full): Adjust.
3340 (dwarf2_const_value_data): Adjust.
3341 (dwarf2_const_value_attr): Adjust.
3342 (dwarf2_const_value): Adjust.
3344 (die_containing_type): Adjust.
3345 (build_error_marker_type): Adjust.
3346 (lookup_die_type): Adjust.
3347 (guess_full_die_structure_name): Adjust.
3348 (anonymous_struct_prefix): Adjust.
3349 (determine_prefix): Adjust.
3350 (dwarf2_name): Adjust.
3351 (follow_die_ref_or_sig): Adjust.
3352 (follow_die_offset): Adjust.
3353 (follow_die_ref): Adjust.
3354 (follow_die_sig_1): Adjust.
3355 (follow_die_sig): Adjust.
3356 (get_signatured_type): Adjust.
3357 (get_DW_AT_signature_type): Adjust.
3358 (decode_locdesc): Adjust.
3359 (dwarf_decode_macros): Adjust.
3360 (cu_debug_loc_section): Adjust.
3361 (fill_in_loclist_baton): Adjust.
3362 (dwarf2_symbol_mark_computed): Adjust.
3363 (init_one_comp_unit): Don't assign
3364 dwarf2_cu::dwarf2_per_objfile.
3365 (set_die_type): Adjust.
3367 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3369 * dwarf2read.c (struct mapped_debug_names): Add constructor.
3370 <dwarf2_per_objfile>: New field.
3371 (dwarf2_per_objfile): Remove global.
3372 (get_dwarf2_per_objfile): New function.
3373 (set_dwarf2_per_objfile): New function.
3374 (dwarf2_build_psymtabs_hard): Change objfile parameter to
3376 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3377 (read_abbrev_offset): Likewise.
3378 (read_indirect_string): Likewise.
3379 (read_indirect_line_string): Likewise.
3380 (read_indirect_string_at_offset): Likewise.
3381 (read_indirect_string_from_dwz): Likewise.
3382 (dwarf2_find_containing_comp_unit): Change objfile parameter to
3384 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3385 (create_all_comp_units): Change objfile parameter to
3387 (create_all_type_units): Likewise.
3388 (process_queue): Add dwarf2_per_objfile parameter.
3389 (read_and_check_comp_unit_head): Likewise.
3390 (lookup_dwo_unit_in_dwp): Likewise.
3391 (get_dwp_file): Likewise.
3392 (process_cu_includes): Likewise.
3393 (struct free_dwo_file_cleanup_data): New struct.
3394 (dwarf2_has_info): Use get_dwarf2_per_objfile and
3395 set_dwarf2_per_objfile.
3396 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
3397 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
3398 context, adjust calls.
3399 (dw2_instantiate_symtab): Likewise.
3400 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
3401 (dw2_get_cu): Likewise.
3402 (create_cu_from_index_list): Change objfile parameter to
3404 (create_cus_from_index_list): Get dwarf2_per_objfile from
3405 context, adjust calls.
3406 (create_cus_from_index): Likewise.
3407 (create_signatured_type_table_from_index): Change objfile
3408 parameter to dwarf2_per_objfile.
3409 (create_signatured_type_table_from_debug_names): Change objfile
3410 parameter to dwarf2_per_objfile.
3411 (create_addrmap_from_index): Likewise.
3412 (create_addrmap_from_aranges): Likewise.
3413 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
3414 (dw2_setup): Remove.
3415 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
3417 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
3418 get_dwarf2_per_objfile.
3419 (dw2_forget_cached_source_info): Likewise.
3420 (dw2_map_symtabs_matching_filename): Likewise.
3421 (struct dw2_symtab_iterator) <index>: Remove.
3422 <dwarf2_per_objfile>: New field.
3423 (dw2_symtab_iter_init): Replace index parameter with
3425 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
3426 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
3427 (dw2_print_stats): Likewise.
3428 (dw2_dump): Likewise.
3429 (dw2_expand_symtabs_for_function): Likewise.
3430 (dw2_expand_all_symtabs): Likewise.
3431 (dw2_expand_symtabs_with_fullname): Likewise.
3432 (dw2_expand_marked_cus): Replace index and objfile parameters
3433 with dwarf2_per_objfile.
3434 (dw_expand_symtabs_matching_file_matcher): Add
3435 dwarf2_per_objfile parameter and adjust calls.
3436 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
3438 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
3439 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
3441 (create_cus_from_debug_names_list): Replace objfile parameter
3442 with dwarf2_per_objfile and adjust calls.
3443 (create_cus_from_debug_names): Likewise.
3444 (dwarf2_read_debug_names): Likewise.
3445 (mapped_debug_names::namei_to_name): Adjust call.
3446 (dw2_debug_names_iterator::next): Likewise.
3447 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
3448 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
3449 (dw2_debug_names_dump): Likewise.
3450 (dw2_debug_names_expand_symtabs_for_function): Likewise.
3451 (dw2_debug_names_expand_symtabs_matching): Likewise.
3452 (dwarf2_initialize_objfile): Likewise.
3453 (dwarf2_build_psymtabs): Likewise.
3454 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
3456 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
3457 (read_and_check_comp_unit_head): Likewise.
3458 (read_abbrev_offset): Likewise.
3459 (create_debug_type_hash_table): Likewise.
3460 (create_debug_types_hash_table): Likewise.
3461 (create_all_type_units): Replace objfile parameter with
3463 (add_type_unit): Add dwarf2_per_objfile parameter.
3464 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
3465 with dwarf2_per_objfile.
3466 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
3467 (lookup_dwp_signatured_type): Likewise.
3468 (lookup_signatured_type): Likewise.
3469 (read_cutu_die_from_dwo): Likewise.
3470 (init_tu_and_read_dwo_dies): Likewise.
3471 (init_cutu_and_read_dies): Likewise.
3472 (init_cutu_and_read_dies_no_follow): Likewise.
3473 (allocate_type_unit_groups_table): Add objfile parameter.
3474 (create_type_unit_group): Use dwarf2_per_objfile from cu.
3475 (get_type_unit_group): Likewise.
3476 (process_psymtab_comp_unit): Update call.
3477 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
3478 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
3479 (print_tu_stats): Likewise.
3480 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
3482 (build_type_psymtabs): Change objfile parameter to
3484 (process_skeletonless_type_unit): Use dwarf2_per_objfile
3485 passed in void* parameter.
3486 (process_skeletonless_type_units): Change objfile parameter to
3488 (set_partial_user): Likewise.
3489 (dwarf2_build_psymtabs_hard): Likewise.
3490 (read_comp_units_from_section): Likewise.
3491 (create_all_comp_units): Likewise.
3492 (scan_partial_symbols): Update calls.
3493 (add_partial_symbol): Likewise.
3494 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
3495 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
3496 (process_queue): Add dwarf2_per_objfile parameter.
3497 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
3498 (compute_compunit_symtab_includes): Likewise.
3499 (process_cu_includes): Add dwarf2_per_objfile parameter.
3500 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
3501 (process_full_type_unit): Likewise.
3502 (process_imported_unit_die): Update call.
3503 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
3504 (read_file_scope): Likewise.
3505 (allocate_dwo_file_hash_table): Add objfile parameter.
3506 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
3507 (create_cus_hash_table): Likewise.
3508 (create_dwp_hash_table): Likewise.
3509 (create_dwo_unit_in_dwp_v1): Likewise.
3510 (create_dwp_v2_section): Likewise.
3511 (create_dwo_unit_in_dwp_v2): Likewise.
3512 (lookup_dwo_unit_in_dwp): Likewise.
3513 (try_open_dwop_file): Likewise.
3514 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
3515 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
3516 cleanup to include a reference to dwarf2_per_objfile.
3517 (open_dwp_file): Add dwarf2_per_objfile parameter.
3518 (open_and_init_dwp_file): Likewise.
3519 (get_dwp_file): Likewise.
3520 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
3521 (queue_and_load_all_dwo_tus): Update call.
3522 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
3524 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
3525 (dwarf2_ranges_process): Likewise.
3526 (dwarf2_get_pc_bounds): Likewise.
3527 (mark_common_block_symbol_computed): Likewise.
3528 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3529 (dwarf2_read_abbrevs): Update call.
3530 (read_partial_die): Use dwarf2_per_objfile from cu.
3531 (find_partial_die): Likewise.
3532 (fixup_partial_die): Likewise.
3533 (read_attribute_value): Likewise.
3534 (read_indirect_string_at_offset_from): Add objfile parameter.
3535 (read_indirect_string_at_offset): Add dwarf2_per_objfile
3537 (read_indirect_string_from_dwz): Add objfile parameter.
3538 (read_indirect_string): Add objfile parameter.
3539 (read_addr_index_1): Add dwarf2_per_objfile parameter.
3540 (read_addr_index): Use dwarf2_per_objfile from cu.
3541 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
3543 (read_str_index): Use dwarf2_per_objfile from cu.
3544 (get_debug_line_section): Likewise.
3545 (read_formatted_entries): Add dwarf2_per_objfile parameter.
3546 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
3547 (new_symbol_full): Use dwarf2_per_objfile from cu.
3548 (build_error_marker_type): Likewise.
3549 (lookup_die_type): Likewise.
3550 (determine_prefix): Likewise.
3551 (follow_die_offset): Likewise.
3552 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
3553 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
3554 (dwarf2_fetch_die_type_sect_off): Likewise.
3555 (dwarf2_get_die_type): Likewise.
3556 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
3557 (get_signatured_type): Likewise.
3558 (get_DW_AT_signature_type): Likewise.
3559 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
3560 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
3561 (cu_debug_loc_section): Likewise.
3562 (fill_in_loclist_baton): Likewise.
3563 (dwarf2_symbol_mark_computed): Likewise.
3564 (dwarf2_find_containing_comp_unit): Change objfile parameter to
3566 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
3568 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3569 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
3570 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
3571 (set_die_type): Use dwarf2_free_objfile from cu.
3572 (get_die_type_at_offset): Likewise.
3573 (dwarf2_per_objfile_free): Don't assign global variable.
3574 (debug_names) <constructor>: Add dwarf2_per_objfile
3575 parameter, update m_debugstrlookup construction.
3576 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
3578 <m_dwarf2_per_objfile>: New field.
3579 <lookup>: Use m_dwarf2_per_objfile.
3580 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
3581 (psyms_seen_size): Likewise.
3582 (write_gdbindex): Replace objfile parameter with
3584 (write_debug_names): Likewise.
3585 (write_psymtabs_to_index): Likewise.
3586 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
3589 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3591 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
3592 <dwarf2_per_objfile>: New field.
3593 (struct dwarf2_per_cu_data) <objfile>: Remove.
3594 <dwarf2_per_objfile>: New field.
3595 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
3597 (create_signatured_type_table_from_index): Likewise.
3598 (create_debug_type_hash_table): Likewise.
3599 (fill_in_sig_entry_from_dwo_entry): Likewise.
3600 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
3601 (create_type_unit_group): Assign dwarf2_per_objfile instead of
3603 (create_partial_symtab): Access objfile through
3605 (process_psymtab_comp_unit_reader): Likewise.
3606 (read_comp_units_from_section): Likewise.
3607 (scan_partial_symbols): Likewise.
3608 (add_partial_symbol): Likewise.
3609 (add_partial_subprogram): Likewise.
3610 (peek_die_abbrev): Likewise.
3611 (fixup_go_packaging): Likewise.
3612 (process_full_comp_unit): Likewise.
3613 (process_full_type_unit): Likewise.
3614 (process_imported_unit_die): Likewise.
3615 (dwarf2_compute_name): Likewise.
3616 (dwarf2_physname): Likewise.
3617 (read_import_statement): Likewise.
3618 (create_cus_hash_table): Assign dwarf2_physname instead of
3620 (read_func_scope): Access objfile through dwarf2_per_objfile.
3621 (read_lexical_block_scope): Likewise.
3622 (read_call_site_scope): Likewise.
3623 (read_variable): Likewise.
3624 (dwarf2_rnglists_process): Likewise.
3625 (dwarf2_ranges_process): Likewise.
3626 (dwarf2_ranges_read): Likewise.
3627 (dwarf2_record_block_ranges): Likewise.
3628 (dwarf2_add_field): Likewise.
3629 (dwarf2_add_member_fn): Likewise.
3630 (read_structure_type): Likewise.
3631 (process_structure_scope): Likewise.
3632 (read_enumeration_type): Likewise.
3633 (read_array_type): Likewise.
3634 (read_common_block): Likewise.
3635 (read_namespace_type): Likewise.
3636 (read_namespace): Likewise.
3637 (read_module_type): Likewise.
3638 (read_tag_pointer_type): Likewise.
3639 (read_tag_ptr_to_member_type): Likewise.
3640 (read_tag_string_type): Likewise.
3641 (read_subroutine_type): Likewise.
3642 (read_typedef): Likewise.
3643 (read_base_type): Likewise.
3644 (attr_to_dynamic_prop): Likewise.
3645 (read_subrange_type): Likewise.
3646 (read_unspecified_type): Likewise.
3647 (load_partial_dies): Likewise.
3648 (read_partial_die): Likewise.
3649 (find_partial_die): Likewise.
3650 (guess_partial_die_structure_name): Likewise.
3651 (fixup_partial_die): Likewise.
3652 (read_attribute_value): Likewise.
3653 (read_addr_index_from_leb128): Likewise.
3654 (dwarf2_read_addr_index): Likewise.
3655 (dwarf2_string_attr): Likewise.
3656 (lnp_state_machine::check_line_address): Likewise.
3657 (dwarf_decode_lines_1): Likewise.
3658 (dwarf_decode_lines): Likewise.
3659 (dwarf2_start_symtab): Likewise.
3660 (var_decode_location): Likewise.
3661 (new_symbol_full): Likewise.
3662 (dwarf2_const_value_data): Likewise.
3663 (dwarf2_const_value_attr): Likewise.
3664 (dwarf2_const_value): Likewise.
3665 (die_type): Likewise.
3666 (die_containing_type): Likewise.
3667 (lookup_die_type): Likewise.
3668 (guess_full_die_structure_name): Likewise.
3669 (anonymous_struct_prefix): Likewise.
3670 (dwarf2_name): Likewise.
3671 (follow_die_ref_or_sig): Likewise.
3672 (follow_die_offset): Likewise.
3673 (follow_die_ref): Likewise.
3674 (dwarf2_fetch_die_loc_sect_off): Likewise.
3675 (dwarf2_fetch_constant_bytes): Likewise.
3676 (dwarf2_fetch_die_type_sect_off): Likewise.
3677 (dwarf2_get_die_type): Likewise.
3678 (follow_die_sig): Likewise.
3679 (decode_locdesc): Likewise.
3680 (dwarf2_per_cu_objfile): Likewise.
3681 (dwarf2_per_cu_text_offset): Likewise.
3682 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
3684 (set_die_type): Access objfile through
3687 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3689 * valprint.c (converted_character_d): Remove typedef.
3690 (DEF_VEC_O (converted_character_d)): Remove.
3691 (count_next_character): Use std::vector.
3692 (print_converted_chars_to_obstack): Likewise.
3693 (generic_printstr): Likewise.
3695 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3697 * xml-support.h (struct gdb_xml_value): Add constructor.
3698 <value>: Change type to unique_xmalloc_ptr.
3699 (gdb_xml_value_s): Remove typedef.
3700 (DEF_VEC_O (gdb_xml_value_s)): Remove.
3701 (gdb_xml_element_start_handler): Change parameter type to
3703 (xml_find_attribute): Likewise.
3704 * xml-support.c (xml_find_attribute): Change parameter type to
3705 std::vector and adjust.
3706 (gdb_xml_values_cleanup): Remove.
3707 (gdb_xml_parser::start_element): Adjust to std::vector.
3708 (xinclude_start_include): Change paraeter type to std::vector
3710 * btrace.c (check_xml_btrace_version): Likewise.
3711 (parse_xml_btrace_block): Likewise.
3712 (parse_xml_btrace_pt_config_cpu): Likewise.
3713 (parse_xml_btrace_pt): Likewise.
3714 (parse_xml_btrace_conf_bts): Likewise.
3715 (parse_xml_btrace_conf_pt): Likewise.
3716 * memory-map.c (memory_map_start_memory): Likewise.
3717 (memory_map_start_property): Likewise.
3718 * osdata.c (osdata_start_osdata): Likewise.
3719 (osdata_start_item): Likewise.
3720 (osdata_start_column): Likewise.
3721 * remote.c (start_thread): Likewise.
3722 * solib-aix.c (library_list_start_library): Likewise.
3723 (library_list_start_list): Likewise.
3724 * solib-svr4.c (library_list_start_library): Likewise.
3725 (svr4_library_list_start_list): Likewise.
3726 * solib-target.c (library_list_start_segment): Likewise.
3727 (library_list_start_section): Likewise.
3728 (library_list_start_library): Likewise.
3729 (library_list_start_list): Likewise.
3730 * tracepoint.c (traceframe_info_start_memory): Likewise.
3731 (traceframe_info_start_tvar): Likewise.
3732 * xml-syscall.c (syscall_start_syscall): Likewise.
3733 * xml-tdesc.c (tdesc_start_target): Likewise.
3734 (tdesc_start_feature): Likewise.
3735 (tdesc_start_reg): Likewise.
3736 (tdesc_start_union): Likewise.
3737 (tdesc_start_struct): Likewise.
3738 (tdesc_start_flags): Likewise.
3739 (tdesc_start_enum): Likewise.
3740 (tdesc_start_field): Likewise.
3741 (tdesc_start_enum_value): Likewise.
3742 (tdesc_start_vector): Likewise.
3744 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3746 * extension.h (struct xmethod_worker) <clone>: Remove.
3747 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
3749 (python_xmethod_worker::clone): Remove.
3750 * valops.c (find_overload_match): Use std::move instead of
3753 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3755 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
3756 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
3757 <free_xmethod_worker_data>: Remove.
3758 <get_matching_xmethod_workers>: Chance VEC to std::vector.
3759 <get_xmethod_arg_types>: Remove.
3760 <get_xmethod_result_type>: Remove.
3761 <invoke_xmethod>: Remove.
3762 * extension.c (new_xmethod_worker): Remove.
3763 (clone_xmethod_worker): Remove.
3764 (get_matching_xmethod_workers): Return void, pass std::vector by
3766 (get_xmethod_arg_types): Rename to...
3767 (xmethod_worker::get_arg_types): ... this, and adjust.
3768 (get_xmethod_result_type): Rename to...
3769 (xmethod_worker::get_result_type): ... this, and adjust.
3770 (invoke_xmethod): Remove.
3771 (free_xmethod_worker): Remove.
3772 (free_xmethod_worker_vec): Remove.
3773 * extension.h (enum ext_lang_rc): Move here from
3775 (struct xmethod_worker): Add constructor and destructor.
3778 <invoke, clone, do_get_result_type, do_get_arg_types>: New
3779 virtual pure methods.
3780 <get_arg_types, get_result_type>: New methods.
3781 (xmethod_worker_ptr): Remove typedef.
3782 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
3783 (xmethod_worker_vec): Remove typedef.
3784 (xmethod_worker_up): New typedef.
3785 (invoke_xmethod): Remove.
3786 (clone_xmethod_worker): Remove.
3787 (free_xmethod_worker): Remove.
3788 (free_xmethod_worker_vec): Remove.
3789 (get_xmethod_arg_types): Remove.
3790 (get_xmethod_result_type): Remove.
3791 * valops.c (find_method_list): Use std::vector, don't use
3792 intermediate vector.
3793 (value_find_oload_method_list): Use std::vector.
3794 (find_overload_match): Use std::vector.
3795 (find_oload_champ): Use std::vector.
3796 * value.c (value_free): Use operator delete.
3797 (value_of_xmethod): Rename to...
3798 (value_from_xmethod): ... this. Don't assign
3799 xmethod_worker::value, take rvalue-reference.
3800 (result_type_of_xmethod): Adjust.
3801 (call_xmethod): Adjust.
3802 * value.h: Include extension.h.
3803 (struct xmethod_worker): Don't forward-declare.
3804 (value_of_xmethod): Rename to...
3805 (value_from_xmethod): ... this, take rvalue-reference.
3806 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
3807 (struct python_xmethod_worker): ... this, add constructor and
3809 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
3810 (gdbpy_free_xmethod_worker_data): Rename to...
3811 (python_xmethod_worker::~python_xmethod_worker): ... this and
3813 (gdbpy_clone_xmethod_worker_data): Rename to...
3814 (python_xmethod_worker::clone): ... this and adjust.
3815 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
3817 (gdbpy_get_xmethod_arg_types): Rename to...
3818 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
3819 (gdbpy_get_xmethod_result_type): Rename to...
3820 (python_xmethod_worker::do_get_result_type): ... this and
3822 (gdbpy_invoke_xmethod): Rename to...
3823 (python_xmethod_worker::invoke): ... this and adjust.
3824 (new_python_xmethod_worker): Rename to...
3825 (python_xmethod_worker::python_xmethod_worker): ... this and
3827 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
3829 (gdbpy_free_xmethod_worker_data): Remove.
3830 (gdbpy_get_matching_xmethod_workers): Use std::vector.
3831 (gdbpy_get_xmethod_arg_types): Remove.
3832 (gdbpy_get_xmethod_result_type): Remove.
3833 (gdbpy_invoke_xmethod): Remove.
3834 * python/python.c (python_extension_ops): Remove obsolete
3837 2018-01-05 Pedro Alves <palves@redhat.com>
3840 * common/signals-state-save-restore.c
3841 (save_original_signals_state): New parameter 'quiet'. Warn if we
3842 find a custom handler preinstalled, instead of internal erroring.
3843 But only warn if !quiet.
3844 * common/signals-state-save-restore.h
3845 (save_original_signals_state): New parameter 'quiet'.
3846 * main.c (captured_main_1): Move save_original_signals_state call
3847 after option handling, and pass QUIET.
3849 2018-01-05 Pedro Alves <palves@redhat.com>
3851 * spu-tdep.c (spu_catch_start): Pass
3852 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
3854 2018-01-05 Pedro Alves <palves@redhat.com>
3857 * ada-lang.c (literal_symbol_name_matcher): New function.
3858 (ada_get_symbol_name_matcher): Use it for
3859 symbol_name_match_type::SEARCH_NAME.
3860 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
3861 it down instead of assuming symbol_name_match_type::FULL.
3862 * block.h (block_lookup_symbol): New parameter 'match_type'.
3863 * c-valprint.c (print_unpacked_pointer): Use
3864 lookup_symbol_search_name instead of lookup_symbol.
3865 * compile/compile-object-load.c (get_out_value_type): Pass down
3866 symbol_name_match_type::SEARCH_NAME.
3867 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
3868 symbol_name_match_type::FULL.
3869 * cp-support.c (cp_get_symbol_name_matcher): Handle
3870 symbol_name_match_type::SEARCH_NAME.
3871 * infrun.c (insert_exception_resume_breakpoint): Use
3872 lookup_symbol_search_name.
3873 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
3874 * psymtab.c (maintenance_check_psymtabs): Use
3875 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
3876 * stack.c (print_frame_args): Use lookup_symbol_search_name and
3878 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
3879 if symbol_name_match_type::SEARCH_NAME.
3880 (lookup_symbol_in_language): Pass down
3881 symbol_name_match_type::FULL.
3882 (lookup_symbol_search_name): New.
3883 (lookup_language_this): Pass down
3884 symbol_name_match_type::SEARCH_NAME.
3885 (lookup_symbol_aux, lookup_local_symbol): New parameter
3886 'match_type'. Pass it down.
3887 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
3888 (lookup_symbol_search_name): New declaration.
3889 (lookup_symbol_in_block): New 'match_type' parameter.
3891 2018-01-05 Pedro Alves <palves@redhat.com>
3894 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
3896 (ada_lookup_symbol): Reimplement in terms of
3897 ada_lookup_symbol_list, bits factored out from
3898 ada_lookup_encoded_symbol.
3900 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3902 * ada-exp.y (write_object_renaming): When subscripting an array
3903 using a symbol as the index, pass the block in call to
3904 ada_lookup_encoded_symbol when looking that symbol up.
3906 2018-01-05 Jerome Guitton <guitton@adacore.com>
3908 * ada-lang.c (ada_array_length): Use ada_index_type instead of
3911 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3913 * ada-lang.c (ada_to_fixed_value_create): Add handling of
3914 the case where VALUE_LVAL (val0) is not lval_memory.
3916 2018-01-05 Xavier Roirand <roirand@adacore.com>
3918 * ada-valprint.c (print_optional_low_bound): Handle
3919 character-indexed array printing like boolean-indexed array
3922 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3924 * NEWS: Create a new section for the next release branch.
3925 Rename the section of the current branch, now that it has
3928 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3930 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
3931 * version.in: Bump version to 8.1.50.DATE-git.
3933 2018-01-03 Xavier Roirand <roirand@adacore.com>
3935 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
3937 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
3939 (default_exception_support_info) <catch_handlers_sym>: Add field.
3940 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
3941 (ada_exception_name_addr_1): Add "catch handlers" handling.
3942 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
3944 (create_excep_cond_exprs) <ex>: Add parameter.
3945 (re_set_exception): Update create_excep_cond_exprs call.
3946 (print_it_exception, print_one_exception, print_mention_exception)
3947 (print_recreate_exception): Add "catch handler" handling.
3948 (allocate_location_catch_handlers, re_set_catch_handlers)
3949 (check_status_catch_handlers, print_it_catch_handlers)
3950 (print_one_catch_handlers, print_mention_catch_handlers)
3951 (print_recreate_catch_handlers): New function.
3952 (catch_handlers_breakpoint_ops): New variable.
3953 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
3954 Add parameter. Add "catch handler" handling.
3955 (ada_exception_sym_name, ada_exception_breakpoint_ops):
3956 Add "catch handler" handling.
3957 (ada_exception_catchpoint_cond_string): Add "catch handler"
3959 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
3961 (catch_ada_handlers_command): New function.
3962 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
3963 operations structure.
3964 (_initialize_ada_language): Add "catch handlers" command entry.
3965 * NEWS: Document "catch handlers" feature.
3967 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3969 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
3970 account when creating the array type of the slice.
3971 (ada_value_slice): Likewise.
3973 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3975 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
3977 (create_array_type_with_stride): Add byte_stride_prop parameter.
3978 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
3979 New parameter. Update all callers in this file.
3980 (array_type_has_dynamic_stride): New function.
3981 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
3982 of arrays with dynamic byte strides.
3983 * dwarf2read.c (read_array_type): Add support for dynamic
3984 DW_AT_byte_stride attributes.
3986 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3988 * dwarf2read.c (read_unspecified_type): Treat
3989 DW_TAG_enumeration_type DIEs from Ada units as stubs.
3991 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3993 Update copyright year range in all GDB files.
3995 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3997 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
3998 and gdb/testsuite/gdb.base/step-line.c.
4000 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4002 * copyright.py (main): Dump the contents of
4003 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4004 even if BY_HAND is empty.
4006 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4008 * top.c (print_gdb_version): Update Copyright year in version
4011 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4013 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
4015 For older changes see ChangeLog-2017.
4021 version-control: never