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