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