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