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