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