c28b24053ca4d6bc591562a164e9c9411c0f09b0
[external/binutils.git] / gdb / ChangeLog
1 2018-07-19  Pedro Alves  <palves@redhat.com>
2
3         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4         forwarding reference.
5
6 2018-07-18  Pedro Alves  <palves@redhat.com>
7
8         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
9         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
10         cleanup.
11
12 2018-07-18  Pedro Alves  <palves@redhat.com>
13
14         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
15         exceptions.
16         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
17         (gdbscm_wrap): New.
18         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
19         directly instead of a cleanup.
20         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
21         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
22         (vlscm_binop_gdbthrow): New, factored out from ...
23         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
24         (vlscm_rich_compare): Use gdbscm_wrap.
25         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
26         instead of a cleanup.
27         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
28         cleanup.
29         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
30         Use xfree directly instead of a cleanup.
31         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
32         Adjust to use gdbscm_wrap and scoped_value_mark.
33         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
34         (gdbscm_value_address, gdbscm_value_dereference)
35         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
36         scoped_value_mark.
37         (gdbscm_value_dynamic_type): Use scoped_value_mark.
38         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
39         scoped_value_mark.
40         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
41         gdbscm_wrap and scoped_value_mark.
42         (gdbscm_value_to_string): Use xfree directly instead of a
43         cleanup.  Move 'buffer' unique_ptr to TRY scope.
44         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
45         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
46         scoped_value_mark.
47         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
48         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
49         scoped_value_mark.
50         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
51         gdbscm_wrap.
52
53 2018-07-18  Tom de Vries  <tdevries@suse.de>
54
55         * findvar.c (default_read_var_value): Also resolve dynamic type for
56         LOC_OPTIMIZED_OUT vars.
57
58 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
59
60         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
61         decoding.
62
63 2018-07-17  Tom Tromey  <tom@tromey.com>
64
65         * guile/scm-param.c (pascm_set_func, pascm_show_func)
66         (compute_enum_list, pascm_set_param_value_x)
67         (gdbscm_parameter_value): Update.
68         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
69         (gdbscm_scm_to_host_string): Update.
70         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
71         Update.
72         * guile/scm-cmd.c (cmdscm_add_completion): Update.
73         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
74         * guile/scm-string.c (gdbscm_scm_to_string): Return
75         unique_xmalloc_ptr.
76         (gdbscm_scm_to_host_string): Likewise.
77
78 2018-07-17  Tom Tromey  <tom@tromey.com>
79
80         * guile/guile.c (gdbscm_eval_from_control_command): Update.
81         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
82         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
83         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
84         unique_xmalloc_ptr.
85
86 2018-07-17  Tom Tromey  <tom@tromey.com>
87
88         * guile/scm-param.c (pascm_signal_setshow_error): Update.
89         * guile/guile-internal.h (gdbscm_exception_message_to_string):
90         Update.
91         * guile/scm-cmd.c (cmdscm_function): Update.
92         * guile/scm-pretty-print.c
93         (ppscm_print_exception_unless_memory_error): Update.
94         * guile/scm-exception.c (gdbscm_exception_message_to_string):
95         Return unique_xmalloc_ptr.
96
97 2018-07-17  Tom Tromey  <tom@tromey.com>
98
99         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
100         Use string_printf.
101
102 2018-07-17  Jim Wilson  <jimw@sifive.com>
103
104         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
105         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
106         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
107         unecessary braces after EF_RISCV_RVC test.  Delete call to
108         set_gdbarch_decr_pc_after_break.
109
110         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
111         RISCV_LAST_FP_REGNUM + 1.
112         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
113
114 2018-07-17  Tom Tromey  <tom@tromey.com>
115
116         * configure.ac: Remove --disable-gdbcli.
117         * configure: Rebuild.
118         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
119         (SUBDIR_CLI_CFLAGS): Remove.
120         (SFILES): Use SUBDIR_CLI_SRCS.
121         (COMMON_OBS): Use SUBDIR_CLI_OBS.
122
123 2018-07-17  Tom Tromey  <tom@tromey.com>
124
125         PR gdb/18624:
126         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
127
128 2018-07-16  Jim Wilson  <jimw@sifive.com>
129
130         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
131
132 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
133
134         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
135         variable.
136         (libunwind_frame_sniffer): Likewise.
137         (libunwind_frame_prev_register): Likewise.
138         (libunwind_sigtramp_frame_sniffer): Likewise.
139         * ia64-tdep.c (ia64_access_reg): Likewise.
140         (ia64_access_rse_reg): Likewise.
141         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
142         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
143
144 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
145
146         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
147
148 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
149
150         * remote-sim.c (gdbsim_target::close,
151         gdbsim_target::mourn_inferior): Remove unused variables.
152
153 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
154
155         * ia64-tdep.c (ktab_buf): New global.
156         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
157         (get_kernel_table): Adjust.
158
159 2018-07-16  Tom Tromey  <tom@tromey.com>
160
161         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
162         * dwarf2read.c (using_directives, new_symbol): Use
163         outermost_context_p.
164         * dbxread.c (process_one_symbol): Use outermost_context_p.
165         * coffread.c (coff_symtab_read): Use outermost_context_p.
166
167 2018-07-16  Tom Tromey  <tom@tromey.com>
168
169         * dwarf2read.c (using_directives, read_func_scope)
170         (read_lexical_block_scope): Update.
171         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
172         * buildsym.h (local_using_directives, global_using_directives):
173         Don't declare.
174         (get_local_using_directives, set_local_using_directives)
175         (get_global_using_directives): Declare.
176         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
177         m_global_using_directives>: New members.
178         (finish_block_internal, prepare_for_building)
179         (reset_symtab_globals, end_symtab_get_static_block)
180         (push_context): Update.
181         (get_local_using_directives, set_local_using_directives)
182         (get_global_using_directives): New functions.
183         (buildsym_init): Update.
184
185 2018-07-16  Tom Tromey  <tom@tromey.com>
186
187         * xcoffread.c (xcoff_initial_scan): Don't call
188         free_pending_blocks.
189         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
190         * buildsym.h (class scoped_free_pendings): Add constructor.
191         (free_pending_blocks): Don't declare.
192         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
193         (free_pending_blocks): Now static.
194
195 2018-07-16  Tom Tromey  <tom@tromey.com>
196
197         * buildsym.h (push_subfile, pop_subfile): Update declarations.
198         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
199         member.
200         (struct subfile_stack): Remove.
201         (subfile_stack): Remove.
202         (push_subfile, pop_subfile, buildsym_init): Update.
203
204 2018-07-16  Tom Tromey  <tom@tromey.com>
205
206         * buildsym.c (push_subfile): Use gdb_assert.
207         (pop_subfile): Use gdb_assert.
208
209 2018-07-16  Tom Tromey  <tom@tromey.com>
210
211         * buildsym.h (merge_symbol_lists): Remove.
212         * buildsym.c (merge_symbol_lists): Remove.
213
214 2018-07-16  Tom Tromey  <tom@tromey.com>
215
216         * stabsread.c (scan_file_globals): Update comment.
217         * stabsread.h (scan_file_globals): Move from buildsym.h.
218         * buildsym.h (scan_file_globals): Move to stabsread.h.
219
220 2018-07-16  Tom Tromey  <tom@tromey.com>
221
222         * xcoffread.c (xcoff_new_init): Update.
223         * mipsread.c (mipscoff_new_init): Update.
224         * mdebugread.c (mdebug_build_psymtabs): Update.
225         * elfread.c (elf_new_init): Update.
226         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
227         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
228         * buildsym.h (buildsym_new_init): Don't declare.
229         * buildsym.c (buildsym_new_init): Remove.
230
231 2018-07-16  Tom Tromey  <tom@tromey.com>
232
233         * stabsread.h (within_function): Move from buildsym.h.
234         * stabsread.c (start_stabs): Clear within_function.
235         * coffread.c (coff_start_symtab): Clear within_function.
236         * buildsym.h (within_function): Move to stabsread.h.
237         * buildsym.c (prepare_for_building): Update.
238
239 2018-07-16  Tom Tromey  <tom@tromey.com>
240
241         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
242         * dwarf2read.c (dwarf2_start_symtab): Don't set
243         processing_gcc_compilation.
244         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
245
246 2018-07-16  Tom Tromey  <tom@tromey.com>
247
248         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
249         (next_symbol_text_func): Move from buildsym.h.
250         * stabsread.c (hashname): Move from buildsym.c.
251         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
252         (next_symbol_text_func, hashname): Move to stabsread.h.
253         * buildsym.c: Don't include bcache.h
254         (hashname): Move to stasbread.c.
255
256 2018-07-16  Tom Tromey  <tom@tromey.com>
257
258         * buildsym.h (context_stack_size): Don't declare.
259         * buildsym.c (context_stack_size): New global.
260
261 2018-07-16  Tom Tromey  <tom@tromey.com>
262
263         * dbxread.c (processing_acc_compilation): New global.
264         * buildsym.h (processing_acc_compilation): Don't declare.
265
266 2018-07-16  Tom Tromey  <tom@tromey.com>
267
268         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
269         * dbxread.c (read_ofile_symtab): Update.
270         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
271         * buildsym.h (last_source_start_addr): Remove.
272         (set_last_source_start_addr, get_last_source_start_addr):
273         Declare.
274         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
275         parameter.
276         (struct buildsym_compunit) <m_last_source_start_addr>: New
277         member.
278         (prepare_for_building): Remove start_addr parameter.
279         (start_symtab, restart_symtab, end_symtab_get_static_block)
280         (end_symtab_with_blockvector): Update.
281         (set_last_source_start_addr, get_last_source_start_addr): New
282         functions.
283
284 2018-07-16  Tom Tromey  <tom@tromey.com>
285
286         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
287         member.
288         (have_line_numbers): Remove.
289         (record_line, prepare_for_building, end_symtab_get_static_block)
290         (augment_type_symtab): Update.
291
292 2018-07-16  Tom Tromey  <tom@tromey.com>
293
294         * buildsym.c (~buildsym_compunit): Free the macro table.
295         (struct buildsym_compunit) <get_macro_table, release_macros>: New
296         methods.
297         <m_pending_macros>: New member.
298         (pending_macros): Remove.
299         (~scoped_free_pendings, get_macro_table, prepare_for_building)
300         (reset_symtab_globals, end_symtab_get_static_block)
301         (end_symtab_with_blockvector, augment_type_symtab)
302         (buildsym_init): Update.
303
304 2018-07-16  Tom Tromey  <tom@tromey.com>
305
306         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
307         parameter.
308         (buildsym_compunit::set_last_source_file): New method.
309         <m_last_source_file>: New member.
310         (prepare_for_building): Remove "name" parameter.
311         (start_symtab, restart_symtab, reset_symtab_globals): Update.
312         (last_source_file): Remove.
313         (set_last_source_file, get_last_source_file): Update.
314
315 2018-07-16  Tom Tromey  <tom@tromey.com>
316
317         * buildsym.c (prepare_for_building): Add assert.
318
319 2018-07-16  Tom Tromey  <tom@tromey.com>
320
321         * buildsym.c (~buildsym_compunit): Update.
322         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
323         (start_subfile, patch_subfile_names)
324         (end_symtab_with_blockvector): Update.
325
326 2018-07-16  Tom Tromey  <tom@tromey.com>
327
328         * buildsym.c (struct buildsym_compunit): Add constructor,
329         destructor, initializers.
330         (start_buildsym_compunit): Remove.
331         (free_buildsym_compunit): Use "delete".
332         (start_symtab, restart_symtab): Use "new".
333
334 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
335
336         * symfile.c (set_objfile_default_section_offset): Remove struct
337         keyword.
338
339 2018-07-14  Stafford Horne  <shorne@gmail.com>
340
341         * (Responsible Maintainers): Add myself as or1k maintainer.
342
343 2018-07-13  Tom Tromey  <tom@tromey.com>
344
345         * symfile.c (set_objfile_default_section_offset): Use extra braces
346         around initializer.
347
348 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
349
350         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
351         non-branching basr.
352
353 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
354
355         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
356         unittests/cli-utils-selftests.c
357         * unittests/cli-utils-selftests.c: New file.
358
359 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
360
361         * NEWS: Mention new commands. Mention change to 'thread apply'.
362
363 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
364
365         * thread.c (thr_try_catch_cmd): New function.
366         (thread_apply_all_command): Handle qcs flags.
367         (thread_apply_command): Handle qcs flags.
368         (taas_command): New function.
369         (tfaas_command): New function.
370         (_initialize_thread): Update to setup the new commands 'taas
371         and 'tfaas'. Change doc string for 'thread apply'.
372
373 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
374
375         * stack.c: (trailing_outermost_frame): New function, mostly
376         extracted from backtrace_command_1.
377         (leading_innermost_frame): New function.
378         (backtrace_command_1): Update to call trailing_outermost_frame.
379         (frame_apply_command_count): New function.
380         (frame_apply_level_command): New function.
381         (frame_apply_all_command): New function.
382         (frame_apply_command): New function.
383         (faas_command): New function.
384         (frame_cmd_list): New variable.
385         (_initialize_stack): Update to setup the new commands 'frame apply'
386         and 'faas'.
387
388 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
389
390         * cli-utils.c (number_or_range_parser::get_number): Only handle
391         numbers or convenience var as numbers.
392         (parse_flags): New function.
393         (parse_flags_qcs): New function.
394         (number_or_range_parser::finished): Ensure parsing end is detected
395         before end of string.
396         * cli-utils.h (parse_flags): New function.
397         (parse_flags_qcs): New function.
398         (number_or_range_parser): Remove m_finished bool.
399         (number_or_range_parser::skip_range): Set m_in_range to false.
400
401 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
402
403         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
404         on Windows.
405
406 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
407             Jan Kratochvil  <jan.kratochvil@redhat.com>
408             Paul Fertser  <fercerpav@gmail.com>
409             Tsutomu Seki  <sekiriki@gmail.com>
410             Pedro Alves  <palves@redhat.com>
411
412         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
413         'unittests/parse-connection-spec-selftests.c'.
414         (COMMON_SFILES): Add 'common/netstuff.c'.
415         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
416         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
417         * common/netstuff.c: New file.
418         * common/netstuff.h: New file.
419         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
420         (wait_for_connect): Update comment.  New parameter
421         'gdb::optional<int> sock' instead of 'struct serial *scb'.
422         Use 'sock' directly instead of 'scb->fd'.
423         (try_connect): New function, with code from 'net_open'.
424         (net_open): Rewrite main loop to deal with multiple
425         sockets/addresses.  Handle IPv6-style hostnames; implement
426         support for IPv6 connections.
427         * unittests/parse-connection-spec-selftests.c: New file.
428
429 2018-07-11  Pedro Alves  <palves@redhat.com>
430
431         PR gdb/23377
432         * remote.c (remote_target::remote_detach_pid): Call
433         set_current_process.
434
435 2018-07-11  Pedro Alves  <palves@redhat.com>
436
437         * h8300-tdep.c (h8300_gdbarch_init): Remove
438         set_gdbarch_ecoff_reg_to_regnum calls.
439
440 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
441
442         PR c++/23373
443         * c-typeprint.c (c_type_print_base_struct_union): Don't print
444         offsets/sizes for static members of a class/struct.
445
446 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
447
448         * target-descriptions.c (tdesc_register_bitsize): Rename.
449         * target-descriptions.h (tdesc_register_bitsize): Likewise.
450         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
451         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
452
453 2018-07-10  Tom Tromey  <tom@tromey.com>
454
455         * breakpoint.c (moribund_locations): Now static and a
456         std::vector.
457         (breakpoint_init_inferior, moribund_breakpoint_here_p)
458         (build_bpstat_chain, update_global_location_list)
459         (breakpoint_retire_moribund): Update.
460         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
461         VEC.
462
463 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
464
465         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
466         (riscv_register_reggroup_p): Use new function, remove unneeded
467         parenthesis.
468         (riscv_push_dummy_call): Extend assert to compare against xlen or
469         flen based on register type.
470
471 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
472
473         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
474
475 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
476
477         * remote.c (show_hardware_watchpoint_limit): New function.
478         (show_hardware_watchpoint_length_limit): New function.
479         (show_hardware_breakpoint_limit): New function.
480         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
481         where appropriate, update help text.
482
483 2018-07-09  Tom Tromey  <tom@tromey.com>
484
485         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
486         (CLIBS): Don't mention NAT_CLIBS.
487
488 2018-07-09  Tom Tromey  <tom@tromey.com>
489
490         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
491         (LIBGDB_OBS, clean mostlyclean): Update.
492         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
493
494 2018-07-09  Tom Tromey  <tom@tromey.com>
495
496         * Makefile.in (%.c: %.y): Use ECHO_YACC.
497         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
498         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
499
500 2018-07-09  Tom Tromey  <tom@tromey.com>
501
502         * Makefile.in (ALLDEPFILES): Remove exec.c.
503         (COMMON_OBS): Remove exec.o.
504         (COMMON_SFILES): Add exec.c.
505
506 2018-07-09  Tom Tromey  <tom@tromey.com>
507
508         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
509
510 2018-07-09  Tom Tromey  <tom@tromey.com>
511
512         * Makefile.in (clean mostlyclean): Remove stamp-version.
513         (version.c): Depend on stamp-version.
514         (stamp-version): New rule, from version.c rule.
515
516 2018-07-09  Tom Tromey  <tom@tromey.com>
517
518         * Makefile.in (init.c): Depend on stamp-init.
519         (stamp-init): New rule, from init.c rule.
520         (clean mostlyclean): Remove stamp-init.
521
522 2018-07-09  Tom Tromey  <tom@tromey.com>
523
524         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
525         SUBDIR_GCC_COMPILE_SRCS.
526
527 2018-07-09  Tom Tromey  <tom@tromey.com>
528
529         * Makefile.in (init.c): Remove some unused sed rules.
530
531 2018-07-09  Tom Tromey  <tom@tromey.com>
532
533         * Makefile.in (TSOBS): Remove.
534         (INIT_FILES): Update.
535         (LIBGDB_OBS): Update.
536         (COMMON_SFILES): Add inflow.c.
537         (SFILES): Remove inflow.c.
538
539 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
540
541         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
542
543 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
544
545         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
546         get_saveloc_name, is_signal_frame_name, step_name,
547         init_remote_name, create_addr_space_name,
548         destroy_addr_space_name, search_unwind_table_name,
549         find_dyn_list_name): Constify.
550
551 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
552
553         * darwin-nat.c (darwin_pthread_kill): New function.
554         (darwin_resume_thread): Use darwin_pthread_kill.
555
556 2018-07-05  Tom de Vries  <tdevries@suse.de>
557
558         * macroexp.c (macro_buffer) <operator=>: New member function.
559
560 2018-07-04  Tom Tromey  <tom@tromey.com>
561
562         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
563
564 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
565
566         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
567         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
568         * maint.c: Likewise.
569         * top.c: Likewise.
570
571 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
572
573         * NEWS: Create a new section for the next release branch.
574         Rename the section of the current branch, now that it has
575         been cut.
576
577 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
578
579         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
580         * version.in: Bump version to 8.2.50.DATE-git.
581
582 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
583             Pedro Alves  <palves@redhat.com>
584
585         * linux-nat.c (linux_init_ptrace): Rename to ...
586         (linux_init_ptrace_procfs): ... this.  Call
587         linux_proc_init_warnings.
588         (linux_nat_target::post_attach)
589         (linux_nat_target::post_startup_inferior): Adjust.
590         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
591         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
592
593 2018-07-04  Tom de Vries  <tdevries@suse.de>
594
595         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
596         check ...
597         (read_comp_unit_head): ... here.
598
599 2018-07-03  Tom Tromey  <tom@tromey.com>
600
601         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
602         (stop_tracing, tstatus_command)
603         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
604         (print_one_static_tracepoint_marker): Update.
605         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
606         std::vector.
607         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
608         VEC.
609         (all_tracepoints, static_tracepoints_here): Return std::vector.
610
611 2018-07-03  Tom Tromey  <tom@tromey.com>
612
613         * common/ptid.c (ptid_equal): Remove.
614         * common/ptid.h (ptid_equal): Don't declare.
615         * ada-tasks.c: Update.
616         * breakpoint.c: Update.
617         * common/agent.c: Update.
618         * corelow.c: Update.
619         * darwin-nat-info.c: Update.
620         * darwin-nat.c: Update.
621         * dcache.c: Update.
622         * dtrace-probe.c: Update.
623         * dummy-frame.c: Update.
624         * fbsd-nat.c: Update.
625         * frame.c: Update.
626         * gdbthread.h: Update.
627         * gnu-nat.c: Update.
628         * go32-nat.c: Update.
629         * inf-loop.c: Update.
630         * inf-ptrace.c: Update.
631         * infcall.c: Update.
632         * infcmd.c: Update.
633         * inflow.c: Update.
634         * infrun.c: Update.
635         * linux-fork.c: Update.
636         * linux-nat.c: Update.
637         * linux-thread-db.c: Update.
638         * mi/mi-cmd-var.c: Update.
639         * mi/mi-interp.c: Update.
640         * mi/mi-main.c: Update.
641         * nto-procfs.c: Update.
642         * ppc-linux-tdep.c: Update.
643         * procfs.c: Update.
644         * python/py-inferior.c: Update.
645         * python/py-record-btrace.c: Update.
646         * python/py-record.c: Update.
647         * ravenscar-thread.c: Update.
648         * regcache.c: Update.
649         * remote-sim.c: Update.
650         * remote.c: Update.
651         * sol-thread.c: Update.
652         * solib.c: Update.
653         * target.c: Update.
654         * tui/tui-stack.c: Update.
655         * varobj.c: Update.
656         * windows-nat.c: Update.
657         * windows-tdep.c: Update.
658
659 2018-07-03  Tom Tromey  <tom@tromey.com>
660
661         * common/ptid.c (ptid_match): Remove.
662         * common/ptid.h (ptid_match): Don't declare.
663         * fbsd-nat.c: Update.
664         * infcmd.c: Update.
665         * infrun.c: Update.
666         * linux-nat.c: Update.
667         * record-btrace.c: Update.
668         * regcache.c: Update.
669         * remote.c: Update.
670
671 2018-07-03  Tom Tromey  <tom@tromey.com>
672
673         * common/ptid.c (ptid_tid_p): Remove.
674         * common/ptid.h (ptid_tid_p): Don't declare.
675         * sol-thread.c: Update.
676
677 2018-07-03  Tom Tromey  <tom@tromey.com>
678
679         * common/ptid.c (ptid_lwp_p): Remove.
680         * common/ptid.h (ptid_lwp_p): Don't declare.
681         * fbsd-nat.c: Update.
682         * linux-nat.c: Update.
683         * nat/linux-procfs.c: Update.
684         * nat/x86-linux-dregs.c: Update.
685         * sol-thread.c: Update.
686
687 2018-07-03  Tom Tromey  <tom@tromey.com>
688
689         * common/ptid.c (ptid_is_pid): Remove.
690         * common/ptid.h (ptid_is_pid): Don't declare.
691         * infrun.c: Update.
692         * linux-nat.c: Update.
693         * mi/mi-interp.c: Update.
694         * remote.c: Update.
695         * thread.c: Update.
696
697 2018-07-03  Tom Tromey  <tom@tromey.com>
698
699         * common/ptid.c (ptid_get_tid): Remove.
700         * common/ptid.h (ptid_get_tid): Don't declare.
701         * ada-tasks.c: Update.
702         * aix-thread.c: Update.
703         * bsd-uthread.c: Update.
704         * darwin-nat.c: Update.
705         * fbsd-nat.c: Update.
706         * i386-darwin-nat.c: Update.
707         * infrun.c: Update.
708         * linux-tdep.c: Update.
709         * nto-procfs.c: Update.
710         * ppc-ravenscar-thread.c: Update.
711         * python/py-infthread.c: Update.
712         * ravenscar-thread.c: Update.
713         * sol-thread.c: Update.
714         * sparc-ravenscar-thread.c: Update.
715         * windows-nat.c: Update.
716
717 2018-07-03  Tom Tromey  <tom@tromey.com>
718
719         * common/ptid.c (ptid_get_lwp): Remove.
720         * common/ptid.h (ptid_get_lwp): Don't declare.
721         * aarch64-linux-nat.c: Update.
722         * ada-tasks.c: Update.
723         * aix-thread.c: Update.
724         * amd64-linux-nat.c: Update.
725         * arm-linux-nat.c: Update.
726         * corelow.c: Update.
727         * fbsd-nat.c: Update.
728         * fbsd-tdep.c: Update.
729         * gnu-nat.c: Update.
730         * i386-cygwin-tdep.c: Update.
731         * i386-gnu-nat.c: Update.
732         * i386-linux-nat.c: Update.
733         * ia64-linux-nat.c: Update.
734         * inf-ptrace.c: Update.
735         * infrun.c: Update.
736         * linux-fork.c: Update.
737         * linux-nat.c: Update.
738         * linux-tdep.c: Update.
739         * linux-thread-db.c: Update.
740         * mips-linux-nat.c: Update.
741         * nat/aarch64-linux-hw-point.c: Update.
742         * nat/aarch64-linux.c: Update.
743         * nat/linux-btrace.c: Update.
744         * nat/linux-osdata.c: Update.
745         * nat/linux-procfs.c: Update.
746         * nat/x86-linux-dregs.c: Update.
747         * obsd-nat.c: Update.
748         * ppc-fbsd-nat.c: Update.
749         * ppc-linux-nat.c: Update.
750         * procfs.c: Update.
751         * python/py-infthread.c: Update.
752         * ravenscar-thread.c: Update.
753         * remote.c: Update.
754         * s390-linux-nat.c: Update.
755         * sol-thread.c: Update.
756         * sol2-tdep.c: Update.
757         * spu-linux-nat.c: Update.
758         * x86-linux-nat.c: Update.
759         * xtensa-linux-nat.c: Update.
760
761 2018-07-03  Tom Tromey  <tom@tromey.com>
762
763         * common/ptid.c (ptid_get_pid): Remove.
764         * common/ptid.h (ptid_get_pid): Don't declare.
765         * aarch64-linux-nat.c: Update.
766         * ada-lang.c: Update.
767         * aix-thread.c: Update.
768         * alpha-bsd-nat.c: Update.
769         * amd64-fbsd-nat.c: Update.
770         * amd64-linux-nat.c: Update.
771         * arm-linux-nat.c: Update.
772         * arm-nbsd-nat.c: Update.
773         * auxv.c: Update.
774         * break-catch-syscall.c: Update.
775         * breakpoint.c: Update.
776         * bsd-uthread.c: Update.
777         * corelow.c: Update.
778         * ctf.c: Update.
779         * darwin-nat.c: Update.
780         * fbsd-nat.c: Update.
781         * fbsd-tdep.c: Update.
782         * gcore.c: Update.
783         * gnu-nat.c: Update.
784         * hppa-nbsd-nat.c: Update.
785         * hppa-obsd-nat.c: Update.
786         * i386-fbsd-nat.c: Update.
787         * ia64-linux-nat.c: Update.
788         * inf-ptrace.c: Update.
789         * infcmd.c: Update.
790         * inferior.c: Update.
791         * inferior.h: Update.
792         * inflow.c: Update.
793         * infrun.c: Update.
794         * linux-fork.c: Update.
795         * linux-nat.c: Update.
796         * linux-tdep.c: Update.
797         * linux-thread-db.c: Update.
798         * m68k-bsd-nat.c: Update.
799         * mi/mi-interp.c: Update.
800         * mi/mi-main.c: Update.
801         * mips-linux-nat.c: Update.
802         * mips-nbsd-nat.c: Update.
803         * mips64-obsd-nat.c: Update.
804         * nat/aarch64-linux-hw-point.c: Update.
805         * nat/aarch64-linux.c: Update.
806         * nat/linux-btrace.c: Update.
807         * nat/linux-osdata.c: Update.
808         * nat/linux-procfs.c: Update.
809         * nat/x86-linux-dregs.c: Update.
810         * nto-procfs.c: Update.
811         * obsd-nat.c: Update.
812         * ppc-linux-nat.c: Update.
813         * ppc-nbsd-nat.c: Update.
814         * ppc-obsd-nat.c: Update.
815         * proc-service.c: Update.
816         * procfs.c: Update.
817         * python/py-inferior.c: Update.
818         * python/py-infthread.c: Update.
819         * ravenscar-thread.c: Update.
820         * record.c: Update.
821         * remote-sim.c: Update.
822         * remote.c: Update.
823         * rs6000-nat.c: Update.
824         * s390-linux-nat.c: Update.
825         * sh-nbsd-nat.c: Update.
826         * sol-thread.c: Update.
827         * sparc-nat.c: Update.
828         * sparc64-tdep.c: Update.
829         * spu-linux-nat.c: Update.
830         * spu-tdep.c: Update.
831         * target-debug.h: Update.
832         * target.c: Update.
833         * thread.c: Update.
834         * tid-parse.c: Update.
835         * tracefile-tfile.c: Update.
836         * vax-bsd-nat.c: Update.
837         * windows-nat.c: Update.
838         * x86-linux-nat.c: Update.
839         * x86-nat.c: Update.
840
841 2018-07-03  Tom Tromey  <tom@tromey.com>
842
843         * common/ptid.c (pid_to_ptid): Remove.
844         * common/ptid.h (pid_to_ptid): Don't declare.
845         * aix-thread.c: Update.
846         * arm-linux-nat.c: Update.
847         * common/ptid.c: Update.
848         * common/ptid.h: Update.
849         * corelow.c: Update.
850         * ctf.c: Update.
851         * darwin-nat.c: Update.
852         * fbsd-nat.c: Update.
853         * fork-child.c: Update.
854         * gnu-nat.c: Update.
855         * go32-nat.c: Update.
856         * inf-ptrace.c: Update.
857         * infcmd.c: Update.
858         * inferior.c: Update.
859         * infrun.c: Update.
860         * linux-fork.c: Update.
861         * linux-nat.c: Update.
862         * nat/aarch64-linux-hw-point.c: Update.
863         * nat/fork-inferior.c: Update.
864         * nat/x86-linux-dregs.c: Update.
865         * nto-procfs.c: Update.
866         * obsd-nat.c: Update.
867         * procfs.c: Update.
868         * progspace.c: Update.
869         * remote.c: Update.
870         * rs6000-nat.c: Update.
871         * s390-linux-nat.c: Update.
872         * sol-thread.c: Update.
873         * spu-linux-nat.c: Update.
874         * target.c: Update.
875         * top.c: Update.
876         * tracefile-tfile.c: Update.
877         * windows-nat.c: Update.
878
879 2018-07-03  Tom Tromey  <tom@tromey.com>
880
881         * common/ptid.h (ptid_build): Don't declare.
882         * common/ptid.c (ptid_build): Remove.
883         * aix-thread.c: Update.
884         * bsd-kvm.c: Update.
885         * bsd-uthread.c: Update.
886         * common/agent.c: Update.
887         * common/ptid.c: Update.
888         * common/ptid.h: Update.
889         * corelow.c: Update.
890         * darwin-nat.c: Update.
891         * fbsd-nat.c: Update.
892         * gnu-nat.c: Update.
893         * linux-fork.c: Update.
894         * linux-nat.c: Update.
895         * linux-thread-db.c: Update.
896         * nat/linux-osdata.c: Update.
897         * nat/linux-procfs.c: Update.
898         * nto-procfs.c: Update.
899         * obsd-nat.c: Update.
900         * proc-service.c: Update.
901         * procfs.c: Update.
902         * ravenscar-thread.c: Update.
903         * remote-sim.c: Update.
904         * remote.c: Update.
905         * sol-thread.c: Update.
906         * target.c: Update.
907         * windows-nat.c: Update.
908
909 2018-07-03  Tom Tromey  <tom@tromey.com>
910
911         * infrun.c (follow_exec): Use exit_inferior_silent.
912         * inferior.c (exit_inferior_num_silent): Remove.
913         * inferior.h (exit_inferior_num_silent): Don't declare.
914
915 2018-07-03  Tom Tromey  <tom@tromey.com>
916
917         PR cli/23340:
918         * darwin-nat.c (darwin_attach_pid): Reset inferior and
919         inferior_ptid on error.
920
921 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
922             Simon Marchi  <simon.marchi@polymtl.ca>
923
924         PR tdep/8282
925         * disasm.h (gdb_disassembler): Add
926         `m_disassembler_options_holder'. member
927         * disasm.c (get_all_disassembler_options): New function.
928         (gdb_disassembler::gdb_disassembler): Use it.
929         (gdb_buffered_insn_length_init_dis): Likewise.
930         (gdb_buffered_insn_length): Adjust accordingly.
931         (set_disassembler_options): Handle options with arguments.
932         (show_disassembler_options_sfunc): Likewise.  Add a leading new
933         line if showing options with descriptions.
934         (disassembler_options_completer): Adapt to using the
935         `disasm_options_and_args_t' structure.
936         * mips-tdep.c (mips_disassembler_options): New variable.
937         (mips_disassembler_options_o32): Likewise.
938         (mips_disassembler_options_n32): Likewise.
939         (mips_disassembler_options_n64): Likewise.
940         (gdb_print_insn_mips): Don't set `disassembler_options'.
941         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
942         functions.
943         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
944         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
945         `gdbarch_disassembler_options_implicit' and
946         `gdbarch_valid_disassembler_options'.
947         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
948         `disasm_options_and_args_t' structure.
949         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
950         method.
951         (valid_disassembler_options): Switch from `disasm_options_t' to
952         the `disasm_options_and_args_t' structure.
953         * NEWS: Document `set disassembler-options' support for the MIPS
954         target.
955         * gdbarch.h: Regenerate.
956         * gdbarch.c: Regenerate.
957
958 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
959
960         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
961
962 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
963
964         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
965         parameter in call to amd64_target_description.
966         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
967         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
968         (amd64fbsd_init_abi): Likewise.
969         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
970         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
971         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
972         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
973
974 2018-06-29  Pedro Alves  <palves@redhat.com>
975
976         * gdb/amd64-tdep.h (amd64_create_target_description): Add
977         "segments" parameter.
978         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
979         (_initialize_amd64_tdep): Update call to
980         amd64_create_target_description.
981         (amd64_target_description): Add "segments" parameter.  Adjust
982         the implementation to use it.
983         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
984         call to amd64_create_target_description.
985         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
986         * gdb/arch/amd64.h (amd64_create_target_description): Add
987         "segments" register.
988         * gdb/arch/amd64.c (amd64_create_target_description): Add
989         "segments" parameter.  Call create_feature_i386_64bit_segments
990         only if SEGMENTS is true.
991         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
992         call to amd64_create_target_description.
993
994 2018-06-29  Pedro Alves  <palves@redhat.com>
995
996         * thread.c (thread_target_id_str): New, factored out from ...
997         (print_thread_info_1): ... here.  Use it to compute the max
998         "Target Id" column width.
999
1000 2018-06-29  Pedro Alves  <palves@redhat.com>
1001
1002         * remote.c (remote_target::extra_thread_info): Delete
1003         'display_buf' and 'n' locals.  from the cache, regardless of
1004         packet mechanims is in use.  Use cache for qThreadExtra and qP
1005         methods too.
1006
1007 2018-06-29  Pedro Alves  <palves@redhat.com>
1008
1009         * blockframe.c (find_pc_sect_containing_function): New function.
1010         * breakpoint.c (print_breakpoint_location): Don't call
1011         find_pc_sect_function.
1012         * linespec.c (create_sals_line_offset): Record the location's
1013         symbol in the sal.
1014         * linespec.c (convert_address_location_to_sals): Fill in sal's
1015         symbol with find_pc_sect_containing_function.
1016         * symtab.c (find_function_start_sal): Rename to ...
1017         (find_function_start_sal_1): ... this.
1018         (find_function_start_sal): Reimplement as wrapper around
1019         find_function_start_sal_1, and use
1020         find_pc_sect_containing_function to fill in the sal's symbol.
1021         (find_function_start_sal(symbol*, bool)): Adjust.
1022         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1023         comments.
1024         (find_pc_sect_containing_function): Declare.
1025
1026 2018-06-29  Pedro Alves  <palves@redhat.com>
1027
1028         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1029         true if the the location has no symbol.
1030
1031 2018-06-28  Tom Tromey  <tom@tromey.com>
1032
1033         * NEWS: Mention --enable-codesign.
1034         * silent-rules.mk (ECHO_SIGN): New variable.
1035         * configure.ac: Add --enable-codesign.
1036         * configure: Rebuild.
1037         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1038         (gdb$(EXEEXT)): Optionally invoke codesign.
1039
1040 2018-06-28  Pedro Alves  <palves@redhat.com>
1041
1042         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1043         comments.
1044         (switch_to_thread_no_regs): Adjust comment.
1045         * infcmd.c (stop_pc): Delete.
1046         (post_create_inferior, info_program_command): Replace references
1047         to stop_pc with references to thread_info->suspend.stop_pc.
1048         * inferior.h (stop_pc): Delete declaration.
1049         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1050         (handle_inferior_event_1, handle_signal_stop)
1051         (process_event_stop_test, keep_going_stepped_thread)
1052         (handle_step_into_function, handle_step_into_function_backward)
1053         (print_stop_location): Replace references to stop_pc with
1054         references to thread_info->suspend.stop_pc.
1055         (struct infcall_suspend_state) <stop_pc>: Delete field.
1056         (save_infcall_suspend_state, restore_infcall_suspend_state):
1057         Remove references to inf_stat->stop_pc.
1058         * linux-fork.c (fork_load_infrun_state): Likewise.
1059         * record-btrace.c (record_btrace_set_replay): Likewise.
1060         * record-full.c (record_full_goto_entry): Likewise.
1061         * remote.c (print_one_stopped_thread): Likewise.
1062         * target.c (target_resume): Extend comment.
1063         * thread.c (set_executing_thread): New.
1064         (set_executing): Use it.
1065         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1066         Remove references to stop_pc.
1067
1068 2018-06-28  Pedro Alves  <palves@redhat.com>
1069
1070         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1071         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1072
1073 2018-06-28  Tom Tromey  <tom@tromey.com>
1074
1075         * coffread.c (coff_symfile_finish): Update.
1076         * xcoffread.c (xcoff_symfile_finish): Update.
1077         * elfread.c (elf_symfile_finish): Update.
1078         * symfile.h (dwarf2_free_objfile): Don't declare.
1079         * dwarf2read.c (_initialize_dwarf2_read): Use
1080         register_objfile_data_with_cleanup.
1081         (dwarf2_free_objfile): Now static.  Change signature.
1082
1083 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1084
1085         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1086         option "-o" to add-symbol-file-load to add an offset to each
1087         section's load address.
1088         * symfile.c (set_objfile_default_section_offset): New function.
1089
1090 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1091
1092         * symfile.c (add_symbol_file_command): Make sure that sections
1093         with the same name are sorted in the same order.
1094
1095 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1096
1097         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1098         require the second argument.  If omitted, load sections at the
1099         addresses specified in the file.
1100
1101 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1102
1103         * symfile.c (symbol_file_command, symbol_file_add_main_1)
1104         (_initialize_symfile): Add option "-o" to symbol-file to add an
1105         offset to each section of the symbol file.
1106
1107 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1108
1109         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1110
1111 2018-06-27  Tom Tromey  <tom@tromey.com>
1112
1113         * stack.c (_initialize_stack): Update "func" help text.
1114
1115 2018-06-27  Tom Tromey  <tom@tromey.com>
1116
1117         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1118         std::vector.
1119         (unwind_infopy_str, pyuw_create_unwind_info)
1120         (unwind_infopy_add_saved_register, pyuw_sniffer)
1121         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1122         Update.
1123         (struct saved_reg): Add constructor.
1124         <value>: Now a gdbpy_ref<>.
1125
1126 2018-06-27  Tom Tromey  <tom@tromey.com>
1127
1128         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1129
1130 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1131
1132         * gdb-gdb.py.in: Format using autopep8.
1133
1134 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1135
1136         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1137         (type_lookup_function): Recognize CORE_ADDR values.
1138
1139 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1140
1141         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1142         print tag_name.
1143
1144 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1145
1146         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1147         <__lt__>: Add.
1148
1149 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1150
1151         * gdb-gdb.py: Move to...
1152         * gdb-gdb.py.in: ... here.
1153         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1154         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1155         dependencies.
1156         (distclean): Remove gdb-gdb.py when cleaning.
1157         (gdb-gdb.py, gdb-gdb.gdb): New rules.
1158         * configure: Re-generate.
1159
1160 2018-06-27  Pedro Alves  <palves@redhat.com>
1161
1162         * proc-service.c (get_ps_regcache): New.
1163         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1164         (ps_lsetfpregs): Use it.
1165
1166 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
1167
1168         PR gdb/21695
1169         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1170         (dwarf_decode_lines_1): Adjust.
1171
1172 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1173
1174         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1175         override.
1176         <info_proc>: Likewise.
1177
1178 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
1179
1180         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1181         to windows_fetch_one_register, and only handle the case of
1182         fetching one register.  Move the code that reloads the context
1183         and iterates over all registers if R is negative to...
1184         (windows_nat_target::fetch_registers): ... here.
1185         (do_windows_store_inferior_registers): Rename to
1186         windows_store_one_register, and only handle the case of storing
1187         one register.  Move the code that handles the case where r is
1188         negative to...
1189         (windows_nat_target::store_registers) ... here.
1190
1191 2018-06-26  Tom Tromey  <tom@tromey.com>
1192
1193         PR rust/22574:
1194         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1195         * rust-lang.c (rust_print_struct_def): Add podata parameter.
1196         Update.
1197         (rust_internal_print_type): Add podata parameter.
1198         (rust_print_type): Update.
1199
1200 2018-06-26  Tom Tromey  <tom@tromey.com>
1201
1202         * typeprint.h (struct print_offset_data) <update, finish,
1203         maybe_print_hole>: New methods.
1204         <indentation>: New constant.
1205         * typeprint.c (print_offset_data::indentation): Define.
1206         (print_offset_data::maybe_print_hole, print_offset_data::update)
1207         (print_offset_data::finish): Move from c-typeprint.c and rename.
1208         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1209         (print_spaces_filtered_with_print_options): Update.
1210         (c_print_type_union_field_offset, maybe_print_hole)
1211         (c_print_type_struct_field_offset): Move to typeprint.c and
1212         rename.
1213         (c_type_print_base_struct_union): Update.
1214
1215 2018-06-25  Pedro Alves  <palves@redhat.com>
1216
1217         * gdbthread.h (thread_info_ref, delete_thread)
1218         (delete_thread_silent, first_thread_of_inferior)
1219         (any_thread_of_inferior, switch_to_thread)
1220         (enable_thread_stack_temporaries)
1221         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1222         (get_last_thread_stack_temporary)
1223         (value_in_thread_stack_temporaries, can_access_registers_thread):
1224         Spell out "struct thread_info" instead of just "thread_info".
1225         * inferior.h (notice_new_inferior): Likewise.
1226
1227 2018-06-25  Pedro Alves  <palves@redhat.com>
1228
1229         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1230         pass thread_info pointer to delete_thread.
1231         (windows_nat_target::detach): Pass inferior pointer to
1232         detach_inferior.
1233         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1234         delete_thread.
1235         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1236         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1237         and pass a thread_info pointer to delete_thread.
1238         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1239         pass thread_info pointer to delete_thread.
1240         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1241         delete_thread_silent call.
1242         * procfs.c (procfs_target::detach): Pass inferior pointer to
1243         detach_inferior.
1244         (procfs_target::wait): Pass thread_info pointer to delete_thread.
1245         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1246         delete_thread_silent call.
1247         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1248         pass thread_info pointer to delete_thread.
1249         (windows_nat_target::detach): Pass inferior pointer to
1250         delete_inferior.
1251
1252 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1253
1254         * regcache.c (readable_regcache::read_part): Fix asserts.
1255         (reg_buffer::raw_collect_part): New function.
1256         (regcache::write_part): Fix asserts.
1257         (reg_buffer::raw_supply_part): New function.
1258         (regcache::transfer_regset_register): New helper function.
1259         (regcache::transfer_regset): Call new functions.
1260         (regcache_supply_regset): Use gdb_byte*.
1261         (regcache::supply_regset): Likewise.
1262         (regcache_collect_regset): Likewise.
1263         (regcache::collect_regset): Likewise.
1264         * regcache.h (reg_buffer::raw_collect_part): New declaration.
1265         (reg_buffer::raw_supply_part): Likewise.
1266         (regcache::transfer_regset_register): Likewise.
1267         (regcache::transfer_regset): Use gdb_byte*.
1268
1269 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1270
1271         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1272
1273 2018-06-21  Pedro Alves  <palves@redhat.com>
1274
1275         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1276         instead of a ptid_t.  All callers adjusted.
1277         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
1278         adjusted.
1279         (print_ada_task_info, display_current_task_id, task_command_1):
1280         Adjust.
1281         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1282         inferior_thread.
1283         (breakpoint_kind): Adjust.
1284         (remove_breakpoints_pid): Rename to ...
1285         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
1286         pointer.  All callers adjusted.
1287         (bpstat_clear_actions): Use inferior_thread.
1288         (get_bpstat_thread): New.
1289         (bpstat_do_actions): Use it.
1290         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1291         to take a thread_info pointer.  All callers adjusted.
1292         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1293         (breakpoint_re_set_thread): Use inferior_thread.
1294         * breakpoint.h (struct inferior): Forward declare.
1295         (bpstat_stop_status): Update.
1296         (remove_breakpoints_pid): Delete.
1297         (remove_breakpoints_inf): New.
1298         * bsd-uthread.c (bsd_uthread_target::wait)
1299         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1300         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1301         (maint_btrace_packet_history_cmd)
1302         (maint_btrace_clear_packet_history_cmd): Adjust.
1303         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1304         inferior_thread.
1305         * cli/cli-interp.c: Include "inferior.h".
1306         * common/refcounted-object.h (struct
1307         refcounted_object_ref_policy): New.
1308         * compile/compile-object-load.c: Include gdbthread.h.
1309         (store_regs): Use inferior_thread.
1310         * corelow.c (core_target::close): Use current_inferior.
1311         (core_target_open): Adjust to use first_thread_of_inferior and use
1312         the current inferior.
1313         * ctf.c (ctf_target::close): Adjust to use current_inferior.
1314         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1315         <thread>: ... this new field.  All references adjusted.
1316         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1317         Take a thread_info pointer instead of a ptid_t.
1318         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1319         (dummy_frame_discard, register_dummy_frame_dtor): Take a
1320         thread_info pointer instead of a ptid_t.
1321         * elfread.c: Include "inferior.h".
1322         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1323         Use inferior_thread.
1324         * eval.c (evaluate_subexp): Likewise.
1325         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1326         inferior_thread.
1327         * gdb_proc_service.h (struct thread_info): Forward declare.
1328         (struct ps_prochandle) <ptid>: Delete, replaced by ...
1329         <thread>: ... this new field.  All references adjusted.
1330         * gdbarch.h, gdbarch.c: Regenerate.
1331         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1332         'thread' parameter.  All implementations and callers adjusted.
1333         * gdbthread.h (thread_info) <set_running>: New method.
1334         (delete_thread, delete_thread_silent): Take a thread_info pointer
1335         instead of a ptid.
1336         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1337         (first_thread_of_process): Delete, replaced by ...
1338         (first_thread_of_inferior): ... this new function.  All callers
1339         adjusted.
1340         (any_live_thread_of_process): Delete, replaced by ...
1341         (any_live_thread_of_inferior): ... this new function.  All callers
1342         adjusted.
1343         (switch_to_thread, switch_to_no_thread): Declare.
1344         (is_executing): Delete.
1345         (enable_thread_stack_temporaries): Update comment.
1346         <enable_thread_stack_temporaries>: Take a thread_info pointer
1347         instead of a ptid_t.  Incref the thread.
1348         <~enable_thread_stack_temporaries>: Decref the thread.
1349         <m_ptid>: Delete
1350         <m_thr>: New.
1351         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1352         (get_last_thread_stack_temporary)
1353         (value_in_thread_stack_temporaries, can_access_registers_thread):
1354         Take a thread_info pointer instead of a ptid_t.  All callers
1355         adjusted.
1356         * infcall.c (get_call_return_value): Use inferior_thread.
1357         (run_inferior_call): Work with thread pointers instead of ptid_t.
1358         (call_function_by_hand_dummy): Work with thread pointers instead
1359         of ptid_t.  Use thread_info_ref.
1360         * infcmd.c (proceed_thread_callback): Access thread's state
1361         directly.
1362         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1363         access thread's state directly.
1364         (continue_command): Use inferior_thread.
1365         (info_program_command): Use find_thread_ptid and access thread
1366         state directly.
1367         (proceed_after_attach_callback): Use thread state directly.
1368         (notice_new_inferior): Take a thread_info pointer instead of a
1369         ptid_t.  All callers adjusted.
1370         (exit_inferior): Take an inferior pointer instead of a pid.  All
1371         callers adjusted.
1372         (exit_inferior_silent): New.
1373         (detach_inferior): Delete.
1374         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1375         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1376         (detach_inferior_command, kill_inferior_command): Use
1377         find_inferior_id instead of valid_gdb_inferior_id and
1378         gdb_inferior_id_to_pid.
1379         (inferior_command): Use inferior and thread pointers.
1380         * inferior.h (struct thread_info): Forward declare.
1381         (notice_new_inferior): Take a thread_info pointer instead of a
1382         ptid_t.  All callers adjusted.
1383         (detach_inferior): Delete declaration.
1384         (exit_inferior, exit_inferior_silent): Take an inferior pointer
1385         instead of a pid.  All callers adjusted.
1386         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1387         (valid_gdb_inferior_id): Delete.
1388         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1389         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1390         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1391         ...
1392         <inf>: ... this new field.
1393         <step_ptid>: Delete, replaced by ...
1394         <step_thread>: ... this new field.
1395         (get_displaced_stepping_state): Take an inferior pointer instead
1396         of a pid.  All callers adjusted.
1397         (displaced_step_in_progress_any_inferior): Adjust.
1398         (displaced_step_in_progress_thread): Take a thread pointer instead
1399         of a ptid_t.  All callers adjusted.
1400         (displaced_step_in_progress, add_displaced_stepping_state): Take
1401         an inferior pointer instead of a pid.  All callers adjusted.
1402         (get_displaced_step_closure_by_addr): Adjust.
1403         (remove_displaced_stepping_state): Take an inferior pointer
1404         instead of a pid.  All callers adjusted.
1405         (displaced_step_prepare_throw, displaced_step_prepare)
1406         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1407         All callers adjusted.
1408         (start_step_over): Adjust.
1409         (infrun_thread_ptid_changed): Remove bit updating ptids in the
1410         displaced step queue.
1411         (do_target_resume): Adjust.
1412         (fetch_inferior_event): Use inferior_thread.
1413         (context_switch, get_inferior_stop_soon): Take an
1414         execution_control_state pointer instead of a ptid_t.  All callers
1415         adjusted.
1416         (switch_to_thread_cleanup): Delete.
1417         (stop_all_threads): Use scoped_restore_current_thread.
1418         * inline-frame.c: Include "gdbthread.h".
1419         (inline_state) <inline_state>: Take a thread pointer instead of a
1420         ptid_t.  All callers adjusted.
1421         <ptid>: Delete, replaced by ...
1422         <thread>: ... this new field.
1423         (find_inline_frame_state): Take a thread pointer instead of a
1424         ptid_t.  All callers adjusted.
1425         (skip_inline_frames, step_into_inline_frame)
1426         (inline_skipped_frames, inline_skipped_symbol): Take a thread
1427         pointer instead of a ptid_t.  All callers adjusted.
1428         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1429         (inline_skipped_frames, inline_skipped_symbol): Likewise.
1430         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1431         pointers directly.
1432         * linux-nat.c (get_detach_signal): Likewise.
1433         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1434         (thread_db_notice_clone): Adjust.
1435         (thread_db_find_new_threads_silently)
1436         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1437         a thread pointer instead of a ptid_t.  All callers adjusted.
1438         * mi/mi-cmd-var.c: Include "inferior.h".
1439         (mi_cmd_var_update_iter): Update to use thread pointers.
1440         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1441         inferior directly.
1442         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1443         out to ...
1444         (mi_output_running): ... this new function.
1445         (mi_on_resume_1): Adjust to use it.
1446         (mi_user_selected_context_changed): Adjust to use inferior_thread.
1447         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1448         directly.
1449         (interrupt_thread_callback): : Adjust to use thread and inferior
1450         pointers.
1451         * proc-service.c: Include "gdbthread.h".
1452         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1453         * progspace-and-thread.c: Include "inferior.h".
1454         * progspace.c: Include "inferior.h".
1455         * python/py-exitedevent.c (create_exited_event_object): Adjust to
1456         hold a reference to an inferior_object.
1457         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1458         inferior_thread.
1459         * python/py-inferior.c (struct inferior_object): Give the type a
1460         tag name instead of a typedef.
1461         (python_on_normal_stop): No need to check if the current thread is
1462         listed.
1463         (inferior_to_inferior_object): Change return type to
1464         inferior_object.  All callers adjusted.
1465         (find_thread_object): Delete, bits factored out to ...
1466         (thread_to_thread_object): ... this new function.
1467         * python/py-infthread.c (create_thread_object): Use
1468         inferior_to_inferior_object.
1469         (thpy_is_stopped): Use thread pointer directly.
1470         (gdbpy_selected_thread): Use inferior_thread.
1471         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1472         field, replaced with ...
1473         <thread>: ... this new field.  All users adjusted.
1474         (btpy_insn_or_gap_new): Drop const.
1475         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
1476         callers adjusted.
1477         * python/py-record.c: Include "gdbthread.h".
1478         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1479         a ptid_t.  All callers adjusted.
1480         (gdbpy_current_recording): Use inferior_thread.
1481         * python/py-record.h (recpy_record_object) <ptid>: Delete
1482         field, replaced with ...
1483         <thread>: ... this new field.  All users adjusted.
1484         (recpy_element_object) <ptid>: Delete
1485         field, replaced with ...
1486         <thread>: ... this new field.  All users adjusted.
1487         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1488         a ptid_t.  All callers adjusted.
1489         * python/py-threadevent.c: Include "gdbthread.h".
1490         (get_event_thread): Use thread_to_thread_object.
1491         * python/python-internal.h (struct inferior_object): Forward
1492         declare.
1493         (find_thread_object, find_inferior_object): Delete declarations.
1494         (thread_to_thread_object, inferior_to_inferior_object): New
1495         declarations.
1496         * record-btrace.c: Include "inferior.h".
1497         (require_btrace_thread): Use inferior_thread.
1498         (record_btrace_frame_sniffer)
1499         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1500         (get_thread_current_frame): Use scoped_restore_current_thread and
1501         switch_to_thread.
1502         (get_thread_current_frame): Use thread pointer directly.
1503         (record_btrace_replay_at_breakpoint): Use thread's inferior
1504         pointer directly.
1505         * record-full.c: Include "inferior.h".
1506         * regcache.c: Include "gdbthread.h".
1507         (get_thread_arch_regcache): Use the inferior's address space
1508         directly.
1509         (get_thread_regcache, registers_changed_thread): New.
1510         * regcache.h (get_thread_regcache(thread_info *thread)): New
1511         overload.
1512         (registers_changed_thread): New.
1513         (remote_target) <remote_detach_1>: Swap order of parameters.
1514         (remote_add_thread): <remote_add_thread>: Return the new thread.
1515         (get_remote_thread_info(ptid_t)): New overload.
1516         (remote_target::remote_notice_new_inferior): Use thread pointers
1517         directly.
1518         (remote_target::process_initial_stop_replies): Use
1519         thread_info::set_running.
1520         (remote_target::remote_detach_1, remote_target::detach)
1521         (extended_remote_target::detach): Adjust.
1522         * stack.c (frame_show_address): Use inferior_thread.
1523         * target-debug.h (target_debug_print_thread_info_pp): New.
1524         * target-delegates.c: Regenerate.
1525         * target.c (default_thread_address_space): Delete.
1526         (memory_xfer_partial_1): Use current_inferior.
1527         (target_detach): Use current_inferior.
1528         (target_thread_address_space): Delete.
1529         (generic_mourn_inferior): Use current_inferior.
1530         * target.h (struct target_ops) <thread_address_space>: Delete.
1531         (target_thread_address_space): Delete.
1532         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
1533         pointers directly.
1534         (delete_thread_1, delete_thread, delete_thread_silent): Take a
1535         thread pointer instead of a ptid_t.  Adjust all callers.
1536         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1537         (first_thread_of_process): Delete, replaced by ...
1538         (first_thread_of_inferior): ... this new function.  All callers
1539         adjusted.
1540         (any_thread_of_process): Rename to ...
1541         (any_thread_of_inferior): ... this, and take an inferior pointer.
1542         (any_live_thread_of_process): Rename to ...
1543         (any_live_thread_of_inferior): ... this, and take an inferior
1544         pointer.
1545         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1546         (value_in_thread_stack_temporaries)
1547         (get_last_thread_stack_temporary): Take a thread pointer instead
1548         of a ptid_t.  Adjust all callers.
1549         (thread_info::set_running): New.
1550         (validate_registers_access): Use inferior_thread.
1551         (can_access_registers_ptid): Rename to ...
1552         (can_access_registers_thread): ... this, and take a thread
1553         pointer.
1554         (print_thread_info_1): Adjust to compare thread pointers instead
1555         of ptids.
1556         (switch_to_no_thread, switch_to_thread): Make extern.
1557         (scoped_restore_current_thread::~scoped_restore_current_thread):
1558         Use m_thread pointer directly.
1559         (scoped_restore_current_thread::scoped_restore_current_thread):
1560         Use inferior_thread.
1561         (thread_command): Use thread pointer directly.
1562         (thread_num_make_value_helper): Use inferior_thread.
1563         * top.c (execute_command): Use inferior_thread.
1564         * tui/tui-interp.c: Include "inferior.h".
1565         * varobj.c (varobj_create): Use inferior_thread.
1566         (value_of_root_1): Use find_thread_global_id instead of
1567         global_thread_id_to_ptid.
1568
1569 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
1570
1571         * regcache.c (readable_regcache::read_part): Avoid memcpy when
1572         possible.
1573         (regcache::write_part): Likewise.
1574         (readable_regcache::cooked_read_part): Update comment.
1575         (readable_regcache::cooked_write_part): Likewise.
1576         * regcache.h: (readable_regcache::read_part): Likewise.
1577         (regcache::write_part): Likewise.
1578
1579 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
1580             Dirk Schubert  <dirk.schubert@arm.com>
1581
1582         * aarch64-linux-nat.c (post_attach): New.
1583         (aarch64_linux_nat_target::post_attach): Override post_attach to
1584         record the number of hardware debug registers.
1585
1586 2018-06-20  Tom Tromey  <tom@tromey.com>
1587
1588         * python/py-param.c (add_setshow_generic): Make parameters const.
1589         (parmpy_init): Update.
1590
1591 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
1592
1593         * regcache.h (regcache_cooked_read_ftype): Rename to...
1594         (register_read_ftype): ...this, change type to function_view.
1595         (class reg_buffer) <save>: Remove src parameter.
1596         (readonly_detached_regcache) <readonly_detached_regcache>: Make
1597         parameter non-const in first overload.  Remove src parameter in
1598         second overload.
1599         * regcache.c (do_cooked_read): Remove.
1600         (readonly_detached_regcache::readonly_detached_regcache): Make
1601         parameter non-const, adjust call to other constructor.
1602         (reg_buffer::save): Remove src parameter.
1603         * frame.c (do_frame_register_read): Remove.
1604         (frame_save_as_regcache): Use lambda function.
1605         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1606         parameter to ppu2spu_data *.
1607         (ppu2spu_sniffer): Use lambda function.
1608
1609 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
1610
1611         * record-full.c (record_full_target::insert_breakpoint): Remove
1612         "struct" keyword, add const.
1613
1614 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
1615
1616         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1617         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1618         * configure.ac: Remove AC_PREREQ, add missing quoting.
1619         * gnulib/configure.ac: Modernize usage of
1620         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
1621         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1622         (AUTOMAKE_VERSION): Bump to 1.15.1.
1623         * configure: Re-generate.
1624         * config.in: Re-generate.
1625         * aclocal.m4: Re-generate.
1626         * gnulib/aclocal.m4: Re-generate.
1627         * gnulib/config.in: Re-generate.
1628         * gnulib/configure: Re-generate.
1629         * gnulib/import/Makefile.in: Re-generate.
1630
1631 2018-06-19  Pedro Alves  <palves@redhat.com>
1632
1633         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1634         (lookup_minimal_symbol_by_pc_section): ... here with
1635         gdb_assert_not_reached added.
1636
1637 2018-06-19  Pedro Alves  <palves@redhat.com>
1638
1639         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1640         parameter with a block parameter.  Compare location's block symbol
1641         with the frame's block instead of addresses.
1642         (skip_inline_frames): Pass the current block instead of the
1643         frame's address.  Break out as soon as we determine the frame
1644         should not be skipped.
1645
1646 2018-06-18  Tom Tromey  <tom@tromey.com>
1647
1648         * solib-aix.c (solib_aix_get_section_offsets): Return
1649         unique_xmalloc_ptr.
1650         (solib_aix_solib_create_inferior_hook): Update.
1651
1652 2018-06-18  Tom Tromey  <tom@tromey.com>
1653
1654         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1655
1656 2018-06-18  Tom Tromey  <tom@tromey.com>
1657
1658         * solib-frv.c (frv_relocate_main_executable): Use
1659         unique_xmalloc_ptr.
1660         * solib-dsbt.c (dsbt_relocate_main_executable): Use
1661         unique_xmalloc_ptr.
1662
1663 2018-06-18  Tom Tromey  <tom@tromey.com>
1664
1665         * objfiles.h (inhibit_section_map_updates): Update.
1666         (resume_section_map_updates, resume_section_map_updates_cleanup):
1667         Remove.
1668         * solib-svr4.c (svr4_handle_solib_event): Update.
1669         * objfiles.c (inhibit_section_map_updates): Return
1670         scoped_restore_tmpl<int>.
1671         (resume_section_map_updates, resume_section_map_updates_cleanup):
1672         Remove.
1673
1674 2018-06-18  Tom Tromey  <tom@tromey.com>
1675
1676         * valprint.h (read_string): Update.
1677         * valprint.c (read_string): Change type of "buffer".
1678         (val_print_string): Update.
1679         * python/py-value.c (valpy_string): Update.
1680         * language.h (struct language_defn) <la_get_string>: Change
1681         type of "buffer".
1682         (default_get_string, c_get_string): Update.
1683         * language.c (default_get_string): Change type of "buffer".
1684         * guile/scm-value.c (gdbscm_value_to_string): Update.
1685         * c-lang.c (c_get_string): Change type of "buffer".
1686
1687 2018-06-18  Tom Tromey  <tom@tromey.com>
1688
1689         * ser-mingw.c (struct pipe_state_destroyer): New.
1690         (pipe_state_up): New typedef.
1691         (cleanup_pipe_state): Remove.
1692         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
1693
1694 2018-06-18  Tom Tromey  <tom@tromey.com>
1695
1696         * rust-lang.h (rust_yyerror): Don't declare.
1697         * rust-lang.c (rust_language_defn): Update.
1698         * rust-exp.y (yyerror): Now static.
1699         * parse.c (parse_exp_in_context_1): Update.
1700         * p-lang.h (p_yyerror): Don't declare.
1701         * p-lang.c (p_language_defn): Update.
1702         * p-exp.y (yyerror): Now static.
1703         * opencl-lang.c (opencl_language_defn): Update.
1704         * objc-lang.c (objc_language_defn): Update.
1705         * m2-lang.h (m2_yyerror): Don't declare.
1706         * m2-lang.c (m2_language_defn): Update.
1707         * m2-exp.y (yyerror): Now static.
1708         * language.h (struct language_defn) <la_error>: Remove.
1709         * language.c (unk_lang_error): Remove.
1710         (unknown_language_defn, auto_language_defn): Remove.
1711         * go-lang.h (go_yyerror): Don't declare.
1712         * go-lang.c (go_language_defn): Update.
1713         * go-exp.y (yyerror): Now static.
1714         * f-lang.h (f_yyerror): Don't declare.
1715         * f-lang.c (f_language_defn): Update.
1716         * f-exp.y (yyerror): Now static.
1717         * d-lang.h (d_yyerror): Don't declare.
1718         * d-lang.c (d_language_defn): Update.
1719         * d-exp.y (yyerror): Now static.
1720         * c-lang.h (c_yyerror): Don't declare.
1721         * c-lang.c (c_language_defn, cplus_language_defn)
1722         (asm_language_defn, minimal_language_defn): Update.
1723         * c-exp.y (yyerror): Now static.
1724         * ada-lang.h (ada_yyerror): Don't declare.
1725         * ada-lang.c (ada_language_defn): Update.
1726         * ada-exp.y (yyerror): Now static.
1727
1728 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
1729
1730         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1731         (store_sveregs_to_thread): Likewise.
1732         (aarch64_linux_fetch_inferior_registers): Check for SVE.
1733         (aarch64_linux_store_inferior_registers): Likewise.
1734         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1735         function.
1736         (aarch64_sve_regs_copy_to_regcache): Likewise.
1737         (aarch64_sve_regs_copy_from_regcache): Likewise.
1738         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1739         declaration.
1740         (aarch64_sve_regs_copy_to_regcache): Likewise.
1741         (aarch64_sve_regs_copy_from_regcache): Likewise.
1742         (sve_context): Structure from Linux headers.
1743         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1744         (SVE_SIG_ZREG_SIZE): Likewise.
1745         (SVE_SIG_PREG_SIZE): Likewise.
1746         (SVE_SIG_FFR_SIZE): Likewise.
1747         (SVE_SIG_REGS_OFFSET): Likewise.
1748         (SVE_SIG_ZREGS_OFFSET): Likewise.
1749         (SVE_SIG_ZREG_OFFSET): Likewise.
1750         (SVE_SIG_ZREGS_SIZE): Likewise.
1751         (SVE_SIG_PREGS_OFFSET): Likewise.
1752         (SVE_SIG_PREG_OFFSET): Likewise.
1753         (SVE_SIG_PREGS_SIZE): Likewise.
1754         (SVE_SIG_FFR_OFFSET): Likewise.
1755         (SVE_SIG_REGS_SIZE): Likewise.
1756         (SVE_SIG_CONTEXT_SIZE): Likewise.
1757         (SVE_PT_REGS_MASK): Likewise.
1758         (SVE_PT_REGS_FPSIMD): Likewise.
1759         (SVE_PT_REGS_SVE): Likewise.
1760         (SVE_PT_VL_INHERIT): Likewise.
1761         (SVE_PT_VL_ONEXEC): Likewise.
1762         (SVE_PT_REGS_OFFSET): Likewise.
1763         (SVE_PT_FPSIMD_OFFSET): Likewise.
1764         (SVE_PT_FPSIMD_SIZE): Likewise.
1765         (SVE_PT_SVE_ZREG_SIZE): Likewise.
1766         (SVE_PT_SVE_PREG_SIZE): Likewise.
1767         (SVE_PT_SVE_FFR_SIZE): Likewise.
1768         (SVE_PT_SVE_FPSR_SIZE): Likewise.
1769         (SVE_PT_SVE_FPCR_SIZE): Likewise.
1770         (__SVE_SIG_TO_PT): Likewise.
1771         (SVE_PT_SVE_OFFSET): Likewise.
1772         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1773         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1774         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1775         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1776         (SVE_PT_SVE_PREG_OFFSET): Likewise.
1777         (SVE_PT_SVE_PREGS_SIZE): Likewise.
1778         (SVE_PT_SVE_FFR_OFFSET): Likewise.
1779         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1780         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1781         (SVE_PT_SVE_SIZE): Likewise.
1782         (SVE_PT_SIZE): Likewise.
1783         (HAS_SVE_STATE): New define.
1784
1785 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
1786
1787         * nat/aarch64-sve-linux-sigcontext.h: New file.
1788         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1789         new files.
1790         (SVE_VQ_MIN): Likewise.
1791         (SVE_VQ_MAX): Likewise.
1792         (SVE_VL_MIN): Likewise.
1793         (SVE_VL_MAX): Likewise.
1794         (SVE_NUM_ZREGS): Likewise.
1795         (SVE_NUM_PREGS): Likewise.
1796         (sve_vl_valid): Likewise.
1797         (struct user_sve_header): Likewise.
1798
1799 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
1800             Richard Bunt <Richard.Bunt@arm.com>
1801
1802         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1803         was requested by GDB.
1804
1805 2018-06-15  Tom de Vries  <tdevries@suse.de>
1806
1807         * MAINTAINERS (Write After Approval): Add Tom de Vries.
1808
1809 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
1810
1811         * gnulib/update-gnulib.sh: Print expected versions of
1812         autoconf/aclocal.
1813
1814 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
1815
1816         * arch-utils.c (default_type_align): Use type_length_units.
1817         * gdbtypes.c (type_align): Use type_length_units.
1818
1819 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1820
1821         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1822         of 'define' command.
1823
1824 2018-06-14  Tom de Vries  <tdevries@suse.de>
1825
1826         PR cli/22573
1827         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1828         get_no_prettyformat_print_options.
1829
1830 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
1831
1832         * sparc-nat.h: Include target.h.
1833         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1834         <fetch_registers>: Remove this argument in function call.
1835         <store_registers>: Remove this argument in function call, remove
1836         extra semicolon.
1837         <low_forget_process>: Call sparc64_forget_process instead of
1838         sparc_forget_process.
1839
1840 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1841
1842         * procfs.c (_initialize_procfs): Use add_inf_child_target.
1843         (procfs_target::make_corefile_notes): Adjust to new
1844         target_read_alloc return type.
1845
1846 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
1847             Stephen Roberts  <stephen.roberts@arm.com>
1848
1849         PR gdb/22882
1850         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1851         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1852         Move should_notify_stop local into more inner scope.
1853
1854 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
1855             Stephen Roberts  <stephen.roberts@arm.com>
1856
1857         PR gdb/22882
1858         * infrun.c (resume_1): Add call to mark_async_event_handler.
1859
1860 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
1861
1862         * infrun.c (do_target_wait): Change old version of $pc printed.
1863
1864 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
1865
1866         * dwarf2read.c (read_index_from_section): Rename to...
1867         (read_gdb_index_from_section): ... this, update all callers.
1868         (dwarf2_read_index): Rename to...
1869         (dwarf2_read_gdb_index): ... this, update all callers.
1870
1871 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
1872
1873         * gdb/hppa-linux-nat.c
1874         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1875         hppa_linux_nat_target::fetch_registers.
1876
1877 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
1878
1879         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1880         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1881         (AARCH64_DWARF_SVE_FFR): Likewise.
1882         (AARCH64_DWARF_SVE_P0): Likewise.
1883         (AARCH64_DWARF_SVE_Z0): Likewise.
1884
1885 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
1886
1887         * common/common-regcache.h (raw_compare): New function.
1888         * regcache.c (regcache::raw_compare): Likewise.
1889         * regcache.h (regcache::raw_compare): New declaration.
1890
1891 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
1892
1893         * common/common-regcache.h (reg_buffer_common): New structure.
1894         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1895         (reg_buffer::raw_supply): Likewise.
1896         (reg_buffer::raw_supply_integer): Likewise.
1897         (reg_buffer::raw_supply_zeroed): Likewise.
1898         (reg_buffer::raw_collect): Likewise.
1899         (reg_buffer::raw_collect_integer): Likewise.
1900         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1901         (reg_buffer::raw_supply): Likewise.
1902         (reg_buffer::raw_supply_integer): Likewise.
1903         (reg_buffer::raw_supply_zeroed): Likewise.
1904         (reg_buffer::raw_collect): Likewise.
1905         (reg_buffer::raw_collect_integer): Likewise.
1906
1907 2018-06-10  Tom Tromey  <tom@tromey.com>
1908
1909         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
1910         (class remote_state) <stop_reply_queue>: Now std::vector.
1911         (remote_state::~remote_state)
1912         (remote_target::stop_reply_queue_length): Update.
1913         (struct queue_iter_param, remove_child_of_pending_fork)
1914         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1915         (check_pending_event_prevents_wildcard_vcont_callback)
1916         (remove_stop_reply_for_inferior)
1917         (remove_stop_reply_of_remote_state)
1918         (remote_notif_remove_once_on_match)
1919         (stop_reply_match_ptid_and_ws)
1920         (remote_kill_child_of_pending_fork): Remove.
1921         (remote_target::remove_new_fork_children)
1922         (remote_target::check_pending_events_prevent_wildcard_vcont)
1923         (remote_target::discard_pending_stop_replies)
1924         (remote_target::discard_pending_stop_replies_in_queue)
1925         (remote_target::remote_notif_remove_queued_reply)
1926         (remote_target::queued_stop_reply)
1927         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1928         (remote_target::wait, remote_target::kill_new_fork_children)
1929         (remote_target::async): Update.
1930
1931 2018-06-10  Tom Tromey  <tom@tromey.com>
1932
1933         * record-full.c (record_full_arch_list_cleanups): Remove.
1934         (record_full_message): Use try/catch.
1935         (record_full_wait_cleanups): Remove.
1936         (record_full_wait_1): Use try/catch.
1937         (record_full_restore): Likewise.
1938
1939 2018-06-10  Tom Tromey  <tom@tromey.com>
1940
1941         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
1942         declare VEC.  Add constructor.
1943         <in_target_beneath>: Now bool.
1944         (record_full_breakpoints): Now a std::vector, static.
1945         (record_full_sync_record_breakpoints)
1946         (record_full_init_record_breakpoints)
1947         (record_full_target::insert_breakpoint)
1948         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
1949
1950 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
1951
1952         * dwarf2read.c (process_cu_includes): Remove struct keyword.
1953         * serial.c (serial_interface_lookup): Remove struct keyword.
1954
1955 2018-06-10  Tom Tromey  <tom@tromey.com>
1956
1957         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1958         method.
1959         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1960         a method.
1961         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1962         method.
1963         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1964         "beneath" as a method.
1965         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1966         Use "beneath" as a method.
1967
1968 2018-06-10  Tom Tromey  <tom@tromey.com>
1969
1970         * tracefile.c (struct trace_file_writer_deleter): New.
1971         <operator()>: Rename from trace_file_writer_xfree.
1972         (trace_file_writer_up): New typedef.
1973         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1974
1975 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
1976
1977         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1978         <m_registers, m_register_status>: Change type to
1979         std::unique_ptr.
1980         * regcache.c (reg_buffer::reg_buffer): Use new instead of
1981         XCNEWVEC.
1982
1983 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
1984
1985         * common/common-regcache.h (enum register_status): Add
1986         underlying type "signed char".
1987         * regcache.h (reg_buffer) <m_register_status>: Change type to
1988         register_status *.
1989         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1990         register_status instead of signed char.
1991         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1992         (reg_buffer::get_register_status): Remove cast.
1993         (readable_regcache::raw_read): Remove cast.
1994         (readable_regcache::cooked_read): Remove cast.
1995
1996 2018-06-09  Tom Tromey  <tom@tromey.com>
1997
1998         * source.c (reverse_search_command, forward_search_command): Use
1999         scoped_fd.
2000
2001 2018-06-09  Tom Tromey  <tom@tromey.com>
2002
2003         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2004         (serial_ops_list): Now static, std::vector.
2005         (serial_interface_lookup, serial_add_interface): Update.
2006
2007 2018-06-09  Tom Tromey  <tom@tromey.com>
2008
2009         * dwarf2read.c (process_cu_includes): Update.
2010         (process_full_comp_unit): Update.
2011         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2012         std::vector.
2013
2014 2018-06-08  Paul Koning  <paul_koning@dell.com>
2015
2016         PR gdb/23252
2017
2018         * python/python.c (do_start_initialization):
2019         Avoid call to internal Python API.
2020         (init__gdb_module): New function.
2021
2022 2018-06-08  Gary Benson <gbenson@redhat.com>
2023
2024         * linux-thread-db.c (valprint.h): New include.
2025         (struct check_thread_db_info): New structure.
2026         (check_thread_db_on_load, tdb_testinfo): New static globals.
2027         (check_thread_db, check_thread_db_callback): New functions.
2028         (try_thread_db_load_1): Run integrity checks if requested.
2029         (maintenance_check_libthread_db): New function.
2030         (_initialize_thread_db): Register "maint check libthread-db"
2031         and "maint set/show check-libthread-db".
2032         * NEWS: Mention the above new commands.
2033
2034 2018-06-08  Tom Tromey  <tom@tromey.com>
2035
2036         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2037         now a method.
2038
2039 2018-06-08  Tom Tromey  <tom@tromey.com>
2040
2041         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2042
2043 2018-06-08  Tom Tromey  <tom@tromey.com>
2044
2045         * common/btrace-common.h (struct btrace_data): Add constructor,
2046         destructor, move assignment operator.
2047         <empty, clear, fini>: New methods.
2048         <format>: Initialize.
2049         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2050         (btrace_data_empty): Don't declare.
2051         * common/btrace-common.c (btrace_data_init): Remove.
2052         (btrace_data::fini): Rename from btrace_data_fini.
2053         (btrace_data::empty): Rename from btrace_data_empty.
2054         (btrace_data::clear): Rename from btrace_data_clear.  Return
2055         bool.
2056         * btrace.h (make_cleanup_btrace_data): Don't declare.
2057         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2058         (parse_xml_btrace): Update.
2059         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2060         (maint_btrace_clear_packet_history_cmd): Update.
2061
2062 2018-06-07  Pedro Alves  <palves@redhat.com>
2063
2064         * target.h (target_ops) <beneath>: Now a method.  All references
2065         updated.
2066         (class target_stack): New.
2067         * target.c (g_target_stack): New.
2068         (g_current_top_target): Delete.
2069         (current_top_target): Get the top target out of g_target_stack.
2070         (target_stack::push, target_stack::unpush): New.
2071         (push_target, unpush_target): Reimplement.
2072         (target_is_pushed): Reimplement in terms of g_target_stack.
2073         (target_ops::beneath, target_stack::find_beneath): New.
2074
2075 2018-06-07  Pedro Alves  <palves@redhat.com>
2076
2077         * target.h (find_target_beneath): Delete declaration.
2078         * target.c (find_target_beneath): Delete definition.
2079         * aix-thread.c: All callers of find_target_beneath adjusted to
2080         call target_ops::beneath instead.
2081         * bsd-uthread.c: Likewise.
2082         * linux-thread-db.c: Likewise.
2083         * ravenscar-thread.c: Likewise.
2084         * sol-thread.c: Likewise.
2085         * spu-multiarch.c: Likewise.
2086
2087 2018-06-07  Pedro Alves  <palves@redhat.com>
2088
2089         * target.h (target_ops) <beneath>: Now a method.  All references
2090         updated.
2091         (target_ops) <m_beneath>: New.
2092         * target.c (target_ops::beneath): New.
2093         * corelow.c: Adjust all references to target_ops::beneath.
2094         * linux-thread-db.c: Likewise.
2095         * make-target-delegates: Likewise.
2096         * record-btrace.c: Likewise.
2097         * record-full.c: Likewise.
2098         * remote.c: Likewise.
2099         * target.c: Likewise.
2100         * target-delegates.c: Regenerate.
2101
2102 2018-06-07  Pedro Alves  <palves@redhat.com>
2103
2104         * target.h (target_stack): Delete.
2105         (current_top_target): Declare function.
2106         * target.c (target_stack): Delete.
2107         (g_current_top_target): New.
2108         (current_top_target): New function.
2109         * auxv.c: Use current_top_target instead of target_stack
2110         throughout.
2111         * avr-tdep.c: Likewise.
2112         * breakpoint.c: Likewise.
2113         * corefile.c: Likewise.
2114         * elfread.c: Likewise.
2115         * eval.c: Likewise.
2116         * exceptions.c: Likewise.
2117         * frame.c: Likewise.
2118         * gdbarch-selftests.c: Likewise.
2119         * gnu-v3-abi.c: Likewise.
2120         * ia64-tdep.c: Likewise.
2121         * ia64-vms-tdep.c: Likewise.
2122         * infcall.c: Likewise.
2123         * infcmd.c: Likewise.
2124         * infrun.c: Likewise.
2125         * linespec.c: Likewise.
2126         * linux-tdep.c: Likewise.
2127         * minsyms.c: Likewise.
2128         * ppc-linux-nat.c: Likewise.
2129         * ppc-linux-tdep.c: Likewise.
2130         * procfs.c: Likewise.
2131         * regcache.c: Likewise.
2132         * remote.c: Likewise.
2133         * rs6000-tdep.c: Likewise.
2134         * s390-linux-nat.c: Likewise.
2135         * s390-tdep.c: Likewise.
2136         * solib-aix.c: Likewise.
2137         * solib-darwin.c: Likewise.
2138         * solib-dsbt.c: Likewise.
2139         * solib-spu.c: Likewise.
2140         * solib-svr4.c: Likewise.
2141         * solib-target.c: Likewise.
2142         * sparc-tdep.c: Likewise.
2143         * sparc64-tdep.c: Likewise.
2144         * spu-tdep.c: Likewise.
2145         * symfile.c: Likewise.
2146         * symtab.c: Likewise.
2147         * target-descriptions.c: Likewise.
2148         * target-memory.c: Likewise.
2149         * target.c: Likewise.
2150         * target.h: Likewise.
2151         * tracefile-tfile.c: Likewise.
2152         * tracepoint.c: Likewise.
2153         * valops.c: Likewise.
2154         * valprint.c: Likewise.
2155         * value.c: Likewise.
2156         * windows-tdep.c: Likewise.
2157         * mi/mi-main.c: Likewise.
2158
2159 2018-06-07  Tom Tromey  <tom@tromey.com>
2160
2161         * valprint.h (build_address_symbolic): Declare.
2162         * printcmd.c (print_address_symbolic): Update.
2163         (build_address_symbolic): Change "name" and "filename" to
2164         std::string.
2165         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2166         Update.
2167         * defs.h (build_address_symbolic): Remove declaration.
2168
2169 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
2170
2171         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2172         (aarch64_vnv_type): Add function.
2173         (aarch64_pseudo_register_name): Add V regs for SVE.
2174         (aarch64_pseudo_register_type): Likewise.
2175         (aarch64_pseudo_register_reggroup_p): Likewise.
2176         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2177         (aarch64_pseudo_read_value): Add V regs for SVE.
2178         (aarch64_pseudo_write_2): Use V0 offset for SVE
2179         (aarch64_pseudo_write): Add V regs for SVE.
2180         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2181
2182 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2183
2184         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2185         (sve_vl_from_vq): Likewise.
2186
2187 2018-06-05  Tom Tromey  <tom@tromey.com>
2188
2189         * cli/cli-cmds.c (show_version): Update.
2190         * top.c (print_gdb_version): Add "interactive" parameter.
2191         Update.
2192         * main.c (captured_main_1): Update.
2193         * top.h (print_gdb_version): Add "interactive" parameter and a
2194         comment.
2195
2196 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
2197
2198         * common/enum-flags.h: Add trailing semicolon to example in
2199         comment.
2200
2201 2018-06-05  Tom Tromey  <tom@tromey.com>
2202
2203         PR cli/12326:
2204         * NEWS: Add entry about pager.
2205         * utils.c (pagination_disabled_for_command): New global.
2206         (prompt_for_continue): Allow "c" response to prompt.
2207         (reinitialize_more_filter): Clear
2208         pagination_disabled_for_command.
2209         (fputs_maybe_filtered): Check pagination_disabled_for_command.
2210
2211 2018-06-04  Tom Tromey  <tom@tromey.com>
2212
2213         * ada-lang.h (ada_lookup_symbol_list): Update.
2214         * ada-lang.c (resolve_subexp): Update.
2215         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
2216         parameter.
2217         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2218         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2219         results parameter to std::vector.
2220         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2221         Update.
2222         * ada-exp.y (block_lookup): Update.
2223         (select_possible_type_sym): Change type of syms.  Remove nsyms
2224         parameter.
2225         (write_var_or_type, write_name_assoc): Update.
2226
2227 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
2228
2229         * windows-nat.c (windows_nat_target::xfer_partial): Return
2230         TARGET_XFER_E_IO if we need to delegate to the target beneath
2231         but BENEATH is NULL.
2232
2233 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
2234
2235         * Makefile.in (config.status): Add configure.nat as a
2236         dependency.
2237
2238 2018-06-04  Tom Tromey  <tom@tromey.com>
2239
2240         * cp-name-parser.y (cpname_state): Add method declarations.
2241         (HANDLE_QUAL): Update.
2242         (cpname_state::d_grab, cpname_state::fill_comp)
2243         (cpname_state::make_operator, cpname_state::make_dtor)
2244         (cpname_state::make_builtin_type, cpname_state::make_name)
2245         (cpname_state::d_qualify, cpname_state::d_int_type)
2246         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2247         (%union): Move earlier.
2248
2249 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2250
2251         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2252
2253 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2254
2255         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2256         (aarch64_pseudo_write_1): Likewise.
2257         (aarch64_pseudo_read_value): Use helper.
2258         (aarch64_pseudo_write): Likewise.
2259
2260 2018-06-04  Pedro Alves  <palves@redhat.com>
2261
2262         * darwin-nat.c (darwin_ops): Delete.
2263         (darwin_attach_pid): Use get_native_target.
2264
2265 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2266
2267         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2268         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2269
2270 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2271
2272         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2273         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2274         (aarch64_gdbarch_init): Check for SVE.
2275         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2276
2277 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2278
2279         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2280         * aarch64-tdep.h (aarch64_read_description): Likewise.
2281         * arch/aarch64.c (aarch64_create_target_description): Likewise.
2282         * arch/aarch64.h (aarch64_create_target_description): Likewise.
2283         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2284         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2285         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2286
2287 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
2288
2289         * value.c (value_fetch_lazy_bitfield): New.
2290         (value_fetch_lazy_memory): New.
2291         (value_fetch_lazy_register): New.
2292         (value_fetch_lazy): Factor out to smaller functions.
2293
2294 2018-06-01  Tom Tromey  <tom@tromey.com>
2295
2296         * cp-name-parser.y (backslashable, represented): Now const.
2297
2298 2018-06-01  Tom Tromey  <tom@tromey.com>
2299
2300         * cp-name-parser.y: Include parser-defs.h.
2301         (parser_fprintf): Remove declaration.
2302
2303 2018-06-01  Tom Tromey  <tom@tromey.com>
2304
2305         * cp-name-parser.y: Use %pure-parser, %lex-param, and
2306         %parse-param.
2307         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2308         (global_result): Remove globals.
2309         (struct cpname_state): New.
2310         (yyparse): Don't declare.
2311         (yylex, yyerror): Move declarations after %union.
2312         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2313         (make_name): Add state parameter.
2314         Update all callers.
2315         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2316         parameter.
2317         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2318         Update.
2319         (yylex): Add lvalp, state parameters.
2320         (yyerror): Add state parameter.
2321         (cp_demangled_name_to_comp): Update.
2322
2323 2018-06-01  Tom Tromey  <tom@tromey.com>
2324
2325         * cp-name-parser.y (parser_fprintf): Declare.
2326         (GDB_YY_REMAP_PREFIX): Define.
2327         Include yy-remap.h.  Don't redefine yy* identifiers.
2328
2329 2018-06-01  Tom Tromey  <tom@tromey.com>
2330
2331         * python/py-type.c (typy_legacy_template_argument): Update.
2332         * cp-support.h (cp_demangled_name_to_comp): Update.
2333         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2334         parameter to be a "std::string *".
2335         (main): Update.
2336
2337 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2338
2339         * ada-lex.l: Include "diagnostics.h" instead of
2340         "common/diagnostics.h".
2341         * unittests/environ-selftests.c: Likewise.
2342         * common/diagnostics.h: Moved to ../include.
2343
2344 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
2345
2346         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2347         to language_mode_manual while calling breakpoint_re_set_one.
2348
2349 2018-06-01  Tom Tromey  <tom@tromey.com>
2350
2351         * valops.c (value_cast_structs, destructor_name_p): Update.
2352         * symtab.c (gdb_mangle_name): Update.
2353         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2354         Update.
2355         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2356         (pascal_object_print_value_fields, pascal_object_print_value):
2357         Update.
2358         * p-typeprint.c (pascal_type_print_derivation_info): Update.
2359         * linespec.c (find_methods): Update.
2360         * gdbtypes.h (type_name_no_tag): Remove.
2361         (type_name_or_error): Rename from type_name_no_tag_or_error.
2362         * gdbtypes.c (type_name_no_tag): Remove.
2363         (type_name_or_error): Rename from type_name_no_tag_or_error.
2364         (lookup_struct_elt_type, check_typedef): Update.
2365         * expprint.c (print_subexp_standard): Update.
2366         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2367         * d-namespace.c (d_lookup_nested_symbol): Update.
2368         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2369         (cp_print_class_member): Update.
2370         * cp-namespace.c (cp_lookup_nested_symbol): Update.
2371         * completer.c (add_struct_fields): Update.
2372         * c-typeprint.c (cp_type_print_derivation_info)
2373         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2374         Update.
2375         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2376         (ada_prefer_type, ada_is_exception_sym): Update.
2377
2378 2018-06-01  Tom Tromey  <tom@tromey.com>
2379
2380         * valops.c (enum_constant_from_type, value_namespace_elt)
2381         (value_maybe_namespace_elt): Update.
2382         * valarith.c (find_size_for_pointer_math): Update.
2383         * target-descriptions.c (make_gdb_type): Update.
2384         * symmisc.c (print_symbol): Update.
2385         * stabsread.c (define_symbol, read_type)
2386         (complain_about_struct_wipeout, add_undefined_type)
2387         (cleanup_undefined_types_1): Update.
2388         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2389         (rust_range_type_p, val_print_struct, rust_print_struct_def)
2390         (rust_internal_print_type, rust_composite_type)
2391         (rust_evaluate_funcall, rust_evaluate_subexp)
2392         (rust_inclusive_range_type_p): Update.
2393         * python/py-type.c (typy_get_tag): Update.
2394         * p-typeprint.c (pascal_type_print_base): Update.
2395         * mdebugread.c (parse_symbol, parse_type): Update.
2396         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2397         Update.
2398         * guile/scm-type.c (gdbscm_type_tag): Update.
2399         * go-lang.c (sixg_string_p): Update.
2400         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2401         Update.
2402         * gdbtypes.h (struct main_type) <tag_name>: Remove.
2403         (TYPE_TAG_NAME): Remove.
2404         * gdbtypes.c (type_name_no_tag): Simplify.
2405         (check_typedef, check_types_equal, recursive_dump_type)
2406         (copy_type_recursive, arch_composite_type): Update.
2407         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
2408         in summary mode when needed.
2409         * eval.c (evaluate_funcall): Update.
2410         * dwarf2read.c (fixup_go_packaging, read_structure_type)
2411         (process_structure_scope, read_enumeration_type)
2412         (read_namespace_type, read_module_type, determine_prefix): Update.
2413         * cp-support.c (inspect_type): Update.
2414         * coffread.c (process_coff_symbol, decode_base_type): Update.
2415         * c-varobj.c (c_is_path_expr_parent): Update.
2416         * c-typeprint.c (c_type_print_base_struct_union): Update.
2417         (c_type_print_base_1): Update.  Print struct/class/union/enum in
2418         summary when using C language.
2419         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2420         (gen_maybe_namespace_elt): Update.
2421         * ada-lang.c (ada_type_name): Simplify.
2422         (empty_record, ada_template_to_fixed_record_type_1)
2423         (template_to_static_fixed_type)
2424         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2425
2426 2018-06-01  Tom Tromey  <tom@tromey.com>
2427
2428         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2429         c_print_type.
2430         * c-typeprint.c (c_print_type_1): Add "language" parameter.
2431         (c_print_type): Update.
2432         (c_print_type): New overload.
2433         (c_type_print_varspec_prefix, c_type_print_args)
2434         (c_type_print_varspec_suffix, c_print_type_no_offsets)
2435         (c_type_print_base_struct_union, c_type_print_base_1)
2436         (cp_type_print_method_args): Add "language" parameter.
2437         (c_type_print_base): Update.
2438         * c-lang.h (c_print_type): Add new overload.
2439
2440 2018-06-01  Tom Tromey  <tom@tromey.com>
2441
2442         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2443         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2444
2445 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
2446
2447         * aarch64-tdep.c (aarch64_sve_register_names): New const
2448         var.
2449         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2450         (AARCH64_SVE_Z_REGS_NUM): New define.
2451         (AARCH64_SVE_P_REGS_NUM): Likewise.
2452         (AARCH64_SVE_NUM_REGS): Likewise.
2453
2454 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
2455
2456         * nat/linux-ptrace.h [__alpha__]
2457         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2458         definitions.
2459
2460 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
2461
2462         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2463         the endianness selected.
2464         * NEWS: Document `set endian auto' mode operation update.
2465
2466 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
2467
2468         * Makefile.in: Add new header.
2469         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2470         (sve_vl_from_vg): Likewise.
2471         (sve_vq_from_vl): Likewise.
2472         (sve_vl_from_vq): Likewise.
2473         (sve_vq_from_vg): Likewise.
2474         (sve_vg_from_vq): Likewise.
2475         * configure.nat: Add new c file.
2476         * nat/aarch64-sve-linux-ptrace.c: New file.
2477         * nat/aarch64-sve-linux-ptrace.h: New file.
2478
2479 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
2480
2481         * aarch64-linux-nat.c (aarch64_linux_read_description):
2482         Add parmeter zero.
2483         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2484         Likewise.
2485         * aarch64-tdep.c (tdesc_aarch64_list): Add.
2486         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2487         (aarch64_gdbarch_init): Add parmeter zero.
2488         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2489         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2490         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2491         parmeter.
2492         * doc/gdb.texinfo: Describe SVE feature
2493         * features/aarch64-sve.c: New file.
2494
2495 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
2496
2497         PR gdb/23210
2498         * gdbarch.sh (significant_addr_bit): Default to zero when
2499         not set by target architecture.
2500         * gdbarch.c: Re-generated.
2501         * utils.c (address_significant): Update.
2502
2503 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
2504
2505         * stack.c (func_command): Remove trailing newline in call to error.
2506
2507 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2508
2509         * regcache.h (regcache_raw_collect): Remove, update callers to
2510         use regcache::raw_collect.
2511         * regcache.c (regcache_raw_collect): Remove.
2512
2513 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2514
2515         * regcache.h (regcache_raw_supply): Remove, update callers to
2516         use detached_regcache::raw_supply.
2517         * regcache.c (regcache_raw_supply): Remove.
2518
2519 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2520
2521         * regcache.h (regcache_cooked_write_part): Remove, update
2522         callers to use regcache::cooked_write_part.
2523         * regcache.c (regcache_cooked_write_part): Remove.
2524
2525 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2526
2527         * regcache.h (regcache_cooked_read_part): Remove, update callers
2528         to use readable_regcache::cooked_read_part.
2529         * regcache.c (regcache_cooked_read_part): Remove.
2530
2531 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2532
2533         * regcache.h (regcache_cooked_read_value): Remove, update
2534         callers to use readable_regcache::cooked_read_value.
2535         * regcache.c (regcache_cooked_read_value): Remove.
2536
2537 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2538
2539         * regcache.h (regcache_cooked_write): Remove, update callers to
2540         use regcache::cooked_write.
2541         * regcache.c (regcache_cooked_write): Remove.
2542
2543 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2544
2545         * regcache.h (regcache_invalidate): Remove, update callers to
2546         use detached_regcache::invalidate instead.
2547         * regcache.c (regcache_invalidate): Remove.
2548
2549 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2550
2551         * regcache.h (regcache_raw_write_part): Remove, update callers
2552         to use regcache::raw_write_part instead.
2553         * regcache.c (regcache_raw_write_part): Remove.
2554
2555 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2556
2557         * regcache.h (regcache_raw_read_part): Remove, update callers to
2558         use readable_regcache::raw_read_part instead.
2559         * regcache.c (regcache_raw_read_part): Remove.
2560
2561 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2562
2563         * regcache.h (regcache_cooked_read): Remove, update callers to
2564         use readable_regcache::cooked_read instead.
2565         * regcache.c (regcache_cooked_read): Remove.
2566
2567 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2568
2569         * regcache.h (regcache_raw_write): Remove, update callers to use
2570         regcache::raw_write instead.
2571         * regcache.c (regcache_raw_write): Remove.
2572
2573 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2574
2575         * regcache.h (regcache_raw_read): Remove, update callers to use
2576         readable_regcache::raw_read instead.
2577         * regcache.c (regcache_raw_read): Remove.
2578
2579 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2580
2581         * regcache.h (regcache_raw_update): Remove, update callers to
2582         use readable_regcache::raw_update instead.
2583         * regcache.c (regcache_raw_update): Remove.
2584
2585 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2586
2587         * regcache.h (regcache_register_status): Remove, update callers
2588         to use reg_buffer::get_register_status directly instead.
2589         * regcache.c (regcache_register_status): Remove.
2590
2591 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2592
2593         * regcache.h (regcache_get_ptid): Remove, update all callers to
2594         call regcache::ptid instead.
2595         * regcache.c (regcache_get_ptid): Remove.
2596
2597 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2598
2599         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2600
2601 2018-05-30  Pedro Alves  <palves@redhat.com>
2602
2603         * common/common-exceptions.h (exception_rethrow): Use
2604         ATTRIBUTE_NORETURN.
2605
2606 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
2607
2608         * breakpoint.c (print_solib_event, check_status_catch_solib):
2609         Remove struct keyword in range-based for loops.
2610         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2611         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2612         Likewise.
2613         * linespec.c (find_superclass_methods, search_minsyms_for_name):
2614         Likewise.
2615         * symfile.c (addr_info_make_relative): Likewise.
2616         * thread.c (value_in_thread_stack_temporaries): Likewise.
2617
2618 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
2619
2620         PR gdb/16841
2621         * valops.c (value_struct_elt_for_reference): Call check_typedef on
2622         aggregate type to get its real type before accessing it.
2623
2624 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
2625
2626         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2627         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2628         * coff-pe-read.c (add_pe_forwarded_sym): Replace
2629         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2630         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2631         * jit.c (jit_breakpoint_re_set_internal): Likewise.
2632         * printcmd.c (info_address_command): Likewise.
2633
2634 2018-05-29  Tom Tromey  <tom@tromey.com>
2635
2636         * windows-nat.c (handle_exception): Update fall-through comment.
2637
2638 2018-05-29  Tom Tromey  <tom@tromey.com>
2639
2640         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
2641         (struct program_space) <added_solibs>: Now a std::vector.
2642         * breakpoint.c (print_solib_event): Update.
2643         (check_status_catch_solib): Update.
2644         * progspace.c (clear_program_space_solib_cache): Update.
2645         * solib.c (update_solib_list): Update.
2646
2647 2018-05-29  Tom Tromey  <tom@tromey.com>
2648
2649         * python/py-type.c (typy_richcompare): Update.
2650         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2651         * gdbtypes.h (types_deeply_equal): Return bool.
2652         (types_equal): Likewise.
2653         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
2654         declare VEC.
2655         (check_types_equal): Change worklist to std::vector.  Return
2656         bool.
2657         (struct type_equality_entry): Add constructor.
2658         (compare_maybe_null_strings): Return bool.
2659         (check_types_worklist): Return bool.  Change worklist to
2660         std::vector.
2661         (types_deeply_equal): Use std::vector.
2662         (types_equal): Return bool.
2663         (compare_maybe_null_strings): Simplify.
2664
2665 2018-05-29  Tom Tromey  <tom@tromey.com>
2666
2667         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
2668
2669 2018-05-29  Tom Tromey  <tom@tromey.com>
2670
2671         * objc-lang.h: Don't include cp-support.h.
2672         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
2673         declare VEC.
2674
2675 2018-05-27  Tom Tromey  <tom@tromey.com>
2676
2677         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2678
2679 2018-05-25  Tom Tromey  <tom@tromey.com>
2680
2681         * value.c (value::location): Initialize.
2682
2683 2018-05-25  Tom Tromey  <tom@tromey.com>
2684
2685         * dbxread.c (init_bincl_list): Remove.
2686         (bincl_list): Now a std::vector.
2687         (bincls_allocated, next_bincl): Remove.
2688         (free_bincl_list, do_free_bincl_list_cleanup)
2689         (make_cleanup_free_bincl_list): Remove.
2690         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2691         unique_xmalloc_ptr.
2692         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2693         (struct header_file_location): Add constructor.
2694         (add_bincl_to_list): Remove.
2695
2696 2018-05-25  Tom Tromey  <tom@tromey.com>
2697
2698         * tui/tui.c (tui_enable): Update.
2699         * mi/mi-interp.c (mi_interp::init): Update.
2700         * interps.h (class interp) <name>: New method.
2701         <m_name>: Rename from name.
2702         (~scoped_restore_interp): Update.
2703         * interps.c (interp::interp): Update.
2704         (interp_add, interp_set, interp_lookup_existing)
2705         (current_interp_named_p): Update.
2706
2707 2018-05-25  Tom Tromey  <tom@tromey.com>
2708
2709         * interps.c (interp_name): Remove.
2710         * mi/mi-interp.c (mi_interp::init): Update.
2711         * interps.h (interp_name): Remove.
2712         (~scoped_restore_interp): Update.
2713         * tui/tui.c (tui_enable): Update.
2714
2715 2018-05-25  Tom Tromey  <tom@tromey.com>
2716
2717         * utils.c (fputs_maybe_filtered): Update.
2718         * linespec.c (decode_line_full): Update.
2719         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2720         (mi_print_breakpoint_for_event, mi_solib_loaded)
2721         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2722         (mi_user_selected_context_changed): Update.
2723         * mi/mi-main.c (mi_execute_command): Update.
2724         * cli/cli-script.c (execute_control_command): Update.
2725         * python/python.c (execute_gdb_command): Update.
2726         * solib.c (info_sharedlibrary_command): Update.
2727         * interps.c (interp_ui_out): Remove.
2728         * interps.h (interp_ui_out): Remove.
2729
2730 2018-05-25  Tom Tromey  <tom@tromey.com>
2731
2732         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2733         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2734         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2735
2736 2018-05-25  Tom Tromey  <tom@tromey.com>
2737
2738         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2739         * interps.c (interp_exec): Use scoped_restore.
2740
2741 2018-05-25  Tom Tromey  <tom@tromey.com>
2742
2743         * remote.c (remote_target::remote_file_get): Use
2744         gdb::byte_vector.
2745         (remote_target::remote_file_put): Likewise.
2746
2747 2018-05-25  Tom Tromey  <tom@tromey.com>
2748
2749         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2750         a std::string.
2751         (get_pe_section_index, add_pe_exported_sym): Update.
2752         (read_pe_exported_syms): Use gdb::def_vector.
2753
2754 2018-05-25  Tom Tromey  <tom@tromey.com>
2755
2756         * frame.c (remove_prev_frame): Remove.
2757         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2758
2759 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
2760
2761         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2762         Remove prototypes.
2763         * mips-linux-nat.c (supply_fpregset): Always call
2764         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2765         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2766         `mips_fill_fpregset'.
2767         * mips-linux-tdep.c (mips_supply_fpregset)
2768         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2769         (mips_fill_fpregset_wrapper): Remove functions.
2770         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2771         (mips_linux_fpregset): Remove variable.
2772         (mips_linux_iterate_over_regset_sections): Use
2773         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2774         (mips_linux_o32_sigframe_init): Remove comment.
2775
2776 2018-05-25  Pedro Alves  <palves@redhat.com>
2777
2778         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2779         (struct readahead_cache, struct packet_reg, struct
2780         remote_arch_state, class remote_state): Move higher up in the
2781         file.
2782         (remote_target::m_remote_state): Now an object instead of a pointer.
2783         (remote_target::get_remote_state): Adjust.
2784
2785 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
2786
2787         * stack.c (select_and_print_frame): Delete.
2788         (struct function_bounds): Move struct within function.
2789         (func_command): Most content moved into new function
2790         find_frame_for_function, use new function, print result, add
2791         function comment.
2792         (find_frame_for_function): New function, now returns a result.
2793
2794 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2795
2796         * stack.c (iterate_over_block_arg_vars): Fix comment.
2797         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2798
2799 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
2800
2801         PR gdb/23203
2802         * frame.c
2803         (scoped_restore_selected_frame::scoped_restore_selected_frame):
2804         Define.
2805         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2806         Define.
2807         * frame.h (class scoped_restore_selected_frame): New class.
2808         * stack.c (print_frame_local_vars): Remove catching and rethrowing
2809         of any exception, use scoped_restore_selected_frame to restore the
2810         frame instead.
2811
2812 2018-05-24  Pedro Alves  <palves@redhat.com>
2813
2814         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2815         override.
2816
2817 2018-05-23  Tom Tromey  <tom@tromey.com>
2818
2819         * complaints.c (struct complaints): Remove.
2820         (symfile_complaint_book): Remove.
2821         (series): New global.
2822         (complaint_internal): Update.
2823         (clear_complaints): Update.
2824
2825 2018-05-23  Tom Tromey  <tom@tromey.com>
2826
2827         * complaints.c (counters): New global.
2828         (struct complain): Remove.
2829         (struct complaints) <root>: Remove.
2830         (complaint_sentinel): Remove.
2831         (symfile_complaint_book): Update.
2832         (find_complaint) Remove.
2833         (complaint_internal, clear_complaints): Update.
2834
2835 2018-05-23  Tom Tromey  <tom@tromey.com>
2836
2837         * complaints.c (struct complain) <file, line>: Remove.
2838         (find_complaint): Remove file, line parameters.
2839         (complaint_internal): Update.
2840
2841 2018-05-23  Tom Tromey  <tom@tromey.com>
2842
2843         * complaints.c (vcomplaint): Remove.
2844         (complaint_internal) Merge in contents of vcomplaint.
2845
2846 2018-05-23  Tom Tromey  <tom@tromey.com>
2847
2848         * complaints.c (struct complaints) <explanation>: Remove.
2849         (symfile_explanations): Remove.
2850         (symfile_complaint_book): Update.
2851         (vcomplaint): Update.
2852         (struct explanation): Remove.
2853
2854 2018-05-23  Tom Tromey  <tom@tromey.com>
2855
2856         * complaints.c (symfile_complaints): Remove.
2857         (complaint_internal): Remove "complaints" parameter.
2858         (clear_complaints, vcomplaint): Remove "c" parameter.
2859         (get_complaints): Remove.
2860         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2861         (dwarf2_debug_line_missing_file_complaint)
2862         (dwarf2_debug_line_missing_end_sequence_complaint)
2863         (dwarf2_complex_location_expr_complaint)
2864         (dwarf2_const_value_length_mismatch_complaint)
2865         (dwarf2_section_buffer_overflow_complaint)
2866         (dwarf2_macro_malformed_definition_complaint)
2867         (dwarf2_invalid_attrib_class_complaint)
2868         (create_addrmap_from_index, dw2_symtab_iter_next)
2869         (dw2_expand_marked_cus)
2870         (dw2_debug_names_iterator::find_vec_in_debug_names)
2871         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2872         (create_debug_type_hash_table, init_cutu_and_read_dies)
2873         (partial_die_parent_scope, add_partial_enumeration)
2874         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2875         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2876         (read_import_statement, read_file_scope, create_dwo_cu_reader)
2877         (create_cus_hash_table, create_dwp_hash_table)
2878         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2879         (dwarf2_rnglists_process, dwarf2_ranges_process)
2880         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2881         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2882         (handle_struct_member_die, process_structure_scope)
2883         (read_array_type, read_common_block, read_module_type)
2884         (read_tag_pointer_type, read_typedef, read_base_type)
2885         (read_subrange_type, load_partial_dies, partial_die_info::read)
2886         (partial_die_info::read, partial_die_info::read)
2887         (partial_die_info::read, read_checked_initial_length_and_offset)
2888         (dwarf2_string_attr, read_formatted_entries)
2889         (dwarf_decode_line_header)
2890         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2891         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2892         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2893         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2894         (get_signatured_type, get_DW_AT_signature_type)
2895         (decode_locdesc, file_file_name, consume_improper_spaces)
2896         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2897         (dwarf_decode_macro_bytes, dwarf_decode_macros)
2898         (dwarf2_symbol_mark_computed, set_die_type)
2899         (read_attribute_value): Update.
2900         * stap-probe.c (handle_stap_probe, get_stap_base_address):
2901         Update.
2902         * dbxread.c (unknown_symtype_complaint)
2903         (lbrac_mismatch_complaint, repeated_header_complaint)
2904         (set_namestring, function_outside_compilation_unit_complaint)
2905         (read_dbx_symtab, process_one_symbol): Update.
2906         * gdbtypes.c (stub_noname_complaint): Update.
2907         * windows-nat.c (handle_unload_dll): Update.
2908         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2909         (decode_base_type): Update.
2910         * xcoffread.c (bf_notfound_complaint, ef_complaint)
2911         (eb_complaint, record_include_begin, record_include_end)
2912         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2913         (process_xcoff_symbol, read_symbol)
2914         (function_outside_compilation_unit_complaint)
2915         (scan_xcoff_symtab): Update.
2916         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2917         * buildsym.c (finish_block_internal, make_blockvector)
2918         (end_symtab_get_static_block, augment_type_symtab): Update.
2919         * dtrace-probe.c (dtrace_process_dof)
2920         (dtrace_static_probe_ops::get_probes): Update.
2921         * complaints.h (struct complaint): Don't declare.
2922         (symfile_complaints): Remove.
2923         (complaint_internal): Remove "complaints" parameter.
2924         (complaint): Likewise.
2925         (clear_complaints): Likewise.
2926         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2927         (reread_symbols): Update.
2928         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2929         (dwarf2_frame_cache, decode_frame_entry): Update.
2930         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2931         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2932         (info_selectors_command): Update.
2933         * macrotab.c (macro_include, check_for_redefinition)
2934         (macro_undef): Update.
2935         * objfiles.c (filter_overlapping_sections): Update.
2936         * stabsread.c (invalid_cpp_abbrev_complaint)
2937         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2938         (define_symbol, error_type, read_type, rs6000_builtin_type)
2939         (stabs_method_name_from_physname, read_member_functions)
2940         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2941         (attach_fields_to_type, complain_about_struct_wipeout)
2942         (read_range_type, read_args, common_block_start)
2943         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2944         Update.
2945         * mdebugread.c (index_complaint, unknown_ext_complaint)
2946         (basic_type_complaint, bad_tag_guess_complaint)
2947         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2948         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2949         (parse_procedure, parse_lines)
2950         (function_outside_compilation_unit_complaint)
2951         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2952         (bad_tag_guess_complaint, reg_value_complaint): Update.
2953         * cp-support.c (demangled_name_complaint): Update.
2954         * macroscope.c (sal_macro_scope): Update.
2955         * dwarf-index-write.c (class debug_names): Update.
2956
2957 2018-05-23  Tom Tromey  <tom@tromey.com>
2958
2959         * complaints.c (clear_complaints): Remove "noisy" parameter.
2960         * complaints.h (clear_complaints): Update.
2961         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2962         (reread_symbols): Update.
2963
2964 2018-05-23  Tom Tromey  <tom@tromey.com>
2965
2966         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2967         SUBSEQUENT_MESSAGE.
2968         (vcomplaint, clear_complaints): Update.
2969         (symfile_explanations): Remove some messages.
2970
2971 2018-05-23  Tom Tromey  <tom@tromey.com>
2972
2973         * complaints.c (internal_complaint): Remove.
2974         * complaints.h (internal_complaint): Remove.
2975
2976 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
2977
2978         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2979
2980 2018-05-22  Pedro Alves  <palves@redhat.com>
2981
2982         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2983         (remote_fileio_badfd, remote_fileio_return_errno)
2984         (remote_fileio_return_success, remote_fileio_func_open)
2985         (remote_fileio_func_open, remote_fileio_func_close)
2986         (remote_fileio_func_read, remote_fileio_func_write)
2987         (remote_fileio_func_lseek, remote_fileio_func_rename)
2988         (remote_fileio_func_unlink, remote_fileio_func_stat)
2989         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2990         (remote_fileio_func_isatty, remote_fileio_func_system): Add
2991         remote_target parameter.
2992         (remote_fio_func_map) <func>: Add remote_target parameter.
2993         (do_remote_fileio_request, remote_fileio_request):
2994         * remote-fileio.h (remote_fileio_request):
2995         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2996         remote_target parameter.
2997         (remote_notif_process, handle_notification): Adjust to pass down
2998         the remote.
2999         (remote_notif_state_allocate): Add remote_target parameter.  Save
3000         it.
3001         * remote-notif.h (struct remote_target): Forward declare.
3002         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3003         remote_target parameter.
3004         (struct remote_notif_state) <remote>: New field.
3005         (remote_notif_ack, remote_notif_parse): Add remote_target
3006         parameter.
3007         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3008         remote_target parameter.
3009         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3010         (threads_listing_context, rmt_thread_action, protocol_feature)
3011         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3012         (packet_result, struct threads_listing_context, remote_state):
3013         Move definitions and declarations higher up.
3014         (remote_target) <~remote_target>: Declare.
3015         (remote_download_command_source, remote_file_put, remote_file_get)
3016         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3017         (remote_hostio_pread_vFile, remote_hostio_send_command)
3018         (remote_hostio_set_filesystem, remote_hostio_open)
3019         (remote_hostio_close, remote_hostio_unlink, remote_state)
3020         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3021         (get_memory_write_packet_size, get_memory_read_packet_size)
3022         (append_pending_thread_resumptions, remote_detach_1)
3023         (append_resumption, remote_resume_with_vcont)
3024         (add_current_inferior_and_thread, wait_ns, wait_as)
3025         (process_stop_reply, remote_notice_new_inferior)
3026         (process_initial_stop_replies, remote_add_thread)
3027         (btrace_sync_conf, remote_btrace_maybe_reopen)
3028         (remove_new_fork_children, kill_new_fork_children)
3029         (discard_pending_stop_replies, stop_reply_queue_length)
3030         (check_pending_events_prevent_wildcard_vcont)
3031         (discard_pending_stop_replies_in_queue, stop_reply)
3032         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3033         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3034         (remote_interrupt_as, remote_interrupt_ns)
3035         (remote_get_noisy_reply, remote_query_attached)
3036         (remote_add_inferior, remote_current_thread, get_current_thread)
3037         (set_thread, set_general_thread, set_continue_thread)
3038         (set_general_process, write_ptid)
3039         (remote_unpack_thread_info_response, remote_get_threadinfo)
3040         (parse_threadlist_response, remote_get_threadlist)
3041         (remote_threadlist_iterator, remote_get_threads_with_ql)
3042         (remote_get_threads_with_qxfer)
3043         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3044         (get_offsets, remote_check_symbols, remote_supported_packet)
3045         (remote_query_supported, remote_packet_size)
3046         (remote_serial_quit_handler, remote_detach_pid)
3047         (remote_vcont_probe, remote_resume_with_hc)
3048         (send_interrupt_sequence, interrupt_query)
3049         (remote_notif_get_pending_events, fetch_register_using_p)
3050         (send_g_packet, process_g_packet, fetch_registers_using_g)
3051         (store_register_using_P, store_registers_using_G)
3052         (set_remote_traceframe, check_binary_download)
3053         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3054         (remote_xfer_live_readonly_partial, remote_read_bytes)
3055         (remote_send_printf, remote_flash_write, readchar)
3056         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3057         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3058         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3059         (extended_remote_disable_randomization, extended_remote_run)
3060         (send_environment_packet, extended_remote_environment_support)
3061         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3062         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3063         (packet_command): Now methods of ...
3064         (remote_target): ... this class.
3065         (m_remote_state) <remote_target>: New field.
3066         (struct remote_state) <stop_reply_queue,
3067         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3068         fields.
3069         (remote_state::remote_state): Allocate stop_reply_queue.
3070         (remote_state): Delete global.
3071         (get_remote_state_raw): Delete.
3072         (remote_target::get_remote_state): Allocate m_remote_state on
3073         demand.
3074         (get_current_remote_target): New.
3075         (remote_ops, extended_remote_ops): Delete.
3076         (wait_forever_enabled_p, remote_async_inferior_event_token):
3077         Delete, moved to struct remote_state.
3078         (remote_target::close): Delete self.  Destruction bits split to
3079         ...
3080         (remote_target::~remote_target): ... this.
3081         (show_memory_packet_size): Adjust to use
3082         get_current_remote_target.
3083         (struct protocol_feature) <func>: Add remote_target parameter.
3084         All callers adjusted.
3085         (curr_quit_handler_target): New.
3086         (remote_serial_quit_handler): Reimplement.
3087         (remote_target::open_1): Adjust to use get_current_remote_target.
3088         Heap-allocate remote_target/extended_remote_target instances.
3089         (vcont_builder::vcont_builder): Add remote_target parameter, and
3090         save it in m_remote.  All callers adjusted.
3091         (vcont_builder::m_remote): New field.
3092         (vcont_builder::restart, vcont_builder::flush)
3093         (vcont_builder::push_action): Use it.
3094         (remote_target::commit_resume): Use it.
3095         (struct queue_iter_param) <remote>: New field.
3096         (remote_target::remove_new_fork_children): Fill in 'remote' field.
3097         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3098         (check_pending_event_prevents_wildcard_vcont_callback)
3099         (remote_target::check_pending_events_prevent_wildcard_vcont)
3100         (remote_target::discard_pending_stop_replies)
3101         (remote_target::discard_pending_stop_replies_in_queue)
3102         (remote_target::remote_notif_remove_queued_reply): Fill in
3103         'remote' field.
3104         (remote_notif_get_pending_events): New.
3105         (remote_target::readchar, remote_target::remote_serial_write):
3106         Save/restore curr_quit_handler_target.
3107         (putpkt): New.
3108         (kill_new_fork_children): Fill in 'remote' field.
3109         (packet_command): Use get_current_remote_target, defer to
3110         remote_target method of same name.
3111         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3112         parameter, and save it in m_remote.  All callers adjusted.
3113         (scoped_remote_fd::release): Use m_remote.
3114         (scoped_remote_fd::m_remote): New field.
3115         (remote_file_put, remote_file_get, remote_file_delete): Use
3116         get_current_remote_target, defer to remote_target method of same
3117         name.
3118         (remote_btrace_reset): Add remote_state paremeter.  Update all
3119         callers.
3120         (remote_async_inferior_event_handler). Pass down 'data'.
3121         (remote_new_objfile): Use get_current_remote_target.
3122         (remote_target::vcont_r_supported): New.
3123         (set_range_stepping): Use get_current_remote_target and
3124         remote_target::vcont_r_supported.
3125         (_initialize_remote): Don't allocate 'remote_state' and
3126         'stop_reply_queue' globals.
3127         * remote.h (struct remote_target): Forward declare.
3128         (getpkt, putpkt, remote_notif_get_pending_events): Add
3129         'remote_target' parameter.
3130
3131 2018-05-22  Pedro Alves  <palves@redhat.com>
3132
3133         * remote.c (vcont_builder): Now a class.  Make all data members
3134         private.
3135         (vcont_builder) <vcont_builder, restart, flush, push_action>:
3136         Declare methods.
3137         (vcont_builder_restart): Rename to ...
3138         (vcont_builder::restart): ... this.
3139         (vcont_builder_flush): Rename to ...
3140         (vcont_builder::flush): ... this.
3141         (vcont_builder_push_action): Rename to ...
3142         (vcont_builder::push_action): ... this.
3143         (remote_target::commit_resume): Adjust.
3144
3145 2018-05-22  Pedro Alves  <palves@redhat.com>
3146
3147         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3148         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3149         (get_fixed_memory_packet_size): New.
3150         (get_memory_packet_size): Use it.
3151         (set_memory_packet_size): Don't override the config size with
3152         DEFAULT_MAX_MEMORY_PACKET_SIZE.
3153         (show_memory_packet_size): Use get_fixed_memory_packet_size.
3154         Don't refer to get_memory_packet_size if not connected to a remote
3155         target.  Show "(default)" if configured size is 0.
3156
3157 2018-05-22  Pedro Alves  <palves@redhat.com>
3158
3159         * remote.c (remote_target::mourn_inferior): Move
3160         discard_pending_stop_replies call here from ...
3161         (_initialize_remote): ... here.
3162
3163 2018-05-22  Pedro Alves  <palves@redhat.com>
3164
3165         * remote.c (compare_section_command): Remove set_general_process
3166         call.
3167
3168 2018-05-22  Pedro Alves  <palves@redhat.com>
3169
3170         * remote.c (struct packet_reg, struct remote_arch_state):
3171         Move higher up in the file.
3172         (remote_state) <m_arch_states>: Store remote_arch_state values
3173         instead of remote_arch_state pointers.
3174         (remote_state::get_remote_arch_state): Adjust.
3175
3176 2018-05-22  Pedro Alves  <palves@redhat.com>
3177
3178         * remote.c: Include <unordered_map>.
3179         (remote_state): Now a class.
3180         (remote_state) <get_remote_arch_state>: Declare method.
3181         <get_remote_arch_state>: New field.
3182         (remote_arch_state) <remote_arch_state>: Declare ctor.
3183         <regs>: Now a unique_ptr.
3184         (remote_gdbarch_data_handle): Delete.
3185         (get_remote_arch_state): Delete.
3186         (remote_state::get_remote_arch_state): New.
3187         (get_remote_state): Adjust to call remote_state's
3188         get_remote_arch_state method.
3189         (init_remote_state): Delete, bits factored out to ...
3190         (remote_arch_state::remote_arch_state): ... this new method.
3191         (get_remote_packet_size, get_memory_packet_size)
3192         (process_g_packet, remote_target::fetch_registers)
3193         (remote_target::prepare_to_store, store_registers_using_G)
3194         (remote_target::store_registers, remote_target::get_trace_status):
3195         Adjust to call remote_state's method.
3196         (_initialize_remote): Remove reference to
3197         remote_gdbarch_data_handle.
3198
3199 2018-05-22  Pedro Alves  <palves@redhat.com>
3200
3201         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3202         pread>: New method declarations.
3203         (remote_target::open_1): Adjust.
3204         (readahead_cache_invalidate): Rename to ...
3205         (readahead_cache::invalidate): ... this, and adjust to be a class
3206         method.
3207         (readahead_cache_invalidate_fd): Rename to ...
3208         (readahead_cache::invalidate_fd): ... this, and adjust to be a
3209         class method.
3210         (remote_hostio_pwrite): Adjust.
3211         (remote_hostio_pread_from_cache): Rename to ...
3212         (readahead_cache::pread): ... this, and adjust to be a class
3213         method.
3214         (remote_hostio_close): Adjust.
3215
3216 2018-05-22  Pedro Alves  <palves@redhat.com>
3217
3218         * remote.c (remote_hostio_close_cleanup): Delete.
3219         (class scoped_remote_fd): New.
3220         (remote_file_put, remote_file_get): Use it.
3221
3222 2018-05-22  Pedro Alves  <palves@redhat.com>
3223
3224         (struct vCont_action_support): Use bool and initialize all fields.
3225         (struct readahead_cache): Initialize all fields.
3226         (remote_state): Use bool and initialize all fields.
3227         (remote_state::remote_state, remote_state::~remote_state): New.
3228         (new_remote_state): Delete.
3229         (_initialize_remote): Use new to allocate remote_state.
3230
3231 2018-05-22  Pedro Alves  <palves@redhat.com>
3232             張俊芝  <zjz@zjz.name>
3233
3234         PR gdb/22973
3235         * c-exp.y: Include "c-support.h".
3236         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3237         of tolower.  Use c_ident_is_alpha to scan names.
3238         * c-lang.c: Include "c-support.h".
3239         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3240         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3241         * c-support.h: New file, with bits factored out from ...
3242         * cp-name-parser.y: ... this file.
3243         Include "c-support.h".
3244         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3245         c-support.h and renamed.
3246         (symbol_end, yylex): Adjust.
3247
3248 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3249
3250         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3251         parameter type to CORE_ADDR.
3252         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3253         parameter type in declaration to CORE_ADDR.
3254         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3255         target_auxv_search to get AT_HWCAP and use the result to get the
3256         target description.
3257         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3258         to CORE_ADDR. Remove the cast of the return value to unsigned
3259         long. Fix error predicate of target_auxv_search.
3260         (ppc_linux_nat_target::read_description): Change the type of the
3261         hwcap variable to CORE_ADDR.
3262
3263 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3264
3265         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3266         if the size of fpscr is larger than 32 bits.
3267
3268 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3269
3270         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3271         (ppc32_linux_vsxregmap): New global.
3272         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3273         regcache_supply_regset, and regcache_collect_regset.
3274         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3275         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3276         (fetch_vsx_register, store_vsx_register): Remove.
3277         (fetch_vsx_registers): Add regno parameter. Get regset using
3278         ppc_linux_vsxregset. Use regset to supply registers.
3279         (store_vsx_registers): Add regno parameter. Get regset using
3280         ppc_linux_vsxregset. Use regset to collect registers.
3281         (fetch_register): Call fetch_vsx_registers instead of
3282         fetch_vsx_register.
3283         (store_register): Call store_vsx_registers instead of
3284         store_vsx_register.
3285         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3286         new regno parameter.
3287         (store_ppc_registers): Call store_vsx_registers with -1 for the
3288         new regno parameter.
3289         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3290         (ppc_collect_vsxregset): Remove.
3291
3292 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3293
3294         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3295         offset fields.
3296         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3297         for vector register offset fields.
3298         (ppc64_fbsd_reg_offsets): Likewise.
3299         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3300         to vector register offset fields.
3301         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3302         to vector register offset fields.
3303         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3304         vector register offset fields.
3305         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3306         initializers for vector register offset fields.
3307         (rs6000_aix64_reg_offsets): Likewise.
3308         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3309         (ppc_supply_vrregset): Remove.
3310         (ppc_collect_vrregset): Remove.
3311         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3312         (ppc_linux_vrregset) : New function.
3313         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3314         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3315         (ppc32_linux_vrregset): Remove.
3316         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3317         and use result instead of ppc32_linux_vrregset.
3318         (ppc32_linux_reg_offsets): Remove initializers for vector register
3319         offset fields.
3320         (ppc64_linux_reg_offsets): Likewise.
3321         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3322         * ppc-linux-nat.c: Include regset.h.
3323         (gdb_vrregset_t): Adjust comment to account for little-endian
3324         mode.
3325         (supply_vrregset, fill_vrregset): Remove.
3326         (fetch_altivec_register, store_altivec_register): Remove.
3327         (fetch_altivec_registers): Add regno parameter. Get regset using
3328         ppc_linux_vrregset. Use regset to supply registers.
3329         (store_altivec_registers): Add regno parameter. Get regset using
3330         ppc_linux_vrregset. Use regset to collect registers.
3331         (fetch_register): Call fetch_altivec_registers instead of
3332         fetch_altivec_register.
3333         (store_register): Call store_altivec_registers instead of
3334         store_altivec_register.
3335         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3336         the new regno parameter.
3337         (store_ppc_registers): Call store_altivec_registers with -1 for
3338         the new regno parameter.
3339
3340 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3341
3342         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3343         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3344         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3345         (gdb_vrregset_t): Change array type size to
3346         PPC_LINUX_SIZEOF_VRREGSET.
3347         (gdb_vsxregset_t): Change array type size to
3348         PPC_LINUX_SIZEOF_VSXREGSET.
3349         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3350         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3351         PPC_LINUX_SIZEOF_VSXREGSET.
3352
3353 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3354
3355         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3356         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3357         nat/ppc-linux.c.
3358         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3359         ppc_linux_target_wordsize with tid.
3360         (ppc_linux_nat_target::read_description): Call ppc_linux_target
3361         wordsize with tid.
3362         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3363         (ppc64_64bit_inferior_p): Add static and inline specifiers.
3364         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3365         tid parameter. Remove static specifier.
3366         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3367         (ppc_linux_target_wordsize): New declaration.
3368
3369 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3370
3371         * arch/ppc-linux-common.c: New file.
3372         * arch/ppc-linux-common.h: New file.
3373         * arch/ppc-linux-tdesc.h: New file.
3374         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3375         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3376         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3377         arch/ppc-linux-tdesc.h.
3378         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3379         arch/ppc-linux-tdesc.h.
3380         (ppc_linux_nat_target::read_description): Remove target
3381         description matching code. Fill a ppc_linux_features struct and
3382         call ppc_linux_match_description with it. Move comment about ISA
3383         2.05 to ppc-linux-common.c.
3384         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3385         arch/ppc-linux-tdesc.h.
3386         (ppc_linux_core_read_description): Remove target description
3387         matching code. Fill a ppc_linux_features struct and call
3388         ppc_linux_match_description with it.
3389         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3390         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3391         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3392         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3393         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3394         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3395         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3396         (tdesc_powerpc_e500l): Remove.
3397
3398 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
3399
3400         * ada-lang.c (catch_assert_command): Pass empty string instead
3401         of NULL for excep_string argument.
3402
3403 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3404
3405         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3406         the width of the requested register exceeds the width of the
3407         `ptrace' data type.
3408
3409 2018-05-21  Tom Tromey  <tom@tromey.com>
3410
3411         * printcmd.c (output_command): Remove.
3412         (output_command_const): Rename to output_command.
3413         * valprint.h (output_command): Rename from output_command_const.
3414         * tracepoint.c (trace_dump_actions): Call output_command.
3415
3416 2018-05-21  Tom Tromey  <tom@tromey.com>
3417
3418         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3419         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3420         * ada-lang.h (create_ada_exception_catchpoint): Update.
3421         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3422         std::string.
3423         (create_excep_cond_exprs, ~ada_catchpoint)
3424         (should_stop_exception, print_one_exception)
3425         (print_mention_exception, print_recreate_exception): Update.
3426         (ada_get_next_arg): Remove.
3427         (catch_ada_exception_command_split): Use std::string.  Change type
3428         of "excep_string", "cond_string".
3429         (catch_ada_exception_command): Update.
3430         (create_ada_exception_catchpoint): Change type of excep_string.
3431         (ada_exception_sal): Remove excep_string parameter.
3432         (~ada_catchpoint): Remove.
3433
3434 2018-05-21  Tom Tromey  <tom@tromey.com>
3435
3436         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3437         cleanup.
3438
3439 2018-05-21  Tom Tromey  <tom@tromey.com>
3440
3441         * ada-lang.c (ada_exception_message_1, ada_exception_message):
3442         Return unique_xmalloc_ptr.
3443         (print_it_exception): Update.
3444
3445 2018-05-21  Tom Tromey  <tom@tromey.com>
3446
3447         * tracepoint.c (trace_dump_actions): Use std::string.
3448
3449 2018-05-21  Tom Tromey  <tom@tromey.com>
3450
3451         * symfile.c (reread_symbols): Use std::string for original_name.
3452
3453 2018-05-21  Tom Tromey  <tom@tromey.com>
3454
3455         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3456         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
3457         constructor.
3458
3459 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
3460
3461         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3462         instance to...
3463         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3464         * objfiles.c (get_objfile_bfd_data): Allocate
3465         objfile_per_bfd_storage with obstack_new when allocating on
3466         obstack.
3467
3468 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
3469
3470         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3471         OBSTACK_ZALLOC.
3472         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3473         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3474         * mdebugread.c (mdebug_build_psymtabs): Likewise.
3475         (add_pending): Likewise.
3476         (parse_symbol): Likewise.
3477         (parse_partial_symbols): Likewise.
3478         (psymtab_to_symtab_1): Likewise.
3479         (new_psymtab): Likewise.
3480         (elfmdebug_build_psymtabs): Likewise.
3481         * minsyms.c (terminate_minimal_symbol_table): Likewise.
3482         * objfiles.c (get_objfile_bfd_data): Likewise.
3483         (objfile_register_static_link): Likewise.
3484         * psymtab.c (allocate_psymtab): Likewise.
3485         * stabsread.c (read_member_functions): Likewise.
3486         * xcoffread.c (xcoff_end_psymtab): Likewise.
3487
3488 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
3489
3490         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3491         compiler supports std::is_trivially_constructible.
3492         * common/poison.h: Include obstack.h.
3493         (IsMallocable): Define to is_trivially_constructible if the
3494         compiler supports it, define to true_type otherwise.
3495         (xobnew): New.
3496         (XOBNEW): Redefine.
3497         (xobnewvec): New.
3498         (XOBNEWVEC): Redefine.
3499         * gdb_obstack.h (obstack_zalloc): New.
3500         (OBSTACK_ZALLOC): Redefine.
3501         (obstack_calloc): New.
3502         (OBSTACK_CALLOC): Redefine.
3503         (obstack_new): New.
3504         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3505         (gdbarch_obstack): New declaration in gdbarch.h, definition in
3506         gdbarch.c.
3507         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3508         obstack_calloc/obstack_zalloc.
3509         (gdbarch_obstack_zalloc): Remove.
3510         * target-descriptions.c (tdesc_data_init): Use obstack_new.
3511
3512 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3513
3514         * stack.c (backtrace_command_1): Remove useless variable int i.
3515
3516 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3517
3518         * stack.c (print_frame_info): Fix comment.
3519
3520 2018-05-18  Tom Tromey  <tom@tromey.com>
3521
3522         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3523         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3524         (~dwarf2_per_objfile): Update
3525         (dwarf2_get_dwz_file): Use new.
3526         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3527         unique_ptr.
3528
3529 2018-05-18  Tom Tromey  <tom@tromey.com>
3530
3531         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3532         unique_ptr.
3533         * dwarf2read.c (struct dwp_file): Add constructor and
3534         initializers.
3535         (open_and_init_dwp_file): Return a unique_ptr.
3536         (dwarf2_per_objfile, create_dwp_hash_table)
3537         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3538         (lookup_dwo_unit_in_dwp): Update.
3539         (open_and_init_dwp_file, get_dwp_file): Update.
3540
3541 2018-05-18  Tom Tromey  <tom@tromey.com>
3542
3543         * dwarf2read.c (dwarf2_per_objfile): Update.
3544         (struct mapped_index): Add initializers.
3545         (dwarf2_read_index): Use new.
3546         (dw2_symtab_iter_init): Update.
3547         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3548         unique_ptr.
3549
3550 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
3551
3552         * dwarf2read.c (mapped_index) <total_size>: Remove.
3553
3554 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
3555
3556         * unittests/format_pieces-selftests.c (test_format_specifier):
3557         Add ARI comments.
3558
3559 2018-05-18  Tom Tromey  <tom@tromey.com>
3560
3561         * c-typeprint.c (maybe_print_hole): New function.
3562         (c_print_type_struct_field_offset): Update.
3563         (c_type_print_base_struct_union): Call maybe_print_hole.
3564
3565 2018-05-17  Keith Seitz  <keiths@redhat.com>
3566
3567         * breakpoint.c (build_bpstat_chain): New function, moved from
3568         bpstat_stop_status.
3569         (bpstat_stop_status): Add optional parameter, `stop_chain'.
3570         If no stop chain is passed, call build_bpstat_chain to build it.
3571         * breakpoint.h (build_bpstat_chain): Declare.
3572         (bpstat_stop_status): Move documentation here from breakpoint.c.
3573         * infrun.c (handle_signal_stop): Before eliding inlined frames,
3574         build the stop chain and pass it to skip_inline_frames.
3575         Pass this stop chain to bpstat_stop_status.
3576         * inline-frame.c: Include breakpoint.h.
3577         (stopped_by_user_bp_inline_frame): New function.
3578         (skip_inline_frames): Add parameter `stop_chain'.
3579         Move documention to inline-frame.h.
3580         If non-NULL, use stopped_by_user_bp_inline_frame to determine
3581         whether the frame should be elided.
3582         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3583         Add moved documentation and update for new parameter.
3584
3585 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
3586
3587         PR cli/14975
3588         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3589         unittests/format_pieces-selftests.c.
3590         * common/format.h (format_piece) <operator==>: New.
3591         (format_pieces) <operator[]>: Remove.
3592         * common/format.c (format_pieces::format_pieces): Handle \e.
3593         * unittests/format_pieces-selftests.c: New.
3594
3595 2018-05-17  Tom Tromey  <tom@tromey.com>
3596
3597         PR symtab/23010:
3598         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3599         (dw2_instantiate_symtab): Add skip_partial parameter.
3600         (dw2_find_last_source_symtab, dw2_map_expand_apply)
3601         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3602         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3603         (dw2_expand_symtabs_matching_one)
3604         (dw2_find_pc_sect_compunit_symtab)
3605         (dw2_debug_names_lookup_symbol)
3606         (dw2_debug_names_expand_symtabs_for_function): Update.
3607         (init_cutu_and_read_dies): Add skip_partial parameter.
3608         (process_psymtab_comp_unit, build_type_psymtabs_1)
3609         (process_skeletonless_type_unit, load_partial_comp_unit)
3610         (psymtab_to_symtab_1): Update.
3611         (load_full_comp_unit): Add skip_partial parameter.
3612         (process_imported_unit_die, dwarf2_read_addr_index)
3613         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3614         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3615         (read_signatured_type): Update.
3616
3617 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
3618
3619         * value.c (release_value): Remove unused variable.
3620         (record_latest_value): Likewise.
3621         (access_value_history): Likewise.
3622         (preserve_values): Likewise.
3623
3624 2018-05-17  Tom Tromey  <tom@tromey.com>
3625
3626         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3627         Initialize.
3628
3629 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
3630
3631         PR gdb/22286
3632         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3633         Also handle registers whose width is not a multiple of
3634         PTRACE_TYPE_RET.
3635         (linux_nat_trad_target::store_register): Likewise.
3636
3637 2018-05-16  Tom Tromey  <tom@tromey.com>
3638
3639         * gdbcore.h (core_bfd): Redefine.
3640         * corelow.c (core_target::close): Update.
3641         (core_target_open): Update.
3642         * progspace.h (struct program_space) <cbfd>: Now a
3643         gdb_bfd_ref_ptr.
3644
3645 2018-05-16  Tom Tromey  <tom@tromey.com>
3646
3647         PR cli/19551:
3648         * symfile-add-flags.h (enum symfile_add_flags)
3649         <SYMFILE_NOT_FILENAME>: New constant.
3650         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
3651         objfile name from BFD.
3652         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3653         * minidebug.c (find_separate_debug_file_in_section): Put
3654         ".gnu_debugdata" into BFD's file name.
3655
3656 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
3657
3658         * regcache.c (regcache_read_ftype, regcache_write_ftype):
3659         Remove.
3660
3661 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
3662
3663         PR binutils/21446
3664         * aarch64-tdep.c (aarch64_analyze_prologue,
3665         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3666         Indicate not interested in errors.
3667
3668 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
3669
3670         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3671         Supply the MIPS_ZERO_REGNUM register.
3672
3673 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
3674
3675         * mips-tdep.c (mask_address_var): Make variable static.
3676
3677 2018-05-14  Tom Tromey  <tom@tromey.com>
3678
3679         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3680
3681 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
3682
3683         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3684         FXSAVE_ADDR for the mxcsr register.
3685
3686 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
3687
3688         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3689
3690 2018-05-11  Pedro Alves  <palves@redhat.com>
3691
3692         * corelow.c (core_target) <core_target>: No longer inline.
3693         Initialize m_core_gdbarch, m_core_vec and build the section table
3694         here.
3695         <~core_target>: New.
3696         <core_gdbarch, get_core_register_section>: New methods.
3697         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3698         factored out from ...
3699         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3700         (core_ops): Delete.
3701         (sniff_core_bfd): Add gdbarch parameter.
3702         (core_close): Delete, merged into ...
3703         (core_target::close): ... here.  Delete self.
3704         (core_close_cleanup): Delete.
3705         (core_target_open): Allocate a core_target on the heap.  Use a
3706         unique_ptr instead of a cleanup.  Bits moved into the core_target
3707         ctor.  Adjust to use core_target methods instead of globals.
3708         (get_core_register_section): Rename to ...
3709         (core_target::get_core_register_section): ... this and adjust.
3710         (struct get_core_registers_cb_data): New.
3711         (get_core_registers_cb): Use it.  Use bool.
3712         (core_target::fetch_registers, core_target::files_info)
3713         (core_target::xfer_partial, core_target::read_description)
3714         (core_target::pid_to, core_target::thread_name): Adjust to
3715         reference class fields instead of globals.
3716         * target.h (struct target_ops_deleter, target_ops_up): New.
3717
3718 2018-05-11  Pedro Alves  <palves@redhat.com>
3719
3720         * corefile.c (core_file_command): Move to corelow.c.
3721         * corelow.c (the_core_target): Delete.
3722         (core_file_command): Moved from corefile.c.  Check exec_bfd
3723         instead of the_core_target.  Use target_detach instead of calling
3724         into the_core_target directly.
3725         (maybe_say_no_core_file_now): New.
3726         (core_target::detach): Use it.
3727         (_initialize_corelow): Remove references to the_core_target.
3728         * gdbcore.h (the_core_target): Delete.
3729
3730 2018-05-11  Tom Tromey  <tromey@redhat.com>
3731             Pedro Alves  <palves@redhat.com>
3732
3733         * corefile.c (core_bfd): Remove.
3734         * gdbcore.h (core_bfd): Now a macro.
3735         * progspace.h (struct program_space) <cbfd>: New field.
3736
3737 2018-05-11  Tom Tromey  <tom@tromey.com>
3738
3739         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3740         gdb::def_vector.
3741
3742 2018-05-10  Tom Tromey  <tom@tromey.com>
3743
3744         * configure: Rebuild.
3745         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3746
3747 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
3748
3749         PR server/23158:
3750         * regformats/regdat.sh: Adjust script, following the addition
3751         of the new expedite_regs parameter to init_target_desc.
3752
3753 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
3754     
3755         PR gdb/23127
3756         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3757         set_gdbarch_significant_addr_bit.
3758         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3759         set_gdbarch_significant_addr_bit.
3760         * utils.c (address_significant): Update to sign extend addr.
3761
3762 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
3763
3764         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3765         (xtensa_linux_init_abi): Limit tdep->num_regs by
3766         tdep->num_nopriv_regs.
3767         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3768         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3769         not initialized.
3770
3771 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
3772
3773         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3774
3775 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3776
3777         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3778         (I387_MXCSR_INIT_VAL): New constant.
3779         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3780         buffer if it was supplied by the inferior.
3781         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3782         (i387_xsave_get_clear_bv): New function.
3783         (i387_supply_xsave): Only read x87 control registers from the
3784         xsave buffer if the feature is enabled, and the state will have
3785         been written, otherwise, provide a suitable default.
3786         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3787         including x87 control registers.  Update control registers if they
3788         have changed from the default value, and mark features as enabled
3789         as required.
3790         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3791
3792 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
3793
3794         * spu-tdep.c (info_spu_event_command): Fix output formatting.
3795
3796 2018-05-07  Tom Tromey  <tom@tromey.com>
3797
3798         * configure: Rebuild.
3799         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3800
3801 2018-05-07  Tom Tromey  <tom@tromey.com>
3802
3803         PR tdep/20362:
3804         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3805         bit.  Use correct value for VDIV.
3806
3807 2018-05-04  Tom Tromey  <tom@tromey.com>
3808
3809         * configure: Rebuild.
3810         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3811
3812 2018-05-04  Tom Tromey  <tom@tromey.com>
3813
3814         * linux-record.c (record_linux_system_call) <case
3815         RECORD_SYS_RECVFROM>: Add "break".
3816
3817 2018-05-04  Tom Tromey  <tom@tromey.com>
3818
3819         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3820         Add missing "break".
3821         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3822         Add missing "break".
3823
3824 2018-05-04  Tom Tromey  <tom@tromey.com>
3825
3826         * rs6000-tdep.c (ppc_process_record_op4)
3827         (ppc_process_record_op63): Add fall-through comment.
3828
3829 2018-05-04  Tom Tromey  <tom@tromey.com>
3830
3831         * i386-tdep.c (i386_process_record): Add fall-through comment.
3832
3833 2018-05-04  Tom Tromey  <tom@tromey.com>
3834
3835         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3836         comment.
3837
3838 2018-05-04  Tom Tromey  <tom@tromey.com>
3839
3840         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3841         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3842         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3843         comment.
3844         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3845         comment.
3846         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3847         comment.
3848
3849 2018-05-04  Tom Tromey  <tom@tromey.com>
3850
3851         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3852
3853 2018-05-04  Tom Tromey  <tom@tromey.com>
3854
3855         * s390-tdep.c (s390_process_record): Fix fall-through comments.
3856         * xcoffread.c (scan_xcoff_symtab): Move comment later.
3857         * symfile.c (section_is_mapped): Fix fall-through comment.
3858         * stabsread.c (define_symbol, read_member_functions): Fix
3859         fall-through comment.
3860         * s390-linux-tdep.c (s390_process_record): Fix fall-through
3861         comment.
3862         * remote.c (remote_wait_as): Fix fall-through comment.
3863         * p-exp.y (yylex): Fix fall-through comment.
3864         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3865         comment.
3866         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3867         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3868         * jv-exp.y (yylex): Fix fall-through comment.
3869         * go-exp.y (lex_one_token): Fix fall-through comment.
3870         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3871         fall-through comment.
3872         * f-exp.y (yylex): Fix fall-through comment.
3873         * dwarf2read.c (process_die): Fix fall-through comments.
3874         * dbxread.c (process_one_symbol): Fix fall-through comment.
3875         * d-exp.y (lex_one_token): Fix fall-through comment.
3876         * cp-name-parser.y (yylex): Fix fall-through comment.
3877         * coffread.c (coff_symtab_read): Fix fall-through comment.
3878         * c-exp.y (lex_one_token): Fix fall-through comment.
3879         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3880         comment.
3881         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3882         comment.
3883
3884 2018-05-04  Tom Tromey  <tom@tromey.com>
3885
3886         PR python/22730:
3887         * NEWS: Mention gdb.execute change.
3888         * gdbcmd.h (execute_control_command): Don't declare.
3889         * python/python.c (execute_gdb_command): Use read_command_lines_1,
3890         execute_control_commands, execute_control_commands_to_string.
3891         * cli/cli-script.h (execute_control_commands)
3892         (execute_control_commands_to_string): Declare.
3893         (execute_control_command): Add from_tty parameter.
3894         * cli/cli-script.c (execute_control_commands)
3895         (execute_control_commands_to_string): New functions.
3896         (execute_user_command): Use execute_control_commands.
3897         (execute_control_command_1): Add "from_tty" parameter.  Update.
3898         (execute_control_command): Likewise.
3899
3900 2018-05-04  Tom Tromey  <tom@tromey.com>
3901
3902         PR python/22731:
3903         * NEWS: Mention that breakpoint commands are writable.
3904         * python/py-breakpoint.c (bppy_set_commands): New function.
3905         (breakpoint_object_getset) <"commands">: Use it.
3906
3907 2018-05-04  Tom Tromey  <tom@tromey.com>
3908
3909         * tracepoint.c (actions_command): Update.
3910         * mi/mi-cmd-break.c (mi_command_line_array)
3911         (mi_command_line_array_cnt, mi_command_line_array_ptr)
3912         (mi_read_next_line): Remove.
3913         (mi_cmd_break_commands): Update.
3914         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3915         function_view.
3916         * cli/cli-script.c (get_command_line): Update.
3917         (process_next_line): Use function_view.  Constify.
3918         (recurse_read_control_structure, read_command_lines)
3919         (read_command_lines_1): Change argument types to function_view.
3920         (do_define_command, document_command): Update.
3921         * breakpoint.h (check_tracepoint_command): Don't declare.
3922         * breakpoint.c (check_tracepoint_command): Remove.
3923         (commands_command_1, create_tracepoint_from_upload): Update.
3924
3925 2018-05-04  Tom Tromey  <tom@tromey.com>
3926
3927         PR gdb/11750:
3928         * cli/cli-script.h (enum command_control_type) <define_control>:
3929         New constant.
3930         * cli/cli-script.c (multi_line_command_p): Handle define_control.
3931         (build_command_line, execute_control_command_1)
3932         (process_next_line): Likewise.
3933         (do_define_command): New function, extracted from define_command.
3934         (define_command): Use it.
3935
3936 2018-05-04  Tom Tromey  <tom@tromey.com>
3937
3938         * tracepoint.c (actions_command): Update.
3939         * cli/cli-script.h (read_command_lines): Update.
3940         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3941         (MAX_TMPBUF): Remove define.
3942         (define_command): Use string_printf.
3943         (document_command): Likewise.
3944         * breakpoint.c (commands_command_1): Update.
3945
3946 2018-05-04  Tom Tromey  <tom@tromey.com>
3947
3948         * top.c (execute_command): Update.
3949         * cli/cli-script.h (print_command_lines): Now varargs.
3950         * cli/cli-script.c (print_command_lines): Now varargs.
3951         (execute_control_command_1) <case while_control, case if_control>:
3952         Update.
3953
3954 2018-05-04  Tom Tromey  <tom@tromey.com>
3955
3956         * tracepoint.c (all_tracepoint_actions): Rename from
3957         all_tracepoint_actions_and_cleanup.  Change return type.
3958         (actions_command, encode_actions_1, encode_actions)
3959         (trace_dump_actions, tdump_command): Update.
3960         * remote.c (remote_download_command_source): Update.
3961         * python/python.c (gdbpy_eval_from_control_command)
3962         (python_command, python_interactive_command): Update.
3963         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3964         * guile/guile.c (guile_command)
3965         (gdbscm_eval_from_control_command, guile_command): Update.
3966         * compile/compile.c (compile_code_command)
3967         (compile_print_command, compile_to_object): Update.
3968         * cli/cli-script.h (struct command_lines_deleter): New.
3969         (counted_command_line): New typedef.
3970         (struct command_line): Add constructor, destructor.
3971         <body_list>: Remove.
3972         <body_list_0, body_list_1>: New members.
3973         (command_line_up): Remove typedef.
3974         (read_command_lines, read_command_lines_1, get_command_line):
3975         Update.
3976         (copy_command_lines): Don't declare.
3977         * cli/cli-script.c (build_command_line): Use "new".
3978         (get_command_line): Return counted_command_line.
3979         (print_command_lines, execute_user_command)
3980         (execute_control_command_1, while_command, if_command): Update.
3981         (realloc_body_list): Remove.
3982         (process_next_line, recurse_read_control_structure): Update.
3983         (read_command_lines, read_command_lines_1): Return counted_command_line.
3984         (free_command_lines): Use "delete".
3985         (copy_command_lines): Remove.
3986         (define_command, document_command, show_user_1): Update.
3987         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3988         a counted_command_line.
3989         * breakpoint.h (counted_command_line): Remove typedef.
3990         (breakpoint_set_commands): Update.
3991         * breakpoint.c (check_no_tracepoint_commands)
3992         (validate_commands_for_breakpoint): Update.
3993         (breakpoint_set_commands): Change commands to be a
3994         counted_command_line.
3995         (commands_command_1, update_dprintf_command_list)
3996         (create_tracepoint_from_upload): Update.
3997
3998 2018-05-04  Tom Tromey  <tom@tromey.com>
3999
4000         * cli/cli-decode.h (cmd_list_element): New constructor.
4001         (~cmd_list_element): New destructor.
4002         (struct cmd_list_element): Add initializers.
4003         * cli/cli-decode.c (do_add_cmd): Use "new".
4004         (delete_cmd): Use "delete".
4005
4006 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4007             Pedro Alves <palves@redhat.com>
4008
4009         PR breakpoints/19806 and support for PR external/20207.
4010         * NEWS: Mention Aarch64 watchpoint improvements.
4011         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4012         watchpoints and PR external/20207 watchpoints.
4013         * nat/aarch64-linux-hw-point.c
4014         (kernel_supports_any_contiguous_range): New.
4015         (aarch64_watchpoint_offset): New.
4016         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4017         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4018         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4019         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4020         next_addr_orig_p.  Support PR external/20207 watchpoints.
4021         (aarch64_downgrade_regs): New.
4022         (aarch64_dr_state_insert_one_point): New parameters offset and
4023         addr_orig.
4024         (aarch64_dr_state_remove_one_point): Likewise.
4025         (aarch64_handle_breakpoint): Update caller.
4026         (aarch64_handle_aligned_watchpoint): Likewise.
4027         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4028         aligned_offset.
4029         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4030         aarch64_downgrade_regs.
4031         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4032         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4033         (DR_CONTROL_MASK): ... this.
4034         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4035         (unsigned int aarch64_watchpoint_offset): New prototype.
4036         (aarch64_linux_set_debug_regs): Remove const from state.
4037         * utils.c (align_up, align_down): Move to ...
4038         * common/common-utils.c (align_up, align_down): ... here.
4039         * utils.h (align_up, align_down): Move to ...
4040         * common/common-utils.h (align_up, align_down): ... here.
4041
4042 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4043
4044         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4045         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4046         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4047         Re-implement to match the ABI as summarized in GCC's
4048         gcc/config/sparc/sparc.c.  All callers updated.
4049         (sparc32_store_arguments): Remove assertion.
4050
4051 2018-05-04  Tom Tromey  <tom@tromey.com>
4052
4053         * printcmd.c: Don't include tui.h.
4054         (decode_format): Use skip_spaces.
4055
4056 2018-05-04  Tom Tromey  <tom@tromey.com>
4057
4058         PR gdb/22619:
4059         * printcmd.c (last_count): New global.
4060         (x_command): Use saved count when repeating.
4061
4062 2018-05-04  Tom Tromey  <tom@tromey.com>
4063
4064         * nto-procfs.c (do_closedir_cleanup): Remove.
4065         (procfs_pidlist): Use gdb_dir_up.
4066         * procfs.c (do_closedir_cleanup): Remove.
4067         (proc_update_threads): Use gdb_dir_up.
4068         * common/filestuff.h (struct gdb_dir_deleter): New.
4069         (gdb_dir_up): New typedef.
4070
4071 2018-05-04  Tom Tromey  <tom@tromey.com>
4072
4073         * ada-lang.c (print_mention_exception): Use std::string.
4074
4075 2018-05-04  Tom Tromey  <tom@tromey.com>
4076
4077         * ada-lang.c (create_excep_cond_exprs): Update.
4078         (ada_exception_catchpoint_cond_string): Use std::string.
4079
4080 2018-05-04  Tom Tromey  <tom@tromey.com>
4081
4082         * ada-lang.c (xget_renaming_scope): Return std::string.
4083         (old_renaming_is_invisible): Update.
4084
4085 2018-05-04  Tom Tromey  <tom@tromey.com>
4086
4087         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4088         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4089
4090 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
4091
4092         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4093
4094 2018-05-04  Tom Tromey  <tom@tromey.com>
4095
4096         * remote.c (remote_query_supported_append): Change type.
4097         (remote_check_symbols): Update.
4098
4099 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
4100
4101         PR gdb/11420
4102         * configure.ac: Prepend libpython.
4103         * python/python-config.py: Likewise.
4104         * configure: Regenerate.
4105
4106 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4107
4108         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4109
4110 2018-05-03  Pedro Alves  <palves@redhat.com>
4111
4112         * s390-linux-nat.c
4113         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4114         override.  Write 'true' instead of '1'.
4115         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4116         declaration.
4117
4118 2018-05-02  Pedro Alves  <palves@redhat.com>
4119
4120         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4121         add_inf_child_target.
4122         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4123         add_inf_child_target.
4124         * aix-thread.c (aix_thread_target_info): New.
4125         (aix_thread_target) <shortname, longname, doc>: Delete.
4126         <info>: New.
4127         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4128         add_inf_child_target.
4129         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4130         add_inf_child_target.
4131         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4132         add_inf_child_target.
4133         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4134         add_inf_child_target.
4135         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4136         add_inf_child_target.
4137         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4138         add_inf_child_target.
4139         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4140         add_inf_child_target.
4141         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4142         add_inf_child_target.
4143         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4144         add_inf_child_target.
4145         * bfd-target.c (target_bfd_target_info): New.
4146         (target_bfd) <shortname, longname, doc>: Delete.
4147         <info>: New.
4148         * bsd-kvm.c (bsd_kvm_target_info): New.
4149         (bsd_kvm_target) <shortname, longname, doc>: Delete.
4150         <info>: New.
4151         (bsd_kvm_target::open): Rename to ...
4152         (bsd_kvm_target_open): ... this.  Adjust.
4153         * bsd-uthread.c (bsd_uthread_target_info): New.
4154         (bsd_uthread_target) <shortname, longname, doc>: Delete.
4155         <info>: New.
4156         * corefile.c (core_file_command): Adjust.
4157         * corelow.c (core_target_info): New.
4158         (core_target) <shortname, longname, doc>: Delete.
4159         <info>: New.
4160         (core_target::open): Rename to ...
4161         (core_target_open): ... this.  Adjust.
4162         * ctf.c (ctf_target_info): New.
4163         (ctf_target) <shortname, longname, doc>: Delete.
4164         <info>: New.
4165         (ctf_target::open): Rename to ...
4166         (ctf_target_open): ... this.
4167         (_initialize_ctf): Adjust.
4168         * exec.c (exec_target_info): New.
4169         (exec_target) <shortname, longname, doc>: Delete.
4170         <info>: New.
4171         (exec_target::open): Rename to ...
4172         (exec_target_open): ... this.
4173         * gdbcore.h (core_target_open): Declare.
4174         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4175         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4176         add_inf_child_target.
4177         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4178         add_inf_child_target.
4179         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4180         add_inf_child_target.
4181         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4182         add_inf_child_target.
4183         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4184         add_inf_child_target.
4185         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4186         add_inf_child_target.
4187         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4188         add_inf_child_target.
4189         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4190         add_inf_child_target.
4191         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4192         add_inf_child_target.
4193         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4194         add_inf_child_target.
4195         * inf-child.c (inf_child_target_info): New.
4196         (inf_child_target::info): New.
4197         (inf_child_open_target): Remove 'target' parameter.  Use
4198         get_native_target instead.
4199         (inf_child_target::open): Delete.
4200         (add_inf_child_target): New.
4201         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4202         Delete.
4203         <info>: New.
4204         (add_inf_child_target): Declare.
4205         (inf_child_open_target): Declare.
4206         * linux-thread-db.c (thread_db_target_info): New.
4207         (thread_db_target) <shortname, longname, doc>: Delete.
4208         <info>: New.
4209         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4210         add_inf_child_target.
4211         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4212         add_inf_child_target.
4213         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4214         add_inf_child_target.
4215         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4216         add_inf_child_target.
4217         * make-target-delegates (print_class): Adjust.
4218         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4219         add_inf_child_target.
4220         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4221         add_inf_child_target.
4222         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4223         add_inf_child_target.
4224         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4225         add_inf_child_target.
4226         * nto-procfs.c (nto_native_target_info): New.
4227         (nto_procfs_target_native) <shortname, longname, doc>:
4228         Delete.
4229         <info>: New.
4230         (nto_procfs_target_info): New.
4231         (nto_procfs_target_procfs) <shortname, longname, doc>:
4232         Delete.
4233         <info>: New.
4234         (init_procfs_targets): Adjust.
4235         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4236         add_inf_child_target.
4237         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4238         add_inf_child_target.
4239         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4240         add_inf_child_target.
4241         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4242         add_inf_child_target.
4243         * ravenscar-thread.c (ravenscar_target_info): New.
4244         (ravenscar_thread_target) <shortname, longname, doc>:
4245         Delete.
4246         <info>: New.
4247         * record-btrace.c (record_btrace_target_info):
4248         (record_btrace_target) <shortname, longname, doc>: Delete.
4249         <info>: New.
4250         (record_btrace_target::open): Rename to ...
4251         (record_btrace_target_open): ... this.  Adjust.
4252         * record-full.c (record_longname, record_doc): New.
4253         (record_full_base_target) <shortname, longname, doc>: Delete.
4254         <info>: New.
4255         (record_full_target_info): New.
4256         (record_full_target): <shortname>: Delete.
4257         <info>: New.
4258         (record_full_core_open_1, record_full_open_1): Update comments.
4259         (record_full_base_target::open): Rename to ...
4260         (record_full_open): ... this.
4261         (cmd_record_full_restore): Update.
4262         (_initialize_record_full): Update.
4263         * remote-sim.c (remote_sim_target_info): New.
4264         (gdbsim_target) <shortname, longname, doc>: Delete.
4265         <info>: New.
4266         (gdbsim_target::open): Rename to ...
4267         (gdbsim_target_open): ... this.
4268         (_initialize_remote_sim): Adjust.
4269         * remote.c (remote_doc): New.
4270         (remote_target_info): New.
4271         (remote_target) <shortname, longname, doc>: Delete.
4272         <info>: New.
4273         (extended_remote_target_info): New.
4274         (extended_remote_target) <shortname, longname, doc>: Delete.
4275         <info>: New.
4276         (remote_target::open_1): Make static.  Adjust.
4277         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4278         * s390-linux-nat.c (_initialize_s390_nat): Use
4279         add_inf_child_target.
4280         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4281         add_inf_child_target.
4282         * sol-thread.c (thread_db_target_info): New.
4283         (sol_thread_target) <shortname, longname, doc>: Delete.
4284         <info>: New.
4285         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4286         add_inf_child_target.
4287         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4288         add_inf_child_target.
4289         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4290         add_inf_child_target.
4291         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4292         add_inf_child_target.
4293         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4294         add_inf_child_target.
4295         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4296         add_inf_child_target.
4297         * spu-linux-nat.c (_initialize_spu_nat): Use
4298         add_inf_child_target.
4299         * spu-multiarch.c (spu_multiarch_target_info): New.
4300         (spu_multiarch_target) <shortname, longname, doc>: Delete.
4301         <info>: New.
4302         * target-delegates.c: Regenerate.
4303         * target.c: Include <unordered_map>.
4304         (target_ops_p): Delete.
4305         (DEF_VEC_P(target_ops_p)): Delete.
4306         (target_factories): New.
4307         (test_target_info): New.
4308         (test_target_ops::info): New.
4309         (open_target): Adjust to use target_factories.
4310         (add_target_with_completer): Rename to ...
4311         (add_target): ... this.  Change prototype.  Register target_info
4312         and open callback in target_factories.  Register target_info in
4313         command context instead of target_ops.
4314         (add_target): Delete old implementation.
4315         (add_deprecated_target_alias): Change prototype.  Adjust.
4316         (the_native_target): New.
4317         (set_native_target, get_native_target): New.
4318         (find_default_run_target): Use the_native_target.
4319         (find_attach_target, find_run_target): Simplify.
4320         (target_ops::open): Delete.
4321         (dummy_target_info): New.
4322         (dummy_target::shortname, dummy_target::longname)
4323         (dummy_target::doc): Delete.
4324         (dummy_target::info): New.
4325         (debug_target::shortname, debug_target::longname)
4326         (debug_target::doc): Delete.
4327         (debug_target::info): New.
4328         * target.h (struct target_info): New.
4329         (target_ops::~target_ops): Add comment.
4330         (target_ops::info): New.
4331         (target_ops::shortname, target_ops::longname, target_ops::doc): No
4332         longer virtual.  Implement in terms of target_info.
4333         (set_native_target, get_native_target): Declare.
4334         (target_open_ftype): New.
4335         (add_target, add_target_with_completer)
4336         (add_deprecated_target_alias): Change prototype.
4337         (test_target) <shortname, longname, doc>: Delete.
4338         <info>: New.
4339         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4340         add_inf_child_target.
4341         * tracefile-tfile.c (tfile_target_info): New.
4342         (tfile_target) <shortname, longname, doc>: Delete.
4343         <info>: New.
4344         (tfile_target::open): Rename to ...
4345         (tfile_target_open): ... this.
4346         (_initialize_tracefile_tfile): Adjust.
4347         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4348         add_inf_child_target.
4349         * windows-nat.c (_initialize_windows_nat): Use
4350         add_inf_child_target.
4351         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4352         add_inf_child_target.
4353
4354 2018-05-02  Pedro Alves  <palves@redhat.com>
4355
4356         * linux-nat.h (linux_nat_target) <low_new_thread,
4357         low_delete_thread, low_new_fork, low_forget_process,
4358         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4359         New virtual methods.
4360         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4361         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4362         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4363         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4364         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4365         Delete.
4366         * linux-fork.c (delete_fork): Adjust to call low method.
4367         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4368         (linux_nat_new_fork, linux_nat_forget_process_hook)
4369         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4370         (linux_nat_status_is_event):
4371         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4372         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4373         to call low method.
4374         (sigtrap_is_event): Rename to ...
4375         (linux_nat_target::low_status_is_event): ... this.
4376         (linux_nat_set_status_is_event): Delete.
4377         (save_stop_reason, linux_nat_wait_1)
4378         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4379         low methods.
4380         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4381         (linux_nat_set_new_fork, linux_nat_set_forget_process)
4382         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4383         (linux_nat_set_prepare_to_resume): Delete.
4384         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4385         low virtual methods.
4386         * amd64-linux-nat.c: Likewise.
4387         * arm-linux-nat.c: Likewise.
4388         * i386-linux-nat.c: Likewise.
4389         * ia64-linux-nat.c: Likewise.
4390         * mips-linux-nat.c: Likewise.
4391         * ppc-linux-nat.c: Likewise.
4392         * s390-linux-nat.c: Likewise.
4393         * sparc64-linux-nat.c: Likewise.
4394         * x86-linux-nat.c: Likewise.
4395         * x86-linux-nat.h: Include "nat/x86-linux.h".
4396         (x86_linux_nat_target) <low_new_fork, low_forget_process,
4397         low_prepare_to_resume, low_new_thread, low_delete_thread>:
4398         Override methods.
4399
4400 2018-05-02  Pedro Alves  <palves@redhat.com>
4401
4402         * target.h (target_ops)
4403         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4404         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4405         stopped_by_watchpoint, have_continuable_watchpoint,
4406         stopped_data_address, watchpoint_addr_within_range,
4407         can_accel_watchpoint_condition, can_run, thread_alive,
4408         has_all_memory, has_memory, has_stack, has_registers,
4409         has_execution, can_async_p, is_async_p, supports_non_stop,
4410         always_non_stop_p, can_execute_reverse, supports_multi_process,
4411         supports_enable_disable_tracepoint,
4412         supports_disable_randomization, supports_string_tracing,
4413         supports_evaluation_of_breakpoint_conditions,
4414         can_run_breakpoint_commands, filesystem_is_local,
4415         can_download_tracepoint, get_trace_state_variable_value,
4416         set_trace_notes, get_tib_address, use_agent, can_use_agent,
4417         record_is_replaying, record_will_replay,
4418         augmented_libraries_svr4_read>: Adjust to return bool.
4419         * aarch64-linux-nat.c: All implementations adjusted.
4420         * aix-thread.c: All implementations adjusted.
4421         * arm-linux-nat.c: All implementations adjusted.
4422         * breakpoint.c: All implementations adjusted.
4423         * bsd-kvm.c: All implementations adjusted.
4424         * bsd-uthread.c: All implementations adjusted.
4425         * corelow.c: All implementations adjusted.
4426         * ctf.c: All implementations adjusted.
4427         * darwin-nat.c: All implementations adjusted.
4428         * darwin-nat.h: All implementations adjusted.
4429         * exec.c: All implementations adjusted.
4430         * fbsd-nat.c: All implementations adjusted.
4431         * fbsd-nat.h: All implementations adjusted.
4432         * gnu-nat.c: All implementations adjusted.
4433         * gnu-nat.h: All implementations adjusted.
4434         * go32-nat.c: All implementations adjusted.
4435         * ia64-linux-nat.c: All implementations adjusted.
4436         * inf-child.c: All implementations adjusted.
4437         * inf-child.h: All implementations adjusted.
4438         * inf-ptrace.c: All implementations adjusted.
4439         * inf-ptrace.h: All implementations adjusted.
4440         * linux-nat.c: All implementations adjusted.
4441         * linux-nat.h: All implementations adjusted.
4442         * mips-linux-nat.c: All implementations adjusted.
4443         * nto-procfs.c: All implementations adjusted.
4444         * ppc-linux-nat.c: All implementations adjusted.
4445         * procfs.c: All implementations adjusted.
4446         * ravenscar-thread.c: All implementations adjusted.
4447         * record-btrace.c: All implementations adjusted.
4448         * record-full.c: All implementations adjusted.
4449         * remote-sim.c: All implementations adjusted.
4450         * remote.c: All implementations adjusted.
4451         * s390-linux-nat.c: All implementations adjusted.
4452         * sol-thread.c: All implementations adjusted.
4453         * spu-multiarch.c: All implementations adjusted.
4454         * target-delegates.c: All implementations adjusted.
4455         * target.c: All implementations adjusted.
4456         * target.h: All implementations adjusted.
4457         * tracefile-tfile.c: All implementations adjusted.
4458         * tracefile.c: All implementations adjusted.
4459         * tracefile.h: All implementations adjusted.
4460         * windows-nat.c: All implementations adjusted.
4461         * x86-linux-nat.h: All implementations adjusted.
4462         * x86-nat.h: All implementations adjusted.
4463
4464 2018-05-02  Pedro Alves  <palves@redhat.com>
4465
4466         * make-target-delegates (scan_target_h): Don't trim lines here.
4467         Replace sequences of tabs and/or whitespace with a single
4468         whitespace.
4469         (top level, parsing methods): Trim each line before processing it
4470         here.
4471
4472 2018-05-02  Pedro Alves  <palves@redhat.com>
4473             John Baldwin  <jhb@freebsd.org>
4474
4475         * target.h (enum strata) <debug_stratum>: New.
4476         (struct target_ops) <all delegation methods>: Replace by C++
4477         virtual methods, and drop "to_" prefix.  All references updated
4478         throughout.
4479         <to_shortname, to_longname, to_doc, to_data,
4480         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4481         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4482         virtual methods.  All references updated throughout.
4483         <can_attach, supports_terminal_ours, can_create_inferior,
4484         get_thread_control_capabilities, attach_no_wait>: New
4485         virtual methods.
4486         <insert_breakpoint, remove_breakpoint>: Now
4487         TARGET_DEFAULT_NORETURN methods.
4488         <info_proc>: Now returns bool.
4489         <to_magic>: Delete.
4490         (OPS_MAGIC): Delete.
4491         (current_target): Delete.  All references replaced by references
4492         to ...
4493         (target_stack): ... this.  New.
4494         (target_shortname, target_longname): Adjust.
4495         (target_can_run): Now a function declaration.
4496         (default_child_has_all_memory, default_child_has_memory)
4497         (default_child_has_stack, default_child_has_registers)
4498         (default_child_has_execution): Remove target_ops parameter.
4499         (complete_target_initialization): Delete.
4500         (memory_breakpoint_target): New template class.
4501         (test_target_ops): Refactor as a C++ class with virtual methods.
4502         * make-target-delegates (NAME_PART): Tighten.
4503         (POINTER_PART, CP_SYMBOL): New.
4504         (SIMPLE_RETURN_PART): Reimplement.
4505         (VEC_RETURN_PART): Expect less.
4506         (RETURN_PART, VIRTUAL_PART): New.
4507         (METHOD): Adjust to C++ virtual methods.
4508         (scan_target_h): Remove reference to C99.
4509         (dname): Output "target_ops::" prefix.
4510         (write_function_header): Adjust to output a C++ class method.
4511         (write_declaration): New.
4512         (write_delegator): Adjust to output a C++ class method.
4513         (tdname): Output "dummy_target::" prefix.
4514         (write_tdefault, write_debugmethod): Adjust to output a C++ class
4515         method.
4516         (tdefault_names, debug_names): Delete.
4517         (return_types, tdefaults, styles, argtypes_array): New.
4518         (top level): All methods are delegators.
4519         (print_class): New.
4520         (top level): Print dummy_target and debug_target classes.
4521         * target-delegates.c: Regenerate.
4522         * target-debug.h (target_debug_print_enum_info_proc_what)
4523         (target_debug_print_thread_control_capabilities)
4524         (target_debug_print_thread_info_p): New.
4525         * target.c (dummy_target): Delete.
4526         (the_dummy_target, the_debug_target): New.
4527         (target_stack): Now extern.
4528         (set_targetdebug): Push/unpush debug target.
4529         (default_child_has_all_memory, default_child_has_memory)
4530         (default_child_has_stack, default_child_has_registers)
4531         (default_child_has_execution): Remove target_ops parameter.
4532         (complete_target_initialization): Delete.
4533         (add_target_with_completer): No longer call
4534         complete_target_initialization.
4535         (target_supports_terminal_ours): Use regular delegation.
4536         (update_current_target): Delete.
4537         (push_target): No longer check magic number.  Don't call
4538         update_current_target.
4539         (unpush_target): Don't call update_current_target.
4540         (target_is_pushed): No longer check magic number.
4541         (target_require_runnable): Skip for all stratums over
4542         process_stratum.
4543         (target_ops::info_proc): New.
4544         (target_info_proc): Use find_target_at and
4545         find_default_run_target.
4546         (target_supports_disable_randomization): Use regular delegation.
4547         (target_get_osdata): Use find_target_at.
4548         (target_ops::open, target_ops::close, target_ops::can_attach)
4549         (target_ops::attach, target_ops::can_create_inferior)
4550         (target_ops::create_inferior, target_ops::can_run)
4551         (target_can_run): New.
4552         (default_fileio_target): Use regular delegation.
4553         (target_ops::fileio_open, target_ops::fileio_pwrite)
4554         (target_ops::fileio_pread, target_ops::fileio_fstat)
4555         (target_ops::fileio_close, target_ops::fileio_unlink)
4556         (target_ops::fileio_readlink): New.
4557         (target_fileio_open_1, target_fileio_unlink)
4558         (target_fileio_readlink): Always call the target method.  Handle
4559         FILEIO_ENOSYS.
4560         (return_zero, return_zero_has_execution): Delete.
4561         (init_dummy_target): Delete.
4562         (dummy_target::dummy_target, dummy_target::shortname)
4563         (dummy_target::longname, dummy_target::doc)
4564         (debug_target::debug_target, debug_target::shortname)
4565         (debug_target::longname, debug_target::doc): New.
4566         (target_supports_delete_record): Use regular delegation.
4567         (setup_target_debug): Delete.
4568         (maintenance_print_target_stack): Skip debug_stratum.
4569         (initialize_targets): Instantiate the_dummy_target and
4570         the_debug_target.
4571         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
4572         use target_stack.
4573         (target_auxv_search, fprint_target_auxv): Adjust.
4574         (info_auxv_command): Adjust to use target_stack.
4575         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4576         * exceptions.c (print_flush): Handle a NULL target_stack.
4577         * regcache.c (target_ops_no_register): Refactor as class with
4578         virtual methods.
4579
4580         * exec.c (exec_target): New class.
4581         (exec_ops): Now an exec_target.
4582         (exec_open, exec_close_1, exec_get_section_table)
4583         (exec_xfer_partial, exec_files_info, exec_has_memory)
4584         (exec_make_note_section): Refactor as exec_target methods.
4585         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4586         Delete.
4587         (exec_target::find_memory_regions): New.
4588         (_initialize_exec): Don't call init_exec_ops.
4589         * gdbcore.h (exec_file_clear): Delete.
4590
4591         * corefile.c (core_target): Delete.
4592         (core_file_command): Adjust.
4593         * corelow.c (core_target): New class.
4594         (the_core_target): New.
4595         (core_close): Remove target_ops parameter.
4596         (core_close_cleanup): Adjust.
4597         (core_target::close): New.
4598         (core_open, core_detach, get_core_registers, core_files_info)
4599         (core_xfer_partial, core_thread_alive, core_read_description)
4600         (core_pid_to_str, core_thread_name, core_has_memory)
4601         (core_has_stack, core_has_registers, core_info_proc): Rework as
4602         core_target methods.
4603         (ignore, core_remove_breakpoint, init_core_ops): Delete.
4604         (_initialize_corelow): Initialize the_core_target.
4605         * gdbcore.h (core_target): Delete.
4606         (the_core_target): New.
4607
4608         * ctf.c: (ctf_target): New class.
4609         (ctf_ops): Now a ctf_target.
4610         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4611         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4612         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4613         methods.
4614         (init_ctf_ops): Delete.
4615         (_initialize_ctf): Don't call it.
4616         * tracefile-tfile.c (tfile_target): New class.
4617         (tfile_ops): Now a tfile_target.
4618         (tfile_open, tfile_close, tfile_files_info)
4619         (tfile_get_tracepoint_status, tfile_trace_find)
4620         (tfile_fetch_registers, tfile_xfer_partial)
4621         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4622         Refactor as tfile_target methods.
4623         (tfile_xfer_partial_features): Remove target_ops parameter.
4624         (init_tfile_ops): Delete.
4625         (_initialize_tracefile_tfile): Don't call it.
4626         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4627         (tracefile_has_stack, tracefile_has_registers)
4628         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4629         tracefile_target methods.
4630         (init_tracefile_ops): Delete.
4631         (tracefile_target::tracefile_target): New.
4632         * tracefile.h: Include "target.h".
4633         (tracefile_target): New class.
4634         (init_tracefile_ops): Delete.
4635
4636         * spu-multiarch.c (spu_multiarch_target): New class.
4637         (spu_ops): Now a spu_multiarch_target.
4638         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4639         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4640         (spu_search_memory, spu_mourn_inferior): Refactor as
4641         spu_multiarch_target methods.
4642         (init_spu_ops): Delete.
4643         (_initialize_spu_multiarch): Remove references to init_spu_ops,
4644         complete_target_initialization.
4645
4646         * ravenscar-thread.c (ravenscar_thread_target): New class.
4647         (ravenscar_ops): Now a ravenscar_thread_target.
4648         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4649         (ravenscar_thread_alive, ravenscar_pid_to_str)
4650         (ravenscar_fetch_registers, ravenscar_store_registers)
4651         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4652         (ravenscar_stopped_by_hw_breakpoint)
4653         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4654         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4655         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4656         methods.
4657         (init_ravenscar_thread_ops): Delete.
4658         (_initialize_ravenscar): Remove references to
4659         init_ravenscar_thread_ops and complete_target_initialization.
4660
4661         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4662         (bsd_uthread_target): New class.
4663         (bsd_uthread_ops): Now a bsd_uthread_target.
4664         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4665         (bsd_uthread_close, bsd_uthread_mourn_inferior)
4666         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4667         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4668         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4669         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4670         (bsd_uthread_target): Delete function.
4671         (_initialize_bsd_uthread): Remove reference to
4672         complete_target_initialization.
4673
4674         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
4675         (target_bfd): ... this new class.
4676         (target_bfd_xfer_partial, target_bfd_get_section_table)
4677         (target_bfd_close): Refactor as target_bfd methods.
4678         (target_bfd::~target_bfd): New.
4679         (target_bfd_reopen): Adjust.
4680         (target_bfd::close): New.
4681
4682         * record-btrace.c (record_btrace_target): New class.
4683         (record_btrace_ops): Now a record_btrace_target.
4684         (record_btrace_open, record_btrace_stop_recording)
4685         (record_btrace_disconnect, record_btrace_close)
4686         (record_btrace_async, record_btrace_info)
4687         (record_btrace_insn_history, record_btrace_insn_history_range)
4688         (record_btrace_insn_history_from, record_btrace_call_history)
4689         (record_btrace_call_history_range)
4690         (record_btrace_call_history_from, record_btrace_record_method)
4691         (record_btrace_is_replaying, record_btrace_will_replay)
4692         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4693         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4694         (record_btrace_store_registers, record_btrace_prepare_to_store)
4695         (record_btrace_to_get_unwinder)
4696         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4697         (record_btrace_commit_resume, record_btrace_wait)
4698         (record_btrace_stop, record_btrace_can_execute_reverse)
4699         (record_btrace_stopped_by_sw_breakpoint)
4700         (record_btrace_supports_stopped_by_sw_breakpoint)
4701         (record_btrace_stopped_by_hw_breakpoint)
4702         (record_btrace_supports_stopped_by_hw_breakpoint)
4703         (record_btrace_update_thread_list, record_btrace_thread_alive)
4704         (record_btrace_goto_begin, record_btrace_goto_end)
4705         (record_btrace_goto, record_btrace_stop_replaying_all)
4706         (record_btrace_execution_direction)
4707         (record_btrace_prepare_to_generate_core)
4708         (record_btrace_done_generating_core): Refactor as
4709         record_btrace_target methods.
4710         (init_record_btrace_ops): Delete.
4711         (_initialize_record_btrace): Remove reference to
4712         init_record_btrace_ops.
4713         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4714         the execution_direction global.
4715         (record_full_base_target, record_full_target)
4716         (record_full_core_target): New classes.
4717         (record_full_ops): Now a record_full_target.
4718         (record_full_core_ops): Now a record_full_core_target.
4719         (record_full_target::detach, record_full_target::disconnect)
4720         (record_full_core_target::disconnect)
4721         (record_full_target::mourn_inferior, record_full_target::kill):
4722         New.
4723         (record_full_open, record_full_close, record_full_async): Refactor
4724         as methods of the record_full_base_target class.
4725         (record_full_resume, record_full_commit_resume): Refactor
4726         as methods of the record_full_target class.
4727         (record_full_wait, record_full_stopped_by_watchpoint)
4728         (record_full_stopped_data_address)
4729         (record_full_stopped_by_sw_breakpoint)
4730         (record_full_supports_stopped_by_sw_breakpoint)
4731         (record_full_stopped_by_hw_breakpoint)
4732         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4733         methods of the record_full_base_target class.
4734         (record_full_store_registers, record_full_xfer_partial)
4735         (record_full_insert_breakpoint, record_full_remove_breakpoint):
4736         Refactor as methods of the record_full_target class.
4737         (record_full_can_execute_reverse, record_full_get_bookmark)
4738         (record_full_goto_bookmark, record_full_execution_direction)
4739         (record_full_record_method, record_full_info, record_full_delete)
4740         (record_full_is_replaying, record_full_will_replay)
4741         (record_full_goto_begin, record_full_goto_end, record_full_goto)
4742         (record_full_stop_replaying): Refactor as methods of the
4743         record_full_base_target class.
4744         (record_full_core_resume, record_full_core_kill)
4745         (record_full_core_fetch_registers)
4746         (record_full_core_prepare_to_store)
4747         (record_full_core_store_registers, record_full_core_xfer_partial)
4748         (record_full_core_insert_breakpoint)
4749         (record_full_core_remove_breakpoint)
4750         (record_full_core_has_execution): Refactor
4751         as methods of the record_full_core_target class.
4752         (record_full_base_target::supports_delete_record): New.
4753         (init_record_full_ops): Delete.
4754         (init_record_full_core_ops): Delete.
4755         (record_full_save): Refactor as method of the
4756         record_full_base_target class.
4757         (_initialize_record_full): Remove references to
4758         init_record_full_ops and init_record_full_core_ops.
4759
4760         * remote.c (remote_target, extended_remote_target): New classes.
4761         (remote_ops): Now a remote_target.
4762         (extended_remote_ops): Now an extended_remote_target.
4763         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4764         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4765         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4766         (remote_pass_signals, remote_set_syscall_catchpoint)
4767         (remote_program_signals, )
4768         (remote_thread_always_alive): Remove target_ops parameter.
4769         (remote_thread_alive, remote_thread_name)
4770         (remote_update_thread_list, remote_threads_extra_info)
4771         (remote_static_tracepoint_marker_at)
4772         (remote_static_tracepoint_markers_by_strid)
4773         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4774         (remote_open): Refactor as methods of remote_target.
4775         (extended_remote_open, extended_remote_detach)
4776         (extended_remote_attach, extended_remote_post_attach):
4777         (extended_remote_supports_disable_randomization)
4778         (extended_remote_create_inferior): : Refactor as method of
4779         extended_remote_target.
4780         (remote_set_permissions, remote_open_1, remote_detach)
4781         (remote_follow_fork, remote_follow_exec, remote_disconnect)
4782         (remote_resume, remote_commit_resume, remote_stop)
4783         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4784         (remote_terminal_ours, remote_wait, remote_fetch_registers)
4785         (remote_prepare_to_store, remote_store_registers)
4786         (remote_flash_erase, remote_flash_done, remote_files_info)
4787         (remote_kill, remote_mourn, remote_insert_breakpoint)
4788         (remote_remove_breakpoint, remote_insert_watchpoint)
4789         (remote_watchpoint_addr_within_range)
4790         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4791         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4792         (remote_supports_stopped_by_sw_breakpoint)
4793         (remote_stopped_by_hw_breakpoint)
4794         (remote_supports_stopped_by_hw_breakpoint)
4795         (remote_stopped_by_watchpoint, remote_stopped_data_address)
4796         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4797         (remote_verify_memory): Refactor as methods of remote_target.
4798         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4799         parameter.
4800         (remote_xfer_partial, remote_get_memory_xfer_limit)
4801         (remote_search_memory, remote_rcmd, remote_memory_map)
4802         (remote_pid_to_str, remote_get_thread_local_address)
4803         (remote_get_tib_address, remote_read_description): Refactor as
4804         methods of remote_target.
4805         (remote_target::fileio_open, remote_target::fileio_pwrite)
4806         (remote_target::fileio_pread, remote_target::fileio_close): New.
4807         (remote_hostio_readlink, remote_hostio_fstat)
4808         (remote_filesystem_is_local, remote_can_execute_reverse)
4809         (remote_supports_non_stop, remote_supports_disable_randomization)
4810         (remote_supports_multi_process, remote_supports_cond_breakpoints)
4811         (remote_supports_enable_disable_tracepoint)
4812         (remote_supports_string_tracing)
4813         (remote_can_run_breakpoint_commands, remote_trace_init)
4814         (remote_download_tracepoint, remote_can_download_tracepoint)
4815         (remote_download_trace_state_variable, remote_enable_tracepoint)
4816         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4817         (remote_trace_start, remote_get_trace_status)
4818         (remote_get_tracepoint_status, remote_trace_stop)
4819         (remote_trace_find, remote_get_trace_state_variable_value)
4820         (remote_save_trace_data, remote_get_raw_trace_data)
4821         (remote_set_disconnected_tracing, remote_core_of_thread)
4822         (remote_set_circular_trace_buffer, remote_traceframe_info)
4823         (remote_get_min_fast_tracepoint_insn_len)
4824         (remote_set_trace_buffer_size, remote_set_trace_notes)
4825         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4826         (remote_disable_btrace, remote_teardown_btrace)
4827         (remote_read_btrace, remote_btrace_conf)
4828         (remote_augmented_libraries_svr4_read, remote_load)
4829         (remote_pid_to_exec_file, remote_can_do_single_step)
4830         (remote_execution_direction, remote_thread_handle_to_thread_info):
4831         Refactor as methods of remote_target.
4832         (init_remote_ops, init_extended_remote_ops): Delete.
4833         (remote_can_async_p, remote_is_async_p, remote_async)
4834         (remote_thread_events, remote_upload_tracepoints)
4835         (remote_upload_trace_state_variables): Refactor as methods of
4836         remote_target.
4837         (_initialize_remote): Remove references to init_remote_ops and
4838         init_extended_remote_ops.
4839
4840         * remote-sim.c (gdbsim_target): New class.
4841         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4842         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4843         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4844         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4845         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4846         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4847         Refactor as methods of gdbsim_target.
4848         (gdbsim_ops): Now a gdbsim_target.
4849         (init_gdbsim_ops): Delete.
4850         (gdbsim_cntrl_c): Adjust.
4851         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4852
4853         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4854         (the_amd64_linux_nat_target): New.
4855         (amd64_linux_fetch_inferior_registers)
4856         (amd64_linux_store_inferior_registers): Refactor as methods of
4857         amd64_linux_nat_target.
4858         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
4859         * i386-linux-nat.c: Don't include "linux-nat.h".
4860         (i386_linux_nat_target): New class.
4861         (the_i386_linux_nat_target): New.
4862         (i386_linux_fetch_inferior_registers)
4863         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4864         as methods of i386_linux_nat_target.
4865         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
4866         * inf-child.c (inf_child_ops): Delete.
4867         (inf_child_fetch_inferior_registers)
4868         (inf_child_store_inferior_registers): Delete.
4869         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4870         methods of inf_child_target.
4871         (inf_child_target::supports_terminal_ours)
4872         (inf_child_target::terminal_init)
4873         (inf_child_target::terminal_inferior)
4874         (inf_child_target::terminal_ours_for_output)
4875         (inf_child_target::terminal_ours, inf_child_target::interrupt)
4876         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4877         New.
4878         (inf_child_open, inf_child_disconnect, inf_child_close)
4879         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4880         (inf_child_post_startup_inferior, inf_child_can_run)
4881         (inf_child_pid_to_exec_file): Refactor as methods of
4882         inf_child_target.
4883         (inf_child_follow_fork): Delete.
4884         (inf_child_target::can_create_inferior)
4885         (inf_child_target::can_attach): New.
4886         (inf_child_target::has_all_memory, inf_child_target::has_memory)
4887         (inf_child_target::has_stack, inf_child_target::has_registers)
4888         (inf_child_target::has_execution): New.
4889         (inf_child_fileio_open, inf_child_fileio_pwrite)
4890         (inf_child_fileio_pread, inf_child_fileio_fstat)
4891         (inf_child_fileio_close, inf_child_fileio_unlink)
4892         (inf_child_fileio_readlink, inf_child_use_agent)
4893         (inf_child_can_use_agent): Refactor as methods of
4894         inf_child_target.
4895         (return_zero, inf_child_target): Delete.
4896         (inf_child_target::inf_child_target): New.
4897         * inf-child.h: Include "target.h".
4898         (inf_child_target): Delete function prototype.
4899         (inf_child_target): New class.
4900         (inf_child_open_target, inf_child_mourn_inferior)
4901         (inf_child_maybe_unpush_target): Delete.
4902         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4903         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4904         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4905         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4906         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4907         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4908         (inf_ptrace_wait, inf_ptrace_xfer_partial)
4909         (inf_ptrace_thread_alive, inf_ptrace_files_info)
4910         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4911         methods of inf_ptrace_target.
4912         (inf_ptrace_target): Delete function.
4913         * inf-ptrace.h: Include "inf-child.h".
4914         (inf_ptrace_target): Delete function declaration.
4915         (inf_ptrace_target): New class.
4916         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4917         * linux-nat.c (linux_target): New.
4918         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4919         (linux_nat_target::~linux_nat_target): New.
4920         (linux_child_post_attach, linux_child_post_startup_inferior)
4921         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4922         (linux_child_remove_fork_catchpoint)
4923         (linux_child_insert_vfork_catchpoint)
4924         (linux_child_remove_vfork_catchpoint)
4925         (linux_child_insert_exec_catchpoint)
4926         (linux_child_remove_exec_catchpoint)
4927         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4928         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4929         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4930         (linux_nat_stopped_data_address)
4931         (linux_nat_stopped_by_sw_breakpoint)
4932         (linux_nat_supports_stopped_by_sw_breakpoint)
4933         (linux_nat_stopped_by_hw_breakpoint)
4934         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4935         (linux_nat_kill, linux_nat_mourn_inferior)
4936         (linux_nat_xfer_partial, linux_nat_thread_alive)
4937         (linux_nat_update_thread_list, linux_nat_pid_to_str)
4938         (linux_nat_thread_name, linux_child_pid_to_exec_file)
4939         (linux_child_static_tracepoint_markers_by_strid)
4940         (linux_nat_is_async_p, linux_nat_can_async_p)
4941         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4942         (linux_nat_supports_multi_process)
4943         (linux_nat_supports_disable_randomization, linux_nat_async)
4944         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4945         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4946         (linux_nat_fileio_open, linux_nat_fileio_readlink)
4947         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4948         methods of linux_nat_target.
4949         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4950         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4951         parameter.
4952         (check_stopped_by_watchpoint): Adjust.
4953         (linux_xfer_partial): Delete.
4954         (linux_target_install_ops, linux_target, linux_nat_add_target):
4955         Delete.
4956         (linux_nat_target::linux_nat_target): New.
4957         * linux-nat.h: Include "inf-ptrace.h".
4958         (linux_nat_target): New.
4959         (linux_target, linux_target_install_ops, linux_nat_add_target):
4960         Delete function declarations.
4961         (linux_target): Declare global.
4962         * linux-thread-db.c (thread_db_target): New.
4963         (thread_db_target::thread_db_target): New.
4964         (thread_db_ops): Delete.
4965         (the_thread_db_target): New.
4966         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4967         (thread_db_update_thread_list, thread_db_pid_to_str)
4968         (thread_db_extra_thread_info)
4969         (thread_db_thread_handle_to_thread_info)
4970         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4971         (thread_db_resume): Refactor as methods of thread_db_target.
4972         (init_thread_db_ops): Delete.
4973         (_initialize_thread_db): Remove reference to init_thread_db_ops.
4974         * x86-linux-nat.c: Don't include "linux-nat.h".
4975         (super_post_startup_inferior): Delete.
4976         (x86_linux_nat_target::~x86_linux_nat_target): New.
4977         (x86_linux_child_post_startup_inferior)
4978         (x86_linux_read_description, x86_linux_enable_btrace)
4979         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4980         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4981         methods of x86_linux_nat_target.
4982         (x86_linux_create_target): Delete.  Bits folded ...
4983         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
4984         pointer.
4985         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4986         (x86_linux_nat_target): New class.
4987         (x86_linux_create_target): Delete.
4988         (x86_linux_add_target): Now takes a linux_nat_target pointer.
4989         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4990         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4991         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4992         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4993         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4994         make extern.
4995         (x86_use_watchpoints): Delete.
4996         * x86-nat.h: Include "breakpoint.h" and "target.h".
4997         (x86_use_watchpoints): Delete.
4998         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4999         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5000         (x86_insert_watchpoint, x86_remove_watchpoint)
5001         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5002         (x86_stopped_by_hw_breakpoint): New declarations.
5003         (x86_nat_target): New template class.
5004
5005         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5006         (the_ppc_linux_nat_target): New.
5007         (ppc_linux_fetch_inferior_registers)
5008         (ppc_linux_can_use_hw_breakpoint)
5009         (ppc_linux_region_ok_for_hw_watchpoint)
5010         (ppc_linux_ranged_break_num_registers)
5011         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5012         (ppc_linux_insert_mask_watchpoint)
5013         (ppc_linux_remove_mask_watchpoint)
5014         (ppc_linux_can_accel_watchpoint_condition)
5015         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5016         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5017         (ppc_linux_watchpoint_addr_within_range)
5018         (ppc_linux_masked_watch_num_registers)
5019         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5020         (ppc_linux_read_description): Refactor as methods of
5021         ppc_linux_nat_target.
5022         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5023
5024         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5025         (procfs_target): New class.
5026         (the_procfs_target): New.
5027         (procfs_target): Delete function.
5028         (procfs_auxv_parse, procfs_attach, procfs_detach)
5029         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5030         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5031         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5032         (procfs_create_inferior, procfs_update_thread_list)
5033         (procfs_thread_alive, procfs_pid_to_str)
5034         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5035         (procfs_stopped_data_address, procfs_insert_watchpoint)
5036         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5037         (proc_find_memory_regions, procfs_info_proc)
5038         (procfs_make_note_section): Refactor as methods of procfs_target.
5039         (_initialize_procfs): Adjust.
5040         * sol-thread.c (sol_thread_target): New class.
5041         (sol_thread_ops): Now a sol_thread_target.
5042         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5043         (sol_thread_fetch_registers, sol_thread_store_registers)
5044         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5045         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5046         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5047         (init_sol_thread_ops): Delete.
5048         (_initialize_sol_thread): Adjust.  Remove references to
5049         init_sol_thread_ops and complete_target_initialization.
5050
5051         * windows-nat.c (windows_nat_target): New class.
5052         (windows_fetch_inferior_registers)
5053         (windows_store_inferior_registers, windows_resume, windows_wait)
5054         (windows_attach, windows_detach, windows_pid_to_exec_file)
5055         (windows_files_info, windows_create_inferior)
5056         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5057         (windows_close, windows_pid_to_str, windows_xfer_partial)
5058         (windows_get_tib_address, windows_get_ada_task_ptid)
5059         (windows_thread_name, windows_thread_alive): Refactor as
5060         windows_nat_target methods.
5061         (do_initial_windows_stuff): Adjust.
5062         (windows_target): Delete function.
5063         (_initialize_windows_nat): Adjust.
5064
5065         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5066         (darwin_mourn_inferior, darwin_kill_inferior)
5067         (darwin_create_inferior, darwin_attach, darwin_detach)
5068         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5069         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5070         (darwin_supports_multi_process): Refactor as darwin_nat_target
5071         methods.
5072         (darwin_resume_to, darwin_files_info): Delete.
5073         (_initialize_darwin_inferior): Rename to ...
5074         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5075         * darwin-nat.h: Include "inf-child.h".
5076         (darwin_nat_target): New class.
5077         (darwin_complete_target): Delete.
5078         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5079         (darwin_target): New.
5080         (i386_darwin_fetch_inferior_registers)
5081         (i386_darwin_store_inferior_registers): Refactor as methods of
5082         darwin_nat_target.
5083         (darwin_complete_target): Delete, with ...
5084         (_initialize_i386_darwin_nat): ... bits factored out here.
5085
5086         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5087         (the_alpha_linux_nat_target): New.
5088         (alpha_linux_register_u_offset): Refactor as
5089         alpha_linux_nat_target method.
5090         (_initialize_alpha_linux_nat): Adjust.
5091         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5092         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5093         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5094         methods of linux_nat_trad_target.
5095         (linux_trad_target): Delete.
5096         * linux-nat-trad.h (linux_trad_target): Delete function.
5097         (linux_nat_trad_target): New class.
5098         * mips-linux-nat.c (mips_linux_nat_target): New class.
5099         (super_fetch_registers, super_store_registers, super_close):
5100         Delete.
5101         (the_mips_linux_nat_target): New.
5102         (mips64_linux_regsets_fetch_registers)
5103         (mips64_linux_regsets_store_registers)
5104         (mips64_linux_fetch_registers, mips64_linux_store_registers)
5105         (mips_linux_register_u_offset, mips_linux_read_description)
5106         (mips_linux_can_use_hw_breakpoint)
5107         (mips_linux_stopped_by_watchpoint)
5108         (mips_linux_stopped_data_address)
5109         (mips_linux_region_ok_for_hw_watchpoint)
5110         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5111         (mips_linux_close): Refactor as methods of mips_linux_nat.
5112         (_initialize_mips_linux_nat): Adjust to C++ification.
5113
5114         * aix-thread.c (aix_thread_target): New class.
5115         (aix_thread_ops): Now an aix_thread_target.
5116         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5117         (aix_thread_fetch_registers, aix_thread_store_registers)
5118         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5119         (aix_thread_thread_alive, aix_thread_pid_to_str)
5120         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5121         Refactor as methods of aix_thread_target.
5122         (init_aix_thread_ops): Delete.
5123         (_initialize_aix_thread): Remove references to init_aix_thread_ops
5124         and complete_target_initialization.
5125         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5126         (rs6000_nat_target): New class.
5127         (the_rs6000_nat_target): New.
5128         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5129         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5130         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5131         (super_create_inferior): Delete.
5132         (_initialize_rs6000_nat): Adjust to C++ification.
5133
5134         * arm-linux-nat.c (arm_linux_nat_target): New class.
5135         (the_arm_linux_nat_target): New.
5136         (arm_linux_fetch_inferior_registers)
5137         (arm_linux_store_inferior_registers, arm_linux_read_description)
5138         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5139         (arm_linux_remove_hw_breakpoint)
5140         (arm_linux_region_ok_for_hw_watchpoint)
5141         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5142         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5143         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5144         arm_linux_nat_target.
5145         (_initialize_arm_linux_nat): Adjust to C++ification.
5146
5147         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5148         (the_aarch64_linux_nat_target): New.
5149         (aarch64_linux_fetch_inferior_registers)
5150         (aarch64_linux_store_inferior_registers)
5151         (aarch64_linux_child_post_startup_inferior)
5152         (aarch64_linux_read_description)
5153         (aarch64_linux_can_use_hw_breakpoint)
5154         (aarch64_linux_insert_hw_breakpoint)
5155         (aarch64_linux_remove_hw_breakpoint)
5156         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5157         (aarch64_linux_region_ok_for_hw_watchpoint)
5158         (aarch64_linux_stopped_data_address)
5159         (aarch64_linux_stopped_by_watchpoint)
5160         (aarch64_linux_watchpoint_addr_within_range)
5161         (aarch64_linux_can_do_single_step): Refactor as methods of
5162         aarch64_linux_nat_target.
5163         (super_post_startup_inferior): Delete.
5164         (_initialize_aarch64_linux_nat): Adjust to C++ification.
5165
5166         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5167         (the_hppa_linux_nat_target): New.
5168         (hppa_linux_fetch_inferior_registers)
5169         (hppa_linux_store_inferior_registers): Refactor as methods of
5170         hppa_linux_nat_target.
5171         (_initialize_hppa_linux_nat): Adjust to C++ification.
5172
5173         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5174         (the_ia64_linux_nat_target): New.
5175         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5176         (ia64_linux_stopped_data_address)
5177         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5178         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5179         ia64_linux_nat_target methods.
5180         (super_xfer_partial): Delete.
5181         (_initialize_ia64_linux_nat): Adjust to C++ification.
5182
5183         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5184         (the_m32r_linux_nat_target): New.
5185         (m32r_linux_fetch_inferior_registers)
5186         (m32r_linux_store_inferior_registers): Refactor as
5187         m32r_linux_nat_target methods.
5188         (_initialize_m32r_linux_nat): Adjust to C++ification.
5189
5190         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5191         (the_m68k_linux_nat_target): New.
5192         (m68k_linux_fetch_inferior_registers)
5193         (m68k_linux_store_inferior_registers): Refactor as
5194         m68k_linux_nat_target methods.
5195         (_initialize_m68k_linux_nat): Adjust to C++ification.
5196
5197         * s390-linux-nat.c (s390_linux_nat_target): New class.
5198         (the_s390_linux_nat_target): New.
5199         (s390_linux_fetch_inferior_registers)
5200         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5201         (s390_insert_watchpoint, s390_remove_watchpoint)
5202         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5203         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5204         (s390_auxv_parse, s390_read_description): Refactor as methods of
5205         s390_linux_nat_target.
5206         (_initialize_s390_nat): Adjust to C++ification.
5207
5208         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5209         (the_sparc_linux_nat_target): New.
5210         (_initialize_sparc_linux_nat): Adjust to C++ification.
5211         * sparc-nat.c (sparc_fetch_inferior_registers)
5212         (sparc_store_inferior_registers): Remove target_ops parameter.
5213         * sparc-nat.h (sparc_fetch_inferior_registers)
5214         (sparc_store_inferior_registers): Remove target_ops parameter.
5215         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5216         (the_sparc64_linux_nat_target): New.
5217         (_initialize_sparc64_linux_nat): Adjust to C++ification.
5218
5219         * spu-linux-nat.c (spu_linux_nat_target): New class.
5220         (the_spu_linux_nat_target): New.
5221         (spu_child_post_startup_inferior, spu_child_post_attach)
5222         (spu_child_wait, spu_fetch_inferior_registers)
5223         (spu_store_inferior_registers, spu_xfer_partial)
5224         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5225         methods.
5226         (_initialize_spu_nat): Adjust to C++ification.
5227
5228         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5229         (the_tilegx_linux_nat_target): New.
5230         (fetch_inferior_registers, store_inferior_registers):
5231         Refactor as methods.
5232         (_initialize_tile_linux_nat): Adjust to C++ification.
5233
5234         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5235         (the_xtensa_linux_nat_target): New.
5236         (xtensa_linux_fetch_inferior_registers)
5237         (xtensa_linux_store_inferior_registers): Refactor as
5238         xtensa_linux_nat_target methods.
5239         (_initialize_xtensa_linux_nat): Adjust to C++ification.
5240
5241         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5242         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5243         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5244         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5245         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5246         (fbsd_stopped_by_sw_breakpoint)
5247         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5248         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5249         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5250         (fbsd_post_startup_inferior, fbsd_post_attach)
5251         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5252         (fbsd_set_syscall_catchpoint)
5253         (super_xfer_partial, super_resume, super_wait)
5254         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5255         (fbsd_handle_debug_trap): Remove target_ops parameter.
5256         (fbsd_nat_add_target): Delete.
5257         * fbsd-nat.h: Include "inf-ptrace.h".
5258         (fbsd_nat_add_target): Delete.
5259         (USE_SIGTRAP_SIGINFO): Define.
5260         (fbsd_nat_target): New class.
5261
5262         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5263         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5264         (amd64bsd_target): Delete.
5265         * amd64-bsd-nat.h: New file.
5266         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5267         "x86-bsd-nat.h".
5268         (amd64_fbsd_nat_target): New class.
5269         (the_amd64_fbsd_nat_target): New.
5270         (amd64fbsd_read_description): Refactor as method of
5271         amd64_fbsd_nat_target.
5272         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5273         (_initialize_amd64fbsd_nat): Adjust to C++ification.
5274         * amd64-nat.h (amd64bsd_target): Delete function declaration.
5275         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5276         (i386bsd_store_inferior_registers): Remove target_ops parameter.
5277         (i386bsd_target): Delete.
5278         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5279         (i386bsd_fetch_inferior_registers)
5280         (i386bsd_store_inferior_registers): Declare.
5281         (i386_bsd_nat_target): New class.
5282         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5283         (the_i386_fbsd_nat_target): New.
5284         (i386fbsd_resume, i386fbsd_read_description): Refactor as
5285         i386_fbsd_nat_target methods.
5286         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5287         (_initialize_i386fbsd_nat): Adjust to C++ification.
5288         * x86-bsd-nat.c (super_mourn_inferior): Delete.
5289         (x86bsd_mourn_inferior, x86bsd_target): Delete.
5290         (_initialize_x86_bsd_nat): Adjust to C++ification.
5291         * x86-bsd-nat.h: Include "x86-nat.h".
5292         (x86bsd_target): Delete declaration.
5293         (x86bsd_nat_target): New class.
5294
5295         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5296         (the_aarch64_fbsd_nat_target): New.
5297         (aarch64_fbsd_fetch_inferior_registers)
5298         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5299         aarch64_fbsd_nat_target.
5300         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5301         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5302         (the_alpha_bsd_nat_target): New.
5303         (alphabsd_fetch_inferior_registers)
5304         (alphabsd_store_inferior_registers): Refactor as
5305         alpha_bsd_nat_target methods.
5306         (_initialize_alphabsd_nat): Refactor as methods of
5307         alpha_bsd_nat_target.
5308         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5309         (the_amd64_nbsd_nat_target): New.
5310         (_initialize_amd64nbsd_nat): Adjust to C++ification.
5311         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5312         (the_amd64_obsd_nat_target): New.
5313         (_initialize_amd64obsd_nat): Adjust to C++ification.
5314         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5315         (the_arm_fbsd_nat_target): New.
5316         (arm_fbsd_fetch_inferior_registers)
5317         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5318         (_initialize_arm_fbsd_nat): Refactor as methods of
5319         arm_fbsd_nat_target.
5320         (_initialize_arm_fbsd_nat): Adjust to C++ification.
5321         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5322         (the_arm_netbsd_nat_target): New.
5323         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5324         arm_netbsd_nat_target.
5325         (_initialize_arm_netbsd_nat): Adjust to C++ification.
5326         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5327         (the_hppa_nbsd_nat_target): New.
5328         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5329         hppa_nbsd_nat_target methods.
5330         (_initialize_hppanbsd_nat): Adjust to C++ification.
5331         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5332         (the_hppa_obsd_nat_target): New.
5333         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5334         methods of hppa_obsd_nat_target.
5335         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
5336         add_target.
5337         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5338         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
5339         add_target.
5340         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5341         (_initialize_i386obsd_nat): Use add_target.
5342         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5343         (the_m68k_bsd_nat_target): New.
5344         (m68kbsd_fetch_inferior_registers)
5345         (m68kbsd_store_inferior_registers): Refactor as methods of
5346         m68k_bsd_nat_target.
5347         (_initialize_m68kbsd_nat): Adjust to C++ification.
5348         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5349         (the_mips_fbsd_nat_target): New.
5350         (mips_fbsd_fetch_inferior_registers)
5351         (mips_fbsd_store_inferior_registers): Refactor as methods of
5352         mips_fbsd_nat_target.
5353         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
5354         add_target.
5355         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5356         (the_mips_nbsd_nat_target): New.
5357         (mipsnbsd_fetch_inferior_registers)
5358         (mipsnbsd_store_inferior_registers): Refactor as methods of
5359         mips_nbsd_nat_target.
5360         (_initialize_mipsnbsd_nat): Adjust to C++ification.
5361         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5362         (the_mips64_obsd_nat_target): New.
5363         (mips64obsd_fetch_inferior_registers)
5364         (mips64obsd_store_inferior_registers): Refactor as methods of
5365         mips64_obsd_nat_target.
5366         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
5367         add_target.
5368         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5369         nbsd_nat_target.
5370         * nbsd-nat.h: Include "inf-ptrace.h".
5371         (nbsd_nat_target): New class.
5372         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5373         (obsd_wait): Refactor as methods of obsd_nat_target.
5374         (obsd_add_target): Delete.
5375         * obsd-nat.h: Include "inf-ptrace.h".
5376         (obsd_nat_target): New class.
5377         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5378         (the_ppc_fbsd_nat_target): New.
5379         (ppcfbsd_fetch_inferior_registers)
5380         (ppcfbsd_store_inferior_registers): Refactor as methods of
5381         ppc_fbsd_nat_target.
5382         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
5383         add_target.
5384         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5385         (the_ppc_nbsd_nat_target): New.
5386         (ppcnbsd_fetch_inferior_registers)
5387         (ppcnbsd_store_inferior_registers): Refactor as methods of
5388         ppc_nbsd_nat_target.
5389         (_initialize_ppcnbsd_nat): Adjust to C++ification.
5390         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5391         (the_ppc_obsd_nat_target): New.
5392         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5393         methods of ppc_obsd_nat_target.
5394         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
5395         add_target.
5396         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5397         (the_sh_nbsd_nat_target): New.
5398         (shnbsd_fetch_inferior_registers)
5399         (shnbsd_store_inferior_registers): Refactor as methods of
5400         sh_nbsd_nat_target.
5401         (_initialize_shnbsd_nat): Adjust to C++ification.
5402         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5403         (inf_ptrace_xfer_partial): Delete.
5404         (sparc_xfer_partial, sparc_target): Delete.
5405         * sparc-nat.h (sparc_fetch_inferior_registers)
5406         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5407         (sparc_target): Delete function declaration.
5408         (sparc_target): New template class.
5409         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5410         (_initialize_sparcnbsd_nat): Adjust to C++ification.
5411         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5412         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
5413         add_target.
5414         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5415         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5416         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5417         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
5418         add_target.
5419         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5420         (the_vax_bsd_nat_target): New.
5421         (vaxbsd_fetch_inferior_registers)
5422         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5423         methods.
5424         (_initialize_vaxbsd_nat): Adjust to C++ification.
5425
5426         * bsd-kvm.c (bsd_kvm_target): New class.
5427         (bsd_kvm_ops): Now a bsd_kvm_target.
5428         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5429         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5430         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5431         bsd_kvm_target.
5432         (bsd_kvm_return_one): Delete.
5433         (bsd_kvm_add_target): Adjust to C++ification.
5434
5435         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5436         (nto_procfs_target_procfs): New classes.
5437         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5438         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5439         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5440         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5441         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5442         (procfs_remove_hw_breakpoint, procfs_resume)
5443         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5444         (procfs_kill_inferior, procfs_store_registers)
5445         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5446         as methods of nto_procfs_target.
5447         (nto_procfs_ops): Now an nto_procfs_target_procfs.
5448         (nto_native_ops): Delete.
5449         (procfs_open, procfs_native_open): Delete.
5450         (nto_native_ops): Now an nto_procfs_target_native.
5451         (init_procfs_targets): Adjust to C++ification.
5452         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5453         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5454         Refactor as methods of nto_procfs_target.
5455
5456         * go32-nat.c (go32_nat_target): New class.
5457         (the_go32_nat_target): New.
5458         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5459         (go32_store_registers, go32_xfer_partial, go32_files_info)
5460         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5461         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5462         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5463         (go32_pid_to_str): Refactor as methods of go32_nat_target.
5464         (go32_target): Delete.
5465         (_initialize_go32_nat): Adjust to C++ification.
5466
5467         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5468         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5469         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5470         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5471         gnu_nat_target.
5472         (gnu_target): Delete.
5473         * gnu-nat.h (gnu_target): Delete.
5474         (gnu_nat_target): New class.
5475         * i386-gnu-nat.c (gnu_base_target): New.
5476         (i386_gnu_nat_target): New class.
5477         (the_i386_gnu_nat_target): New.
5478         (_initialize_i386gnu_nat): Adjust to C++ification.
5479
5480 2018-05-02  Pedro Alves  <palves@redhat.com>
5481
5482         * bfd-target.c (target_bfd_xclose): Rename to ...
5483         (target_bfd_close): ... this.
5484         (target_bfd_reopen): Adjust.
5485         * target.c (target_close): Remove references to to_xclose.
5486         * target.h (target_ops::to_xclose): Delete.
5487         (target_ops::to_close): Update comments.
5488
5489 2018-05-02  Pedro Alves  <palves@redhat.com>
5490
5491         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5492         "linux-nat.h".
5493         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5494         * inf-ptrace.c (inf_ptrace_register_u_offset)
5495         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5496         (inf_ptrace_store_register, inf_ptrace_store_registers)
5497         (inf_ptrace_trad_target): Move to ...
5498         * linux-nat-trad.c: ... this new file.
5499         * linux-nat-trad.h: New file.
5500         * linux-nat.c (linux_target_install_ops): Make extern.
5501         (linux_trad_target): Delete.
5502         * linux-nat.h (linux_trad_target): Delete declaration.
5503         (linux_target_install_ops): Declare.
5504         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5505         "linux-nat.h".
5506
5507 2018-05-02  Pedro Alves  <palves@redhat.com>
5508
5509         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5510         procfs_target/add_target here.
5511         * procfs.c (procfs_target): Make static.
5512         (_initialize_procfs): Call add_target here.
5513         * procfs.h (struct target_ops): Remove forward declaration.
5514         (procfs_target): Remove declaration.
5515         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5516
5517 2018-05-02  Pedro Alves  <palves@redhat.com>
5518
5519         * procfs.c (procfs_stopped_by_watchpoint)
5520         (procfs_insert_watchpoint, procfs_remove_watchpoint)
5521         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5522         Forward declare.
5523         (procfs_use_watchpoints): Delete, move contents...
5524         (procfs_target): ... here.
5525         * procfs.h (procfs_use_watchpoints): Delete declaration.
5526         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5527         procfs_use_watchpoints.
5528         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5529         procfs_use_watchpoints.
5530
5531 2018-05-02  Tom Tromey  <tom@tromey.com>
5532
5533         PR python/20084:
5534         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5535         and var_zuinteger_unlimited.
5536         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5537         and PARAM_ZUINTEGER_UNLIMITED.
5538         (set_parameter_value): Handle var_zuinteger and
5539         var_zuinteger_unlimited.
5540         (add_setshow_generic): Likewise.
5541         (parmpy_init): Likewise.
5542
5543 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
5544
5545         PR rust/23124
5546         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5547         pointer is not null before dereferencing it.
5548
5549 2018-04-30  Tom Tromey  <tom@tromey.com>
5550
5551         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5552         is_mi_like_p.
5553
5554 2018-04-30  Tom Tromey  <tom@tromey.com>
5555
5556         * breakpoint.c (mention): Remove use of is_mi_like_p.
5557         (print_mention_ranged_breakpoint): Likewise.
5558         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5559         of is_mi_like_p.
5560
5561 2018-04-30  Tom Tromey  <tom@tromey.com>
5562
5563         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5564
5565 2018-04-30  Tom Tromey  <tom@tromey.com>
5566
5567         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5568         (info_spu_event_command): Remove some uses of is_mi_like_p.
5569
5570 2018-04-30  Tom Tromey  <tom@tromey.com>
5571
5572         * python/py-framefilter.c (py_print_single_arg)
5573         (enumerate_locals, py_print_args, py_print_frame): Remove some
5574         uses of is_mi_like_p.
5575
5576 2018-04-30  Tom Tromey  <tom@tromey.com>
5577
5578         * ui-out.c: Update.
5579         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5580         * ui-out.h (ui_out::is_mi_like_p): Now const.
5581         (ui_out::do_is_mi_like_p): Now const.
5582         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5583
5584 2018-04-30  Tom Tromey  <tom@tromey.com>
5585
5586         * varobj.c (varobj_set_visualizer): Use new_reference.
5587         * python/python.c (gdbpy_decode_line): Use new_reference.
5588         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5589         new_reference.
5590
5591 2018-04-30  Tom Tromey  <tom@tromey.com>
5592
5593         * varobj.c (install_new_value): Use new_reference.
5594         * value.h (value_incref): Return void.  Swap intro comment with
5595         value_decref.
5596         * value.c (set_value_parent): Use new_reference.
5597         (value_incref): Return void.  Update intro comment.
5598         (release_value): Use new_reference.
5599         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5600
5601 2018-04-30  Tom Tromey  <tom@tromey.com>
5602
5603         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5604         * gdb_bfd.h (new_bfd_ref): Remove.
5605         (gdb_bfd_open): Update comment.
5606         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5607         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5608         (gdb_bfd_fdopenr): Use new_reference.
5609         * exec.c (exec_file_attach): Use new_reference.
5610
5611 2018-04-30  Tom Tromey  <tom@tromey.com>
5612
5613         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5614         method.
5615
5616 2018-04-30  Tom Tromey  <tom@tromey.com>
5617
5618         * jit.c (jit_read_code_entry): Use type_align.
5619         * i386-tdep.c (i386_gdbarch_init): Don't call
5620         set_gdbarch_long_long_align_bit.
5621         * gdbarch.sh: Remove long_long_align_bit.
5622         * gdbarch.c, gdbarch.h: Rebuild.
5623         * arc-tdep.c (arc_type_align): New function.
5624         (arc_gdbarch_init): Use arc_type_align.  Don't call
5625         set_gdbarch_long_long_align_bit.
5626
5627 2018-04-30  Tom Tromey  <tom@tromey.com>
5628
5629         * rust-lang.c (rust_type_alignment): Remove.
5630         (rust_composite_type): Use type_align.
5631
5632 2018-04-30  Tom Tromey  <tom@tromey.com>
5633
5634         * NEWS: Mention Type.align.
5635         * python/py-type.c (typy_get_alignof): New function.
5636         (type_object_getset): Add "alignof".
5637
5638 2018-04-30  Tom Tromey  <tom@tromey.com>
5639
5640         PR exp/17095:
5641         * NEWS: Update.
5642         * std-operator.def (UNOP_ALIGNOF): New operator.
5643         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5644         New.
5645         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5646         * c-lang.c (c_op_print_tab): Add alignof.
5647         * c-exp.y (ALIGNOF): New token.
5648         (exp): Add "ALIGNOF" production.
5649         (ident_tokens): Add _Alignof and alignof.
5650
5651 2018-04-30  Tom Tromey  <tom@tromey.com>
5652
5653         * i386-tdep.c (i386_type_align): New function.
5654         (i386_gdbarch_init): Update.
5655         * gdbarch.sh (type_align): New method.
5656         * gdbarch.c, gdbarch.h: Rebuild.
5657         * arch-utils.h (default_type_align): Declare.
5658         * arch-utils.c (default_type_align): New function.
5659         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5660         (struct type) <align_log2>: New field.
5661         <instance_flags>: Now a bitfield.
5662         (TYPE_RAW_ALIGN): New macro.
5663         (type_align, type_raw_align, set_type_align): Declare.
5664         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5665         functions.
5666         * dwarf2read.c (quirk_rust_enum): Set type alignment.
5667         (get_alignment, maybe_set_alignment): New functions.
5668         (read_structure_type, read_enumeration_type, read_array_type)
5669         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5670         (read_subrange_type, read_base_type): Set type alignment.
5671
5672 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
5673
5674         * dwarf2read.c (read_index_from_section): Use bool.
5675
5676 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
5677
5678         PR gdb/22950
5679         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5680         with #ifdef.
5681
5682 2018-04-29  John Reiser  <jreiser@BitWagon.com>
5683
5684         PR build/22873
5685         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5686         last step, and do it atomically.
5687
5688 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
5689
5690         * compile/compile-c-types.c (convert_int, convert_float):
5691         Update for C FE v1.
5692
5693 2018-04-27  Tom Tromey  <tom@tromey.com>
5694
5695         PR rust/22545:
5696         * rust-lang.c (rust_inclusive_range_type_p): New function.
5697         (rust_range): Handle inclusive ranges.
5698         (rust_compute_range): Likewise.
5699         * rust-exp.y (struct rust_op) <inclusive>: New field.
5700         (DOTDOTEQ): New constant.
5701         (range_expr): Add "..=" productions.
5702         (operator_tokens): Add "..=" token.
5703         (ast_range): Add "inclusive" parameter.
5704         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5705         ranges.
5706         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5707         bounds values.
5708         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5709         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5710         Update comments.
5711         * expprint.c (print_subexp_standard): Handle new bounds values.
5712         (dump_subexp_body_standard): Likewise.
5713
5714 2018-04-27  Tom Tromey  <tom@tromey.com>
5715
5716         * configure: Rebuild.
5717         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5718         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5719         "OVERRIDE".
5720         (class symbol_needs_eval_context): Likewise.
5721         * dwarf2read.c (mock_mapped_index::symbol_name_count)
5722         (mock_mapped_index::symbol_name_at): Use "override".  Remove
5723         "virtual".
5724         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5725         "override".
5726         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5727         * aarch64-tdep.c (instruction_reader::read): Use "override".
5728         (instruction_reader_test::read): Likewise.
5729         * arm-tdep.c (instruction_reader::read): Use "override".
5730         (instruction_reader_thumb::read): Likewise.
5731
5732 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
5733
5734         PR remote/9665
5735         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5736         instead of remote_send.
5737         (remote_send): Remove.
5738
5739 2018-04-26  Pedro Alves  <palves@redhat.com>
5740
5741         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5742         find_function_start_sal instead of find_pc_line.
5743
5744 2018-04-26  Pedro Alves  <palves@redhat.com>
5745
5746         * breakpoint.c (set_breakpoint_location_function): Handle
5747         mst_data_gnu_ifunc.
5748         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5749         * elfread.c (elf_symtab_read): Give data symbols with
5750         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5751         (elf_rel_plt_read): Update comment.
5752         * linespec.c (convert_linespec_to_sals): Handle
5753         mst_data_gnu_ifunc.
5754         (minsym_found): Handle mst_data_gnu_ifunc.
5755         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5756         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5757         * parse.c (find_minsym_type_and_address): Handle
5758         mst_data_gnu_ifunc.
5759         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5760         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5761         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5762         comment.
5763         <mst_data_gnu_ifunc>: New enumerator.
5764
5765 2018-04-26  Pedro Alves  <palves@redhat.com>
5766
5767         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5768         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
5769         'want_trampoline' parameter by a lookup_msym_prefer parameter.
5770         Handle it.
5771         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5772         (lookup_minimal_symbol_by_pc): Adjust.
5773         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5774         (lookup_solib_trampoline_symbol_by_pc): Adjust.
5775         * minsyms.h (lookup_msym_prefer): New enum.
5776         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5777         parameter by a lookup_msym_prefer parameter.
5778
5779 2018-04-26  Pedro Alves  <palves@redhat.com>
5780
5781         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5782         ends in "@plt" instead of looking at the symbol's section.
5783
5784 2018-04-26  Pedro Alves  <palves@redhat.com>
5785
5786         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
5787         all references.
5788         (find_pc_partial_function_gnu_ifunc): Rename to ...
5789         (find_pc_partial_function): ... this, and remove references to
5790         'is_gnu_ifunc_p'.
5791         (find_pc_partial_function): Delete old implementation.
5792         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5793
5794 2018-04-26  Pedro Alves  <palves@redhat.com>
5795
5796         * linespec.c (struct bound_minimal_symbol_search_key): New.
5797         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
5798         skip first line if we found a GNU ifunc minimal symbol by name.
5799         (compare_msymbols): Change parameters to work with a destructured
5800         lhs minsym.
5801         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5802         functions.
5803
5804 2018-04-26  Pedro Alves  <palves@redhat.com>
5805
5806         * breakpoint.c (set_breakpoint_location_function): Don't resolve
5807         ifunc targets here.  Instead, if we have an ifunc minsym, use its
5808         address/name.
5809         (add_location_to_breakpoint): Store the minsym and the objfile in
5810         the breakpoint location.
5811         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5812         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5813         Record the minsym in the sal.
5814         * symtab.h (symtab_and_line) <msymbol>: New field.
5815
5816 2018-04-26  Pedro Alves  <palves@redhat.com>
5817
5818         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5819         unless we actually resolved the ifunc.
5820
5821 2018-04-26  Pedro Alves  <palves@redhat.com>
5822
5823         * c-exp.y (variable production): Prefer ifunc minsyms over
5824         regular function symbols.
5825         * symtab.c (find_gnu_ifunc): New function.
5826         * minsyms.h (lookup_msym_prefer): New enum.
5827         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5828         parameter by a lookup_msym_prefer parameter.
5829         * symtab.h (find_gnu_ifunc): New declaration.
5830
5831 2018-04-26  Pedro Alves  <palves@redhat.com>
5832
5833         * blockframe.c (find_gnu_ifunc_target_type): New function.
5834         (find_function_type): New.
5835         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5836         return a value with a memory address.
5837         (eval_call): For calls to GNU ifunc functions, try to find the
5838         type of the target function from the type that the resolver
5839         returns.
5840         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5841         symbols.
5842         * infcall.c (find_function_return_type): Delete.
5843         (find_function_addr): Add 'function_type' parameter.  For calls to
5844         GNU ifunc functions, try to find the type of the target function
5845         from the type that the resolver returns, and return it via
5846         FUNCTION_TYPE.
5847         (call_function_by_hand_dummy): Adjust to use the function type
5848         returned by find_function_addr.
5849         (find_function_addr): Add 'function_type' parameter and move
5850         description here.
5851         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5852         declarations.
5853
5854 2018-04-26  Pedro Alves  <palves@redhat.com>
5855
5856         * c-exp.y (variable production): Skip finding an alias for ifunc
5857         symbols.
5858
5859 2018-04-26  Pedro Alves  <palves@redhat.com>
5860
5861         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5862
5863 2018-04-25  Pedro Alves  <palves@redhat.com>
5864
5865         * infcmd.c (kill_command): Print the pid as string, not the whole
5866         thread's ptid.  Add comment.  s/has been killed/killed/ in output
5867         message.
5868         * remote.c (remote_detach_1): Print the pid as string, not the
5869         whole thread's ptid.
5870
5871 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5872             Sergio Durigan Junior  <sergiodj@redhat.com>
5873             Pedro Alves  <palves@redhat.com>
5874
5875         * infcmd.c (kill_command): Print message when inferior has
5876         been killed.
5877         * inferior.c (print_inferior_events): Remove 'static'.  Set as
5878         '1'.
5879         (add_inferior): Improve message printed when
5880         'print_inferior_events' is on.
5881         (exit_inferior): Remove message printed when
5882         'print_inferior_events' is on.
5883         (detach_inferior): Improve message printed when
5884         'print_inferior_events' is on.
5885         (initialize_inferiors): Use 'add_inferior_silent' to set
5886         'current_inferior_'.
5887         * inferior.h (print_inferior_events): Declare here as
5888         'extern'.
5889         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5890         '[Detaching...]' messages when 'print_inferior_events' is on.
5891         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
5892         as prefix/suffix for messages.  Remove periods.  Fix erroneous
5893         'Detaching after fork from child...', replace it by '... from
5894         parent...'.
5895         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5896         prefix/suffix when printing 'Detaching...' messages.  Print
5897         them when 'print_inferior_events' is on.
5898         * remote.c (remote_detach_1): Print message when detaching
5899         from inferior and '!is_fork_parent'.
5900
5901 2018-04-24  Tom Tromey  <tom@tromey.com>
5902
5903         * cli-out.h: Reindent.
5904
5905 2018-04-24  Tom Tromey  <tom@tromey.com>
5906
5907         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5908         (cli_ui_out::do_field_string): Use fputs_filtered.
5909         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5910
5911 2018-04-23  Tom Tromey  <tom@tromey.com>
5912
5913         * guile/scm-frame.c (gdbscm_frame_read_var): Use
5914         gdb::unique_xmalloc_ptr.
5915
5916 2018-04-23  Tom Tromey  <tom@tromey.com>
5917
5918         * configure: Rebuild.
5919
5920 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
5921
5922         PR gdb/23095
5923         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5924         prepare_for_testing.  Set normal_bp to r_debug_state if target
5925         is bsd.
5926
5927 2018-04-21  Pedro Alves  <palves@redhat.com>
5928             Rajendra SY  <rajendra.sy@gmail.com>
5929
5930         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5931         * remote.c (extended_remote_attach): In all-stop mode, mark the
5932         thread as executing.
5933
5934 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5935
5936         * thread.c (thread_apply_all_command): Fix comment.
5937         (thread_command): Fix comment.
5938
5939 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
5940
5941         * common/tdesc.h (tdesc_create_feature): Remove xml filename
5942         parameter.
5943         * features/aarch64-core.c (create_feature_aarch64_core):
5944         Regenerate.
5945         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5946         Likewise.
5947         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5948         Likewise.
5949         * features/i386/32bit-avx512.c
5950         (create_feature_i386_32bit_avx512): Likewise.
5951         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5952         Likewise.
5953         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5954         Likewise.
5955         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5956         Likewise.
5957         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5958         Likewise.
5959         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5960         Likewise.
5961         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5962         Likewise.
5963         * features/i386/64bit-avx512.c
5964         (create_feature_i386_64bit_avx512): Likewise.
5965         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5966         Likewise.
5967         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5968         Likewise.
5969         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5970         Likewise.
5971         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5972         Likewise.
5973         * features/i386/64bit-segments.c
5974         (create_feature_i386_64bit_segments): Likewise.
5975         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5976         Likewise.
5977         * features/i386/x32-core.c
5978         (create_feature_i386_x32_core): Likewise.
5979         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5980         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5981         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5982         * target-descriptions.c: In generated code, don't pass xml
5983         filename.
5984
5985 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
5986
5987         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5988         (print_xml_feature::visit_post): Likewise.
5989         (print_xml_feature::visit): Likewise.
5990         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5991         (print_xml_feature): Add new class.
5992         * regformats/regdat.sh: Null xmltarget on feature targets.
5993         * target-descriptions.c (struct target_desc): Add xmltarget.
5994         (maintenance_check_tdesc_xml_convert): Add unittest function.
5995         (tdesc_get_features_xml): Add function to get xml.
5996         (maintenance_check_xml_descriptions): Test xml generation.
5997         * xml-tdesc.c (string_read_description_xml): Add function.
5998         * xml-tdesc.h (string_read_description_xml): Add declaration.
5999
6000 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6001
6002         * features/Makefile: Add feature marker to targets with new style
6003         target descriptions.
6004         * regformats/aarch64.dat: Regenerate.
6005         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6006         * regformats/i386/amd64-avx-linux.dat: Likewise.
6007         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6008         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6009         * regformats/i386/amd64-linux.dat: Likewise.
6010         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6011         * regformats/i386/amd64.dat: Likewise.
6012         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6013         * regformats/i386/i386-avx-linux.dat: Likewise.
6014         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6015         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6016         * regformats/i386/i386-linux.dat: Likewise.
6017         * regformats/i386/i386-mmx-linux.dat: Likewise.
6018         * regformats/i386/i386-mpx-linux.dat: Likewise.
6019         * regformats/i386/i386.dat: Likewise.
6020         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6021         * regformats/i386/x32-avx-linux.dat: Likewise.
6022         * regformats/i386/x32-linux.dat: Likewise.
6023         * regformats/tic6x-c62x-linux.dat: Likewise.
6024         * regformats/tic6x-c64x-linux.dat: Likewise.
6025         * regformats/tic6x-c64xp-linux.dat: Likewise.
6026         * regformats/regdat.sh: Parse feature marker.
6027
6028 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6029
6030         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6031         (tdesc_osabi_name): Likewise.
6032         * target-descriptions.c (tdesc_architecture_name): Add new
6033         function.
6034         (tdesc_osabi_name): Likewise.
6035
6036 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6037
6038         * common/tdesc.c (tdesc_predefined_type): Move to here.
6039         (tdesc_named_type): Likewise.
6040         (tdesc_create_vector): Likewise.
6041         (tdesc_create_struct): Likewise.
6042         (tdesc_set_struct_size): Likewise.
6043         (tdesc_create_union): Likewise.
6044         (tdesc_create_flags): Likewise.
6045         (tdesc_create_enum): Likewise.
6046         (tdesc_add_field): Likewise.
6047         (tdesc_add_typed_bitfield): Likewise.
6048         (tdesc_add_bitfield): Likewise.
6049         (tdesc_add_flag): Likewise.
6050         (tdesc_add_enum_value): Likewise.
6051         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6052         (struct tdesc_type_vector): Likewise.
6053         (struct tdesc_type_field): Likewise.
6054         (struct tdesc_type_with_fields): Likewise.
6055         (tdesc_create_enum): Add declaration.
6056         (tdesc_add_typed_bitfield): Likewise.
6057         (tdesc_add_enum_value): Likewise.
6058         * target-descriptions.c (tdesc_type_field): Move from here.
6059         (tdesc_type_builtin): Likewise.
6060         (tdesc_type_vector): Likewise.
6061         (tdesc_type_with_fields): Likewise.
6062         (tdesc_predefined_types): Likewise.
6063         (tdesc_named_type): Likewise.
6064         (tdesc_create_vector): Likewise.
6065         (tdesc_create_struct): Likewise.
6066         (tdesc_set_struct_size): Likewise.
6067         (tdesc_create_union): Likewise.
6068         (tdesc_create_flags): Likewise.
6069         (tdesc_create_enum): Likewise.
6070         (tdesc_add_field): Likewise.
6071         (tdesc_add_typed_bitfield): Likewise.
6072         (tdesc_add_bitfield): Likewise.
6073         (tdesc_add_flag): Likewise.
6074         (tdesc_add_enum_value): Likewise.
6075         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6076         (tdesc_add_typed_bitfield): Likewise.
6077         (tdesc_add_enum_value): Likewise.
6078
6079 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6080
6081         * common/tdesc.c (tdesc_feature::accept): Move to here.
6082         (tdesc_feature::operator==): Likewise.
6083         (tdesc_create_reg): Likewise.
6084         * common/tdesc.h (tdesc_type_kind): Likewise.
6085         (struct tdesc_type): Likewise.
6086         (struct tdesc_feature): Likewise.
6087         * regformats/regdat.sh: Create a feature.
6088         * target-descriptions.c (tdesc_type_kind): Move from here.
6089         (tdesc_type): Likewise.
6090         (tdesc_type_up): Likewise.
6091         (tdesc_feature): Likewise.
6092         (tdesc_create_reg): Likewise.
6093
6094 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6095
6096         * Makefile.in: Add arch/tdesc.c
6097         * common/tdesc.c: New file.
6098         * common/tdesc.h (tdesc_element_visitor): Move to here.
6099         (tdesc_element): Likewise.
6100         (tdesc_reg): Likewise.
6101         (tdesc_reg_up): Likewise.
6102         * regformats/regdef.h (reg): Add offset to constructors.
6103         * target-descriptions.c (tdesc_element_visitor): Move from here.
6104         (tdesc_element): Likewise.
6105         (tdesc_reg): Likewise.
6106         (tdesc_reg_up): Likewise.
6107
6108 2018-04-17  Tom Tromey  <tom@tromey.com>
6109
6110         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6111         discriminant field.
6112
6113 2018-04-17  Tom Tromey  <tom@tromey.com>
6114
6115         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6116
6117 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6118
6119         * symtab.c (print_symbol_info): Skip printing filename and line
6120         number when `last' is NULL.
6121         (symtab_symbol_info): Use empty string instead of NULL for first
6122         invocation of print_symbol_info.
6123         (rbreak_command): Pass NULL to `last' parameter of
6124         print_symbol_info.
6125
6126 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
6127
6128         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6129         instead of nullptr.
6130
6131 2018-04-16  Pedro Alves  <palves@redhat.com>
6132
6133         * MAINTAINERS (sh): Remove.
6134         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6135         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6136         (ALLDEPFILES): Remove sh64-tdep.c.
6137         * NEWS: Mentions that support for SH-5/SH64 is removed.
6138         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6139         (sh*-*-openbsd*): Ditto.
6140         (sh64-*-elf*): Remove.
6141         (sh*): Remove.
6142         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6143         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6144         * sh-tdep.c: No longer include "sh64-tdep.h".
6145         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6146         * sh64-tdep.c, sh64-tdep.h: Remove files.
6147
6148 2018-04-16  Pedro Alves  <palves@redhat.com>
6149
6150         * MAINTAINERS: Remove m88k.
6151         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6152         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6153         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6154         * NEWS: Mention that support for m88k was removed.
6155         * configure.host (m88*-*-*): Remove support.
6156         * configure.nat (m88k-*-*): Remove support.
6157         * configure.tgt (m88*-*-openbsd*): Remove.
6158         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6159
6160 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
6161
6162         * configure.tgt (x86_tobjs): New variable.
6163         (amd64_tobjs, i386_tobjs): Use it.
6164
6165 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6166
6167         * symtab.c (print_symbol_info): Precede the symbol definition by
6168         the line number when available.
6169         * NEWS: Advertise this enhancement.
6170
6171 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6172
6173         * NEWS (New options): announce set/show record btrace cpu.
6174         * btrace.c: Include record-btrace.h.
6175         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6176         the vendor is unknown.
6177         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
6178         Maybe overwrite the btrace configuration's cpu.
6179         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
6180         (btrace_fetch): Add cpu parameter.  Update callers.
6181         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6182         Maybe overwrite the btrace configuration's cpu.  Skip enabling
6183         errata workarounds if the vendor is unknown.
6184         * python/py-record-btrace.c: Include record-btrace.h.
6185         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6186         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6187         * record-btrace.c (record_btrace_cpu_state_kind): New.
6188         (record_btrace_cpu): New.
6189         (set_record_btrace_cpu_cmdlist): New.
6190         (record_btrace_get_cpu): New.
6191         (require_btrace_thread, record_btrace_info)
6192         (record_btrace_resume_thread): Call record_btrace_get_cpu.
6193         (cmd_set_record_btrace_cpu_none): New.
6194         (cmd_set_record_btrace_cpu_auto): New.
6195         (cmd_set_record_btrace_cpu): New.
6196         (cmd_show_record_btrace_cpu): New.
6197         (_initialize_record_btrace): Initialize set/show record btrace cpu
6198         commands.
6199         * record-btrace.h (record_btrace_get_cpu): New.
6200
6201 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6202
6203         * record.c (set_record_command): Fix typo in message.
6204
6205 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6206
6207         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6208
6209 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6210
6211         * infrun.c (process_event_stop_test): Call
6212         gdbarch_in_indirect_branch_thunk.
6213         * gdbarch.sh (in_indirect_branch_thunk): New.
6214         * gdbarch.c: Regenerated.
6215         * gdbarch.h: Regenerated.
6216         * x86-tdep.h: New.
6217         * x86-tdep.c: New.
6218         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6219         (HFILES_NO_SRCDIR): Add x86-tdep.h.
6220         (ALLDEPFILES): Add x86-tdep.c.
6221         * arch-utils.h (default_in_indirect_branch_thunk): New.
6222         * arch-utils.c (default_in_indirect_branch_thunk): New.
6223         * i386-tdep: Include x86-tdep.h.
6224         (i386_in_indirect_branch_thunk): New.
6225         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6226         function.
6227         * amd64-tdep: Include x86-tdep.h.
6228         (amd64_in_indirect_branch_thunk): New.
6229         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6230
6231 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6232
6233         PR gdb/23053
6234         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6235         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6236         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6237         regression.
6238
6239 2018-04-12  Tom Tromey  <tom@tromey.com>
6240
6241         * rust-lang.c (rust_print_struct_def): Remove univariant code.
6242         (rust_evaluate_subexp): Likewise.
6243
6244 2018-04-12  Pedro Alves  <palves@redhat.com>
6245
6246         * procfs.c (procfs_detach): Make forward declaration's prototype
6247         match definition's protototype.
6248         (proc_get_LDT_entry): Remove stale do_cleanups call.
6249
6250 2018-04-12  Pedro Alves  <palves@redhat.com>
6251
6252         * target.h (target_ops::to_has_exited): Delete.
6253         (target_has_exited): Delete.
6254         * target-delegates.c: Regenerate.
6255
6256 2018-04-11  Pedro Alves  <palves@redhat.com>
6257
6258         * target.c (fileio_fh_t::t): Add comment.
6259         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6260         (target_fileio_close): Handle a NULL target.
6261         (invalidate_fileio_fh): New.
6262         (target_close): Call it.
6263         * remote.c (remote_hostio_send_command): No longer check whether
6264         remote_desc is open.
6265
6266 2018-04-11  Pedro Alves  <palves@redhat.com>
6267
6268         * target.c (fileio_fh_t): Make it a named struct instead of a
6269         typedef.
6270         (fileio_fh_t::is_closed): New method.
6271         (DEF_VEC_O (fileio_fh_t)): Remove.
6272         (fileio_fhandles): Now a std::vector.
6273         (is_closed_fileio_fh): Delete.
6274         (acquire_fileio_fd): Adjust.  Rename parameters.
6275         (release_fileio_fd): Adjust.
6276         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6277         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6278         (target_fileio_close): Adjust.
6279
6280 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
6281
6282         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6283         index.
6284
6285 2018-04-10  Pedro Alves  <palves@redhat.com>
6286
6287         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6288         (scoped_finish_thread_state): New class.
6289         * infcmd.c (run_command_1): Use it instead of finish_thread_state
6290         cleanup.
6291         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6292         (fetch_inferior_event, normal_stop): Likewise.
6293         * thread.c (finish_thread_state_cleanup): Delete.
6294
6295 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6296             Pedro Alves  <palves@redhat.com>
6297
6298         * value.c: Include "selftest.h" and "common/array-view.h".
6299         (struct range) <operator ==>: New.
6300         (test_ranges_contain): New.
6301         (check_ranges_vector): New.
6302         (test_insert_into_bit_range_vector): New.
6303         (_initialize_values): Register selftests.
6304         * common/array-view.h (operator==, operator!=): New.
6305
6306 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6307
6308         * common/gdb_vecs.h (unordered_remove): Add overload that takes
6309         an iterator.
6310         * inline-frame.c: Include <algorithm>.
6311         (struct inline_state): Add constructor.
6312         (inline_state_s): Remove.
6313         (DEF_VEC_O(inline_state_s)): Remove.
6314         (inline_states): Change type to std::vector.
6315         (find_inline_frame_state): Adjust to std::vector.
6316         (allocate_inline_frame_state): Remove.
6317         (clear_inline_frame_state): Adjust to std::vector.
6318         (skip_inline_frames): Adjust to std::vector.
6319
6320 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6321
6322         * tracepoint.h (struct trace_state_variable): Add constructor.
6323         <name>: Change type to std::string.
6324         * tracepoint.c (tsv_s): Remove.
6325         (DEF_VEC_O(tsv_s)): Remove.
6326         (tvariables): Change to std::vector.
6327         (create_trace_state_variable): Adjust to std::vector.
6328         (find_trace_state_variable): Likewise.
6329         (find_trace_state_variable_by_number): Likewise.
6330         (delete_trace_state_variable): Likewise.
6331         (trace_variable_command): Adjust to std::string.
6332         (delete_trace_variable_command): Likewise.
6333         (tvariables_info_1): Adjust to std::vector.
6334         (save_trace_state_variables): Likewise.
6335         (start_tracing): Likewise.
6336         (merge_uploaded_trace_state_variables): Adjust to std::vector
6337         and std::string.
6338         * target.h (struct target_ops)
6339         <to_download_trace_state_variable>: Pass reference to
6340         trace_state_variable.
6341         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6342         * target-delegates.c: Re-generate.
6343         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6344         (mi_tsv_deleted): Likewise.
6345         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6346         * remote.c (remote_download_trace_state_variable): Change
6347         pointer to reference and adjust.
6348         * make-target-delegates (parse_argtypes): Handle references.
6349         (write_function_header): Likewise.
6350         (munge_type): Likewise.
6351
6352 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6353
6354         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6355         string_view-selftests.c.
6356         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6357         testsuite.
6358         * unittests/basic_string_view/cons/char/1.cc: Likewise.
6359         * unittests/basic_string_view/cons/char/2.cc: Likewise.
6360         * unittests/basic_string_view/cons/char/3.cc: Likewise.
6361         * unittests/basic_string_view/element_access/char/1.cc:
6362         Likewise.
6363         * unittests/basic_string_view/element_access/char/empty.cc:
6364         Likewise.
6365         * unittests/basic_string_view/element_access/char/front_back.cc:
6366         Likewise.
6367         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6368         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6369         Likewise.
6370         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6371         Likewise.
6372         * unittests/basic_string_view/modifiers/swap/char/1.cc:
6373         Likewise.
6374         * unittests/basic_string_view/operations/compare/char/1.cc:
6375         Likewise.
6376         * unittests/basic_string_view/operations/compare/char/13650.cc:
6377         Likewise.
6378         * unittests/basic_string_view/operations/copy/char/1.cc:
6379         Likewise.
6380         * unittests/basic_string_view/operations/data/char/1.cc:
6381         Likewise.
6382         * unittests/basic_string_view/operations/find/char/1.cc:
6383         Likewise.
6384         * unittests/basic_string_view/operations/find/char/2.cc:
6385         Likewise.
6386         * unittests/basic_string_view/operations/find/char/3.cc:
6387         Likewise.
6388         * unittests/basic_string_view/operations/find/char/4.cc:
6389         Likewise.
6390         * unittests/basic_string_view/operations/rfind/char/1.cc:
6391         Likewise.
6392         * unittests/basic_string_view/operations/rfind/char/2.cc:
6393         Likewise.
6394         * unittests/basic_string_view/operations/rfind/char/3.cc:
6395         Likewise.
6396         * unittests/basic_string_view/operations/substr/char/1.cc:
6397         Likewise.
6398         * unittests/basic_string_view/operators/char/2.cc: Likewise.
6399         * unittests/string_view-selftests.c: New file.
6400
6401 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6402
6403         * unittests/basic_string_view/capacity/1.cc: New file.
6404         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6405         * unittests/basic_string_view/cons/char/1.cc: New file.
6406         * unittests/basic_string_view/cons/char/2.cc: New file.
6407         * unittests/basic_string_view/cons/char/3.cc: New file.
6408         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6409         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6410         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6411         * unittests/basic_string_view/element_access/char/1.cc: New file.
6412         * unittests/basic_string_view/element_access/char/2.cc: New file.
6413         * unittests/basic_string_view/element_access/char/empty.cc: New file.
6414         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6415         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6416         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6417         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6418         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6419         * unittests/basic_string_view/include.cc: New file.
6420         * unittests/basic_string_view/inserters/char/1.cc: New file.
6421         * unittests/basic_string_view/inserters/char/2.cc: New file.
6422         * unittests/basic_string_view/inserters/char/3.cc: New file.
6423         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6424         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6425         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6426         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6427         * unittests/basic_string_view/literals/types.cc: New file.
6428         * unittests/basic_string_view/literals/values.cc: New file.
6429         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6430         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6431         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6432         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6433         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6434         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6435         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6436         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6437         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6438         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6439         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6440         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6441         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6442         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6443         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6444         * unittests/basic_string_view/operations/data/char/1.cc: New file.
6445         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6446         * unittests/basic_string_view/operations/find/char/1.cc: New file.
6447         * unittests/basic_string_view/operations/find/char/2.cc: New file.
6448         * unittests/basic_string_view/operations/find/char/3.cc: New file.
6449         * unittests/basic_string_view/operations/find/char/4.cc: New file.
6450         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6451         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6452         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6453         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6454         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6455         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6456         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6457         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6458         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6459         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6460         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6461         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6462         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6463         * unittests/basic_string_view/operators/char/2.cc: New file.
6464         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6465         * unittests/basic_string_view/range_access/char/1.cc: New file.
6466         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6467         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6468         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6469         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6470         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6471         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6472         * unittests/basic_string_view/requirements/typedefs.cc: New file.
6473         * unittests/basic_string_view/typedefs.cc: New file.
6474         * unittests/basic_string_view/types/1.cc: New file.
6475
6476 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6477
6478         * common/gdb_string_view.h: Remove libstdc++ implementation
6479         details, adjust to gdb reality.
6480         * common/gdb_string_view.tcc: Likewise.
6481         * cli/cli-script.c (struct string_view): Remove.
6482         (user_args) <m_args>: Change element type to gdb::string_view.
6483         (user_args::insert_args): Adjust.
6484
6485 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6486
6487         * common/gdb_string_view.h: New file.
6488         * common/gdb_string_view.tcc: New file.
6489
6490 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6491
6492         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6493         * configure: Re-generate.
6494
6495 2018-04-09  Pedro Alves  <palves@redhat.com>
6496
6497         * gdbarch.sh: Include "observable.h" instead of "observer.h".
6498         (set_target_gdbarch): Call
6499         gdb::observers::architecture_changed.notify instead of
6500         observer_notify_architecture_changed.
6501
6502 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6503
6504         * tracepoint.c (struct current_traceframe_cleanup): Remove.
6505         (do_restore_current_traceframe_cleanup): Remove.
6506         (restore_current_traceframe_cleanup_dtor): Remove.
6507         (make_cleanup_restore_current_traceframe): Remove.
6508         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6509         New.
6510         * tracepoint.h (struct scoped_restore_current_traceframe): New.
6511         * infrun.c (fetch_inferior_event): Use
6512         scoped_restore_current_traceframe.
6513
6514 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6515
6516         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6517         Remove.
6518         <n_allocated_type_units>: Remove.
6519         <all_type_units>: Change to std::vector.
6520         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6521         to std::vector change.
6522         (dwarf2_per_objfile::get_cutu): Likewise.
6523         (dwarf2_per_objfile::get_tu): Likewise.
6524         (create_signatured_type_table_from_index): Likewise.
6525         (create_signatured_type_table_from_debug_names): Likewise.
6526         (dw2_symtab_iter_next): Likewise.
6527         (dw2_print_stats): Likewise.
6528         (dw2_expand_all_symtabs): Likewise.
6529         (dw2_expand_marked_cus): Likewise.
6530         (dw2_debug_names_iterator::next): Likewise.
6531         (dwarf2_initialize_objfile): Likewise.
6532         (add_signatured_type_cu_to_table): Likewise.
6533         (create_all_type_units): Likewise.
6534         (add_type_unit): Likewise.
6535         (struct tu_abbrev_offset): Add constructor.
6536         (build_type_psymtabs_1): Adjust to std::vector change.
6537         (print_tu_stats): Likewise.
6538         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6539         (write_debug_names): Likewise.
6540
6541 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6542
6543         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6544         Make an std::vector.
6545         <n_comp_units>: Remove.
6546         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6547         to std::vector change.
6548         (dwarf2_per_objfile::get_cutu): Likewise.
6549         (dwarf2_per_objfile::get_cu): Likewise.
6550         (create_cus_from_index): Likewise.
6551         (create_addrmap_from_index): Likewise.
6552         (create_addrmap_from_aranges): Likewise.
6553         (dwarf2_read_index): Likewise.
6554         (dw2_find_last_source_symtab): Likewise.
6555         (dw2_map_symtabs_matching_filename): Likewise.
6556         (dw2_symtab_iter_next): Likewise.
6557         (dw2_print_stats): Likewise.
6558         (dw2_expand_all_symtabs): Likewise.
6559         (dw2_expand_symtabs_with_fullname): Likewise.
6560         (dw2_expand_marked_cus): Likewise.
6561         (dw2_map_symbol_filenames): Likewise.
6562         (create_cus_from_debug_names): Likewise.
6563         (dwarf2_read_debug_names): Likewise.
6564         (dw2_debug_names_iterator::next): Likewise.
6565         (dwarf2_initialize_objfile): Likewise.
6566         (set_partial_user): Likewise.
6567         (dwarf2_build_psymtabs_hard): Likewise.
6568         (read_comp_units_from_section): Remove arguments, adjust to
6569         std::vector change.
6570         (create_all_comp_units): Adjust to std::vector and
6571         read_comp_units_from_section changes.
6572         (dwarf2_find_containing_comp_unit): Adjust to std::vector
6573         change.
6574         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6575         (psyms_seen_size): Likewise.
6576         (write_gdbindex): Likewise.
6577         (write_debug_names): Likewise.
6578
6579 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6580
6581         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6582         with dwarf2_per_objfile.
6583         (create_cus_from_index): Likewise.
6584         (create_signatured_type_table_from_index): Likewise.
6585         (dwarf2_read_index): Likewise.
6586         (dwarf2_initialize_objfile): Likewise.
6587         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
6588         per_cu rather than get_dwarf2_per_objfile.
6589
6590 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6591
6592         * dwarf2read.h (struct signatured_type): Forward declare.
6593         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6594         New methods.
6595         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6596         (dw2_get_cutu): ...this.
6597         (dwarf2_per_objfile::get_cu): Rename from...
6598         (dw2_get_cu): ...this.
6599         (dwarf2_per_objfile::get_tu): New.
6600         (create_addrmap_from_index): Adjust.
6601         (create_addrmap_from_aranges): Adjust.
6602         (dw2_find_last_source_symtab): Adjust.
6603         (dw2_map_symtabs_matching_filename): Adjust.
6604         (dw2_symtab_iter_next): Adjust.
6605         (dw2_print_stats): Adjust.
6606         (dw2_expand_all_symtabs): Adjust.
6607         (dw2_expand_symtabs_with_fullname): Adjust.
6608         (dw2_expand_marked_cus): Adjust.
6609         (dw_expand_symtabs_matching_file_matcher): Adjust.
6610         (dw2_map_symbol_filenames): Adjust.
6611         (dw2_debug_names_iterator::next): Adjust.
6612         (dwarf2_initialize_objfile): Adjust.
6613         (set_partial_user): Adjust.
6614         (dwarf2_build_psymtabs_hard): Adjust.
6615
6616 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6617
6618         * dwarf2read.c (create_signatured_type_table_from_debug_names):
6619         Remove unused variables.
6620         (dw2_map_symtabs_matching_filename): Likewise.
6621         (dwarf2_record_block_ranges): Likewise.
6622         (dwarf2_read_addr_index): Likewise.
6623         (follow_die_offset): Likewise.
6624
6625 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6626
6627         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6628         to symbol_file_add_main.
6629
6630 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6631
6632         PR mi/22299
6633         * mi/mi-console.c (do_fputc_async_safe): New.
6634         (mi_console_file::write_async_safe): New.
6635         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6636         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6637         New.
6638         * ui-file.c (ui_file::putstrn): Adjust call to
6639         fputstrn_unfiltered.
6640         * utils.c (printchar): Replace do_fputs and do_fprintf
6641         parameters by do_fputc.
6642         (fputstr_filtered): Adjust call to printchar.
6643         (fputstr_unfiltered): Likewise.
6644         (fputstrn_filtered): Likewise.
6645         (fputstrn_unfiltered): Add do_fputc parameter, pass to
6646         printchar.
6647         * utils.h (do_fputc_ftype): New typedef.
6648         (fputstrn_unfiltered): Add do_fputc parameter.
6649
6650 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
6651
6652         * regformats/i386/i386-avx.dat: Remove.
6653
6654 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6655
6656         PR gdb/22979
6657         * amd64-tdep.c (amd64_none_init_abi): New function.
6658         (amd64_x32_none_init_abi): New function.
6659         (_initialize_amd64_tdep): Register handlers for x86-64 and
6660         x64_32 with GDB_OSABI_NONE.
6661         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6662         GDB_OSABI_NONE osabi.
6663
6664 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6665
6666         PR gdb/22980
6667         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6668         GDB_OSABI_NONE.
6669         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6670         * osabi.c (gdb_osabi_names): Add "unknown" entry.
6671
6672 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6673
6674         * common/byte-vector.h (char_vector): New type.
6675         * target.h (target_read_alloc): Return
6676         gdb::optional<byte_vector>.
6677         (target_read_stralloc): Return gdb::optional<char_vector>.
6678         (target_get_osdata): Return gdb::optional<char_vector>.
6679         * target.c (target_read_alloc_1): Templatize.  Replacement
6680         manual memory management with vector.
6681         (target_read_alloc): Change return type, adjust.
6682         (target_read_stralloc): Change return type, adjust.
6683         (target_get_osdata): Change return type, adjust.
6684         * auxv.c (struct auxv_info) <length>: Remove.
6685         <data>: Change type to gdb::optional<byte_vector>.
6686         (auxv_inferior_data_cleanup): Free auxv_info with delete.
6687         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6688         (target_auxv_search): Adjust.
6689         (fprint_target_auxv): Adjust.
6690         * avr-tdep.c (avr_io_reg_read_command): Adjust.
6691         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6692         (linux_make_corefile_notes): Adjust.
6693         * osdata.c (get_osdata): Adjust.
6694         * remote.c (remote_get_threads_with_qxfer): Adjust.
6695         (remote_memory_map): Adjust.
6696         (remote_traceframe_info): Adjust.
6697         (btrace_read_config): Adjust.
6698         (remote_read_btrace): Adjust.
6699         (remote_pid_to_exec_file): Adjust.
6700         * solib-aix.c (solib_aix_get_library_list): Adjust.
6701         * solib-dsbt.c (decode_loadmap): Don't free buf.
6702         (dsbt_get_initial_loadmaps): Adjust.
6703         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6704         * solib-target.c (solib_target_current_sos): Adjust.
6705         * tracepoint.c (sdata_make_value): Adjust.
6706         * xml-support.c (xinclude_start_include): Adjust.
6707         (xml_fetch_content_from_file): Adjust.
6708         * xml-support.h (xml_fetch_another): Change return type.
6709         (xml_fetch_content_from_file): Change return type.
6710         * xml-syscall.c (xml_init_syscalls_info): Adjust.
6711         * xml-tdesc.c (file_read_description_xml): Adjust.
6712         (fetch_available_features_from_target): Change return type.
6713         (target_fetch_description_xml): Adjust.
6714         (target_read_description_xml): Adjust.
6715
6716 2018-04-06  Tom Tromey  <tom@tromey.com>
6717
6718         * value.c (~value): Update.
6719         (struct value) <contents>: Now unique_xmalloc_ptr.
6720         (value_contents_bits_eq, allocate_value_contents)
6721         (value_contents_raw, value_contents_all_raw)
6722         (value_contents_for_printing, value_contents_for_printing_const)
6723         (set_value_enclosing_type): Update.
6724
6725 2018-04-06  Tom Tromey  <tom@tromey.com>
6726
6727         * value.c (range_s): Remove typedef, VEC.
6728         (struct range): Add operator<.
6729         (range_lessthan): Remove.
6730         (ranges_contain): Change type.
6731         (~value): Update.
6732         (struct value) <unavailable, optimized_out>: Now std::vector.
6733         (value_entirely_available)
6734         (value_entirely_covered_by_range_vector)
6735         (value_entirely_unavailable, value_entirely_optimized_out):
6736         Update.
6737         (insert_into_bit_range_vector): Change argument type.
6738         (find_first_range_overlap): Likewise.
6739         (struct ranges_and_idx, value_contents_bits_eq)
6740         (require_not_optimized_out, require_available): Update.
6741         (ranges_copy_adjusted): Change argument types.
6742         (value_optimized_out, value_copy, value_fetch_lazy): Update.
6743
6744 2018-04-06  Tom Tromey  <tom@tromey.com>
6745
6746         * value.c (~value): Update.
6747         (struct value) <parent>: Now a value_ref_ptr.
6748         (value_parent, set_value_parent, value_address, value_copy):
6749         Update.
6750
6751 2018-04-06  Tom Tromey  <tom@tromey.com>
6752
6753         * value.c (struct value): Add constructor, destructor, and member
6754         initializers.
6755         (allocate_value_lazy, value_decref): Update.
6756
6757 2018-04-06  Tom Tromey  <tom@tromey.com>
6758
6759         * value.c (struct value) <released, next>: Remove.
6760         (all_values): Now a std::vector.
6761         (allocate_value_lazy): Update.
6762         (value_next): Remove.
6763         (value_mark, value_free_to_mark, release_value)
6764         (value_release_to_mark): Update.
6765
6766 2018-04-06  Tom Tromey  <tom@tromey.com>
6767
6768         * value.h (fetch_subexp_value, value_release_to_mark): Update.
6769         (free_value_chain): Remove.
6770         * value.c (free_value_chain): Remove.
6771         (value_release_to_mark): Return a std::vector.
6772         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6773         std::vector.
6774         (check_condition): Update.
6775         * eval.c (fetch_subexp_value): Change "val_chain" to a
6776         std::vector.
6777         * breakpoint.c (update_watchpoint): Update.
6778         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6779
6780 2018-04-06  Tom Tromey  <tom@tromey.com>
6781
6782         * value.h (free_all_values): Remove.
6783         * value.c (free_all_values): Remove.
6784
6785 2018-04-06  Tom Tromey  <tom@tromey.com>
6786
6787         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6788         (value_history_chain, value_history_count): Remove.
6789         (value_history): New global.
6790         (record_latest_value, access_value_history, show_values)
6791         (preserve_values): Update.
6792
6793 2018-04-06  Tom Tromey  <tom@tromey.com>
6794
6795         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6796         * varobj.c (varobj_set_display_format, varobj_set_value)
6797         (install_default_visualizer, construct_visualizer)
6798         (install_new_value, ~varobj, varobj_get_value_type)
6799         (my_value_of_variable, varobj_editable_p): Update.
6800         * c-varobj.c (c_describe_child, c_value_of_variable)
6801         (cplus_number_of_children, cplus_describe_child): Update.
6802         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6803         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6804         (ada_value_of_variable, ada_value_is_changeable_p): Update.
6805
6806 2018-04-06  Tom Tromey  <tom@tromey.com>
6807
6808         * printcmd.c (last_examine_address): Change type to
6809         value_ref_ptr.
6810         (do_examine, x_command): Update.
6811
6812 2018-04-06  Tom Tromey  <tom@tromey.com>
6813
6814         * value.c (release_value): Update.
6815         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6816         (struct bpstats) <val>: Now a value_ref_ptr.
6817         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6818         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6819         (~watchpoint, print_it_watchpoint, watch_command_1)
6820         (invalidate_bp_value_on_memory_change): Update.
6821
6822 2018-04-06  Tom Tromey  <tom@tromey.com>
6823
6824         * varobj.c (varobj_clear_saved_item)
6825         (update_dynamic_varobj_children, install_new_value, ~varobj):
6826         Update.
6827         * value.h (value_incref): Move declaration earlier.
6828         (value_decref): Rename from value_free.
6829         (struct value_ref_policy): New.
6830         (value_ref_ptr): New typedef.
6831         (struct value_deleter): Remove.
6832         (gdb_value_up): Remove typedef.
6833         (release_value): Change return type.
6834         (release_value_or_incref): Remove.
6835         * value.c (set_value_parent): Update.
6836         (value_incref): Change return type.
6837         (value_decref): Rename from value_free.
6838         (value_free_to_mark, free_all_values, free_value_chain): Update.
6839         (release_value): Return value_ref_ptr.
6840         (release_value_or_incref): Remove.
6841         (record_latest_value, set_internalvar, clear_internalvar):
6842         Update.
6843         * stack.c (info_frame_command): Don't call value_free.
6844         * python/py-value.c (valpy_dealloc, valpy_new)
6845         (value_to_value_object): Update.
6846         * printcmd.c (do_examine): Update.
6847         * opencl-lang.c (lval_func_free_closure): Update.
6848         * mi/mi-main.c (register_changed_p): Don't call value_free.
6849         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6850         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6851         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6852         value_free.
6853         * guile/scm-value.c (vlscm_free_value_smob)
6854         (vlscm_scm_from_value): Update.
6855         * frame.c (frame_register_unwind, frame_unwind_register_signed)
6856         (frame_unwind_register_unsigned, get_frame_register_bytes)
6857         (put_frame_register_bytes): Don't call value_free.
6858         * findvar.c (address_from_register): Don't call value_free.
6859         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6860         * dwarf2loc.c (entry_data_value_free_closure)
6861         (value_of_dwarf_reg_entry, free_pieced_value_closure)
6862         (dwarf2_evaluate_loc_desc_full): Update.
6863         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6864         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6865         (~watchpoint, watch_command_1)
6866         (invalidate_bp_value_on_memory_change): Update.
6867         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6868
6869 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
6870
6871         PR gdb/23022
6872         * warning.m4: Add -Wno-error=deprecated-register.
6873         * configure: Re-generate.
6874
6875 2018-04-05  Tom Tromey  <tom@tromey.com>
6876
6877         * linespec.h: Remove include of "vec.h".
6878
6879 2018-04-05  Tom Tromey  <tom@tromey.com>
6880
6881         * linespec.c (typep): Remove typedef.
6882         (find_methods, find_superclass_methods): Take a std::vector.
6883         (find_method): Use std::vector.
6884
6885 2018-04-05  Tom Tromey  <tom@tromey.com>
6886
6887         * utils.c (compare_strings): Remove.
6888         * utils.h (compare_strings): Remove.
6889         * objc-lang.h (find_imps): Update.
6890         * objc-lang.c (find_methods): Take a std::vector.
6891         (uniquify_strings, find_imps): Likewise.
6892         * linespec.c (find_methods): Take a std::vector.
6893         (decode_objc): Use std::vector.
6894         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6895         a std::vector.
6896         (find_method, find_function_symbols): Use std::vector.
6897
6898 2018-04-05  Tom Tromey  <tom@tromey.com>
6899
6900         * completer.c (completion_tracker::completion_tracker): Remove
6901         cast.
6902         (completion_tracker::discard_completions): Likewise.
6903         * breakpoint.c (ambiguous_names_p): Remove cast.
6904         * ada-lang.c (_initialize_ada_language): Remove cast.
6905         * utils.h (streq): Update.
6906         (streq_hash): Add new declaration.
6907         * utils.c (streq): Return bool.
6908         (streq_hash): New function.
6909
6910 2018-04-05  Tom Tromey  <tom@tromey.com>
6911
6912         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6913         Remove a string copy.
6914
6915 2018-04-05  Tom Tromey  <tom@tromey.com>
6916
6917         * linespec.c (filter_results): Use std::vector.
6918         (decode_line_2, decode_line_full): Update.
6919
6920 2018-04-05  Tom Tromey  <tom@tromey.com>
6921
6922         * linespec.c (canonical_to_fullform): Return std::string.
6923         (filter_results): Update.
6924         (struct decode_line_2_item): Add constructor.
6925         <fullform, displayform>: Now std::string.
6926         (decode_line_2_compare_items): Now a std::sort comparator.
6927         (decode_line_2): Update.
6928
6929 2018-04-05  Tom Tromey  <tom@tromey.com>
6930
6931         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6932         (unexpected_linespec_error): Update.
6933         (linespec_parse_basic, parse_linespec): Update.
6934
6935 2018-04-05  Tom Tromey  <tom@tromey.com>
6936
6937         * linespec.c (linespec_parse_basic): Reindent.
6938
6939 2018-04-05  Tom Tromey  <tom@tromey.com>
6940
6941         * minsyms.h (iterate_over_minimal_symbols): Update.
6942         * minsyms.c (iterate_over_minimal_symbols): Take a
6943         gdb::function_view.
6944         * linespec.c (struct collect_minsyms): Remove.
6945         (compare_msyms): Now a std::sort comparator.
6946         (add_minsym): Add parameters.
6947         (search_minsyms_for_name): Update.  Use std::vector.
6948
6949 2018-04-03  Tom Tromey  <tom@tromey.com>
6950
6951         * mipsread.c (read_alphacoff_dynamic_symtab): Use
6952         gdb::byte_vector.
6953
6954 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
6955
6956         * MAINTAINERS (Write After Approval): Add Weimin Pan.
6957
6958 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
6959
6960         PR gdb/16959
6961         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
6962         printing static type.
6963
6964 2018-04-01  Tom Tromey  <tom@tromey.com>
6965
6966         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6967         (rs6000_xfer_shared_libraries): Update.
6968
6969 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
6970
6971         * common/gdb_vecs.h (char_ptr): Remove.
6972         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6973
6974 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
6975
6976         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6977         with std::vector.
6978         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6979
6980 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
6981
6982         * tracepoint.h (struct uploaded_tp): Initialize fields.
6983         <actions, step_actions, cmd_strings>: Change type to
6984         std::vector<char *>.
6985         * tracepoint.c (get_uploaded_tp): Allocate with new.
6986         (free_uploaded_tps): Free with delete.
6987         (parse_tracepoint_definition): Adjust to std::vector change.
6988         * breakpoint.c (read_uploaded_action): Likewise.
6989         (create_tracepoint_from_upload): Likewise.
6990         * ctf.c (ctf_write_uploaded_tp): Likewise.
6991         (SET_ARRAY_FIELD): Likewise.
6992         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6993
6994 2018-03-30  Tom Tromey  <tom@tromey.com>
6995
6996         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
6997         std::unique_ptr.
6998         (svr4_keep_data_in_core): Update.
6999         (svr4_read_so_list): Update.
7000
7001 2018-03-30  Tom Tromey  <tom@tromey.com>
7002
7003         * windows-nat.c (handle_output_debug_string, handle_exception):
7004         Update.
7005         * target.h (target_read_string): Update.
7006         * target.c (target_read_string): Change "string" to
7007         unique_xmalloc_ptr.
7008         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7009         Update.
7010         * solib-frv.c (frv_current_sos): Update.
7011         * solib-dsbt.c (dsbt_current_sos): Update.
7012         * solib-darwin.c (darwin_current_sos): Update.
7013         * linux-thread-db.c (inferior_has_bug): Update.
7014         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7015         Update.  Remove alloca.
7016         * ada-lang.c (ada_main_name): Update.
7017
7018 2018-03-30  Tom Tromey  <tom@tromey.com>
7019
7020         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7021         (struct dwo_file_deleter): New.
7022         (dwo_file_up): New typedef.
7023         (open_and_init_dwo_file): Use dwo_file_up.
7024         (free_dwo_file_cleanup): Remove.
7025
7026 2018-03-30  Tom Tromey  <tom@tromey.com>
7027
7028         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7029         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7030
7031 2018-03-30  Tom Tromey  <tom@tromey.com>
7032
7033         * dwarf2read.c (class free_cached_comp_units): New class.
7034         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7035         (free_cached_comp_units): Remove function.
7036
7037 2018-03-30  Tom Tromey  <tom@tromey.com>
7038
7039         * utils.h (make_cleanup_unpush_target): Remove.
7040         * inf-ptrace.c (struct target_unpusher): New.
7041         (target_unpush_up) New typedef.
7042         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7043         target_unpush_up.
7044         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7045
7046 2018-03-27  Tom Tromey  <tom@tromey.com>
7047
7048         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7049
7050 2018-03-27  Pedro Alves  <palves@redhat.com>
7051             Tom Tromey  <tom@tromey.com>
7052
7053         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7054         destructor.  Now a class.
7055         (gdb_readline_wrapper_cleanup): Remove function.
7056         (gdb_readline_wrapper): Remove cleanups.
7057
7058 2018-03-27  Tom Tromey  <tom@tromey.com>
7059
7060         * typeprint.h (struct type_print_options) <local_typedefs,
7061         global_typedefs>: Remove "struct" keyword.
7062         (class typedef_hash_table): New class.
7063         (recursively_update_typedef_hash, add_template_parameters)
7064         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7065         (find_typedef_in_hash): Don't declare.
7066         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7067         (typedef_hash_table::recursively_update): Rename from
7068         recursively_update_typedef_hash.  Now a member.
7069         (typedef_hash_table::add_template_parameters): Rename from
7070         add_template_parameters.  Now a member.
7071         (typedef_hash_table::typedef_hash_table): Now a constructor;
7072         rename from create_typedef_hash.
7073         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7074         rename from free_typedef_hash.
7075         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7076         (do_free_global_table): Remove.
7077         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7078         from copy_type_recursive.
7079         (create_global_typedef_table): Remove.
7080         (typedef_hash_table::find_global_typedef): Now a member of
7081         typedef_hash_table.
7082         (typedef_hash_table::find_typedef): Rename from
7083         find_typedef_in_hash; now a member.
7084         (whatis_exp): Update.
7085         * extension.h (struct ext_lang_type_printers): Add constructor and
7086         destructor.
7087         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7088         declare.
7089         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7090         Now a constructor; rename from start_ext_lang_type_printers.
7091         (ext_lang_type_printers): Now a destructor; rename from
7092         free_ext_lang_type_printers.
7093         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7094         Update.
7095         (c_type_print_base_struct_union): Update.  Remove cleanups.
7096
7097 2018-03-27  Tom Tromey  <tom@tromey.com>
7098
7099         * dwarf-index-write.c: Include <cmath>.
7100
7101 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7102
7103         * NEWS: Add entry describing new "set|show varsize-limit" command.
7104         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7105         command.
7106         * printcmd.c (_initialize_printcmd): Add "set var" alias of
7107         "set variable".
7108
7109 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
7110
7111         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7112         dwarf-index-write.c
7113         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7114         * dwarf-index-common.c: New file.
7115         * dwarf-index-common.h: New file.
7116         * dwarf-index-write.c: New file.
7117         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7118         (struct dwarf2_section_info): Move from here.
7119         (dwarf2_section_info_def): Likewise.
7120         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7121         (offset_type): Likewise.
7122         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7123         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7124         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7125         (byte_swap): Likewise.
7126         (MAYBE_SWAP): Likewise.
7127         (dwarf2_per_cu_ptr): Likewise.
7128         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7129         (struct tu_stats): Likewise.
7130         (struct dwarf2_per_objfile): Likewise.
7131         (struct dwarf2_per_cu_data): Likewise.
7132         (struct signatured_type): Likewise.
7133         (sig_type_ptr): Likewise.
7134         (DEF_VEC_P (sig_type_ptr)): Likewise.
7135         (INDEX4_SUFFIX): Likewise.
7136         (INDEX5_SUFFIX): Likewise.
7137         (DEBUG_STR_SUFFIX): Likewise.
7138         (dwarf2_read_section): Make non-static.
7139         (mapped_index_string_hash): Move from here.
7140         (dwarf5_djb_hash): Likewise.
7141         (file_write): Likewise.
7142         (class data_buf): Likewise.
7143         (struct symtab_index_entry): Likewise.
7144         (struct mapped_symtab): Likewise.
7145         (find_slot): Likewise.
7146         (hash_expand): Likewise.
7147         (add_index_entry): Likewise.
7148         (uniquify_cu_indices): Likewise.
7149         (class c_str_view): Likewise.
7150         (class c_str_view_hasher): Likewise.
7151         (class vector_hasher): Likewise.
7152         (write_hash_table): Likewise.
7153         (psym_index_map): Likewise.
7154         (struct addrmap_index_data): Likewise.
7155         (add_address_entry): Likewise.
7156         (add_address_entry_worker): Likewise.
7157         (write_address_map): Likewise.
7158         (symbol_kind): Likewise.
7159         (write_psymbols): Likewise.
7160         (struct signatured_type_index_data): Likewise.
7161         (write_one_signatured_type): Likewise.
7162         (recursively_count_psymbols): Likewise.
7163         (recursively_write_psymbols): Likewise.
7164         (class debug_names): Likewise.
7165         (check_dwarf64_offsets): Likewise.
7166         (psyms_seen_size): Likewise.
7167         (write_gdbindex): Likewise.
7168         (write_debug_names): Likewise.
7169         (assert_file_size): Likewise.
7170         (write_psymtabs_to_index): Likewise.
7171         (save_gdb_index_command): Likewise.
7172         (_initialize_dwarf2_read): Don't register the "save gdb-index"
7173         command.
7174         * dwarf2read.h: New file.
7175
7176 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7177
7178         PR gdb/22670
7179         * dwarf2read.c (dwarf2_physname): Do not return the demangled
7180         symbol name if the CU's language stores symbol names in linkage
7181         format.
7182         * language.h (struct language_defn)
7183         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
7184         all instances of this struct.
7185
7186 2018-03-26  Tom Tromey  <tom@tromey.com>
7187
7188         * stack.c (backtrace_command_1): Remove verbose code.
7189
7190 2018-03-26  Tom Tromey  <tom@tromey.com>
7191
7192         * python/py-framefilter.c (py_print_type): Don't catch
7193         exceptions.  Return void.
7194         (py_print_value): Likewise.
7195         (py_print_single_arg): Likewise.
7196         (enumerate_args): Don't catch exceptions.
7197         (py_print_args): Likewise.
7198         (py_print_frame): Likewise.
7199         (gdbpy_apply_frame_filter): Catch exceptions here.
7200
7201 2018-03-26  Tom Tromey  <tom@tromey.com>
7202
7203         * stack.c (_initialize_stack): Remove trailing newlines from help
7204         text.  Add "Usage" line to "backtrace" help.
7205
7206 2018-03-26  Tom Tromey  <tom@tromey.com>
7207
7208         PR python/16486:
7209         * python/py-framefilter.c (py_print_args): Call wrap_hint.
7210
7211 2018-03-26  Tom Tromey  <tom@tromey.com>
7212
7213         * python/py-framefilter.c (py_print_single_arg): Return
7214         EXT_LANG_BT_ERROR from catch.
7215
7216 2018-03-26  Tom Tromey  <tom@tromey.com>
7217
7218         PR backtrace/15584:
7219         * stack.c (backtrace_command_1): Move some code into no-filters
7220         "if".
7221
7222 2018-03-26  Tom Tromey  <tom@tromey.com>
7223
7224         * python/py-framefilter.c (throw_quit_or_print_exception): New
7225         function.
7226         (gdbpy_apply_frame_filter): Use it.
7227
7228 2018-03-26  Tom Tromey  <tom@tromey.com>
7229
7230         PR cli/17716:
7231         * python/py-framefilter.c (py_print_type, py_print_value)
7232         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7233         RETURN_MASK_ERROR.
7234
7235 2018-03-26  Tom Tromey  <tom@tromey.com>
7236
7237         * python/py-framefilter.c (enumerate_args): Use
7238         gdb::unique_xmalloc_ptr.
7239
7240 2018-03-26  Tom Tromey  <tom@tromey.com>
7241
7242         * python/py-framefilter.c (py_print_frame): Return
7243         EXT_LANG_BT_OK.
7244         (gdbpy_apply_frame_filter): Update comment.
7245         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7246         Remove.
7247         <EXT_LANG_BT_NO_FILTERS>: Change value.
7248
7249 2018-03-26  Tom Tromey  <tom@tromey.com>
7250
7251         PR backtrace/15582:
7252         * stack.c (backtrace_command): Parse "hide" argument.
7253         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7254         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7255         constant.
7256
7257 2018-03-26  Tom Tromey  <tom@tromey.com>
7258
7259         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7260         add "flags".
7261         (backtrace_command): Remove "fulltrace", add "flags".
7262
7263 2018-03-26  Tom Tromey  <tom@tromey.com>
7264
7265         * stack.c (backtrace_command): Rewrite command line parsing.
7266
7267 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7268
7269         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7270
7271 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7272
7273         * filename-seen-cache.h: Add include guard.
7274
7275 2018-03-26  Keith Seitz  <keiths@redhat.com>
7276
7277         * symfile.c (place_section): Remove "struct" from section_addr_info
7278         in comment.
7279         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7280         "struct" keyword from section_addr_info.
7281
7282 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
7283
7284         * regformats/regdef.h (reg): Add constructors.
7285
7286 2018-03-25  Pedro Alves  <palves@redhat.com>
7287
7288         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7289         if then/else bodies in var_func_name extraction.
7290
7291 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
7292
7293         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7294         lookup_minimal_symbol() to find symbol entry.
7295         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7296
7297 2018-03-23  Keith Seitz  <keiths@redhat.com>
7298
7299         PR c++/22968
7300         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7301         nested type definitions for C++, too.
7302
7303 2018-03-23  Tom Tromey  <tom@tromey.com>
7304
7305         * machoread.c (struct oso_el): Add a constructor.  Don't define as
7306         a typedef.
7307         (macho_register_oso): Remove.
7308         (macho_symtab_read): Take a std::vector.
7309         (oso_el_compare_name): Now a std::sort comparator.
7310         (macho_symfile_read_all_oso): Take a std::vector.
7311         (macho_symfile_read): Use std::vector.  Remove cleanups.
7312
7313 2018-03-22  Tom Tromey  <tom@tromey.com>
7314
7315         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7316         (record_full_goto_bookmark): Use std::string.
7317
7318 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7319
7320         PR tdep/18295
7321         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7322         a single mask.
7323
7324 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7325
7326         * rs6000-tdep.c (store_insn_p): New function.
7327         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7328         and cr_reg to their unshifted values. Use store_insn_p to
7329         match LR saves using either R1 or fdata->alloca_reg. Use
7330         store_insn_p to match CR saves. Set alloca_reg_offset
7331         when alloca_reg and framep are set. Remove lr_reg shift
7332         when assigning to fdata->lr_register.
7333
7334 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7335
7336         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7337         command line args instead of emitting a warning.
7338
7339 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7340
7341         * tracepoint.h (struct static_tracepoint_marker): Initialize
7342         fields, define default constructor, move constructor and move
7343         assignment, disable the rest.
7344         <str_id, extra>: Make std::string.
7345         (release_static_tracepoint_marker): Remove.
7346         (free_current_marker): Remove.
7347         * tracepoint.c (free_current_marker): Remove.
7348         (parse_static_tracepoint_marker_definition): Adjust to
7349         std::string, use new hex2str overload.
7350         (release_static_tracepoint_marker): Remove.
7351         (print_one_static_tracepoint_marker): Get marker by reference
7352         and adjust to std::string.
7353         (info_static_tracepoint_markers_command): Adjust to std::vector
7354         changes
7355         * target.h (static_tracepoint_marker_p): Remove typedef.
7356         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7357         (struct target_ops) <to_static_tracepoint_marker_at>: Return
7358         bool.
7359         <to_static_tracepoint_markers_by_strid>: Return std::vector.
7360         * target-debug.h
7361         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7362         (target_debug_print_std_vector_static_tracepoint_marker): New.
7363         (target_debug_print_struct_static_tracepoint_marker_p): Rename
7364         to...
7365         (target_debug_print_static_tracepoint_marker_p): ... this.
7366         * target-delegates.c: Re-generate.
7367         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7368         Make std::string.
7369         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7370         (decode_static_tracepoint_spec): Adjust to std::vector.
7371         (tracepoint_print_one_detail): Adjust to std::string.
7372         (strace_marker_decode_location): Adjust to std::string.
7373         (update_static_tracepoint): Adjust to std::string, remove call
7374         to release_static_tracepoint_marker.
7375         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7376         Adjust to std::vector.
7377         * remote.c (remote_static_tracepoint_marker_at): Return bool.
7378         (remote_static_tracepoint_markers_by_strid): Adjust to
7379         std::vector.
7380         * common/rsp-low.h (hex2str): New overload with explicit count
7381         of bytes.
7382         * common/rsp-low.c (hex2str): New overload with explicit count
7383         of bytes.
7384         * unittests/rsp-low-selftests.c (test_hex2str): New function.
7385         (_initialize_rsp_low_selftests): Add test_hex2str test.
7386         * unittests/tracepoint-selftests.c
7387         (test_parse_static_tracepoint_marker_definition): Adjust to
7388         std::string.
7389
7390 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7391
7392         * tracepoint.c (parse_static_tracepoint_marker_definition):
7393         Consider case where the definition is followed by more
7394         definitions.
7395         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7396         tracepoint-selftests.c.
7397         * unittests/tracepoint-selftests.c: New.
7398
7399 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7400
7401         * MAINTAINERS (Write After Approval): Add Pedro Franco de
7402         Carvalho.
7403
7404 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7405
7406         * symtab.c (find_pc_sect_line): fixed indentation.
7407
7408 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7409
7410         * symtab.c (find_pc_sect_line): now uses binary search.
7411
7412 2018-03-19  Tom Tromey  <tom@tromey.com>
7413
7414         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7415         "IDENT" production.
7416
7417 2018-03-19  Pedro Alves  <palves@redhat.com>
7418             Tom Tromey  <tom@tromey.com>
7419
7420         * unittests/observable-selftests.c: New file.
7421         * common/observable.h: New file.
7422         * observable.h: New file.
7423         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7424         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7425         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7426         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7427         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7428         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7429         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7430         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7431         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7432         python/py-breakpoint.c, python/py-finishbreakpoint.c,
7433         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7434         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7435         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7436         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7437         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7438         tui/tui-interp.c, valops.c: Update all users.
7439         * tui/tui-hooks.c (tui_bp_created_observer)
7440         (tui_bp_deleted_observer, tui_bp_modified_observer)
7441         (tui_inferior_exit_observer, tui_before_prompt_observer)
7442         (tui_normal_stop_observer, tui_register_changed_observer):
7443         Remove.
7444         (tui_observers_token): New global.
7445         (attach_or_detach, tui_attach_detach_observers): New functions.
7446         (tui_install_hooks, tui_remove_hooks): Use
7447         tui_attach_detach_observers.
7448         * record-btrace.c (record_btrace_thread_observer): Remove.
7449         (record_btrace_thread_observer_token): New global.
7450         * observer.sh: Remove.
7451         * observer.c: Rename to observable.c.
7452         * observable.c (namespace gdb_observers): Define new objects.
7453         (observer_debug): Move into gdb_observers namespace.
7454         (struct observer, struct observer_list, xalloc_observer_list_node)
7455         (xfree_observer_list_node, generic_observer_attach)
7456         (generic_observer_detach, generic_observer_notify): Remove.
7457         (_initialize_observer): Update.
7458         Don't include observer.inc.
7459         * Makefile.in (generated_files): Remove observer.h, observer.inc.
7460         (clean mostlyclean): Likewise.
7461         (observer.h, observer.inc): Remove targets.
7462         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7463         (COMMON_SFILES): Use observable.c, not observer.c.
7464         * .gitignore: Remove observer.h.
7465
7466 2018-03-18  Tom Tromey  <tom@tromey.com>
7467
7468         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7469         gdb::def_vector.
7470         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7471
7472 2018-03-17  Tom Tromey  <tom@tromey.com>
7473
7474         * auto-load.c (auto_load_objfile_script_1): Use std::string.
7475
7476 2018-03-17  Tom Tromey  <tom@tromey.com>
7477
7478         * target.c (class scoped_target_fd): New.
7479         (target_fileio_close_cleanup): Remove.
7480         (target_fileio_read_alloc_1): Use scoped_target_fd.
7481
7482 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
7483
7484         * silent-rules.mk: New.
7485         * Makefile.in: Include silent-rules.mk
7486         (srcdir, VPATH, top_srcdir): Move up.
7487         (COMPILE): Add ECHO_CXX.
7488         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7489         (init.c): Add ECHO_INIT_C.
7490         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7491         (version.c): Add ECHO_GEN.
7492         (printcmd.o): Add ECHO_CXX.
7493         (target-float.o): Add ECHO_CXX.
7494         (ada-exp.o): Add ECHO_CXX.
7495         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7496         (insight$(EXEEXT)): Add ECHO_CXXLD.
7497         * gnulib/configure.ac: Add AM_SILENT_RULES.
7498         * gnulib/aclocal.m4: Re-generate.
7499         * gnulib/configure: Re-generate.
7500         * gnulib/import/Makefile.in: Re-generate.
7501
7502 2018-03-16  Tom Tromey  <tom@tromey.com>
7503
7504         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7505         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7506         * utils.c (do_free_section_addr_info)
7507         (make_cleanup_free_section_addr_info): Remove.
7508         * symfile.h (struct other_sections): Add constructor.
7509         (struct section_addr_info): Remove.
7510         (section_addr_info): New typedef.
7511         (struct sym_fns) <sym_offsets>: Change type of parameter.
7512         (build_section_addr_info_from_objfile)
7513         (relative_addr_info_to_section_offsets, addr_info_make_relative)
7514         (default_symfile_offsets, symbol_file_add)
7515         (symbol_file_add_from_bfd)
7516         (build_section_addr_info_from_section_table): Update.
7517         (alloc_section_addr_info, free_section_addr_info): Don't declare.
7518         * symfile.c (alloc_section_addr_info): Remove.
7519         (build_section_addr_info_from_section_table): Change return type.
7520         Update.
7521         (build_section_addr_info_from_bfd)
7522         (build_section_addr_info_from_objfile): Likewise.
7523         (free_section_addr_info): Remove.
7524         (relative_addr_info_to_section_offsets): Change type of "addrs".
7525         (addrs_section_compar): Now a std::sort comparator.
7526         (addrs_section_sort): Change return type.
7527         (addr_info_make_relative): Change type of "addrs".  Update.
7528         (default_symfile_offsets, syms_from_objfile_1)
7529         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7530         (symbol_file_add_separate): Update.
7531         (symbol_file_add): Change type of "addrs".  Update.
7532         (add_symbol_file_command): Update.  Remove cleanups.
7533         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
7534         cleanups.
7535         * symfile-debug.c (debug_sym_offsets): Change type of "info".
7536         * solib.c (solib_read_symbols): Update.
7537         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
7538         * machoread.c (macho_symfile_offsets): Update.
7539         * jit.c (jit_bfd_try_read_symtab): Update.
7540
7541 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
7542
7543         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7544         unittests/utils-selftests.c.
7545         * unittests/utils-selftests.c: New file.
7546
7547 2018-03-14  Tom Tromey  <tom@tromey.com>
7548
7549         PR cli/14977:
7550         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7551         for NULL.
7552
7553 2018-03-14  Tom Tromey  <tom@tromey.com>
7554
7555         PR cli/19918:
7556         * printcmd.c (printf_pointer): Allow "-" in format.
7557
7558 2018-03-14  Tom Tromey  <tom@tromey.com>
7559
7560         * printcmd.c (_initialize_printcmd): Add usage to printf.
7561
7562 2018-03-14  Yao Qi  <qiyao@sourceware.org>
7563
7564         * MAINTAINERS: Update my email address.
7565
7566 2018-03-13  Tom Tromey  <tom@tromey.com>
7567
7568         * machoread.c (macho_check_dsym): Change filenamep to a
7569         std::string*.
7570         (macho_symfile_read): Update.
7571         * symfile.c (load_command): Use std::string.
7572
7573 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7574
7575         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7576         to error message string.
7577         (riscv_register_name): Use xsnprintf instead of sprintf.
7578         (riscv_insn::fetch_instruction): Use gdb_assert instead of
7579         internal_error.
7580         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7581         error.
7582         (riscv_push_dummy_call): Likewise.
7583
7584 2018-03-12  Tom Tromey  <tom@tromey.com>
7585
7586         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7587         Use gdb::byte_vector.
7588         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7589
7590 2018-03-12  Yao Qi  <yao.qi@linaro.org>
7591
7592         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7593         parameter type to readable_regcache.
7594         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7595         the declaration.
7596
7597 2018-03-11  Tom Tromey  <tom@tromey.com>
7598
7599         * dwarf2read.c (struct nextfield): Add initializers.
7600         (struct nextfnfield): Remove.
7601         (struct fnfieldlist): Add initializers.  Remove "length" and
7602         "head", use std::vector.
7603         (struct decl_field_list): Remove.
7604         (struct field_info): Add initializers.
7605         <fields, baseclasses>: Now std::vector.
7606         <nbaseclasses, nfnfields, typedef_field_list_count,
7607         nested_types_list_count>: Remove.
7608         (dwarf2_add_field, dwarf2_add_type_defn)
7609         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7610         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7611         (process_structure_scope): Update.
7612
7613 2018-03-11  Tom Tromey  <tom@tromey.com>
7614
7615         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7616         for use by std::sort.
7617         (build_type_psymtabs_1): Use std::vector.
7618
7619 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
7620
7621         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7622         and LIBMPFR in the printed configuration.
7623
7624 2018-03-08  Tom Tromey  <tom@tromey.com>
7625
7626         * source.c (get_filename_and_charpos): Use scoped_fd.
7627         * nto-procfs.c (procfs_open_1): Use scoped_fd.
7628         (procfs_pidlist): Likewise.
7629         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7630         (iterate_over_mappings): Likewise.
7631
7632 2018-03-08  Tom Tromey  <tom@tromey.com>
7633
7634         * infcall.c (struct call_return_meta_info)
7635         <stack_temporaries_enabled>: Remove.
7636         (get_call_return_value, call_function_by_hand_dummy): Update.
7637         * thread.c (disable_thread_stack_temporaries): Remove.
7638         (enable_thread_stack_temporaries): Remove.
7639         (thread_stack_temporaries_enabled_p): Return bool.
7640         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7641         (get_last_thread_stack_temporary): Update.
7642         * eval.c (evaluate_subexp): Update.
7643         * gdbthread.h (class enable_thread_stack_temporaries): Now a
7644         class, not a function.
7645         (value_ptr, value_vec): Remove typedefs.
7646         (class thread_info) <stack_temporaries_enabled>: Now bool.
7647         <stack_temporaries>: Now a std::vector.
7648         (thread_stack_temporaries_enabled_p)
7649         (value_in_thread_stack_temporaries): Return bool.
7650
7651 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
7652
7653         * remote.c (putpkt_binary): Fix omitted bytes reporting.
7654         (getpkt_or_notif_sane_1): Likewise.
7655
7656 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
7657
7658         * build-id.c (build_id_to_debug_bfd): Use std::string.
7659
7660 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
7661
7662         * build-id.c (find_separate_debug_file_by_buildid): Return
7663         std::string.
7664         * build-id.h (find_separate_debug_file_by_buildid): Return
7665         std::string.
7666         * coffread.c (coff_symfile_read): Adjust to std::string.
7667         * elfread.c (elf_symfile_read): Adjust to std::string.
7668         * symfile.c (separate_debug_file_exists): Change parameter to
7669         std::string.
7670         (find_separate_debug_file): Return std::string.
7671         (find_separate_debug_file_by_debuglink): Return std::string.
7672         * symfile.h (find_separate_debug_file_by_debuglink): Return
7673         std::string.
7674
7675 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
7676
7677         * common/xml-utils.c (xml_escape_text): Move code to...
7678         (xml_escape_text_append): ... this new function.
7679         * common/xml-utils.h (xml_escape_text_append): New declaration.
7680         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7681         New function.
7682         (_initialize_xml_utils): register test_xml_escape_text_append as
7683         a selftest.
7684
7685 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
7686
7687         * defs.h: Remove MAX_REGISTER_SIZE.
7688         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7689         asserts.
7690         * python/py-unwind.c (pyuw_sniffer): Likewise.
7691
7692 2018-03-07  Tom Tromey  <tom@tromey.com>
7693
7694         * linux-tdep.c (linux_info_proc): Update.
7695         * target.h (struct target_ops) <to_fileio_readlink>: Return
7696         optional<string>.
7697         (target_fileio_readlink): Return optional<string>.
7698         * remote.c (remote_hostio_readlink): Return optional<string>.
7699         * inf-child.c (inf_child_fileio_readlink): Return
7700         optional<string>.
7701         * target.c (target_fileio_readlink): Return optional<string>.
7702
7703 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
7704
7705         * regcache.c (cooked_read_test): Add riscv to the list of
7706         architectures that have a save_reggroup.
7707
7708 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7709
7710         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7711         value is not a dynamic class object.
7712
7713 2018-03-06  Tom Tromey  <tom@tromey.com>
7714
7715         * rust-exp.y: Formatting fixes.
7716
7717 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7718
7719         * riscv-tdep.c (riscv_register_name): Remove target description
7720         support.
7721         (riscv_gdbarch_init): Remove target description check.
7722
7723 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7724
7725         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7726         comment.
7727         * riscv-tdep.h: Likewise.
7728
7729 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7730
7731         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7732         (riscv_pseudo_register_write): Delete.
7733         (riscv_gdbarch_init): Remove all use of pseudo registers.
7734
7735 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
7736
7737         * record-btrace.c (btrace_print_lines): Replace cleanup
7738         parameter with RAII equivalents.
7739         (btrace_insn_history): Replace cleanup with RAII equivalents.
7740         * ui-out.h (make_cleanup_ui_out_list_begin_end,
7741         make_cleanup_ui_out_tuple_begin_end): Remove.
7742         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7743         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7744         make_cleanup_ui_out_list_begin_end): Remove.
7745
7746 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
7747
7748         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7749         parameter types to std::vector.  Use bool.
7750         (record_btrace_wait): Replace VEC(tp_t) with
7751         std::vector<thread_info *>.
7752         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7753
7754 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
7755
7756         * record-btrace.c (record_btrace_disable_callback): Remove.
7757         (struct scoped_btrace_disable): New.
7758         (record_btrace_open): Use scoped_btrace_disable.
7759
7760 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7761
7762         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7763         reading values from registers.
7764
7765 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7766
7767         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7768         where appropriate.
7769
7770 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7771
7772         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7773         change parameter type.  Use GDB's print functions, and use
7774         core_addr_to_string where appropriate.
7775         (riscv_push_dummy_call): Use core_addr_to_string where
7776         appropriate, update call to riscv_print_arg_location, and reindent
7777         a few lines.
7778         (riscv_return_value): Update call to riscv_print_arg_location.
7779
7780 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7781             Tim Newsome <tim@sifive.com>
7782             Albert Ou <a0u@eecs.berkeley.edu>
7783             Darius Rad <darius@bluespec.com>
7784
7785         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7786         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7787         (ALLDEPFILES): Add riscv-tdep.c
7788         * configure.tgt: Add riscv support.
7789         * riscv-tdep.c: New file.
7790         * riscv-tdep.h: New file.
7791         * NEWS: Mention new target.
7792         * MAINTAINERS: Add entry for riscv.
7793
7794 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
7795
7796         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7797         fields within aggregates.
7798
7799 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
7800
7801         * record-btrace.c (btrace_print_lines): Change type of flags to
7802         gdb_disassembly_flags.
7803
7804 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
7805
7806         * fbsd-nat.c: Include "inf-ptrace.h".
7807         (USE_SIGTRAP_SIGINFO): Conditionally define.
7808         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7809         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7810         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7811         function.
7812         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7813         Likewise.
7814         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7815         Likewise.
7816         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7817         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7818         "supports_stopped_by_hw_breakpoint" target methods.
7819
7820 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
7821
7822         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7823         * fbsd-nat.c (debug_fbsd_nat): New variable.
7824         (show_fbsd_nat_debug): New function.
7825         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7826         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7827
7828 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
7829
7830         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7831         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7832         prototype.
7833         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7834         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7835         method.
7836
7837 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
7838
7839         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7840         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7841
7842 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
7843
7844         * charset.c (struct charset_vector): New.
7845         (charsets): Change type to charset_vector.
7846         (find_charset_names): Adjust.
7847         (add_one): Adjust.
7848         (_initialize_charset): Adjust.
7849
7850 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
7851
7852         * progspace.h (struct program_space) <deleted_solibs>: Change
7853         type to std::vector<std::string>.
7854         * progspace.c (clear_program_space_solib_cache): Adjust.
7855         * breakpoint.c (print_solib_event): Adjust.
7856         (check_status_catch_solib): Adjust.
7857         * solib.c (update_solib_list): Adjust.
7858         * ui-out.h (class ui_out) <field_string>: New overload.
7859         * ui-out.c (ui_out::field_string): New overload.
7860
7861 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
7862
7863         * progspace.h (struct program_space): Add constructor and
7864         destructor, initialize fields.
7865         (add_program_space): Remove.
7866         * progspace.c (add_program_space): Rename to...
7867         (program_space::program_space): ... this.
7868         (release_program_space): Rename to...
7869         (program_space::~program_space): ... this.
7870         (delete_program_space): Use delete to delete program_space.
7871         (initialize_progspace): Use new to allocate program_space.
7872         * inferior.c (add_inferior_with_spaces): Likewise.
7873         (clone_inferior_command): Likewise.
7874         * infrun.c (follow_fork_inferior): Likewise.
7875         (handle_vfork_child_exec_or_exit): Likewise.
7876
7877 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
7878
7879         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7880         (delim_string_to_char_ptr_vec): Return std::vector of
7881         gdb::unique_xmalloc_ptr.
7882         (dirnames_to_char_ptr_vec_append): Take std::vector of
7883         gdb::unique_xmalloc_ptr.
7884         (dirnames_to_char_ptr_vec): Return std::vector of
7885         gdb::unique_xmalloc_ptr.
7886         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7887         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7888         (delim_string_to_char_ptr_vec): Return an std::vector of
7889         gdb::unique_xmalloc_ptr, adjust the code.
7890         (dirnames_to_char_ptr_vec_append): Take an std::vector of
7891         gdb::unique_xmalloc_ptr, adjust the code.
7892         (dirnames_to_char_ptr_vec): Return an std::vector of
7893         gdb::unique_xmalloc_ptr, adjust the code.
7894         * auto-load.c (auto_load_safe_path_vec): Change type to
7895         std::vector of gdb::unique_xmalloc_ptr.
7896         (auto_load_expand_dir_vars): Return an std::vector of
7897         gdb::unique_xmalloc_ptr, adjust the code.
7898         (auto_load_safe_path_vec_update): Adjust.
7899         (filename_is_in_auto_load_safe_path_vec): Adjust.
7900         (auto_load_objfile_script_1): Adjust.
7901         * build-id.c (build_id_to_debug_bfd): Adjust.
7902         * linux-thread-db.c (thread_db_load_search): Adjust.
7903         * source.c (add_path): Adjust.
7904         (openp): Adjust.
7905         * symfile.c (find_separate_debug_file): Adjust.
7906         * utils.c (do_free_char_ptr_vec): Remove.
7907         (make_cleanup_free_char_ptr_vec): Remove.
7908
7909 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
7910
7911         PR gdb/22907
7912         * common/pathstuff.c: Conditionally include "<windows.h>".
7913
7914 2018-03-01  Georg Sauthoff  <mail@georg.so>
7915
7916         PR gdb/22888
7917         * gcore.in: Quote variables and switch interpreter to bash.
7918
7919 2018-03-01  Tom Tromey  <tom@tromey.com>
7920
7921         * dwarf2read.c (alloc_discriminant_info): Fix default_index
7922         assertion.  Add assertion for discriminant_index.
7923         (quirk_rust_enum): Use correct base type name in univariant case.
7924
7925 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
7926
7927         * record.c (get_call_history_modifiers): Return a
7928         record_print_flags.
7929         (cmd_record_call_history): Adjust.
7930         * record-btrace.c (record_btrace_call_history): Adjust.
7931         (record_btrace_call_history_range): Adjust.
7932         (record_btrace_call_history_from): Adjust.
7933         * target-debug.h (target_debug_print_record_print_flags): New.
7934         * target-delegates.c: Re-generate.
7935         * target.c (target_call_history): Change flags type.
7936         (target_call_history_from): Likewise.
7937         (target_call_history_range): Likewise.
7938         * target.h (struct target_ops) <target_call_history>: Likewise.
7939         (target_call_history_from): Likewise.
7940         (target_call_history_range): Likewise.
7941
7942 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
7943             Simon Marchi  <simon.marchi@polymtl.ca>
7944
7945         * common/common-utils.c: Include "sys/stat.h".
7946         (is_regular_file): Move here from "source.c"; change return
7947         type to "bool".
7948         * common/common-utils.h (is_regular_file): New prototype.
7949         * common/pathstuff.c (contains_dir_separator): New function.
7950         * common/pathstuff.h (contains_dir_separator): New prototype.
7951         * source.c: Don't include "sys/stat.h".
7952         (is_regular_file): Move to "common/common-utils.c".
7953
7954 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
7955
7956         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7957         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7958         * auto-load.c: Include "common/pathstuff.h".
7959         * common/common-def.h (current_directory): Move here.
7960         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7961         function.
7962         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7963         prototype.
7964         * common/pathstuff.c: New file.
7965         * common/pathstuff.h: New file.
7966         * compile/compile.c: Include "common/pathstuff.h".
7967         * defs.h (current_directory): Move to "common/common-defs.h".
7968         * dwarf2read.c: Include "common/pathstuff.h".
7969         * exec.c: Likewise.
7970         * guile/scm-safe-call.c: Likewise.
7971         * linux-thread-db.c: Likewise.
7972         * main.c: Likewise.
7973         * nto-tdep.c: Likewise.
7974         * objfiles.c: Likewise.
7975         * source.c: Likewise.
7976         * symtab.c: Likewise.
7977         * utils.c: Include "common/pathstuff.h".
7978         (gdb_realpath): Move to "common/pathstuff.c".
7979         (gdb_realpath_keepfile): Likewise.
7980         (gdb_abspath): Likewise.
7981         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7982         (gdb_realpath_keepfile): Likewise.
7983         (gdb_abspath): Likewise.
7984
7985 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
7986
7987         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7988         wildcard process pid for super_resume for kernels with a
7989         specific bug.
7990
7991 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
7992
7993         * compile/compile.c (get_args): Add additional comments
7994         explaining function.
7995
7996 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
7997             Tom Tromey  <tom@tromey.com>
7998
7999         * target.h (memory_write_request_s): Remove typedef.  Don't define
8000         VEC.
8001         (target_write_memory_blocks): Change argument to std::vector.
8002         (struct memory_write_request): Add constructor.
8003         * target-memory.c (compare_block_starting_address): Return bool.
8004         Change argument types.
8005         (claim_memory): Change arguments to use std::vector.
8006         (split_regular_and_flash_blocks, blocks_to_erase)
8007         (compute_garbled_blocks): Likewise.
8008         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8009         (target_write_memory_blocks): Change argument to std::vector.
8010         * symfile.c (struct load_section_data): Add constructor and
8011         destructor.  Use std::vector for "requests".
8012         (struct load_progress_data): Add initializers.
8013         (load_section_callback): Update.  Use "new".
8014         (clear_memory_write_data): Remove.
8015         (generic_load): Update.
8016
8017 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8018
8019         * arch/aarch64.h: Use common/tdesc.h.
8020
8021 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8022
8023         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8024         architecture with a 64-bit ABI.
8025
8026 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8027
8028         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8029         ahead of target description loading.
8030
8031 2018-02-26  Tom Tromey  <tom@tromey.com>
8032
8033         * stack.c (backtrace_command_1): Update.
8034         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8035         of "flags".
8036         * python/py-framefilter.c (py_print_frame)
8037         (gdbpy_apply_frame_filter): Change type of "flags".
8038         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8039         of "flags".
8040         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8041         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8042         * extension.h (enum frame_filter_flag): Rename from
8043         frame_filter_flags.
8044         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8045         (apply_ext_lang_frame_filter): Change type of "flags".
8046         * extension.c (apply_ext_lang_frame_filter): Change type of
8047         "flags".
8048         * extension-priv.h (struct extension_language_ops)
8049         <apply_frame_filter>: Change type of "flags".
8050
8051 2018-02-26  Tom Tromey  <tom@tromey.com>
8052
8053         PR python/16497:
8054         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8055         off-by-one in py_end computation.
8056         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8057         PRINT_MORE_FRAMES.
8058         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8059         constant.
8060
8061 2018-02-26  Tom Tromey  <tom@tromey.com>
8062
8063         * dwarf2read.c (struct variant_field): New.
8064         (struct nextfield) <variant>: New field.
8065         (dwarf2_add_field): Handle DW_TAG_variant_part.
8066         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8067         discriminated union.
8068         (read_structure_type): Handle DW_TAG_variant_part.
8069         (handle_struct_member_die): New function, extracted from
8070         process_structure_scope.  Handle DW_TAG_variant.
8071         (process_structure_scope): Handle discriminated unions.  Call
8072         handle_struct_member_die.
8073
8074 2018-02-26  Tom Tromey  <tom@tromey.com>
8075
8076         * rust-lang.h (rust_last_path_segment): Declare.
8077         * rust-lang.c (rust_last_path_segment): Now public.  Change
8078         contract.
8079         (struct disr_info): Remove.
8080         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8081         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8082         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8083         (rust_enum_p, rust_enum_variant): New function.
8084         (rust_underscore_fields): Remove "offset" parameter.
8085         (rust_print_enum): New function.
8086         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8087         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8088         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
8089         enums.
8090         (rust_internal_print_type): New function, from rust_print_type.
8091         Remove enum code.
8092         (rust_print_type): Call rust_internal_print_type.
8093         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8094         Update enum handling.
8095         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8096         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8097         (rust_union_quirks): New functions.
8098         (process_full_comp_unit, process_full_type_unit): Call
8099         rust_union_quirks.
8100         (process_structure_scope): Update rust_unions if necessary.
8101
8102 2018-02-26  Tom Tromey  <tom@tromey.com>
8103
8104         * value.h (value_union_variant): Declare.
8105         * valops.c (value_union_variant): New function.
8106         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8107         (struct discriminant_info): New.
8108         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8109         enumerator.
8110         (struct main_type) <flag_discriminated_union>: New field.
8111
8112 2018-02-26  Tom Tromey  <tom@tromey.com>
8113
8114         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8115         unittests/unpack-selftests.c.
8116         * unittests/unpack-selftests.c: New file.
8117         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8118
8119 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8120
8121         * dwarf2read.c (struct partial_die_info) <read>: New method.
8122         (read_partial_die): Remove the declaration.
8123         (load_partial_dies): Update.
8124         (partial_die_info::partial_die_info):
8125         (read_partial_die): Change it to partial_die_info::read.
8126
8127 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8128
8129         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8130         (fixup_partial_die): Remove declaration.
8131         (scan_partial_symbols): Update.
8132         (partial_die_parent_scope): Likewise.
8133         (partial_die_full_name): Likewise.
8134         (fixup_partial_die): Change it to partial_die_info::fixup.
8135
8136 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8137
8138         * dwarf2read.c (read_partial_die): Update the declaration.
8139         (load_partial_dies): Caller update.
8140         (read_partial_die): Remove one argument abbrev_len.
8141
8142 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8143
8144         * dwarf2read.c (struct partial_die_info): Add ctor, delete
8145         assignment operator.
8146         (load_partial_dies): Use ctor and copy ctor.
8147         (read_partial_die): Update.
8148         (dwarf2_cu::find_partial_die): Use ctor.
8149
8150 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8151
8152         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8153         (find_partial_die_in_comp_unit): Change it to
8154         dwarf2_cu::find_partial_die.
8155         (find_partial_die): Update.
8156
8157 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8158
8159         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8160         is NULL.
8161
8162 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8163
8164         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8165
8166 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
8167
8168         * arch/amd64.h: Use common/tdesc.h.
8169         * arch/i386.c: Likewise.
8170         * arch/i386.h: Likewise.
8171         * arch/tic6x.c: Likewise.
8172         * arch/tdesc.h: Move file from here...
8173         * common/tdesc.h: ...to here.
8174         * features/aarch64-core.c: Regenerate.
8175         * features/aarch64-fpu.c: Regenerate.
8176         * features/i386/32bit-avx.c: Regenerate.
8177         * features/i386/32bit-avx512.c: Regenerate.
8178         * features/i386/32bit-core.c: Regenerate.
8179         * features/i386/32bit-linux.c: Regenerate.
8180         * features/i386/32bit-mpx.c: Regenerate.
8181         * features/i386/32bit-pkeys.c: Regenerate.
8182         * features/i386/32bit-sse.c: Regenerate.
8183         * features/i386/64bit-avx.c: Regenerate.
8184         * features/i386/64bit-avx512.c: Regenerate.
8185         * features/i386/64bit-core.c: Regenerate.
8186         * features/i386/64bit-linux.c: Regenerate.
8187         * features/i386/64bit-mpx.c: Regenerate.
8188         * features/i386/64bit-pkeys.c: Regenerate.
8189         * features/i386/64bit-segments.c: Regenerate.
8190         * features/i386/64bit-sse.c: Regenerate.
8191         * features/i386/x32-core.c: Regenerate.
8192         * features/tic6x-c6xp.c: Regenerate.
8193         * features/tic6x-core.c: Regenerate.
8194         * features/tic6x-gp.c: Regenerate.
8195         * target-descriptions.c: Use common/tdesc.h.
8196         * target-descriptions.h: Likewise.
8197
8198 2018-02-24  Tom Tromey  <tom@tromey.com>
8199
8200         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8201         (try_thread_db_load_from_dir, thread_db_load_search): Use
8202         std::string.
8203         (info_auto_load_libthread_db_compare): Return bool.  Change
8204         argument types.
8205         (info_auto_load_libthread_db): Use std::vector, std::string.
8206         Remove cleanups.
8207
8208 2018-02-24  Tom Tromey  <tom@tromey.com>
8209
8210         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8211         std::string.
8212         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8213         std::string*.
8214         * gdbarch.c: Rebuild.
8215         * gdbarch.h: Rebuild.
8216         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8217         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8218         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8219         std::string*.
8220
8221 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
8222
8223         * gdbtypes.h (sect_offset): Change type to uint64_t.
8224         (sect_offset_str): New function.
8225         * dwarf2read.c (create_addrmap_from_aranges): Use
8226         sect_offset_str.
8227         (error_check_comp_unit_head): Likewise.
8228         (create_debug_type_hash_table): Likewise.
8229         (read_cutu_die_from_dwo): Likewise.
8230         (init_cutu_and_read_dies): Likewise.
8231         (init_cutu_and_read_dies_no_follow): Likewise.
8232         (process_psymtab_comp_unit_reader): Likewise.
8233         (partial_die_parent_scope): Likewise.
8234         (peek_die_abbrev): Likewise.
8235         (process_queue): Likewise.
8236         (dwarf2_physname): Likewise.
8237         (read_namespace_alias): Likewise.
8238         (read_import_statement): Likewise.
8239         (create_dwo_cu_reader): Likewise.
8240         (create_cus_hash_table): Likewise.
8241         (lookup_dwo_cutu): Likewise.
8242         (inherit_abstract_dies): Likewise.
8243         (read_func_scope): Likewise.
8244         (read_call_site_scope): Likewise.
8245         (dwarf2_add_member_fn): Likewise.
8246         (read_common_block): Likewise.
8247         (read_module_type): Likewise.
8248         (read_typedef): Likewise.
8249         (read_subrange_type): Likewise.
8250         (load_partial_dies): Likewise.
8251         (read_partial_die): Likewise.
8252         (find_partial_die): Likewise.
8253         (read_str_index): Likewise.
8254         (dwarf2_string_attr): Likewise.
8255         (build_error_marker_type): Likewise.
8256         (lookup_die_type): Likewise.
8257         (dump_die_shallow): Likewise.
8258         (follow_die_ref): Likewise.
8259         (dwarf2_fetch_die_loc_sect_off): Likewise.
8260         (dwarf2_fetch_constant_bytes): Likewise.
8261         (follow_die_sig): Likewise.
8262         (get_signatured_type): Likewise.
8263         (get_DW_AT_signature_type): Likewise.
8264         (dwarf2_find_containing_comp_unit): Likewise.
8265         (set_die_type): Likewise.
8266
8267 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
8268
8269         * arch/aarch64.c: Include "common-defs.h".
8270         * arch/amd64.c: Likewise.
8271         * arch/i386.c: Likewise.
8272
8273 2018-02-21  Tom Tromey  <tom@tromey.com>
8274
8275         * value.h: (extract_field_op): Update.
8276         * eval.c (extract_field_op): Return a const char *.
8277         * expression.h (parse_expression_for_completion): Update.
8278         * completer.c (complete_expression): Update.
8279         (add_struct_fields): Make fieldname const.
8280         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8281         (mark_completion_tag, parse_exp_in_context_1): Update.
8282         (parse_expression_for_completion): Change "name" to
8283         unique_xmalloc_ptr*.
8284
8285 2018-02-21  Tom Tromey  <tom@tromey.com>
8286
8287         * infcall.c (call_function_by_hand_dummy): Use std::vector.
8288
8289 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8290
8291         * avr-tdep.c (avr_read_pc): Change parameter type to
8292         readable_regcache.
8293         * gdbarch.sh (read_pc): Likewise.
8294         * gdbarch.c: Re-generated.
8295         * gdbarch.h: Re-generated.
8296         * hppa-tdep.c (hppa_read_pc): Change parameter type to
8297         readable_regcache.
8298         * ia64-tdep.c (ia64_read_pc): Likewise.
8299         * mips-tdep.c (mips_read_pc): Likewise.
8300         * spu-tdep.c (spu_read_pc): Likewise.
8301
8302 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8303
8304         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8305         * regcache-dump.c: New file.
8306         * regcache.c: Move register_dump to regcache-dump.c.
8307         (maintenance_print_registers): Likewise.
8308         (maintenance_print_raw_registers): Likewise.
8309         (maintenance_print_cooked_registers): Likewise.
8310         (maintenance_print_register_groups): Likewise.
8311         (maintenance_print_remote_registers): Likewise.
8312         (_initialize_regcache): Likewise.
8313         * regcache.h (register_dump): Moved from regcache.c.
8314
8315 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8316
8317         * regcache.c (regcache::regcache): Update.
8318         (regcache::invalidate): Move it to detached_regcache::invalidate.
8319         (get_thread_arch_aspace_regcache): Update.
8320         (regcache::raw_update): Update.
8321         (regcache::cooked_read): Remove some code.
8322         (regcache::cooked_read_value): Likewise.
8323         (regcache::raw_write): Remove assert on m_readonly_p.
8324         (regcache::raw_supply_integer): Move it to
8325         detached_regcache::raw_supply_integer.
8326         (regcache::raw_supply_zeroed): Likewise.
8327         * regcache.h (detached_regcache) <raw_supply_integer>: New
8328         declaration.
8329         <raw_supply_zeroed, invalidate>: Likewise.
8330         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8331         <invalidate>: Likewise.
8332         <m_readonly_p>: Removed.
8333
8334 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8335
8336         * infcmd.c (get_return_value): Let stop_regs point to
8337         get_current_regcache.
8338         * regcache.c (regcache::regcache): Remove.
8339         (register_dump_reg_buffer): New class.
8340         (regcache_print): Adjust.
8341         * regcache.h (regcache): Remove constructors.
8342
8343 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8344
8345         * regcache.c (class register_dump): New class.
8346         (register_dump_regcache, register_dump_none): New class.
8347         (register_dump_remote, register_dump_groups): New class.
8348         (regcache_print): Update.
8349         * regcache.h (regcache_dump_what): Move it to regcache.c.
8350         (regcache) <dump>: Remove.
8351
8352 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8353
8354         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8355          reg_buffer_rw *.
8356         (jit_unwind_reg_set_impl): Call raw_supply.
8357         (jit_frame_sniffer): Use reg_buffer_rw.
8358         * record-full.c (record_full_core_regbuf): Change its type.
8359         (record_full_core_open_1): Use reg_buffer_rw.
8360         (record_full_close): Likewise.
8361         (record_full_core_fetch_registers): Use regcache->raw_supply.
8362         (record_full_core_store_registers): Likewise.
8363         * regcache.c (regcache::get_register_status): Move it to
8364         reg_buffer.
8365         (regcache_raw_set_cached_value): Remove.
8366         (regcache::raw_set_cached_value): Remove.
8367         (regcache::raw_write): Call raw_supply.
8368         (regcache::raw_supply): Move it to reg_buffer_rw.
8369         * regcache.h (regcache_raw_set_cached_value): Remove.
8370         (reg_buffer_rw): New class.
8371
8372 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8373
8374         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8375         readonly_detached_regcache.
8376         (dummy_frame_prev_register): Use regcache->cooked_read.
8377         * frame.c (frame_save_as_regcache): Change return type.
8378         (frame_pop): Update.
8379         * frame.h (frame_save_as_regcache): Update declaration.
8380         * inferior.h (get_infcall_suspend_state_regcache): Update
8381         declaration.
8382         * infrun.c (infcall_suspend_state) <registers>: use
8383         readonly_detached_regcache.
8384         (save_infcall_suspend_state): Don't use regcache_dup.
8385         (get_infcall_suspend_state_regcache): Change return type.
8386         * linux-fork.c (struct fork_info) <savedregs>: Change to
8387         readonly_detached_regcache.
8388         <pc>: New field.
8389         (fork_save_infrun_state): Don't use regcache_dup.
8390         (info_checkpoints_command): Adjust.
8391         * mi/mi-main.c (register_changed_p): Update declaration.
8392         (mi_cmd_data_list_changed_registers): Use
8393         readonly_detached_regcache.
8394         (register_changed_p): Change parameter type to
8395         readonly_detached_regcache.
8396         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8397         readonly_detached_regcache.
8398         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8399         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8400         New.
8401         (regcache::save): Move it to reg_buffer.
8402         (regcache::restore): Change parameter type.
8403         (regcache_dup): Remove.
8404         * regcache.h (reg_buffer) <save>: New method.
8405         (readonly_detached_regcache): New class.
8406         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8407         readonly_detached_regcache.
8408         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8409
8410 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8411
8412         * frame.c (frame_save_as_regcache): Use regcache method save.
8413         (frame_pop): Use regcache method restore.
8414         * infrun.c (restore_infcall_suspend_state): Likewise.
8415         * linux-fork.c (fork_load_infrun_state): Likewise.
8416         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8417         save.
8418         * regcache.c (regcache_save): Remove.
8419         (regcache::restore): More asserts.
8420         (regcache_cpy): Remove.
8421         * regcache.h (regcache_save): Remove the declaration.
8422         (regcache::restore): Move from private to public.
8423         Remove the friend declaration of regcache_cpy.
8424         (regcache_cpy): Remove declaration.
8425
8426 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8427
8428         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8429         parameter type to 'readable_regcache *'.
8430         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8431         * arm-tdep.c (arm_neon_quad_read): Likewise.
8432         (arm_pseudo_read): Likewise.
8433         * avr-tdep.c (avr_pseudo_register_read): Likewise.
8434         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8435         * frv-tdep.c (frv_pseudo_register_read): Likewise.
8436         * gdbarch.c: Re-generated.
8437         * gdbarch.h: Re-generated.
8438         * gdbarch.sh (pseudo_register_read): Change parameter type to
8439         'readable_regcache *'.
8440         (pseudo_register_read_value): Likewise.
8441         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8442         (h8300_pseudo_register_read): Likewise.
8443         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8444         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8445         (i386_pseudo_register_read_into_value): Likewise.
8446         (i386_pseudo_register_read_value): Likewise.
8447         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8448         declaration.
8449         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8450         * m32c-tdep.c (m32c_raw_read): Likewise.
8451         (m32c_read_flg): Likewise.
8452         (m32c_banked_register): Likewise.
8453         (m32c_banked_read): Likewise.
8454         (m32c_sb_read): Likewise.
8455         (m32c_part_read): Likewise.
8456         (m32c_cat_read): Likewise.
8457         (m32c_r3r2r1r0_read): Likewise.
8458         (m32c_pseudo_register_read): Likewise.
8459         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8460         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8461         (mep_pseudo_cr64_read): Likewise.
8462         (mep_pseudo_register_read): Likewise.
8463         * mips-tdep.c (mips_pseudo_register_read): Likewise.
8464         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8465         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8466         * regcache.c (regcache::raw_read): Move it to readable_regcache.
8467         (regcache::cooked_read): Likewise.
8468         (regcache::cooked_read_value): Likewise.
8469         (regcache_cooked_read_signed):
8470         (regcache::cooked_read): Likewise.
8471         * regcache.h (readable_regcache): New class.
8472         (regcache): Inherit readable_regcache.  Move some methods to
8473         readable_regcache.
8474         * rl78-tdep.c (rl78_pseudo_register_read): Change
8475         parameter type to 'readable_regcache *'.
8476         * rs6000-tdep.c (do_regcache_raw_read): Remove.
8477         (e500_pseudo_register_read): Change parameter type to
8478         'readable_regcache *'.
8479         (dfp_pseudo_register_read): Likewise.
8480         (vsx_pseudo_register_read): Likewise.
8481         (efpr_pseudo_register_read): Likewise.
8482         * s390-tdep.c (s390_pseudo_register_read): Likewise.
8483         * sh-tdep.c (sh_pseudo_register_read): Likewise.
8484         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8485         (sh64_pseudo_register_read): Likewise.
8486         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8487         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8488         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8489         (spu_pseudo_register_read): Likewise.
8490         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8491         (xtensa_pseudo_register_read): Likewise.
8492
8493 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8494
8495         * regcache.c (regcache::regcache): Call reg_buffer ctor.
8496         (regcache::arch): Move it to reg_buffer::arch.
8497         (regcache::register_buffer): Likewise.
8498         (regcache::assert_regnum): Likewise.
8499         (regcache::num_raw_registers): Likewise.
8500         * regcache.h (reg_buffer): New class.
8501         (regcache): Inherit reg_buffer.
8502
8503 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
8504
8505         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8506         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8507
8508 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
8509
8510         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8511
8512 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
8513
8514         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8515         (SFILES): Remove common/*.c files.
8516         (COMMON_OBS): Remove some *.o files built from common/*.c files.
8517         * common/common.host: Add common reference.
8518         * configure.ac: Likewise.
8519         * configure: Regenerate.
8520
8521 2018-02-16  Yao Qi  <yao.qi@linaro.org>
8522
8523         * block.c (block_namespace_info): Inherit allocate_on_obstack.
8524         (block_initialize_namespace): Use new.
8525         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8526         (dwarf2_free_objfile): Use delete.
8527         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8528         (copy_type_recursive): Use new.
8529         * gdb_obstack.h (allocate_on_obstack): New.
8530
8531 2018-02-15  Yao Qi  <yao.qi@linaro.org>
8532
8533         PR gdb/22849
8534         * inferior.c (exit_inferior_1): Reset inf->control.
8535
8536 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
8537
8538         * ada-lang.c (ada_to_fixed_value_create): Delete advance
8539         declaration.
8540
8541 2018-02-14  Pedro Alves  <palves@redhat.com>
8542
8543         * frame-unwind.c (frame_unwind_try_unwinder): Always call
8544         frame_cleanup_after_sniffer on exception.
8545
8546 2018-02-14  Tom Tromey  <tom@tromey.com>
8547
8548         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8549         const.
8550         (solib_bfd_open): Make pathname const.
8551         * solib.c (solib_bfd_open): Make pathname const.
8552         * solib-spu.c (spu_bfd_fopen): Make name const.
8553         (spu_bfd_open): Make pathname const.
8554         * solib-darwin.c (darwin_bfd_open): Make pathname const.
8555         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8556
8557 2018-02-14  Tom Tromey  <tom@tromey.com>
8558
8559         * symfile.c (symfile_bfd_open): Update.
8560         * source.h (openp, source_full_path_of, find_and_open_source):
8561         Change argument type to unique_xmalloc_ptr.
8562         * source.c (openp): Take a unique_xmalloc_ptr.
8563         (source_full_path_of, find_and_open_source): Likewise.
8564         (open_source_file, symtab_to_fullname): Update.
8565         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8566         unique_xmalloc_ptr.
8567         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8568         (exec_file_find): Update.
8569         * psymtab.c (psymtab_to_fullname): Update.
8570         * nto-tdep.h (nto_find_and_open_solib): Update.
8571         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8572         unique_xmalloc_ptr.
8573         * exec.c (exec_file_attach): Update.
8574         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8575         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8576
8577 2018-02-14  Tom Tromey  <tom@tromey.com>
8578
8579         * solib.c: Include source.h.
8580         * nto-tdep.c: Include source.h.
8581         * mi/mi-cmd-env.c: Include source.h.
8582         * infcmd.c: Include source.h.
8583         * exec.c: Include source.h.
8584         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8585         (add_path, directory_switch, source_path, init_source_path): Move
8586         declarations...
8587         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8588         (add_path, directory_switch, source_path, init_source_path):
8589         ...here.
8590
8591 2018-02-14  Tom Tromey  <tom@tromey.com>
8592
8593         * solist.h (exec_file_find, solib_find): Return
8594         unique_xmalloc_ptr.
8595         (solib_bfd_fopen): Take a const char *.
8596         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8597         (exec_file_find, solib_find): Likewise.
8598         (solib_bfd_fopen): Do not take ownership of "pathname".
8599         (solib_bfd_open): Use unique_xmalloc_ptr.
8600         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8601         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8602         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8603         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8604
8605 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
8606
8607         * ada-lang.c (name_match_type_from_name): Remove reference to
8608         ada_name_for_lookup in function's documentation.
8609         * ada-lang.h (ada_name_for_lookup): Delete declaration.
8610
8611 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
8612
8613         * defs.h (enum openp_flags): New enum.
8614         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8615         Move to enum openp_flags.
8616         (openp_flags): New enum flags.
8617         (openp): Change parameter type to openp_flags.
8618         * source.c (openp): Change parameter type to openp_flags.
8619         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8620         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8621
8622 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
8623
8624         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8625         per-command.
8626
8627 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8628
8629         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8630         into...
8631         (class dwarf2_queue_guard): ...the destructor of this new class.
8632         (dw2_do_instantiate_symtab): Create instance of the new class
8633         dwarf2_queue_guard, remove cleanup.
8634
8635 2018-02-09  Tom Tromey  <tom@tromey.com>
8636
8637         * source.c (find_source_lines): Don't reference past the end of
8638         the vector.
8639
8640 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8641
8642         * remote.c (remote_btrace_maybe_reopen): Change error message.
8643         * btrace.c (btrace_enable): Likewise.
8644         (parse_xml_btrace): Likewise.
8645         (parse_xml_btrace_conf): Likewise.
8646
8647 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8648
8649         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8650         (linux_enable_pt, linux_enable_bts): Call
8651         diagnose_perf_event_open_fail.
8652
8653 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8654
8655         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8656         Remove parameter and change return type.  Update callers.  Move it.
8657         (linux_enable_bts, linux_enable_pt): Improve error message.
8658         (linux_enable_pt): Remove zero buffer size check.
8659         (linux_enable_btrace): Improve error messages.  Remove NULL return
8660         check.
8661
8662 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8663
8664         * btrace.c (btrace_enable): Remove target_supports_btrace call.
8665         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8666         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8667         (linux_supports_pt, linux_supports_btrace): Remove.
8668         (linux_enable_bts): Call cpu_supports_bts.
8669         * nat/linux-btrace.h (linux_supports_btrace): Remove.
8670         * remote.c (remote_supports_btrace): Remove.
8671         (init_remote_ops): Remove remote_supports_btrace.
8672         * target-delegates.c: Regenerated.
8673         * target.c (target_supports_btrace): Remove.
8674         * target.h (target_ops) <to_supports_btrace>: Remove
8675         (target_supports_btrace): Remove.
8676         * x86-linux-nat.c (x86_linux_create_target): Remove
8677         linux_supports_btrace.
8678
8679 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8680
8681         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8682         btrace failed.
8683         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8684         exception and use message in own exception.
8685
8686 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8687
8688         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8689         (perf_event_pt_event_type): Use gdb_file_up.
8690         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8691         scoped_fd, and scoped_mmap.
8692
8693 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8694
8695         * common/scoped_mmap.h: New.
8696         * unittests/scoped_mmap-selftest.c: New.
8697         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8698         unittests/scoped_mmap-selftest.c.
8699
8700 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
8701
8702         * common/scoped_fd.h: New.
8703         * unittests/scoped_fd-selftest.c: New.
8704         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8705         unittests/scoped_fd-selftest.c.
8706
8707 2018-02-09  Tom Tromey  <tom@tromey.com>
8708
8709         * auto-load.c (auto_load_section_scripts): Use
8710         gdb::unique_xmalloc_ptr.
8711
8712 2018-02-09  Tom Tromey  <tom@tromey.com>
8713
8714         * auto-load.c (execute_script_contents): Use std::string.
8715
8716 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
8717
8718         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8719         Python function, rather than a new command.
8720
8721 2018-02-08  Tom Tromey  <tom@tromey.com>
8722
8723         * solib.c (solib_find_1): Use std::string.
8724         (solib_bfd_fopen): Use unique_xmalloc_ptr.
8725
8726 2018-02-08  Tom Tromey  <tom@tromey.com>
8727
8728         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8729
8730 2018-02-08  Tom Tromey  <tom@tromey.com>
8731
8732         * source.c (find_source_lines): Use gdb::def_vector.
8733
8734 2018-02-08  Tom Tromey  <tom@tromey.com>
8735
8736         * macrocmd.c (struct temporary_macro_definition): New.
8737         (macro_define_command): Use temporary_macro_definition.  Remove
8738         cleanups.
8739         (free_macro_definition_ptr): Remove.
8740
8741 2018-02-08  Tom Tromey  <tom@tromey.com>
8742
8743         * macroexp.c (maybe_expand): Use std::string.
8744
8745 2018-02-08  Tom Tromey  <tom@tromey.com>
8746
8747         * macroexp.c (struct macro_buffer): Add initializers for some
8748         members.
8749         (init_buffer, init_shared_buffer, free_buffer)
8750         (free_buffer_return_text): Remove.
8751         (macro_buffer): New constructors.
8752         (~macro_buffer): New destructor.
8753         (macro_buffer::set_shared): New method.
8754         (macro_buffer::resize_buffer, macro_buffer::appendc)
8755         (macro_buffer::appendmem): Now methods, not free functions.
8756         (set_token, append_tokens_without_splicing, stringify)
8757         (macro_stringify): Update.
8758         (gather_arguments): Change return type.  Remove argc_p argument,
8759         add args_ptr argument.  Use std::vector.
8760         (substitute_args): Remove argc argument.  Accept std::vector.
8761         (expand): Update.  Use std::vector.
8762         (scan, macro_expand, macro_expand_next): Update.
8763
8764 2018-02-08  Tom Tromey  <tom@tromey.com>
8765
8766         * symtab.c (default_collect_symbol_completion_matches_break_on):
8767         Use unique_xmalloc_ptr.
8768         * macroscope.h: (sal_macro_scope, user_macro_scope)
8769         (default_macro_scope): Return unique_xmalloc_ptr.
8770         * macroscope.c (sal_macro_scope, user_macro_scope)
8771         (default_macro_scope): Return unique_xmalloc_ptr.
8772         * macroexp.h (macro_expand, macro_expand_once): Return
8773         unique_xmalloc_ptr.
8774         * macroexp.c (macro_expand, macro_expand_once): Return
8775         unique_xmalloc_ptr.
8776         * macrocmd.c (macro_expand_command, macro_expand_once_command)
8777         (info_macro_command, info_macros_command): Use
8778         unique_xmalloc_ptr.
8779         * compile/compile-c-support.c (write_macro_definitions): Use
8780         unique_xmalloc_ptr.
8781         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8782
8783 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
8784
8785         * value.c (value_static_field): Assign field type instead of
8786         containing type when returning an optimized out value.
8787
8788 2018-02-06  Yao Qi  <yao.qi@linaro.org>
8789
8790         * ft32-tdep.c (ft32_read_pc): Remove.
8791         (ft32_write_pc): Remove.
8792         (ft32_gdbarch_init): Update.
8793         * m32r-tdep.c (m32r_read_pc): Remove.
8794         (m32r_gdbarch_init): Update.
8795         * mep-tdep.c (mep_read_pc): Remove.
8796         (mep_gdbarch_init): Update.
8797         * microblaze-tdep.c (microblaze_write_pc): Remove.
8798         (microblaze_gdbarch_init): Update.
8799         * mn10300-tdep.c (mn10300_read_pc): Remove.
8800         (mn10300_write_pc): Remove.
8801         (mn10300_gdbarch_init): Update.
8802         * moxie-tdep.c (moxie_read_pc): Remove.
8803         (moxie_write_pc): Remove.
8804         (moxie_gdbarch_init): Update.
8805
8806 2018-02-06  Yao Qi  <yao.qi@linaro.org>
8807
8808         * expprint.c (print_subexp_standard): Handle
8809         OP_F77_UNDETERMINED_ARGLIST.
8810         (dump_subexp_body_standard): Likewise.
8811
8812 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
8813
8814         * target-descriptions.c (tdesc_element_visitor) Add empty
8815         implementations.
8816         (tdesc_type): Move make_gdb_type from here.
8817         (tdesc_type_builtin): Likewise.
8818         (tdesc_type_vector): Likewise.
8819         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8820         (make_gdb_type_struct): Move from tdesc_type_with_fields.
8821         (make_gdb_type_union): Likewise.
8822         (make_gdb_type_flags): Likewise.
8823         (make_gdb_type_enum): Likewise.
8824         (make_gdb_type): New function.
8825         (tdesc_register_type): Use static make_gdb_type.
8826
8827 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
8828
8829         * infcmd.c (default_print_one_register_info): Align natural-format
8830         column values consistently one under another.
8831         (pad_to_column): New function.
8832
8833 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
8834
8835         * dwarf2read.c (dwarf2_physname): Move commment.
8836
8837 2018-02-01  Leszek Swirski  <leszeks@google.com>
8838
8839         * varobj.c (varobj_formatted_print_options): Allow recursive
8840         pretty printing if pretty printing is enabled.
8841
8842 2018-02-01  Leszek Swirski  <leszeks@google.com>
8843
8844         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8845         names after a structop as a filename.
8846
8847 2018-02-01  Yao Qi  <yao.qi@linaro.org>
8848
8849         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8850         (arm_record_coproc_data_proc): Likewise.
8851
8852 2018-02-01  Yao Qi  <yao.qi@linaro.org>
8853
8854         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8855
8856 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
8857
8858         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8859         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8860
8861 2018-01-31  Pedro Alves  <palves@redhat.com>
8862
8863         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8864         * inflow.c (child_terminal_save_inferior): Wrap reference to
8865         tcgetpgrp in HAVE_TERMIOS_H.
8866         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8867         _WIN32.
8868         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8869         always iterate over all inferiors.
8870         (gdbsim_cntrl_c): Adjust.
8871         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8872
8873 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
8874
8875         * gdbtypes.c (lookup_array_range_type): Make sure the array's
8876         index type is objfile-owned if the element type is as well.
8877
8878 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
8879
8880         GDB 8.1 released.
8881
8882 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8883
8884         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8885         "features/s390x-linux64.c".
8886         (_initialize_s390_linux_tdep): Remove initialization of tdescs
8887         s390_linux32 and s390x_linux64.
8888         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8889         default tdesc.
8890         * s390-tdep.c: Include "features/s390-linux32.c" and
8891         "features/s390x-linux64.c".
8892         (s390_tdesc_valid): Add check for tdesc_has_registers.
8893         (s390_gdbarch_init): Make sure there is always a valid tdesc.
8894         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8895         tdesc_s390x_linux64.
8896         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8897         tdesc_s390x_linux64 to...
8898         * s390-tdep.h: ...here.
8899
8900 2018-01-30  Pedro Alves  <palves@redhat.com>
8901
8902         PR gdb/13211
8903         * config.in, configure: Regenerate.
8904         * configure.ac: Check for getpgid.
8905         * go32-nat.c (go32_pass_ctrlc): New.
8906         (go32_target): Install it.
8907         * inf-child.c (inf_child_target): Install
8908         child_terminal_save_inferior, child_pass_ctrlc and
8909         child_interrupt.
8910         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8911         (inf_ptrace_target): No longer install it.
8912         * infcmd.c (interrupt_target_1): Adjust.
8913         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8914         (child_interrupt): Declare.
8915         (inferior::terminal_state): New.
8916         * inflow.c (struct terminal_info): Update comments.
8917         (inferior_process_group): Delete.
8918         (terminal_is_ours): Delete.
8919         (gdb_tty_state): New.
8920         (child_terminal_init): Adjust.
8921         (is_gdb_terminal, sharing_input_terminal_1)
8922         (sharing_input_terminal): New functions.
8923         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
8924         Set the process's actual process group in the foreground if
8925         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
8926         mark terminal as the inferior's if not sharing GDB's terminal.
8927         Don't check attach_flag.
8928         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8929         pass down a target_terminal_state.
8930         (child_terminal_save_inferior): New, factored out from ...
8931         (child_terminal_ours_1): ... this.  Handle
8932         target_terminal_state::is_ours_for_output.
8933         (child_interrupt, child_pass_ctrlc): New.
8934         (inflow_inferior_exit): Clear the inferior's terminal_state.
8935         (copy_terminal_info): Copy the inferior's terminal state.
8936         (_initialize_inflow): Remove reference to terminal_is_ours.
8937         * inflow.h (inferior_process_group): Delete.
8938         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8939         * procfs.c (procfs_target): Don't install procfs_interrupt.
8940         (procfs_interrupt): Delete.
8941         * remote.c (remote_serial_quit_handler): Adjust.
8942         (remote_interrupt): Remove ptid parameter.  Adjust.
8943         * target-delegates.c: Regenerate.
8944         * target.c: Include "terminal.h".
8945         (target_terminal::terminal_state): Rename to ...
8946         (target_terminal::m_terminal_state): ... this.
8947         (target_terminal::init): Adjust.
8948         (target_terminal::inferior): Adjust to per-inferior
8949         terminal_state.
8950         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8951         (target_terminal::ours, target_terminal::ours_for_output): Use
8952         target_terminal_is_ours_kind.
8953         (target_interrupt): Remove ptid parameter.  Adjust.
8954         (default_target_pass_ctrlc): Adjust.
8955         * target.h (target_ops::to_terminal_save_inferior): New field.
8956         (target_ops::to_interrupt): Remove ptid_t parameter.
8957         (target_interrupt): Remove ptid_t parameter.  Update comment.
8958         (target_pass_ctrlc): Update comment.
8959         * target/target.h (target_terminal_state): New scoped enum,
8960         factored out of ...
8961         (target_terminal::terminal_state): ... here.
8962         (target_terminal::inferior): Update comments.
8963         (target_terminal::restore_inferior): New.
8964         (target_terminal::is_inferior, target_terminal::is_ours)
8965         (target_terminal::is_ours_for_output): Adjust.
8966         (target_terminal::scoped_restore_terminal_state): Adjust to
8967         rename, and call restore_inferior() instead of inferior().
8968         (target_terminal::scoped_restore_terminal_state::m_state): Change
8969         type.
8970         (target_terminal::terminal_state): Rename to ...
8971         (target_terminal::m_terminal_state): ... this and change type.
8972
8973 2018-01-30  Pedro Alves  <palves@redhat.com>
8974
8975         * linux-nat.c (wait_for_signal): New function.
8976         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8977         directly.
8978         (async_terminal_is_ours)
8979         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8980         (linux_nat_add_target): Don't override
8981         to_terminal_inferior/to_terminal_ours.
8982
8983 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
8984
8985         * remote.c (remote_follow_fork): Don't call "detach_inferior".
8986
8987 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
8988
8989         * dwarf2read.c (free_dwo_files): Add forward-declaration.
8990         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8991         dwarf2_per_objfile_free here.
8992         (dwarf2_per_objfile_free): Remove.
8993         (_initialize_dwarf2_read): Don't register
8994         dwarf2_per_objfile_free as a registry cleanup.
8995
8996 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
8997
8998         Avoid compilation errors in MinGW native builds
8999
9000         The error is triggered by including python-internal.h, and the
9001         error message is:
9002
9003              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9004                       from build-gnulib/import/math.h:27,
9005                       from d:/usr/Python26/include/pyport.h:235,
9006                       from d:/usr/Python26/include/Python.h:58,
9007                       from python/python-internal.h:94,
9008                       from python/py-arch.c:24:
9009              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9010         using ::hypot;
9011                 ^~~~~
9012
9013         This happens because Python headers define 'hypot' to expand t
9014         '_hypot' in the Windows builds.
9015         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9016         'hypoth'.  This avoids a compilation error.
9017
9018 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9019
9020         * MAINTAINERS (Write After Approval): Fix ordering.
9021
9022 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9023
9024         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9025
9026 2018-01-26  Alan Modra  <amodra@gmail.com>
9027
9028         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9029         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9030         Remove nop.  Make const.  Comment.
9031         (powerpc32_plt_stub_so_2): New.
9032         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9033         Correct count.  Update uses.
9034         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9035         Move common code reading PLT entry word.  Correct
9036         powerpc32_plt_stub PLT address calculation.
9037         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9038         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9039         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9040         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9041         (ppc64_standard_linkage8): Likewise.
9042         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9043         Correct insns description.
9044         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9045
9046 2018-01-24  Pedro Alves  <palves@redhat.com>
9047
9048         GCC PR libstdc++/83906
9049         * gdbtypes.c (operator==(const dynamic_prop &,
9050         const dynamic_prop &)): New.
9051         (operator==(const range_bounds &, const range_bounds &)): New.
9052         (check_types_equal): Use them instead of memcmp.
9053         * gdbtypes.h (operator==(const dynamic_prop &,
9054         const dynamic_prop &)): Declare.
9055         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9056         (operator==(const range_bounds &, const range_bounds &)): Declare.
9057         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9058
9059 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9060
9061         * s390-linux-tdep.c (s390_record_address_mask)
9062         (s390_record_calc_disp_common, s390_record_calc_disp)
9063         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9064         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9065         (s390_process_record): Move to s390-tdep.c.
9066         (s390_linux_init_abi_any): Adjust.
9067         * s390-tdep.c (s390_record_address_mask)
9068         (s390_record_calc_disp_common, s390_record_calc_disp)
9069         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9070         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9071         (s390_process_record): Moved from s390-linux-tdep.c
9072         (s390_gdbarch_init): Adjust.
9073
9074 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9075
9076         * s390-linux-nat.c (s390-tdep.h): New include.
9077         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9078         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9079         (ALLDEPFILES): Add s390-tdep.c.
9080         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9081         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9082         * s390-tdep.h: ...this.  New file.
9083         * s390-linux-tdep.c (s390-tdep.h): New include.
9084         (_initialize_s390_tdep): Rename to...
9085         (_initialize_s390_linux_tdep): ...this and adjust.
9086         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9087         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9088         s390-tdep.h.
9089         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9090         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9091         (s390_is_partial_instruction, s390_software_single_step)
9092         (is_non_branch_ril, s390_displaced_step_copy_insn)
9093         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9094         (s390_prologue_data, s390_addr, s390_store, s390_load)
9095         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9096         (s390_register_call_saved, s390_guess_tracepoint_registers)
9097         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9098         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9099         (s390_pseudo_register_name, s390_pseudo_register_type)
9100         (s390_pseudo_register_read, s390_pseudo_register_write)
9101         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9102         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9103         (s390_addr_bits_remove, s390_address_class_type_flags)
9104         (s390_address_class_type_flags_to_name)
9105         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9106         (s390_function_arg_float, s390_function_arg_vector)
9107         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9108         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9109         (s390_frame_align, s390_register_return_value, s390_return_value)
9110         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9111         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9112         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9113         (s390_trad_frame_prev_register, s390_unwind_cache)
9114         (s390_prologue_frame_unwind_cache)
9115         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9116         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9117         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9118         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9119         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9120         (s390_frame_base_address, s390_local_base_address)
9121         (s390_frame_base, s390_gcc_target_options)
9122         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9123         (s390_validate_reg_range, s390_tdesc_valid)
9124         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9125         * s390-tdep.c: ...this.  New file.
9126
9127 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9128
9129         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9130         (s390_process_record, s390_gdbarch_tdep_alloc)
9131         (s390_linux_init_abi_any): Use/set new hook.
9132
9133 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9134
9135         * s390-linux-tdep.c (osabi.h): New include.
9136         (s390_linux_init_abi_31, s390_linux_init_abi_64)
9137         (s390_linux_init_abi_any): New functions.
9138         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9139
9140 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9141
9142         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9143         tdesc_has_registers check
9144
9145 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9146
9147         * s390-linux-tdep.c (s390_tdesc_valid): New function.
9148         (s390_validate_reg_range): New macro.
9149         (s390_gdbarch_init): Adjust.
9150
9151 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9152
9153         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9154         (s390_gdbarch_tdep_alloc): Adjust.
9155         (s390_gdbarch_init): Adjust.
9156
9157 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9158
9159         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9160         <have_tdb>: Change type to bool.
9161         (s390_gdbarch_tdep_alloc): Adjust.
9162         (s390_gdbarch_init): Adjust.
9163
9164 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9165
9166         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9167         (gdbarch_tdep) <have_upper, have_vx>: New fields.
9168         (s390_gdbarch_tdep_alloc): New function.
9169         (s390_gdbarch_init): Allocate tdep at start and use its fields
9170         instead of separate variables.
9171
9172 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9173
9174         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9175         when looking for cached gdbarch and add comment for remaining.
9176
9177 2018-01-22  Pedro Alves  <palves@redhat.com>
9178             Sergio Durigan Junior  <sergiodj@redhat.com>
9179
9180         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9181         case.
9182
9183 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
9184
9185         * MAINTAINERS: Update my company e-mail address.
9186
9187 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9188
9189         * regcache.c (cooked_write_test): New function.
9190         (_initialize_regcache): Register the test.
9191
9192 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9193
9194         * ia64-tdep.c (ia64_pseudo_register_read): Call
9195         regcache->cooked_read instead of regcache_cooked_read_unsigned.
9196         * m32c-tdep.c (m32c_cat_read): Likewise.
9197         (m32c_r3r2r1r0_read): Likewise.
9198         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9199         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9200
9201 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9202
9203         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9204         method raw_read instead of regcache_raw_read.
9205         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9206         * arm-tdep.c (arm_neon_quad_read): Likewise.
9207         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9208         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9209         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9210         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9211         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9212         (i386_pseudo_register_read_into_value): Likewise.
9213         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9214         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9215         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9216         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9217         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9218         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
9219         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9220         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
9221         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9222
9223 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9224
9225         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9226         * configure.tgt: Remove target mt.
9227         * mt-tdep.c: Remove.
9228         * regcache.c (cooked_read_test): Remove the check for mt.
9229
9230 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9231
9232         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9233         instead of gdbarch_pseudo_register_read_value.
9234
9235 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9236
9237         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9238         language is Ada.
9239
9240 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9241
9242         * linespec.c (create_sals_line_offset): Remove code that preserved
9243         the symtab_and_line's line number.
9244
9245 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9246
9247         * varobj.c (varobj_create): Don't set valid_block when creating a
9248         floating varobj.
9249
9250 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9251
9252         * varobj.c (varobj_create): Remove out of date comment.
9253
9254 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9255
9256         PR mi/20395
9257         * ada-exp.y (write_var_from_sym): Pass extra parameter when
9258         updating innermost block.
9259         * parse.c (innermost_block_tracker::update): Take extra type
9260         parameter, and check types match before updating innermost block.
9261         (write_dollar_variable): Update innermost block for registers.
9262         * parser-defs.h (enum innermost_block_tracker_type): New enum.
9263         (innermost_block_tracker::innermost_block_tracker): Initialise
9264         m_types member.
9265         (innermost_block_tracker::reset): Take type parameter.
9266         (innermost_block_tracker::update): Take type parameter, and pass
9267         type through as needed.
9268         (innermost_block_tracker::m_types): New member.
9269         * varobj.c (varobj_create): Pass type when reseting innermost
9270         block.
9271
9272 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9273
9274         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9275         * ada-lang.c (resolve_subexp): Likewise.
9276         * breakpoint.c (set_breakpoint_condition) Likewise.
9277         (watch_command_1) Likewise.
9278         * c-exp.y (variable): Likewise.
9279         * d-exp.y (PrimaryExpression): Likewise.
9280         * f-exp.y (variable): Likewise.
9281         * go-exp.y (variable): Likewise.
9282         * m2-exp.y (variable): Likewise.
9283         * objfiles.c (objfile::~objfile): Likewise.
9284         * p-exp.y (variable): Likewise.
9285         * parse.c (innermost_block): Change type.
9286         * parser-defs.h (class innermost_block_tracker): New.
9287         (innermost_block): Change to innermost_block_tracker.
9288         * printcmd.c (display_command): Switch to innermost_block API.
9289         (do_one_display): Likewise.
9290         * rust-exp.y (do_one_display): Likewise.
9291         * symfile.c (clear_symtab_users): Likewise.
9292         * varobj.c (varobj_create): Switch to innermost_block API, replace
9293         use of innermost_block with block stored on varobj object.
9294
9295 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9296
9297         * expression.h (innermost_block): Remove declaration.
9298         * varobj.c: Add 'parser-defs.h' include.
9299
9300 2018-01-19  Tom Tromey  <tom@tromey.com>
9301
9302         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9303         symbols in the static and global blocks.
9304
9305 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
9306
9307         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9308         gdb_ptrace.h, and move including gdb_wait.h ...
9309         * nat/linux-ptrace.h: ... to here.
9310
9311 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9312
9313         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9314         inf_ptrace_detach_success.
9315         (inf_ptrace_detach_success): Add inferior parameter, use it
9316         instead of inferior_ptid, pass it to detach_inferior.
9317         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9318         parameter.
9319         * inferior.c (detach_inferior): Add overload that takes an
9320         inferior object.
9321         * inferior.h (detach_inferior): Likewise.
9322         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9323         use inferior_ptid, adjust call to inf_ptrace_detach_success.
9324         * linux-thread-db.c (thread_db_detach): Use inf parameter.
9325
9326 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9327
9328         * target.h (struct target_ops) <to_detach>: Add inferior
9329         parameter.
9330         (target_detach): Likewise.
9331         * target.c (dispose_inferior): Pass inferior down.
9332         (target_detach): Pass inferior down.  Assert that it is equal to
9333         the current inferior.
9334         * aix-thread.c (aix_thread_detach): Pass inferior down.
9335         * corefile.c (core_file_command): Pass current_inferior() down.
9336         * corelow.c (core_detach): Add inferior parameter.
9337         * darwin-nat.c (darwin_detach): Likewise.
9338         * gnu-nat.c (gnu_detach): Likewise.
9339         * inf-ptrace.c (inf_ptrace_detach): Likewise.
9340         * infcmd.c (detach_command): Pass current_inferior() down to
9341         target_detach.
9342         * infrun.c (follow_fork_inferior): Pass parent_inf to
9343         target_detach.
9344         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9345         target_detach.
9346         * linux-nat.c (linux_nat_detach): Add inferior parameter.
9347         * linux-thread-db.c (thread_db_detach): Likewise.
9348         * nto-procfs.c (procfs_detach): Likewise.
9349         * procfs.c (procfs_detach): Likewise.
9350         * record.c (record_detach): Likewise.
9351         * record.h (struct inferior): Forward-declare.
9352         (record_detach): Add inferior parameter.
9353         * remote-sim.c (gdbsim_detach): Likewise.
9354         * remote.c (remote_detach_1): Likewise.
9355         (remote_detach): Likewise.
9356         (extended_remote_detach): Likewise.
9357         * sol-thread.c (sol_thread_detach): Likewise.
9358         * target-debug.h (target_debug_print_inferior_p): New macro.
9359         * target-delegates.c: Re-generate.
9360         * top.c (kill_or_detach): Pass inferior down to target_detach.
9361         * windows-nat.c (windows_detach): Add inferior parameter.
9362
9363 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9364
9365         * target.h (struct target_ops) <to_detach>: Remove args
9366         parameter.
9367         (target_detach): Likewise.
9368         * target.c (dispose_inferior): Adjust.
9369         (target_detach): Remove args parameter, adjust.
9370         * aix-thread.c (aix_thread_detach): Adjust.
9371         * corefile.c (core_file_command): Adjust.
9372         * corelow.c (core_detach): Adjust.
9373         * darwin-nat.c (darwin_detach): Adjust.
9374         * gnu-nat.c (gnu_detach): Adjust.
9375         * inf-ptrace.c (inf_ptrace_detach): Adjust.
9376         * infcmd.c (detach_command): Adjust
9377         * infrun.c (follow_fork_inferior): Adjust.
9378         (handle_vfork_child_exec_or_exit): Adjust.
9379         * linux-fork.c (linux_fork_detach): Remove args parameter.
9380         * linux-fork.h (linux_fork_detach): Likewise.
9381         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9382         * linux-thread-db.c (thread_db_detach): Likewise.
9383         * nto-procfs.c (procfs_detach): Likewise.
9384         * procfs.c (procfs_detach): Likewise.
9385         (do_detach): Remove signo parameter.
9386         * record.c (record_detach): Remove args parameter.
9387         * record.h (record_detach): Likewise.
9388         * remote-sim.c (gdbsim_detach): Likewise.
9389         * remote.c (remote_detach_1): Likewise.
9390         (remote_detach): Likewise.
9391         (extended_remote_detach): Likewise.
9392         * sol-thread.c (sol_thread_detach): Likewise.
9393         * target-delegates.c: Re-generate.
9394         * top.c (struct qt_args) <args>: Remove field.
9395         (kill_or_detach): Don't pass args.
9396         (quit_force): Don't set args.
9397         * windows-nat.c (windows_detach): Remove args parameter.
9398
9399 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9400
9401         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9402         (arm_linux_init_abi): Install it.
9403
9404 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9405
9406         * osabi.c (gdb_osabi_names): Extend the regexp for
9407         arm-linux-gnueabihf.
9408
9409 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9410
9411         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9412         m_abbrevs.
9413         (abbrev_table::add_abbrev): Update.
9414         (abbrev_table::lookup_abbrev): Update.
9415
9416 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9417
9418         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9419
9420 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
9421
9422         * compile/compile.c (compile_to_object): Convert "triplet_rx"
9423         to "std::string".
9424
9425 2018-01-17  Tom Tromey  <tom@tromey.com>
9426
9427         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
9428
9429 2018-01-17  Tom Tromey  <tom@tromey.com>
9430
9431         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9432         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9433         (create_array_type_with_stride): Update.
9434         * dwarf2read.c (set_die_type): Update.
9435
9436 2018-01-17  Tom Tromey  <tom@tromey.com>
9437
9438         * dwarf2read.c (delayed_method_info): Remove typedef.
9439         (dwarf2_cu::method_info): Now a std::vector.
9440         (add_to_method_list): Update.
9441         (free_delayed_list): Remove.
9442         (compute_delayed_physnames): Update.
9443         (process_full_comp_unit, process_full_type_unit): Clear the method
9444         list.  Remove cleanups.
9445         (psymtab_include_file_name): Add name_holder parameter.  Use
9446         unique_xmalloc_ptr.
9447         (dwarf_decode_lines): Update.
9448
9449 2018-01-17  Tom Tromey  <tom@tromey.com>
9450             Simon Marchi  <simon.marchi@ericsson.com>
9451
9452         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9453         (dwarf2_per_objfile::free_cached_comp_units)
9454         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9455         (init_cutu_and_read_dies_no_follow): Update.
9456         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9457         (dwarf2_cu::~dwarf2_cu): New.
9458         (free_heap_comp_unit, free_stack_comp_unit): Remove.
9459         (age_cached_comp_units, free_one_cached_comp_unit): Update.
9460
9461 2018-01-17  Tom Tromey  <tom@tromey.com>
9462             Simon Marchi  <simon.marchi@ericsson.com>
9463
9464         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9465         (struct die_reader_specs) <abbrev_table>: New member.
9466         (struct abbrev_table): Add constructor.
9467         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9468         <abbrev_obstack>: Now an auto_obstack.
9469         (abbrev_table_up): New typedef.
9470         (init_cu_die_reader): Add abbrev_table parameter.
9471         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9472         Add result_dwo_abbrev_table.
9473         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9474         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9475         Update.
9476         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9477         parameter.
9478         (skip_children): Update.
9479         (abbrev_table::alloc_abbrev): Rename from
9480         abbrev_table_alloc_abbrev.
9481         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9482         (abbrev_table::lookup_abbrev): Rename from
9483         abbrev_table_lookup_abbrev.
9484         (abbrev_table_read_table): Return abbrev_table_up.
9485         (abbrev_table_free, abbrev_table_free_cleanup)
9486         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9487         (load_partial_dies): Update.
9488
9489 2018-01-17  Tom Tromey  <tom@tromey.com>
9490
9491         * dwarf2read.c (dwarf2_compute_name): Update comment.
9492         (read_func_scope, read_variable): Update.
9493         (new_symbol): Remove.
9494         (new_symbol_full): Rename to new_symbol.
9495
9496 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
9497
9498         PR gdb/16577
9499         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9500         a warning instead of throwing an error, set section size to 0 and return
9501         NULL.
9502         * gdb_bfd.h (gdb_bfd_map_section): Update description.
9503
9504 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
9505
9506         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9507         std::string.
9508         (linux_ptrace_attach_fail_reason_string): Likewise.
9509         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9510         Likewise.
9511         (linux_ptrace_attach_fail_reason_string): Likewise.
9512         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9513
9514 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
9515
9516         * linux-nat.c (linux_nat_attach): Remove xstrdup.
9517
9518 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
9519
9520         PR gdb/21559
9521         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9522         checking for fs_base/gs_base fields in struct user_regs_struct.
9523         * configure: Regenerate.
9524
9525 2018-01-17  Yao Qi  <yao.qi@linaro.org>
9526
9527         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9528         function.
9529         (aarch64_linux_init_abi): Install it to gdbarch hook
9530         gcc_target_options.
9531
9532 2018-01-15  Pedro Alves  <palves@redhat.com>
9533
9534         * common/signals-state-save-restore.c
9535         (save_original_signals_state): Fix typos.
9536
9537 2017-01-12  Tom Tromey  <tom@tromey.com>
9538             Sergio Durigan Junior  <sergiodj@redhat.com>
9539
9540         * Makefile.in (install-only): Install gdb-add-index.
9541
9542 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
9543
9544         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9545
9546 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9547
9548         * infrun.c (keep_going_pass_signal): Clear step-over info when
9549         insert_breakpoints fails.
9550
9551 2018-01-11  Pedro Alves  <palves@redhat.com>
9552
9553         PR gdb/22583
9554         * infrun.c (resume): Rename to ...
9555         (resume_1): ... this.
9556         (resume): Reimplement as wrapper around resume_1.
9557
9558 2018-01-11  Pedro Alves  <palves@redhat.com>
9559
9560         PR remote/22597
9561         * remote.c (remote_parse_stop_reply): Default to the last-set
9562         general thread instead of to 'magic_null_ptid'.
9563
9564 2018-01-10  Pedro Alves  <palves@redhat.com>
9565
9566         * language.h (language_get_symbol_name_matcher): Rename ...
9567         (get_symbol_name_matcher): ... this.
9568         * language.c (language_get_symbol_name_matcher): Ditto.
9569         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9570         callers adjusted.
9571
9572 2018-01-10  Pedro Alves  <palves@redhat.com>
9573
9574         PR gdb/22670
9575         * dwarf2read.c
9576         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9577         Adjust to use language_get_symbol_name_matcher instead of
9578         language_defn::la_get_symbol_name_matcher.
9579         * language.c (language_get_symbol_name_matcher): If in Ada mode
9580         and the lookup name is a verbatim match, return Ada's matcher.
9581         * language.h (language_get_symbol_name_matcher): Adjust comment.
9582         (ada_lookup_name_info::verbatim_p):: New method.
9583
9584 2018-01-10  Pedro Alves  <palves@redhat.com>
9585
9586         PR gdb/22670
9587         * ada-lang.c (ada_collect_symbol_completion_matches): If the
9588         minsym's language is language_auto or language_cplus, pass down
9589         language_ada instead.
9590         * symtab.c (compare_symbol_name): Don't frob symbol language here.
9591
9592 2018-01-10  Pedro Alves  <palves@redhat.com>
9593
9594         PR gdb/22670
9595         * minsyms.c (linkage_name_str): New function.
9596         (iterate_over_minimal_symbols): Use it.
9597
9598 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
9599
9600         * NEWS: Document that 'info proc' now works on FreeBSD.
9601
9602 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
9603
9604         * configure.ac: Check for kinfo_getfile in libutil.
9605         * configure: Regenerate.
9606         * config.in: Regenerate.
9607         * fbsd-nat.c: Include "fbsd-tdep.h".
9608         (fbsd_fetch_cmdline): New.
9609         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9610         rather than calling error.
9611         (fbsd_info_proc): New.
9612         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9613         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9614         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9615
9616 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
9617
9618         * fbsd-nat.c (struct free_deleter): Remove.
9619         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9620
9621 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
9622
9623         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9624         NULL for an empty pathname.
9625
9626 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
9627
9628         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9629         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9630         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9631         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9632         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9633         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9634         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9635         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9636         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9637         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9638         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9639         (fbsd_core_fetch_timeval, fbsd_print_sigset)
9640         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9641         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
9642         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9643
9644 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
9645
9646         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9647         (gnu_xfer_auxv): New function.
9648         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9649         TARGET_OBJECT_AUXV.
9650
9651 2018-01-08  Yao Qi  <yao.qi@linaro.org>
9652             Simon Marchi  <simon.marchi@ericsson.com>
9653
9654         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9655         common/selftest.c.
9656         (COMMON_OBS): Remove selftest.o.
9657         * configure.ac: Append selftest-arch.c and common/selftest.c to
9658         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
9659         * configure: Re-generated.
9660         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9661         GDB_SELF_TEST.
9662         (maintenance_info_selftests): Likewise.
9663
9664 2018-01-08  Xavier Roirand  <roirand@adacore.com>
9665
9666         * ada-valprint.c (val_print_packed_array_elements): Use
9667         proper number of elements when printing an array indexed
9668         by an enumeration type.
9669
9670 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
9671
9672         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9673         (dw2_get_file_names_reader): Adjust.
9674         (lookup_dwo_signatured_type): Adjust.
9675         (lookup_dwp_signatured_type): Adjust.
9676         (lookup_signatured_type): Adjust.
9677         (create_type_unit_group): Adjust.
9678         (get_type_unit_group): Adjust.
9679         (process_psymtab_comp_unit_reader): Adjust.
9680         (build_type_psymtabs_reader): Adjust.
9681         (scan_partial_symbols): Adjust.
9682         (add_partial_symbol): Adjust.
9683         (add_partial_subprogram): Adjust.
9684         (peek_die_abbrev): Adjust.
9685         (fixup_go_packaging): Adjust.
9686         (process_imported_unit_die): Adjust.
9687         (dwarf2_compute_name): Adjust.
9688         (dwarf2_physname): Adjust.
9689         (read_import_statement): Adjust.
9690         (handle_DW_AT_stmt_list): Adjust.
9691         (read_file_scope): Adjust.
9692         (read_func_scope): Adjust.
9693         (read_lexical_block_scope): Adjust.
9694         (read_call_site_scope): Adjust.
9695         (read_variable): Adjust.
9696         (dwarf2_rnglists_process): Adjust.
9697         (dwarf2_ranges_process): Adjust.
9698         (dwarf2_ranges_read): Adjust.
9699         (dwarf2_get_pc_bounds): Adjust.
9700         (dwarf2_record_block_ranges): Adjust.
9701         (dwarf2_add_field): Adjust.
9702         (dwarf2_add_member_fn): Adjust.
9703         (read_structure_type): Adjust.
9704         (process_structure_scope): Adjust.
9705         (read_enumeration_type): Adjust.
9706         (read_array_type): Adjust.
9707         (mark_common_block_symbol_computed): Adjust.
9708         (read_common_block): Adjust.
9709         (read_namespace_type): Adjust.
9710         (read_namespace): Adjust.
9711         (read_module_type): Adjust.
9712         (read_tag_pointer_type): Adjust.
9713         (read_tag_ptr_to_member_type): Adjust.
9714         (read_tag_string_type): Adjust.
9715         (read_subroutine_type): Adjust.
9716         (read_typedef): Adjust.
9717         (read_base_type): Adjust.
9718         (attr_to_dynamic_prop): Adjust.
9719         (read_subrange_type): Adjust.
9720         (read_unspecified_type): Adjust.
9721         (dwarf2_read_abbrevs): Adjust.
9722         (load_partial_dies): Adjust.
9723         (read_partial_die): Adjust.
9724         (find_partial_die): Adjust.
9725         (guess_partial_die_structure_name): Adjust.
9726         (fixup_partial_die): Adjust.
9727         (read_attribute_value): Adjust.
9728         (read_addr_index): Adjust.
9729         (read_addr_index_from_leb128): Adjust.
9730         (read_str_index): Adjust.
9731         (dwarf2_string_attr): Adjust.
9732         (get_debug_line_section): Adjust.
9733         (dwarf_decode_line_header): Adjust.
9734         (lnp_state_machine::check_line_address): Adjust.
9735         (dwarf_decode_lines_1): Adjust.
9736         (dwarf_decode_lines): Adjust.
9737         (dwarf2_start_symtab): Adjust.
9738         (var_decode_location): Adjust.
9739         (new_symbol_full): Adjust.
9740         (dwarf2_const_value_data): Adjust.
9741         (dwarf2_const_value_attr): Adjust.
9742         (dwarf2_const_value): Adjust.
9743         (die_type): Adjust.
9744         (die_containing_type): Adjust.
9745         (build_error_marker_type): Adjust.
9746         (lookup_die_type): Adjust.
9747         (guess_full_die_structure_name): Adjust.
9748         (anonymous_struct_prefix): Adjust.
9749         (determine_prefix): Adjust.
9750         (dwarf2_name): Adjust.
9751         (follow_die_ref_or_sig): Adjust.
9752         (follow_die_offset): Adjust.
9753         (follow_die_ref): Adjust.
9754         (follow_die_sig_1): Adjust.
9755         (follow_die_sig): Adjust.
9756         (get_signatured_type): Adjust.
9757         (get_DW_AT_signature_type): Adjust.
9758         (decode_locdesc): Adjust.
9759         (dwarf_decode_macros): Adjust.
9760         (cu_debug_loc_section): Adjust.
9761         (fill_in_loclist_baton): Adjust.
9762         (dwarf2_symbol_mark_computed): Adjust.
9763         (init_one_comp_unit): Don't assign
9764         dwarf2_cu::dwarf2_per_objfile.
9765         (set_die_type): Adjust.
9766
9767 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
9768
9769         * dwarf2read.c (struct mapped_debug_names): Add constructor.
9770         <dwarf2_per_objfile>: New field.
9771         (dwarf2_per_objfile): Remove global.
9772         (get_dwarf2_per_objfile): New function.
9773         (set_dwarf2_per_objfile): New function.
9774         (dwarf2_build_psymtabs_hard): Change objfile parameter to
9775         dwarf2_per_objfile.
9776         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9777         (read_abbrev_offset): Likewise.
9778         (read_indirect_string): Likewise.
9779         (read_indirect_line_string): Likewise.
9780         (read_indirect_string_at_offset): Likewise.
9781         (read_indirect_string_from_dwz): Likewise.
9782         (dwarf2_find_containing_comp_unit): Change objfile parameter to
9783         dwarf2_per_objfile.
9784         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9785         (create_all_comp_units): Change objfile parameter to
9786         dwarf2_per_objfile.
9787         (create_all_type_units): Likewise.
9788         (process_queue): Add dwarf2_per_objfile parameter.
9789         (read_and_check_comp_unit_head): Likewise.
9790         (lookup_dwo_unit_in_dwp): Likewise.
9791         (get_dwp_file): Likewise.
9792         (process_cu_includes): Likewise.
9793         (struct free_dwo_file_cleanup_data): New struct.
9794         (dwarf2_has_info): Use get_dwarf2_per_objfile and
9795         set_dwarf2_per_objfile.
9796         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9797         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9798         context, adjust calls.
9799         (dw2_instantiate_symtab): Likewise.
9800         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9801         (dw2_get_cu): Likewise.
9802         (create_cu_from_index_list): Change objfile parameter to
9803         dwarf2_per_objfile.
9804         (create_cus_from_index_list): Get dwarf2_per_objfile from
9805         context, adjust calls.
9806         (create_cus_from_index): Likewise.
9807         (create_signatured_type_table_from_index): Change objfile
9808         parameter to dwarf2_per_objfile.
9809         (create_signatured_type_table_from_debug_names): Change objfile
9810         parameter to dwarf2_per_objfile.
9811         (create_addrmap_from_index): Likewise.
9812         (create_addrmap_from_aranges): Likewise.
9813         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9814         (dw2_setup): Remove.
9815         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9816         context.
9817         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9818         get_dwarf2_per_objfile.
9819         (dw2_forget_cached_source_info): Likewise.
9820         (dw2_map_symtabs_matching_filename): Likewise.
9821         (struct dw2_symtab_iterator) <index>: Remove.
9822         <dwarf2_per_objfile>: New field.
9823         (dw2_symtab_iter_init): Replace index parameter with
9824         dwarf2_per_objfile.
9825         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9826         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9827         (dw2_print_stats): Likewise.
9828         (dw2_dump): Likewise.
9829         (dw2_expand_symtabs_for_function): Likewise.
9830         (dw2_expand_all_symtabs): Likewise.
9831         (dw2_expand_symtabs_with_fullname): Likewise.
9832         (dw2_expand_marked_cus): Replace index and objfile parameters
9833         with dwarf2_per_objfile.
9834         (dw_expand_symtabs_matching_file_matcher): Add
9835         dwarf2_per_objfile parameter and adjust calls.
9836         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9837         adjust calls.
9838         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9839         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9840         adjust calls.
9841         (create_cus_from_debug_names_list): Replace objfile parameter
9842         with dwarf2_per_objfile and adjust calls.
9843         (create_cus_from_debug_names): Likewise.
9844         (dwarf2_read_debug_names): Likewise.
9845         (mapped_debug_names::namei_to_name): Adjust call.
9846         (dw2_debug_names_iterator::next): Likewise.
9847         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9848         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9849         (dw2_debug_names_dump): Likewise.
9850         (dw2_debug_names_expand_symtabs_for_function): Likewise.
9851         (dw2_debug_names_expand_symtabs_matching): Likewise.
9852         (dwarf2_initialize_objfile): Likewise.
9853         (dwarf2_build_psymtabs): Likewise.
9854         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9855         this_cu.
9856         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9857         (read_and_check_comp_unit_head): Likewise.
9858         (read_abbrev_offset): Likewise.
9859         (create_debug_type_hash_table): Likewise.
9860         (create_debug_types_hash_table): Likewise.
9861         (create_all_type_units): Replace objfile parameter with
9862         dwarf2_per_objfile.
9863         (add_type_unit): Add dwarf2_per_objfile parameter.
9864         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9865         with dwarf2_per_objfile.
9866         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9867         (lookup_dwp_signatured_type): Likewise.
9868         (lookup_signatured_type): Likewise.
9869         (read_cutu_die_from_dwo): Likewise.
9870         (init_tu_and_read_dwo_dies): Likewise.
9871         (init_cutu_and_read_dies): Likewise.
9872         (init_cutu_and_read_dies_no_follow): Likewise.
9873         (allocate_type_unit_groups_table): Add objfile parameter.
9874         (create_type_unit_group): Use dwarf2_per_objfile from cu.
9875         (get_type_unit_group): Likewise.
9876         (process_psymtab_comp_unit): Update call.
9877         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9878         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9879         (print_tu_stats): Likewise.
9880         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9881         in void* parameter.
9882         (build_type_psymtabs): Change objfile parameter to
9883         dwarf2_per_objfile.
9884         (process_skeletonless_type_unit): Use dwarf2_per_objfile
9885         passed in void* parameter.
9886         (process_skeletonless_type_units): Change objfile parameter to
9887         dwarf2_per_objfile.
9888         (set_partial_user): Likewise.
9889         (dwarf2_build_psymtabs_hard): Likewise.
9890         (read_comp_units_from_section): Likewise.
9891         (create_all_comp_units): Likewise.
9892         (scan_partial_symbols): Update calls.
9893         (add_partial_symbol): Likewise.
9894         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9895         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9896         (process_queue): Add dwarf2_per_objfile parameter.
9897         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9898         (compute_compunit_symtab_includes): Likewise.
9899         (process_cu_includes): Add dwarf2_per_objfile parameter.
9900         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9901         (process_full_type_unit): Likewise.
9902         (process_imported_unit_die): Update call.
9903         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9904         (read_file_scope): Likewise.
9905         (allocate_dwo_file_hash_table): Add objfile parameter.
9906         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9907         (create_cus_hash_table): Likewise.
9908         (create_dwp_hash_table): Likewise.
9909         (create_dwo_unit_in_dwp_v1): Likewise.
9910         (create_dwp_v2_section): Likewise.
9911         (create_dwo_unit_in_dwp_v2): Likewise.
9912         (lookup_dwo_unit_in_dwp): Likewise.
9913         (try_open_dwop_file): Likewise.
9914         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9915         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9916         cleanup to include a reference to dwarf2_per_objfile.
9917         (open_dwp_file): Add dwarf2_per_objfile parameter.
9918         (open_and_init_dwp_file): Likewise.
9919         (get_dwp_file): Likewise.
9920         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9921         (queue_and_load_all_dwo_tus): Update call.
9922         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9923         data.
9924         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9925         (dwarf2_ranges_process): Likewise.
9926         (dwarf2_get_pc_bounds): Likewise.
9927         (mark_common_block_symbol_computed): Likewise.
9928         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9929         (dwarf2_read_abbrevs): Update call.
9930         (read_partial_die): Use dwarf2_per_objfile from cu.
9931         (find_partial_die): Likewise.
9932         (fixup_partial_die): Likewise.
9933         (read_attribute_value): Likewise.
9934         (read_indirect_string_at_offset_from): Add objfile parameter.
9935         (read_indirect_string_at_offset): Add dwarf2_per_objfile
9936         parameter.
9937         (read_indirect_string_from_dwz): Add objfile parameter.
9938         (read_indirect_string): Add objfile parameter.
9939         (read_addr_index_1): Add dwarf2_per_objfile parameter.
9940         (read_addr_index): Use dwarf2_per_objfile from cu.
9941         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9942         call dw2_setup.
9943         (read_str_index): Use dwarf2_per_objfile from cu.
9944         (get_debug_line_section): Likewise.
9945         (read_formatted_entries): Add dwarf2_per_objfile parameter.
9946         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9947         (new_symbol_full): Use dwarf2_per_objfile from cu.
9948         (build_error_marker_type): Likewise.
9949         (lookup_die_type): Likewise.
9950         (determine_prefix): Likewise.
9951         (follow_die_offset): Likewise.
9952         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9953         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9954         (dwarf2_fetch_die_type_sect_off): Likewise.
9955         (dwarf2_get_die_type): Likewise.
9956         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9957         (get_signatured_type): Likewise.
9958         (get_DW_AT_signature_type): Likewise.
9959         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9960         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9961         (cu_debug_loc_section): Likewise.
9962         (fill_in_loclist_baton): Likewise.
9963         (dwarf2_symbol_mark_computed): Likewise.
9964         (dwarf2_find_containing_comp_unit): Change objfile parameter to
9965         dwarf2_per_objfile.
9966         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9967         parameter.
9968         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9969         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9970         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9971         (set_die_type): Use dwarf2_free_objfile from cu.
9972         (get_die_type_at_offset): Likewise.
9973         (dwarf2_per_objfile_free): Don't assign global variable.
9974         (debug_names) <constructor>: Add dwarf2_per_objfile
9975         parameter, update m_debugstrlookup construction.
9976         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9977         parameter.
9978         <m_dwarf2_per_objfile>: New field.
9979         <lookup>: Use m_dwarf2_per_objfile.
9980         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9981         (psyms_seen_size): Likewise.
9982         (write_gdbindex): Replace objfile parameter with
9983         dwarf2_per_objfile.
9984         (write_debug_names): Likewise.
9985         (write_psymtabs_to_index): Likewise.
9986         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9987         calls.
9988
9989 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
9990
9991         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9992         <dwarf2_per_objfile>: New field.
9993         (struct dwarf2_per_cu_data) <objfile>: Remove.
9994         <dwarf2_per_objfile>: New field.
9995         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9996         of objfile.
9997         (create_signatured_type_table_from_index): Likewise.
9998         (create_debug_type_hash_table): Likewise.
9999         (fill_in_sig_entry_from_dwo_entry): Likewise.
10000         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10001         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10002         objfile.
10003         (create_partial_symtab): Access objfile through
10004         dwarf2_per_objfile.
10005         (process_psymtab_comp_unit_reader): Likewise.
10006         (read_comp_units_from_section): Likewise.
10007         (scan_partial_symbols): Likewise.
10008         (add_partial_symbol): Likewise.
10009         (add_partial_subprogram): Likewise.
10010         (peek_die_abbrev): Likewise.
10011         (fixup_go_packaging): Likewise.
10012         (process_full_comp_unit): Likewise.
10013         (process_full_type_unit): Likewise.
10014         (process_imported_unit_die): Likewise.
10015         (dwarf2_compute_name): Likewise.
10016         (dwarf2_physname): Likewise.
10017         (read_import_statement): Likewise.
10018         (create_cus_hash_table): Assign dwarf2_physname instead of
10019         objfile.
10020         (read_func_scope): Access objfile through dwarf2_per_objfile.
10021         (read_lexical_block_scope): Likewise.
10022         (read_call_site_scope): Likewise.
10023         (read_variable): Likewise.
10024         (dwarf2_rnglists_process): Likewise.
10025         (dwarf2_ranges_process): Likewise.
10026         (dwarf2_ranges_read): Likewise.
10027         (dwarf2_record_block_ranges): Likewise.
10028         (dwarf2_add_field): Likewise.
10029         (dwarf2_add_member_fn): Likewise.
10030         (read_structure_type): Likewise.
10031         (process_structure_scope): Likewise.
10032         (read_enumeration_type): Likewise.
10033         (read_array_type): Likewise.
10034         (read_common_block): Likewise.
10035         (read_namespace_type): Likewise.
10036         (read_namespace): Likewise.
10037         (read_module_type): Likewise.
10038         (read_tag_pointer_type): Likewise.
10039         (read_tag_ptr_to_member_type): Likewise.
10040         (read_tag_string_type): Likewise.
10041         (read_subroutine_type): Likewise.
10042         (read_typedef): Likewise.
10043         (read_base_type): Likewise.
10044         (attr_to_dynamic_prop): Likewise.
10045         (read_subrange_type): Likewise.
10046         (read_unspecified_type): Likewise.
10047         (load_partial_dies): Likewise.
10048         (read_partial_die): Likewise.
10049         (find_partial_die): Likewise.
10050         (guess_partial_die_structure_name): Likewise.
10051         (fixup_partial_die): Likewise.
10052         (read_attribute_value): Likewise.
10053         (read_addr_index_from_leb128): Likewise.
10054         (dwarf2_read_addr_index): Likewise.
10055         (dwarf2_string_attr): Likewise.
10056         (lnp_state_machine::check_line_address): Likewise.
10057         (dwarf_decode_lines_1): Likewise.
10058         (dwarf_decode_lines): Likewise.
10059         (dwarf2_start_symtab): Likewise.
10060         (var_decode_location): Likewise.
10061         (new_symbol_full): Likewise.
10062         (dwarf2_const_value_data): Likewise.
10063         (dwarf2_const_value_attr): Likewise.
10064         (dwarf2_const_value): Likewise.
10065         (die_type): Likewise.
10066         (die_containing_type): Likewise.
10067         (lookup_die_type): Likewise.
10068         (guess_full_die_structure_name): Likewise.
10069         (anonymous_struct_prefix): Likewise.
10070         (dwarf2_name): Likewise.
10071         (follow_die_ref_or_sig): Likewise.
10072         (follow_die_offset): Likewise.
10073         (follow_die_ref): Likewise.
10074         (dwarf2_fetch_die_loc_sect_off): Likewise.
10075         (dwarf2_fetch_constant_bytes): Likewise.
10076         (dwarf2_fetch_die_type_sect_off): Likewise.
10077         (dwarf2_get_die_type): Likewise.
10078         (follow_die_sig): Likewise.
10079         (decode_locdesc): Likewise.
10080         (dwarf2_per_cu_objfile): Likewise.
10081         (dwarf2_per_cu_text_offset): Likewise.
10082         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10083         objfile.
10084         (set_die_type): Access objfile through
10085         dwarf2_per_objfile.
10086
10087 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10088
10089         * valprint.c (converted_character_d): Remove typedef.
10090         (DEF_VEC_O (converted_character_d)): Remove.
10091         (count_next_character): Use std::vector.
10092         (print_converted_chars_to_obstack): Likewise.
10093         (generic_printstr): Likewise.
10094
10095 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10096
10097         * xml-support.h (struct gdb_xml_value): Add constructor.
10098         <value>: Change type to unique_xmalloc_ptr.
10099         (gdb_xml_value_s): Remove typedef.
10100         (DEF_VEC_O (gdb_xml_value_s)): Remove.
10101         (gdb_xml_element_start_handler): Change parameter type to
10102         std::vector.
10103         (xml_find_attribute): Likewise.
10104         * xml-support.c (xml_find_attribute): Change parameter type to
10105         std::vector and adjust.
10106         (gdb_xml_values_cleanup): Remove.
10107         (gdb_xml_parser::start_element): Adjust to std::vector.
10108         (xinclude_start_include): Change paraeter type to std::vector
10109         and adjust.
10110         * btrace.c (check_xml_btrace_version): Likewise.
10111         (parse_xml_btrace_block): Likewise.
10112         (parse_xml_btrace_pt_config_cpu): Likewise.
10113         (parse_xml_btrace_pt): Likewise.
10114         (parse_xml_btrace_conf_bts): Likewise.
10115         (parse_xml_btrace_conf_pt): Likewise.
10116         * memory-map.c (memory_map_start_memory): Likewise.
10117         (memory_map_start_property): Likewise.
10118         * osdata.c (osdata_start_osdata): Likewise.
10119         (osdata_start_item): Likewise.
10120         (osdata_start_column): Likewise.
10121         * remote.c (start_thread): Likewise.
10122         * solib-aix.c (library_list_start_library): Likewise.
10123         (library_list_start_list): Likewise.
10124         * solib-svr4.c (library_list_start_library): Likewise.
10125         (svr4_library_list_start_list): Likewise.
10126         * solib-target.c (library_list_start_segment): Likewise.
10127         (library_list_start_section): Likewise.
10128         (library_list_start_library): Likewise.
10129         (library_list_start_list): Likewise.
10130         * tracepoint.c (traceframe_info_start_memory): Likewise.
10131         (traceframe_info_start_tvar): Likewise.
10132         * xml-syscall.c (syscall_start_syscall): Likewise.
10133         * xml-tdesc.c (tdesc_start_target): Likewise.
10134         (tdesc_start_feature): Likewise.
10135         (tdesc_start_reg): Likewise.
10136         (tdesc_start_union): Likewise.
10137         (tdesc_start_struct): Likewise.
10138         (tdesc_start_flags): Likewise.
10139         (tdesc_start_enum): Likewise.
10140         (tdesc_start_field): Likewise.
10141         (tdesc_start_enum_value): Likewise.
10142         (tdesc_start_vector): Likewise.
10143
10144 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10145
10146         * extension.h (struct xmethod_worker) <clone>: Remove.
10147         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10148         Remove.
10149         (python_xmethod_worker::clone): Remove.
10150         * valops.c (find_overload_match): Use std::move instead of
10151         clone.
10152
10153 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10154
10155         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10156         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10157         <free_xmethod_worker_data>: Remove.
10158         <get_matching_xmethod_workers>: Chance VEC to std::vector.
10159         <get_xmethod_arg_types>: Remove.
10160         <get_xmethod_result_type>: Remove.
10161         <invoke_xmethod>: Remove.
10162         * extension.c (new_xmethod_worker): Remove.
10163         (clone_xmethod_worker): Remove.
10164         (get_matching_xmethod_workers): Return void, pass std::vector by
10165         pointer.
10166         (get_xmethod_arg_types): Rename to...
10167         (xmethod_worker::get_arg_types): ... this, and adjust.
10168         (get_xmethod_result_type): Rename to...
10169         (xmethod_worker::get_result_type): ... this, and adjust.
10170         (invoke_xmethod): Remove.
10171         (free_xmethod_worker): Remove.
10172         (free_xmethod_worker_vec): Remove.
10173         * extension.h (enum ext_lang_rc): Move here from
10174         extension-priv.h.
10175         (struct xmethod_worker): Add constructor and destructor.
10176         <data>: Remove.
10177         <value>: Remove.
10178         <invoke, clone, do_get_result_type, do_get_arg_types>: New
10179         virtual pure methods.
10180         <get_arg_types, get_result_type>: New methods.
10181         (xmethod_worker_ptr): Remove typedef.
10182         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10183         (xmethod_worker_vec): Remove typedef.
10184         (xmethod_worker_up): New typedef.
10185         (invoke_xmethod): Remove.
10186         (clone_xmethod_worker): Remove.
10187         (free_xmethod_worker): Remove.
10188         (free_xmethod_worker_vec): Remove.
10189         (get_xmethod_arg_types): Remove.
10190         (get_xmethod_result_type): Remove.
10191         * valops.c (find_method_list): Use std::vector, don't use
10192         intermediate vector.
10193         (value_find_oload_method_list): Use std::vector.
10194         (find_overload_match): Use std::vector.
10195         (find_oload_champ): Use std::vector.
10196         * value.c (value_free): Use operator delete.
10197         (value_of_xmethod): Rename to...
10198         (value_from_xmethod): ... this.  Don't assign
10199         xmethod_worker::value, take rvalue-reference.
10200         (result_type_of_xmethod): Adjust.
10201         (call_xmethod): Adjust.
10202         * value.h: Include extension.h.
10203         (struct xmethod_worker): Don't forward-declare.
10204         (value_of_xmethod): Rename to...
10205         (value_from_xmethod): ... this, take rvalue-reference.
10206         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10207         (struct python_xmethod_worker): ... this, add constructor and
10208         destructor.
10209         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10210         (gdbpy_free_xmethod_worker_data): Rename to...
10211         (python_xmethod_worker::~python_xmethod_worker): ... this and
10212         adjust.
10213         (gdbpy_clone_xmethod_worker_data): Rename to...
10214         (python_xmethod_worker::clone): ... this and adjust.
10215         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10216         temporary vector.
10217         (gdbpy_get_xmethod_arg_types): Rename to...
10218         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10219         (gdbpy_get_xmethod_result_type): Rename to...
10220         (python_xmethod_worker::do_get_result_type): ... this and
10221         adjust.
10222         (gdbpy_invoke_xmethod): Rename to...
10223         (python_xmethod_worker::invoke): ... this and adjust.
10224         (new_python_xmethod_worker): Rename to...
10225         (python_xmethod_worker::python_xmethod_worker): ... this and
10226         adjust.
10227         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10228         Remove.
10229         (gdbpy_free_xmethod_worker_data): Remove.
10230         (gdbpy_get_matching_xmethod_workers): Use std::vector.
10231         (gdbpy_get_xmethod_arg_types): Remove.
10232         (gdbpy_get_xmethod_result_type): Remove.
10233         (gdbpy_invoke_xmethod): Remove.
10234         * python/python.c (python_extension_ops): Remove obsolete
10235         callbacks.
10236
10237 2018-01-05  Pedro Alves  <palves@redhat.com>
10238
10239         PR gdb/18653
10240         * common/signals-state-save-restore.c
10241         (save_original_signals_state): New parameter 'quiet'.  Warn if we
10242         find a custom handler preinstalled, instead of internal erroring.
10243         But only warn if !quiet.
10244         * common/signals-state-save-restore.h
10245         (save_original_signals_state): New parameter 'quiet'.
10246         * main.c (captured_main_1): Move save_original_signals_state call
10247         after option handling, and pass QUIET.
10248
10249 2018-01-05  Pedro Alves  <palves@redhat.com>
10250
10251         * spu-tdep.c (spu_catch_start): Pass
10252         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10253
10254 2018-01-05  Pedro Alves  <palves@redhat.com>
10255
10256         PR gdb/22670
10257         * ada-lang.c (literal_symbol_name_matcher): New function.
10258         (ada_get_symbol_name_matcher): Use it for
10259         symbol_name_match_type::SEARCH_NAME.
10260         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
10261         it down instead of assuming symbol_name_match_type::FULL.
10262         * block.h (block_lookup_symbol): New parameter 'match_type'.
10263         * c-valprint.c (print_unpacked_pointer): Use
10264         lookup_symbol_search_name instead of lookup_symbol.
10265         * compile/compile-object-load.c (get_out_value_type): Pass down
10266         symbol_name_match_type::SEARCH_NAME.
10267         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10268         symbol_name_match_type::FULL.
10269         * cp-support.c (cp_get_symbol_name_matcher): Handle
10270         symbol_name_match_type::SEARCH_NAME.
10271         * infrun.c (insert_exception_resume_breakpoint): Use
10272         lookup_symbol_search_name.
10273         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10274         * psymtab.c (maintenance_check_psymtabs): Use
10275         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10276         * stack.c (print_frame_args): Use lookup_symbol_search_name and
10277         SYMBOL_SEARCH_NAME.
10278         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10279         if symbol_name_match_type::SEARCH_NAME.
10280         (lookup_symbol_in_language): Pass down
10281         symbol_name_match_type::FULL.
10282         (lookup_symbol_search_name): New.
10283         (lookup_language_this): Pass down
10284         symbol_name_match_type::SEARCH_NAME.
10285         (lookup_symbol_aux, lookup_local_symbol): New parameter
10286         'match_type'.  Pass it down.
10287         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10288         (lookup_symbol_search_name): New declaration.
10289         (lookup_symbol_in_block): New 'match_type' parameter.
10290
10291 2018-01-05  Pedro Alves  <palves@redhat.com>
10292
10293         PR gdb/22670
10294         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10295         ada_lookup_symbol.
10296         (ada_lookup_symbol): Reimplement in terms of
10297         ada_lookup_symbol_list, bits factored out from
10298         ada_lookup_encoded_symbol.
10299
10300 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10301
10302         * ada-exp.y (write_object_renaming): When subscripting an array
10303         using a symbol as the index, pass the block in call to
10304         ada_lookup_encoded_symbol when looking that symbol up.
10305
10306 2018-01-05  Jerome Guitton  <guitton@adacore.com>
10307
10308         * ada-lang.c (ada_array_length): Use ada_index_type instead of
10309         TYPE_INDEX_TYPE.
10310
10311 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10312
10313         * ada-lang.c (ada_to_fixed_value_create): Add handling of
10314         the case where VALUE_LVAL (val0) is not lval_memory.
10315
10316 2018-01-05  Xavier Roirand  <roirand@adacore.com>
10317
10318         * ada-valprint.c (print_optional_low_bound): Handle
10319         character-indexed array printing like boolean-indexed array
10320         printing.
10321
10322 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10323
10324         * NEWS: Create a new section for the next release branch.
10325         Rename the section of the current branch, now that it has
10326         been cut.
10327
10328 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10329
10330         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10331         * version.in: Bump version to 8.1.50.DATE-git.
10332
10333 2018-01-03  Xavier Roirand  <roirand@adacore.com>
10334
10335         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10336         Add field.
10337         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10338         Add field.
10339         (default_exception_support_info) <catch_handlers_sym>: Add field.
10340         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10341         (ada_exception_name_addr_1): Add "catch handlers" handling.
10342         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10343         Update all callers.
10344         (create_excep_cond_exprs) <ex>: Add parameter.
10345         (re_set_exception): Update create_excep_cond_exprs call.
10346         (print_it_exception, print_one_exception, print_mention_exception)
10347         (print_recreate_exception): Add "catch handler" handling.
10348         (allocate_location_catch_handlers, re_set_catch_handlers)
10349         (check_status_catch_handlers, print_it_catch_handlers)
10350         (print_one_catch_handlers, print_mention_catch_handlers)
10351         (print_recreate_catch_handlers): New function.
10352         (catch_handlers_breakpoint_ops): New variable.
10353         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10354         Add parameter.  Add "catch handler" handling.
10355         (ada_exception_sym_name, ada_exception_breakpoint_ops):
10356         Add "catch handler" handling.
10357         (ada_exception_catchpoint_cond_string): Add "catch handler"
10358         handling.
10359         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10360         call.
10361         (catch_ada_handlers_command): New function.
10362         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10363         operations structure.
10364         (_initialize_ada_language): Add "catch handlers" command entry.
10365         * NEWS: Document "catch handlers" feature.
10366
10367 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10368
10369         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10370         account when creating the array type of the slice.
10371         (ada_value_slice): Likewise.
10372
10373 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10374
10375         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10376         New enum value.
10377         (create_array_type_with_stride): Add byte_stride_prop parameter.
10378         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10379         New parameter.  Update all callers in this file.
10380         (array_type_has_dynamic_stride): New function.
10381         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10382         of arrays with dynamic byte strides.
10383         * dwarf2read.c (read_array_type): Add support for dynamic
10384         DW_AT_byte_stride attributes.
10385
10386 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10387
10388         * dwarf2read.c (read_unspecified_type): Treat
10389         DW_TAG_enumeration_type DIEs from Ada units as stubs.
10390
10391 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10392
10393         Update copyright year range in all GDB files.
10394
10395 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10396
10397         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10398         and gdb/testsuite/gdb.base/step-line.c.
10399
10400 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10401
10402         * copyright.py (main): Dump the contents of
10403         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10404         even if BY_HAND is empty.
10405
10406 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10407
10408         * top.c (print_gdb_version): Update Copyright year in version
10409         message.
10410
10411 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10412
10413         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10414
10415 For older changes see ChangeLog-2017.
10416 \f
10417 Local Variables:
10418 mode: change-log
10419 left-margin: 8
10420 fill-column: 74
10421 version-control: never
10422 coding: utf-8
10423 End: