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