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