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