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