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