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