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