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