Remove internal_complaint
[external/binutils.git] / gdb / ChangeLog
1 2018-05-23  Tom Tromey  <tom@tromey.com>
2
3         * complaints.c (internal_complaint): Remove.
4         * complaints.h (internal_complaint): Remove.
5
6 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7
8         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9
10 2018-05-22  Pedro Alves  <palves@redhat.com>
11
12         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
13         (remote_fileio_badfd, remote_fileio_return_errno)
14         (remote_fileio_return_success, remote_fileio_func_open)
15         (remote_fileio_func_open, remote_fileio_func_close)
16         (remote_fileio_func_read, remote_fileio_func_write)
17         (remote_fileio_func_lseek, remote_fileio_func_rename)
18         (remote_fileio_func_unlink, remote_fileio_func_stat)
19         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
20         (remote_fileio_func_isatty, remote_fileio_func_system): Add
21         remote_target parameter.
22         (remote_fio_func_map) <func>: Add remote_target parameter.
23         (do_remote_fileio_request, remote_fileio_request):
24         * remote-fileio.h (remote_fileio_request):
25         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
26         remote_target parameter.
27         (remote_notif_process, handle_notification): Adjust to pass down
28         the remote.
29         (remote_notif_state_allocate): Add remote_target parameter.  Save
30         it.
31         * remote-notif.h (struct remote_target): Forward declare.
32         (struct notif_client) <parse, ack, can_get_pending_events>: Add
33         remote_target parameter.
34         (struct remote_notif_state) <remote>: New field.
35         (remote_notif_ack, remote_notif_parse): Add remote_target
36         parameter.
37         (remote_notif_state_allocate, remote_notif_state_allocate): Add
38         remote_target parameter.
39         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
40         (threads_listing_context, rmt_thread_action, protocol_feature)
41         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
42         (packet_result, struct threads_listing_context, remote_state):
43         Move definitions and declarations higher up.
44         (remote_target) <~remote_target>: Declare.
45         (remote_download_command_source, remote_file_put, remote_file_get)
46         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
47         (remote_hostio_pread_vFile, remote_hostio_send_command)
48         (remote_hostio_set_filesystem, remote_hostio_open)
49         (remote_hostio_close, remote_hostio_unlink, remote_state)
50         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
51         (get_memory_write_packet_size, get_memory_read_packet_size)
52         (append_pending_thread_resumptions, remote_detach_1)
53         (append_resumption, remote_resume_with_vcont)
54         (add_current_inferior_and_thread, wait_ns, wait_as)
55         (process_stop_reply, remote_notice_new_inferior)
56         (process_initial_stop_replies, remote_add_thread)
57         (btrace_sync_conf, remote_btrace_maybe_reopen)
58         (remove_new_fork_children, kill_new_fork_children)
59         (discard_pending_stop_replies, stop_reply_queue_length)
60         (check_pending_events_prevent_wildcard_vcont)
61         (discard_pending_stop_replies_in_queue, stop_reply)
62         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
63         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
64         (remote_interrupt_as, remote_interrupt_ns)
65         (remote_get_noisy_reply, remote_query_attached)
66         (remote_add_inferior, remote_current_thread, get_current_thread)
67         (set_thread, set_general_thread, set_continue_thread)
68         (set_general_process, write_ptid)
69         (remote_unpack_thread_info_response, remote_get_threadinfo)
70         (parse_threadlist_response, remote_get_threadlist)
71         (remote_threadlist_iterator, remote_get_threads_with_ql)
72         (remote_get_threads_with_qxfer)
73         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
74         (get_offsets, remote_check_symbols, remote_supported_packet)
75         (remote_query_supported, remote_packet_size)
76         (remote_serial_quit_handler, remote_detach_pid)
77         (remote_vcont_probe, remote_resume_with_hc)
78         (send_interrupt_sequence, interrupt_query)
79         (remote_notif_get_pending_events, fetch_register_using_p)
80         (send_g_packet, process_g_packet, fetch_registers_using_g)
81         (store_register_using_P, store_registers_using_G)
82         (set_remote_traceframe, check_binary_download)
83         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
84         (remote_xfer_live_readonly_partial, remote_read_bytes)
85         (remote_send_printf, remote_flash_write, readchar)
86         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
87         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
88         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
89         (extended_remote_disable_randomization, extended_remote_run)
90         (send_environment_packet, extended_remote_environment_support)
91         (extended_remote_set_inferior_cwd, remote_write_qxfer)
92         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
93         (packet_command): Now methods of ...
94         (remote_target): ... this class.
95         (m_remote_state) <remote_target>: New field.
96         (struct remote_state) <stop_reply_queue,
97         remote_async_inferior_event_token, wait_forever_enabled_p>: New
98         fields.
99         (remote_state::remote_state): Allocate stop_reply_queue.
100         (remote_state): Delete global.
101         (get_remote_state_raw): Delete.
102         (remote_target::get_remote_state): Allocate m_remote_state on
103         demand.
104         (get_current_remote_target): New.
105         (remote_ops, extended_remote_ops): Delete.
106         (wait_forever_enabled_p, remote_async_inferior_event_token):
107         Delete, moved to struct remote_state.
108         (remote_target::close): Delete self.  Destruction bits split to
109         ...
110         (remote_target::~remote_target): ... this.
111         (show_memory_packet_size): Adjust to use
112         get_current_remote_target.
113         (struct protocol_feature) <func>: Add remote_target parameter.
114         All callers adjusted.
115         (curr_quit_handler_target): New.
116         (remote_serial_quit_handler): Reimplement.
117         (remote_target::open_1): Adjust to use get_current_remote_target.
118         Heap-allocate remote_target/extended_remote_target instances.
119         (vcont_builder::vcont_builder): Add remote_target parameter, and
120         save it in m_remote.  All callers adjusted.
121         (vcont_builder::m_remote): New field.
122         (vcont_builder::restart, vcont_builder::flush)
123         (vcont_builder::push_action): Use it.
124         (remote_target::commit_resume): Use it.
125         (struct queue_iter_param) <remote>: New field.
126         (remote_target::remove_new_fork_children): Fill in 'remote' field.
127         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
128         (check_pending_event_prevents_wildcard_vcont_callback)
129         (remote_target::check_pending_events_prevent_wildcard_vcont)
130         (remote_target::discard_pending_stop_replies)
131         (remote_target::discard_pending_stop_replies_in_queue)
132         (remote_target::remote_notif_remove_queued_reply): Fill in
133         'remote' field.
134         (remote_notif_get_pending_events): New.
135         (remote_target::readchar, remote_target::remote_serial_write):
136         Save/restore curr_quit_handler_target.
137         (putpkt): New.
138         (kill_new_fork_children): Fill in 'remote' field.
139         (packet_command): Use get_current_remote_target, defer to
140         remote_target method of same name.
141         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
142         parameter, and save it in m_remote.  All callers adjusted.
143         (scoped_remote_fd::release): Use m_remote.
144         (scoped_remote_fd::m_remote): New field.
145         (remote_file_put, remote_file_get, remote_file_delete): Use
146         get_current_remote_target, defer to remote_target method of same
147         name.
148         (remote_btrace_reset): Add remote_state paremeter.  Update all
149         callers.
150         (remote_async_inferior_event_handler). Pass down 'data'.
151         (remote_new_objfile): Use get_current_remote_target.
152         (remote_target::vcont_r_supported): New.
153         (set_range_stepping): Use get_current_remote_target and
154         remote_target::vcont_r_supported.
155         (_initialize_remote): Don't allocate 'remote_state' and
156         'stop_reply_queue' globals.
157         * remote.h (struct remote_target): Forward declare.
158         (getpkt, putpkt, remote_notif_get_pending_events): Add
159         'remote_target' parameter.
160
161 2018-05-22  Pedro Alves  <palves@redhat.com>
162
163         * remote.c (vcont_builder): Now a class.  Make all data members
164         private.
165         (vcont_builder) <vcont_builder, restart, flush, push_action>:
166         Declare methods.
167         (vcont_builder_restart): Rename to ...
168         (vcont_builder::restart): ... this.
169         (vcont_builder_flush): Rename to ...
170         (vcont_builder::flush): ... this.
171         (vcont_builder_push_action): Rename to ...
172         (vcont_builder::push_action): ... this.
173         (remote_target::commit_resume): Adjust.
174
175 2018-05-22  Pedro Alves  <palves@redhat.com>
176
177         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
178         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
179         (get_fixed_memory_packet_size): New.
180         (get_memory_packet_size): Use it.
181         (set_memory_packet_size): Don't override the config size with
182         DEFAULT_MAX_MEMORY_PACKET_SIZE.
183         (show_memory_packet_size): Use get_fixed_memory_packet_size.
184         Don't refer to get_memory_packet_size if not connected to a remote
185         target.  Show "(default)" if configured size is 0.
186
187 2018-05-22  Pedro Alves  <palves@redhat.com>
188
189         * remote.c (remote_target::mourn_inferior): Move
190         discard_pending_stop_replies call here from ...
191         (_initialize_remote): ... here.
192
193 2018-05-22  Pedro Alves  <palves@redhat.com>
194
195         * remote.c (compare_section_command): Remove set_general_process
196         call.
197
198 2018-05-22  Pedro Alves  <palves@redhat.com>
199
200         * remote.c (struct packet_reg, struct remote_arch_state):
201         Move higher up in the file.
202         (remote_state) <m_arch_states>: Store remote_arch_state values
203         instead of remote_arch_state pointers.
204         (remote_state::get_remote_arch_state): Adjust.
205
206 2018-05-22  Pedro Alves  <palves@redhat.com>
207
208         * remote.c: Include <unordered_map>.
209         (remote_state): Now a class.
210         (remote_state) <get_remote_arch_state>: Declare method.
211         <get_remote_arch_state>: New field.
212         (remote_arch_state) <remote_arch_state>: Declare ctor.
213         <regs>: Now a unique_ptr.
214         (remote_gdbarch_data_handle): Delete.
215         (get_remote_arch_state): Delete.
216         (remote_state::get_remote_arch_state): New.
217         (get_remote_state): Adjust to call remote_state's
218         get_remote_arch_state method.
219         (init_remote_state): Delete, bits factored out to ...
220         (remote_arch_state::remote_arch_state): ... this new method.
221         (get_remote_packet_size, get_memory_packet_size)
222         (process_g_packet, remote_target::fetch_registers)
223         (remote_target::prepare_to_store, store_registers_using_G)
224         (remote_target::store_registers, remote_target::get_trace_status):
225         Adjust to call remote_state's method.
226         (_initialize_remote): Remove reference to
227         remote_gdbarch_data_handle.
228
229 2018-05-22  Pedro Alves  <palves@redhat.com>
230
231         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
232         pread>: New method declarations.
233         (remote_target::open_1): Adjust.
234         (readahead_cache_invalidate): Rename to ...
235         (readahead_cache::invalidate): ... this, and adjust to be a class
236         method.
237         (readahead_cache_invalidate_fd): Rename to ...
238         (readahead_cache::invalidate_fd): ... this, and adjust to be a
239         class method.
240         (remote_hostio_pwrite): Adjust.
241         (remote_hostio_pread_from_cache): Rename to ...
242         (readahead_cache::pread): ... this, and adjust to be a class
243         method.
244         (remote_hostio_close): Adjust.
245
246 2018-05-22  Pedro Alves  <palves@redhat.com>
247
248         * remote.c (remote_hostio_close_cleanup): Delete.
249         (class scoped_remote_fd): New.
250         (remote_file_put, remote_file_get): Use it.
251
252 2018-05-22  Pedro Alves  <palves@redhat.com>
253
254         (struct vCont_action_support): Use bool and initialize all fields.
255         (struct readahead_cache): Initialize all fields.
256         (remote_state): Use bool and initialize all fields.
257         (remote_state::remote_state, remote_state::~remote_state): New.
258         (new_remote_state): Delete.
259         (_initialize_remote): Use new to allocate remote_state.
260
261 2018-05-22  Pedro Alves  <palves@redhat.com>
262             張俊芝  <zjz@zjz.name>
263
264         PR gdb/22973
265         * c-exp.y: Include "c-support.h".
266         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
267         of tolower.  Use c_ident_is_alpha to scan names.
268         * c-lang.c: Include "c-support.h".
269         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
270         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
271         * c-support.h: New file, with bits factored out from ...
272         * cp-name-parser.y: ... this file.
273         Include "c-support.h".
274         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
275         c-support.h and renamed.
276         (symbol_end, yylex): Adjust.
277
278 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
279
280         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
281         parameter type to CORE_ADDR.
282         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
283         parameter type in declaration to CORE_ADDR.
284         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
285         target_auxv_search to get AT_HWCAP and use the result to get the
286         target description.
287         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
288         to CORE_ADDR. Remove the cast of the return value to unsigned
289         long. Fix error predicate of target_auxv_search.
290         (ppc_linux_nat_target::read_description): Change the type of the
291         hwcap variable to CORE_ADDR.
292
293 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
294
295         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
296         if the size of fpscr is larger than 32 bits.
297
298 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
299
300         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
301         (ppc32_linux_vsxregmap): New global.
302         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
303         regcache_supply_regset, and regcache_collect_regset.
304         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
305         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
306         (fetch_vsx_register, store_vsx_register): Remove.
307         (fetch_vsx_registers): Add regno parameter. Get regset using
308         ppc_linux_vsxregset. Use regset to supply registers.
309         (store_vsx_registers): Add regno parameter. Get regset using
310         ppc_linux_vsxregset. Use regset to collect registers.
311         (fetch_register): Call fetch_vsx_registers instead of
312         fetch_vsx_register.
313         (store_register): Call store_vsx_registers instead of
314         store_vsx_register.
315         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
316         new regno parameter.
317         (store_ppc_registers): Call store_vsx_registers with -1 for the
318         new regno parameter.
319         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
320         (ppc_collect_vsxregset): Remove.
321
322 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
323
324         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
325         offset fields.
326         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
327         for vector register offset fields.
328         (ppc64_fbsd_reg_offsets): Likewise.
329         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
330         to vector register offset fields.
331         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
332         to vector register offset fields.
333         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
334         vector register offset fields.
335         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
336         initializers for vector register offset fields.
337         (rs6000_aix64_reg_offsets): Likewise.
338         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
339         (ppc_supply_vrregset): Remove.
340         (ppc_collect_vrregset): Remove.
341         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
342         (ppc_linux_vrregset) : New function.
343         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
344         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
345         (ppc32_linux_vrregset): Remove.
346         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
347         and use result instead of ppc32_linux_vrregset.
348         (ppc32_linux_reg_offsets): Remove initializers for vector register
349         offset fields.
350         (ppc64_linux_reg_offsets): Likewise.
351         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
352         * ppc-linux-nat.c: Include regset.h.
353         (gdb_vrregset_t): Adjust comment to account for little-endian
354         mode.
355         (supply_vrregset, fill_vrregset): Remove.
356         (fetch_altivec_register, store_altivec_register): Remove.
357         (fetch_altivec_registers): Add regno parameter. Get regset using
358         ppc_linux_vrregset. Use regset to supply registers.
359         (store_altivec_registers): Add regno parameter. Get regset using
360         ppc_linux_vrregset. Use regset to collect registers.
361         (fetch_register): Call fetch_altivec_registers instead of
362         fetch_altivec_register.
363         (store_register): Call store_altivec_registers instead of
364         store_altivec_register.
365         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
366         the new regno parameter.
367         (store_ppc_registers): Call store_altivec_registers with -1 for
368         the new regno parameter.
369
370 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
371
372         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
373         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
374         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
375         (gdb_vrregset_t): Change array type size to
376         PPC_LINUX_SIZEOF_VRREGSET.
377         (gdb_vsxregset_t): Change array type size to
378         PPC_LINUX_SIZEOF_VSXREGSET.
379         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
380         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
381         PPC_LINUX_SIZEOF_VSXREGSET.
382
383 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
384
385         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
386         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
387         nat/ppc-linux.c.
388         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
389         ppc_linux_target_wordsize with tid.
390         (ppc_linux_nat_target::read_description): Call ppc_linux_target
391         wordsize with tid.
392         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
393         (ppc64_64bit_inferior_p): Add static and inline specifiers.
394         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
395         tid parameter. Remove static specifier.
396         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
397         (ppc_linux_target_wordsize): New declaration.
398
399 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
400
401         * arch/ppc-linux-common.c: New file.
402         * arch/ppc-linux-common.h: New file.
403         * arch/ppc-linux-tdesc.h: New file.
404         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
405         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
406         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
407         arch/ppc-linux-tdesc.h.
408         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
409         arch/ppc-linux-tdesc.h.
410         (ppc_linux_nat_target::read_description): Remove target
411         description matching code. Fill a ppc_linux_features struct and
412         call ppc_linux_match_description with it. Move comment about ISA
413         2.05 to ppc-linux-common.c.
414         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
415         arch/ppc-linux-tdesc.h.
416         (ppc_linux_core_read_description): Remove target description
417         matching code. Fill a ppc_linux_features struct and call
418         ppc_linux_match_description with it.
419         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
420         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
421         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
422         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
423         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
424         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
425         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
426         (tdesc_powerpc_e500l): Remove.
427
428 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
429
430         * ada-lang.c (catch_assert_command): Pass empty string instead
431         of NULL for excep_string argument.
432
433 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
434
435         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
436         the width of the requested register exceeds the width of the
437         `ptrace' data type.
438
439 2018-05-21  Tom Tromey  <tom@tromey.com>
440
441         * printcmd.c (output_command): Remove.
442         (output_command_const): Rename to output_command.
443         * valprint.h (output_command): Rename from output_command_const.
444         * tracepoint.c (trace_dump_actions): Call output_command.
445
446 2018-05-21  Tom Tromey  <tom@tromey.com>
447
448         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
449         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
450         * ada-lang.h (create_ada_exception_catchpoint): Update.
451         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
452         std::string.
453         (create_excep_cond_exprs, ~ada_catchpoint)
454         (should_stop_exception, print_one_exception)
455         (print_mention_exception, print_recreate_exception): Update.
456         (ada_get_next_arg): Remove.
457         (catch_ada_exception_command_split): Use std::string.  Change type
458         of "excep_string", "cond_string".
459         (catch_ada_exception_command): Update.
460         (create_ada_exception_catchpoint): Change type of excep_string.
461         (ada_exception_sal): Remove excep_string parameter.
462         (~ada_catchpoint): Remove.
463
464 2018-05-21  Tom Tromey  <tom@tromey.com>
465
466         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
467         cleanup.
468
469 2018-05-21  Tom Tromey  <tom@tromey.com>
470
471         * ada-lang.c (ada_exception_message_1, ada_exception_message):
472         Return unique_xmalloc_ptr.
473         (print_it_exception): Update.
474
475 2018-05-21  Tom Tromey  <tom@tromey.com>
476
477         * tracepoint.c (trace_dump_actions): Use std::string.
478
479 2018-05-21  Tom Tromey  <tom@tromey.com>
480
481         * symfile.c (reread_symbols): Use std::string for original_name.
482
483 2018-05-21  Tom Tromey  <tom@tromey.com>
484
485         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
486         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
487         constructor.
488
489 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
490
491         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
492         instance to...
493         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
494         * objfiles.c (get_objfile_bfd_data): Allocate
495         objfile_per_bfd_storage with obstack_new when allocating on
496         obstack.
497
498 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
499
500         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
501         OBSTACK_ZALLOC.
502         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
503         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
504         * mdebugread.c (mdebug_build_psymtabs): Likewise.
505         (add_pending): Likewise.
506         (parse_symbol): Likewise.
507         (parse_partial_symbols): Likewise.
508         (psymtab_to_symtab_1): Likewise.
509         (new_psymtab): Likewise.
510         (elfmdebug_build_psymtabs): Likewise.
511         * minsyms.c (terminate_minimal_symbol_table): Likewise.
512         * objfiles.c (get_objfile_bfd_data): Likewise.
513         (objfile_register_static_link): Likewise.
514         * psymtab.c (allocate_psymtab): Likewise.
515         * stabsread.c (read_member_functions): Likewise.
516         * xcoffread.c (xcoff_end_psymtab): Likewise.
517
518 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
519
520         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
521         compiler supports std::is_trivially_constructible.
522         * common/poison.h: Include obstack.h.
523         (IsMallocable): Define to is_trivially_constructible if the
524         compiler supports it, define to true_type otherwise.
525         (xobnew): New.
526         (XOBNEW): Redefine.
527         (xobnewvec): New.
528         (XOBNEWVEC): Redefine.
529         * gdb_obstack.h (obstack_zalloc): New.
530         (OBSTACK_ZALLOC): Redefine.
531         (obstack_calloc): New.
532         (OBSTACK_CALLOC): Redefine.
533         (obstack_new): New.
534         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
535         (gdbarch_obstack): New declaration in gdbarch.h, definition in
536         gdbarch.c.
537         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
538         obstack_calloc/obstack_zalloc.
539         (gdbarch_obstack_zalloc): Remove.
540         * target-descriptions.c (tdesc_data_init): Use obstack_new.
541
542 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
543
544         * stack.c (backtrace_command_1): Remove useless variable int i.
545
546 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
547
548         * stack.c (print_frame_info): Fix comment.
549
550 2018-05-18  Tom Tromey  <tom@tromey.com>
551
552         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
553         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
554         (~dwarf2_per_objfile): Update
555         (dwarf2_get_dwz_file): Use new.
556         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
557         unique_ptr.
558
559 2018-05-18  Tom Tromey  <tom@tromey.com>
560
561         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
562         unique_ptr.
563         * dwarf2read.c (struct dwp_file): Add constructor and
564         initializers.
565         (open_and_init_dwp_file): Return a unique_ptr.
566         (dwarf2_per_objfile, create_dwp_hash_table)
567         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
568         (lookup_dwo_unit_in_dwp): Update.
569         (open_and_init_dwp_file, get_dwp_file): Update.
570
571 2018-05-18  Tom Tromey  <tom@tromey.com>
572
573         * dwarf2read.c (dwarf2_per_objfile): Update.
574         (struct mapped_index): Add initializers.
575         (dwarf2_read_index): Use new.
576         (dw2_symtab_iter_init): Update.
577         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
578         unique_ptr.
579
580 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
581
582         * dwarf2read.c (mapped_index) <total_size>: Remove.
583
584 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
585
586         * unittests/format_pieces-selftests.c (test_format_specifier):
587         Add ARI comments.
588
589 2018-05-18  Tom Tromey  <tom@tromey.com>
590
591         * c-typeprint.c (maybe_print_hole): New function.
592         (c_print_type_struct_field_offset): Update.
593         (c_type_print_base_struct_union): Call maybe_print_hole.
594
595 2018-05-17  Keith Seitz  <keiths@redhat.com>
596
597         * breakpoint.c (build_bpstat_chain): New function, moved from
598         bpstat_stop_status.
599         (bpstat_stop_status): Add optional parameter, `stop_chain'.
600         If no stop chain is passed, call build_bpstat_chain to build it.
601         * breakpoint.h (build_bpstat_chain): Declare.
602         (bpstat_stop_status): Move documentation here from breakpoint.c.
603         * infrun.c (handle_signal_stop): Before eliding inlined frames,
604         build the stop chain and pass it to skip_inline_frames.
605         Pass this stop chain to bpstat_stop_status.
606         * inline-frame.c: Include breakpoint.h.
607         (stopped_by_user_bp_inline_frame): New function.
608         (skip_inline_frames): Add parameter `stop_chain'.
609         Move documention to inline-frame.h.
610         If non-NULL, use stopped_by_user_bp_inline_frame to determine
611         whether the frame should be elided.
612         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
613         Add moved documentation and update for new parameter.
614
615 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
616
617         PR cli/14975
618         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
619         unittests/format_pieces-selftests.c.
620         * common/format.h (format_piece) <operator==>: New.
621         (format_pieces) <operator[]>: Remove.
622         * common/format.c (format_pieces::format_pieces): Handle \e.
623         * unittests/format_pieces-selftests.c: New.
624
625 2018-05-17  Tom Tromey  <tom@tromey.com>
626
627         PR symtab/23010:
628         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
629         (dw2_instantiate_symtab): Add skip_partial parameter.
630         (dw2_find_last_source_symtab, dw2_map_expand_apply)
631         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
632         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
633         (dw2_expand_symtabs_matching_one)
634         (dw2_find_pc_sect_compunit_symtab)
635         (dw2_debug_names_lookup_symbol)
636         (dw2_debug_names_expand_symtabs_for_function): Update.
637         (init_cutu_and_read_dies): Add skip_partial parameter.
638         (process_psymtab_comp_unit, build_type_psymtabs_1)
639         (process_skeletonless_type_unit, load_partial_comp_unit)
640         (psymtab_to_symtab_1): Update.
641         (load_full_comp_unit): Add skip_partial parameter.
642         (process_imported_unit_die, dwarf2_read_addr_index)
643         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
644         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
645         (read_signatured_type): Update.
646
647 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
648
649         * value.c (release_value): Remove unused variable.
650         (record_latest_value): Likewise.
651         (access_value_history): Likewise.
652         (preserve_values): Likewise.
653
654 2018-05-17  Tom Tromey  <tom@tromey.com>
655
656         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
657         Initialize.
658
659 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
660
661         PR gdb/22286
662         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
663         Also handle registers whose width is not a multiple of
664         PTRACE_TYPE_RET.
665         (linux_nat_trad_target::store_register): Likewise.
666
667 2018-05-16  Tom Tromey  <tom@tromey.com>
668
669         * gdbcore.h (core_bfd): Redefine.
670         * corelow.c (core_target::close): Update.
671         (core_target_open): Update.
672         * progspace.h (struct program_space) <cbfd>: Now a
673         gdb_bfd_ref_ptr.
674
675 2018-05-16  Tom Tromey  <tom@tromey.com>
676
677         PR cli/19551:
678         * symfile-add-flags.h (enum symfile_add_flags)
679         <SYMFILE_NOT_FILENAME>: New constant.
680         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
681         objfile name from BFD.
682         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
683         * minidebug.c (find_separate_debug_file_in_section): Put
684         ".gnu_debugdata" into BFD's file name.
685
686 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
687
688         * regcache.c (regcache_read_ftype, regcache_write_ftype):
689         Remove.
690
691 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
692
693         PR binutils/21446
694         * aarch64-tdep.c (aarch64_analyze_prologue,
695         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
696         Indicate not interested in errors.
697
698 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
699
700         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
701         Supply the MIPS_ZERO_REGNUM register.
702
703 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
704
705         * mips-tdep.c (mask_address_var): Make variable static.
706
707 2018-05-14  Tom Tromey  <tom@tromey.com>
708
709         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
710
711 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
712
713         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
714         FXSAVE_ADDR for the mxcsr register.
715
716 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
717
718         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
719
720 2018-05-11  Pedro Alves  <palves@redhat.com>
721
722         * corelow.c (core_target) <core_target>: No longer inline.
723         Initialize m_core_gdbarch, m_core_vec and build the section table
724         here.
725         <~core_target>: New.
726         <core_gdbarch, get_core_register_section>: New methods.
727         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
728         factored out from ...
729         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
730         (core_ops): Delete.
731         (sniff_core_bfd): Add gdbarch parameter.
732         (core_close): Delete, merged into ...
733         (core_target::close): ... here.  Delete self.
734         (core_close_cleanup): Delete.
735         (core_target_open): Allocate a core_target on the heap.  Use a
736         unique_ptr instead of a cleanup.  Bits moved into the core_target
737         ctor.  Adjust to use core_target methods instead of globals.
738         (get_core_register_section): Rename to ...
739         (core_target::get_core_register_section): ... this and adjust.
740         (struct get_core_registers_cb_data): New.
741         (get_core_registers_cb): Use it.  Use bool.
742         (core_target::fetch_registers, core_target::files_info)
743         (core_target::xfer_partial, core_target::read_description)
744         (core_target::pid_to, core_target::thread_name): Adjust to
745         reference class fields instead of globals.
746         * target.h (struct target_ops_deleter, target_ops_up): New.
747
748 2018-05-11  Pedro Alves  <palves@redhat.com>
749
750         * corefile.c (core_file_command): Move to corelow.c.
751         * corelow.c (the_core_target): Delete.
752         (core_file_command): Moved from corefile.c.  Check exec_bfd
753         instead of the_core_target.  Use target_detach instead of calling
754         into the_core_target directly.
755         (maybe_say_no_core_file_now): New.
756         (core_target::detach): Use it.
757         (_initialize_corelow): Remove references to the_core_target.
758         * gdbcore.h (the_core_target): Delete.
759
760 2018-05-11  Tom Tromey  <tromey@redhat.com>
761             Pedro Alves  <palves@redhat.com>
762
763         * corefile.c (core_bfd): Remove.
764         * gdbcore.h (core_bfd): Now a macro.
765         * progspace.h (struct program_space) <cbfd>: New field.
766
767 2018-05-11  Tom Tromey  <tom@tromey.com>
768
769         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
770         gdb::def_vector.
771
772 2018-05-10  Tom Tromey  <tom@tromey.com>
773
774         * configure: Rebuild.
775         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
776
777 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
778
779         PR server/23158:
780         * regformats/regdat.sh: Adjust script, following the addition
781         of the new expedite_regs parameter to init_target_desc.
782
783 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
784     
785         PR gdb/23127
786         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
787         set_gdbarch_significant_addr_bit.
788         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
789         set_gdbarch_significant_addr_bit.
790         * utils.c (address_significant): Update to sign extend addr.
791
792 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
793
794         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
795         (xtensa_linux_init_abi): Limit tdep->num_regs by
796         tdep->num_nopriv_regs.
797         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
798         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
799         not initialized.
800
801 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
802
803         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
804
805 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
806
807         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
808         (I387_MXCSR_INIT_VAL): New constant.
809         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
810         buffer if it was supplied by the inferior.
811         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
812         (i387_xsave_get_clear_bv): New function.
813         (i387_supply_xsave): Only read x87 control registers from the
814         xsave buffer if the feature is enabled, and the state will have
815         been written, otherwise, provide a suitable default.
816         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
817         including x87 control registers.  Update control registers if they
818         have changed from the default value, and mark features as enabled
819         as required.
820         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
821
822 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
823
824         * spu-tdep.c (info_spu_event_command): Fix output formatting.
825
826 2018-05-07  Tom Tromey  <tom@tromey.com>
827
828         * configure: Rebuild.
829         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
830
831 2018-05-07  Tom Tromey  <tom@tromey.com>
832
833         PR tdep/20362:
834         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
835         bit.  Use correct value for VDIV.
836
837 2018-05-04  Tom Tromey  <tom@tromey.com>
838
839         * configure: Rebuild.
840         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
841
842 2018-05-04  Tom Tromey  <tom@tromey.com>
843
844         * linux-record.c (record_linux_system_call) <case
845         RECORD_SYS_RECVFROM>: Add "break".
846
847 2018-05-04  Tom Tromey  <tom@tromey.com>
848
849         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
850         Add missing "break".
851         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
852         Add missing "break".
853
854 2018-05-04  Tom Tromey  <tom@tromey.com>
855
856         * rs6000-tdep.c (ppc_process_record_op4)
857         (ppc_process_record_op63): Add fall-through comment.
858
859 2018-05-04  Tom Tromey  <tom@tromey.com>
860
861         * i386-tdep.c (i386_process_record): Add fall-through comment.
862
863 2018-05-04  Tom Tromey  <tom@tromey.com>
864
865         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
866         comment.
867
868 2018-05-04  Tom Tromey  <tom@tromey.com>
869
870         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
871         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
872         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
873         comment.
874         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
875         comment.
876         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
877         comment.
878
879 2018-05-04  Tom Tromey  <tom@tromey.com>
880
881         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
882
883 2018-05-04  Tom Tromey  <tom@tromey.com>
884
885         * s390-tdep.c (s390_process_record): Fix fall-through comments.
886         * xcoffread.c (scan_xcoff_symtab): Move comment later.
887         * symfile.c (section_is_mapped): Fix fall-through comment.
888         * stabsread.c (define_symbol, read_member_functions): Fix
889         fall-through comment.
890         * s390-linux-tdep.c (s390_process_record): Fix fall-through
891         comment.
892         * remote.c (remote_wait_as): Fix fall-through comment.
893         * p-exp.y (yylex): Fix fall-through comment.
894         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
895         comment.
896         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
897         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
898         * jv-exp.y (yylex): Fix fall-through comment.
899         * go-exp.y (lex_one_token): Fix fall-through comment.
900         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
901         fall-through comment.
902         * f-exp.y (yylex): Fix fall-through comment.
903         * dwarf2read.c (process_die): Fix fall-through comments.
904         * dbxread.c (process_one_symbol): Fix fall-through comment.
905         * d-exp.y (lex_one_token): Fix fall-through comment.
906         * cp-name-parser.y (yylex): Fix fall-through comment.
907         * coffread.c (coff_symtab_read): Fix fall-through comment.
908         * c-exp.y (lex_one_token): Fix fall-through comment.
909         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
910         comment.
911         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
912         comment.
913
914 2018-05-04  Tom Tromey  <tom@tromey.com>
915
916         PR python/22730:
917         * NEWS: Mention gdb.execute change.
918         * gdbcmd.h (execute_control_command): Don't declare.
919         * python/python.c (execute_gdb_command): Use read_command_lines_1,
920         execute_control_commands, execute_control_commands_to_string.
921         * cli/cli-script.h (execute_control_commands)
922         (execute_control_commands_to_string): Declare.
923         (execute_control_command): Add from_tty parameter.
924         * cli/cli-script.c (execute_control_commands)
925         (execute_control_commands_to_string): New functions.
926         (execute_user_command): Use execute_control_commands.
927         (execute_control_command_1): Add "from_tty" parameter.  Update.
928         (execute_control_command): Likewise.
929
930 2018-05-04  Tom Tromey  <tom@tromey.com>
931
932         PR python/22731:
933         * NEWS: Mention that breakpoint commands are writable.
934         * python/py-breakpoint.c (bppy_set_commands): New function.
935         (breakpoint_object_getset) <"commands">: Use it.
936
937 2018-05-04  Tom Tromey  <tom@tromey.com>
938
939         * tracepoint.c (actions_command): Update.
940         * mi/mi-cmd-break.c (mi_command_line_array)
941         (mi_command_line_array_cnt, mi_command_line_array_ptr)
942         (mi_read_next_line): Remove.
943         (mi_cmd_break_commands): Update.
944         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
945         function_view.
946         * cli/cli-script.c (get_command_line): Update.
947         (process_next_line): Use function_view.  Constify.
948         (recurse_read_control_structure, read_command_lines)
949         (read_command_lines_1): Change argument types to function_view.
950         (do_define_command, document_command): Update.
951         * breakpoint.h (check_tracepoint_command): Don't declare.
952         * breakpoint.c (check_tracepoint_command): Remove.
953         (commands_command_1, create_tracepoint_from_upload): Update.
954
955 2018-05-04  Tom Tromey  <tom@tromey.com>
956
957         PR gdb/11750:
958         * cli/cli-script.h (enum command_control_type) <define_control>:
959         New constant.
960         * cli/cli-script.c (multi_line_command_p): Handle define_control.
961         (build_command_line, execute_control_command_1)
962         (process_next_line): Likewise.
963         (do_define_command): New function, extracted from define_command.
964         (define_command): Use it.
965
966 2018-05-04  Tom Tromey  <tom@tromey.com>
967
968         * tracepoint.c (actions_command): Update.
969         * cli/cli-script.h (read_command_lines): Update.
970         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
971         (MAX_TMPBUF): Remove define.
972         (define_command): Use string_printf.
973         (document_command): Likewise.
974         * breakpoint.c (commands_command_1): Update.
975
976 2018-05-04  Tom Tromey  <tom@tromey.com>
977
978         * top.c (execute_command): Update.
979         * cli/cli-script.h (print_command_lines): Now varargs.
980         * cli/cli-script.c (print_command_lines): Now varargs.
981         (execute_control_command_1) <case while_control, case if_control>:
982         Update.
983
984 2018-05-04  Tom Tromey  <tom@tromey.com>
985
986         * tracepoint.c (all_tracepoint_actions): Rename from
987         all_tracepoint_actions_and_cleanup.  Change return type.
988         (actions_command, encode_actions_1, encode_actions)
989         (trace_dump_actions, tdump_command): Update.
990         * remote.c (remote_download_command_source): Update.
991         * python/python.c (gdbpy_eval_from_control_command)
992         (python_command, python_interactive_command): Update.
993         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
994         * guile/guile.c (guile_command)
995         (gdbscm_eval_from_control_command, guile_command): Update.
996         * compile/compile.c (compile_code_command)
997         (compile_print_command, compile_to_object): Update.
998         * cli/cli-script.h (struct command_lines_deleter): New.
999         (counted_command_line): New typedef.
1000         (struct command_line): Add constructor, destructor.
1001         <body_list>: Remove.
1002         <body_list_0, body_list_1>: New members.
1003         (command_line_up): Remove typedef.
1004         (read_command_lines, read_command_lines_1, get_command_line):
1005         Update.
1006         (copy_command_lines): Don't declare.
1007         * cli/cli-script.c (build_command_line): Use "new".
1008         (get_command_line): Return counted_command_line.
1009         (print_command_lines, execute_user_command)
1010         (execute_control_command_1, while_command, if_command): Update.
1011         (realloc_body_list): Remove.
1012         (process_next_line, recurse_read_control_structure): Update.
1013         (read_command_lines, read_command_lines_1): Return counted_command_line.
1014         (free_command_lines): Use "delete".
1015         (copy_command_lines): Remove.
1016         (define_command, document_command, show_user_1): Update.
1017         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
1018         a counted_command_line.
1019         * breakpoint.h (counted_command_line): Remove typedef.
1020         (breakpoint_set_commands): Update.
1021         * breakpoint.c (check_no_tracepoint_commands)
1022         (validate_commands_for_breakpoint): Update.
1023         (breakpoint_set_commands): Change commands to be a
1024         counted_command_line.
1025         (commands_command_1, update_dprintf_command_list)
1026         (create_tracepoint_from_upload): Update.
1027
1028 2018-05-04  Tom Tromey  <tom@tromey.com>
1029
1030         * cli/cli-decode.h (cmd_list_element): New constructor.
1031         (~cmd_list_element): New destructor.
1032         (struct cmd_list_element): Add initializers.
1033         * cli/cli-decode.c (do_add_cmd): Use "new".
1034         (delete_cmd): Use "delete".
1035
1036 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
1037             Pedro Alves <palves@redhat.com>
1038
1039         PR breakpoints/19806 and support for PR external/20207.
1040         * NEWS: Mention Aarch64 watchpoint improvements.
1041         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
1042         watchpoints and PR external/20207 watchpoints.
1043         * nat/aarch64-linux-hw-point.c
1044         (kernel_supports_any_contiguous_range): New.
1045         (aarch64_watchpoint_offset): New.
1046         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
1047         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
1048         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
1049         (aarch64_align_watchpoint): New parameters aligned_offset_p and
1050         next_addr_orig_p.  Support PR external/20207 watchpoints.
1051         (aarch64_downgrade_regs): New.
1052         (aarch64_dr_state_insert_one_point): New parameters offset and
1053         addr_orig.
1054         (aarch64_dr_state_remove_one_point): Likewise.
1055         (aarch64_handle_breakpoint): Update caller.
1056         (aarch64_handle_aligned_watchpoint): Likewise.
1057         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
1058         aligned_offset.
1059         (aarch64_linux_set_debug_regs): Remove const from state.  Call
1060         aarch64_downgrade_regs.
1061         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
1062         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
1063         (DR_CONTROL_MASK): ... this.
1064         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
1065         (unsigned int aarch64_watchpoint_offset): New prototype.
1066         (aarch64_linux_set_debug_regs): Remove const from state.
1067         * utils.c (align_up, align_down): Move to ...
1068         * common/common-utils.c (align_up, align_down): ... here.
1069         * utils.h (align_up, align_down): Move to ...
1070         * common/common-utils.h (align_up, align_down): ... here.
1071
1072 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
1073
1074         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
1075         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
1076         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
1077         Re-implement to match the ABI as summarized in GCC's
1078         gcc/config/sparc/sparc.c.  All callers updated.
1079         (sparc32_store_arguments): Remove assertion.
1080
1081 2018-05-04  Tom Tromey  <tom@tromey.com>
1082
1083         * printcmd.c: Don't include tui.h.
1084         (decode_format): Use skip_spaces.
1085
1086 2018-05-04  Tom Tromey  <tom@tromey.com>
1087
1088         PR gdb/22619:
1089         * printcmd.c (last_count): New global.
1090         (x_command): Use saved count when repeating.
1091
1092 2018-05-04  Tom Tromey  <tom@tromey.com>
1093
1094         * nto-procfs.c (do_closedir_cleanup): Remove.
1095         (procfs_pidlist): Use gdb_dir_up.
1096         * procfs.c (do_closedir_cleanup): Remove.
1097         (proc_update_threads): Use gdb_dir_up.
1098         * common/filestuff.h (struct gdb_dir_deleter): New.
1099         (gdb_dir_up): New typedef.
1100
1101 2018-05-04  Tom Tromey  <tom@tromey.com>
1102
1103         * ada-lang.c (print_mention_exception): Use std::string.
1104
1105 2018-05-04  Tom Tromey  <tom@tromey.com>
1106
1107         * ada-lang.c (create_excep_cond_exprs): Update.
1108         (ada_exception_catchpoint_cond_string): Use std::string.
1109
1110 2018-05-04  Tom Tromey  <tom@tromey.com>
1111
1112         * ada-lang.c (xget_renaming_scope): Return std::string.
1113         (old_renaming_is_invisible): Update.
1114
1115 2018-05-04  Tom Tromey  <tom@tromey.com>
1116
1117         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
1118         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
1119
1120 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
1121
1122         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
1123
1124 2018-05-04  Tom Tromey  <tom@tromey.com>
1125
1126         * remote.c (remote_query_supported_append): Change type.
1127         (remote_check_symbols): Update.
1128
1129 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
1130
1131         PR gdb/11420
1132         * configure.ac: Prepend libpython.
1133         * python/python-config.py: Likewise.
1134         * configure: Regenerate.
1135
1136 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
1137
1138         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
1139
1140 2018-05-03  Pedro Alves  <palves@redhat.com>
1141
1142         * s390-linux-nat.c
1143         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
1144         override.  Write 'true' instead of '1'.
1145         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
1146         declaration.
1147
1148 2018-05-02  Pedro Alves  <palves@redhat.com>
1149
1150         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
1151         add_inf_child_target.
1152         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
1153         add_inf_child_target.
1154         * aix-thread.c (aix_thread_target_info): New.
1155         (aix_thread_target) <shortname, longname, doc>: Delete.
1156         <info>: New.
1157         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
1158         add_inf_child_target.
1159         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
1160         add_inf_child_target.
1161         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
1162         add_inf_child_target.
1163         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
1164         add_inf_child_target.
1165         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
1166         add_inf_child_target.
1167         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
1168         add_inf_child_target.
1169         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
1170         add_inf_child_target.
1171         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
1172         add_inf_child_target.
1173         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
1174         add_inf_child_target.
1175         * bfd-target.c (target_bfd_target_info): New.
1176         (target_bfd) <shortname, longname, doc>: Delete.
1177         <info>: New.
1178         * bsd-kvm.c (bsd_kvm_target_info): New.
1179         (bsd_kvm_target) <shortname, longname, doc>: Delete.
1180         <info>: New.
1181         (bsd_kvm_target::open): Rename to ...
1182         (bsd_kvm_target_open): ... this.  Adjust.
1183         * bsd-uthread.c (bsd_uthread_target_info): New.
1184         (bsd_uthread_target) <shortname, longname, doc>: Delete.
1185         <info>: New.
1186         * corefile.c (core_file_command): Adjust.
1187         * corelow.c (core_target_info): New.
1188         (core_target) <shortname, longname, doc>: Delete.
1189         <info>: New.
1190         (core_target::open): Rename to ...
1191         (core_target_open): ... this.  Adjust.
1192         * ctf.c (ctf_target_info): New.
1193         (ctf_target) <shortname, longname, doc>: Delete.
1194         <info>: New.
1195         (ctf_target::open): Rename to ...
1196         (ctf_target_open): ... this.
1197         (_initialize_ctf): Adjust.
1198         * exec.c (exec_target_info): New.
1199         (exec_target) <shortname, longname, doc>: Delete.
1200         <info>: New.
1201         (exec_target::open): Rename to ...
1202         (exec_target_open): ... this.
1203         * gdbcore.h (core_target_open): Declare.
1204         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
1205         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
1206         add_inf_child_target.
1207         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
1208         add_inf_child_target.
1209         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
1210         add_inf_child_target.
1211         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
1212         add_inf_child_target.
1213         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
1214         add_inf_child_target.
1215         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
1216         add_inf_child_target.
1217         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
1218         add_inf_child_target.
1219         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
1220         add_inf_child_target.
1221         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
1222         add_inf_child_target.
1223         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
1224         add_inf_child_target.
1225         * inf-child.c (inf_child_target_info): New.
1226         (inf_child_target::info): New.
1227         (inf_child_open_target): Remove 'target' parameter.  Use
1228         get_native_target instead.
1229         (inf_child_target::open): Delete.
1230         (add_inf_child_target): New.
1231         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
1232         Delete.
1233         <info>: New.
1234         (add_inf_child_target): Declare.
1235         (inf_child_open_target): Declare.
1236         * linux-thread-db.c (thread_db_target_info): New.
1237         (thread_db_target) <shortname, longname, doc>: Delete.
1238         <info>: New.
1239         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
1240         add_inf_child_target.
1241         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
1242         add_inf_child_target.
1243         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
1244         add_inf_child_target.
1245         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
1246         add_inf_child_target.
1247         * make-target-delegates (print_class): Adjust.
1248         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
1249         add_inf_child_target.
1250         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
1251         add_inf_child_target.
1252         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
1253         add_inf_child_target.
1254         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
1255         add_inf_child_target.
1256         * nto-procfs.c (nto_native_target_info): New.
1257         (nto_procfs_target_native) <shortname, longname, doc>:
1258         Delete.
1259         <info>: New.
1260         (nto_procfs_target_info): New.
1261         (nto_procfs_target_procfs) <shortname, longname, doc>:
1262         Delete.
1263         <info>: New.
1264         (init_procfs_targets): Adjust.
1265         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
1266         add_inf_child_target.
1267         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
1268         add_inf_child_target.
1269         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
1270         add_inf_child_target.
1271         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
1272         add_inf_child_target.
1273         * ravenscar-thread.c (ravenscar_target_info): New.
1274         (ravenscar_thread_target) <shortname, longname, doc>:
1275         Delete.
1276         <info>: New.
1277         * record-btrace.c (record_btrace_target_info):
1278         (record_btrace_target) <shortname, longname, doc>: Delete.
1279         <info>: New.
1280         (record_btrace_target::open): Rename to ...
1281         (record_btrace_target_open): ... this.  Adjust.
1282         * record-full.c (record_longname, record_doc): New.
1283         (record_full_base_target) <shortname, longname, doc>: Delete.
1284         <info>: New.
1285         (record_full_target_info): New.
1286         (record_full_target): <shortname>: Delete.
1287         <info>: New.
1288         (record_full_core_open_1, record_full_open_1): Update comments.
1289         (record_full_base_target::open): Rename to ...
1290         (record_full_open): ... this.
1291         (cmd_record_full_restore): Update.
1292         (_initialize_record_full): Update.
1293         * remote-sim.c (remote_sim_target_info): New.
1294         (gdbsim_target) <shortname, longname, doc>: Delete.
1295         <info>: New.
1296         (gdbsim_target::open): Rename to ...
1297         (gdbsim_target_open): ... this.
1298         (_initialize_remote_sim): Adjust.
1299         * remote.c (remote_doc): New.
1300         (remote_target_info): New.
1301         (remote_target) <shortname, longname, doc>: Delete.
1302         <info>: New.
1303         (extended_remote_target_info): New.
1304         (extended_remote_target) <shortname, longname, doc>: Delete.
1305         <info>: New.
1306         (remote_target::open_1): Make static.  Adjust.
1307         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
1308         * s390-linux-nat.c (_initialize_s390_nat): Use
1309         add_inf_child_target.
1310         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
1311         add_inf_child_target.
1312         * sol-thread.c (thread_db_target_info): New.
1313         (sol_thread_target) <shortname, longname, doc>: Delete.
1314         <info>: New.
1315         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
1316         add_inf_child_target.
1317         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
1318         add_inf_child_target.
1319         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
1320         add_inf_child_target.
1321         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
1322         add_inf_child_target.
1323         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
1324         add_inf_child_target.
1325         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
1326         add_inf_child_target.
1327         * spu-linux-nat.c (_initialize_spu_nat): Use
1328         add_inf_child_target.
1329         * spu-multiarch.c (spu_multiarch_target_info): New.
1330         (spu_multiarch_target) <shortname, longname, doc>: Delete.
1331         <info>: New.
1332         * target-delegates.c: Regenerate.
1333         * target.c: Include <unordered_map>.
1334         (target_ops_p): Delete.
1335         (DEF_VEC_P(target_ops_p)): Delete.
1336         (target_factories): New.
1337         (test_target_info): New.
1338         (test_target_ops::info): New.
1339         (open_target): Adjust to use target_factories.
1340         (add_target_with_completer): Rename to ...
1341         (add_target): ... this.  Change prototype.  Register target_info
1342         and open callback in target_factories.  Register target_info in
1343         command context instead of target_ops.
1344         (add_target): Delete old implementation.
1345         (add_deprecated_target_alias): Change prototype.  Adjust.
1346         (the_native_target): New.
1347         (set_native_target, get_native_target): New.
1348         (find_default_run_target): Use the_native_target.
1349         (find_attach_target, find_run_target): Simplify.
1350         (target_ops::open): Delete.
1351         (dummy_target_info): New.
1352         (dummy_target::shortname, dummy_target::longname)
1353         (dummy_target::doc): Delete.
1354         (dummy_target::info): New.
1355         (debug_target::shortname, debug_target::longname)
1356         (debug_target::doc): Delete.
1357         (debug_target::info): New.
1358         * target.h (struct target_info): New.
1359         (target_ops::~target_ops): Add comment.
1360         (target_ops::info): New.
1361         (target_ops::shortname, target_ops::longname, target_ops::doc): No
1362         longer virtual.  Implement in terms of target_info.
1363         (set_native_target, get_native_target): Declare.
1364         (target_open_ftype): New.
1365         (add_target, add_target_with_completer)
1366         (add_deprecated_target_alias): Change prototype.
1367         (test_target) <shortname, longname, doc>: Delete.
1368         <info>: New.
1369         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
1370         add_inf_child_target.
1371         * tracefile-tfile.c (tfile_target_info): New.
1372         (tfile_target) <shortname, longname, doc>: Delete.
1373         <info>: New.
1374         (tfile_target::open): Rename to ...
1375         (tfile_target_open): ... this.
1376         (_initialize_tracefile_tfile): Adjust.
1377         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
1378         add_inf_child_target.
1379         * windows-nat.c (_initialize_windows_nat): Use
1380         add_inf_child_target.
1381         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
1382         add_inf_child_target.
1383
1384 2018-05-02  Pedro Alves  <palves@redhat.com>
1385
1386         * linux-nat.h (linux_nat_target) <low_new_thread,
1387         low_delete_thread, low_new_fork, low_forget_process,
1388         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
1389         New virtual methods.
1390         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1391         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
1392         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
1393         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1394         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
1395         Delete.
1396         * linux-fork.c (delete_fork): Adjust to call low method.
1397         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
1398         (linux_nat_new_fork, linux_nat_forget_process_hook)
1399         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
1400         (linux_nat_status_is_event):
1401         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
1402         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
1403         to call low method.
1404         (sigtrap_is_event): Rename to ...
1405         (linux_nat_target::low_status_is_event): ... this.
1406         (linux_nat_set_status_is_event): Delete.
1407         (save_stop_reason, linux_nat_wait_1)
1408         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
1409         low methods.
1410         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
1411         (linux_nat_set_new_fork, linux_nat_set_forget_process)
1412         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
1413         (linux_nat_set_prepare_to_resume): Delete.
1414         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
1415         low virtual methods.
1416         * amd64-linux-nat.c: Likewise.
1417         * arm-linux-nat.c: Likewise.
1418         * i386-linux-nat.c: Likewise.
1419         * ia64-linux-nat.c: Likewise.
1420         * mips-linux-nat.c: Likewise.
1421         * ppc-linux-nat.c: Likewise.
1422         * s390-linux-nat.c: Likewise.
1423         * sparc64-linux-nat.c: Likewise.
1424         * x86-linux-nat.c: Likewise.
1425         * x86-linux-nat.h: Include "nat/x86-linux.h".
1426         (x86_linux_nat_target) <low_new_fork, low_forget_process,
1427         low_prepare_to_resume, low_new_thread, low_delete_thread>:
1428         Override methods.
1429
1430 2018-05-02  Pedro Alves  <palves@redhat.com>
1431
1432         * target.h (target_ops)
1433         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1434         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
1435         stopped_by_watchpoint, have_continuable_watchpoint,
1436         stopped_data_address, watchpoint_addr_within_range,
1437         can_accel_watchpoint_condition, can_run, thread_alive,
1438         has_all_memory, has_memory, has_stack, has_registers,
1439         has_execution, can_async_p, is_async_p, supports_non_stop,
1440         always_non_stop_p, can_execute_reverse, supports_multi_process,
1441         supports_enable_disable_tracepoint,
1442         supports_disable_randomization, supports_string_tracing,
1443         supports_evaluation_of_breakpoint_conditions,
1444         can_run_breakpoint_commands, filesystem_is_local,
1445         can_download_tracepoint, get_trace_state_variable_value,
1446         set_trace_notes, get_tib_address, use_agent, can_use_agent,
1447         record_is_replaying, record_will_replay,
1448         augmented_libraries_svr4_read>: Adjust to return bool.
1449         * aarch64-linux-nat.c: All implementations adjusted.
1450         * aix-thread.c: All implementations adjusted.
1451         * arm-linux-nat.c: All implementations adjusted.
1452         * breakpoint.c: All implementations adjusted.
1453         * bsd-kvm.c: All implementations adjusted.
1454         * bsd-uthread.c: All implementations adjusted.
1455         * corelow.c: All implementations adjusted.
1456         * ctf.c: All implementations adjusted.
1457         * darwin-nat.c: All implementations adjusted.
1458         * darwin-nat.h: All implementations adjusted.
1459         * exec.c: All implementations adjusted.
1460         * fbsd-nat.c: All implementations adjusted.
1461         * fbsd-nat.h: All implementations adjusted.
1462         * gnu-nat.c: All implementations adjusted.
1463         * gnu-nat.h: All implementations adjusted.
1464         * go32-nat.c: All implementations adjusted.
1465         * ia64-linux-nat.c: All implementations adjusted.
1466         * inf-child.c: All implementations adjusted.
1467         * inf-child.h: All implementations adjusted.
1468         * inf-ptrace.c: All implementations adjusted.
1469         * inf-ptrace.h: All implementations adjusted.
1470         * linux-nat.c: All implementations adjusted.
1471         * linux-nat.h: All implementations adjusted.
1472         * mips-linux-nat.c: All implementations adjusted.
1473         * nto-procfs.c: All implementations adjusted.
1474         * ppc-linux-nat.c: All implementations adjusted.
1475         * procfs.c: All implementations adjusted.
1476         * ravenscar-thread.c: All implementations adjusted.
1477         * record-btrace.c: All implementations adjusted.
1478         * record-full.c: All implementations adjusted.
1479         * remote-sim.c: All implementations adjusted.
1480         * remote.c: All implementations adjusted.
1481         * s390-linux-nat.c: All implementations adjusted.
1482         * sol-thread.c: All implementations adjusted.
1483         * spu-multiarch.c: All implementations adjusted.
1484         * target-delegates.c: All implementations adjusted.
1485         * target.c: All implementations adjusted.
1486         * target.h: All implementations adjusted.
1487         * tracefile-tfile.c: All implementations adjusted.
1488         * tracefile.c: All implementations adjusted.
1489         * tracefile.h: All implementations adjusted.
1490         * windows-nat.c: All implementations adjusted.
1491         * x86-linux-nat.h: All implementations adjusted.
1492         * x86-nat.h: All implementations adjusted.
1493
1494 2018-05-02  Pedro Alves  <palves@redhat.com>
1495
1496         * make-target-delegates (scan_target_h): Don't trim lines here.
1497         Replace sequences of tabs and/or whitespace with a single
1498         whitespace.
1499         (top level, parsing methods): Trim each line before processing it
1500         here.
1501
1502 2018-05-02  Pedro Alves  <palves@redhat.com>
1503             John Baldwin  <jhb@freebsd.org>
1504
1505         * target.h (enum strata) <debug_stratum>: New.
1506         (struct target_ops) <all delegation methods>: Replace by C++
1507         virtual methods, and drop "to_" prefix.  All references updated
1508         throughout.
1509         <to_shortname, to_longname, to_doc, to_data,
1510         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
1511         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
1512         virtual methods.  All references updated throughout.
1513         <can_attach, supports_terminal_ours, can_create_inferior,
1514         get_thread_control_capabilities, attach_no_wait>: New
1515         virtual methods.
1516         <insert_breakpoint, remove_breakpoint>: Now
1517         TARGET_DEFAULT_NORETURN methods.
1518         <info_proc>: Now returns bool.
1519         <to_magic>: Delete.
1520         (OPS_MAGIC): Delete.
1521         (current_target): Delete.  All references replaced by references
1522         to ...
1523         (target_stack): ... this.  New.
1524         (target_shortname, target_longname): Adjust.
1525         (target_can_run): Now a function declaration.
1526         (default_child_has_all_memory, default_child_has_memory)
1527         (default_child_has_stack, default_child_has_registers)
1528         (default_child_has_execution): Remove target_ops parameter.
1529         (complete_target_initialization): Delete.
1530         (memory_breakpoint_target): New template class.
1531         (test_target_ops): Refactor as a C++ class with virtual methods.
1532         * make-target-delegates (NAME_PART): Tighten.
1533         (POINTER_PART, CP_SYMBOL): New.
1534         (SIMPLE_RETURN_PART): Reimplement.
1535         (VEC_RETURN_PART): Expect less.
1536         (RETURN_PART, VIRTUAL_PART): New.
1537         (METHOD): Adjust to C++ virtual methods.
1538         (scan_target_h): Remove reference to C99.
1539         (dname): Output "target_ops::" prefix.
1540         (write_function_header): Adjust to output a C++ class method.
1541         (write_declaration): New.
1542         (write_delegator): Adjust to output a C++ class method.
1543         (tdname): Output "dummy_target::" prefix.
1544         (write_tdefault, write_debugmethod): Adjust to output a C++ class
1545         method.
1546         (tdefault_names, debug_names): Delete.
1547         (return_types, tdefaults, styles, argtypes_array): New.
1548         (top level): All methods are delegators.
1549         (print_class): New.
1550         (top level): Print dummy_target and debug_target classes.
1551         * target-delegates.c: Regenerate.
1552         * target-debug.h (target_debug_print_enum_info_proc_what)
1553         (target_debug_print_thread_control_capabilities)
1554         (target_debug_print_thread_info_p): New.
1555         * target.c (dummy_target): Delete.
1556         (the_dummy_target, the_debug_target): New.
1557         (target_stack): Now extern.
1558         (set_targetdebug): Push/unpush debug target.
1559         (default_child_has_all_memory, default_child_has_memory)
1560         (default_child_has_stack, default_child_has_registers)
1561         (default_child_has_execution): Remove target_ops parameter.
1562         (complete_target_initialization): Delete.
1563         (add_target_with_completer): No longer call
1564         complete_target_initialization.
1565         (target_supports_terminal_ours): Use regular delegation.
1566         (update_current_target): Delete.
1567         (push_target): No longer check magic number.  Don't call
1568         update_current_target.
1569         (unpush_target): Don't call update_current_target.
1570         (target_is_pushed): No longer check magic number.
1571         (target_require_runnable): Skip for all stratums over
1572         process_stratum.
1573         (target_ops::info_proc): New.
1574         (target_info_proc): Use find_target_at and
1575         find_default_run_target.
1576         (target_supports_disable_randomization): Use regular delegation.
1577         (target_get_osdata): Use find_target_at.
1578         (target_ops::open, target_ops::close, target_ops::can_attach)
1579         (target_ops::attach, target_ops::can_create_inferior)
1580         (target_ops::create_inferior, target_ops::can_run)
1581         (target_can_run): New.
1582         (default_fileio_target): Use regular delegation.
1583         (target_ops::fileio_open, target_ops::fileio_pwrite)
1584         (target_ops::fileio_pread, target_ops::fileio_fstat)
1585         (target_ops::fileio_close, target_ops::fileio_unlink)
1586         (target_ops::fileio_readlink): New.
1587         (target_fileio_open_1, target_fileio_unlink)
1588         (target_fileio_readlink): Always call the target method.  Handle
1589         FILEIO_ENOSYS.
1590         (return_zero, return_zero_has_execution): Delete.
1591         (init_dummy_target): Delete.
1592         (dummy_target::dummy_target, dummy_target::shortname)
1593         (dummy_target::longname, dummy_target::doc)
1594         (debug_target::debug_target, debug_target::shortname)
1595         (debug_target::longname, debug_target::doc): New.
1596         (target_supports_delete_record): Use regular delegation.
1597         (setup_target_debug): Delete.
1598         (maintenance_print_target_stack): Skip debug_stratum.
1599         (initialize_targets): Instantiate the_dummy_target and
1600         the_debug_target.
1601         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
1602         use target_stack.
1603         (target_auxv_search, fprint_target_auxv): Adjust.
1604         (info_auxv_command): Adjust to use target_stack.
1605         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
1606         * exceptions.c (print_flush): Handle a NULL target_stack.
1607         * regcache.c (target_ops_no_register): Refactor as class with
1608         virtual methods.
1609
1610         * exec.c (exec_target): New class.
1611         (exec_ops): Now an exec_target.
1612         (exec_open, exec_close_1, exec_get_section_table)
1613         (exec_xfer_partial, exec_files_info, exec_has_memory)
1614         (exec_make_note_section): Refactor as exec_target methods.
1615         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
1616         Delete.
1617         (exec_target::find_memory_regions): New.
1618         (_initialize_exec): Don't call init_exec_ops.
1619         * gdbcore.h (exec_file_clear): Delete.
1620
1621         * corefile.c (core_target): Delete.
1622         (core_file_command): Adjust.
1623         * corelow.c (core_target): New class.
1624         (the_core_target): New.
1625         (core_close): Remove target_ops parameter.
1626         (core_close_cleanup): Adjust.
1627         (core_target::close): New.
1628         (core_open, core_detach, get_core_registers, core_files_info)
1629         (core_xfer_partial, core_thread_alive, core_read_description)
1630         (core_pid_to_str, core_thread_name, core_has_memory)
1631         (core_has_stack, core_has_registers, core_info_proc): Rework as
1632         core_target methods.
1633         (ignore, core_remove_breakpoint, init_core_ops): Delete.
1634         (_initialize_corelow): Initialize the_core_target.
1635         * gdbcore.h (core_target): Delete.
1636         (the_core_target): New.
1637
1638         * ctf.c: (ctf_target): New class.
1639         (ctf_ops): Now a ctf_target.
1640         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
1641         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
1642         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
1643         methods.
1644         (init_ctf_ops): Delete.
1645         (_initialize_ctf): Don't call it.
1646         * tracefile-tfile.c (tfile_target): New class.
1647         (tfile_ops): Now a tfile_target.
1648         (tfile_open, tfile_close, tfile_files_info)
1649         (tfile_get_tracepoint_status, tfile_trace_find)
1650         (tfile_fetch_registers, tfile_xfer_partial)
1651         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
1652         Refactor as tfile_target methods.
1653         (tfile_xfer_partial_features): Remove target_ops parameter.
1654         (init_tfile_ops): Delete.
1655         (_initialize_tracefile_tfile): Don't call it.
1656         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
1657         (tracefile_has_stack, tracefile_has_registers)
1658         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
1659         tracefile_target methods.
1660         (init_tracefile_ops): Delete.
1661         (tracefile_target::tracefile_target): New.
1662         * tracefile.h: Include "target.h".
1663         (tracefile_target): New class.
1664         (init_tracefile_ops): Delete.
1665
1666         * spu-multiarch.c (spu_multiarch_target): New class.
1667         (spu_ops): Now a spu_multiarch_target.
1668         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
1669         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
1670         (spu_search_memory, spu_mourn_inferior): Refactor as
1671         spu_multiarch_target methods.
1672         (init_spu_ops): Delete.
1673         (_initialize_spu_multiarch): Remove references to init_spu_ops,
1674         complete_target_initialization.
1675
1676         * ravenscar-thread.c (ravenscar_thread_target): New class.
1677         (ravenscar_ops): Now a ravenscar_thread_target.
1678         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
1679         (ravenscar_thread_alive, ravenscar_pid_to_str)
1680         (ravenscar_fetch_registers, ravenscar_store_registers)
1681         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
1682         (ravenscar_stopped_by_hw_breakpoint)
1683         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
1684         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
1685         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
1686         methods.
1687         (init_ravenscar_thread_ops): Delete.
1688         (_initialize_ravenscar): Remove references to
1689         init_ravenscar_thread_ops and complete_target_initialization.
1690
1691         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
1692         (bsd_uthread_target): New class.
1693         (bsd_uthread_ops): Now a bsd_uthread_target.
1694         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
1695         (bsd_uthread_close, bsd_uthread_mourn_inferior)
1696         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
1697         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
1698         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
1699         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
1700         (bsd_uthread_target): Delete function.
1701         (_initialize_bsd_uthread): Remove reference to
1702         complete_target_initialization.
1703
1704         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
1705         (target_bfd): ... this new class.
1706         (target_bfd_xfer_partial, target_bfd_get_section_table)
1707         (target_bfd_close): Refactor as target_bfd methods.
1708         (target_bfd::~target_bfd): New.
1709         (target_bfd_reopen): Adjust.
1710         (target_bfd::close): New.
1711
1712         * record-btrace.c (record_btrace_target): New class.
1713         (record_btrace_ops): Now a record_btrace_target.
1714         (record_btrace_open, record_btrace_stop_recording)
1715         (record_btrace_disconnect, record_btrace_close)
1716         (record_btrace_async, record_btrace_info)
1717         (record_btrace_insn_history, record_btrace_insn_history_range)
1718         (record_btrace_insn_history_from, record_btrace_call_history)
1719         (record_btrace_call_history_range)
1720         (record_btrace_call_history_from, record_btrace_record_method)
1721         (record_btrace_is_replaying, record_btrace_will_replay)
1722         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
1723         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
1724         (record_btrace_store_registers, record_btrace_prepare_to_store)
1725         (record_btrace_to_get_unwinder)
1726         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
1727         (record_btrace_commit_resume, record_btrace_wait)
1728         (record_btrace_stop, record_btrace_can_execute_reverse)
1729         (record_btrace_stopped_by_sw_breakpoint)
1730         (record_btrace_supports_stopped_by_sw_breakpoint)
1731         (record_btrace_stopped_by_hw_breakpoint)
1732         (record_btrace_supports_stopped_by_hw_breakpoint)
1733         (record_btrace_update_thread_list, record_btrace_thread_alive)
1734         (record_btrace_goto_begin, record_btrace_goto_end)
1735         (record_btrace_goto, record_btrace_stop_replaying_all)
1736         (record_btrace_execution_direction)
1737         (record_btrace_prepare_to_generate_core)
1738         (record_btrace_done_generating_core): Refactor as
1739         record_btrace_target methods.
1740         (init_record_btrace_ops): Delete.
1741         (_initialize_record_btrace): Remove reference to
1742         init_record_btrace_ops.
1743         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
1744         the execution_direction global.
1745         (record_full_base_target, record_full_target)
1746         (record_full_core_target): New classes.
1747         (record_full_ops): Now a record_full_target.
1748         (record_full_core_ops): Now a record_full_core_target.
1749         (record_full_target::detach, record_full_target::disconnect)
1750         (record_full_core_target::disconnect)
1751         (record_full_target::mourn_inferior, record_full_target::kill):
1752         New.
1753         (record_full_open, record_full_close, record_full_async): Refactor
1754         as methods of the record_full_base_target class.
1755         (record_full_resume, record_full_commit_resume): Refactor
1756         as methods of the record_full_target class.
1757         (record_full_wait, record_full_stopped_by_watchpoint)
1758         (record_full_stopped_data_address)
1759         (record_full_stopped_by_sw_breakpoint)
1760         (record_full_supports_stopped_by_sw_breakpoint)
1761         (record_full_stopped_by_hw_breakpoint)
1762         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
1763         methods of the record_full_base_target class.
1764         (record_full_store_registers, record_full_xfer_partial)
1765         (record_full_insert_breakpoint, record_full_remove_breakpoint):
1766         Refactor as methods of the record_full_target class.
1767         (record_full_can_execute_reverse, record_full_get_bookmark)
1768         (record_full_goto_bookmark, record_full_execution_direction)
1769         (record_full_record_method, record_full_info, record_full_delete)
1770         (record_full_is_replaying, record_full_will_replay)
1771         (record_full_goto_begin, record_full_goto_end, record_full_goto)
1772         (record_full_stop_replaying): Refactor as methods of the
1773         record_full_base_target class.
1774         (record_full_core_resume, record_full_core_kill)
1775         (record_full_core_fetch_registers)
1776         (record_full_core_prepare_to_store)
1777         (record_full_core_store_registers, record_full_core_xfer_partial)
1778         (record_full_core_insert_breakpoint)
1779         (record_full_core_remove_breakpoint)
1780         (record_full_core_has_execution): Refactor
1781         as methods of the record_full_core_target class.
1782         (record_full_base_target::supports_delete_record): New.
1783         (init_record_full_ops): Delete.
1784         (init_record_full_core_ops): Delete.
1785         (record_full_save): Refactor as method of the
1786         record_full_base_target class.
1787         (_initialize_record_full): Remove references to
1788         init_record_full_ops and init_record_full_core_ops.
1789
1790         * remote.c (remote_target, extended_remote_target): New classes.
1791         (remote_ops): Now a remote_target.
1792         (extended_remote_ops): Now an extended_remote_target.
1793         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
1794         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
1795         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
1796         (remote_pass_signals, remote_set_syscall_catchpoint)
1797         (remote_program_signals, )
1798         (remote_thread_always_alive): Remove target_ops parameter.
1799         (remote_thread_alive, remote_thread_name)
1800         (remote_update_thread_list, remote_threads_extra_info)
1801         (remote_static_tracepoint_marker_at)
1802         (remote_static_tracepoint_markers_by_strid)
1803         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
1804         (remote_open): Refactor as methods of remote_target.
1805         (extended_remote_open, extended_remote_detach)
1806         (extended_remote_attach, extended_remote_post_attach):
1807         (extended_remote_supports_disable_randomization)
1808         (extended_remote_create_inferior): : Refactor as method of
1809         extended_remote_target.
1810         (remote_set_permissions, remote_open_1, remote_detach)
1811         (remote_follow_fork, remote_follow_exec, remote_disconnect)
1812         (remote_resume, remote_commit_resume, remote_stop)
1813         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
1814         (remote_terminal_ours, remote_wait, remote_fetch_registers)
1815         (remote_prepare_to_store, remote_store_registers)
1816         (remote_flash_erase, remote_flash_done, remote_files_info)
1817         (remote_kill, remote_mourn, remote_insert_breakpoint)
1818         (remote_remove_breakpoint, remote_insert_watchpoint)
1819         (remote_watchpoint_addr_within_range)
1820         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
1821         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
1822         (remote_supports_stopped_by_sw_breakpoint)
1823         (remote_stopped_by_hw_breakpoint)
1824         (remote_supports_stopped_by_hw_breakpoint)
1825         (remote_stopped_by_watchpoint, remote_stopped_data_address)
1826         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
1827         (remote_verify_memory): Refactor as methods of remote_target.
1828         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
1829         parameter.
1830         (remote_xfer_partial, remote_get_memory_xfer_limit)
1831         (remote_search_memory, remote_rcmd, remote_memory_map)
1832         (remote_pid_to_str, remote_get_thread_local_address)
1833         (remote_get_tib_address, remote_read_description): Refactor as
1834         methods of remote_target.
1835         (remote_target::fileio_open, remote_target::fileio_pwrite)
1836         (remote_target::fileio_pread, remote_target::fileio_close): New.
1837         (remote_hostio_readlink, remote_hostio_fstat)
1838         (remote_filesystem_is_local, remote_can_execute_reverse)
1839         (remote_supports_non_stop, remote_supports_disable_randomization)
1840         (remote_supports_multi_process, remote_supports_cond_breakpoints)
1841         (remote_supports_enable_disable_tracepoint)
1842         (remote_supports_string_tracing)
1843         (remote_can_run_breakpoint_commands, remote_trace_init)
1844         (remote_download_tracepoint, remote_can_download_tracepoint)
1845         (remote_download_trace_state_variable, remote_enable_tracepoint)
1846         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
1847         (remote_trace_start, remote_get_trace_status)
1848         (remote_get_tracepoint_status, remote_trace_stop)
1849         (remote_trace_find, remote_get_trace_state_variable_value)
1850         (remote_save_trace_data, remote_get_raw_trace_data)
1851         (remote_set_disconnected_tracing, remote_core_of_thread)
1852         (remote_set_circular_trace_buffer, remote_traceframe_info)
1853         (remote_get_min_fast_tracepoint_insn_len)
1854         (remote_set_trace_buffer_size, remote_set_trace_notes)
1855         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
1856         (remote_disable_btrace, remote_teardown_btrace)
1857         (remote_read_btrace, remote_btrace_conf)
1858         (remote_augmented_libraries_svr4_read, remote_load)
1859         (remote_pid_to_exec_file, remote_can_do_single_step)
1860         (remote_execution_direction, remote_thread_handle_to_thread_info):
1861         Refactor as methods of remote_target.
1862         (init_remote_ops, init_extended_remote_ops): Delete.
1863         (remote_can_async_p, remote_is_async_p, remote_async)
1864         (remote_thread_events, remote_upload_tracepoints)
1865         (remote_upload_trace_state_variables): Refactor as methods of
1866         remote_target.
1867         (_initialize_remote): Remove references to init_remote_ops and
1868         init_extended_remote_ops.
1869
1870         * remote-sim.c (gdbsim_target): New class.
1871         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1872         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1873         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1874         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1875         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1876         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1877         Refactor as methods of gdbsim_target.
1878         (gdbsim_ops): Now a gdbsim_target.
1879         (init_gdbsim_ops): Delete.
1880         (gdbsim_cntrl_c): Adjust.
1881         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1882
1883         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1884         (the_amd64_linux_nat_target): New.
1885         (amd64_linux_fetch_inferior_registers)
1886         (amd64_linux_store_inferior_registers): Refactor as methods of
1887         amd64_linux_nat_target.
1888         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
1889         * i386-linux-nat.c: Don't include "linux-nat.h".
1890         (i386_linux_nat_target): New class.
1891         (the_i386_linux_nat_target): New.
1892         (i386_linux_fetch_inferior_registers)
1893         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1894         as methods of i386_linux_nat_target.
1895         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
1896         * inf-child.c (inf_child_ops): Delete.
1897         (inf_child_fetch_inferior_registers)
1898         (inf_child_store_inferior_registers): Delete.
1899         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1900         methods of inf_child_target.
1901         (inf_child_target::supports_terminal_ours)
1902         (inf_child_target::terminal_init)
1903         (inf_child_target::terminal_inferior)
1904         (inf_child_target::terminal_ours_for_output)
1905         (inf_child_target::terminal_ours, inf_child_target::interrupt)
1906         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1907         New.
1908         (inf_child_open, inf_child_disconnect, inf_child_close)
1909         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1910         (inf_child_post_startup_inferior, inf_child_can_run)
1911         (inf_child_pid_to_exec_file): Refactor as methods of
1912         inf_child_target.
1913         (inf_child_follow_fork): Delete.
1914         (inf_child_target::can_create_inferior)
1915         (inf_child_target::can_attach): New.
1916         (inf_child_target::has_all_memory, inf_child_target::has_memory)
1917         (inf_child_target::has_stack, inf_child_target::has_registers)
1918         (inf_child_target::has_execution): New.
1919         (inf_child_fileio_open, inf_child_fileio_pwrite)
1920         (inf_child_fileio_pread, inf_child_fileio_fstat)
1921         (inf_child_fileio_close, inf_child_fileio_unlink)
1922         (inf_child_fileio_readlink, inf_child_use_agent)
1923         (inf_child_can_use_agent): Refactor as methods of
1924         inf_child_target.
1925         (return_zero, inf_child_target): Delete.
1926         (inf_child_target::inf_child_target): New.
1927         * inf-child.h: Include "target.h".
1928         (inf_child_target): Delete function prototype.
1929         (inf_child_target): New class.
1930         (inf_child_open_target, inf_child_mourn_inferior)
1931         (inf_child_maybe_unpush_target): Delete.
1932         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1933         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1934         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1935         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1936         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1937         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1938         (inf_ptrace_wait, inf_ptrace_xfer_partial)
1939         (inf_ptrace_thread_alive, inf_ptrace_files_info)
1940         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1941         methods of inf_ptrace_target.
1942         (inf_ptrace_target): Delete function.
1943         * inf-ptrace.h: Include "inf-child.h".
1944         (inf_ptrace_target): Delete function declaration.
1945         (inf_ptrace_target): New class.
1946         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1947         * linux-nat.c (linux_target): New.
1948         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1949         (linux_nat_target::~linux_nat_target): New.
1950         (linux_child_post_attach, linux_child_post_startup_inferior)
1951         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1952         (linux_child_remove_fork_catchpoint)
1953         (linux_child_insert_vfork_catchpoint)
1954         (linux_child_remove_vfork_catchpoint)
1955         (linux_child_insert_exec_catchpoint)
1956         (linux_child_remove_exec_catchpoint)
1957         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1958         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1959         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1960         (linux_nat_stopped_data_address)
1961         (linux_nat_stopped_by_sw_breakpoint)
1962         (linux_nat_supports_stopped_by_sw_breakpoint)
1963         (linux_nat_stopped_by_hw_breakpoint)
1964         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1965         (linux_nat_kill, linux_nat_mourn_inferior)
1966         (linux_nat_xfer_partial, linux_nat_thread_alive)
1967         (linux_nat_update_thread_list, linux_nat_pid_to_str)
1968         (linux_nat_thread_name, linux_child_pid_to_exec_file)
1969         (linux_child_static_tracepoint_markers_by_strid)
1970         (linux_nat_is_async_p, linux_nat_can_async_p)
1971         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1972         (linux_nat_supports_multi_process)
1973         (linux_nat_supports_disable_randomization, linux_nat_async)
1974         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1975         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1976         (linux_nat_fileio_open, linux_nat_fileio_readlink)
1977         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1978         methods of linux_nat_target.
1979         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1980         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1981         parameter.
1982         (check_stopped_by_watchpoint): Adjust.
1983         (linux_xfer_partial): Delete.
1984         (linux_target_install_ops, linux_target, linux_nat_add_target):
1985         Delete.
1986         (linux_nat_target::linux_nat_target): New.
1987         * linux-nat.h: Include "inf-ptrace.h".
1988         (linux_nat_target): New.
1989         (linux_target, linux_target_install_ops, linux_nat_add_target):
1990         Delete function declarations.
1991         (linux_target): Declare global.
1992         * linux-thread-db.c (thread_db_target): New.
1993         (thread_db_target::thread_db_target): New.
1994         (thread_db_ops): Delete.
1995         (the_thread_db_target): New.
1996         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1997         (thread_db_update_thread_list, thread_db_pid_to_str)
1998         (thread_db_extra_thread_info)
1999         (thread_db_thread_handle_to_thread_info)
2000         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
2001         (thread_db_resume): Refactor as methods of thread_db_target.
2002         (init_thread_db_ops): Delete.
2003         (_initialize_thread_db): Remove reference to init_thread_db_ops.
2004         * x86-linux-nat.c: Don't include "linux-nat.h".
2005         (super_post_startup_inferior): Delete.
2006         (x86_linux_nat_target::~x86_linux_nat_target): New.
2007         (x86_linux_child_post_startup_inferior)
2008         (x86_linux_read_description, x86_linux_enable_btrace)
2009         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
2010         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
2011         methods of x86_linux_nat_target.
2012         (x86_linux_create_target): Delete.  Bits folded ...
2013         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
2014         pointer.
2015         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
2016         (x86_linux_nat_target): New class.
2017         (x86_linux_create_target): Delete.
2018         (x86_linux_add_target): Now takes a linux_nat_target pointer.
2019         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
2020         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
2021         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
2022         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
2023         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
2024         make extern.
2025         (x86_use_watchpoints): Delete.
2026         * x86-nat.h: Include "breakpoint.h" and "target.h".
2027         (x86_use_watchpoints): Delete.
2028         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
2029         (x86_stopped_by_watchpoint, x86_stopped_data_address)
2030         (x86_insert_watchpoint, x86_remove_watchpoint)
2031         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
2032         (x86_stopped_by_hw_breakpoint): New declarations.
2033         (x86_nat_target): New template class.
2034
2035         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
2036         (the_ppc_linux_nat_target): New.
2037         (ppc_linux_fetch_inferior_registers)
2038         (ppc_linux_can_use_hw_breakpoint)
2039         (ppc_linux_region_ok_for_hw_watchpoint)
2040         (ppc_linux_ranged_break_num_registers)
2041         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
2042         (ppc_linux_insert_mask_watchpoint)
2043         (ppc_linux_remove_mask_watchpoint)
2044         (ppc_linux_can_accel_watchpoint_condition)
2045         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
2046         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
2047         (ppc_linux_watchpoint_addr_within_range)
2048         (ppc_linux_masked_watch_num_registers)
2049         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
2050         (ppc_linux_read_description): Refactor as methods of
2051         ppc_linux_nat_target.
2052         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
2053
2054         * procfs.c (procfs_xfer_partial): Delete forward declaration.
2055         (procfs_target): New class.
2056         (the_procfs_target): New.
2057         (procfs_target): Delete function.
2058         (procfs_auxv_parse, procfs_attach, procfs_detach)
2059         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
2060         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
2061         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
2062         (procfs_create_inferior, procfs_update_thread_list)
2063         (procfs_thread_alive, procfs_pid_to_str)
2064         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
2065         (procfs_stopped_data_address, procfs_insert_watchpoint)
2066         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
2067         (proc_find_memory_regions, procfs_info_proc)
2068         (procfs_make_note_section): Refactor as methods of procfs_target.
2069         (_initialize_procfs): Adjust.
2070         * sol-thread.c (sol_thread_target): New class.
2071         (sol_thread_ops): Now a sol_thread_target.
2072         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
2073         (sol_thread_fetch_registers, sol_thread_store_registers)
2074         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
2075         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
2076         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
2077         (init_sol_thread_ops): Delete.
2078         (_initialize_sol_thread): Adjust.  Remove references to
2079         init_sol_thread_ops and complete_target_initialization.
2080
2081         * windows-nat.c (windows_nat_target): New class.
2082         (windows_fetch_inferior_registers)
2083         (windows_store_inferior_registers, windows_resume, windows_wait)
2084         (windows_attach, windows_detach, windows_pid_to_exec_file)
2085         (windows_files_info, windows_create_inferior)
2086         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
2087         (windows_close, windows_pid_to_str, windows_xfer_partial)
2088         (windows_get_tib_address, windows_get_ada_task_ptid)
2089         (windows_thread_name, windows_thread_alive): Refactor as
2090         windows_nat_target methods.
2091         (do_initial_windows_stuff): Adjust.
2092         (windows_target): Delete function.
2093         (_initialize_windows_nat): Adjust.
2094
2095         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
2096         (darwin_mourn_inferior, darwin_kill_inferior)
2097         (darwin_create_inferior, darwin_attach, darwin_detach)
2098         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
2099         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
2100         (darwin_supports_multi_process): Refactor as darwin_nat_target
2101         methods.
2102         (darwin_resume_to, darwin_files_info): Delete.
2103         (_initialize_darwin_inferior): Rename to ...
2104         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
2105         * darwin-nat.h: Include "inf-child.h".
2106         (darwin_nat_target): New class.
2107         (darwin_complete_target): Delete.
2108         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
2109         (darwin_target): New.
2110         (i386_darwin_fetch_inferior_registers)
2111         (i386_darwin_store_inferior_registers): Refactor as methods of
2112         darwin_nat_target.
2113         (darwin_complete_target): Delete, with ...
2114         (_initialize_i386_darwin_nat): ... bits factored out here.
2115
2116         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
2117         (the_alpha_linux_nat_target): New.
2118         (alpha_linux_register_u_offset): Refactor as
2119         alpha_linux_nat_target method.
2120         (_initialize_alpha_linux_nat): Adjust.
2121         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
2122         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2123         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
2124         methods of linux_nat_trad_target.
2125         (linux_trad_target): Delete.
2126         * linux-nat-trad.h (linux_trad_target): Delete function.
2127         (linux_nat_trad_target): New class.
2128         * mips-linux-nat.c (mips_linux_nat_target): New class.
2129         (super_fetch_registers, super_store_registers, super_close):
2130         Delete.
2131         (the_mips_linux_nat_target): New.
2132         (mips64_linux_regsets_fetch_registers)
2133         (mips64_linux_regsets_store_registers)
2134         (mips64_linux_fetch_registers, mips64_linux_store_registers)
2135         (mips_linux_register_u_offset, mips_linux_read_description)
2136         (mips_linux_can_use_hw_breakpoint)
2137         (mips_linux_stopped_by_watchpoint)
2138         (mips_linux_stopped_data_address)
2139         (mips_linux_region_ok_for_hw_watchpoint)
2140         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2141         (mips_linux_close): Refactor as methods of mips_linux_nat.
2142         (_initialize_mips_linux_nat): Adjust to C++ification.
2143
2144         * aix-thread.c (aix_thread_target): New class.
2145         (aix_thread_ops): Now an aix_thread_target.
2146         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
2147         (aix_thread_fetch_registers, aix_thread_store_registers)
2148         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
2149         (aix_thread_thread_alive, aix_thread_pid_to_str)
2150         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
2151         Refactor as methods of aix_thread_target.
2152         (init_aix_thread_ops): Delete.
2153         (_initialize_aix_thread): Remove references to init_aix_thread_ops
2154         and complete_target_initialization.
2155         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
2156         (rs6000_nat_target): New class.
2157         (the_rs6000_nat_target): New.
2158         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
2159         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
2160         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
2161         (super_create_inferior): Delete.
2162         (_initialize_rs6000_nat): Adjust to C++ification.
2163
2164         * arm-linux-nat.c (arm_linux_nat_target): New class.
2165         (the_arm_linux_nat_target): New.
2166         (arm_linux_fetch_inferior_registers)
2167         (arm_linux_store_inferior_registers, arm_linux_read_description)
2168         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
2169         (arm_linux_remove_hw_breakpoint)
2170         (arm_linux_region_ok_for_hw_watchpoint)
2171         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
2172         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
2173         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
2174         arm_linux_nat_target.
2175         (_initialize_arm_linux_nat): Adjust to C++ification.
2176
2177         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
2178         (the_aarch64_linux_nat_target): New.
2179         (aarch64_linux_fetch_inferior_registers)
2180         (aarch64_linux_store_inferior_registers)
2181         (aarch64_linux_child_post_startup_inferior)
2182         (aarch64_linux_read_description)
2183         (aarch64_linux_can_use_hw_breakpoint)
2184         (aarch64_linux_insert_hw_breakpoint)
2185         (aarch64_linux_remove_hw_breakpoint)
2186         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
2187         (aarch64_linux_region_ok_for_hw_watchpoint)
2188         (aarch64_linux_stopped_data_address)
2189         (aarch64_linux_stopped_by_watchpoint)
2190         (aarch64_linux_watchpoint_addr_within_range)
2191         (aarch64_linux_can_do_single_step): Refactor as methods of
2192         aarch64_linux_nat_target.
2193         (super_post_startup_inferior): Delete.
2194         (_initialize_aarch64_linux_nat): Adjust to C++ification.
2195
2196         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
2197         (the_hppa_linux_nat_target): New.
2198         (hppa_linux_fetch_inferior_registers)
2199         (hppa_linux_store_inferior_registers): Refactor as methods of
2200         hppa_linux_nat_target.
2201         (_initialize_hppa_linux_nat): Adjust to C++ification.
2202
2203         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
2204         (the_ia64_linux_nat_target): New.
2205         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
2206         (ia64_linux_stopped_data_address)
2207         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
2208         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
2209         ia64_linux_nat_target methods.
2210         (super_xfer_partial): Delete.
2211         (_initialize_ia64_linux_nat): Adjust to C++ification.
2212
2213         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
2214         (the_m32r_linux_nat_target): New.
2215         (m32r_linux_fetch_inferior_registers)
2216         (m32r_linux_store_inferior_registers): Refactor as
2217         m32r_linux_nat_target methods.
2218         (_initialize_m32r_linux_nat): Adjust to C++ification.
2219
2220         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
2221         (the_m68k_linux_nat_target): New.
2222         (m68k_linux_fetch_inferior_registers)
2223         (m68k_linux_store_inferior_registers): Refactor as
2224         m68k_linux_nat_target methods.
2225         (_initialize_m68k_linux_nat): Adjust to C++ification.
2226
2227         * s390-linux-nat.c (s390_linux_nat_target): New class.
2228         (the_s390_linux_nat_target): New.
2229         (s390_linux_fetch_inferior_registers)
2230         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
2231         (s390_insert_watchpoint, s390_remove_watchpoint)
2232         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
2233         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
2234         (s390_auxv_parse, s390_read_description): Refactor as methods of
2235         s390_linux_nat_target.
2236         (_initialize_s390_nat): Adjust to C++ification.
2237
2238         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
2239         (the_sparc_linux_nat_target): New.
2240         (_initialize_sparc_linux_nat): Adjust to C++ification.
2241         * sparc-nat.c (sparc_fetch_inferior_registers)
2242         (sparc_store_inferior_registers): Remove target_ops parameter.
2243         * sparc-nat.h (sparc_fetch_inferior_registers)
2244         (sparc_store_inferior_registers): Remove target_ops parameter.
2245         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
2246         (the_sparc64_linux_nat_target): New.
2247         (_initialize_sparc64_linux_nat): Adjust to C++ification.
2248
2249         * spu-linux-nat.c (spu_linux_nat_target): New class.
2250         (the_spu_linux_nat_target): New.
2251         (spu_child_post_startup_inferior, spu_child_post_attach)
2252         (spu_child_wait, spu_fetch_inferior_registers)
2253         (spu_store_inferior_registers, spu_xfer_partial)
2254         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
2255         methods.
2256         (_initialize_spu_nat): Adjust to C++ification.
2257
2258         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
2259         (the_tilegx_linux_nat_target): New.
2260         (fetch_inferior_registers, store_inferior_registers):
2261         Refactor as methods.
2262         (_initialize_tile_linux_nat): Adjust to C++ification.
2263
2264         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
2265         (the_xtensa_linux_nat_target): New.
2266         (xtensa_linux_fetch_inferior_registers)
2267         (xtensa_linux_store_inferior_registers): Refactor as
2268         xtensa_linux_nat_target methods.
2269         (_initialize_xtensa_linux_nat): Adjust to C++ification.
2270
2271         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
2272         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
2273         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
2274         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
2275         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
2276         (fbsd_stopped_by_sw_breakpoint)
2277         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
2278         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
2279         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
2280         (fbsd_post_startup_inferior, fbsd_post_attach)
2281         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
2282         (fbsd_set_syscall_catchpoint)
2283         (super_xfer_partial, super_resume, super_wait)
2284         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
2285         (fbsd_handle_debug_trap): Remove target_ops parameter.
2286         (fbsd_nat_add_target): Delete.
2287         * fbsd-nat.h: Include "inf-ptrace.h".
2288         (fbsd_nat_add_target): Delete.
2289         (USE_SIGTRAP_SIGINFO): Define.
2290         (fbsd_nat_target): New class.
2291
2292         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
2293         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
2294         (amd64bsd_target): Delete.
2295         * amd64-bsd-nat.h: New file.
2296         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
2297         "x86-bsd-nat.h".
2298         (amd64_fbsd_nat_target): New class.
2299         (the_amd64_fbsd_nat_target): New.
2300         (amd64fbsd_read_description): Refactor as method of
2301         amd64_fbsd_nat_target.
2302         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2303         (_initialize_amd64fbsd_nat): Adjust to C++ification.
2304         * amd64-nat.h (amd64bsd_target): Delete function declaration.
2305         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
2306         (i386bsd_store_inferior_registers): Remove target_ops parameter.
2307         (i386bsd_target): Delete.
2308         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
2309         (i386bsd_fetch_inferior_registers)
2310         (i386bsd_store_inferior_registers): Declare.
2311         (i386_bsd_nat_target): New class.
2312         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
2313         (the_i386_fbsd_nat_target): New.
2314         (i386fbsd_resume, i386fbsd_read_description): Refactor as
2315         i386_fbsd_nat_target methods.
2316         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
2317         (_initialize_i386fbsd_nat): Adjust to C++ification.
2318         * x86-bsd-nat.c (super_mourn_inferior): Delete.
2319         (x86bsd_mourn_inferior, x86bsd_target): Delete.
2320         (_initialize_x86_bsd_nat): Adjust to C++ification.
2321         * x86-bsd-nat.h: Include "x86-nat.h".
2322         (x86bsd_target): Delete declaration.
2323         (x86bsd_nat_target): New class.
2324
2325         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
2326         (the_aarch64_fbsd_nat_target): New.
2327         (aarch64_fbsd_fetch_inferior_registers)
2328         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
2329         aarch64_fbsd_nat_target.
2330         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
2331         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
2332         (the_alpha_bsd_nat_target): New.
2333         (alphabsd_fetch_inferior_registers)
2334         (alphabsd_store_inferior_registers): Refactor as
2335         alpha_bsd_nat_target methods.
2336         (_initialize_alphabsd_nat): Refactor as methods of
2337         alpha_bsd_nat_target.
2338         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
2339         (the_amd64_nbsd_nat_target): New.
2340         (_initialize_amd64nbsd_nat): Adjust to C++ification.
2341         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
2342         (the_amd64_obsd_nat_target): New.
2343         (_initialize_amd64obsd_nat): Adjust to C++ification.
2344         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
2345         (the_arm_fbsd_nat_target): New.
2346         (arm_fbsd_fetch_inferior_registers)
2347         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
2348         (_initialize_arm_fbsd_nat): Refactor as methods of
2349         arm_fbsd_nat_target.
2350         (_initialize_arm_fbsd_nat): Adjust to C++ification.
2351         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
2352         (the_arm_netbsd_nat_target): New.
2353         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
2354         arm_netbsd_nat_target.
2355         (_initialize_arm_netbsd_nat): Adjust to C++ification.
2356         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
2357         (the_hppa_nbsd_nat_target): New.
2358         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
2359         hppa_nbsd_nat_target methods.
2360         (_initialize_hppanbsd_nat): Adjust to C++ification.
2361         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
2362         (the_hppa_obsd_nat_target): New.
2363         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
2364         methods of hppa_obsd_nat_target.
2365         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
2366         add_target.
2367         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
2368         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
2369         add_target.
2370         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
2371         (_initialize_i386obsd_nat): Use add_target.
2372         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
2373         (the_m68k_bsd_nat_target): New.
2374         (m68kbsd_fetch_inferior_registers)
2375         (m68kbsd_store_inferior_registers): Refactor as methods of
2376         m68k_bsd_nat_target.
2377         (_initialize_m68kbsd_nat): Adjust to C++ification.
2378         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
2379         (the_mips_fbsd_nat_target): New.
2380         (mips_fbsd_fetch_inferior_registers)
2381         (mips_fbsd_store_inferior_registers): Refactor as methods of
2382         mips_fbsd_nat_target.
2383         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
2384         add_target.
2385         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
2386         (the_mips_nbsd_nat_target): New.
2387         (mipsnbsd_fetch_inferior_registers)
2388         (mipsnbsd_store_inferior_registers): Refactor as methods of
2389         mips_nbsd_nat_target.
2390         (_initialize_mipsnbsd_nat): Adjust to C++ification.
2391         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
2392         (the_mips64_obsd_nat_target): New.
2393         (mips64obsd_fetch_inferior_registers)
2394         (mips64obsd_store_inferior_registers): Refactor as methods of
2395         mips64_obsd_nat_target.
2396         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
2397         add_target.
2398         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
2399         nbsd_nat_target.
2400         * nbsd-nat.h: Include "inf-ptrace.h".
2401         (nbsd_nat_target): New class.
2402         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
2403         (obsd_wait): Refactor as methods of obsd_nat_target.
2404         (obsd_add_target): Delete.
2405         * obsd-nat.h: Include "inf-ptrace.h".
2406         (obsd_nat_target): New class.
2407         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
2408         (the_ppc_fbsd_nat_target): New.
2409         (ppcfbsd_fetch_inferior_registers)
2410         (ppcfbsd_store_inferior_registers): Refactor as methods of
2411         ppc_fbsd_nat_target.
2412         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
2413         add_target.
2414         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
2415         (the_ppc_nbsd_nat_target): New.
2416         (ppcnbsd_fetch_inferior_registers)
2417         (ppcnbsd_store_inferior_registers): Refactor as methods of
2418         ppc_nbsd_nat_target.
2419         (_initialize_ppcnbsd_nat): Adjust to C++ification.
2420         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
2421         (the_ppc_obsd_nat_target): New.
2422         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
2423         methods of ppc_obsd_nat_target.
2424         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
2425         add_target.
2426         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
2427         (the_sh_nbsd_nat_target): New.
2428         (shnbsd_fetch_inferior_registers)
2429         (shnbsd_store_inferior_registers): Refactor as methods of
2430         sh_nbsd_nat_target.
2431         (_initialize_shnbsd_nat): Adjust to C++ification.
2432         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
2433         (inf_ptrace_xfer_partial): Delete.
2434         (sparc_xfer_partial, sparc_target): Delete.
2435         * sparc-nat.h (sparc_fetch_inferior_registers)
2436         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
2437         (sparc_target): Delete function declaration.
2438         (sparc_target): New template class.
2439         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
2440         (_initialize_sparcnbsd_nat): Adjust to C++ification.
2441         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
2442         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
2443         add_target.
2444         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
2445         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
2446         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
2447         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
2448         add_target.
2449         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
2450         (the_vax_bsd_nat_target): New.
2451         (vaxbsd_fetch_inferior_registers)
2452         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
2453         methods.
2454         (_initialize_vaxbsd_nat): Adjust to C++ification.
2455
2456         * bsd-kvm.c (bsd_kvm_target): New class.
2457         (bsd_kvm_ops): Now a bsd_kvm_target.
2458         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
2459         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
2460         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
2461         bsd_kvm_target.
2462         (bsd_kvm_return_one): Delete.
2463         (bsd_kvm_add_target): Adjust to C++ification.
2464
2465         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
2466         (nto_procfs_target_procfs): New classes.
2467         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
2468         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
2469         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
2470         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
2471         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
2472         (procfs_remove_hw_breakpoint, procfs_resume)
2473         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
2474         (procfs_kill_inferior, procfs_store_registers)
2475         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
2476         as methods of nto_procfs_target.
2477         (nto_procfs_ops): Now an nto_procfs_target_procfs.
2478         (nto_native_ops): Delete.
2479         (procfs_open, procfs_native_open): Delete.
2480         (nto_native_ops): Now an nto_procfs_target_native.
2481         (init_procfs_targets): Adjust to C++ification.
2482         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
2483         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
2484         Refactor as methods of nto_procfs_target.
2485
2486         * go32-nat.c (go32_nat_target): New class.
2487         (the_go32_nat_target): New.
2488         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
2489         (go32_store_registers, go32_xfer_partial, go32_files_info)
2490         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
2491         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
2492         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
2493         (go32_pid_to_str): Refactor as methods of go32_nat_target.
2494         (go32_target): Delete.
2495         (_initialize_go32_nat): Adjust to C++ification.
2496
2497         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
2498         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
2499         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
2500         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
2501         gnu_nat_target.
2502         (gnu_target): Delete.
2503         * gnu-nat.h (gnu_target): Delete.
2504         (gnu_nat_target): New class.
2505         * i386-gnu-nat.c (gnu_base_target): New.
2506         (i386_gnu_nat_target): New class.
2507         (the_i386_gnu_nat_target): New.
2508         (_initialize_i386gnu_nat): Adjust to C++ification.
2509
2510 2018-05-02  Pedro Alves  <palves@redhat.com>
2511
2512         * bfd-target.c (target_bfd_xclose): Rename to ...
2513         (target_bfd_close): ... this.
2514         (target_bfd_reopen): Adjust.
2515         * target.c (target_close): Remove references to to_xclose.
2516         * target.h (target_ops::to_xclose): Delete.
2517         (target_ops::to_close): Update comments.
2518
2519 2018-05-02  Pedro Alves  <palves@redhat.com>
2520
2521         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
2522         "linux-nat.h".
2523         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
2524         * inf-ptrace.c (inf_ptrace_register_u_offset)
2525         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
2526         (inf_ptrace_store_register, inf_ptrace_store_registers)
2527         (inf_ptrace_trad_target): Move to ...
2528         * linux-nat-trad.c: ... this new file.
2529         * linux-nat-trad.h: New file.
2530         * linux-nat.c (linux_target_install_ops): Make extern.
2531         (linux_trad_target): Delete.
2532         * linux-nat.h (linux_trad_target): Delete declaration.
2533         (linux_target_install_ops): Declare.
2534         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
2535         "linux-nat.h".
2536
2537 2018-05-02  Pedro Alves  <palves@redhat.com>
2538
2539         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2540         procfs_target/add_target here.
2541         * procfs.c (procfs_target): Make static.
2542         (_initialize_procfs): Call add_target here.
2543         * procfs.h (struct target_ops): Remove forward declaration.
2544         (procfs_target): Remove declaration.
2545         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
2546
2547 2018-05-02  Pedro Alves  <palves@redhat.com>
2548
2549         * procfs.c (procfs_stopped_by_watchpoint)
2550         (procfs_insert_watchpoint, procfs_remove_watchpoint)
2551         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
2552         Forward declare.
2553         (procfs_use_watchpoints): Delete, move contents...
2554         (procfs_target): ... here.
2555         * procfs.h (procfs_use_watchpoints): Delete declaration.
2556         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
2557         procfs_use_watchpoints.
2558         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
2559         procfs_use_watchpoints.
2560
2561 2018-05-02  Tom Tromey  <tom@tromey.com>
2562
2563         PR python/20084:
2564         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
2565         and var_zuinteger_unlimited.
2566         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
2567         and PARAM_ZUINTEGER_UNLIMITED.
2568         (set_parameter_value): Handle var_zuinteger and
2569         var_zuinteger_unlimited.
2570         (add_setshow_generic): Likewise.
2571         (parmpy_init): Likewise.
2572
2573 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
2574
2575         PR rust/23124
2576         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
2577         pointer is not null before dereferencing it.
2578
2579 2018-04-30  Tom Tromey  <tom@tromey.com>
2580
2581         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
2582         is_mi_like_p.
2583
2584 2018-04-30  Tom Tromey  <tom@tromey.com>
2585
2586         * breakpoint.c (mention): Remove use of is_mi_like_p.
2587         (print_mention_ranged_breakpoint): Likewise.
2588         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
2589         of is_mi_like_p.
2590
2591 2018-04-30  Tom Tromey  <tom@tromey.com>
2592
2593         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
2594
2595 2018-04-30  Tom Tromey  <tom@tromey.com>
2596
2597         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
2598         (info_spu_event_command): Remove some uses of is_mi_like_p.
2599
2600 2018-04-30  Tom Tromey  <tom@tromey.com>
2601
2602         * python/py-framefilter.c (py_print_single_arg)
2603         (enumerate_locals, py_print_args, py_print_frame): Remove some
2604         uses of is_mi_like_p.
2605
2606 2018-04-30  Tom Tromey  <tom@tromey.com>
2607
2608         * ui-out.c: Update.
2609         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
2610         * ui-out.h (ui_out::is_mi_like_p): Now const.
2611         (ui_out::do_is_mi_like_p): Now const.
2612         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
2613
2614 2018-04-30  Tom Tromey  <tom@tromey.com>
2615
2616         * varobj.c (varobj_set_visualizer): Use new_reference.
2617         * python/python.c (gdbpy_decode_line): Use new_reference.
2618         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
2619         new_reference.
2620
2621 2018-04-30  Tom Tromey  <tom@tromey.com>
2622
2623         * varobj.c (install_new_value): Use new_reference.
2624         * value.h (value_incref): Return void.  Swap intro comment with
2625         value_decref.
2626         * value.c (set_value_parent): Use new_reference.
2627         (value_incref): Return void.  Update intro comment.
2628         (release_value): Use new_reference.
2629         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
2630
2631 2018-04-30  Tom Tromey  <tom@tromey.com>
2632
2633         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
2634         * gdb_bfd.h (new_bfd_ref): Remove.
2635         (gdb_bfd_open): Update comment.
2636         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2637         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
2638         (gdb_bfd_fdopenr): Use new_reference.
2639         * exec.c (exec_file_attach): Use new_reference.
2640
2641 2018-04-30  Tom Tromey  <tom@tromey.com>
2642
2643         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
2644         method.
2645
2646 2018-04-30  Tom Tromey  <tom@tromey.com>
2647
2648         * jit.c (jit_read_code_entry): Use type_align.
2649         * i386-tdep.c (i386_gdbarch_init): Don't call
2650         set_gdbarch_long_long_align_bit.
2651         * gdbarch.sh: Remove long_long_align_bit.
2652         * gdbarch.c, gdbarch.h: Rebuild.
2653         * arc-tdep.c (arc_type_align): New function.
2654         (arc_gdbarch_init): Use arc_type_align.  Don't call
2655         set_gdbarch_long_long_align_bit.
2656
2657 2018-04-30  Tom Tromey  <tom@tromey.com>
2658
2659         * rust-lang.c (rust_type_alignment): Remove.
2660         (rust_composite_type): Use type_align.
2661
2662 2018-04-30  Tom Tromey  <tom@tromey.com>
2663
2664         * NEWS: Mention Type.align.
2665         * python/py-type.c (typy_get_alignof): New function.
2666         (type_object_getset): Add "alignof".
2667
2668 2018-04-30  Tom Tromey  <tom@tromey.com>
2669
2670         PR exp/17095:
2671         * NEWS: Update.
2672         * std-operator.def (UNOP_ALIGNOF): New operator.
2673         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
2674         New.
2675         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
2676         * c-lang.c (c_op_print_tab): Add alignof.
2677         * c-exp.y (ALIGNOF): New token.
2678         (exp): Add "ALIGNOF" production.
2679         (ident_tokens): Add _Alignof and alignof.
2680
2681 2018-04-30  Tom Tromey  <tom@tromey.com>
2682
2683         * i386-tdep.c (i386_type_align): New function.
2684         (i386_gdbarch_init): Update.
2685         * gdbarch.sh (type_align): New method.
2686         * gdbarch.c, gdbarch.h: Rebuild.
2687         * arch-utils.h (default_type_align): Declare.
2688         * arch-utils.c (default_type_align): New function.
2689         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
2690         (struct type) <align_log2>: New field.
2691         <instance_flags>: Now a bitfield.
2692         (TYPE_RAW_ALIGN): New macro.
2693         (type_align, type_raw_align, set_type_align): Declare.
2694         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
2695         functions.
2696         * dwarf2read.c (quirk_rust_enum): Set type alignment.
2697         (get_alignment, maybe_set_alignment): New functions.
2698         (read_structure_type, read_enumeration_type, read_array_type)
2699         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
2700         (read_subrange_type, read_base_type): Set type alignment.
2701
2702 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
2703
2704         * dwarf2read.c (read_index_from_section): Use bool.
2705
2706 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
2707
2708         PR gdb/22950
2709         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
2710         with #ifdef.
2711
2712 2018-04-29  John Reiser  <jreiser@BitWagon.com>
2713
2714         PR build/22873
2715         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
2716         last step, and do it atomically.
2717
2718 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
2719
2720         * compile/compile-c-types.c (convert_int, convert_float):
2721         Update for C FE v1.
2722
2723 2018-04-27  Tom Tromey  <tom@tromey.com>
2724
2725         PR rust/22545:
2726         * rust-lang.c (rust_inclusive_range_type_p): New function.
2727         (rust_range): Handle inclusive ranges.
2728         (rust_compute_range): Likewise.
2729         * rust-exp.y (struct rust_op) <inclusive>: New field.
2730         (DOTDOTEQ): New constant.
2731         (range_expr): Add "..=" productions.
2732         (operator_tokens): Add "..=" token.
2733         (ast_range): Add "inclusive" parameter.
2734         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
2735         ranges.
2736         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
2737         bounds values.
2738         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
2739         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
2740         Update comments.
2741         * expprint.c (print_subexp_standard): Handle new bounds values.
2742         (dump_subexp_body_standard): Likewise.
2743
2744 2018-04-27  Tom Tromey  <tom@tromey.com>
2745
2746         * configure: Rebuild.
2747         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
2748         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
2749         "OVERRIDE".
2750         (class symbol_needs_eval_context): Likewise.
2751         * dwarf2read.c (mock_mapped_index::symbol_name_count)
2752         (mock_mapped_index::symbol_name_at): Use "override".  Remove
2753         "virtual".
2754         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
2755         "override".
2756         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
2757         * aarch64-tdep.c (instruction_reader::read): Use "override".
2758         (instruction_reader_test::read): Likewise.
2759         * arm-tdep.c (instruction_reader::read): Use "override".
2760         (instruction_reader_thumb::read): Likewise.
2761
2762 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
2763
2764         PR remote/9665
2765         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
2766         instead of remote_send.
2767         (remote_send): Remove.
2768
2769 2018-04-26  Pedro Alves  <palves@redhat.com>
2770
2771         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
2772         find_function_start_sal instead of find_pc_line.
2773
2774 2018-04-26  Pedro Alves  <palves@redhat.com>
2775
2776         * breakpoint.c (set_breakpoint_location_function): Handle
2777         mst_data_gnu_ifunc.
2778         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
2779         * elfread.c (elf_symtab_read): Give data symbols with
2780         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
2781         (elf_rel_plt_read): Update comment.
2782         * linespec.c (convert_linespec_to_sals): Handle
2783         mst_data_gnu_ifunc.
2784         (minsym_found): Handle mst_data_gnu_ifunc.
2785         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
2786         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
2787         * parse.c (find_minsym_type_and_address): Handle
2788         mst_data_gnu_ifunc.
2789         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
2790         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
2791         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
2792         comment.
2793         <mst_data_gnu_ifunc>: New enumerator.
2794
2795 2018-04-26  Pedro Alves  <palves@redhat.com>
2796
2797         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
2798         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
2799         'want_trampoline' parameter by a lookup_msym_prefer parameter.
2800         Handle it.
2801         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
2802         (lookup_minimal_symbol_by_pc): Adjust.
2803         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
2804         (lookup_solib_trampoline_symbol_by_pc): Adjust.
2805         * minsyms.h (lookup_msym_prefer): New enum.
2806         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2807         parameter by a lookup_msym_prefer parameter.
2808
2809 2018-04-26  Pedro Alves  <palves@redhat.com>
2810
2811         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
2812         ends in "@plt" instead of looking at the symbol's section.
2813
2814 2018-04-26  Pedro Alves  <palves@redhat.com>
2815
2816         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
2817         all references.
2818         (find_pc_partial_function_gnu_ifunc): Rename to ...
2819         (find_pc_partial_function): ... this, and remove references to
2820         'is_gnu_ifunc_p'.
2821         (find_pc_partial_function): Delete old implementation.
2822         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
2823
2824 2018-04-26  Pedro Alves  <palves@redhat.com>
2825
2826         * linespec.c (struct bound_minimal_symbol_search_key): New.
2827         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
2828         skip first line if we found a GNU ifunc minimal symbol by name.
2829         (compare_msymbols): Change parameters to work with a destructured
2830         lhs minsym.
2831         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
2832         functions.
2833
2834 2018-04-26  Pedro Alves  <palves@redhat.com>
2835
2836         * breakpoint.c (set_breakpoint_location_function): Don't resolve
2837         ifunc targets here.  Instead, if we have an ifunc minsym, use its
2838         address/name.
2839         (add_location_to_breakpoint): Store the minsym and the objfile in
2840         the breakpoint location.
2841         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
2842         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
2843         Record the minsym in the sal.
2844         * symtab.h (symtab_and_line) <msymbol>: New field.
2845
2846 2018-04-26  Pedro Alves  <palves@redhat.com>
2847
2848         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
2849         unless we actually resolved the ifunc.
2850
2851 2018-04-26  Pedro Alves  <palves@redhat.com>
2852
2853         * c-exp.y (variable production): Prefer ifunc minsyms over
2854         regular function symbols.
2855         * symtab.c (find_gnu_ifunc): New function.
2856         * minsyms.h (lookup_msym_prefer): New enum.
2857         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
2858         parameter by a lookup_msym_prefer parameter.
2859         * symtab.h (find_gnu_ifunc): New declaration.
2860
2861 2018-04-26  Pedro Alves  <palves@redhat.com>
2862
2863         * blockframe.c (find_gnu_ifunc_target_type): New function.
2864         (find_function_type): New.
2865         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
2866         return a value with a memory address.
2867         (eval_call): For calls to GNU ifunc functions, try to find the
2868         type of the target function from the type that the resolver
2869         returns.
2870         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2871         symbols.
2872         * infcall.c (find_function_return_type): Delete.
2873         (find_function_addr): Add 'function_type' parameter.  For calls to
2874         GNU ifunc functions, try to find the type of the target function
2875         from the type that the resolver returns, and return it via
2876         FUNCTION_TYPE.
2877         (call_function_by_hand_dummy): Adjust to use the function type
2878         returned by find_function_addr.
2879         (find_function_addr): Add 'function_type' parameter and move
2880         description here.
2881         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2882         declarations.
2883
2884 2018-04-26  Pedro Alves  <palves@redhat.com>
2885
2886         * c-exp.y (variable production): Skip finding an alias for ifunc
2887         symbols.
2888
2889 2018-04-26  Pedro Alves  <palves@redhat.com>
2890
2891         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2892
2893 2018-04-25  Pedro Alves  <palves@redhat.com>
2894
2895         * infcmd.c (kill_command): Print the pid as string, not the whole
2896         thread's ptid.  Add comment.  s/has been killed/killed/ in output
2897         message.
2898         * remote.c (remote_detach_1): Print the pid as string, not the
2899         whole thread's ptid.
2900
2901 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2902             Sergio Durigan Junior  <sergiodj@redhat.com>
2903             Pedro Alves  <palves@redhat.com>
2904
2905         * infcmd.c (kill_command): Print message when inferior has
2906         been killed.
2907         * inferior.c (print_inferior_events): Remove 'static'.  Set as
2908         '1'.
2909         (add_inferior): Improve message printed when
2910         'print_inferior_events' is on.
2911         (exit_inferior): Remove message printed when
2912         'print_inferior_events' is on.
2913         (detach_inferior): Improve message printed when
2914         'print_inferior_events' is on.
2915         (initialize_inferiors): Use 'add_inferior_silent' to set
2916         'current_inferior_'.
2917         * inferior.h (print_inferior_events): Declare here as
2918         'extern'.
2919         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2920         '[Detaching...]' messages when 'print_inferior_events' is on.
2921         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
2922         as prefix/suffix for messages.  Remove periods.  Fix erroneous
2923         'Detaching after fork from child...', replace it by '... from
2924         parent...'.
2925         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2926         prefix/suffix when printing 'Detaching...' messages.  Print
2927         them when 'print_inferior_events' is on.
2928         * remote.c (remote_detach_1): Print message when detaching
2929         from inferior and '!is_fork_parent'.
2930
2931 2018-04-24  Tom Tromey  <tom@tromey.com>
2932
2933         * cli-out.h: Reindent.
2934
2935 2018-04-24  Tom Tromey  <tom@tromey.com>
2936
2937         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2938         (cli_ui_out::do_field_string): Use fputs_filtered.
2939         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2940
2941 2018-04-23  Tom Tromey  <tom@tromey.com>
2942
2943         * guile/scm-frame.c (gdbscm_frame_read_var): Use
2944         gdb::unique_xmalloc_ptr.
2945
2946 2018-04-23  Tom Tromey  <tom@tromey.com>
2947
2948         * configure: Rebuild.
2949
2950 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
2951
2952         PR gdb/23095
2953         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2954         prepare_for_testing.  Set normal_bp to r_debug_state if target
2955         is bsd.
2956
2957 2018-04-21  Pedro Alves  <palves@redhat.com>
2958             Rajendra SY  <rajendra.sy@gmail.com>
2959
2960         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2961         * remote.c (extended_remote_attach): In all-stop mode, mark the
2962         thread as executing.
2963
2964 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2965
2966         * thread.c (thread_apply_all_command): Fix comment.
2967         (thread_command): Fix comment.
2968
2969 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
2970
2971         * common/tdesc.h (tdesc_create_feature): Remove xml filename
2972         parameter.
2973         * features/aarch64-core.c (create_feature_aarch64_core):
2974         Regenerate.
2975         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2976         Likewise.
2977         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2978         Likewise.
2979         * features/i386/32bit-avx512.c
2980         (create_feature_i386_32bit_avx512): Likewise.
2981         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2982         Likewise.
2983         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2984         Likewise.
2985         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2986         Likewise.
2987         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2988         Likewise.
2989         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2990         Likewise.
2991         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2992         Likewise.
2993         * features/i386/64bit-avx512.c
2994         (create_feature_i386_64bit_avx512): Likewise.
2995         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2996         Likewise.
2997         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2998         Likewise.
2999         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
3000         Likewise.
3001         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
3002         Likewise.
3003         * features/i386/64bit-segments.c
3004         (create_feature_i386_64bit_segments): Likewise.
3005         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
3006         Likewise.
3007         * features/i386/x32-core.c
3008         (create_feature_i386_x32_core): Likewise.
3009         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
3010         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
3011         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
3012         * target-descriptions.c: In generated code, don't pass xml
3013         filename.
3014
3015 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3016
3017         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
3018         (print_xml_feature::visit_post): Likewise.
3019         (print_xml_feature::visit): Likewise.
3020         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
3021         (print_xml_feature): Add new class.
3022         * regformats/regdat.sh: Null xmltarget on feature targets.
3023         * target-descriptions.c (struct target_desc): Add xmltarget.
3024         (maintenance_check_tdesc_xml_convert): Add unittest function.
3025         (tdesc_get_features_xml): Add function to get xml.
3026         (maintenance_check_xml_descriptions): Test xml generation.
3027         * xml-tdesc.c (string_read_description_xml): Add function.
3028         * xml-tdesc.h (string_read_description_xml): Add declaration.
3029
3030 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3031
3032         * features/Makefile: Add feature marker to targets with new style
3033         target descriptions.
3034         * regformats/aarch64.dat: Regenerate.
3035         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
3036         * regformats/i386/amd64-avx-linux.dat: Likewise.
3037         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
3038         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
3039         * regformats/i386/amd64-linux.dat: Likewise.
3040         * regformats/i386/amd64-mpx-linux.dat: Likewise.
3041         * regformats/i386/amd64.dat: Likewise.
3042         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
3043         * regformats/i386/i386-avx-linux.dat: Likewise.
3044         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
3045         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
3046         * regformats/i386/i386-linux.dat: Likewise.
3047         * regformats/i386/i386-mmx-linux.dat: Likewise.
3048         * regformats/i386/i386-mpx-linux.dat: Likewise.
3049         * regformats/i386/i386.dat: Likewise.
3050         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
3051         * regformats/i386/x32-avx-linux.dat: Likewise.
3052         * regformats/i386/x32-linux.dat: Likewise.
3053         * regformats/tic6x-c62x-linux.dat: Likewise.
3054         * regformats/tic6x-c64x-linux.dat: Likewise.
3055         * regformats/tic6x-c64xp-linux.dat: Likewise.
3056         * regformats/regdat.sh: Parse feature marker.
3057
3058 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3059
3060         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
3061         (tdesc_osabi_name): Likewise.
3062         * target-descriptions.c (tdesc_architecture_name): Add new
3063         function.
3064         (tdesc_osabi_name): Likewise.
3065
3066 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3067
3068         * common/tdesc.c (tdesc_predefined_type): Move to here.
3069         (tdesc_named_type): Likewise.
3070         (tdesc_create_vector): Likewise.
3071         (tdesc_create_struct): Likewise.
3072         (tdesc_set_struct_size): Likewise.
3073         (tdesc_create_union): Likewise.
3074         (tdesc_create_flags): Likewise.
3075         (tdesc_create_enum): Likewise.
3076         (tdesc_add_field): Likewise.
3077         (tdesc_add_typed_bitfield): Likewise.
3078         (tdesc_add_bitfield): Likewise.
3079         (tdesc_add_flag): Likewise.
3080         (tdesc_add_enum_value): Likewise.
3081         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
3082         (struct tdesc_type_vector): Likewise.
3083         (struct tdesc_type_field): Likewise.
3084         (struct tdesc_type_with_fields): Likewise.
3085         (tdesc_create_enum): Add declaration.
3086         (tdesc_add_typed_bitfield): Likewise.
3087         (tdesc_add_enum_value): Likewise.
3088         * target-descriptions.c (tdesc_type_field): Move from here.
3089         (tdesc_type_builtin): Likewise.
3090         (tdesc_type_vector): Likewise.
3091         (tdesc_type_with_fields): Likewise.
3092         (tdesc_predefined_types): Likewise.
3093         (tdesc_named_type): Likewise.
3094         (tdesc_create_vector): Likewise.
3095         (tdesc_create_struct): Likewise.
3096         (tdesc_set_struct_size): Likewise.
3097         (tdesc_create_union): Likewise.
3098         (tdesc_create_flags): Likewise.
3099         (tdesc_create_enum): Likewise.
3100         (tdesc_add_field): Likewise.
3101         (tdesc_add_typed_bitfield): Likewise.
3102         (tdesc_add_bitfield): Likewise.
3103         (tdesc_add_flag): Likewise.
3104         (tdesc_add_enum_value): Likewise.
3105         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
3106         (tdesc_add_typed_bitfield): Likewise.
3107         (tdesc_add_enum_value): Likewise.
3108
3109 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3110
3111         * common/tdesc.c (tdesc_feature::accept): Move to here.
3112         (tdesc_feature::operator==): Likewise.
3113         (tdesc_create_reg): Likewise.
3114         * common/tdesc.h (tdesc_type_kind): Likewise.
3115         (struct tdesc_type): Likewise.
3116         (struct tdesc_feature): Likewise.
3117         * regformats/regdat.sh: Create a feature.
3118         * target-descriptions.c (tdesc_type_kind): Move from here.
3119         (tdesc_type): Likewise.
3120         (tdesc_type_up): Likewise.
3121         (tdesc_feature): Likewise.
3122         (tdesc_create_reg): Likewise.
3123
3124 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
3125
3126         * Makefile.in: Add arch/tdesc.c
3127         * common/tdesc.c: New file.
3128         * common/tdesc.h (tdesc_element_visitor): Move to here.
3129         (tdesc_element): Likewise.
3130         (tdesc_reg): Likewise.
3131         (tdesc_reg_up): Likewise.
3132         * regformats/regdef.h (reg): Add offset to constructors.
3133         * target-descriptions.c (tdesc_element_visitor): Move from here.
3134         (tdesc_element): Likewise.
3135         (tdesc_reg): Likewise.
3136         (tdesc_reg_up): Likewise.
3137
3138 2018-04-17  Tom Tromey  <tom@tromey.com>
3139
3140         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
3141         discriminant field.
3142
3143 2018-04-17  Tom Tromey  <tom@tromey.com>
3144
3145         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
3146
3147 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3148
3149         * symtab.c (print_symbol_info): Skip printing filename and line
3150         number when `last' is NULL.
3151         (symtab_symbol_info): Use empty string instead of NULL for first
3152         invocation of print_symbol_info.
3153         (rbreak_command): Pass NULL to `last' parameter of
3154         print_symbol_info.
3155
3156 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
3157
3158         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
3159         instead of nullptr.
3160
3161 2018-04-16  Pedro Alves  <palves@redhat.com>
3162
3163         * MAINTAINERS (sh): Remove.
3164         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
3165         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
3166         (ALLDEPFILES): Remove sh64-tdep.c.
3167         * NEWS: Mentions that support for SH-5/SH64 is removed.
3168         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
3169         (sh*-*-openbsd*): Ditto.
3170         (sh64-*-elf*): Remove.
3171         (sh*): Remove.
3172         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
3173         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
3174         * sh-tdep.c: No longer include "sh64-tdep.h".
3175         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
3176         * sh64-tdep.c, sh64-tdep.h: Remove files.
3177
3178 2018-04-16  Pedro Alves  <palves@redhat.com>
3179
3180         * MAINTAINERS: Remove m88k.
3181         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
3182         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
3183         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
3184         * NEWS: Mention that support for m88k was removed.
3185         * configure.host (m88*-*-*): Remove support.
3186         * configure.nat (m88k-*-*): Remove support.
3187         * configure.tgt (m88*-*-openbsd*): Remove.
3188         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
3189
3190 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
3191
3192         * configure.tgt (x86_tobjs): New variable.
3193         (amd64_tobjs, i386_tobjs): Use it.
3194
3195 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3196
3197         * symtab.c (print_symbol_info): Precede the symbol definition by
3198         the line number when available.
3199         * NEWS: Advertise this enhancement.
3200
3201 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3202
3203         * NEWS (New options): announce set/show record btrace cpu.
3204         * btrace.c: Include record-btrace.h.
3205         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
3206         the vendor is unknown.
3207         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
3208         Maybe overwrite the btrace configuration's cpu.
3209         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
3210         (btrace_fetch): Add cpu parameter.  Update callers.
3211         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
3212         Maybe overwrite the btrace configuration's cpu.  Skip enabling
3213         errata workarounds if the vendor is unknown.
3214         * python/py-record-btrace.c: Include record-btrace.h.
3215         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
3216         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
3217         * record-btrace.c (record_btrace_cpu_state_kind): New.
3218         (record_btrace_cpu): New.
3219         (set_record_btrace_cpu_cmdlist): New.
3220         (record_btrace_get_cpu): New.
3221         (require_btrace_thread, record_btrace_info)
3222         (record_btrace_resume_thread): Call record_btrace_get_cpu.
3223         (cmd_set_record_btrace_cpu_none): New.
3224         (cmd_set_record_btrace_cpu_auto): New.
3225         (cmd_set_record_btrace_cpu): New.
3226         (cmd_show_record_btrace_cpu): New.
3227         (_initialize_record_btrace): Initialize set/show record btrace cpu
3228         commands.
3229         * record-btrace.h (record_btrace_get_cpu): New.
3230
3231 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3232
3233         * record.c (set_record_command): Fix typo in message.
3234
3235 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3236
3237         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
3238
3239 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
3240
3241         * infrun.c (process_event_stop_test): Call
3242         gdbarch_in_indirect_branch_thunk.
3243         * gdbarch.sh (in_indirect_branch_thunk): New.
3244         * gdbarch.c: Regenerated.
3245         * gdbarch.h: Regenerated.
3246         * x86-tdep.h: New.
3247         * x86-tdep.c: New.
3248         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
3249         (HFILES_NO_SRCDIR): Add x86-tdep.h.
3250         (ALLDEPFILES): Add x86-tdep.c.
3251         * arch-utils.h (default_in_indirect_branch_thunk): New.
3252         * arch-utils.c (default_in_indirect_branch_thunk): New.
3253         * i386-tdep: Include x86-tdep.h.
3254         (i386_in_indirect_branch_thunk): New.
3255         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
3256         function.
3257         * amd64-tdep: Include x86-tdep.h.
3258         (amd64_in_indirect_branch_thunk): New.
3259         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
3260
3261 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
3262
3263         PR gdb/23053
3264         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
3265         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
3266         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
3267         regression.
3268
3269 2018-04-12  Tom Tromey  <tom@tromey.com>
3270
3271         * rust-lang.c (rust_print_struct_def): Remove univariant code.
3272         (rust_evaluate_subexp): Likewise.
3273
3274 2018-04-12  Pedro Alves  <palves@redhat.com>
3275
3276         * procfs.c (procfs_detach): Make forward declaration's prototype
3277         match definition's protototype.
3278         (proc_get_LDT_entry): Remove stale do_cleanups call.
3279
3280 2018-04-12  Pedro Alves  <palves@redhat.com>
3281
3282         * target.h (target_ops::to_has_exited): Delete.
3283         (target_has_exited): Delete.
3284         * target-delegates.c: Regenerate.
3285
3286 2018-04-11  Pedro Alves  <palves@redhat.com>
3287
3288         * target.c (fileio_fh_t::t): Add comment.
3289         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3290         (target_fileio_close): Handle a NULL target.
3291         (invalidate_fileio_fh): New.
3292         (target_close): Call it.
3293         * remote.c (remote_hostio_send_command): No longer check whether
3294         remote_desc is open.
3295
3296 2018-04-11  Pedro Alves  <palves@redhat.com>
3297
3298         * target.c (fileio_fh_t): Make it a named struct instead of a
3299         typedef.
3300         (fileio_fh_t::is_closed): New method.
3301         (DEF_VEC_O (fileio_fh_t)): Remove.
3302         (fileio_fhandles): Now a std::vector.
3303         (is_closed_fileio_fh): Delete.
3304         (acquire_fileio_fd): Adjust.  Rename parameters.
3305         (release_fileio_fd): Adjust.
3306         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
3307         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
3308         (target_fileio_close): Adjust.
3309
3310 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
3311
3312         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
3313         index.
3314
3315 2018-04-10  Pedro Alves  <palves@redhat.com>
3316
3317         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
3318         (scoped_finish_thread_state): New class.
3319         * infcmd.c (run_command_1): Use it instead of finish_thread_state
3320         cleanup.
3321         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
3322         (fetch_inferior_event, normal_stop): Likewise.
3323         * thread.c (finish_thread_state_cleanup): Delete.
3324
3325 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3326             Pedro Alves  <palves@redhat.com>
3327
3328         * value.c: Include "selftest.h" and "common/array-view.h".
3329         (struct range) <operator ==>: New.
3330         (test_ranges_contain): New.
3331         (check_ranges_vector): New.
3332         (test_insert_into_bit_range_vector): New.
3333         (_initialize_values): Register selftests.
3334         * common/array-view.h (operator==, operator!=): New.
3335
3336 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3337
3338         * common/gdb_vecs.h (unordered_remove): Add overload that takes
3339         an iterator.
3340         * inline-frame.c: Include <algorithm>.
3341         (struct inline_state): Add constructor.
3342         (inline_state_s): Remove.
3343         (DEF_VEC_O(inline_state_s)): Remove.
3344         (inline_states): Change type to std::vector.
3345         (find_inline_frame_state): Adjust to std::vector.
3346         (allocate_inline_frame_state): Remove.
3347         (clear_inline_frame_state): Adjust to std::vector.
3348         (skip_inline_frames): Adjust to std::vector.
3349
3350 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3351
3352         * tracepoint.h (struct trace_state_variable): Add constructor.
3353         <name>: Change type to std::string.
3354         * tracepoint.c (tsv_s): Remove.
3355         (DEF_VEC_O(tsv_s)): Remove.
3356         (tvariables): Change to std::vector.
3357         (create_trace_state_variable): Adjust to std::vector.
3358         (find_trace_state_variable): Likewise.
3359         (find_trace_state_variable_by_number): Likewise.
3360         (delete_trace_state_variable): Likewise.
3361         (trace_variable_command): Adjust to std::string.
3362         (delete_trace_variable_command): Likewise.
3363         (tvariables_info_1): Adjust to std::vector.
3364         (save_trace_state_variables): Likewise.
3365         (start_tracing): Likewise.
3366         (merge_uploaded_trace_state_variables): Adjust to std::vector
3367         and std::string.
3368         * target.h (struct target_ops)
3369         <to_download_trace_state_variable>: Pass reference to
3370         trace_state_variable.
3371         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
3372         * target-delegates.c: Re-generate.
3373         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
3374         (mi_tsv_deleted): Likewise.
3375         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
3376         * remote.c (remote_download_trace_state_variable): Change
3377         pointer to reference and adjust.
3378         * make-target-delegates (parse_argtypes): Handle references.
3379         (write_function_header): Likewise.
3380         (munge_type): Likewise.
3381
3382 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3383
3384         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3385         string_view-selftests.c.
3386         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
3387         testsuite.
3388         * unittests/basic_string_view/cons/char/1.cc: Likewise.
3389         * unittests/basic_string_view/cons/char/2.cc: Likewise.
3390         * unittests/basic_string_view/cons/char/3.cc: Likewise.
3391         * unittests/basic_string_view/element_access/char/1.cc:
3392         Likewise.
3393         * unittests/basic_string_view/element_access/char/empty.cc:
3394         Likewise.
3395         * unittests/basic_string_view/element_access/char/front_back.cc:
3396         Likewise.
3397         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
3398         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
3399         Likewise.
3400         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
3401         Likewise.
3402         * unittests/basic_string_view/modifiers/swap/char/1.cc:
3403         Likewise.
3404         * unittests/basic_string_view/operations/compare/char/1.cc:
3405         Likewise.
3406         * unittests/basic_string_view/operations/compare/char/13650.cc:
3407         Likewise.
3408         * unittests/basic_string_view/operations/copy/char/1.cc:
3409         Likewise.
3410         * unittests/basic_string_view/operations/data/char/1.cc:
3411         Likewise.
3412         * unittests/basic_string_view/operations/find/char/1.cc:
3413         Likewise.
3414         * unittests/basic_string_view/operations/find/char/2.cc:
3415         Likewise.
3416         * unittests/basic_string_view/operations/find/char/3.cc:
3417         Likewise.
3418         * unittests/basic_string_view/operations/find/char/4.cc:
3419         Likewise.
3420         * unittests/basic_string_view/operations/rfind/char/1.cc:
3421         Likewise.
3422         * unittests/basic_string_view/operations/rfind/char/2.cc:
3423         Likewise.
3424         * unittests/basic_string_view/operations/rfind/char/3.cc:
3425         Likewise.
3426         * unittests/basic_string_view/operations/substr/char/1.cc:
3427         Likewise.
3428         * unittests/basic_string_view/operators/char/2.cc: Likewise.
3429         * unittests/string_view-selftests.c: New file.
3430
3431 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3432
3433         * unittests/basic_string_view/capacity/1.cc: New file.
3434         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
3435         * unittests/basic_string_view/cons/char/1.cc: New file.
3436         * unittests/basic_string_view/cons/char/2.cc: New file.
3437         * unittests/basic_string_view/cons/char/3.cc: New file.
3438         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
3439         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
3440         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
3441         * unittests/basic_string_view/element_access/char/1.cc: New file.
3442         * unittests/basic_string_view/element_access/char/2.cc: New file.
3443         * unittests/basic_string_view/element_access/char/empty.cc: New file.
3444         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
3445         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
3446         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
3447         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
3448         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
3449         * unittests/basic_string_view/include.cc: New file.
3450         * unittests/basic_string_view/inserters/char/1.cc: New file.
3451         * unittests/basic_string_view/inserters/char/2.cc: New file.
3452         * unittests/basic_string_view/inserters/char/3.cc: New file.
3453         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
3454         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
3455         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
3456         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
3457         * unittests/basic_string_view/literals/types.cc: New file.
3458         * unittests/basic_string_view/literals/values.cc: New file.
3459         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
3460         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
3461         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
3462         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
3463         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
3464         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
3465         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
3466         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
3467         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
3468         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
3469         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
3470         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
3471         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
3472         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
3473         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
3474         * unittests/basic_string_view/operations/data/char/1.cc: New file.
3475         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
3476         * unittests/basic_string_view/operations/find/char/1.cc: New file.
3477         * unittests/basic_string_view/operations/find/char/2.cc: New file.
3478         * unittests/basic_string_view/operations/find/char/3.cc: New file.
3479         * unittests/basic_string_view/operations/find/char/4.cc: New file.
3480         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
3481         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
3482         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
3483         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
3484         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
3485         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
3486         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
3487         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
3488         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
3489         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
3490         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
3491         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
3492         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
3493         * unittests/basic_string_view/operators/char/2.cc: New file.
3494         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
3495         * unittests/basic_string_view/range_access/char/1.cc: New file.
3496         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
3497         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
3498         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
3499         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
3500         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
3501         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
3502         * unittests/basic_string_view/requirements/typedefs.cc: New file.
3503         * unittests/basic_string_view/typedefs.cc: New file.
3504         * unittests/basic_string_view/types/1.cc: New file.
3505
3506 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3507
3508         * common/gdb_string_view.h: Remove libstdc++ implementation
3509         details, adjust to gdb reality.
3510         * common/gdb_string_view.tcc: Likewise.
3511         * cli/cli-script.c (struct string_view): Remove.
3512         (user_args) <m_args>: Change element type to gdb::string_view.
3513         (user_args::insert_args): Adjust.
3514
3515 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3516
3517         * common/gdb_string_view.h: New file.
3518         * common/gdb_string_view.tcc: New file.
3519
3520 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
3521
3522         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
3523         * configure: Re-generate.
3524
3525 2018-04-09  Pedro Alves  <palves@redhat.com>
3526
3527         * gdbarch.sh: Include "observable.h" instead of "observer.h".
3528         (set_target_gdbarch): Call
3529         gdb::observers::architecture_changed.notify instead of
3530         observer_notify_architecture_changed.
3531
3532 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3533
3534         * tracepoint.c (struct current_traceframe_cleanup): Remove.
3535         (do_restore_current_traceframe_cleanup): Remove.
3536         (restore_current_traceframe_cleanup_dtor): Remove.
3537         (make_cleanup_restore_current_traceframe): Remove.
3538         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
3539         New.
3540         * tracepoint.h (struct scoped_restore_current_traceframe): New.
3541         * infrun.c (fetch_inferior_event): Use
3542         scoped_restore_current_traceframe.
3543
3544 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3545
3546         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
3547         Remove.
3548         <n_allocated_type_units>: Remove.
3549         <all_type_units>: Change to std::vector.
3550         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3551         to std::vector change.
3552         (dwarf2_per_objfile::get_cutu): Likewise.
3553         (dwarf2_per_objfile::get_tu): Likewise.
3554         (create_signatured_type_table_from_index): Likewise.
3555         (create_signatured_type_table_from_debug_names): Likewise.
3556         (dw2_symtab_iter_next): Likewise.
3557         (dw2_print_stats): Likewise.
3558         (dw2_expand_all_symtabs): Likewise.
3559         (dw2_expand_marked_cus): Likewise.
3560         (dw2_debug_names_iterator::next): Likewise.
3561         (dwarf2_initialize_objfile): Likewise.
3562         (add_signatured_type_cu_to_table): Likewise.
3563         (create_all_type_units): Likewise.
3564         (add_type_unit): Likewise.
3565         (struct tu_abbrev_offset): Add constructor.
3566         (build_type_psymtabs_1): Adjust to std::vector change.
3567         (print_tu_stats): Likewise.
3568         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3569         (write_debug_names): Likewise.
3570
3571 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3572
3573         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
3574         Make an std::vector.
3575         <n_comp_units>: Remove.
3576         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
3577         to std::vector change.
3578         (dwarf2_per_objfile::get_cutu): Likewise.
3579         (dwarf2_per_objfile::get_cu): Likewise.
3580         (create_cus_from_index): Likewise.
3581         (create_addrmap_from_index): Likewise.
3582         (create_addrmap_from_aranges): Likewise.
3583         (dwarf2_read_index): Likewise.
3584         (dw2_find_last_source_symtab): Likewise.
3585         (dw2_map_symtabs_matching_filename): Likewise.
3586         (dw2_symtab_iter_next): Likewise.
3587         (dw2_print_stats): Likewise.
3588         (dw2_expand_all_symtabs): Likewise.
3589         (dw2_expand_symtabs_with_fullname): Likewise.
3590         (dw2_expand_marked_cus): Likewise.
3591         (dw2_map_symbol_filenames): Likewise.
3592         (create_cus_from_debug_names): Likewise.
3593         (dwarf2_read_debug_names): Likewise.
3594         (dw2_debug_names_iterator::next): Likewise.
3595         (dwarf2_initialize_objfile): Likewise.
3596         (set_partial_user): Likewise.
3597         (dwarf2_build_psymtabs_hard): Likewise.
3598         (read_comp_units_from_section): Remove arguments, adjust to
3599         std::vector change.
3600         (create_all_comp_units): Adjust to std::vector and
3601         read_comp_units_from_section changes.
3602         (dwarf2_find_containing_comp_unit): Adjust to std::vector
3603         change.
3604         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
3605         (psyms_seen_size): Likewise.
3606         (write_gdbindex): Likewise.
3607         (write_debug_names): Likewise.
3608
3609 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3610
3611         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
3612         with dwarf2_per_objfile.
3613         (create_cus_from_index): Likewise.
3614         (create_signatured_type_table_from_index): Likewise.
3615         (dwarf2_read_index): Likewise.
3616         (dwarf2_initialize_objfile): Likewise.
3617         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
3618         per_cu rather than get_dwarf2_per_objfile.
3619
3620 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3621
3622         * dwarf2read.h (struct signatured_type): Forward declare.
3623         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
3624         New methods.
3625         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
3626         (dw2_get_cutu): ...this.
3627         (dwarf2_per_objfile::get_cu): Rename from...
3628         (dw2_get_cu): ...this.
3629         (dwarf2_per_objfile::get_tu): New.
3630         (create_addrmap_from_index): Adjust.
3631         (create_addrmap_from_aranges): Adjust.
3632         (dw2_find_last_source_symtab): Adjust.
3633         (dw2_map_symtabs_matching_filename): Adjust.
3634         (dw2_symtab_iter_next): Adjust.
3635         (dw2_print_stats): Adjust.
3636         (dw2_expand_all_symtabs): Adjust.
3637         (dw2_expand_symtabs_with_fullname): Adjust.
3638         (dw2_expand_marked_cus): Adjust.
3639         (dw_expand_symtabs_matching_file_matcher): Adjust.
3640         (dw2_map_symbol_filenames): Adjust.
3641         (dw2_debug_names_iterator::next): Adjust.
3642         (dwarf2_initialize_objfile): Adjust.
3643         (set_partial_user): Adjust.
3644         (dwarf2_build_psymtabs_hard): Adjust.
3645
3646 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3647
3648         * dwarf2read.c (create_signatured_type_table_from_debug_names):
3649         Remove unused variables.
3650         (dw2_map_symtabs_matching_filename): Likewise.
3651         (dwarf2_record_block_ranges): Likewise.
3652         (dwarf2_read_addr_index): Likewise.
3653         (follow_die_offset): Likewise.
3654
3655 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3656
3657         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
3658         to symbol_file_add_main.
3659
3660 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3661
3662         PR mi/22299
3663         * mi/mi-console.c (do_fputc_async_safe): New.
3664         (mi_console_file::write_async_safe): New.
3665         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
3666         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
3667         New.
3668         * ui-file.c (ui_file::putstrn): Adjust call to
3669         fputstrn_unfiltered.
3670         * utils.c (printchar): Replace do_fputs and do_fprintf
3671         parameters by do_fputc.
3672         (fputstr_filtered): Adjust call to printchar.
3673         (fputstr_unfiltered): Likewise.
3674         (fputstrn_filtered): Likewise.
3675         (fputstrn_unfiltered): Add do_fputc parameter, pass to
3676         printchar.
3677         * utils.h (do_fputc_ftype): New typedef.
3678         (fputstrn_unfiltered): Add do_fputc parameter.
3679
3680 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
3681
3682         * regformats/i386/i386-avx.dat: Remove.
3683
3684 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
3685
3686         PR gdb/22979
3687         * amd64-tdep.c (amd64_none_init_abi): New function.
3688         (amd64_x32_none_init_abi): New function.
3689         (_initialize_amd64_tdep): Register handlers for x86-64 and
3690         x64_32 with GDB_OSABI_NONE.
3691         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
3692         GDB_OSABI_NONE osabi.
3693
3694 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
3695
3696         PR gdb/22980
3697         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
3698         GDB_OSABI_NONE.
3699         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
3700         * osabi.c (gdb_osabi_names): Add "unknown" entry.
3701
3702 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
3703
3704         * common/byte-vector.h (char_vector): New type.
3705         * target.h (target_read_alloc): Return
3706         gdb::optional<byte_vector>.
3707         (target_read_stralloc): Return gdb::optional<char_vector>.
3708         (target_get_osdata): Return gdb::optional<char_vector>.
3709         * target.c (target_read_alloc_1): Templatize.  Replacement
3710         manual memory management with vector.
3711         (target_read_alloc): Change return type, adjust.
3712         (target_read_stralloc): Change return type, adjust.
3713         (target_get_osdata): Change return type, adjust.
3714         * auxv.c (struct auxv_info) <length>: Remove.
3715         <data>: Change type to gdb::optional<byte_vector>.
3716         (auxv_inferior_data_cleanup): Free auxv_info with delete.
3717         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
3718         (target_auxv_search): Adjust.
3719         (fprint_target_auxv): Adjust.
3720         * avr-tdep.c (avr_io_reg_read_command): Adjust.
3721         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
3722         (linux_make_corefile_notes): Adjust.
3723         * osdata.c (get_osdata): Adjust.
3724         * remote.c (remote_get_threads_with_qxfer): Adjust.
3725         (remote_memory_map): Adjust.
3726         (remote_traceframe_info): Adjust.
3727         (btrace_read_config): Adjust.
3728         (remote_read_btrace): Adjust.
3729         (remote_pid_to_exec_file): Adjust.
3730         * solib-aix.c (solib_aix_get_library_list): Adjust.
3731         * solib-dsbt.c (decode_loadmap): Don't free buf.
3732         (dsbt_get_initial_loadmaps): Adjust.
3733         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
3734         * solib-target.c (solib_target_current_sos): Adjust.
3735         * tracepoint.c (sdata_make_value): Adjust.
3736         * xml-support.c (xinclude_start_include): Adjust.
3737         (xml_fetch_content_from_file): Adjust.
3738         * xml-support.h (xml_fetch_another): Change return type.
3739         (xml_fetch_content_from_file): Change return type.
3740         * xml-syscall.c (xml_init_syscalls_info): Adjust.
3741         * xml-tdesc.c (file_read_description_xml): Adjust.
3742         (fetch_available_features_from_target): Change return type.
3743         (target_fetch_description_xml): Adjust.
3744         (target_read_description_xml): Adjust.
3745
3746 2018-04-06  Tom Tromey  <tom@tromey.com>
3747
3748         * value.c (~value): Update.
3749         (struct value) <contents>: Now unique_xmalloc_ptr.
3750         (value_contents_bits_eq, allocate_value_contents)
3751         (value_contents_raw, value_contents_all_raw)
3752         (value_contents_for_printing, value_contents_for_printing_const)
3753         (set_value_enclosing_type): Update.
3754
3755 2018-04-06  Tom Tromey  <tom@tromey.com>
3756
3757         * value.c (range_s): Remove typedef, VEC.
3758         (struct range): Add operator<.
3759         (range_lessthan): Remove.
3760         (ranges_contain): Change type.
3761         (~value): Update.
3762         (struct value) <unavailable, optimized_out>: Now std::vector.
3763         (value_entirely_available)
3764         (value_entirely_covered_by_range_vector)
3765         (value_entirely_unavailable, value_entirely_optimized_out):
3766         Update.
3767         (insert_into_bit_range_vector): Change argument type.
3768         (find_first_range_overlap): Likewise.
3769         (struct ranges_and_idx, value_contents_bits_eq)
3770         (require_not_optimized_out, require_available): Update.
3771         (ranges_copy_adjusted): Change argument types.
3772         (value_optimized_out, value_copy, value_fetch_lazy): Update.
3773
3774 2018-04-06  Tom Tromey  <tom@tromey.com>
3775
3776         * value.c (~value): Update.
3777         (struct value) <parent>: Now a value_ref_ptr.
3778         (value_parent, set_value_parent, value_address, value_copy):
3779         Update.
3780
3781 2018-04-06  Tom Tromey  <tom@tromey.com>
3782
3783         * value.c (struct value): Add constructor, destructor, and member
3784         initializers.
3785         (allocate_value_lazy, value_decref): Update.
3786
3787 2018-04-06  Tom Tromey  <tom@tromey.com>
3788
3789         * value.c (struct value) <released, next>: Remove.
3790         (all_values): Now a std::vector.
3791         (allocate_value_lazy): Update.
3792         (value_next): Remove.
3793         (value_mark, value_free_to_mark, release_value)
3794         (value_release_to_mark): Update.
3795
3796 2018-04-06  Tom Tromey  <tom@tromey.com>
3797
3798         * value.h (fetch_subexp_value, value_release_to_mark): Update.
3799         (free_value_chain): Remove.
3800         * value.c (free_value_chain): Remove.
3801         (value_release_to_mark): Return a std::vector.
3802         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
3803         std::vector.
3804         (check_condition): Update.
3805         * eval.c (fetch_subexp_value): Change "val_chain" to a
3806         std::vector.
3807         * breakpoint.c (update_watchpoint): Update.
3808         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
3809
3810 2018-04-06  Tom Tromey  <tom@tromey.com>
3811
3812         * value.h (free_all_values): Remove.
3813         * value.c (free_all_values): Remove.
3814
3815 2018-04-06  Tom Tromey  <tom@tromey.com>
3816
3817         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
3818         (value_history_chain, value_history_count): Remove.
3819         (value_history): New global.
3820         (record_latest_value, access_value_history, show_values)
3821         (preserve_values): Update.
3822
3823 2018-04-06  Tom Tromey  <tom@tromey.com>
3824
3825         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
3826         * varobj.c (varobj_set_display_format, varobj_set_value)
3827         (install_default_visualizer, construct_visualizer)
3828         (install_new_value, ~varobj, varobj_get_value_type)
3829         (my_value_of_variable, varobj_editable_p): Update.
3830         * c-varobj.c (c_describe_child, c_value_of_variable)
3831         (cplus_number_of_children, cplus_describe_child): Update.
3832         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
3833         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
3834         (ada_value_of_variable, ada_value_is_changeable_p): Update.
3835
3836 2018-04-06  Tom Tromey  <tom@tromey.com>
3837
3838         * printcmd.c (last_examine_address): Change type to
3839         value_ref_ptr.
3840         (do_examine, x_command): Update.
3841
3842 2018-04-06  Tom Tromey  <tom@tromey.com>
3843
3844         * value.c (release_value): Update.
3845         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
3846         (struct bpstats) <val>: Now a value_ref_ptr.
3847         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3848         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3849         (~watchpoint, print_it_watchpoint, watch_command_1)
3850         (invalidate_bp_value_on_memory_change): Update.
3851
3852 2018-04-06  Tom Tromey  <tom@tromey.com>
3853
3854         * varobj.c (varobj_clear_saved_item)
3855         (update_dynamic_varobj_children, install_new_value, ~varobj):
3856         Update.
3857         * value.h (value_incref): Move declaration earlier.
3858         (value_decref): Rename from value_free.
3859         (struct value_ref_policy): New.
3860         (value_ref_ptr): New typedef.
3861         (struct value_deleter): Remove.
3862         (gdb_value_up): Remove typedef.
3863         (release_value): Change return type.
3864         (release_value_or_incref): Remove.
3865         * value.c (set_value_parent): Update.
3866         (value_incref): Change return type.
3867         (value_decref): Rename from value_free.
3868         (value_free_to_mark, free_all_values, free_value_chain): Update.
3869         (release_value): Return value_ref_ptr.
3870         (release_value_or_incref): Remove.
3871         (record_latest_value, set_internalvar, clear_internalvar):
3872         Update.
3873         * stack.c (info_frame_command): Don't call value_free.
3874         * python/py-value.c (valpy_dealloc, valpy_new)
3875         (value_to_value_object): Update.
3876         * printcmd.c (do_examine): Update.
3877         * opencl-lang.c (lval_func_free_closure): Update.
3878         * mi/mi-main.c (register_changed_p): Don't call value_free.
3879         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3880         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3881         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3882         value_free.
3883         * guile/scm-value.c (vlscm_free_value_smob)
3884         (vlscm_scm_from_value): Update.
3885         * frame.c (frame_register_unwind, frame_unwind_register_signed)
3886         (frame_unwind_register_unsigned, get_frame_register_bytes)
3887         (put_frame_register_bytes): Don't call value_free.
3888         * findvar.c (address_from_register): Don't call value_free.
3889         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3890         * dwarf2loc.c (entry_data_value_free_closure)
3891         (value_of_dwarf_reg_entry, free_pieced_value_closure)
3892         (dwarf2_evaluate_loc_desc_full): Update.
3893         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3894         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3895         (~watchpoint, watch_command_1)
3896         (invalidate_bp_value_on_memory_change): Update.
3897         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3898
3899 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
3900
3901         PR gdb/23022
3902         * warning.m4: Add -Wno-error=deprecated-register.
3903         * configure: Re-generate.
3904
3905 2018-04-05  Tom Tromey  <tom@tromey.com>
3906
3907         * linespec.h: Remove include of "vec.h".
3908
3909 2018-04-05  Tom Tromey  <tom@tromey.com>
3910
3911         * linespec.c (typep): Remove typedef.
3912         (find_methods, find_superclass_methods): Take a std::vector.
3913         (find_method): Use std::vector.
3914
3915 2018-04-05  Tom Tromey  <tom@tromey.com>
3916
3917         * utils.c (compare_strings): Remove.
3918         * utils.h (compare_strings): Remove.
3919         * objc-lang.h (find_imps): Update.
3920         * objc-lang.c (find_methods): Take a std::vector.
3921         (uniquify_strings, find_imps): Likewise.
3922         * linespec.c (find_methods): Take a std::vector.
3923         (decode_objc): Use std::vector.
3924         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3925         a std::vector.
3926         (find_method, find_function_symbols): Use std::vector.
3927
3928 2018-04-05  Tom Tromey  <tom@tromey.com>
3929
3930         * completer.c (completion_tracker::completion_tracker): Remove
3931         cast.
3932         (completion_tracker::discard_completions): Likewise.
3933         * breakpoint.c (ambiguous_names_p): Remove cast.
3934         * ada-lang.c (_initialize_ada_language): Remove cast.
3935         * utils.h (streq): Update.
3936         (streq_hash): Add new declaration.
3937         * utils.c (streq): Return bool.
3938         (streq_hash): New function.
3939
3940 2018-04-05  Tom Tromey  <tom@tromey.com>
3941
3942         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3943         Remove a string copy.
3944
3945 2018-04-05  Tom Tromey  <tom@tromey.com>
3946
3947         * linespec.c (filter_results): Use std::vector.
3948         (decode_line_2, decode_line_full): Update.
3949
3950 2018-04-05  Tom Tromey  <tom@tromey.com>
3951
3952         * linespec.c (canonical_to_fullform): Return std::string.
3953         (filter_results): Update.
3954         (struct decode_line_2_item): Add constructor.
3955         <fullform, displayform>: Now std::string.
3956         (decode_line_2_compare_items): Now a std::sort comparator.
3957         (decode_line_2): Update.
3958
3959 2018-04-05  Tom Tromey  <tom@tromey.com>
3960
3961         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3962         (unexpected_linespec_error): Update.
3963         (linespec_parse_basic, parse_linespec): Update.
3964
3965 2018-04-05  Tom Tromey  <tom@tromey.com>
3966
3967         * linespec.c (linespec_parse_basic): Reindent.
3968
3969 2018-04-05  Tom Tromey  <tom@tromey.com>
3970
3971         * minsyms.h (iterate_over_minimal_symbols): Update.
3972         * minsyms.c (iterate_over_minimal_symbols): Take a
3973         gdb::function_view.
3974         * linespec.c (struct collect_minsyms): Remove.
3975         (compare_msyms): Now a std::sort comparator.
3976         (add_minsym): Add parameters.
3977         (search_minsyms_for_name): Update.  Use std::vector.
3978
3979 2018-04-03  Tom Tromey  <tom@tromey.com>
3980
3981         * mipsread.c (read_alphacoff_dynamic_symtab): Use
3982         gdb::byte_vector.
3983
3984 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
3985
3986         * MAINTAINERS (Write After Approval): Add Weimin Pan.
3987
3988 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
3989
3990         PR gdb/16959
3991         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
3992         printing static type.
3993
3994 2018-04-01  Tom Tromey  <tom@tromey.com>
3995
3996         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3997         (rs6000_xfer_shared_libraries): Update.
3998
3999 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
4000
4001         * common/gdb_vecs.h (char_ptr): Remove.
4002         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
4003
4004 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
4005
4006         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
4007         with std::vector.
4008         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
4009
4010 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
4011
4012         * tracepoint.h (struct uploaded_tp): Initialize fields.
4013         <actions, step_actions, cmd_strings>: Change type to
4014         std::vector<char *>.
4015         * tracepoint.c (get_uploaded_tp): Allocate with new.
4016         (free_uploaded_tps): Free with delete.
4017         (parse_tracepoint_definition): Adjust to std::vector change.
4018         * breakpoint.c (read_uploaded_action): Likewise.
4019         (create_tracepoint_from_upload): Likewise.
4020         * ctf.c (ctf_write_uploaded_tp): Likewise.
4021         (SET_ARRAY_FIELD): Likewise.
4022         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
4023
4024 2018-03-30  Tom Tromey  <tom@tromey.com>
4025
4026         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
4027         std::unique_ptr.
4028         (svr4_keep_data_in_core): Update.
4029         (svr4_read_so_list): Update.
4030
4031 2018-03-30  Tom Tromey  <tom@tromey.com>
4032
4033         * windows-nat.c (handle_output_debug_string, handle_exception):
4034         Update.
4035         * target.h (target_read_string): Update.
4036         * target.c (target_read_string): Change "string" to
4037         unique_xmalloc_ptr.
4038         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
4039         Update.
4040         * solib-frv.c (frv_current_sos): Update.
4041         * solib-dsbt.c (dsbt_current_sos): Update.
4042         * solib-darwin.c (darwin_current_sos): Update.
4043         * linux-thread-db.c (inferior_has_bug): Update.
4044         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
4045         Update.  Remove alloca.
4046         * ada-lang.c (ada_main_name): Update.
4047
4048 2018-03-30  Tom Tromey  <tom@tromey.com>
4049
4050         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
4051         (struct dwo_file_deleter): New.
4052         (dwo_file_up): New typedef.
4053         (open_and_init_dwo_file): Use dwo_file_up.
4054         (free_dwo_file_cleanup): Remove.
4055
4056 2018-03-30  Tom Tromey  <tom@tromey.com>
4057
4058         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
4059         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
4060
4061 2018-03-30  Tom Tromey  <tom@tromey.com>
4062
4063         * dwarf2read.c (class free_cached_comp_units): New class.
4064         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
4065         (free_cached_comp_units): Remove function.
4066
4067 2018-03-30  Tom Tromey  <tom@tromey.com>
4068
4069         * utils.h (make_cleanup_unpush_target): Remove.
4070         * inf-ptrace.c (struct target_unpusher): New.
4071         (target_unpush_up) New typedef.
4072         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
4073         target_unpush_up.
4074         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
4075
4076 2018-03-27  Tom Tromey  <tom@tromey.com>
4077
4078         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
4079
4080 2018-03-27  Pedro Alves  <palves@redhat.com>
4081             Tom Tromey  <tom@tromey.com>
4082
4083         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
4084         destructor.  Now a class.
4085         (gdb_readline_wrapper_cleanup): Remove function.
4086         (gdb_readline_wrapper): Remove cleanups.
4087
4088 2018-03-27  Tom Tromey  <tom@tromey.com>
4089
4090         * typeprint.h (struct type_print_options) <local_typedefs,
4091         global_typedefs>: Remove "struct" keyword.
4092         (class typedef_hash_table): New class.
4093         (recursively_update_typedef_hash, add_template_parameters)
4094         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
4095         (find_typedef_in_hash): Don't declare.
4096         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
4097         (typedef_hash_table::recursively_update): Rename from
4098         recursively_update_typedef_hash.  Now a member.
4099         (typedef_hash_table::add_template_parameters): Rename from
4100         add_template_parameters.  Now a member.
4101         (typedef_hash_table::typedef_hash_table): Now a constructor;
4102         rename from create_typedef_hash.
4103         (typedef_hash_table::~typedef_hash_table): Now a destructor;
4104         rename from free_typedef_hash.
4105         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
4106         (do_free_global_table): Remove.
4107         (typedef_hash_table::typedef_hash_table): New constructor; renamed
4108         from copy_type_recursive.
4109         (create_global_typedef_table): Remove.
4110         (typedef_hash_table::find_global_typedef): Now a member of
4111         typedef_hash_table.
4112         (typedef_hash_table::find_typedef): Rename from
4113         find_typedef_in_hash; now a member.
4114         (whatis_exp): Update.
4115         * extension.h (struct ext_lang_type_printers): Add constructor and
4116         destructor.
4117         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
4118         declare.
4119         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
4120         Now a constructor; rename from start_ext_lang_type_printers.
4121         (ext_lang_type_printers): Now a destructor; rename from
4122         free_ext_lang_type_printers.
4123         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
4124         Update.
4125         (c_type_print_base_struct_union): Update.  Remove cleanups.
4126
4127 2018-03-27  Tom Tromey  <tom@tromey.com>
4128
4129         * dwarf-index-write.c: Include <cmath>.
4130
4131 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
4132
4133         * NEWS: Add entry describing new "set|show varsize-limit" command.
4134         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
4135         command.
4136         * printcmd.c (_initialize_printcmd): Add "set var" alias of
4137         "set variable".
4138
4139 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
4140
4141         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
4142         dwarf-index-write.c
4143         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
4144         * dwarf-index-common.c: New file.
4145         * dwarf-index-common.h: New file.
4146         * dwarf-index-write.c: New file.
4147         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
4148         (struct dwarf2_section_info): Move from here.
4149         (dwarf2_section_info_def): Likewise.
4150         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
4151         (offset_type): Likewise.
4152         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
4153         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
4154         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
4155         (byte_swap): Likewise.
4156         (MAYBE_SWAP): Likewise.
4157         (dwarf2_per_cu_ptr): Likewise.
4158         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
4159         (struct tu_stats): Likewise.
4160         (struct dwarf2_per_objfile): Likewise.
4161         (struct dwarf2_per_cu_data): Likewise.
4162         (struct signatured_type): Likewise.
4163         (sig_type_ptr): Likewise.
4164         (DEF_VEC_P (sig_type_ptr)): Likewise.
4165         (INDEX4_SUFFIX): Likewise.
4166         (INDEX5_SUFFIX): Likewise.
4167         (DEBUG_STR_SUFFIX): Likewise.
4168         (dwarf2_read_section): Make non-static.
4169         (mapped_index_string_hash): Move from here.
4170         (dwarf5_djb_hash): Likewise.
4171         (file_write): Likewise.
4172         (class data_buf): Likewise.
4173         (struct symtab_index_entry): Likewise.
4174         (struct mapped_symtab): Likewise.
4175         (find_slot): Likewise.
4176         (hash_expand): Likewise.
4177         (add_index_entry): Likewise.
4178         (uniquify_cu_indices): Likewise.
4179         (class c_str_view): Likewise.
4180         (class c_str_view_hasher): Likewise.
4181         (class vector_hasher): Likewise.
4182         (write_hash_table): Likewise.
4183         (psym_index_map): Likewise.
4184         (struct addrmap_index_data): Likewise.
4185         (add_address_entry): Likewise.
4186         (add_address_entry_worker): Likewise.
4187         (write_address_map): Likewise.
4188         (symbol_kind): Likewise.
4189         (write_psymbols): Likewise.
4190         (struct signatured_type_index_data): Likewise.
4191         (write_one_signatured_type): Likewise.
4192         (recursively_count_psymbols): Likewise.
4193         (recursively_write_psymbols): Likewise.
4194         (class debug_names): Likewise.
4195         (check_dwarf64_offsets): Likewise.
4196         (psyms_seen_size): Likewise.
4197         (write_gdbindex): Likewise.
4198         (write_debug_names): Likewise.
4199         (assert_file_size): Likewise.
4200         (write_psymtabs_to_index): Likewise.
4201         (save_gdb_index_command): Likewise.
4202         (_initialize_dwarf2_read): Don't register the "save gdb-index"
4203         command.
4204         * dwarf2read.h: New file.
4205
4206 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
4207
4208         PR gdb/22670
4209         * dwarf2read.c (dwarf2_physname): Do not return the demangled
4210         symbol name if the CU's language stores symbol names in linkage
4211         format.
4212         * language.h (struct language_defn)
4213         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
4214         all instances of this struct.
4215
4216 2018-03-26  Tom Tromey  <tom@tromey.com>
4217
4218         * stack.c (backtrace_command_1): Remove verbose code.
4219
4220 2018-03-26  Tom Tromey  <tom@tromey.com>
4221
4222         * python/py-framefilter.c (py_print_type): Don't catch
4223         exceptions.  Return void.
4224         (py_print_value): Likewise.
4225         (py_print_single_arg): Likewise.
4226         (enumerate_args): Don't catch exceptions.
4227         (py_print_args): Likewise.
4228         (py_print_frame): Likewise.
4229         (gdbpy_apply_frame_filter): Catch exceptions here.
4230
4231 2018-03-26  Tom Tromey  <tom@tromey.com>
4232
4233         * stack.c (_initialize_stack): Remove trailing newlines from help
4234         text.  Add "Usage" line to "backtrace" help.
4235
4236 2018-03-26  Tom Tromey  <tom@tromey.com>
4237
4238         PR python/16486:
4239         * python/py-framefilter.c (py_print_args): Call wrap_hint.
4240
4241 2018-03-26  Tom Tromey  <tom@tromey.com>
4242
4243         * python/py-framefilter.c (py_print_single_arg): Return
4244         EXT_LANG_BT_ERROR from catch.
4245
4246 2018-03-26  Tom Tromey  <tom@tromey.com>
4247
4248         PR backtrace/15584:
4249         * stack.c (backtrace_command_1): Move some code into no-filters
4250         "if".
4251
4252 2018-03-26  Tom Tromey  <tom@tromey.com>
4253
4254         * python/py-framefilter.c (throw_quit_or_print_exception): New
4255         function.
4256         (gdbpy_apply_frame_filter): Use it.
4257
4258 2018-03-26  Tom Tromey  <tom@tromey.com>
4259
4260         PR cli/17716:
4261         * python/py-framefilter.c (py_print_type, py_print_value)
4262         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
4263         RETURN_MASK_ERROR.
4264
4265 2018-03-26  Tom Tromey  <tom@tromey.com>
4266
4267         * python/py-framefilter.c (enumerate_args): Use
4268         gdb::unique_xmalloc_ptr.
4269
4270 2018-03-26  Tom Tromey  <tom@tromey.com>
4271
4272         * python/py-framefilter.c (py_print_frame): Return
4273         EXT_LANG_BT_OK.
4274         (gdbpy_apply_frame_filter): Update comment.
4275         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
4276         Remove.
4277         <EXT_LANG_BT_NO_FILTERS>: Change value.
4278
4279 2018-03-26  Tom Tromey  <tom@tromey.com>
4280
4281         PR backtrace/15582:
4282         * stack.c (backtrace_command): Parse "hide" argument.
4283         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
4284         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
4285         constant.
4286
4287 2018-03-26  Tom Tromey  <tom@tromey.com>
4288
4289         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
4290         add "flags".
4291         (backtrace_command): Remove "fulltrace", add "flags".
4292
4293 2018-03-26  Tom Tromey  <tom@tromey.com>
4294
4295         * stack.c (backtrace_command): Rewrite command line parsing.
4296
4297 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
4298
4299         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
4300
4301 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
4302
4303         * filename-seen-cache.h: Add include guard.
4304
4305 2018-03-26  Keith Seitz  <keiths@redhat.com>
4306
4307         * symfile.c (place_section): Remove "struct" from section_addr_info
4308         in comment.
4309         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
4310         "struct" keyword from section_addr_info.
4311
4312 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
4313
4314         * regformats/regdef.h (reg): Add constructors.
4315
4316 2018-03-25  Pedro Alves  <palves@redhat.com>
4317
4318         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
4319         if then/else bodies in var_func_name extraction.
4320
4321 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
4322
4323         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
4324         lookup_minimal_symbol() to find symbol entry.
4325         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
4326
4327 2018-03-23  Keith Seitz  <keiths@redhat.com>
4328
4329         PR c++/22968
4330         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
4331         nested type definitions for C++, too.
4332
4333 2018-03-23  Tom Tromey  <tom@tromey.com>
4334
4335         * machoread.c (struct oso_el): Add a constructor.  Don't define as
4336         a typedef.
4337         (macho_register_oso): Remove.
4338         (macho_symtab_read): Take a std::vector.
4339         (oso_el_compare_name): Now a std::sort comparator.
4340         (macho_symfile_read_all_oso): Take a std::vector.
4341         (macho_symfile_read): Use std::vector.  Remove cleanups.
4342
4343 2018-03-22  Tom Tromey  <tom@tromey.com>
4344
4345         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
4346         (record_full_goto_bookmark): Use std::string.
4347
4348 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4349
4350         PR tdep/18295
4351         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
4352         a single mask.
4353
4354 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4355
4356         * rs6000-tdep.c (store_insn_p): New function.
4357         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
4358         and cr_reg to their unshifted values. Use store_insn_p to
4359         match LR saves using either R1 or fdata->alloca_reg. Use
4360         store_insn_p to match CR saves. Set alloca_reg_offset
4361         when alloca_reg and framep are set. Remove lr_reg shift
4362         when assigning to fdata->lr_register.
4363
4364 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4365
4366         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
4367         command line args instead of emitting a warning.
4368
4369 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4370
4371         * tracepoint.h (struct static_tracepoint_marker): Initialize
4372         fields, define default constructor, move constructor and move
4373         assignment, disable the rest.
4374         <str_id, extra>: Make std::string.
4375         (release_static_tracepoint_marker): Remove.
4376         (free_current_marker): Remove.
4377         * tracepoint.c (free_current_marker): Remove.
4378         (parse_static_tracepoint_marker_definition): Adjust to
4379         std::string, use new hex2str overload.
4380         (release_static_tracepoint_marker): Remove.
4381         (print_one_static_tracepoint_marker): Get marker by reference
4382         and adjust to std::string.
4383         (info_static_tracepoint_markers_command): Adjust to std::vector
4384         changes
4385         * target.h (static_tracepoint_marker_p): Remove typedef.
4386         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
4387         (struct target_ops) <to_static_tracepoint_marker_at>: Return
4388         bool.
4389         <to_static_tracepoint_markers_by_strid>: Return std::vector.
4390         * target-debug.h
4391         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
4392         (target_debug_print_std_vector_static_tracepoint_marker): New.
4393         (target_debug_print_struct_static_tracepoint_marker_p): Rename
4394         to...
4395         (target_debug_print_static_tracepoint_marker_p): ... this.
4396         * target-delegates.c: Re-generate.
4397         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
4398         Make std::string.
4399         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
4400         (decode_static_tracepoint_spec): Adjust to std::vector.
4401         (tracepoint_print_one_detail): Adjust to std::string.
4402         (strace_marker_decode_location): Adjust to std::string.
4403         (update_static_tracepoint): Adjust to std::string, remove call
4404         to release_static_tracepoint_marker.
4405         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4406         Adjust to std::vector.
4407         * remote.c (remote_static_tracepoint_marker_at): Return bool.
4408         (remote_static_tracepoint_markers_by_strid): Adjust to
4409         std::vector.
4410         * common/rsp-low.h (hex2str): New overload with explicit count
4411         of bytes.
4412         * common/rsp-low.c (hex2str): New overload with explicit count
4413         of bytes.
4414         * unittests/rsp-low-selftests.c (test_hex2str): New function.
4415         (_initialize_rsp_low_selftests): Add test_hex2str test.
4416         * unittests/tracepoint-selftests.c
4417         (test_parse_static_tracepoint_marker_definition): Adjust to
4418         std::string.
4419
4420 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4421
4422         * tracepoint.c (parse_static_tracepoint_marker_definition):
4423         Consider case where the definition is followed by more
4424         definitions.
4425         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4426         tracepoint-selftests.c.
4427         * unittests/tracepoint-selftests.c: New.
4428
4429 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4430
4431         * MAINTAINERS (Write After Approval): Add Pedro Franco de
4432         Carvalho.
4433
4434 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
4435
4436         * symtab.c (find_pc_sect_line): fixed indentation.
4437
4438 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
4439
4440         * symtab.c (find_pc_sect_line): now uses binary search.
4441
4442 2018-03-19  Tom Tromey  <tom@tromey.com>
4443
4444         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
4445         "IDENT" production.
4446
4447 2018-03-19  Pedro Alves  <palves@redhat.com>
4448             Tom Tromey  <tom@tromey.com>
4449
4450         * unittests/observable-selftests.c: New file.
4451         * common/observable.h: New file.
4452         * observable.h: New file.
4453         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
4454         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
4455         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
4456         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
4457         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
4458         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
4459         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
4460         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
4461         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
4462         python/py-breakpoint.c, python/py-finishbreakpoint.c,
4463         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
4464         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
4465         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
4466         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
4467         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
4468         tui/tui-interp.c, valops.c: Update all users.
4469         * tui/tui-hooks.c (tui_bp_created_observer)
4470         (tui_bp_deleted_observer, tui_bp_modified_observer)
4471         (tui_inferior_exit_observer, tui_before_prompt_observer)
4472         (tui_normal_stop_observer, tui_register_changed_observer):
4473         Remove.
4474         (tui_observers_token): New global.
4475         (attach_or_detach, tui_attach_detach_observers): New functions.
4476         (tui_install_hooks, tui_remove_hooks): Use
4477         tui_attach_detach_observers.
4478         * record-btrace.c (record_btrace_thread_observer): Remove.
4479         (record_btrace_thread_observer_token): New global.
4480         * observer.sh: Remove.
4481         * observer.c: Rename to observable.c.
4482         * observable.c (namespace gdb_observers): Define new objects.
4483         (observer_debug): Move into gdb_observers namespace.
4484         (struct observer, struct observer_list, xalloc_observer_list_node)
4485         (xfree_observer_list_node, generic_observer_attach)
4486         (generic_observer_detach, generic_observer_notify): Remove.
4487         (_initialize_observer): Update.
4488         Don't include observer.inc.
4489         * Makefile.in (generated_files): Remove observer.h, observer.inc.
4490         (clean mostlyclean): Likewise.
4491         (observer.h, observer.inc): Remove targets.
4492         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
4493         (COMMON_SFILES): Use observable.c, not observer.c.
4494         * .gitignore: Remove observer.h.
4495
4496 2018-03-18  Tom Tromey  <tom@tromey.com>
4497
4498         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
4499         gdb::def_vector.
4500         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
4501
4502 2018-03-17  Tom Tromey  <tom@tromey.com>
4503
4504         * auto-load.c (auto_load_objfile_script_1): Use std::string.
4505
4506 2018-03-17  Tom Tromey  <tom@tromey.com>
4507
4508         * target.c (class scoped_target_fd): New.
4509         (target_fileio_close_cleanup): Remove.
4510         (target_fileio_read_alloc_1): Use scoped_target_fd.
4511
4512 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
4513
4514         * silent-rules.mk: New.
4515         * Makefile.in: Include silent-rules.mk
4516         (srcdir, VPATH, top_srcdir): Move up.
4517         (COMPILE): Add ECHO_CXX.
4518         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
4519         (init.c): Add ECHO_INIT_C.
4520         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4521         (version.c): Add ECHO_GEN.
4522         (printcmd.o): Add ECHO_CXX.
4523         (target-float.o): Add ECHO_CXX.
4524         (ada-exp.o): Add ECHO_CXX.
4525         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
4526         (insight$(EXEEXT)): Add ECHO_CXXLD.
4527         * gnulib/configure.ac: Add AM_SILENT_RULES.
4528         * gnulib/aclocal.m4: Re-generate.
4529         * gnulib/configure: Re-generate.
4530         * gnulib/import/Makefile.in: Re-generate.
4531
4532 2018-03-16  Tom Tromey  <tom@tromey.com>
4533
4534         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4535         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
4536         * utils.c (do_free_section_addr_info)
4537         (make_cleanup_free_section_addr_info): Remove.
4538         * symfile.h (struct other_sections): Add constructor.
4539         (struct section_addr_info): Remove.
4540         (section_addr_info): New typedef.
4541         (struct sym_fns) <sym_offsets>: Change type of parameter.
4542         (build_section_addr_info_from_objfile)
4543         (relative_addr_info_to_section_offsets, addr_info_make_relative)
4544         (default_symfile_offsets, symbol_file_add)
4545         (symbol_file_add_from_bfd)
4546         (build_section_addr_info_from_section_table): Update.
4547         (alloc_section_addr_info, free_section_addr_info): Don't declare.
4548         * symfile.c (alloc_section_addr_info): Remove.
4549         (build_section_addr_info_from_section_table): Change return type.
4550         Update.
4551         (build_section_addr_info_from_bfd)
4552         (build_section_addr_info_from_objfile): Likewise.
4553         (free_section_addr_info): Remove.
4554         (relative_addr_info_to_section_offsets): Change type of "addrs".
4555         (addrs_section_compar): Now a std::sort comparator.
4556         (addrs_section_sort): Change return type.
4557         (addr_info_make_relative): Change type of "addrs".  Update.
4558         (default_symfile_offsets, syms_from_objfile_1)
4559         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
4560         (symbol_file_add_separate): Update.
4561         (symbol_file_add): Change type of "addrs".  Update.
4562         (add_symbol_file_command): Update.  Remove cleanups.
4563         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
4564         cleanups.
4565         * symfile-debug.c (debug_sym_offsets): Change type of "info".
4566         * solib.c (solib_read_symbols): Update.
4567         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
4568         * machoread.c (macho_symfile_offsets): Update.
4569         * jit.c (jit_bfd_try_read_symtab): Update.
4570
4571 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
4572
4573         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4574         unittests/utils-selftests.c.
4575         * unittests/utils-selftests.c: New file.
4576
4577 2018-03-14  Tom Tromey  <tom@tromey.com>
4578
4579         PR cli/14977:
4580         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
4581         for NULL.
4582
4583 2018-03-14  Tom Tromey  <tom@tromey.com>
4584
4585         PR cli/19918:
4586         * printcmd.c (printf_pointer): Allow "-" in format.
4587
4588 2018-03-14  Tom Tromey  <tom@tromey.com>
4589
4590         * printcmd.c (_initialize_printcmd): Add usage to printf.
4591
4592 2018-03-14  Yao Qi  <qiyao@sourceware.org>
4593
4594         * MAINTAINERS: Update my email address.
4595
4596 2018-03-13  Tom Tromey  <tom@tromey.com>
4597
4598         * machoread.c (macho_check_dsym): Change filenamep to a
4599         std::string*.
4600         (macho_symfile_read): Update.
4601         * symfile.c (load_command): Use std::string.
4602
4603 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4604
4605         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
4606         to error message string.
4607         (riscv_register_name): Use xsnprintf instead of sprintf.
4608         (riscv_insn::fetch_instruction): Use gdb_assert instead of
4609         internal_error.
4610         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
4611         error.
4612         (riscv_push_dummy_call): Likewise.
4613
4614 2018-03-12  Tom Tromey  <tom@tromey.com>
4615
4616         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
4617         Use gdb::byte_vector.
4618         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
4619
4620 2018-03-12  Yao Qi  <yao.qi@linaro.org>
4621
4622         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
4623         parameter type to readable_regcache.
4624         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
4625         the declaration.
4626
4627 2018-03-11  Tom Tromey  <tom@tromey.com>
4628
4629         * dwarf2read.c (struct nextfield): Add initializers.
4630         (struct nextfnfield): Remove.
4631         (struct fnfieldlist): Add initializers.  Remove "length" and
4632         "head", use std::vector.
4633         (struct decl_field_list): Remove.
4634         (struct field_info): Add initializers.
4635         <fields, baseclasses>: Now std::vector.
4636         <nbaseclasses, nfnfields, typedef_field_list_count,
4637         nested_types_list_count>: Remove.
4638         (dwarf2_add_field, dwarf2_add_type_defn)
4639         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
4640         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
4641         (process_structure_scope): Update.
4642
4643 2018-03-11  Tom Tromey  <tom@tromey.com>
4644
4645         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
4646         for use by std::sort.
4647         (build_type_psymtabs_1): Use std::vector.
4648
4649 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
4650
4651         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
4652         and LIBMPFR in the printed configuration.
4653
4654 2018-03-08  Tom Tromey  <tom@tromey.com>
4655
4656         * source.c (get_filename_and_charpos): Use scoped_fd.
4657         * nto-procfs.c (procfs_open_1): Use scoped_fd.
4658         (procfs_pidlist): Likewise.
4659         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
4660         (iterate_over_mappings): Likewise.
4661
4662 2018-03-08  Tom Tromey  <tom@tromey.com>
4663
4664         * infcall.c (struct call_return_meta_info)
4665         <stack_temporaries_enabled>: Remove.
4666         (get_call_return_value, call_function_by_hand_dummy): Update.
4667         * thread.c (disable_thread_stack_temporaries): Remove.
4668         (enable_thread_stack_temporaries): Remove.
4669         (thread_stack_temporaries_enabled_p): Return bool.
4670         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
4671         (get_last_thread_stack_temporary): Update.
4672         * eval.c (evaluate_subexp): Update.
4673         * gdbthread.h (class enable_thread_stack_temporaries): Now a
4674         class, not a function.
4675         (value_ptr, value_vec): Remove typedefs.
4676         (class thread_info) <stack_temporaries_enabled>: Now bool.
4677         <stack_temporaries>: Now a std::vector.
4678         (thread_stack_temporaries_enabled_p)
4679         (value_in_thread_stack_temporaries): Return bool.
4680
4681 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
4682
4683         * remote.c (putpkt_binary): Fix omitted bytes reporting.
4684         (getpkt_or_notif_sane_1): Likewise.
4685
4686 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
4687
4688         * build-id.c (build_id_to_debug_bfd): Use std::string.
4689
4690 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
4691
4692         * build-id.c (find_separate_debug_file_by_buildid): Return
4693         std::string.
4694         * build-id.h (find_separate_debug_file_by_buildid): Return
4695         std::string.
4696         * coffread.c (coff_symfile_read): Adjust to std::string.
4697         * elfread.c (elf_symfile_read): Adjust to std::string.
4698         * symfile.c (separate_debug_file_exists): Change parameter to
4699         std::string.
4700         (find_separate_debug_file): Return std::string.
4701         (find_separate_debug_file_by_debuglink): Return std::string.
4702         * symfile.h (find_separate_debug_file_by_debuglink): Return
4703         std::string.
4704
4705 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
4706
4707         * common/xml-utils.c (xml_escape_text): Move code to...
4708         (xml_escape_text_append): ... this new function.
4709         * common/xml-utils.h (xml_escape_text_append): New declaration.
4710         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
4711         New function.
4712         (_initialize_xml_utils): register test_xml_escape_text_append as
4713         a selftest.
4714
4715 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
4716
4717         * defs.h: Remove MAX_REGISTER_SIZE.
4718         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
4719         asserts.
4720         * python/py-unwind.c (pyuw_sniffer): Likewise.
4721
4722 2018-03-07  Tom Tromey  <tom@tromey.com>
4723
4724         * linux-tdep.c (linux_info_proc): Update.
4725         * target.h (struct target_ops) <to_fileio_readlink>: Return
4726         optional<string>.
4727         (target_fileio_readlink): Return optional<string>.
4728         * remote.c (remote_hostio_readlink): Return optional<string>.
4729         * inf-child.c (inf_child_fileio_readlink): Return
4730         optional<string>.
4731         * target.c (target_fileio_readlink): Return optional<string>.
4732
4733 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
4734
4735         * regcache.c (cooked_read_test): Add riscv to the list of
4736         architectures that have a save_reggroup.
4737
4738 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4739
4740         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
4741         value is not a dynamic class object.
4742
4743 2018-03-06  Tom Tromey  <tom@tromey.com>
4744
4745         * rust-exp.y: Formatting fixes.
4746
4747 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4748
4749         * riscv-tdep.c (riscv_register_name): Remove target description
4750         support.
4751         (riscv_gdbarch_init): Remove target description check.
4752
4753 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4754
4755         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
4756         comment.
4757         * riscv-tdep.h: Likewise.
4758
4759 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4760
4761         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
4762         (riscv_pseudo_register_write): Delete.
4763         (riscv_gdbarch_init): Remove all use of pseudo registers.
4764
4765 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
4766
4767         * record-btrace.c (btrace_print_lines): Replace cleanup
4768         parameter with RAII equivalents.
4769         (btrace_insn_history): Replace cleanup with RAII equivalents.
4770         * ui-out.h (make_cleanup_ui_out_list_begin_end,
4771         make_cleanup_ui_out_tuple_begin_end): Remove.
4772         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
4773         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
4774         make_cleanup_ui_out_list_begin_end): Remove.
4775
4776 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
4777
4778         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
4779         parameter types to std::vector.  Use bool.
4780         (record_btrace_wait): Replace VEC(tp_t) with
4781         std::vector<thread_info *>.
4782         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
4783
4784 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
4785
4786         * record-btrace.c (record_btrace_disable_callback): Remove.
4787         (struct scoped_btrace_disable): New.
4788         (record_btrace_open): Use scoped_btrace_disable.
4789
4790 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4791
4792         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
4793         reading values from registers.
4794
4795 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4796
4797         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
4798         where appropriate.
4799
4800 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4801
4802         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
4803         change parameter type.  Use GDB's print functions, and use
4804         core_addr_to_string where appropriate.
4805         (riscv_push_dummy_call): Use core_addr_to_string where
4806         appropriate, update call to riscv_print_arg_location, and reindent
4807         a few lines.
4808         (riscv_return_value): Update call to riscv_print_arg_location.
4809
4810 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4811             Tim Newsome <tim@sifive.com>
4812             Albert Ou <a0u@eecs.berkeley.edu>
4813             Darius Rad <darius@bluespec.com>
4814
4815         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
4816         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
4817         (ALLDEPFILES): Add riscv-tdep.c
4818         * configure.tgt: Add riscv support.
4819         * riscv-tdep.c: New file.
4820         * riscv-tdep.h: New file.
4821         * NEWS: Mention new target.
4822         * MAINTAINERS: Add entry for riscv.
4823
4824 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4825
4826         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
4827         fields within aggregates.
4828
4829 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
4830
4831         * record-btrace.c (btrace_print_lines): Change type of flags to
4832         gdb_disassembly_flags.
4833
4834 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4835
4836         * fbsd-nat.c: Include "inf-ptrace.h".
4837         (USE_SIGTRAP_SIGINFO): Conditionally define.
4838         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
4839         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
4840         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
4841         function.
4842         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
4843         Likewise.
4844         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
4845         Likewise.
4846         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
4847         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
4848         "supports_stopped_by_hw_breakpoint" target methods.
4849
4850 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4851
4852         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
4853         * fbsd-nat.c (debug_fbsd_nat): New variable.
4854         (show_fbsd_nat_debug): New function.
4855         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
4856         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
4857
4858 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
4859
4860         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
4861         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
4862         prototype.
4863         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
4864         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
4865         method.
4866
4867 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4868
4869         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4870         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4871
4872 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4873
4874         * charset.c (struct charset_vector): New.
4875         (charsets): Change type to charset_vector.
4876         (find_charset_names): Adjust.
4877         (add_one): Adjust.
4878         (_initialize_charset): Adjust.
4879
4880 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4881
4882         * progspace.h (struct program_space) <deleted_solibs>: Change
4883         type to std::vector<std::string>.
4884         * progspace.c (clear_program_space_solib_cache): Adjust.
4885         * breakpoint.c (print_solib_event): Adjust.
4886         (check_status_catch_solib): Adjust.
4887         * solib.c (update_solib_list): Adjust.
4888         * ui-out.h (class ui_out) <field_string>: New overload.
4889         * ui-out.c (ui_out::field_string): New overload.
4890
4891 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4892
4893         * progspace.h (struct program_space): Add constructor and
4894         destructor, initialize fields.
4895         (add_program_space): Remove.
4896         * progspace.c (add_program_space): Rename to...
4897         (program_space::program_space): ... this.
4898         (release_program_space): Rename to...
4899         (program_space::~program_space): ... this.
4900         (delete_program_space): Use delete to delete program_space.
4901         (initialize_progspace): Use new to allocate program_space.
4902         * inferior.c (add_inferior_with_spaces): Likewise.
4903         (clone_inferior_command): Likewise.
4904         * infrun.c (follow_fork_inferior): Likewise.
4905         (handle_vfork_child_exec_or_exit): Likewise.
4906
4907 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
4908
4909         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4910         (delim_string_to_char_ptr_vec): Return std::vector of
4911         gdb::unique_xmalloc_ptr.
4912         (dirnames_to_char_ptr_vec_append): Take std::vector of
4913         gdb::unique_xmalloc_ptr.
4914         (dirnames_to_char_ptr_vec): Return std::vector of
4915         gdb::unique_xmalloc_ptr.
4916         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4917         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4918         (delim_string_to_char_ptr_vec): Return an std::vector of
4919         gdb::unique_xmalloc_ptr, adjust the code.
4920         (dirnames_to_char_ptr_vec_append): Take an std::vector of
4921         gdb::unique_xmalloc_ptr, adjust the code.
4922         (dirnames_to_char_ptr_vec): Return an std::vector of
4923         gdb::unique_xmalloc_ptr, adjust the code.
4924         * auto-load.c (auto_load_safe_path_vec): Change type to
4925         std::vector of gdb::unique_xmalloc_ptr.
4926         (auto_load_expand_dir_vars): Return an std::vector of
4927         gdb::unique_xmalloc_ptr, adjust the code.
4928         (auto_load_safe_path_vec_update): Adjust.
4929         (filename_is_in_auto_load_safe_path_vec): Adjust.
4930         (auto_load_objfile_script_1): Adjust.
4931         * build-id.c (build_id_to_debug_bfd): Adjust.
4932         * linux-thread-db.c (thread_db_load_search): Adjust.
4933         * source.c (add_path): Adjust.
4934         (openp): Adjust.
4935         * symfile.c (find_separate_debug_file): Adjust.
4936         * utils.c (do_free_char_ptr_vec): Remove.
4937         (make_cleanup_free_char_ptr_vec): Remove.
4938
4939 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
4940
4941         PR gdb/22907
4942         * common/pathstuff.c: Conditionally include "<windows.h>".
4943
4944 2018-03-01  Georg Sauthoff  <mail@georg.so>
4945
4946         PR gdb/22888
4947         * gcore.in: Quote variables and switch interpreter to bash.
4948
4949 2018-03-01  Tom Tromey  <tom@tromey.com>
4950
4951         * dwarf2read.c (alloc_discriminant_info): Fix default_index
4952         assertion.  Add assertion for discriminant_index.
4953         (quirk_rust_enum): Use correct base type name in univariant case.
4954
4955 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
4956
4957         * record.c (get_call_history_modifiers): Return a
4958         record_print_flags.
4959         (cmd_record_call_history): Adjust.
4960         * record-btrace.c (record_btrace_call_history): Adjust.
4961         (record_btrace_call_history_range): Adjust.
4962         (record_btrace_call_history_from): Adjust.
4963         * target-debug.h (target_debug_print_record_print_flags): New.
4964         * target-delegates.c: Re-generate.
4965         * target.c (target_call_history): Change flags type.
4966         (target_call_history_from): Likewise.
4967         (target_call_history_range): Likewise.
4968         * target.h (struct target_ops) <target_call_history>: Likewise.
4969         (target_call_history_from): Likewise.
4970         (target_call_history_range): Likewise.
4971
4972 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
4973             Simon Marchi  <simon.marchi@polymtl.ca>
4974
4975         * common/common-utils.c: Include "sys/stat.h".
4976         (is_regular_file): Move here from "source.c"; change return
4977         type to "bool".
4978         * common/common-utils.h (is_regular_file): New prototype.
4979         * common/pathstuff.c (contains_dir_separator): New function.
4980         * common/pathstuff.h (contains_dir_separator): New prototype.
4981         * source.c: Don't include "sys/stat.h".
4982         (is_regular_file): Move to "common/common-utils.c".
4983
4984 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
4985
4986         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4987         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4988         * auto-load.c: Include "common/pathstuff.h".
4989         * common/common-def.h (current_directory): Move here.
4990         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4991         function.
4992         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4993         prototype.
4994         * common/pathstuff.c: New file.
4995         * common/pathstuff.h: New file.
4996         * compile/compile.c: Include "common/pathstuff.h".
4997         * defs.h (current_directory): Move to "common/common-defs.h".
4998         * dwarf2read.c: Include "common/pathstuff.h".
4999         * exec.c: Likewise.
5000         * guile/scm-safe-call.c: Likewise.
5001         * linux-thread-db.c: Likewise.
5002         * main.c: Likewise.
5003         * nto-tdep.c: Likewise.
5004         * objfiles.c: Likewise.
5005         * source.c: Likewise.
5006         * symtab.c: Likewise.
5007         * utils.c: Include "common/pathstuff.h".
5008         (gdb_realpath): Move to "common/pathstuff.c".
5009         (gdb_realpath_keepfile): Likewise.
5010         (gdb_abspath): Likewise.
5011         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
5012         (gdb_realpath_keepfile): Likewise.
5013         (gdb_abspath): Likewise.
5014
5015 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
5016
5017         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
5018         wildcard process pid for super_resume for kernels with a
5019         specific bug.
5020
5021 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
5022
5023         * compile/compile.c (get_args): Add additional comments
5024         explaining function.
5025
5026 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
5027             Tom Tromey  <tom@tromey.com>
5028
5029         * target.h (memory_write_request_s): Remove typedef.  Don't define
5030         VEC.
5031         (target_write_memory_blocks): Change argument to std::vector.
5032         (struct memory_write_request): Add constructor.
5033         * target-memory.c (compare_block_starting_address): Return bool.
5034         Change argument types.
5035         (claim_memory): Change arguments to use std::vector.
5036         (split_regular_and_flash_blocks, blocks_to_erase)
5037         (compute_garbled_blocks): Likewise.
5038         (cleanup_request_data, cleanup_write_requests_vector): Remove.
5039         (target_write_memory_blocks): Change argument to std::vector.
5040         * symfile.c (struct load_section_data): Add constructor and
5041         destructor.  Use std::vector for "requests".
5042         (struct load_progress_data): Add initializers.
5043         (load_section_callback): Update.  Use "new".
5044         (clear_memory_write_data): Remove.
5045         (generic_load): Update.
5046
5047 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
5048
5049         * arch/aarch64.h: Use common/tdesc.h.
5050
5051 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
5052
5053         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
5054         architecture with a 64-bit ABI.
5055
5056 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
5057
5058         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
5059         ahead of target description loading.
5060
5061 2018-02-26  Tom Tromey  <tom@tromey.com>
5062
5063         * stack.c (backtrace_command_1): Update.
5064         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
5065         of "flags".
5066         * python/py-framefilter.c (py_print_frame)
5067         (gdbpy_apply_frame_filter): Change type of "flags".
5068         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
5069         of "flags".
5070         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
5071         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
5072         * extension.h (enum frame_filter_flag): Rename from
5073         frame_filter_flags.
5074         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
5075         (apply_ext_lang_frame_filter): Change type of "flags".
5076         * extension.c (apply_ext_lang_frame_filter): Change type of
5077         "flags".
5078         * extension-priv.h (struct extension_language_ops)
5079         <apply_frame_filter>: Change type of "flags".
5080
5081 2018-02-26  Tom Tromey  <tom@tromey.com>
5082
5083         PR python/16497:
5084         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
5085         off-by-one in py_end computation.
5086         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
5087         PRINT_MORE_FRAMES.
5088         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
5089         constant.
5090
5091 2018-02-26  Tom Tromey  <tom@tromey.com>
5092
5093         * dwarf2read.c (struct variant_field): New.
5094         (struct nextfield) <variant>: New field.
5095         (dwarf2_add_field): Handle DW_TAG_variant_part.
5096         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
5097         discriminated union.
5098         (read_structure_type): Handle DW_TAG_variant_part.
5099         (handle_struct_member_die): New function, extracted from
5100         process_structure_scope.  Handle DW_TAG_variant.
5101         (process_structure_scope): Handle discriminated unions.  Call
5102         handle_struct_member_die.
5103
5104 2018-02-26  Tom Tromey  <tom@tromey.com>
5105
5106         * rust-lang.h (rust_last_path_segment): Declare.
5107         * rust-lang.c (rust_last_path_segment): Now public.  Change
5108         contract.
5109         (struct disr_info): Remove.
5110         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
5111         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
5112         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
5113         (rust_enum_p, rust_enum_variant): New function.
5114         (rust_underscore_fields): Remove "offset" parameter.
5115         (rust_print_enum): New function.
5116         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
5117         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
5118         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
5119         enums.
5120         (rust_internal_print_type): New function, from rust_print_type.
5121         Remove enum code.
5122         (rust_print_type): Call rust_internal_print_type.
5123         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
5124         Update enum handling.
5125         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
5126         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
5127         (rust_union_quirks): New functions.
5128         (process_full_comp_unit, process_full_type_unit): Call
5129         rust_union_quirks.
5130         (process_structure_scope): Update rust_unions if necessary.
5131
5132 2018-02-26  Tom Tromey  <tom@tromey.com>
5133
5134         * value.h (value_union_variant): Declare.
5135         * valops.c (value_union_variant): New function.
5136         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
5137         (struct discriminant_info): New.
5138         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
5139         enumerator.
5140         (struct main_type) <flag_discriminated_union>: New field.
5141
5142 2018-02-26  Tom Tromey  <tom@tromey.com>
5143
5144         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5145         unittests/unpack-selftests.c.
5146         * unittests/unpack-selftests.c: New file.
5147         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
5148
5149 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5150
5151         * dwarf2read.c (struct partial_die_info) <read>: New method.
5152         (read_partial_die): Remove the declaration.
5153         (load_partial_dies): Update.
5154         (partial_die_info::partial_die_info):
5155         (read_partial_die): Change it to partial_die_info::read.
5156
5157 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5158
5159         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
5160         (fixup_partial_die): Remove declaration.
5161         (scan_partial_symbols): Update.
5162         (partial_die_parent_scope): Likewise.
5163         (partial_die_full_name): Likewise.
5164         (fixup_partial_die): Change it to partial_die_info::fixup.
5165
5166 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5167
5168         * dwarf2read.c (read_partial_die): Update the declaration.
5169         (load_partial_dies): Caller update.
5170         (read_partial_die): Remove one argument abbrev_len.
5171
5172 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5173
5174         * dwarf2read.c (struct partial_die_info): Add ctor, delete
5175         assignment operator.
5176         (load_partial_dies): Use ctor and copy ctor.
5177         (read_partial_die): Update.
5178         (dwarf2_cu::find_partial_die): Use ctor.
5179
5180 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5181
5182         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
5183         (find_partial_die_in_comp_unit): Change it to
5184         dwarf2_cu::find_partial_die.
5185         (find_partial_die): Update.
5186
5187 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5188
5189         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
5190         is NULL.
5191
5192 2018-02-26  Yao Qi  <yao.qi@linaro.org>
5193
5194         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
5195
5196 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
5197
5198         * arch/amd64.h: Use common/tdesc.h.
5199         * arch/i386.c: Likewise.
5200         * arch/i386.h: Likewise.
5201         * arch/tic6x.c: Likewise.
5202         * arch/tdesc.h: Move file from here...
5203         * common/tdesc.h: ...to here.
5204         * features/aarch64-core.c: Regenerate.
5205         * features/aarch64-fpu.c: Regenerate.
5206         * features/i386/32bit-avx.c: Regenerate.
5207         * features/i386/32bit-avx512.c: Regenerate.
5208         * features/i386/32bit-core.c: Regenerate.
5209         * features/i386/32bit-linux.c: Regenerate.
5210         * features/i386/32bit-mpx.c: Regenerate.
5211         * features/i386/32bit-pkeys.c: Regenerate.
5212         * features/i386/32bit-sse.c: Regenerate.
5213         * features/i386/64bit-avx.c: Regenerate.
5214         * features/i386/64bit-avx512.c: Regenerate.
5215         * features/i386/64bit-core.c: Regenerate.
5216         * features/i386/64bit-linux.c: Regenerate.
5217         * features/i386/64bit-mpx.c: Regenerate.
5218         * features/i386/64bit-pkeys.c: Regenerate.
5219         * features/i386/64bit-segments.c: Regenerate.
5220         * features/i386/64bit-sse.c: Regenerate.
5221         * features/i386/x32-core.c: Regenerate.
5222         * features/tic6x-c6xp.c: Regenerate.
5223         * features/tic6x-core.c: Regenerate.
5224         * features/tic6x-gp.c: Regenerate.
5225         * target-descriptions.c: Use common/tdesc.h.
5226         * target-descriptions.h: Likewise.
5227
5228 2018-02-24  Tom Tromey  <tom@tromey.com>
5229
5230         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
5231         (try_thread_db_load_from_dir, thread_db_load_search): Use
5232         std::string.
5233         (info_auto_load_libthread_db_compare): Return bool.  Change
5234         argument types.
5235         (info_auto_load_libthread_db): Use std::vector, std::string.
5236         Remove cleanups.
5237
5238 2018-02-24  Tom Tromey  <tom@tromey.com>
5239
5240         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
5241         std::string.
5242         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
5243         std::string*.
5244         * gdbarch.c: Rebuild.
5245         * gdbarch.h: Rebuild.
5246         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
5247         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
5248         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
5249         std::string*.
5250
5251 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
5252
5253         * gdbtypes.h (sect_offset): Change type to uint64_t.
5254         (sect_offset_str): New function.
5255         * dwarf2read.c (create_addrmap_from_aranges): Use
5256         sect_offset_str.
5257         (error_check_comp_unit_head): Likewise.
5258         (create_debug_type_hash_table): Likewise.
5259         (read_cutu_die_from_dwo): Likewise.
5260         (init_cutu_and_read_dies): Likewise.
5261         (init_cutu_and_read_dies_no_follow): Likewise.
5262         (process_psymtab_comp_unit_reader): Likewise.
5263         (partial_die_parent_scope): Likewise.
5264         (peek_die_abbrev): Likewise.
5265         (process_queue): Likewise.
5266         (dwarf2_physname): Likewise.
5267         (read_namespace_alias): Likewise.
5268         (read_import_statement): Likewise.
5269         (create_dwo_cu_reader): Likewise.
5270         (create_cus_hash_table): Likewise.
5271         (lookup_dwo_cutu): Likewise.
5272         (inherit_abstract_dies): Likewise.
5273         (read_func_scope): Likewise.
5274         (read_call_site_scope): Likewise.
5275         (dwarf2_add_member_fn): Likewise.
5276         (read_common_block): Likewise.
5277         (read_module_type): Likewise.
5278         (read_typedef): Likewise.
5279         (read_subrange_type): Likewise.
5280         (load_partial_dies): Likewise.
5281         (read_partial_die): Likewise.
5282         (find_partial_die): Likewise.
5283         (read_str_index): Likewise.
5284         (dwarf2_string_attr): Likewise.
5285         (build_error_marker_type): Likewise.
5286         (lookup_die_type): Likewise.
5287         (dump_die_shallow): Likewise.
5288         (follow_die_ref): Likewise.
5289         (dwarf2_fetch_die_loc_sect_off): Likewise.
5290         (dwarf2_fetch_constant_bytes): Likewise.
5291         (follow_die_sig): Likewise.
5292         (get_signatured_type): Likewise.
5293         (get_DW_AT_signature_type): Likewise.
5294         (dwarf2_find_containing_comp_unit): Likewise.
5295         (set_die_type): Likewise.
5296
5297 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
5298
5299         * arch/aarch64.c: Include "common-defs.h".
5300         * arch/amd64.c: Likewise.
5301         * arch/i386.c: Likewise.
5302
5303 2018-02-21  Tom Tromey  <tom@tromey.com>
5304
5305         * value.h: (extract_field_op): Update.
5306         * eval.c (extract_field_op): Return a const char *.
5307         * expression.h (parse_expression_for_completion): Update.
5308         * completer.c (complete_expression): Update.
5309         (add_struct_fields): Make fieldname const.
5310         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
5311         (mark_completion_tag, parse_exp_in_context_1): Update.
5312         (parse_expression_for_completion): Change "name" to
5313         unique_xmalloc_ptr*.
5314
5315 2018-02-21  Tom Tromey  <tom@tromey.com>
5316
5317         * infcall.c (call_function_by_hand_dummy): Use std::vector.
5318
5319 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5320
5321         * avr-tdep.c (avr_read_pc): Change parameter type to
5322         readable_regcache.
5323         * gdbarch.sh (read_pc): Likewise.
5324         * gdbarch.c: Re-generated.
5325         * gdbarch.h: Re-generated.
5326         * hppa-tdep.c (hppa_read_pc): Change parameter type to
5327         readable_regcache.
5328         * ia64-tdep.c (ia64_read_pc): Likewise.
5329         * mips-tdep.c (mips_read_pc): Likewise.
5330         * spu-tdep.c (spu_read_pc): Likewise.
5331
5332 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5333
5334         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
5335         * regcache-dump.c: New file.
5336         * regcache.c: Move register_dump to regcache-dump.c.
5337         (maintenance_print_registers): Likewise.
5338         (maintenance_print_raw_registers): Likewise.
5339         (maintenance_print_cooked_registers): Likewise.
5340         (maintenance_print_register_groups): Likewise.
5341         (maintenance_print_remote_registers): Likewise.
5342         (_initialize_regcache): Likewise.
5343         * regcache.h (register_dump): Moved from regcache.c.
5344
5345 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5346
5347         * regcache.c (regcache::regcache): Update.
5348         (regcache::invalidate): Move it to detached_regcache::invalidate.
5349         (get_thread_arch_aspace_regcache): Update.
5350         (regcache::raw_update): Update.
5351         (regcache::cooked_read): Remove some code.
5352         (regcache::cooked_read_value): Likewise.
5353         (regcache::raw_write): Remove assert on m_readonly_p.
5354         (regcache::raw_supply_integer): Move it to
5355         detached_regcache::raw_supply_integer.
5356         (regcache::raw_supply_zeroed): Likewise.
5357         * regcache.h (detached_regcache) <raw_supply_integer>: New
5358         declaration.
5359         <raw_supply_zeroed, invalidate>: Likewise.
5360         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
5361         <invalidate>: Likewise.
5362         <m_readonly_p>: Removed.
5363
5364 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5365
5366         * infcmd.c (get_return_value): Let stop_regs point to
5367         get_current_regcache.
5368         * regcache.c (regcache::regcache): Remove.
5369         (register_dump_reg_buffer): New class.
5370         (regcache_print): Adjust.
5371         * regcache.h (regcache): Remove constructors.
5372
5373 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5374
5375         * regcache.c (class register_dump): New class.
5376         (register_dump_regcache, register_dump_none): New class.
5377         (register_dump_remote, register_dump_groups): New class.
5378         (regcache_print): Update.
5379         * regcache.h (regcache_dump_what): Move it to regcache.c.
5380         (regcache) <dump>: Remove.
5381
5382 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5383
5384         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
5385          reg_buffer_rw *.
5386         (jit_unwind_reg_set_impl): Call raw_supply.
5387         (jit_frame_sniffer): Use reg_buffer_rw.
5388         * record-full.c (record_full_core_regbuf): Change its type.
5389         (record_full_core_open_1): Use reg_buffer_rw.
5390         (record_full_close): Likewise.
5391         (record_full_core_fetch_registers): Use regcache->raw_supply.
5392         (record_full_core_store_registers): Likewise.
5393         * regcache.c (regcache::get_register_status): Move it to
5394         reg_buffer.
5395         (regcache_raw_set_cached_value): Remove.
5396         (regcache::raw_set_cached_value): Remove.
5397         (regcache::raw_write): Call raw_supply.
5398         (regcache::raw_supply): Move it to reg_buffer_rw.
5399         * regcache.h (regcache_raw_set_cached_value): Remove.
5400         (reg_buffer_rw): New class.
5401
5402 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5403
5404         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
5405         readonly_detached_regcache.
5406         (dummy_frame_prev_register): Use regcache->cooked_read.
5407         * frame.c (frame_save_as_regcache): Change return type.
5408         (frame_pop): Update.
5409         * frame.h (frame_save_as_regcache): Update declaration.
5410         * inferior.h (get_infcall_suspend_state_regcache): Update
5411         declaration.
5412         * infrun.c (infcall_suspend_state) <registers>: use
5413         readonly_detached_regcache.
5414         (save_infcall_suspend_state): Don't use regcache_dup.
5415         (get_infcall_suspend_state_regcache): Change return type.
5416         * linux-fork.c (struct fork_info) <savedregs>: Change to
5417         readonly_detached_regcache.
5418         <pc>: New field.
5419         (fork_save_infrun_state): Don't use regcache_dup.
5420         (info_checkpoints_command): Adjust.
5421         * mi/mi-main.c (register_changed_p): Update declaration.
5422         (mi_cmd_data_list_changed_registers): Use
5423         readonly_detached_regcache.
5424         (register_changed_p): Change parameter type to
5425         readonly_detached_regcache.
5426         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
5427         readonly_detached_regcache.
5428         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
5429         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
5430         New.
5431         (regcache::save): Move it to reg_buffer.
5432         (regcache::restore): Change parameter type.
5433         (regcache_dup): Remove.
5434         * regcache.h (reg_buffer) <save>: New method.
5435         (readonly_detached_regcache): New class.
5436         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
5437         readonly_detached_regcache.
5438         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
5439
5440 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5441
5442         * frame.c (frame_save_as_regcache): Use regcache method save.
5443         (frame_pop): Use regcache method restore.
5444         * infrun.c (restore_infcall_suspend_state): Likewise.
5445         * linux-fork.c (fork_load_infrun_state): Likewise.
5446         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
5447         save.
5448         * regcache.c (regcache_save): Remove.
5449         (regcache::restore): More asserts.
5450         (regcache_cpy): Remove.
5451         * regcache.h (regcache_save): Remove the declaration.
5452         (regcache::restore): Move from private to public.
5453         Remove the friend declaration of regcache_cpy.
5454         (regcache_cpy): Remove declaration.
5455
5456 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5457
5458         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
5459         parameter type to 'readable_regcache *'.
5460         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5461         * arm-tdep.c (arm_neon_quad_read): Likewise.
5462         (arm_pseudo_read): Likewise.
5463         * avr-tdep.c (avr_pseudo_register_read): Likewise.
5464         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5465         * frv-tdep.c (frv_pseudo_register_read): Likewise.
5466         * gdbarch.c: Re-generated.
5467         * gdbarch.h: Re-generated.
5468         * gdbarch.sh (pseudo_register_read): Change parameter type to
5469         'readable_regcache *'.
5470         (pseudo_register_read_value): Likewise.
5471         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
5472         (h8300_pseudo_register_read): Likewise.
5473         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
5474         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5475         (i386_pseudo_register_read_into_value): Likewise.
5476         (i386_pseudo_register_read_value): Likewise.
5477         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
5478         declaration.
5479         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
5480         * m32c-tdep.c (m32c_raw_read): Likewise.
5481         (m32c_read_flg): Likewise.
5482         (m32c_banked_register): Likewise.
5483         (m32c_banked_read): Likewise.
5484         (m32c_sb_read): Likewise.
5485         (m32c_part_read): Likewise.
5486         (m32c_cat_read): Likewise.
5487         (m32c_r3r2r1r0_read): Likewise.
5488         (m32c_pseudo_register_read): Likewise.
5489         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5490         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5491         (mep_pseudo_cr64_read): Likewise.
5492         (mep_pseudo_register_read): Likewise.
5493         * mips-tdep.c (mips_pseudo_register_read): Likewise.
5494         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5495         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5496         * regcache.c (regcache::raw_read): Move it to readable_regcache.
5497         (regcache::cooked_read): Likewise.
5498         (regcache::cooked_read_value): Likewise.
5499         (regcache_cooked_read_signed):
5500         (regcache::cooked_read): Likewise.
5501         * regcache.h (readable_regcache): New class.
5502         (regcache): Inherit readable_regcache.  Move some methods to
5503         readable_regcache.
5504         * rl78-tdep.c (rl78_pseudo_register_read): Change
5505         parameter type to 'readable_regcache *'.
5506         * rs6000-tdep.c (do_regcache_raw_read): Remove.
5507         (e500_pseudo_register_read): Change parameter type to
5508         'readable_regcache *'.
5509         (dfp_pseudo_register_read): Likewise.
5510         (vsx_pseudo_register_read): Likewise.
5511         (efpr_pseudo_register_read): Likewise.
5512         * s390-tdep.c (s390_pseudo_register_read): Likewise.
5513         * sh-tdep.c (sh_pseudo_register_read): Likewise.
5514         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
5515         (sh64_pseudo_register_read): Likewise.
5516         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5517         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5518         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5519         (spu_pseudo_register_read): Likewise.
5520         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5521         (xtensa_pseudo_register_read): Likewise.
5522
5523 2018-02-21  Yao Qi  <yao.qi@linaro.org>
5524
5525         * regcache.c (regcache::regcache): Call reg_buffer ctor.
5526         (regcache::arch): Move it to reg_buffer::arch.
5527         (regcache::register_buffer): Likewise.
5528         (regcache::assert_regnum): Likewise.
5529         (regcache::num_raw_registers): Likewise.
5530         * regcache.h (reg_buffer): New class.
5531         (regcache): Inherit reg_buffer.
5532
5533 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
5534
5535         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
5536         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
5537
5538 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
5539
5540         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
5541
5542 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
5543
5544         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
5545         (SFILES): Remove common/*.c files.
5546         (COMMON_OBS): Remove some *.o files built from common/*.c files.
5547         * common/common.host: Add common reference.
5548         * configure.ac: Likewise.
5549         * configure: Regenerate.
5550
5551 2018-02-16  Yao Qi  <yao.qi@linaro.org>
5552
5553         * block.c (block_namespace_info): Inherit allocate_on_obstack.
5554         (block_initialize_namespace): Use new.
5555         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
5556         (dwarf2_free_objfile): Use delete.
5557         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
5558         (copy_type_recursive): Use new.
5559         * gdb_obstack.h (allocate_on_obstack): New.
5560
5561 2018-02-15  Yao Qi  <yao.qi@linaro.org>
5562
5563         PR gdb/22849
5564         * inferior.c (exit_inferior_1): Reset inf->control.
5565
5566 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
5567
5568         * ada-lang.c (ada_to_fixed_value_create): Delete advance
5569         declaration.
5570
5571 2018-02-14  Pedro Alves  <palves@redhat.com>
5572
5573         * frame-unwind.c (frame_unwind_try_unwinder): Always call
5574         frame_cleanup_after_sniffer on exception.
5575
5576 2018-02-14  Tom Tromey  <tom@tromey.com>
5577
5578         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
5579         const.
5580         (solib_bfd_open): Make pathname const.
5581         * solib.c (solib_bfd_open): Make pathname const.
5582         * solib-spu.c (spu_bfd_fopen): Make name const.
5583         (spu_bfd_open): Make pathname const.
5584         * solib-darwin.c (darwin_bfd_open): Make pathname const.
5585         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
5586
5587 2018-02-14  Tom Tromey  <tom@tromey.com>
5588
5589         * symfile.c (symfile_bfd_open): Update.
5590         * source.h (openp, source_full_path_of, find_and_open_source):
5591         Change argument type to unique_xmalloc_ptr.
5592         * source.c (openp): Take a unique_xmalloc_ptr.
5593         (source_full_path_of, find_and_open_source): Likewise.
5594         (open_source_file, symtab_to_fullname): Update.
5595         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
5596         unique_xmalloc_ptr.
5597         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
5598         (exec_file_find): Update.
5599         * psymtab.c (psymtab_to_fullname): Update.
5600         * nto-tdep.h (nto_find_and_open_solib): Update.
5601         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
5602         unique_xmalloc_ptr.
5603         * exec.c (exec_file_attach): Update.
5604         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
5605         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
5606
5607 2018-02-14  Tom Tromey  <tom@tromey.com>
5608
5609         * solib.c: Include source.h.
5610         * nto-tdep.c: Include source.h.
5611         * mi/mi-cmd-env.c: Include source.h.
5612         * infcmd.c: Include source.h.
5613         * exec.c: Include source.h.
5614         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
5615         (add_path, directory_switch, source_path, init_source_path): Move
5616         declarations...
5617         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
5618         (add_path, directory_switch, source_path, init_source_path):
5619         ...here.
5620
5621 2018-02-14  Tom Tromey  <tom@tromey.com>
5622
5623         * solist.h (exec_file_find, solib_find): Return
5624         unique_xmalloc_ptr.
5625         (solib_bfd_fopen): Take a const char *.
5626         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
5627         (exec_file_find, solib_find): Likewise.
5628         (solib_bfd_fopen): Do not take ownership of "pathname".
5629         (solib_bfd_open): Use unique_xmalloc_ptr.
5630         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
5631         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
5632         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
5633         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
5634
5635 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
5636
5637         * ada-lang.c (name_match_type_from_name): Remove reference to
5638         ada_name_for_lookup in function's documentation.
5639         * ada-lang.h (ada_name_for_lookup): Delete declaration.
5640
5641 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
5642
5643         * defs.h (enum openp_flags): New enum.
5644         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
5645         Move to enum openp_flags.
5646         (openp_flags): New enum flags.
5647         (openp): Change parameter type to openp_flags.
5648         * source.c (openp): Change parameter type to openp_flags.
5649         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
5650         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
5651
5652 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
5653
5654         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
5655         per-command.
5656
5657 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5658
5659         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
5660         into...
5661         (class dwarf2_queue_guard): ...the destructor of this new class.
5662         (dw2_do_instantiate_symtab): Create instance of the new class
5663         dwarf2_queue_guard, remove cleanup.
5664
5665 2018-02-09  Tom Tromey  <tom@tromey.com>
5666
5667         * source.c (find_source_lines): Don't reference past the end of
5668         the vector.
5669
5670 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5671
5672         * remote.c (remote_btrace_maybe_reopen): Change error message.
5673         * btrace.c (btrace_enable): Likewise.
5674         (parse_xml_btrace): Likewise.
5675         (parse_xml_btrace_conf): Likewise.
5676
5677 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5678
5679         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
5680         (linux_enable_pt, linux_enable_bts): Call
5681         diagnose_perf_event_open_fail.
5682
5683 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5684
5685         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
5686         Remove parameter and change return type.  Update callers.  Move it.
5687         (linux_enable_bts, linux_enable_pt): Improve error message.
5688         (linux_enable_pt): Remove zero buffer size check.
5689         (linux_enable_btrace): Improve error messages.  Remove NULL return
5690         check.
5691
5692 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5693
5694         * btrace.c (btrace_enable): Remove target_supports_btrace call.
5695         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
5696         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
5697         (linux_supports_pt, linux_supports_btrace): Remove.
5698         (linux_enable_bts): Call cpu_supports_bts.
5699         * nat/linux-btrace.h (linux_supports_btrace): Remove.
5700         * remote.c (remote_supports_btrace): Remove.
5701         (init_remote_ops): Remove remote_supports_btrace.
5702         * target-delegates.c: Regenerated.
5703         * target.c (target_supports_btrace): Remove.
5704         * target.h (target_ops) <to_supports_btrace>: Remove
5705         (target_supports_btrace): Remove.
5706         * x86-linux-nat.c (x86_linux_create_target): Remove
5707         linux_supports_btrace.
5708
5709 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5710
5711         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
5712         btrace failed.
5713         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
5714         exception and use message in own exception.
5715
5716 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5717
5718         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
5719         (perf_event_pt_event_type): Use gdb_file_up.
5720         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
5721         scoped_fd, and scoped_mmap.
5722
5723 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5724
5725         * common/scoped_mmap.h: New.
5726         * unittests/scoped_mmap-selftest.c: New.
5727         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5728         unittests/scoped_mmap-selftest.c.
5729
5730 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5731
5732         * common/scoped_fd.h: New.
5733         * unittests/scoped_fd-selftest.c: New.
5734         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5735         unittests/scoped_fd-selftest.c.
5736
5737 2018-02-09  Tom Tromey  <tom@tromey.com>
5738
5739         * auto-load.c (auto_load_section_scripts): Use
5740         gdb::unique_xmalloc_ptr.
5741
5742 2018-02-09  Tom Tromey  <tom@tromey.com>
5743
5744         * auto-load.c (execute_script_contents): Use std::string.
5745
5746 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
5747
5748         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
5749         Python function, rather than a new command.
5750
5751 2018-02-08  Tom Tromey  <tom@tromey.com>
5752
5753         * solib.c (solib_find_1): Use std::string.
5754         (solib_bfd_fopen): Use unique_xmalloc_ptr.
5755
5756 2018-02-08  Tom Tromey  <tom@tromey.com>
5757
5758         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
5759
5760 2018-02-08  Tom Tromey  <tom@tromey.com>
5761
5762         * source.c (find_source_lines): Use gdb::def_vector.
5763
5764 2018-02-08  Tom Tromey  <tom@tromey.com>
5765
5766         * macrocmd.c (struct temporary_macro_definition): New.
5767         (macro_define_command): Use temporary_macro_definition.  Remove
5768         cleanups.
5769         (free_macro_definition_ptr): Remove.
5770
5771 2018-02-08  Tom Tromey  <tom@tromey.com>
5772
5773         * macroexp.c (maybe_expand): Use std::string.
5774
5775 2018-02-08  Tom Tromey  <tom@tromey.com>
5776
5777         * macroexp.c (struct macro_buffer): Add initializers for some
5778         members.
5779         (init_buffer, init_shared_buffer, free_buffer)
5780         (free_buffer_return_text): Remove.
5781         (macro_buffer): New constructors.
5782         (~macro_buffer): New destructor.
5783         (macro_buffer::set_shared): New method.
5784         (macro_buffer::resize_buffer, macro_buffer::appendc)
5785         (macro_buffer::appendmem): Now methods, not free functions.
5786         (set_token, append_tokens_without_splicing, stringify)
5787         (macro_stringify): Update.
5788         (gather_arguments): Change return type.  Remove argc_p argument,
5789         add args_ptr argument.  Use std::vector.
5790         (substitute_args): Remove argc argument.  Accept std::vector.
5791         (expand): Update.  Use std::vector.
5792         (scan, macro_expand, macro_expand_next): Update.
5793
5794 2018-02-08  Tom Tromey  <tom@tromey.com>
5795
5796         * symtab.c (default_collect_symbol_completion_matches_break_on):
5797         Use unique_xmalloc_ptr.
5798         * macroscope.h: (sal_macro_scope, user_macro_scope)
5799         (default_macro_scope): Return unique_xmalloc_ptr.
5800         * macroscope.c (sal_macro_scope, user_macro_scope)
5801         (default_macro_scope): Return unique_xmalloc_ptr.
5802         * macroexp.h (macro_expand, macro_expand_once): Return
5803         unique_xmalloc_ptr.
5804         * macroexp.c (macro_expand, macro_expand_once): Return
5805         unique_xmalloc_ptr.
5806         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5807         (info_macro_command, info_macros_command): Use
5808         unique_xmalloc_ptr.
5809         * compile/compile-c-support.c (write_macro_definitions): Use
5810         unique_xmalloc_ptr.
5811         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
5812
5813 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
5814
5815         * value.c (value_static_field): Assign field type instead of
5816         containing type when returning an optimized out value.
5817
5818 2018-02-06  Yao Qi  <yao.qi@linaro.org>
5819
5820         * ft32-tdep.c (ft32_read_pc): Remove.
5821         (ft32_write_pc): Remove.
5822         (ft32_gdbarch_init): Update.
5823         * m32r-tdep.c (m32r_read_pc): Remove.
5824         (m32r_gdbarch_init): Update.
5825         * mep-tdep.c (mep_read_pc): Remove.
5826         (mep_gdbarch_init): Update.
5827         * microblaze-tdep.c (microblaze_write_pc): Remove.
5828         (microblaze_gdbarch_init): Update.
5829         * mn10300-tdep.c (mn10300_read_pc): Remove.
5830         (mn10300_write_pc): Remove.
5831         (mn10300_gdbarch_init): Update.
5832         * moxie-tdep.c (moxie_read_pc): Remove.
5833         (moxie_write_pc): Remove.
5834         (moxie_gdbarch_init): Update.
5835
5836 2018-02-06  Yao Qi  <yao.qi@linaro.org>
5837
5838         * expprint.c (print_subexp_standard): Handle
5839         OP_F77_UNDETERMINED_ARGLIST.
5840         (dump_subexp_body_standard): Likewise.
5841
5842 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
5843
5844         * target-descriptions.c (tdesc_element_visitor) Add empty
5845         implementations.
5846         (tdesc_type): Move make_gdb_type from here.
5847         (tdesc_type_builtin): Likewise.
5848         (tdesc_type_vector): Likewise.
5849         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
5850         (make_gdb_type_struct): Move from tdesc_type_with_fields.
5851         (make_gdb_type_union): Likewise.
5852         (make_gdb_type_flags): Likewise.
5853         (make_gdb_type_enum): Likewise.
5854         (make_gdb_type): New function.
5855         (tdesc_register_type): Use static make_gdb_type.
5856
5857 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
5858
5859         * infcmd.c (default_print_one_register_info): Align natural-format
5860         column values consistently one under another.
5861         (pad_to_column): New function.
5862
5863 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
5864
5865         * dwarf2read.c (dwarf2_physname): Move commment.
5866
5867 2018-02-01  Leszek Swirski  <leszeks@google.com>
5868
5869         * varobj.c (varobj_formatted_print_options): Allow recursive
5870         pretty printing if pretty printing is enabled.
5871
5872 2018-02-01  Leszek Swirski  <leszeks@google.com>
5873
5874         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5875         names after a structop as a filename.
5876
5877 2018-02-01  Yao Qi  <yao.qi@linaro.org>
5878
5879         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5880         (arm_record_coproc_data_proc): Likewise.
5881
5882 2018-02-01  Yao Qi  <yao.qi@linaro.org>
5883
5884         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5885
5886 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
5887
5888         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5889         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5890
5891 2018-01-31  Pedro Alves  <palves@redhat.com>
5892
5893         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5894         * inflow.c (child_terminal_save_inferior): Wrap reference to
5895         tcgetpgrp in HAVE_TERMIOS_H.
5896         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5897         _WIN32.
5898         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5899         always iterate over all inferiors.
5900         (gdbsim_cntrl_c): Adjust.
5901         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5902
5903 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
5904
5905         * gdbtypes.c (lookup_array_range_type): Make sure the array's
5906         index type is objfile-owned if the element type is as well.
5907
5908 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
5909
5910         GDB 8.1 released.
5911
5912 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5913
5914         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5915         "features/s390x-linux64.c".
5916         (_initialize_s390_linux_tdep): Remove initialization of tdescs
5917         s390_linux32 and s390x_linux64.
5918         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5919         default tdesc.
5920         * s390-tdep.c: Include "features/s390-linux32.c" and
5921         "features/s390x-linux64.c".
5922         (s390_tdesc_valid): Add check for tdesc_has_registers.
5923         (s390_gdbarch_init): Make sure there is always a valid tdesc.
5924         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5925         tdesc_s390x_linux64.
5926         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5927         tdesc_s390x_linux64 to...
5928         * s390-tdep.h: ...here.
5929
5930 2018-01-30  Pedro Alves  <palves@redhat.com>
5931
5932         PR gdb/13211
5933         * config.in, configure: Regenerate.
5934         * configure.ac: Check for getpgid.
5935         * go32-nat.c (go32_pass_ctrlc): New.
5936         (go32_target): Install it.
5937         * inf-child.c (inf_child_target): Install
5938         child_terminal_save_inferior, child_pass_ctrlc and
5939         child_interrupt.
5940         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5941         (inf_ptrace_target): No longer install it.
5942         * infcmd.c (interrupt_target_1): Adjust.
5943         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5944         (child_interrupt): Declare.
5945         (inferior::terminal_state): New.
5946         * inflow.c (struct terminal_info): Update comments.
5947         (inferior_process_group): Delete.
5948         (terminal_is_ours): Delete.
5949         (gdb_tty_state): New.
5950         (child_terminal_init): Adjust.
5951         (is_gdb_terminal, sharing_input_terminal_1)
5952         (sharing_input_terminal): New functions.
5953         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
5954         Set the process's actual process group in the foreground if
5955         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
5956         mark terminal as the inferior's if not sharing GDB's terminal.
5957         Don't check attach_flag.
5958         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5959         pass down a target_terminal_state.
5960         (child_terminal_save_inferior): New, factored out from ...
5961         (child_terminal_ours_1): ... this.  Handle
5962         target_terminal_state::is_ours_for_output.
5963         (child_interrupt, child_pass_ctrlc): New.
5964         (inflow_inferior_exit): Clear the inferior's terminal_state.
5965         (copy_terminal_info): Copy the inferior's terminal state.
5966         (_initialize_inflow): Remove reference to terminal_is_ours.
5967         * inflow.h (inferior_process_group): Delete.
5968         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5969         * procfs.c (procfs_target): Don't install procfs_interrupt.
5970         (procfs_interrupt): Delete.
5971         * remote.c (remote_serial_quit_handler): Adjust.
5972         (remote_interrupt): Remove ptid parameter.  Adjust.
5973         * target-delegates.c: Regenerate.
5974         * target.c: Include "terminal.h".
5975         (target_terminal::terminal_state): Rename to ...
5976         (target_terminal::m_terminal_state): ... this.
5977         (target_terminal::init): Adjust.
5978         (target_terminal::inferior): Adjust to per-inferior
5979         terminal_state.
5980         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5981         (target_terminal::ours, target_terminal::ours_for_output): Use
5982         target_terminal_is_ours_kind.
5983         (target_interrupt): Remove ptid parameter.  Adjust.
5984         (default_target_pass_ctrlc): Adjust.
5985         * target.h (target_ops::to_terminal_save_inferior): New field.
5986         (target_ops::to_interrupt): Remove ptid_t parameter.
5987         (target_interrupt): Remove ptid_t parameter.  Update comment.
5988         (target_pass_ctrlc): Update comment.
5989         * target/target.h (target_terminal_state): New scoped enum,
5990         factored out of ...
5991         (target_terminal::terminal_state): ... here.
5992         (target_terminal::inferior): Update comments.
5993         (target_terminal::restore_inferior): New.
5994         (target_terminal::is_inferior, target_terminal::is_ours)
5995         (target_terminal::is_ours_for_output): Adjust.
5996         (target_terminal::scoped_restore_terminal_state): Adjust to
5997         rename, and call restore_inferior() instead of inferior().
5998         (target_terminal::scoped_restore_terminal_state::m_state): Change
5999         type.
6000         (target_terminal::terminal_state): Rename to ...
6001         (target_terminal::m_terminal_state): ... this and change type.
6002
6003 2018-01-30  Pedro Alves  <palves@redhat.com>
6004
6005         * linux-nat.c (wait_for_signal): New function.
6006         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
6007         directly.
6008         (async_terminal_is_ours)
6009         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
6010         (linux_nat_add_target): Don't override
6011         to_terminal_inferior/to_terminal_ours.
6012
6013 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6014
6015         * remote.c (remote_follow_fork): Don't call "detach_inferior".
6016
6017 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
6018
6019         * dwarf2read.c (free_dwo_files): Add forward-declaration.
6020         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
6021         dwarf2_per_objfile_free here.
6022         (dwarf2_per_objfile_free): Remove.
6023         (_initialize_dwarf2_read): Don't register
6024         dwarf2_per_objfile_free as a registry cleanup.
6025
6026 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
6027
6028         Avoid compilation errors in MinGW native builds
6029
6030         The error is triggered by including python-internal.h, and the
6031         error message is:
6032
6033              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
6034                       from build-gnulib/import/math.h:27,
6035                       from d:/usr/Python26/include/pyport.h:235,
6036                       from d:/usr/Python26/include/Python.h:58,
6037                       from python/python-internal.h:94,
6038                       from python/py-arch.c:24:
6039              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
6040         using ::hypot;
6041                 ^~~~~
6042
6043         This happens because Python headers define 'hypot' to expand t
6044         '_hypot' in the Windows builds.
6045         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
6046         'hypoth'.  This avoids a compilation error.
6047
6048 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
6049
6050         * MAINTAINERS (Write After Approval): Fix ordering.
6051
6052 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
6053
6054         * MAINTAINERS (Write After Approval): Add Alan Hayward.
6055
6056 2018-01-26  Alan Modra  <amodra@gmail.com>
6057
6058         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
6059         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
6060         Remove nop.  Make const.  Comment.
6061         (powerpc32_plt_stub_so_2): New.
6062         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
6063         Correct count.  Update uses.
6064         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
6065         Move common code reading PLT entry word.  Correct
6066         powerpc32_plt_stub PLT address calculation.
6067         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
6068         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
6069         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
6070         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
6071         (ppc64_standard_linkage8): Likewise.
6072         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
6073         Correct insns description.
6074         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
6075
6076 2018-01-24  Pedro Alves  <palves@redhat.com>
6077
6078         GCC PR libstdc++/83906
6079         * gdbtypes.c (operator==(const dynamic_prop &,
6080         const dynamic_prop &)): New.
6081         (operator==(const range_bounds &, const range_bounds &)): New.
6082         (check_types_equal): Use them instead of memcmp.
6083         * gdbtypes.h (operator==(const dynamic_prop &,
6084         const dynamic_prop &)): Declare.
6085         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
6086         (operator==(const range_bounds &, const range_bounds &)): Declare.
6087         (operator!=(const range_bounds &, const range_bounds &)): Declare.
6088
6089 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6090
6091         * s390-linux-tdep.c (s390_record_address_mask)
6092         (s390_record_calc_disp_common, s390_record_calc_disp)
6093         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6094         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6095         (s390_process_record): Move to s390-tdep.c.
6096         (s390_linux_init_abi_any): Adjust.
6097         * s390-tdep.c (s390_record_address_mask)
6098         (s390_record_calc_disp_common, s390_record_calc_disp)
6099         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
6100         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
6101         (s390_process_record): Moved from s390-linux-tdep.c
6102         (s390_gdbarch_init): Adjust.
6103
6104 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6105
6106         * s390-linux-nat.c (s390-tdep.h): New include.
6107         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
6108         (HFILES_NO_SRCDIR): Add s390-tdep.h.
6109         (ALLDEPFILES): Add s390-tdep.c.
6110         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
6111         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
6112         * s390-tdep.h: ...this.  New file.
6113         * s390-linux-tdep.c (s390-tdep.h): New include.
6114         (_initialize_s390_tdep): Rename to...
6115         (_initialize_s390_linux_tdep): ...this and adjust.
6116         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
6117         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
6118         s390-tdep.h.
6119         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
6120         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
6121         (s390_is_partial_instruction, s390_software_single_step)
6122         (is_non_branch_ril, s390_displaced_step_copy_insn)
6123         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
6124         (s390_prologue_data, s390_addr, s390_store, s390_load)
6125         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
6126         (s390_register_call_saved, s390_guess_tracepoint_registers)
6127         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
6128         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
6129         (s390_pseudo_register_name, s390_pseudo_register_type)
6130         (s390_pseudo_register_read, s390_pseudo_register_write)
6131         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
6132         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
6133         (s390_addr_bits_remove, s390_address_class_type_flags)
6134         (s390_address_class_type_flags_to_name)
6135         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
6136         (s390_function_arg_float, s390_function_arg_vector)
6137         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
6138         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
6139         (s390_frame_align, s390_register_return_value, s390_return_value)
6140         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
6141         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
6142         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
6143         (s390_trad_frame_prev_register, s390_unwind_cache)
6144         (s390_prologue_frame_unwind_cache)
6145         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
6146         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
6147         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
6148         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
6149         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
6150         (s390_frame_base_address, s390_local_base_address)
6151         (s390_frame_base, s390_gcc_target_options)
6152         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
6153         (s390_validate_reg_range, s390_tdesc_valid)
6154         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
6155         * s390-tdep.c: ...this.  New file.
6156
6157 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6158
6159         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
6160         (s390_process_record, s390_gdbarch_tdep_alloc)
6161         (s390_linux_init_abi_any): Use/set new hook.
6162
6163 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6164
6165         * s390-linux-tdep.c (osabi.h): New include.
6166         (s390_linux_init_abi_31, s390_linux_init_abi_64)
6167         (s390_linux_init_abi_any): New functions.
6168         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
6169
6170 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6171
6172         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
6173         tdesc_has_registers check
6174
6175 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6176
6177         * s390-linux-tdep.c (s390_tdesc_valid): New function.
6178         (s390_validate_reg_range): New macro.
6179         (s390_gdbarch_init): Adjust.
6180
6181 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6182
6183         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
6184         (s390_gdbarch_tdep_alloc): Adjust.
6185         (s390_gdbarch_init): Adjust.
6186
6187 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6188
6189         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
6190         <have_tdb>: Change type to bool.
6191         (s390_gdbarch_tdep_alloc): Adjust.
6192         (s390_gdbarch_init): Adjust.
6193
6194 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6195
6196         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
6197         (gdbarch_tdep) <have_upper, have_vx>: New fields.
6198         (s390_gdbarch_tdep_alloc): New function.
6199         (s390_gdbarch_init): Allocate tdep at start and use its fields
6200         instead of separate variables.
6201
6202 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6203
6204         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
6205         when looking for cached gdbarch and add comment for remaining.
6206
6207 2018-01-22  Pedro Alves  <palves@redhat.com>
6208             Sergio Durigan Junior  <sergiodj@redhat.com>
6209
6210         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
6211         case.
6212
6213 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
6214
6215         * MAINTAINERS: Update my company e-mail address.
6216
6217 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6218
6219         * regcache.c (cooked_write_test): New function.
6220         (_initialize_regcache): Register the test.
6221
6222 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6223
6224         * ia64-tdep.c (ia64_pseudo_register_read): Call
6225         regcache->cooked_read instead of regcache_cooked_read_unsigned.
6226         * m32c-tdep.c (m32c_cat_read): Likewise.
6227         (m32c_r3r2r1r0_read): Likewise.
6228         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6229         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6230
6231 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6232
6233         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
6234         method raw_read instead of regcache_raw_read.
6235         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6236         * arm-tdep.c (arm_neon_quad_read): Likewise.
6237         * avr-tdep.c (avr_pseudo_register_read): Likewise.
6238         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6239         * frv-tdep.c (frv_pseudo_register_read): Likewise.
6240         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
6241         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6242         (i386_pseudo_register_read_into_value): Likewise.
6243         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6244         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6245         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6246         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
6247         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
6248         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
6249         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6250         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
6251         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
6252
6253 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6254
6255         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
6256         * configure.tgt: Remove target mt.
6257         * mt-tdep.c: Remove.
6258         * regcache.c (cooked_read_test): Remove the check for mt.
6259
6260 2018-01-22  Yao Qi  <yao.qi@linaro.org>
6261
6262         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
6263         instead of gdbarch_pseudo_register_read_value.
6264
6265 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
6266
6267         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
6268         language is Ada.
6269
6270 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
6271
6272         * linespec.c (create_sals_line_offset): Remove code that preserved
6273         the symtab_and_line's line number.
6274
6275 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6276
6277         * varobj.c (varobj_create): Don't set valid_block when creating a
6278         floating varobj.
6279
6280 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6281
6282         * varobj.c (varobj_create): Remove out of date comment.
6283
6284 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6285
6286         PR mi/20395
6287         * ada-exp.y (write_var_from_sym): Pass extra parameter when
6288         updating innermost block.
6289         * parse.c (innermost_block_tracker::update): Take extra type
6290         parameter, and check types match before updating innermost block.
6291         (write_dollar_variable): Update innermost block for registers.
6292         * parser-defs.h (enum innermost_block_tracker_type): New enum.
6293         (innermost_block_tracker::innermost_block_tracker): Initialise
6294         m_types member.
6295         (innermost_block_tracker::reset): Take type parameter.
6296         (innermost_block_tracker::update): Take type parameter, and pass
6297         type through as needed.
6298         (innermost_block_tracker::m_types): New member.
6299         * varobj.c (varobj_create): Pass type when reseting innermost
6300         block.
6301
6302 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6303
6304         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
6305         * ada-lang.c (resolve_subexp): Likewise.
6306         * breakpoint.c (set_breakpoint_condition) Likewise.
6307         (watch_command_1) Likewise.
6308         * c-exp.y (variable): Likewise.
6309         * d-exp.y (PrimaryExpression): Likewise.
6310         * f-exp.y (variable): Likewise.
6311         * go-exp.y (variable): Likewise.
6312         * m2-exp.y (variable): Likewise.
6313         * objfiles.c (objfile::~objfile): Likewise.
6314         * p-exp.y (variable): Likewise.
6315         * parse.c (innermost_block): Change type.
6316         * parser-defs.h (class innermost_block_tracker): New.
6317         (innermost_block): Change to innermost_block_tracker.
6318         * printcmd.c (display_command): Switch to innermost_block API.
6319         (do_one_display): Likewise.
6320         * rust-exp.y (do_one_display): Likewise.
6321         * symfile.c (clear_symtab_users): Likewise.
6322         * varobj.c (varobj_create): Switch to innermost_block API, replace
6323         use of innermost_block with block stored on varobj object.
6324
6325 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
6326
6327         * expression.h (innermost_block): Remove declaration.
6328         * varobj.c: Add 'parser-defs.h' include.
6329
6330 2018-01-19  Tom Tromey  <tom@tromey.com>
6331
6332         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
6333         symbols in the static and global blocks.
6334
6335 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
6336
6337         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
6338         gdb_ptrace.h, and move including gdb_wait.h ...
6339         * nat/linux-ptrace.h: ... to here.
6340
6341 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6342
6343         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
6344         inf_ptrace_detach_success.
6345         (inf_ptrace_detach_success): Add inferior parameter, use it
6346         instead of inferior_ptid, pass it to detach_inferior.
6347         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
6348         parameter.
6349         * inferior.c (detach_inferior): Add overload that takes an
6350         inferior object.
6351         * inferior.h (detach_inferior): Likewise.
6352         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
6353         use inferior_ptid, adjust call to inf_ptrace_detach_success.
6354         * linux-thread-db.c (thread_db_detach): Use inf parameter.
6355
6356 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6357
6358         * target.h (struct target_ops) <to_detach>: Add inferior
6359         parameter.
6360         (target_detach): Likewise.
6361         * target.c (dispose_inferior): Pass inferior down.
6362         (target_detach): Pass inferior down.  Assert that it is equal to
6363         the current inferior.
6364         * aix-thread.c (aix_thread_detach): Pass inferior down.
6365         * corefile.c (core_file_command): Pass current_inferior() down.
6366         * corelow.c (core_detach): Add inferior parameter.
6367         * darwin-nat.c (darwin_detach): Likewise.
6368         * gnu-nat.c (gnu_detach): Likewise.
6369         * inf-ptrace.c (inf_ptrace_detach): Likewise.
6370         * infcmd.c (detach_command): Pass current_inferior() down to
6371         target_detach.
6372         * infrun.c (follow_fork_inferior): Pass parent_inf to
6373         target_detach.
6374         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
6375         target_detach.
6376         * linux-nat.c (linux_nat_detach): Add inferior parameter.
6377         * linux-thread-db.c (thread_db_detach): Likewise.
6378         * nto-procfs.c (procfs_detach): Likewise.
6379         * procfs.c (procfs_detach): Likewise.
6380         * record.c (record_detach): Likewise.
6381         * record.h (struct inferior): Forward-declare.
6382         (record_detach): Add inferior parameter.
6383         * remote-sim.c (gdbsim_detach): Likewise.
6384         * remote.c (remote_detach_1): Likewise.
6385         (remote_detach): Likewise.
6386         (extended_remote_detach): Likewise.
6387         * sol-thread.c (sol_thread_detach): Likewise.
6388         * target-debug.h (target_debug_print_inferior_p): New macro.
6389         * target-delegates.c: Re-generate.
6390         * top.c (kill_or_detach): Pass inferior down to target_detach.
6391         * windows-nat.c (windows_detach): Add inferior parameter.
6392
6393 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
6394
6395         * target.h (struct target_ops) <to_detach>: Remove args
6396         parameter.
6397         (target_detach): Likewise.
6398         * target.c (dispose_inferior): Adjust.
6399         (target_detach): Remove args parameter, adjust.
6400         * aix-thread.c (aix_thread_detach): Adjust.
6401         * corefile.c (core_file_command): Adjust.
6402         * corelow.c (core_detach): Adjust.
6403         * darwin-nat.c (darwin_detach): Adjust.
6404         * gnu-nat.c (gnu_detach): Adjust.
6405         * inf-ptrace.c (inf_ptrace_detach): Adjust.
6406         * infcmd.c (detach_command): Adjust
6407         * infrun.c (follow_fork_inferior): Adjust.
6408         (handle_vfork_child_exec_or_exit): Adjust.
6409         * linux-fork.c (linux_fork_detach): Remove args parameter.
6410         * linux-fork.h (linux_fork_detach): Likewise.
6411         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
6412         * linux-thread-db.c (thread_db_detach): Likewise.
6413         * nto-procfs.c (procfs_detach): Likewise.
6414         * procfs.c (procfs_detach): Likewise.
6415         (do_detach): Remove signo parameter.
6416         * record.c (record_detach): Remove args parameter.
6417         * record.h (record_detach): Likewise.
6418         * remote-sim.c (gdbsim_detach): Likewise.
6419         * remote.c (remote_detach_1): Likewise.
6420         (remote_detach): Likewise.
6421         (extended_remote_detach): Likewise.
6422         * sol-thread.c (sol_thread_detach): Likewise.
6423         * target-delegates.c: Re-generate.
6424         * top.c (struct qt_args) <args>: Remove field.
6425         (kill_or_detach): Don't pass args.
6426         (quit_force): Don't set args.
6427         * windows-nat.c (windows_detach): Remove args parameter.
6428
6429 2018-01-19  Yao Qi  <yao.qi@linaro.org>
6430
6431         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
6432         (arm_linux_init_abi): Install it.
6433
6434 2018-01-19  Yao Qi  <yao.qi@linaro.org>
6435
6436         * osabi.c (gdb_osabi_names): Extend the regexp for
6437         arm-linux-gnueabihf.
6438
6439 2018-01-18  Yao Qi  <yao.qi@linaro.org>
6440
6441         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
6442         m_abbrevs.
6443         (abbrev_table::add_abbrev): Update.
6444         (abbrev_table::lookup_abbrev): Update.
6445
6446 2018-01-18  Yao Qi  <yao.qi@linaro.org>
6447
6448         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
6449
6450 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
6451
6452         * compile/compile.c (compile_to_object): Convert "triplet_rx"
6453         to "std::string".
6454
6455 2018-01-17  Tom Tromey  <tom@tromey.com>
6456
6457         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
6458
6459 2018-01-17  Tom Tromey  <tom@tromey.com>
6460
6461         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
6462         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
6463         (create_array_type_with_stride): Update.
6464         * dwarf2read.c (set_die_type): Update.
6465
6466 2018-01-17  Tom Tromey  <tom@tromey.com>
6467
6468         * dwarf2read.c (delayed_method_info): Remove typedef.
6469         (dwarf2_cu::method_info): Now a std::vector.
6470         (add_to_method_list): Update.
6471         (free_delayed_list): Remove.
6472         (compute_delayed_physnames): Update.
6473         (process_full_comp_unit, process_full_type_unit): Clear the method
6474         list.  Remove cleanups.
6475         (psymtab_include_file_name): Add name_holder parameter.  Use
6476         unique_xmalloc_ptr.
6477         (dwarf_decode_lines): Update.
6478
6479 2018-01-17  Tom Tromey  <tom@tromey.com>
6480             Simon Marchi  <simon.marchi@ericsson.com>
6481
6482         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
6483         (dwarf2_per_objfile::free_cached_comp_units)
6484         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6485         (init_cutu_and_read_dies_no_follow): Update.
6486         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
6487         (dwarf2_cu::~dwarf2_cu): New.
6488         (free_heap_comp_unit, free_stack_comp_unit): Remove.
6489         (age_cached_comp_units, free_one_cached_comp_unit): Update.
6490
6491 2018-01-17  Tom Tromey  <tom@tromey.com>
6492             Simon Marchi  <simon.marchi@ericsson.com>
6493
6494         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
6495         (struct die_reader_specs) <abbrev_table>: New member.
6496         (struct abbrev_table): Add constructor.
6497         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
6498         <abbrev_obstack>: Now an auto_obstack.
6499         (abbrev_table_up): New typedef.
6500         (init_cu_die_reader): Add abbrev_table parameter.
6501         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
6502         Add result_dwo_abbrev_table.
6503         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
6504         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
6505         Update.
6506         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
6507         parameter.
6508         (skip_children): Update.
6509         (abbrev_table::alloc_abbrev): Rename from
6510         abbrev_table_alloc_abbrev.
6511         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
6512         (abbrev_table::lookup_abbrev): Rename from
6513         abbrev_table_lookup_abbrev.
6514         (abbrev_table_read_table): Return abbrev_table_up.
6515         (abbrev_table_free, abbrev_table_free_cleanup)
6516         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
6517         (load_partial_dies): Update.
6518
6519 2018-01-17  Tom Tromey  <tom@tromey.com>
6520
6521         * dwarf2read.c (dwarf2_compute_name): Update comment.
6522         (read_func_scope, read_variable): Update.
6523         (new_symbol): Remove.
6524         (new_symbol_full): Rename to new_symbol.
6525
6526 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
6527
6528         PR gdb/16577
6529         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
6530         a warning instead of throwing an error, set section size to 0 and return
6531         NULL.
6532         * gdb_bfd.h (gdb_bfd_map_section): Update description.
6533
6534 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
6535
6536         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
6537         std::string.
6538         (linux_ptrace_attach_fail_reason_string): Likewise.
6539         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
6540         Likewise.
6541         (linux_ptrace_attach_fail_reason_string): Likewise.
6542         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
6543
6544 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
6545
6546         * linux-nat.c (linux_nat_attach): Remove xstrdup.
6547
6548 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
6549
6550         PR gdb/21559
6551         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6552         checking for fs_base/gs_base fields in struct user_regs_struct.
6553         * configure: Regenerate.
6554
6555 2018-01-17  Yao Qi  <yao.qi@linaro.org>
6556
6557         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
6558         function.
6559         (aarch64_linux_init_abi): Install it to gdbarch hook
6560         gcc_target_options.
6561
6562 2018-01-15  Pedro Alves  <palves@redhat.com>
6563
6564         * common/signals-state-save-restore.c
6565         (save_original_signals_state): Fix typos.
6566
6567 2017-01-12  Tom Tromey  <tom@tromey.com>
6568             Sergio Durigan Junior  <sergiodj@redhat.com>
6569
6570         * Makefile.in (install-only): Install gdb-add-index.
6571
6572 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
6573
6574         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
6575
6576 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6577
6578         * infrun.c (keep_going_pass_signal): Clear step-over info when
6579         insert_breakpoints fails.
6580
6581 2018-01-11  Pedro Alves  <palves@redhat.com>
6582
6583         PR gdb/22583
6584         * infrun.c (resume): Rename to ...
6585         (resume_1): ... this.
6586         (resume): Reimplement as wrapper around resume_1.
6587
6588 2018-01-11  Pedro Alves  <palves@redhat.com>
6589
6590         PR remote/22597
6591         * remote.c (remote_parse_stop_reply): Default to the last-set
6592         general thread instead of to 'magic_null_ptid'.
6593
6594 2018-01-10  Pedro Alves  <palves@redhat.com>
6595
6596         * language.h (language_get_symbol_name_matcher): Rename ...
6597         (get_symbol_name_matcher): ... this.
6598         * language.c (language_get_symbol_name_matcher): Ditto.
6599         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
6600         callers adjusted.
6601
6602 2018-01-10  Pedro Alves  <palves@redhat.com>
6603
6604         PR gdb/22670
6605         * dwarf2read.c
6606         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
6607         Adjust to use language_get_symbol_name_matcher instead of
6608         language_defn::la_get_symbol_name_matcher.
6609         * language.c (language_get_symbol_name_matcher): If in Ada mode
6610         and the lookup name is a verbatim match, return Ada's matcher.
6611         * language.h (language_get_symbol_name_matcher): Adjust comment.
6612         (ada_lookup_name_info::verbatim_p):: New method.
6613
6614 2018-01-10  Pedro Alves  <palves@redhat.com>
6615
6616         PR gdb/22670
6617         * ada-lang.c (ada_collect_symbol_completion_matches): If the
6618         minsym's language is language_auto or language_cplus, pass down
6619         language_ada instead.
6620         * symtab.c (compare_symbol_name): Don't frob symbol language here.
6621
6622 2018-01-10  Pedro Alves  <palves@redhat.com>
6623
6624         PR gdb/22670
6625         * minsyms.c (linkage_name_str): New function.
6626         (iterate_over_minimal_symbols): Use it.
6627
6628 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
6629
6630         * NEWS: Document that 'info proc' now works on FreeBSD.
6631
6632 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
6633
6634         * configure.ac: Check for kinfo_getfile in libutil.
6635         * configure: Regenerate.
6636         * config.in: Regenerate.
6637         * fbsd-nat.c: Include "fbsd-tdep.h".
6638         (fbsd_fetch_cmdline): New.
6639         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
6640         rather than calling error.
6641         (fbsd_info_proc): New.
6642         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
6643         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
6644         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
6645
6646 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
6647
6648         * fbsd-nat.c (struct free_deleter): Remove.
6649         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
6650
6651 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
6652
6653         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
6654         NULL for an empty pathname.
6655
6656 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
6657
6658         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
6659         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
6660         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6661         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6662         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
6663         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
6664         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
6665         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
6666         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
6667         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
6668         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
6669         (fbsd_core_fetch_timeval, fbsd_print_sigset)
6670         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
6671         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
6672         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
6673
6674 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
6675
6676         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
6677         (gnu_xfer_auxv): New function.
6678         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
6679         TARGET_OBJECT_AUXV.
6680
6681 2018-01-08  Yao Qi  <yao.qi@linaro.org>
6682             Simon Marchi  <simon.marchi@ericsson.com>
6683
6684         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
6685         common/selftest.c.
6686         (COMMON_OBS): Remove selftest.o.
6687         * configure.ac: Append selftest-arch.c and common/selftest.c to
6688         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
6689         * configure: Re-generated.
6690         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
6691         GDB_SELF_TEST.
6692         (maintenance_info_selftests): Likewise.
6693
6694 2018-01-08  Xavier Roirand  <roirand@adacore.com>
6695
6696         * ada-valprint.c (val_print_packed_array_elements): Use
6697         proper number of elements when printing an array indexed
6698         by an enumeration type.
6699
6700 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
6701
6702         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
6703         (dw2_get_file_names_reader): Adjust.
6704         (lookup_dwo_signatured_type): Adjust.
6705         (lookup_dwp_signatured_type): Adjust.
6706         (lookup_signatured_type): Adjust.
6707         (create_type_unit_group): Adjust.
6708         (get_type_unit_group): Adjust.
6709         (process_psymtab_comp_unit_reader): Adjust.
6710         (build_type_psymtabs_reader): Adjust.
6711         (scan_partial_symbols): Adjust.
6712         (add_partial_symbol): Adjust.
6713         (add_partial_subprogram): Adjust.
6714         (peek_die_abbrev): Adjust.
6715         (fixup_go_packaging): Adjust.
6716         (process_imported_unit_die): Adjust.
6717         (dwarf2_compute_name): Adjust.
6718         (dwarf2_physname): Adjust.
6719         (read_import_statement): Adjust.
6720         (handle_DW_AT_stmt_list): Adjust.
6721         (read_file_scope): Adjust.
6722         (read_func_scope): Adjust.
6723         (read_lexical_block_scope): Adjust.
6724         (read_call_site_scope): Adjust.
6725         (read_variable): Adjust.
6726         (dwarf2_rnglists_process): Adjust.
6727         (dwarf2_ranges_process): Adjust.
6728         (dwarf2_ranges_read): Adjust.
6729         (dwarf2_get_pc_bounds): Adjust.
6730         (dwarf2_record_block_ranges): Adjust.
6731         (dwarf2_add_field): Adjust.
6732         (dwarf2_add_member_fn): Adjust.
6733         (read_structure_type): Adjust.
6734         (process_structure_scope): Adjust.
6735         (read_enumeration_type): Adjust.
6736         (read_array_type): Adjust.
6737         (mark_common_block_symbol_computed): Adjust.
6738         (read_common_block): Adjust.
6739         (read_namespace_type): Adjust.
6740         (read_namespace): Adjust.
6741         (read_module_type): Adjust.
6742         (read_tag_pointer_type): Adjust.
6743         (read_tag_ptr_to_member_type): Adjust.
6744         (read_tag_string_type): Adjust.
6745         (read_subroutine_type): Adjust.
6746         (read_typedef): Adjust.
6747         (read_base_type): Adjust.
6748         (attr_to_dynamic_prop): Adjust.
6749         (read_subrange_type): Adjust.
6750         (read_unspecified_type): Adjust.
6751         (dwarf2_read_abbrevs): Adjust.
6752         (load_partial_dies): Adjust.
6753         (read_partial_die): Adjust.
6754         (find_partial_die): Adjust.
6755         (guess_partial_die_structure_name): Adjust.
6756         (fixup_partial_die): Adjust.
6757         (read_attribute_value): Adjust.
6758         (read_addr_index): Adjust.
6759         (read_addr_index_from_leb128): Adjust.
6760         (read_str_index): Adjust.
6761         (dwarf2_string_attr): Adjust.
6762         (get_debug_line_section): Adjust.
6763         (dwarf_decode_line_header): Adjust.
6764         (lnp_state_machine::check_line_address): Adjust.
6765         (dwarf_decode_lines_1): Adjust.
6766         (dwarf_decode_lines): Adjust.
6767         (dwarf2_start_symtab): Adjust.
6768         (var_decode_location): Adjust.
6769         (new_symbol_full): Adjust.
6770         (dwarf2_const_value_data): Adjust.
6771         (dwarf2_const_value_attr): Adjust.
6772         (dwarf2_const_value): Adjust.
6773         (die_type): Adjust.
6774         (die_containing_type): Adjust.
6775         (build_error_marker_type): Adjust.
6776         (lookup_die_type): Adjust.
6777         (guess_full_die_structure_name): Adjust.
6778         (anonymous_struct_prefix): Adjust.
6779         (determine_prefix): Adjust.
6780         (dwarf2_name): Adjust.
6781         (follow_die_ref_or_sig): Adjust.
6782         (follow_die_offset): Adjust.
6783         (follow_die_ref): Adjust.
6784         (follow_die_sig_1): Adjust.
6785         (follow_die_sig): Adjust.
6786         (get_signatured_type): Adjust.
6787         (get_DW_AT_signature_type): Adjust.
6788         (decode_locdesc): Adjust.
6789         (dwarf_decode_macros): Adjust.
6790         (cu_debug_loc_section): Adjust.
6791         (fill_in_loclist_baton): Adjust.
6792         (dwarf2_symbol_mark_computed): Adjust.
6793         (init_one_comp_unit): Don't assign
6794         dwarf2_cu::dwarf2_per_objfile.
6795         (set_die_type): Adjust.
6796
6797 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
6798
6799         * dwarf2read.c (struct mapped_debug_names): Add constructor.
6800         <dwarf2_per_objfile>: New field.
6801         (dwarf2_per_objfile): Remove global.
6802         (get_dwarf2_per_objfile): New function.
6803         (set_dwarf2_per_objfile): New function.
6804         (dwarf2_build_psymtabs_hard): Change objfile parameter to
6805         dwarf2_per_objfile.
6806         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6807         (read_abbrev_offset): Likewise.
6808         (read_indirect_string): Likewise.
6809         (read_indirect_line_string): Likewise.
6810         (read_indirect_string_at_offset): Likewise.
6811         (read_indirect_string_from_dwz): Likewise.
6812         (dwarf2_find_containing_comp_unit): Change objfile parameter to
6813         dwarf2_per_objfile.
6814         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6815         (create_all_comp_units): Change objfile parameter to
6816         dwarf2_per_objfile.
6817         (create_all_type_units): Likewise.
6818         (process_queue): Add dwarf2_per_objfile parameter.
6819         (read_and_check_comp_unit_head): Likewise.
6820         (lookup_dwo_unit_in_dwp): Likewise.
6821         (get_dwp_file): Likewise.
6822         (process_cu_includes): Likewise.
6823         (struct free_dwo_file_cleanup_data): New struct.
6824         (dwarf2_has_info): Use get_dwarf2_per_objfile and
6825         set_dwarf2_per_objfile.
6826         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
6827         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
6828         context, adjust calls.
6829         (dw2_instantiate_symtab): Likewise.
6830         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
6831         (dw2_get_cu): Likewise.
6832         (create_cu_from_index_list): Change objfile parameter to
6833         dwarf2_per_objfile.
6834         (create_cus_from_index_list): Get dwarf2_per_objfile from
6835         context, adjust calls.
6836         (create_cus_from_index): Likewise.
6837         (create_signatured_type_table_from_index): Change objfile
6838         parameter to dwarf2_per_objfile.
6839         (create_signatured_type_table_from_debug_names): Change objfile
6840         parameter to dwarf2_per_objfile.
6841         (create_addrmap_from_index): Likewise.
6842         (create_addrmap_from_aranges): Likewise.
6843         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
6844         (dw2_setup): Remove.
6845         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
6846         context.
6847         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
6848         get_dwarf2_per_objfile.
6849         (dw2_forget_cached_source_info): Likewise.
6850         (dw2_map_symtabs_matching_filename): Likewise.
6851         (struct dw2_symtab_iterator) <index>: Remove.
6852         <dwarf2_per_objfile>: New field.
6853         (dw2_symtab_iter_init): Replace index parameter with
6854         dwarf2_per_objfile.
6855         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
6856         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
6857         (dw2_print_stats): Likewise.
6858         (dw2_dump): Likewise.
6859         (dw2_expand_symtabs_for_function): Likewise.
6860         (dw2_expand_all_symtabs): Likewise.
6861         (dw2_expand_symtabs_with_fullname): Likewise.
6862         (dw2_expand_marked_cus): Replace index and objfile parameters
6863         with dwarf2_per_objfile.
6864         (dw_expand_symtabs_matching_file_matcher): Add
6865         dwarf2_per_objfile parameter and adjust calls.
6866         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6867         adjust calls.
6868         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6869         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6870         adjust calls.
6871         (create_cus_from_debug_names_list): Replace objfile parameter
6872         with dwarf2_per_objfile and adjust calls.
6873         (create_cus_from_debug_names): Likewise.
6874         (dwarf2_read_debug_names): Likewise.
6875         (mapped_debug_names::namei_to_name): Adjust call.
6876         (dw2_debug_names_iterator::next): Likewise.
6877         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6878         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6879         (dw2_debug_names_dump): Likewise.
6880         (dw2_debug_names_expand_symtabs_for_function): Likewise.
6881         (dw2_debug_names_expand_symtabs_matching): Likewise.
6882         (dwarf2_initialize_objfile): Likewise.
6883         (dwarf2_build_psymtabs): Likewise.
6884         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6885         this_cu.
6886         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6887         (read_and_check_comp_unit_head): Likewise.
6888         (read_abbrev_offset): Likewise.
6889         (create_debug_type_hash_table): Likewise.
6890         (create_debug_types_hash_table): Likewise.
6891         (create_all_type_units): Replace objfile parameter with
6892         dwarf2_per_objfile.
6893         (add_type_unit): Add dwarf2_per_objfile parameter.
6894         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6895         with dwarf2_per_objfile.
6896         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6897         (lookup_dwp_signatured_type): Likewise.
6898         (lookup_signatured_type): Likewise.
6899         (read_cutu_die_from_dwo): Likewise.
6900         (init_tu_and_read_dwo_dies): Likewise.
6901         (init_cutu_and_read_dies): Likewise.
6902         (init_cutu_and_read_dies_no_follow): Likewise.
6903         (allocate_type_unit_groups_table): Add objfile parameter.
6904         (create_type_unit_group): Use dwarf2_per_objfile from cu.
6905         (get_type_unit_group): Likewise.
6906         (process_psymtab_comp_unit): Update call.
6907         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6908         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6909         (print_tu_stats): Likewise.
6910         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6911         in void* parameter.
6912         (build_type_psymtabs): Change objfile parameter to
6913         dwarf2_per_objfile.
6914         (process_skeletonless_type_unit): Use dwarf2_per_objfile
6915         passed in void* parameter.
6916         (process_skeletonless_type_units): Change objfile parameter to
6917         dwarf2_per_objfile.
6918         (set_partial_user): Likewise.
6919         (dwarf2_build_psymtabs_hard): Likewise.
6920         (read_comp_units_from_section): Likewise.
6921         (create_all_comp_units): Likewise.
6922         (scan_partial_symbols): Update calls.
6923         (add_partial_symbol): Likewise.
6924         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6925         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6926         (process_queue): Add dwarf2_per_objfile parameter.
6927         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6928         (compute_compunit_symtab_includes): Likewise.
6929         (process_cu_includes): Add dwarf2_per_objfile parameter.
6930         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6931         (process_full_type_unit): Likewise.
6932         (process_imported_unit_die): Update call.
6933         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6934         (read_file_scope): Likewise.
6935         (allocate_dwo_file_hash_table): Add objfile parameter.
6936         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6937         (create_cus_hash_table): Likewise.
6938         (create_dwp_hash_table): Likewise.
6939         (create_dwo_unit_in_dwp_v1): Likewise.
6940         (create_dwp_v2_section): Likewise.
6941         (create_dwo_unit_in_dwp_v2): Likewise.
6942         (lookup_dwo_unit_in_dwp): Likewise.
6943         (try_open_dwop_file): Likewise.
6944         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6945         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6946         cleanup to include a reference to dwarf2_per_objfile.
6947         (open_dwp_file): Add dwarf2_per_objfile parameter.
6948         (open_and_init_dwp_file): Likewise.
6949         (get_dwp_file): Likewise.
6950         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6951         (queue_and_load_all_dwo_tus): Update call.
6952         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6953         data.
6954         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6955         (dwarf2_ranges_process): Likewise.
6956         (dwarf2_get_pc_bounds): Likewise.
6957         (mark_common_block_symbol_computed): Likewise.
6958         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6959         (dwarf2_read_abbrevs): Update call.
6960         (read_partial_die): Use dwarf2_per_objfile from cu.
6961         (find_partial_die): Likewise.
6962         (fixup_partial_die): Likewise.
6963         (read_attribute_value): Likewise.
6964         (read_indirect_string_at_offset_from): Add objfile parameter.
6965         (read_indirect_string_at_offset): Add dwarf2_per_objfile
6966         parameter.
6967         (read_indirect_string_from_dwz): Add objfile parameter.
6968         (read_indirect_string): Add objfile parameter.
6969         (read_addr_index_1): Add dwarf2_per_objfile parameter.
6970         (read_addr_index): Use dwarf2_per_objfile from cu.
6971         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6972         call dw2_setup.
6973         (read_str_index): Use dwarf2_per_objfile from cu.
6974         (get_debug_line_section): Likewise.
6975         (read_formatted_entries): Add dwarf2_per_objfile parameter.
6976         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6977         (new_symbol_full): Use dwarf2_per_objfile from cu.
6978         (build_error_marker_type): Likewise.
6979         (lookup_die_type): Likewise.
6980         (determine_prefix): Likewise.
6981         (follow_die_offset): Likewise.
6982         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6983         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6984         (dwarf2_fetch_die_type_sect_off): Likewise.
6985         (dwarf2_get_die_type): Likewise.
6986         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6987         (get_signatured_type): Likewise.
6988         (get_DW_AT_signature_type): Likewise.
6989         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6990         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6991         (cu_debug_loc_section): Likewise.
6992         (fill_in_loclist_baton): Likewise.
6993         (dwarf2_symbol_mark_computed): Likewise.
6994         (dwarf2_find_containing_comp_unit): Change objfile parameter to
6995         dwarf2_per_objfile.
6996         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6997         parameter.
6998         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6999         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
7000         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
7001         (set_die_type): Use dwarf2_free_objfile from cu.
7002         (get_die_type_at_offset): Likewise.
7003         (dwarf2_per_objfile_free): Don't assign global variable.
7004         (debug_names) <constructor>: Add dwarf2_per_objfile
7005         parameter, update m_debugstrlookup construction.
7006         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
7007         parameter.
7008         <m_dwarf2_per_objfile>: New field.
7009         <lookup>: Use m_dwarf2_per_objfile.
7010         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
7011         (psyms_seen_size): Likewise.
7012         (write_gdbindex): Replace objfile parameter with
7013         dwarf2_per_objfile.
7014         (write_debug_names): Likewise.
7015         (write_psymtabs_to_index): Likewise.
7016         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
7017         calls.
7018
7019 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
7020
7021         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
7022         <dwarf2_per_objfile>: New field.
7023         (struct dwarf2_per_cu_data) <objfile>: Remove.
7024         <dwarf2_per_objfile>: New field.
7025         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
7026         of objfile.
7027         (create_signatured_type_table_from_index): Likewise.
7028         (create_debug_type_hash_table): Likewise.
7029         (fill_in_sig_entry_from_dwo_entry): Likewise.
7030         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
7031         (create_type_unit_group): Assign dwarf2_per_objfile instead of
7032         objfile.
7033         (create_partial_symtab): Access objfile through
7034         dwarf2_per_objfile.
7035         (process_psymtab_comp_unit_reader): Likewise.
7036         (read_comp_units_from_section): Likewise.
7037         (scan_partial_symbols): Likewise.
7038         (add_partial_symbol): Likewise.
7039         (add_partial_subprogram): Likewise.
7040         (peek_die_abbrev): Likewise.
7041         (fixup_go_packaging): Likewise.
7042         (process_full_comp_unit): Likewise.
7043         (process_full_type_unit): Likewise.
7044         (process_imported_unit_die): Likewise.
7045         (dwarf2_compute_name): Likewise.
7046         (dwarf2_physname): Likewise.
7047         (read_import_statement): Likewise.
7048         (create_cus_hash_table): Assign dwarf2_physname instead of
7049         objfile.
7050         (read_func_scope): Access objfile through dwarf2_per_objfile.
7051         (read_lexical_block_scope): Likewise.
7052         (read_call_site_scope): Likewise.
7053         (read_variable): Likewise.
7054         (dwarf2_rnglists_process): Likewise.
7055         (dwarf2_ranges_process): Likewise.
7056         (dwarf2_ranges_read): Likewise.
7057         (dwarf2_record_block_ranges): Likewise.
7058         (dwarf2_add_field): Likewise.
7059         (dwarf2_add_member_fn): Likewise.
7060         (read_structure_type): Likewise.
7061         (process_structure_scope): Likewise.
7062         (read_enumeration_type): Likewise.
7063         (read_array_type): Likewise.
7064         (read_common_block): Likewise.
7065         (read_namespace_type): Likewise.
7066         (read_namespace): Likewise.
7067         (read_module_type): Likewise.
7068         (read_tag_pointer_type): Likewise.
7069         (read_tag_ptr_to_member_type): Likewise.
7070         (read_tag_string_type): Likewise.
7071         (read_subroutine_type): Likewise.
7072         (read_typedef): Likewise.
7073         (read_base_type): Likewise.
7074         (attr_to_dynamic_prop): Likewise.
7075         (read_subrange_type): Likewise.
7076         (read_unspecified_type): Likewise.
7077         (load_partial_dies): Likewise.
7078         (read_partial_die): Likewise.
7079         (find_partial_die): Likewise.
7080         (guess_partial_die_structure_name): Likewise.
7081         (fixup_partial_die): Likewise.
7082         (read_attribute_value): Likewise.
7083         (read_addr_index_from_leb128): Likewise.
7084         (dwarf2_read_addr_index): Likewise.
7085         (dwarf2_string_attr): Likewise.
7086         (lnp_state_machine::check_line_address): Likewise.
7087         (dwarf_decode_lines_1): Likewise.
7088         (dwarf_decode_lines): Likewise.
7089         (dwarf2_start_symtab): Likewise.
7090         (var_decode_location): Likewise.
7091         (new_symbol_full): Likewise.
7092         (dwarf2_const_value_data): Likewise.
7093         (dwarf2_const_value_attr): Likewise.
7094         (dwarf2_const_value): Likewise.
7095         (die_type): Likewise.
7096         (die_containing_type): Likewise.
7097         (lookup_die_type): Likewise.
7098         (guess_full_die_structure_name): Likewise.
7099         (anonymous_struct_prefix): Likewise.
7100         (dwarf2_name): Likewise.
7101         (follow_die_ref_or_sig): Likewise.
7102         (follow_die_offset): Likewise.
7103         (follow_die_ref): Likewise.
7104         (dwarf2_fetch_die_loc_sect_off): Likewise.
7105         (dwarf2_fetch_constant_bytes): Likewise.
7106         (dwarf2_fetch_die_type_sect_off): Likewise.
7107         (dwarf2_get_die_type): Likewise.
7108         (follow_die_sig): Likewise.
7109         (decode_locdesc): Likewise.
7110         (dwarf2_per_cu_objfile): Likewise.
7111         (dwarf2_per_cu_text_offset): Likewise.
7112         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
7113         objfile.
7114         (set_die_type): Access objfile through
7115         dwarf2_per_objfile.
7116
7117 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
7118
7119         * valprint.c (converted_character_d): Remove typedef.
7120         (DEF_VEC_O (converted_character_d)): Remove.
7121         (count_next_character): Use std::vector.
7122         (print_converted_chars_to_obstack): Likewise.
7123         (generic_printstr): Likewise.
7124
7125 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7126
7127         * xml-support.h (struct gdb_xml_value): Add constructor.
7128         <value>: Change type to unique_xmalloc_ptr.
7129         (gdb_xml_value_s): Remove typedef.
7130         (DEF_VEC_O (gdb_xml_value_s)): Remove.
7131         (gdb_xml_element_start_handler): Change parameter type to
7132         std::vector.
7133         (xml_find_attribute): Likewise.
7134         * xml-support.c (xml_find_attribute): Change parameter type to
7135         std::vector and adjust.
7136         (gdb_xml_values_cleanup): Remove.
7137         (gdb_xml_parser::start_element): Adjust to std::vector.
7138         (xinclude_start_include): Change paraeter type to std::vector
7139         and adjust.
7140         * btrace.c (check_xml_btrace_version): Likewise.
7141         (parse_xml_btrace_block): Likewise.
7142         (parse_xml_btrace_pt_config_cpu): Likewise.
7143         (parse_xml_btrace_pt): Likewise.
7144         (parse_xml_btrace_conf_bts): Likewise.
7145         (parse_xml_btrace_conf_pt): Likewise.
7146         * memory-map.c (memory_map_start_memory): Likewise.
7147         (memory_map_start_property): Likewise.
7148         * osdata.c (osdata_start_osdata): Likewise.
7149         (osdata_start_item): Likewise.
7150         (osdata_start_column): Likewise.
7151         * remote.c (start_thread): Likewise.
7152         * solib-aix.c (library_list_start_library): Likewise.
7153         (library_list_start_list): Likewise.
7154         * solib-svr4.c (library_list_start_library): Likewise.
7155         (svr4_library_list_start_list): Likewise.
7156         * solib-target.c (library_list_start_segment): Likewise.
7157         (library_list_start_section): Likewise.
7158         (library_list_start_library): Likewise.
7159         (library_list_start_list): Likewise.
7160         * tracepoint.c (traceframe_info_start_memory): Likewise.
7161         (traceframe_info_start_tvar): Likewise.
7162         * xml-syscall.c (syscall_start_syscall): Likewise.
7163         * xml-tdesc.c (tdesc_start_target): Likewise.
7164         (tdesc_start_feature): Likewise.
7165         (tdesc_start_reg): Likewise.
7166         (tdesc_start_union): Likewise.
7167         (tdesc_start_struct): Likewise.
7168         (tdesc_start_flags): Likewise.
7169         (tdesc_start_enum): Likewise.
7170         (tdesc_start_field): Likewise.
7171         (tdesc_start_enum_value): Likewise.
7172         (tdesc_start_vector): Likewise.
7173
7174 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7175
7176         * extension.h (struct xmethod_worker) <clone>: Remove.
7177         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
7178         Remove.
7179         (python_xmethod_worker::clone): Remove.
7180         * valops.c (find_overload_match): Use std::move instead of
7181         clone.
7182
7183 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
7184
7185         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
7186         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
7187         <free_xmethod_worker_data>: Remove.
7188         <get_matching_xmethod_workers>: Chance VEC to std::vector.
7189         <get_xmethod_arg_types>: Remove.
7190         <get_xmethod_result_type>: Remove.
7191         <invoke_xmethod>: Remove.
7192         * extension.c (new_xmethod_worker): Remove.
7193         (clone_xmethod_worker): Remove.
7194         (get_matching_xmethod_workers): Return void, pass std::vector by
7195         pointer.
7196         (get_xmethod_arg_types): Rename to...
7197         (xmethod_worker::get_arg_types): ... this, and adjust.
7198         (get_xmethod_result_type): Rename to...
7199         (xmethod_worker::get_result_type): ... this, and adjust.
7200         (invoke_xmethod): Remove.
7201         (free_xmethod_worker): Remove.
7202         (free_xmethod_worker_vec): Remove.
7203         * extension.h (enum ext_lang_rc): Move here from
7204         extension-priv.h.
7205         (struct xmethod_worker): Add constructor and destructor.
7206         <data>: Remove.
7207         <value>: Remove.
7208         <invoke, clone, do_get_result_type, do_get_arg_types>: New
7209         virtual pure methods.
7210         <get_arg_types, get_result_type>: New methods.
7211         (xmethod_worker_ptr): Remove typedef.
7212         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
7213         (xmethod_worker_vec): Remove typedef.
7214         (xmethod_worker_up): New typedef.
7215         (invoke_xmethod): Remove.
7216         (clone_xmethod_worker): Remove.
7217         (free_xmethod_worker): Remove.
7218         (free_xmethod_worker_vec): Remove.
7219         (get_xmethod_arg_types): Remove.
7220         (get_xmethod_result_type): Remove.
7221         * valops.c (find_method_list): Use std::vector, don't use
7222         intermediate vector.
7223         (value_find_oload_method_list): Use std::vector.
7224         (find_overload_match): Use std::vector.
7225         (find_oload_champ): Use std::vector.
7226         * value.c (value_free): Use operator delete.
7227         (value_of_xmethod): Rename to...
7228         (value_from_xmethod): ... this.  Don't assign
7229         xmethod_worker::value, take rvalue-reference.
7230         (result_type_of_xmethod): Adjust.
7231         (call_xmethod): Adjust.
7232         * value.h: Include extension.h.
7233         (struct xmethod_worker): Don't forward-declare.
7234         (value_of_xmethod): Rename to...
7235         (value_from_xmethod): ... this, take rvalue-reference.
7236         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
7237         (struct python_xmethod_worker): ... this, add constructor and
7238         destructor.
7239         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
7240         (gdbpy_free_xmethod_worker_data): Rename to...
7241         (python_xmethod_worker::~python_xmethod_worker): ... this and
7242         adjust.
7243         (gdbpy_clone_xmethod_worker_data): Rename to...
7244         (python_xmethod_worker::clone): ... this and adjust.
7245         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
7246         temporary vector.
7247         (gdbpy_get_xmethod_arg_types): Rename to...
7248         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
7249         (gdbpy_get_xmethod_result_type): Rename to...
7250         (python_xmethod_worker::do_get_result_type): ... this and
7251         adjust.
7252         (gdbpy_invoke_xmethod): Rename to...
7253         (python_xmethod_worker::invoke): ... this and adjust.
7254         (new_python_xmethod_worker): Rename to...
7255         (python_xmethod_worker::python_xmethod_worker): ... this and
7256         adjust.
7257         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
7258         Remove.
7259         (gdbpy_free_xmethod_worker_data): Remove.
7260         (gdbpy_get_matching_xmethod_workers): Use std::vector.
7261         (gdbpy_get_xmethod_arg_types): Remove.
7262         (gdbpy_get_xmethod_result_type): Remove.
7263         (gdbpy_invoke_xmethod): Remove.
7264         * python/python.c (python_extension_ops): Remove obsolete
7265         callbacks.
7266
7267 2018-01-05  Pedro Alves  <palves@redhat.com>
7268
7269         PR gdb/18653
7270         * common/signals-state-save-restore.c
7271         (save_original_signals_state): New parameter 'quiet'.  Warn if we
7272         find a custom handler preinstalled, instead of internal erroring.
7273         But only warn if !quiet.
7274         * common/signals-state-save-restore.h
7275         (save_original_signals_state): New parameter 'quiet'.
7276         * main.c (captured_main_1): Move save_original_signals_state call
7277         after option handling, and pass QUIET.
7278
7279 2018-01-05  Pedro Alves  <palves@redhat.com>
7280
7281         * spu-tdep.c (spu_catch_start): Pass
7282         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
7283
7284 2018-01-05  Pedro Alves  <palves@redhat.com>
7285
7286         PR gdb/22670
7287         * ada-lang.c (literal_symbol_name_matcher): New function.
7288         (ada_get_symbol_name_matcher): Use it for
7289         symbol_name_match_type::SEARCH_NAME.
7290         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
7291         it down instead of assuming symbol_name_match_type::FULL.
7292         * block.h (block_lookup_symbol): New parameter 'match_type'.
7293         * c-valprint.c (print_unpacked_pointer): Use
7294         lookup_symbol_search_name instead of lookup_symbol.
7295         * compile/compile-object-load.c (get_out_value_type): Pass down
7296         symbol_name_match_type::SEARCH_NAME.
7297         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
7298         symbol_name_match_type::FULL.
7299         * cp-support.c (cp_get_symbol_name_matcher): Handle
7300         symbol_name_match_type::SEARCH_NAME.
7301         * infrun.c (insert_exception_resume_breakpoint): Use
7302         lookup_symbol_search_name.
7303         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
7304         * psymtab.c (maintenance_check_psymtabs): Use
7305         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
7306         * stack.c (print_frame_args): Use lookup_symbol_search_name and
7307         SYMBOL_SEARCH_NAME.
7308         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
7309         if symbol_name_match_type::SEARCH_NAME.
7310         (lookup_symbol_in_language): Pass down
7311         symbol_name_match_type::FULL.
7312         (lookup_symbol_search_name): New.
7313         (lookup_language_this): Pass down
7314         symbol_name_match_type::SEARCH_NAME.
7315         (lookup_symbol_aux, lookup_local_symbol): New parameter
7316         'match_type'.  Pass it down.
7317         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
7318         (lookup_symbol_search_name): New declaration.
7319         (lookup_symbol_in_block): New 'match_type' parameter.
7320
7321 2018-01-05  Pedro Alves  <palves@redhat.com>
7322
7323         PR gdb/22670
7324         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
7325         ada_lookup_symbol.
7326         (ada_lookup_symbol): Reimplement in terms of
7327         ada_lookup_symbol_list, bits factored out from
7328         ada_lookup_encoded_symbol.
7329
7330 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7331
7332         * ada-exp.y (write_object_renaming): When subscripting an array
7333         using a symbol as the index, pass the block in call to
7334         ada_lookup_encoded_symbol when looking that symbol up.
7335
7336 2018-01-05  Jerome Guitton  <guitton@adacore.com>
7337
7338         * ada-lang.c (ada_array_length): Use ada_index_type instead of
7339         TYPE_INDEX_TYPE.
7340
7341 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7342
7343         * ada-lang.c (ada_to_fixed_value_create): Add handling of
7344         the case where VALUE_LVAL (val0) is not lval_memory.
7345
7346 2018-01-05  Xavier Roirand  <roirand@adacore.com>
7347
7348         * ada-valprint.c (print_optional_low_bound): Handle
7349         character-indexed array printing like boolean-indexed array
7350         printing.
7351
7352 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7353
7354         * NEWS: Create a new section for the next release branch.
7355         Rename the section of the current branch, now that it has
7356         been cut.
7357
7358 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
7359
7360         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
7361         * version.in: Bump version to 8.1.50.DATE-git.
7362
7363 2018-01-03  Xavier Roirand  <roirand@adacore.com>
7364
7365         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
7366         Add field.
7367         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
7368         Add field.
7369         (default_exception_support_info) <catch_handlers_sym>: Add field.
7370         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
7371         (ada_exception_name_addr_1): Add "catch handlers" handling.
7372         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
7373         Update all callers.
7374         (create_excep_cond_exprs) <ex>: Add parameter.
7375         (re_set_exception): Update create_excep_cond_exprs call.
7376         (print_it_exception, print_one_exception, print_mention_exception)
7377         (print_recreate_exception): Add "catch handler" handling.
7378         (allocate_location_catch_handlers, re_set_catch_handlers)
7379         (check_status_catch_handlers, print_it_catch_handlers)
7380         (print_one_catch_handlers, print_mention_catch_handlers)
7381         (print_recreate_catch_handlers): New function.
7382         (catch_handlers_breakpoint_ops): New variable.
7383         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
7384         Add parameter.  Add "catch handler" handling.
7385         (ada_exception_sym_name, ada_exception_breakpoint_ops):
7386         Add "catch handler" handling.
7387         (ada_exception_catchpoint_cond_string): Add "catch handler"
7388         handling.
7389         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
7390         call.
7391         (catch_ada_handlers_command): New function.
7392         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
7393         operations structure.
7394         (_initialize_ada_language): Add "catch handlers" command entry.
7395         * NEWS: Document "catch handlers" feature.
7396
7397 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7398
7399         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
7400         account when creating the array type of the slice.
7401         (ada_value_slice): Likewise.
7402
7403 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7404
7405         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
7406         New enum value.
7407         (create_array_type_with_stride): Add byte_stride_prop parameter.
7408         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
7409         New parameter.  Update all callers in this file.
7410         (array_type_has_dynamic_stride): New function.
7411         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
7412         of arrays with dynamic byte strides.
7413         * dwarf2read.c (read_array_type): Add support for dynamic
7414         DW_AT_byte_stride attributes.
7415
7416 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
7417
7418         * dwarf2read.c (read_unspecified_type): Treat
7419         DW_TAG_enumeration_type DIEs from Ada units as stubs.
7420
7421 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7422
7423         Update copyright year range in all GDB files.
7424
7425 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7426
7427         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
7428         and gdb/testsuite/gdb.base/step-line.c.
7429
7430 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7431
7432         * copyright.py (main): Dump the contents of
7433         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
7434         even if BY_HAND is empty.
7435
7436 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7437
7438         * top.c (print_gdb_version): Update Copyright year in version
7439         message.
7440
7441 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
7442
7443         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
7444
7445 For older changes see ChangeLog-2017.
7446 \f
7447 Local Variables:
7448 mode: change-log
7449 left-margin: 8
7450 fill-column: 74
7451 version-control: never
7452 coding: utf-8
7453 End: