1 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4 parameter in call to amd64_target_description.
5 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7 (amd64fbsd_init_abi): Likewise.
8 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
9 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
13 2018-06-29 Pedro Alves <palves@redhat.com>
15 * gdb/amd64-tdep.h (amd64_create_target_description): Add
17 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
18 (_initialize_amd64_tdep): Update call to
19 amd64_create_target_description.
20 (amd64_target_description): Add "segments" parameter. Adjust
21 the implementation to use it.
22 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
23 call to amd64_create_target_description.
24 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
25 * gdb/arch/amd64.h (amd64_create_target_description): Add
27 * gdb/arch/amd64.c (amd64_create_target_description): Add
28 "segments" parameter. Call create_feature_i386_64bit_segments
29 only if SEGMENTS is true.
30 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
31 call to amd64_create_target_description.
33 2018-06-29 Pedro Alves <palves@redhat.com>
35 * thread.c (thread_target_id_str): New, factored out from ...
36 (print_thread_info_1): ... here. Use it to compute the max
37 "Target Id" column width.
39 2018-06-29 Pedro Alves <palves@redhat.com>
41 * remote.c (remote_target::extra_thread_info): Delete
42 'display_buf' and 'n' locals. from the cache, regardless of
43 packet mechanims is in use. Use cache for qThreadExtra and qP
46 2018-06-29 Pedro Alves <palves@redhat.com>
48 * blockframe.c (find_pc_sect_containing_function): New function.
49 * breakpoint.c (print_breakpoint_location): Don't call
50 find_pc_sect_function.
51 * linespec.c (create_sals_line_offset): Record the location's
53 * linespec.c (convert_address_location_to_sals): Fill in sal's
54 symbol with find_pc_sect_containing_function.
55 * symtab.c (find_function_start_sal): Rename to ...
56 (find_function_start_sal_1): ... this.
57 (find_function_start_sal): Reimplement as wrapper around
58 find_function_start_sal_1, and use
59 find_pc_sect_containing_function to fill in the sal's symbol.
60 (find_function_start_sal(symbol*, bool)): Adjust.
61 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
63 (find_pc_sect_containing_function): Declare.
65 2018-06-29 Pedro Alves <palves@redhat.com>
67 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
68 true if the the location has no symbol.
70 2018-06-28 Tom Tromey <tom@tromey.com>
72 * NEWS: Mention --enable-codesign.
73 * silent-rules.mk (ECHO_SIGN): New variable.
74 * configure.ac: Add --enable-codesign.
76 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
77 (gdb$(EXEEXT)): Optionally invoke codesign.
79 2018-06-28 Pedro Alves <palves@redhat.com>
81 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
83 (switch_to_thread_no_regs): Adjust comment.
84 * infcmd.c (stop_pc): Delete.
85 (post_create_inferior, info_program_command): Replace references
86 to stop_pc with references to thread_info->suspend.stop_pc.
87 * inferior.h (stop_pc): Delete declaration.
88 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
89 (handle_inferior_event_1, handle_signal_stop)
90 (process_event_stop_test, keep_going_stepped_thread)
91 (handle_step_into_function, handle_step_into_function_backward)
92 (print_stop_location): Replace references to stop_pc with
93 references to thread_info->suspend.stop_pc.
94 (struct infcall_suspend_state) <stop_pc>: Delete field.
95 (save_infcall_suspend_state, restore_infcall_suspend_state):
96 Remove references to inf_stat->stop_pc.
97 * linux-fork.c (fork_load_infrun_state): Likewise.
98 * record-btrace.c (record_btrace_set_replay): Likewise.
99 * record-full.c (record_full_goto_entry): Likewise.
100 * remote.c (print_one_stopped_thread): Likewise.
101 * target.c (target_resume): Extend comment.
102 * thread.c (set_executing_thread): New.
103 (set_executing): Use it.
104 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
105 Remove references to stop_pc.
107 2018-06-28 Pedro Alves <palves@redhat.com>
109 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
110 Moving fetching stop_pc until after ecs->event_thread is refreshed.
112 2018-06-28 Tom Tromey <tom@tromey.com>
114 * coffread.c (coff_symfile_finish): Update.
115 * xcoffread.c (xcoff_symfile_finish): Update.
116 * elfread.c (elf_symfile_finish): Update.
117 * symfile.h (dwarf2_free_objfile): Don't declare.
118 * dwarf2read.c (_initialize_dwarf2_read): Use
119 register_objfile_data_with_cleanup.
120 (dwarf2_free_objfile): Now static. Change signature.
122 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
124 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
125 option "-o" to add-symbol-file-load to add an offset to each
126 section's load address.
127 * symfile.c (set_objfile_default_section_offset): New function.
129 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
131 * symfile.c (add_symbol_file_command): Make sure that sections
132 with the same name are sorted in the same order.
134 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
136 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
137 require the second argument. If omitted, load sections at the
138 addresses specified in the file.
140 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
142 * symfile.c (symbol_file_command, symbol_file_add_main_1)
143 (_initialize_symfile): Add option "-o" to symbol-file to add an
144 offset to each section of the symbol file.
146 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
148 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
150 2018-06-27 Tom Tromey <tom@tromey.com>
152 * stack.c (_initialize_stack): Update "func" help text.
154 2018-06-27 Tom Tromey <tom@tromey.com>
156 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
158 (unwind_infopy_str, pyuw_create_unwind_info)
159 (unwind_infopy_add_saved_register, pyuw_sniffer)
160 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
162 (struct saved_reg): Add constructor.
163 <value>: Now a gdbpy_ref<>.
165 2018-06-27 Tom Tromey <tom@tromey.com>
167 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
169 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
171 * gdb-gdb.py.in: Format using autopep8.
173 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
175 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
176 (type_lookup_function): Recognize CORE_ADDR values.
178 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
180 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
183 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
185 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
188 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
190 * gdb-gdb.py: Move to...
191 * gdb-gdb.py.in: ... here.
192 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
193 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
195 (distclean): Remove gdb-gdb.py when cleaning.
196 (gdb-gdb.py, gdb-gdb.gdb): New rules.
197 * configure: Re-generate.
199 2018-06-27 Pedro Alves <palves@redhat.com>
201 * proc-service.c (get_ps_regcache): New.
202 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
203 (ps_lsetfpregs): Use it.
205 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
208 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
209 (dwarf_decode_lines_1): Adjust.
211 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
213 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
215 <info_proc>: Likewise.
217 2018-06-26 Joel Brobecker <brobecker@adacore.com>
219 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
220 to windows_fetch_one_register, and only handle the case of
221 fetching one register. Move the code that reloads the context
222 and iterates over all registers if R is negative to...
223 (windows_nat_target::fetch_registers): ... here.
224 (do_windows_store_inferior_registers): Rename to
225 windows_store_one_register, and only handle the case of storing
226 one register. Move the code that handles the case where r is
228 (windows_nat_target::store_registers) ... here.
230 2018-06-26 Tom Tromey <tom@tromey.com>
233 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
234 * rust-lang.c (rust_print_struct_def): Add podata parameter.
236 (rust_internal_print_type): Add podata parameter.
237 (rust_print_type): Update.
239 2018-06-26 Tom Tromey <tom@tromey.com>
241 * typeprint.h (struct print_offset_data) <update, finish,
242 maybe_print_hole>: New methods.
243 <indentation>: New constant.
244 * typeprint.c (print_offset_data::indentation): Define.
245 (print_offset_data::maybe_print_hole, print_offset_data::update)
246 (print_offset_data::finish): Move from c-typeprint.c and rename.
247 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
248 (print_spaces_filtered_with_print_options): Update.
249 (c_print_type_union_field_offset, maybe_print_hole)
250 (c_print_type_struct_field_offset): Move to typeprint.c and
252 (c_type_print_base_struct_union): Update.
254 2018-06-25 Pedro Alves <palves@redhat.com>
256 * gdbthread.h (thread_info_ref, delete_thread)
257 (delete_thread_silent, first_thread_of_inferior)
258 (any_thread_of_inferior, switch_to_thread)
259 (enable_thread_stack_temporaries)
260 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
261 (get_last_thread_stack_temporary)
262 (value_in_thread_stack_temporaries, can_access_registers_thread):
263 Spell out "struct thread_info" instead of just "thread_info".
264 * inferior.h (notice_new_inferior): Likewise.
266 2018-06-25 Pedro Alves <palves@redhat.com>
268 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
269 pass thread_info pointer to delete_thread.
270 (windows_nat_target::detach): Pass inferior pointer to
272 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
274 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
275 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
276 and pass a thread_info pointer to delete_thread.
277 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
278 pass thread_info pointer to delete_thread.
279 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
280 delete_thread_silent call.
281 * procfs.c (procfs_target::detach): Pass inferior pointer to
283 (procfs_target::wait): Pass thread_info pointer to delete_thread.
284 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
285 delete_thread_silent call.
286 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
287 pass thread_info pointer to delete_thread.
288 (windows_nat_target::detach): Pass inferior pointer to
291 2018-06-22 Alan Hayward <alan.hayward@arm.com>
293 * regcache.c (readable_regcache::read_part): Fix asserts.
294 (reg_buffer::raw_collect_part): New function.
295 (regcache::write_part): Fix asserts.
296 (reg_buffer::raw_supply_part): New function.
297 (regcache::transfer_regset_register): New helper function.
298 (regcache::transfer_regset): Call new functions.
299 (regcache_supply_regset): Use gdb_byte*.
300 (regcache::supply_regset): Likewise.
301 (regcache_collect_regset): Likewise.
302 (regcache::collect_regset): Likewise.
303 * regcache.h (reg_buffer::raw_collect_part): New declaration.
304 (reg_buffer::raw_supply_part): Likewise.
305 (regcache::transfer_regset_register): Likewise.
306 (regcache::transfer_regset): Use gdb_byte*.
308 2018-06-22 Alan Hayward <alan.hayward@arm.com>
310 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
312 2018-06-21 Pedro Alves <palves@redhat.com>
314 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
315 instead of a ptid_t. All callers adjusted.
316 * ada-tasks.c (ada_get_task_number): Likewise. All callers
318 (print_ada_task_info, display_current_task_id, task_command_1):
320 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
322 (breakpoint_kind): Adjust.
323 (remove_breakpoints_pid): Rename to ...
324 (remove_breakpoints_inf): ... this. Adjust to take an inferior
325 pointer. All callers adjusted.
326 (bpstat_clear_actions): Use inferior_thread.
327 (get_bpstat_thread): New.
328 (bpstat_do_actions): Use it.
329 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
330 to take a thread_info pointer. All callers adjusted.
331 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
332 (breakpoint_re_set_thread): Use inferior_thread.
333 * breakpoint.h (struct inferior): Forward declare.
334 (bpstat_stop_status): Update.
335 (remove_breakpoints_pid): Delete.
336 (remove_breakpoints_inf): New.
337 * bsd-uthread.c (bsd_uthread_target::wait)
338 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
339 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
340 (maint_btrace_packet_history_cmd)
341 (maint_btrace_clear_packet_history_cmd): Adjust.
342 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
344 * cli/cli-interp.c: Include "inferior.h".
345 * common/refcounted-object.h (struct
346 refcounted_object_ref_policy): New.
347 * compile/compile-object-load.c: Include gdbthread.h.
348 (store_regs): Use inferior_thread.
349 * corelow.c (core_target::close): Use current_inferior.
350 (core_target_open): Adjust to use first_thread_of_inferior and use
351 the current inferior.
352 * ctf.c (ctf_target::close): Adjust to use current_inferior.
353 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
354 <thread>: ... this new field. All references adjusted.
355 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
356 Take a thread_info pointer instead of a ptid_t.
357 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
358 (dummy_frame_discard, register_dummy_frame_dtor): Take a
359 thread_info pointer instead of a ptid_t.
360 * elfread.c: Include "inferior.h".
361 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
363 * eval.c (evaluate_subexp): Likewise.
364 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
366 * gdb_proc_service.h (struct thread_info): Forward declare.
367 (struct ps_prochandle) <ptid>: Delete, replaced by ...
368 <thread>: ... this new field. All references adjusted.
369 * gdbarch.h, gdbarch.c: Regenerate.
370 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
371 'thread' parameter. All implementations and callers adjusted.
372 * gdbthread.h (thread_info) <set_running>: New method.
373 (delete_thread, delete_thread_silent): Take a thread_info pointer
375 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
376 (first_thread_of_process): Delete, replaced by ...
377 (first_thread_of_inferior): ... this new function. All callers
379 (any_live_thread_of_process): Delete, replaced by ...
380 (any_live_thread_of_inferior): ... this new function. All callers
382 (switch_to_thread, switch_to_no_thread): Declare.
383 (is_executing): Delete.
384 (enable_thread_stack_temporaries): Update comment.
385 <enable_thread_stack_temporaries>: Take a thread_info pointer
386 instead of a ptid_t. Incref the thread.
387 <~enable_thread_stack_temporaries>: Decref the thread.
390 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
391 (get_last_thread_stack_temporary)
392 (value_in_thread_stack_temporaries, can_access_registers_thread):
393 Take a thread_info pointer instead of a ptid_t. All callers
395 * infcall.c (get_call_return_value): Use inferior_thread.
396 (run_inferior_call): Work with thread pointers instead of ptid_t.
397 (call_function_by_hand_dummy): Work with thread pointers instead
398 of ptid_t. Use thread_info_ref.
399 * infcmd.c (proceed_thread_callback): Access thread's state
401 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
402 access thread's state directly.
403 (continue_command): Use inferior_thread.
404 (info_program_command): Use find_thread_ptid and access thread
406 (proceed_after_attach_callback): Use thread state directly.
407 (notice_new_inferior): Take a thread_info pointer instead of a
408 ptid_t. All callers adjusted.
409 (exit_inferior): Take an inferior pointer instead of a pid. All
411 (exit_inferior_silent): New.
412 (detach_inferior): Delete.
413 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
414 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
415 (detach_inferior_command, kill_inferior_command): Use
416 find_inferior_id instead of valid_gdb_inferior_id and
417 gdb_inferior_id_to_pid.
418 (inferior_command): Use inferior and thread pointers.
419 * inferior.h (struct thread_info): Forward declare.
420 (notice_new_inferior): Take a thread_info pointer instead of a
421 ptid_t. All callers adjusted.
422 (detach_inferior): Delete declaration.
423 (exit_inferior, exit_inferior_silent): Take an inferior pointer
424 instead of a pid. All callers adjusted.
425 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
426 (valid_gdb_inferior_id): Delete.
427 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
428 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
429 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
431 <inf>: ... this new field.
432 <step_ptid>: Delete, replaced by ...
433 <step_thread>: ... this new field.
434 (get_displaced_stepping_state): Take an inferior pointer instead
435 of a pid. All callers adjusted.
436 (displaced_step_in_progress_any_inferior): Adjust.
437 (displaced_step_in_progress_thread): Take a thread pointer instead
438 of a ptid_t. All callers adjusted.
439 (displaced_step_in_progress, add_displaced_stepping_state): Take
440 an inferior pointer instead of a pid. All callers adjusted.
441 (get_displaced_step_closure_by_addr): Adjust.
442 (remove_displaced_stepping_state): Take an inferior pointer
443 instead of a pid. All callers adjusted.
444 (displaced_step_prepare_throw, displaced_step_prepare)
445 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
446 All callers adjusted.
447 (start_step_over): Adjust.
448 (infrun_thread_ptid_changed): Remove bit updating ptids in the
449 displaced step queue.
450 (do_target_resume): Adjust.
451 (fetch_inferior_event): Use inferior_thread.
452 (context_switch, get_inferior_stop_soon): Take an
453 execution_control_state pointer instead of a ptid_t. All callers
455 (switch_to_thread_cleanup): Delete.
456 (stop_all_threads): Use scoped_restore_current_thread.
457 * inline-frame.c: Include "gdbthread.h".
458 (inline_state) <inline_state>: Take a thread pointer instead of a
459 ptid_t. All callers adjusted.
460 <ptid>: Delete, replaced by ...
461 <thread>: ... this new field.
462 (find_inline_frame_state): Take a thread pointer instead of a
463 ptid_t. All callers adjusted.
464 (skip_inline_frames, step_into_inline_frame)
465 (inline_skipped_frames, inline_skipped_symbol): Take a thread
466 pointer instead of a ptid_t. All callers adjusted.
467 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
468 (inline_skipped_frames, inline_skipped_symbol): Likewise.
469 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
471 * linux-nat.c (get_detach_signal): Likewise.
472 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
473 (thread_db_notice_clone): Adjust.
474 (thread_db_find_new_threads_silently)
475 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
476 a thread pointer instead of a ptid_t. All callers adjusted.
477 * mi/mi-cmd-var.c: Include "inferior.h".
478 (mi_cmd_var_update_iter): Update to use thread pointers.
479 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
481 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
483 (mi_output_running): ... this new function.
484 (mi_on_resume_1): Adjust to use it.
485 (mi_user_selected_context_changed): Adjust to use inferior_thread.
486 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
488 (interrupt_thread_callback): : Adjust to use thread and inferior
490 * proc-service.c: Include "gdbthread.h".
491 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
492 * progspace-and-thread.c: Include "inferior.h".
493 * progspace.c: Include "inferior.h".
494 * python/py-exitedevent.c (create_exited_event_object): Adjust to
495 hold a reference to an inferior_object.
496 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
498 * python/py-inferior.c (struct inferior_object): Give the type a
499 tag name instead of a typedef.
500 (python_on_normal_stop): No need to check if the current thread is
502 (inferior_to_inferior_object): Change return type to
503 inferior_object. All callers adjusted.
504 (find_thread_object): Delete, bits factored out to ...
505 (thread_to_thread_object): ... this new function.
506 * python/py-infthread.c (create_thread_object): Use
507 inferior_to_inferior_object.
508 (thpy_is_stopped): Use thread pointer directly.
509 (gdbpy_selected_thread): Use inferior_thread.
510 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
511 field, replaced with ...
512 <thread>: ... this new field. All users adjusted.
513 (btpy_insn_or_gap_new): Drop const.
514 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
516 * python/py-record.c: Include "gdbthread.h".
517 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
518 a ptid_t. All callers adjusted.
519 (gdbpy_current_recording): Use inferior_thread.
520 * python/py-record.h (recpy_record_object) <ptid>: Delete
521 field, replaced with ...
522 <thread>: ... this new field. All users adjusted.
523 (recpy_element_object) <ptid>: Delete
524 field, replaced with ...
525 <thread>: ... this new field. All users adjusted.
526 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
527 a ptid_t. All callers adjusted.
528 * python/py-threadevent.c: Include "gdbthread.h".
529 (get_event_thread): Use thread_to_thread_object.
530 * python/python-internal.h (struct inferior_object): Forward
532 (find_thread_object, find_inferior_object): Delete declarations.
533 (thread_to_thread_object, inferior_to_inferior_object): New
535 * record-btrace.c: Include "inferior.h".
536 (require_btrace_thread): Use inferior_thread.
537 (record_btrace_frame_sniffer)
538 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
539 (get_thread_current_frame): Use scoped_restore_current_thread and
541 (get_thread_current_frame): Use thread pointer directly.
542 (record_btrace_replay_at_breakpoint): Use thread's inferior
544 * record-full.c: Include "inferior.h".
545 * regcache.c: Include "gdbthread.h".
546 (get_thread_arch_regcache): Use the inferior's address space
548 (get_thread_regcache, registers_changed_thread): New.
549 * regcache.h (get_thread_regcache(thread_info *thread)): New
551 (registers_changed_thread): New.
552 (remote_target) <remote_detach_1>: Swap order of parameters.
553 (remote_add_thread): <remote_add_thread>: Return the new thread.
554 (get_remote_thread_info(ptid_t)): New overload.
555 (remote_target::remote_notice_new_inferior): Use thread pointers
557 (remote_target::process_initial_stop_replies): Use
558 thread_info::set_running.
559 (remote_target::remote_detach_1, remote_target::detach)
560 (extended_remote_target::detach): Adjust.
561 * stack.c (frame_show_address): Use inferior_thread.
562 * target-debug.h (target_debug_print_thread_info_pp): New.
563 * target-delegates.c: Regenerate.
564 * target.c (default_thread_address_space): Delete.
565 (memory_xfer_partial_1): Use current_inferior.
566 (target_detach): Use current_inferior.
567 (target_thread_address_space): Delete.
568 (generic_mourn_inferior): Use current_inferior.
569 * target.h (struct target_ops) <thread_address_space>: Delete.
570 (target_thread_address_space): Delete.
571 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
573 (delete_thread_1, delete_thread, delete_thread_silent): Take a
574 thread pointer instead of a ptid_t. Adjust all callers.
575 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
576 (first_thread_of_process): Delete, replaced by ...
577 (first_thread_of_inferior): ... this new function. All callers
579 (any_thread_of_process): Rename to ...
580 (any_thread_of_inferior): ... this, and take an inferior pointer.
581 (any_live_thread_of_process): Rename to ...
582 (any_live_thread_of_inferior): ... this, and take an inferior
584 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
585 (value_in_thread_stack_temporaries)
586 (get_last_thread_stack_temporary): Take a thread pointer instead
587 of a ptid_t. Adjust all callers.
588 (thread_info::set_running): New.
589 (validate_registers_access): Use inferior_thread.
590 (can_access_registers_ptid): Rename to ...
591 (can_access_registers_thread): ... this, and take a thread
593 (print_thread_info_1): Adjust to compare thread pointers instead
595 (switch_to_no_thread, switch_to_thread): Make extern.
596 (scoped_restore_current_thread::~scoped_restore_current_thread):
597 Use m_thread pointer directly.
598 (scoped_restore_current_thread::scoped_restore_current_thread):
600 (thread_command): Use thread pointer directly.
601 (thread_num_make_value_helper): Use inferior_thread.
602 * top.c (execute_command): Use inferior_thread.
603 * tui/tui-interp.c: Include "inferior.h".
604 * varobj.c (varobj_create): Use inferior_thread.
605 (value_of_root_1): Use find_thread_global_id instead of
606 global_thread_id_to_ptid.
608 2018-06-21 Alan Hayward <alan.hayward@arm.com>
610 * regcache.c (readable_regcache::read_part): Avoid memcpy when
612 (regcache::write_part): Likewise.
613 (readable_regcache::cooked_read_part): Update comment.
614 (readable_regcache::cooked_write_part): Likewise.
615 * regcache.h: (readable_regcache::read_part): Likewise.
616 (regcache::write_part): Likewise.
618 2018-06-21 Richard Bunt <richard.bunt@arm.com>
619 Dirk Schubert <dirk.schubert@arm.com>
621 * aarch64-linux-nat.c (post_attach): New.
622 (aarch64_linux_nat_target::post_attach): Override post_attach to
623 record the number of hardware debug registers.
625 2018-06-20 Tom Tromey <tom@tromey.com>
627 * python/py-param.c (add_setshow_generic): Make parameters const.
628 (parmpy_init): Update.
630 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
632 * regcache.h (regcache_cooked_read_ftype): Rename to...
633 (register_read_ftype): ...this, change type to function_view.
634 (class reg_buffer) <save>: Remove src parameter.
635 (readonly_detached_regcache) <readonly_detached_regcache>: Make
636 parameter non-const in first overload. Remove src parameter in
638 * regcache.c (do_cooked_read): Remove.
639 (readonly_detached_regcache::readonly_detached_regcache): Make
640 parameter non-const, adjust call to other constructor.
641 (reg_buffer::save): Remove src parameter.
642 * frame.c (do_frame_register_read): Remove.
643 (frame_save_as_regcache): Use lambda function.
644 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
645 parameter to ppu2spu_data *.
646 (ppu2spu_sniffer): Use lambda function.
648 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
650 * record-full.c (record_full_target::insert_breakpoint): Remove
651 "struct" keyword, add const.
653 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
655 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
656 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
657 * configure.ac: Remove AC_PREREQ, add missing quoting.
658 * gnulib/configure.ac: Modernize usage of
659 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
660 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
661 (AUTOMAKE_VERSION): Bump to 1.15.1.
662 * configure: Re-generate.
663 * config.in: Re-generate.
664 * aclocal.m4: Re-generate.
665 * gnulib/aclocal.m4: Re-generate.
666 * gnulib/config.in: Re-generate.
667 * gnulib/configure: Re-generate.
668 * gnulib/import/Makefile.in: Re-generate.
670 2018-06-19 Pedro Alves <palves@redhat.com>
672 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
673 (lookup_minimal_symbol_by_pc_section): ... here with
674 gdb_assert_not_reached added.
676 2018-06-19 Pedro Alves <palves@redhat.com>
678 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
679 parameter with a block parameter. Compare location's block symbol
680 with the frame's block instead of addresses.
681 (skip_inline_frames): Pass the current block instead of the
682 frame's address. Break out as soon as we determine the frame
683 should not be skipped.
685 2018-06-18 Tom Tromey <tom@tromey.com>
687 * solib-aix.c (solib_aix_get_section_offsets): Return
689 (solib_aix_solib_create_inferior_hook): Update.
691 2018-06-18 Tom Tromey <tom@tromey.com>
693 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
695 2018-06-18 Tom Tromey <tom@tromey.com>
697 * solib-frv.c (frv_relocate_main_executable): Use
699 * solib-dsbt.c (dsbt_relocate_main_executable): Use
702 2018-06-18 Tom Tromey <tom@tromey.com>
704 * objfiles.h (inhibit_section_map_updates): Update.
705 (resume_section_map_updates, resume_section_map_updates_cleanup):
707 * solib-svr4.c (svr4_handle_solib_event): Update.
708 * objfiles.c (inhibit_section_map_updates): Return
709 scoped_restore_tmpl<int>.
710 (resume_section_map_updates, resume_section_map_updates_cleanup):
713 2018-06-18 Tom Tromey <tom@tromey.com>
715 * valprint.h (read_string): Update.
716 * valprint.c (read_string): Change type of "buffer".
717 (val_print_string): Update.
718 * python/py-value.c (valpy_string): Update.
719 * language.h (struct language_defn) <la_get_string>: Change
721 (default_get_string, c_get_string): Update.
722 * language.c (default_get_string): Change type of "buffer".
723 * guile/scm-value.c (gdbscm_value_to_string): Update.
724 * c-lang.c (c_get_string): Change type of "buffer".
726 2018-06-18 Tom Tromey <tom@tromey.com>
728 * ser-mingw.c (struct pipe_state_destroyer): New.
729 (pipe_state_up): New typedef.
730 (cleanup_pipe_state): Remove.
731 (pipe_windows_open): Use pipe_state_up. Don't release argv.
733 2018-06-18 Tom Tromey <tom@tromey.com>
735 * rust-lang.h (rust_yyerror): Don't declare.
736 * rust-lang.c (rust_language_defn): Update.
737 * rust-exp.y (yyerror): Now static.
738 * parse.c (parse_exp_in_context_1): Update.
739 * p-lang.h (p_yyerror): Don't declare.
740 * p-lang.c (p_language_defn): Update.
741 * p-exp.y (yyerror): Now static.
742 * opencl-lang.c (opencl_language_defn): Update.
743 * objc-lang.c (objc_language_defn): Update.
744 * m2-lang.h (m2_yyerror): Don't declare.
745 * m2-lang.c (m2_language_defn): Update.
746 * m2-exp.y (yyerror): Now static.
747 * language.h (struct language_defn) <la_error>: Remove.
748 * language.c (unk_lang_error): Remove.
749 (unknown_language_defn, auto_language_defn): Remove.
750 * go-lang.h (go_yyerror): Don't declare.
751 * go-lang.c (go_language_defn): Update.
752 * go-exp.y (yyerror): Now static.
753 * f-lang.h (f_yyerror): Don't declare.
754 * f-lang.c (f_language_defn): Update.
755 * f-exp.y (yyerror): Now static.
756 * d-lang.h (d_yyerror): Don't declare.
757 * d-lang.c (d_language_defn): Update.
758 * d-exp.y (yyerror): Now static.
759 * c-lang.h (c_yyerror): Don't declare.
760 * c-lang.c (c_language_defn, cplus_language_defn)
761 (asm_language_defn, minimal_language_defn): Update.
762 * c-exp.y (yyerror): Now static.
763 * ada-lang.h (ada_yyerror): Don't declare.
764 * ada-lang.c (ada_language_defn): Update.
765 * ada-exp.y (yyerror): Now static.
767 2018-06-18 Alan Hayward <alan.hayward@arm.com>
769 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
770 (store_sveregs_to_thread): Likewise.
771 (aarch64_linux_fetch_inferior_registers): Check for SVE.
772 (aarch64_linux_store_inferior_registers): Likewise.
773 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
775 (aarch64_sve_regs_copy_to_regcache): Likewise.
776 (aarch64_sve_regs_copy_from_regcache): Likewise.
777 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
779 (aarch64_sve_regs_copy_to_regcache): Likewise.
780 (aarch64_sve_regs_copy_from_regcache): Likewise.
781 (sve_context): Structure from Linux headers.
782 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
783 (SVE_SIG_ZREG_SIZE): Likewise.
784 (SVE_SIG_PREG_SIZE): Likewise.
785 (SVE_SIG_FFR_SIZE): Likewise.
786 (SVE_SIG_REGS_OFFSET): Likewise.
787 (SVE_SIG_ZREGS_OFFSET): Likewise.
788 (SVE_SIG_ZREG_OFFSET): Likewise.
789 (SVE_SIG_ZREGS_SIZE): Likewise.
790 (SVE_SIG_PREGS_OFFSET): Likewise.
791 (SVE_SIG_PREG_OFFSET): Likewise.
792 (SVE_SIG_PREGS_SIZE): Likewise.
793 (SVE_SIG_FFR_OFFSET): Likewise.
794 (SVE_SIG_REGS_SIZE): Likewise.
795 (SVE_SIG_CONTEXT_SIZE): Likewise.
796 (SVE_PT_REGS_MASK): Likewise.
797 (SVE_PT_REGS_FPSIMD): Likewise.
798 (SVE_PT_REGS_SVE): Likewise.
799 (SVE_PT_VL_INHERIT): Likewise.
800 (SVE_PT_VL_ONEXEC): Likewise.
801 (SVE_PT_REGS_OFFSET): Likewise.
802 (SVE_PT_FPSIMD_OFFSET): Likewise.
803 (SVE_PT_FPSIMD_SIZE): Likewise.
804 (SVE_PT_SVE_ZREG_SIZE): Likewise.
805 (SVE_PT_SVE_PREG_SIZE): Likewise.
806 (SVE_PT_SVE_FFR_SIZE): Likewise.
807 (SVE_PT_SVE_FPSR_SIZE): Likewise.
808 (SVE_PT_SVE_FPCR_SIZE): Likewise.
809 (__SVE_SIG_TO_PT): Likewise.
810 (SVE_PT_SVE_OFFSET): Likewise.
811 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
812 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
813 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
814 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
815 (SVE_PT_SVE_PREG_OFFSET): Likewise.
816 (SVE_PT_SVE_PREGS_SIZE): Likewise.
817 (SVE_PT_SVE_FFR_OFFSET): Likewise.
818 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
819 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
820 (SVE_PT_SVE_SIZE): Likewise.
821 (SVE_PT_SIZE): Likewise.
822 (HAS_SVE_STATE): New define.
824 2018-06-18 Alan Hayward <alan.hayward@arm.com>
826 * nat/aarch64-sve-linux-sigcontext.h: New file.
827 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
829 (SVE_VQ_MIN): Likewise.
830 (SVE_VQ_MAX): Likewise.
831 (SVE_VL_MIN): Likewise.
832 (SVE_VL_MAX): Likewise.
833 (SVE_NUM_ZREGS): Likewise.
834 (SVE_NUM_PREGS): Likewise.
835 (sve_vl_valid): Likewise.
836 (struct user_sve_header): Likewise.
838 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
839 Richard Bunt <Richard.Bunt@arm.com>
841 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
842 was requested by GDB.
844 2018-06-15 Tom de Vries <tdevries@suse.de>
846 * MAINTAINERS (Write After Approval): Add Tom de Vries.
848 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
850 * gnulib/update-gnulib.sh: Print expected versions of
853 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
855 * arch-utils.c (default_type_align): Use type_length_units.
856 * gdbtypes.c (type_align): Use type_length_units.
858 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
860 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
863 2018-06-14 Tom de Vries <tdevries@suse.de>
866 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
867 get_no_prettyformat_print_options.
869 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
871 * sparc-nat.h: Include target.h.
872 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
873 <fetch_registers>: Remove this argument in function call.
874 <store_registers>: Remove this argument in function call, remove
876 <low_forget_process>: Call sparc64_forget_process instead of
877 sparc_forget_process.
879 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
881 * procfs.c (_initialize_procfs): Use add_inf_child_target.
882 (procfs_target::make_corefile_notes): Adjust to new
883 target_read_alloc return type.
885 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
886 Stephen Roberts <stephen.roberts@arm.com>
889 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
890 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
891 Move should_notify_stop local into more inner scope.
893 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
894 Stephen Roberts <stephen.roberts@arm.com>
897 * infrun.c (resume_1): Add call to mark_async_event_handler.
899 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
901 * infrun.c (do_target_wait): Change old version of $pc printed.
903 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
905 * dwarf2read.c (read_index_from_section): Rename to...
906 (read_gdb_index_from_section): ... this, update all callers.
907 (dwarf2_read_index): Rename to...
908 (dwarf2_read_gdb_index): ... this, update all callers.
910 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
912 * gdb/hppa-linux-nat.c
913 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
914 hppa_linux_nat_target::fetch_registers.
916 2018-06-11 Alan Hayward <alan.hayward@arm.com>
918 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
919 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
920 (AARCH64_DWARF_SVE_FFR): Likewise.
921 (AARCH64_DWARF_SVE_P0): Likewise.
922 (AARCH64_DWARF_SVE_Z0): Likewise.
924 2018-06-11 Alan Hayward <alan.hayward@arm.com>
926 * common/common-regcache.h (raw_compare): New function.
927 * regcache.c (regcache::raw_compare): Likewise.
928 * regcache.h (regcache::raw_compare): New declaration.
930 2018-06-11 Alan Hayward <alan.hayward@arm.com>
932 * common/common-regcache.h (reg_buffer_common): New structure.
933 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
934 (reg_buffer::raw_supply): Likewise.
935 (reg_buffer::raw_supply_integer): Likewise.
936 (reg_buffer::raw_supply_zeroed): Likewise.
937 (reg_buffer::raw_collect): Likewise.
938 (reg_buffer::raw_collect_integer): Likewise.
939 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
940 (reg_buffer::raw_supply): Likewise.
941 (reg_buffer::raw_supply_integer): Likewise.
942 (reg_buffer::raw_supply_zeroed): Likewise.
943 (reg_buffer::raw_collect): Likewise.
944 (reg_buffer::raw_collect_integer): Likewise.
946 2018-06-10 Tom Tromey <tom@tromey.com>
948 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
949 (class remote_state) <stop_reply_queue>: Now std::vector.
950 (remote_state::~remote_state)
951 (remote_target::stop_reply_queue_length): Update.
952 (struct queue_iter_param, remove_child_of_pending_fork)
953 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
954 (check_pending_event_prevents_wildcard_vcont_callback)
955 (remove_stop_reply_for_inferior)
956 (remove_stop_reply_of_remote_state)
957 (remote_notif_remove_once_on_match)
958 (stop_reply_match_ptid_and_ws)
959 (remote_kill_child_of_pending_fork): Remove.
960 (remote_target::remove_new_fork_children)
961 (remote_target::check_pending_events_prevent_wildcard_vcont)
962 (remote_target::discard_pending_stop_replies)
963 (remote_target::discard_pending_stop_replies_in_queue)
964 (remote_target::remote_notif_remove_queued_reply)
965 (remote_target::queued_stop_reply)
966 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
967 (remote_target::wait, remote_target::kill_new_fork_children)
968 (remote_target::async): Update.
970 2018-06-10 Tom Tromey <tom@tromey.com>
972 * record-full.c (record_full_arch_list_cleanups): Remove.
973 (record_full_message): Use try/catch.
974 (record_full_wait_cleanups): Remove.
975 (record_full_wait_1): Use try/catch.
976 (record_full_restore): Likewise.
978 2018-06-10 Tom Tromey <tom@tromey.com>
980 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
981 declare VEC. Add constructor.
982 <in_target_beneath>: Now bool.
983 (record_full_breakpoints): Now a std::vector, static.
984 (record_full_sync_record_breakpoints)
985 (record_full_init_record_breakpoints)
986 (record_full_target::insert_breakpoint)
987 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
989 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
991 * dwarf2read.c (process_cu_includes): Remove struct keyword.
992 * serial.c (serial_interface_lookup): Remove struct keyword.
994 2018-06-10 Tom Tromey <tom@tromey.com>
996 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
998 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1000 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1002 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1003 "beneath" as a method.
1004 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1005 Use "beneath" as a method.
1007 2018-06-10 Tom Tromey <tom@tromey.com>
1009 * tracefile.c (struct trace_file_writer_deleter): New.
1010 <operator()>: Rename from trace_file_writer_xfree.
1011 (trace_file_writer_up): New typedef.
1012 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1014 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1016 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1017 <m_registers, m_register_status>: Change type to
1019 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1022 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1024 * common/common-regcache.h (enum register_status): Add
1025 underlying type "signed char".
1026 * regcache.h (reg_buffer) <m_register_status>: Change type to
1028 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1029 register_status instead of signed char.
1030 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1031 (reg_buffer::get_register_status): Remove cast.
1032 (readable_regcache::raw_read): Remove cast.
1033 (readable_regcache::cooked_read): Remove cast.
1035 2018-06-09 Tom Tromey <tom@tromey.com>
1037 * source.c (reverse_search_command, forward_search_command): Use
1040 2018-06-09 Tom Tromey <tom@tromey.com>
1042 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1043 (serial_ops_list): Now static, std::vector.
1044 (serial_interface_lookup, serial_add_interface): Update.
1046 2018-06-09 Tom Tromey <tom@tromey.com>
1048 * dwarf2read.c (process_cu_includes): Update.
1049 (process_full_comp_unit): Update.
1050 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1053 2018-06-08 Paul Koning <paul_koning@dell.com>
1057 * python/python.c (do_start_initialization):
1058 Avoid call to internal Python API.
1059 (init__gdb_module): New function.
1061 2018-06-08 Gary Benson <gbenson@redhat.com>
1063 * linux-thread-db.c (valprint.h): New include.
1064 (struct check_thread_db_info): New structure.
1065 (check_thread_db_on_load, tdb_testinfo): New static globals.
1066 (check_thread_db, check_thread_db_callback): New functions.
1067 (try_thread_db_load_1): Run integrity checks if requested.
1068 (maintenance_check_libthread_db): New function.
1069 (_initialize_thread_db): Register "maint check libthread-db"
1070 and "maint set/show check-libthread-db".
1071 * NEWS: Mention the above new commands.
1073 2018-06-08 Tom Tromey <tom@tromey.com>
1075 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1078 2018-06-08 Tom Tromey <tom@tromey.com>
1080 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1082 2018-06-08 Tom Tromey <tom@tromey.com>
1084 * common/btrace-common.h (struct btrace_data): Add constructor,
1085 destructor, move assignment operator.
1086 <empty, clear, fini>: New methods.
1087 <format>: Initialize.
1088 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1089 (btrace_data_empty): Don't declare.
1090 * common/btrace-common.c (btrace_data_init): Remove.
1091 (btrace_data::fini): Rename from btrace_data_fini.
1092 (btrace_data::empty): Rename from btrace_data_empty.
1093 (btrace_data::clear): Rename from btrace_data_clear. Return
1095 * btrace.h (make_cleanup_btrace_data): Don't declare.
1096 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1097 (parse_xml_btrace): Update.
1098 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1099 (maint_btrace_clear_packet_history_cmd): Update.
1101 2018-06-07 Pedro Alves <palves@redhat.com>
1103 * target.h (target_ops) <beneath>: Now a method. All references
1105 (class target_stack): New.
1106 * target.c (g_target_stack): New.
1107 (g_current_top_target): Delete.
1108 (current_top_target): Get the top target out of g_target_stack.
1109 (target_stack::push, target_stack::unpush): New.
1110 (push_target, unpush_target): Reimplement.
1111 (target_is_pushed): Reimplement in terms of g_target_stack.
1112 (target_ops::beneath, target_stack::find_beneath): New.
1114 2018-06-07 Pedro Alves <palves@redhat.com>
1116 * target.h (find_target_beneath): Delete declaration.
1117 * target.c (find_target_beneath): Delete definition.
1118 * aix-thread.c: All callers of find_target_beneath adjusted to
1119 call target_ops::beneath instead.
1120 * bsd-uthread.c: Likewise.
1121 * linux-thread-db.c: Likewise.
1122 * ravenscar-thread.c: Likewise.
1123 * sol-thread.c: Likewise.
1124 * spu-multiarch.c: Likewise.
1126 2018-06-07 Pedro Alves <palves@redhat.com>
1128 * target.h (target_ops) <beneath>: Now a method. All references
1130 (target_ops) <m_beneath>: New.
1131 * target.c (target_ops::beneath): New.
1132 * corelow.c: Adjust all references to target_ops::beneath.
1133 * linux-thread-db.c: Likewise.
1134 * make-target-delegates: Likewise.
1135 * record-btrace.c: Likewise.
1136 * record-full.c: Likewise.
1137 * remote.c: Likewise.
1138 * target.c: Likewise.
1139 * target-delegates.c: Regenerate.
1141 2018-06-07 Pedro Alves <palves@redhat.com>
1143 * target.h (target_stack): Delete.
1144 (current_top_target): Declare function.
1145 * target.c (target_stack): Delete.
1146 (g_current_top_target): New.
1147 (current_top_target): New function.
1148 * auxv.c: Use current_top_target instead of target_stack
1150 * avr-tdep.c: Likewise.
1151 * breakpoint.c: Likewise.
1152 * corefile.c: Likewise.
1153 * elfread.c: Likewise.
1155 * exceptions.c: Likewise.
1156 * frame.c: Likewise.
1157 * gdbarch-selftests.c: Likewise.
1158 * gnu-v3-abi.c: Likewise.
1159 * ia64-tdep.c: Likewise.
1160 * ia64-vms-tdep.c: Likewise.
1161 * infcall.c: Likewise.
1162 * infcmd.c: Likewise.
1163 * infrun.c: Likewise.
1164 * linespec.c: Likewise.
1165 * linux-tdep.c: Likewise.
1166 * minsyms.c: Likewise.
1167 * ppc-linux-nat.c: Likewise.
1168 * ppc-linux-tdep.c: Likewise.
1169 * procfs.c: Likewise.
1170 * regcache.c: Likewise.
1171 * remote.c: Likewise.
1172 * rs6000-tdep.c: Likewise.
1173 * s390-linux-nat.c: Likewise.
1174 * s390-tdep.c: Likewise.
1175 * solib-aix.c: Likewise.
1176 * solib-darwin.c: Likewise.
1177 * solib-dsbt.c: Likewise.
1178 * solib-spu.c: Likewise.
1179 * solib-svr4.c: Likewise.
1180 * solib-target.c: Likewise.
1181 * sparc-tdep.c: Likewise.
1182 * sparc64-tdep.c: Likewise.
1183 * spu-tdep.c: Likewise.
1184 * symfile.c: Likewise.
1185 * symtab.c: Likewise.
1186 * target-descriptions.c: Likewise.
1187 * target-memory.c: Likewise.
1188 * target.c: Likewise.
1189 * target.h: Likewise.
1190 * tracefile-tfile.c: Likewise.
1191 * tracepoint.c: Likewise.
1192 * valops.c: Likewise.
1193 * valprint.c: Likewise.
1194 * value.c: Likewise.
1195 * windows-tdep.c: Likewise.
1196 * mi/mi-main.c: Likewise.
1198 2018-06-07 Tom Tromey <tom@tromey.com>
1200 * valprint.h (build_address_symbolic): Declare.
1201 * printcmd.c (print_address_symbolic): Update.
1202 (build_address_symbolic): Change "name" and "filename" to
1204 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1206 * defs.h (build_address_symbolic): Remove declaration.
1208 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1210 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1211 (aarch64_vnv_type): Add function.
1212 (aarch64_pseudo_register_name): Add V regs for SVE.
1213 (aarch64_pseudo_register_type): Likewise.
1214 (aarch64_pseudo_register_reggroup_p): Likewise.
1215 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1216 (aarch64_pseudo_read_value): Add V regs for SVE.
1217 (aarch64_pseudo_write_2): Use V0 offset for SVE
1218 (aarch64_pseudo_write): Add V regs for SVE.
1219 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1221 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1223 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1224 (sve_vl_from_vq): Likewise.
1226 2018-06-05 Tom Tromey <tom@tromey.com>
1228 * cli/cli-cmds.c (show_version): Update.
1229 * top.c (print_gdb_version): Add "interactive" parameter.
1231 * main.c (captured_main_1): Update.
1232 * top.h (print_gdb_version): Add "interactive" parameter and a
1235 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1237 * common/enum-flags.h: Add trailing semicolon to example in
1240 2018-06-05 Tom Tromey <tom@tromey.com>
1243 * NEWS: Add entry about pager.
1244 * utils.c (pagination_disabled_for_command): New global.
1245 (prompt_for_continue): Allow "c" response to prompt.
1246 (reinitialize_more_filter): Clear
1247 pagination_disabled_for_command.
1248 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1250 2018-06-04 Tom Tromey <tom@tromey.com>
1252 * ada-lang.h (ada_lookup_symbol_list): Update.
1253 * ada-lang.c (resolve_subexp): Update.
1254 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1256 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1257 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1258 results parameter to std::vector.
1259 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1261 * ada-exp.y (block_lookup): Update.
1262 (select_possible_type_sym): Change type of syms. Remove nsyms
1264 (write_var_or_type, write_name_assoc): Update.
1266 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1268 * windows-nat.c (windows_nat_target::xfer_partial): Return
1269 TARGET_XFER_E_IO if we need to delegate to the target beneath
1270 but BENEATH is NULL.
1272 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1274 * Makefile.in (config.status): Add configure.nat as a
1277 2018-06-04 Tom Tromey <tom@tromey.com>
1279 * cp-name-parser.y (cpname_state): Add method declarations.
1280 (HANDLE_QUAL): Update.
1281 (cpname_state::d_grab, cpname_state::fill_comp)
1282 (cpname_state::make_operator, cpname_state::make_dtor)
1283 (cpname_state::make_builtin_type, cpname_state::make_name)
1284 (cpname_state::d_qualify, cpname_state::d_int_type)
1285 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1286 (%union): Move earlier.
1288 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1290 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1292 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1294 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1295 (aarch64_pseudo_write_1): Likewise.
1296 (aarch64_pseudo_read_value): Use helper.
1297 (aarch64_pseudo_write): Likewise.
1299 2018-06-04 Pedro Alves <palves@redhat.com>
1301 * darwin-nat.c (darwin_ops): Delete.
1302 (darwin_attach_pid): Use get_native_target.
1304 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1306 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1307 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1309 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1311 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1312 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1313 (aarch64_gdbarch_init): Check for SVE.
1314 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1316 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1318 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1319 * aarch64-tdep.h (aarch64_read_description): Likewise.
1320 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1321 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1322 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1323 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1324 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1326 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1328 * value.c (value_fetch_lazy_bitfield): New.
1329 (value_fetch_lazy_memory): New.
1330 (value_fetch_lazy_register): New.
1331 (value_fetch_lazy): Factor out to smaller functions.
1333 2018-06-01 Tom Tromey <tom@tromey.com>
1335 * cp-name-parser.y (backslashable, represented): Now const.
1337 2018-06-01 Tom Tromey <tom@tromey.com>
1339 * cp-name-parser.y: Include parser-defs.h.
1340 (parser_fprintf): Remove declaration.
1342 2018-06-01 Tom Tromey <tom@tromey.com>
1344 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1346 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1347 (global_result): Remove globals.
1348 (struct cpname_state): New.
1349 (yyparse): Don't declare.
1350 (yylex, yyerror): Move declarations after %union.
1351 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1352 (make_name): Add state parameter.
1354 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1356 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1358 (yylex): Add lvalp, state parameters.
1359 (yyerror): Add state parameter.
1360 (cp_demangled_name_to_comp): Update.
1362 2018-06-01 Tom Tromey <tom@tromey.com>
1364 * cp-name-parser.y (parser_fprintf): Declare.
1365 (GDB_YY_REMAP_PREFIX): Define.
1366 Include yy-remap.h. Don't redefine yy* identifiers.
1368 2018-06-01 Tom Tromey <tom@tromey.com>
1370 * python/py-type.c (typy_legacy_template_argument): Update.
1371 * cp-support.h (cp_demangled_name_to_comp): Update.
1372 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1373 parameter to be a "std::string *".
1376 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1378 * ada-lex.l: Include "diagnostics.h" instead of
1379 "common/diagnostics.h".
1380 * unittests/environ-selftests.c: Likewise.
1381 * common/diagnostics.h: Moved to ../include.
1383 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1385 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1386 to language_mode_manual while calling breakpoint_re_set_one.
1388 2018-06-01 Tom Tromey <tom@tromey.com>
1390 * valops.c (value_cast_structs, destructor_name_p): Update.
1391 * symtab.c (gdb_mangle_name): Update.
1392 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1394 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1395 (pascal_object_print_value_fields, pascal_object_print_value):
1397 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1398 * linespec.c (find_methods): Update.
1399 * gdbtypes.h (type_name_no_tag): Remove.
1400 (type_name_or_error): Rename from type_name_no_tag_or_error.
1401 * gdbtypes.c (type_name_no_tag): Remove.
1402 (type_name_or_error): Rename from type_name_no_tag_or_error.
1403 (lookup_struct_elt_type, check_typedef): Update.
1404 * expprint.c (print_subexp_standard): Update.
1405 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1406 * d-namespace.c (d_lookup_nested_symbol): Update.
1407 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1408 (cp_print_class_member): Update.
1409 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1410 * completer.c (add_struct_fields): Update.
1411 * c-typeprint.c (cp_type_print_derivation_info)
1412 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1414 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1415 (ada_prefer_type, ada_is_exception_sym): Update.
1417 2018-06-01 Tom Tromey <tom@tromey.com>
1419 * valops.c (enum_constant_from_type, value_namespace_elt)
1420 (value_maybe_namespace_elt): Update.
1421 * valarith.c (find_size_for_pointer_math): Update.
1422 * target-descriptions.c (make_gdb_type): Update.
1423 * symmisc.c (print_symbol): Update.
1424 * stabsread.c (define_symbol, read_type)
1425 (complain_about_struct_wipeout, add_undefined_type)
1426 (cleanup_undefined_types_1): Update.
1427 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1428 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1429 (rust_internal_print_type, rust_composite_type)
1430 (rust_evaluate_funcall, rust_evaluate_subexp)
1431 (rust_inclusive_range_type_p): Update.
1432 * python/py-type.c (typy_get_tag): Update.
1433 * p-typeprint.c (pascal_type_print_base): Update.
1434 * mdebugread.c (parse_symbol, parse_type): Update.
1435 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1437 * guile/scm-type.c (gdbscm_type_tag): Update.
1438 * go-lang.c (sixg_string_p): Update.
1439 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1441 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1442 (TYPE_TAG_NAME): Remove.
1443 * gdbtypes.c (type_name_no_tag): Simplify.
1444 (check_typedef, check_types_equal, recursive_dump_type)
1445 (copy_type_recursive, arch_composite_type): Update.
1446 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1447 in summary mode when needed.
1448 * eval.c (evaluate_funcall): Update.
1449 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1450 (process_structure_scope, read_enumeration_type)
1451 (read_namespace_type, read_module_type, determine_prefix): Update.
1452 * cp-support.c (inspect_type): Update.
1453 * coffread.c (process_coff_symbol, decode_base_type): Update.
1454 * c-varobj.c (c_is_path_expr_parent): Update.
1455 * c-typeprint.c (c_type_print_base_struct_union): Update.
1456 (c_type_print_base_1): Update. Print struct/class/union/enum in
1457 summary when using C language.
1458 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1459 (gen_maybe_namespace_elt): Update.
1460 * ada-lang.c (ada_type_name): Simplify.
1461 (empty_record, ada_template_to_fixed_record_type_1)
1462 (template_to_static_fixed_type)
1463 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1465 2018-06-01 Tom Tromey <tom@tromey.com>
1467 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1469 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1470 (c_print_type): Update.
1471 (c_print_type): New overload.
1472 (c_type_print_varspec_prefix, c_type_print_args)
1473 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1474 (c_type_print_base_struct_union, c_type_print_base_1)
1475 (cp_type_print_method_args): Add "language" parameter.
1476 (c_type_print_base): Update.
1477 * c-lang.h (c_print_type): Add new overload.
1479 2018-06-01 Tom Tromey <tom@tromey.com>
1481 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1482 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1484 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1486 * aarch64-tdep.c (aarch64_sve_register_names): New const
1488 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1489 (AARCH64_SVE_Z_REGS_NUM): New define.
1490 (AARCH64_SVE_P_REGS_NUM): Likewise.
1491 (AARCH64_SVE_NUM_REGS): Likewise.
1493 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1495 * nat/linux-ptrace.h [__alpha__]
1496 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1499 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1501 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1502 the endianness selected.
1503 * NEWS: Document `set endian auto' mode operation update.
1505 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1507 * Makefile.in: Add new header.
1508 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1509 (sve_vl_from_vg): Likewise.
1510 (sve_vq_from_vl): Likewise.
1511 (sve_vl_from_vq): Likewise.
1512 (sve_vq_from_vg): Likewise.
1513 (sve_vg_from_vq): Likewise.
1514 * configure.nat: Add new c file.
1515 * nat/aarch64-sve-linux-ptrace.c: New file.
1516 * nat/aarch64-sve-linux-ptrace.h: New file.
1518 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1520 * aarch64-linux-nat.c (aarch64_linux_read_description):
1522 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1524 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1525 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1526 (aarch64_gdbarch_init): Add parmeter zero.
1527 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1528 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1529 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1531 * doc/gdb.texinfo: Describe SVE feature
1532 * features/aarch64-sve.c: New file.
1534 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1537 * gdbarch.sh (significant_addr_bit): Default to zero when
1538 not set by target architecture.
1539 * gdbarch.c: Re-generated.
1540 * utils.c (address_significant): Update.
1542 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1544 * stack.c (func_command): Remove trailing newline in call to error.
1546 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1548 * regcache.h (regcache_raw_collect): Remove, update callers to
1549 use regcache::raw_collect.
1550 * regcache.c (regcache_raw_collect): Remove.
1552 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1554 * regcache.h (regcache_raw_supply): Remove, update callers to
1555 use detached_regcache::raw_supply.
1556 * regcache.c (regcache_raw_supply): Remove.
1558 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1560 * regcache.h (regcache_cooked_write_part): Remove, update
1561 callers to use regcache::cooked_write_part.
1562 * regcache.c (regcache_cooked_write_part): Remove.
1564 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1566 * regcache.h (regcache_cooked_read_part): Remove, update callers
1567 to use readable_regcache::cooked_read_part.
1568 * regcache.c (regcache_cooked_read_part): Remove.
1570 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1572 * regcache.h (regcache_cooked_read_value): Remove, update
1573 callers to use readable_regcache::cooked_read_value.
1574 * regcache.c (regcache_cooked_read_value): Remove.
1576 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1578 * regcache.h (regcache_cooked_write): Remove, update callers to
1579 use regcache::cooked_write.
1580 * regcache.c (regcache_cooked_write): Remove.
1582 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1584 * regcache.h (regcache_invalidate): Remove, update callers to
1585 use detached_regcache::invalidate instead.
1586 * regcache.c (regcache_invalidate): Remove.
1588 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1590 * regcache.h (regcache_raw_write_part): Remove, update callers
1591 to use regcache::raw_write_part instead.
1592 * regcache.c (regcache_raw_write_part): Remove.
1594 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1596 * regcache.h (regcache_raw_read_part): Remove, update callers to
1597 use readable_regcache::raw_read_part instead.
1598 * regcache.c (regcache_raw_read_part): Remove.
1600 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1602 * regcache.h (regcache_cooked_read): Remove, update callers to
1603 use readable_regcache::cooked_read instead.
1604 * regcache.c (regcache_cooked_read): Remove.
1606 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1608 * regcache.h (regcache_raw_write): Remove, update callers to use
1609 regcache::raw_write instead.
1610 * regcache.c (regcache_raw_write): Remove.
1612 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1614 * regcache.h (regcache_raw_read): Remove, update callers to use
1615 readable_regcache::raw_read instead.
1616 * regcache.c (regcache_raw_read): Remove.
1618 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1620 * regcache.h (regcache_raw_update): Remove, update callers to
1621 use readable_regcache::raw_update instead.
1622 * regcache.c (regcache_raw_update): Remove.
1624 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1626 * regcache.h (regcache_register_status): Remove, update callers
1627 to use reg_buffer::get_register_status directly instead.
1628 * regcache.c (regcache_register_status): Remove.
1630 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1632 * regcache.h (regcache_get_ptid): Remove, update all callers to
1633 call regcache::ptid instead.
1634 * regcache.c (regcache_get_ptid): Remove.
1636 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1638 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1640 2018-05-30 Pedro Alves <palves@redhat.com>
1642 * common/common-exceptions.h (exception_rethrow): Use
1645 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1647 * breakpoint.c (print_solib_event, check_status_catch_solib):
1648 Remove struct keyword in range-based for loops.
1649 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1650 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1652 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1654 * symfile.c (addr_info_make_relative): Likewise.
1655 * thread.c (value_in_thread_stack_temporaries): Likewise.
1657 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1660 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1661 aggregate type to get its real type before accessing it.
1663 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1665 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1666 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1667 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1668 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1669 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1670 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1671 * printcmd.c (info_address_command): Likewise.
1673 2018-05-29 Tom Tromey <tom@tromey.com>
1675 * windows-nat.c (handle_exception): Update fall-through comment.
1677 2018-05-29 Tom Tromey <tom@tromey.com>
1679 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1680 (struct program_space) <added_solibs>: Now a std::vector.
1681 * breakpoint.c (print_solib_event): Update.
1682 (check_status_catch_solib): Update.
1683 * progspace.c (clear_program_space_solib_cache): Update.
1684 * solib.c (update_solib_list): Update.
1686 2018-05-29 Tom Tromey <tom@tromey.com>
1688 * python/py-type.c (typy_richcompare): Update.
1689 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1690 * gdbtypes.h (types_deeply_equal): Return bool.
1691 (types_equal): Likewise.
1692 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1694 (check_types_equal): Change worklist to std::vector. Return
1696 (struct type_equality_entry): Add constructor.
1697 (compare_maybe_null_strings): Return bool.
1698 (check_types_worklist): Return bool. Change worklist to
1700 (types_deeply_equal): Use std::vector.
1701 (types_equal): Return bool.
1702 (compare_maybe_null_strings): Simplify.
1704 2018-05-29 Tom Tromey <tom@tromey.com>
1706 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1708 2018-05-29 Tom Tromey <tom@tromey.com>
1710 * objc-lang.h: Don't include cp-support.h.
1711 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1714 2018-05-27 Tom Tromey <tom@tromey.com>
1716 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1718 2018-05-25 Tom Tromey <tom@tromey.com>
1720 * value.c (value::location): Initialize.
1722 2018-05-25 Tom Tromey <tom@tromey.com>
1724 * dbxread.c (init_bincl_list): Remove.
1725 (bincl_list): Now a std::vector.
1726 (bincls_allocated, next_bincl): Remove.
1727 (free_bincl_list, do_free_bincl_list_cleanup)
1728 (make_cleanup_free_bincl_list): Remove.
1729 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1731 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1732 (struct header_file_location): Add constructor.
1733 (add_bincl_to_list): Remove.
1735 2018-05-25 Tom Tromey <tom@tromey.com>
1737 * tui/tui.c (tui_enable): Update.
1738 * mi/mi-interp.c (mi_interp::init): Update.
1739 * interps.h (class interp) <name>: New method.
1740 <m_name>: Rename from name.
1741 (~scoped_restore_interp): Update.
1742 * interps.c (interp::interp): Update.
1743 (interp_add, interp_set, interp_lookup_existing)
1744 (current_interp_named_p): Update.
1746 2018-05-25 Tom Tromey <tom@tromey.com>
1748 * interps.c (interp_name): Remove.
1749 * mi/mi-interp.c (mi_interp::init): Update.
1750 * interps.h (interp_name): Remove.
1751 (~scoped_restore_interp): Update.
1752 * tui/tui.c (tui_enable): Update.
1754 2018-05-25 Tom Tromey <tom@tromey.com>
1756 * utils.c (fputs_maybe_filtered): Update.
1757 * linespec.c (decode_line_full): Update.
1758 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1759 (mi_print_breakpoint_for_event, mi_solib_loaded)
1760 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1761 (mi_user_selected_context_changed): Update.
1762 * mi/mi-main.c (mi_execute_command): Update.
1763 * cli/cli-script.c (execute_control_command): Update.
1764 * python/python.c (execute_gdb_command): Update.
1765 * solib.c (info_sharedlibrary_command): Update.
1766 * interps.c (interp_ui_out): Remove.
1767 * interps.h (interp_ui_out): Remove.
1769 2018-05-25 Tom Tromey <tom@tromey.com>
1771 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1772 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1773 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1775 2018-05-25 Tom Tromey <tom@tromey.com>
1777 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1778 * interps.c (interp_exec): Use scoped_restore.
1780 2018-05-25 Tom Tromey <tom@tromey.com>
1782 * remote.c (remote_target::remote_file_get): Use
1784 (remote_target::remote_file_put): Likewise.
1786 2018-05-25 Tom Tromey <tom@tromey.com>
1788 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1790 (get_pe_section_index, add_pe_exported_sym): Update.
1791 (read_pe_exported_syms): Use gdb::def_vector.
1793 2018-05-25 Tom Tromey <tom@tromey.com>
1795 * frame.c (remove_prev_frame): Remove.
1796 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1798 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1800 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1802 * mips-linux-nat.c (supply_fpregset): Always call
1803 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1804 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1805 `mips_fill_fpregset'.
1806 * mips-linux-tdep.c (mips_supply_fpregset)
1807 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1808 (mips_fill_fpregset_wrapper): Remove functions.
1809 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1810 (mips_linux_fpregset): Remove variable.
1811 (mips_linux_iterate_over_regset_sections): Use
1812 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1813 (mips_linux_o32_sigframe_init): Remove comment.
1815 2018-05-25 Pedro Alves <palves@redhat.com>
1817 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1818 (struct readahead_cache, struct packet_reg, struct
1819 remote_arch_state, class remote_state): Move higher up in the
1821 (remote_target::m_remote_state): Now an object instead of a pointer.
1822 (remote_target::get_remote_state): Adjust.
1824 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1826 * stack.c (select_and_print_frame): Delete.
1827 (struct function_bounds): Move struct within function.
1828 (func_command): Most content moved into new function
1829 find_frame_for_function, use new function, print result, add
1831 (find_frame_for_function): New function, now returns a result.
1833 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1835 * stack.c (iterate_over_block_arg_vars): Fix comment.
1836 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1838 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1842 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1844 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1846 * frame.h (class scoped_restore_selected_frame): New class.
1847 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1848 of any exception, use scoped_restore_selected_frame to restore the
1851 2018-05-24 Pedro Alves <palves@redhat.com>
1853 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1856 2018-05-23 Tom Tromey <tom@tromey.com>
1858 * complaints.c (struct complaints): Remove.
1859 (symfile_complaint_book): Remove.
1860 (series): New global.
1861 (complaint_internal): Update.
1862 (clear_complaints): Update.
1864 2018-05-23 Tom Tromey <tom@tromey.com>
1866 * complaints.c (counters): New global.
1867 (struct complain): Remove.
1868 (struct complaints) <root>: Remove.
1869 (complaint_sentinel): Remove.
1870 (symfile_complaint_book): Update.
1871 (find_complaint) Remove.
1872 (complaint_internal, clear_complaints): Update.
1874 2018-05-23 Tom Tromey <tom@tromey.com>
1876 * complaints.c (struct complain) <file, line>: Remove.
1877 (find_complaint): Remove file, line parameters.
1878 (complaint_internal): Update.
1880 2018-05-23 Tom Tromey <tom@tromey.com>
1882 * complaints.c (vcomplaint): Remove.
1883 (complaint_internal) Merge in contents of vcomplaint.
1885 2018-05-23 Tom Tromey <tom@tromey.com>
1887 * complaints.c (struct complaints) <explanation>: Remove.
1888 (symfile_explanations): Remove.
1889 (symfile_complaint_book): Update.
1890 (vcomplaint): Update.
1891 (struct explanation): Remove.
1893 2018-05-23 Tom Tromey <tom@tromey.com>
1895 * complaints.c (symfile_complaints): Remove.
1896 (complaint_internal): Remove "complaints" parameter.
1897 (clear_complaints, vcomplaint): Remove "c" parameter.
1898 (get_complaints): Remove.
1899 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1900 (dwarf2_debug_line_missing_file_complaint)
1901 (dwarf2_debug_line_missing_end_sequence_complaint)
1902 (dwarf2_complex_location_expr_complaint)
1903 (dwarf2_const_value_length_mismatch_complaint)
1904 (dwarf2_section_buffer_overflow_complaint)
1905 (dwarf2_macro_malformed_definition_complaint)
1906 (dwarf2_invalid_attrib_class_complaint)
1907 (create_addrmap_from_index, dw2_symtab_iter_next)
1908 (dw2_expand_marked_cus)
1909 (dw2_debug_names_iterator::find_vec_in_debug_names)
1910 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1911 (create_debug_type_hash_table, init_cutu_and_read_dies)
1912 (partial_die_parent_scope, add_partial_enumeration)
1913 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1914 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1915 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1916 (create_cus_hash_table, create_dwp_hash_table)
1917 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1918 (dwarf2_rnglists_process, dwarf2_ranges_process)
1919 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1920 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1921 (handle_struct_member_die, process_structure_scope)
1922 (read_array_type, read_common_block, read_module_type)
1923 (read_tag_pointer_type, read_typedef, read_base_type)
1924 (read_subrange_type, load_partial_dies, partial_die_info::read)
1925 (partial_die_info::read, partial_die_info::read)
1926 (partial_die_info::read, read_checked_initial_length_and_offset)
1927 (dwarf2_string_attr, read_formatted_entries)
1928 (dwarf_decode_line_header)
1929 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1930 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1931 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1932 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1933 (get_signatured_type, get_DW_AT_signature_type)
1934 (decode_locdesc, file_file_name, consume_improper_spaces)
1935 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1936 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1937 (dwarf2_symbol_mark_computed, set_die_type)
1938 (read_attribute_value): Update.
1939 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1941 * dbxread.c (unknown_symtype_complaint)
1942 (lbrac_mismatch_complaint, repeated_header_complaint)
1943 (set_namestring, function_outside_compilation_unit_complaint)
1944 (read_dbx_symtab, process_one_symbol): Update.
1945 * gdbtypes.c (stub_noname_complaint): Update.
1946 * windows-nat.c (handle_unload_dll): Update.
1947 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1948 (decode_base_type): Update.
1949 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1950 (eb_complaint, record_include_begin, record_include_end)
1951 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1952 (process_xcoff_symbol, read_symbol)
1953 (function_outside_compilation_unit_complaint)
1954 (scan_xcoff_symtab): Update.
1955 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1956 * buildsym.c (finish_block_internal, make_blockvector)
1957 (end_symtab_get_static_block, augment_type_symtab): Update.
1958 * dtrace-probe.c (dtrace_process_dof)
1959 (dtrace_static_probe_ops::get_probes): Update.
1960 * complaints.h (struct complaint): Don't declare.
1961 (symfile_complaints): Remove.
1962 (complaint_internal): Remove "complaints" parameter.
1963 (complaint): Likewise.
1964 (clear_complaints): Likewise.
1965 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1966 (reread_symbols): Update.
1967 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1968 (dwarf2_frame_cache, decode_frame_entry): Update.
1969 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1970 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1971 (info_selectors_command): Update.
1972 * macrotab.c (macro_include, check_for_redefinition)
1973 (macro_undef): Update.
1974 * objfiles.c (filter_overlapping_sections): Update.
1975 * stabsread.c (invalid_cpp_abbrev_complaint)
1976 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1977 (define_symbol, error_type, read_type, rs6000_builtin_type)
1978 (stabs_method_name_from_physname, read_member_functions)
1979 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1980 (attach_fields_to_type, complain_about_struct_wipeout)
1981 (read_range_type, read_args, common_block_start)
1982 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1984 * mdebugread.c (index_complaint, unknown_ext_complaint)
1985 (basic_type_complaint, bad_tag_guess_complaint)
1986 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1987 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1988 (parse_procedure, parse_lines)
1989 (function_outside_compilation_unit_complaint)
1990 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1991 (bad_tag_guess_complaint, reg_value_complaint): Update.
1992 * cp-support.c (demangled_name_complaint): Update.
1993 * macroscope.c (sal_macro_scope): Update.
1994 * dwarf-index-write.c (class debug_names): Update.
1996 2018-05-23 Tom Tromey <tom@tromey.com>
1998 * complaints.c (clear_complaints): Remove "noisy" parameter.
1999 * complaints.h (clear_complaints): Update.
2000 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2001 (reread_symbols): Update.
2003 2018-05-23 Tom Tromey <tom@tromey.com>
2005 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2007 (vcomplaint, clear_complaints): Update.
2008 (symfile_explanations): Remove some messages.
2010 2018-05-23 Tom Tromey <tom@tromey.com>
2012 * complaints.c (internal_complaint): Remove.
2013 * complaints.h (internal_complaint): Remove.
2015 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2017 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2019 2018-05-22 Pedro Alves <palves@redhat.com>
2021 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2022 (remote_fileio_badfd, remote_fileio_return_errno)
2023 (remote_fileio_return_success, remote_fileio_func_open)
2024 (remote_fileio_func_open, remote_fileio_func_close)
2025 (remote_fileio_func_read, remote_fileio_func_write)
2026 (remote_fileio_func_lseek, remote_fileio_func_rename)
2027 (remote_fileio_func_unlink, remote_fileio_func_stat)
2028 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2029 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2030 remote_target parameter.
2031 (remote_fio_func_map) <func>: Add remote_target parameter.
2032 (do_remote_fileio_request, remote_fileio_request):
2033 * remote-fileio.h (remote_fileio_request):
2034 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2035 remote_target parameter.
2036 (remote_notif_process, handle_notification): Adjust to pass down
2038 (remote_notif_state_allocate): Add remote_target parameter. Save
2040 * remote-notif.h (struct remote_target): Forward declare.
2041 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2042 remote_target parameter.
2043 (struct remote_notif_state) <remote>: New field.
2044 (remote_notif_ack, remote_notif_parse): Add remote_target
2046 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2047 remote_target parameter.
2048 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2049 (threads_listing_context, rmt_thread_action, protocol_feature)
2050 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2051 (packet_result, struct threads_listing_context, remote_state):
2052 Move definitions and declarations higher up.
2053 (remote_target) <~remote_target>: Declare.
2054 (remote_download_command_source, remote_file_put, remote_file_get)
2055 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2056 (remote_hostio_pread_vFile, remote_hostio_send_command)
2057 (remote_hostio_set_filesystem, remote_hostio_open)
2058 (remote_hostio_close, remote_hostio_unlink, remote_state)
2059 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2060 (get_memory_write_packet_size, get_memory_read_packet_size)
2061 (append_pending_thread_resumptions, remote_detach_1)
2062 (append_resumption, remote_resume_with_vcont)
2063 (add_current_inferior_and_thread, wait_ns, wait_as)
2064 (process_stop_reply, remote_notice_new_inferior)
2065 (process_initial_stop_replies, remote_add_thread)
2066 (btrace_sync_conf, remote_btrace_maybe_reopen)
2067 (remove_new_fork_children, kill_new_fork_children)
2068 (discard_pending_stop_replies, stop_reply_queue_length)
2069 (check_pending_events_prevent_wildcard_vcont)
2070 (discard_pending_stop_replies_in_queue, stop_reply)
2071 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2072 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2073 (remote_interrupt_as, remote_interrupt_ns)
2074 (remote_get_noisy_reply, remote_query_attached)
2075 (remote_add_inferior, remote_current_thread, get_current_thread)
2076 (set_thread, set_general_thread, set_continue_thread)
2077 (set_general_process, write_ptid)
2078 (remote_unpack_thread_info_response, remote_get_threadinfo)
2079 (parse_threadlist_response, remote_get_threadlist)
2080 (remote_threadlist_iterator, remote_get_threads_with_ql)
2081 (remote_get_threads_with_qxfer)
2082 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2083 (get_offsets, remote_check_symbols, remote_supported_packet)
2084 (remote_query_supported, remote_packet_size)
2085 (remote_serial_quit_handler, remote_detach_pid)
2086 (remote_vcont_probe, remote_resume_with_hc)
2087 (send_interrupt_sequence, interrupt_query)
2088 (remote_notif_get_pending_events, fetch_register_using_p)
2089 (send_g_packet, process_g_packet, fetch_registers_using_g)
2090 (store_register_using_P, store_registers_using_G)
2091 (set_remote_traceframe, check_binary_download)
2092 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2093 (remote_xfer_live_readonly_partial, remote_read_bytes)
2094 (remote_send_printf, remote_flash_write, readchar)
2095 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2096 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2097 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2098 (extended_remote_disable_randomization, extended_remote_run)
2099 (send_environment_packet, extended_remote_environment_support)
2100 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2101 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2102 (packet_command): Now methods of ...
2103 (remote_target): ... this class.
2104 (m_remote_state) <remote_target>: New field.
2105 (struct remote_state) <stop_reply_queue,
2106 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2108 (remote_state::remote_state): Allocate stop_reply_queue.
2109 (remote_state): Delete global.
2110 (get_remote_state_raw): Delete.
2111 (remote_target::get_remote_state): Allocate m_remote_state on
2113 (get_current_remote_target): New.
2114 (remote_ops, extended_remote_ops): Delete.
2115 (wait_forever_enabled_p, remote_async_inferior_event_token):
2116 Delete, moved to struct remote_state.
2117 (remote_target::close): Delete self. Destruction bits split to
2119 (remote_target::~remote_target): ... this.
2120 (show_memory_packet_size): Adjust to use
2121 get_current_remote_target.
2122 (struct protocol_feature) <func>: Add remote_target parameter.
2123 All callers adjusted.
2124 (curr_quit_handler_target): New.
2125 (remote_serial_quit_handler): Reimplement.
2126 (remote_target::open_1): Adjust to use get_current_remote_target.
2127 Heap-allocate remote_target/extended_remote_target instances.
2128 (vcont_builder::vcont_builder): Add remote_target parameter, and
2129 save it in m_remote. All callers adjusted.
2130 (vcont_builder::m_remote): New field.
2131 (vcont_builder::restart, vcont_builder::flush)
2132 (vcont_builder::push_action): Use it.
2133 (remote_target::commit_resume): Use it.
2134 (struct queue_iter_param) <remote>: New field.
2135 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2136 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2137 (check_pending_event_prevents_wildcard_vcont_callback)
2138 (remote_target::check_pending_events_prevent_wildcard_vcont)
2139 (remote_target::discard_pending_stop_replies)
2140 (remote_target::discard_pending_stop_replies_in_queue)
2141 (remote_target::remote_notif_remove_queued_reply): Fill in
2143 (remote_notif_get_pending_events): New.
2144 (remote_target::readchar, remote_target::remote_serial_write):
2145 Save/restore curr_quit_handler_target.
2147 (kill_new_fork_children): Fill in 'remote' field.
2148 (packet_command): Use get_current_remote_target, defer to
2149 remote_target method of same name.
2150 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2151 parameter, and save it in m_remote. All callers adjusted.
2152 (scoped_remote_fd::release): Use m_remote.
2153 (scoped_remote_fd::m_remote): New field.
2154 (remote_file_put, remote_file_get, remote_file_delete): Use
2155 get_current_remote_target, defer to remote_target method of same
2157 (remote_btrace_reset): Add remote_state paremeter. Update all
2159 (remote_async_inferior_event_handler). Pass down 'data'.
2160 (remote_new_objfile): Use get_current_remote_target.
2161 (remote_target::vcont_r_supported): New.
2162 (set_range_stepping): Use get_current_remote_target and
2163 remote_target::vcont_r_supported.
2164 (_initialize_remote): Don't allocate 'remote_state' and
2165 'stop_reply_queue' globals.
2166 * remote.h (struct remote_target): Forward declare.
2167 (getpkt, putpkt, remote_notif_get_pending_events): Add
2168 'remote_target' parameter.
2170 2018-05-22 Pedro Alves <palves@redhat.com>
2172 * remote.c (vcont_builder): Now a class. Make all data members
2174 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2176 (vcont_builder_restart): Rename to ...
2177 (vcont_builder::restart): ... this.
2178 (vcont_builder_flush): Rename to ...
2179 (vcont_builder::flush): ... this.
2180 (vcont_builder_push_action): Rename to ...
2181 (vcont_builder::push_action): ... this.
2182 (remote_target::commit_resume): Adjust.
2184 2018-05-22 Pedro Alves <palves@redhat.com>
2186 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2187 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2188 (get_fixed_memory_packet_size): New.
2189 (get_memory_packet_size): Use it.
2190 (set_memory_packet_size): Don't override the config size with
2191 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2192 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2193 Don't refer to get_memory_packet_size if not connected to a remote
2194 target. Show "(default)" if configured size is 0.
2196 2018-05-22 Pedro Alves <palves@redhat.com>
2198 * remote.c (remote_target::mourn_inferior): Move
2199 discard_pending_stop_replies call here from ...
2200 (_initialize_remote): ... here.
2202 2018-05-22 Pedro Alves <palves@redhat.com>
2204 * remote.c (compare_section_command): Remove set_general_process
2207 2018-05-22 Pedro Alves <palves@redhat.com>
2209 * remote.c (struct packet_reg, struct remote_arch_state):
2210 Move higher up in the file.
2211 (remote_state) <m_arch_states>: Store remote_arch_state values
2212 instead of remote_arch_state pointers.
2213 (remote_state::get_remote_arch_state): Adjust.
2215 2018-05-22 Pedro Alves <palves@redhat.com>
2217 * remote.c: Include <unordered_map>.
2218 (remote_state): Now a class.
2219 (remote_state) <get_remote_arch_state>: Declare method.
2220 <get_remote_arch_state>: New field.
2221 (remote_arch_state) <remote_arch_state>: Declare ctor.
2222 <regs>: Now a unique_ptr.
2223 (remote_gdbarch_data_handle): Delete.
2224 (get_remote_arch_state): Delete.
2225 (remote_state::get_remote_arch_state): New.
2226 (get_remote_state): Adjust to call remote_state's
2227 get_remote_arch_state method.
2228 (init_remote_state): Delete, bits factored out to ...
2229 (remote_arch_state::remote_arch_state): ... this new method.
2230 (get_remote_packet_size, get_memory_packet_size)
2231 (process_g_packet, remote_target::fetch_registers)
2232 (remote_target::prepare_to_store, store_registers_using_G)
2233 (remote_target::store_registers, remote_target::get_trace_status):
2234 Adjust to call remote_state's method.
2235 (_initialize_remote): Remove reference to
2236 remote_gdbarch_data_handle.
2238 2018-05-22 Pedro Alves <palves@redhat.com>
2240 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2241 pread>: New method declarations.
2242 (remote_target::open_1): Adjust.
2243 (readahead_cache_invalidate): Rename to ...
2244 (readahead_cache::invalidate): ... this, and adjust to be a class
2246 (readahead_cache_invalidate_fd): Rename to ...
2247 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2249 (remote_hostio_pwrite): Adjust.
2250 (remote_hostio_pread_from_cache): Rename to ...
2251 (readahead_cache::pread): ... this, and adjust to be a class
2253 (remote_hostio_close): Adjust.
2255 2018-05-22 Pedro Alves <palves@redhat.com>
2257 * remote.c (remote_hostio_close_cleanup): Delete.
2258 (class scoped_remote_fd): New.
2259 (remote_file_put, remote_file_get): Use it.
2261 2018-05-22 Pedro Alves <palves@redhat.com>
2263 (struct vCont_action_support): Use bool and initialize all fields.
2264 (struct readahead_cache): Initialize all fields.
2265 (remote_state): Use bool and initialize all fields.
2266 (remote_state::remote_state, remote_state::~remote_state): New.
2267 (new_remote_state): Delete.
2268 (_initialize_remote): Use new to allocate remote_state.
2270 2018-05-22 Pedro Alves <palves@redhat.com>
2274 * c-exp.y: Include "c-support.h".
2275 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2276 of tolower. Use c_ident_is_alpha to scan names.
2277 * c-lang.c: Include "c-support.h".
2278 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2279 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2280 * c-support.h: New file, with bits factored out from ...
2281 * cp-name-parser.y: ... this file.
2282 Include "c-support.h".
2283 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2284 c-support.h and renamed.
2285 (symbol_end, yylex): Adjust.
2287 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2289 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2290 parameter type to CORE_ADDR.
2291 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2292 parameter type in declaration to CORE_ADDR.
2293 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2294 target_auxv_search to get AT_HWCAP and use the result to get the
2296 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2297 to CORE_ADDR. Remove the cast of the return value to unsigned
2298 long. Fix error predicate of target_auxv_search.
2299 (ppc_linux_nat_target::read_description): Change the type of the
2300 hwcap variable to CORE_ADDR.
2302 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2304 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2305 if the size of fpscr is larger than 32 bits.
2307 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2309 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2310 (ppc32_linux_vsxregmap): New global.
2311 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2312 regcache_supply_regset, and regcache_collect_regset.
2313 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2314 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2315 (fetch_vsx_register, store_vsx_register): Remove.
2316 (fetch_vsx_registers): Add regno parameter. Get regset using
2317 ppc_linux_vsxregset. Use regset to supply registers.
2318 (store_vsx_registers): Add regno parameter. Get regset using
2319 ppc_linux_vsxregset. Use regset to collect registers.
2320 (fetch_register): Call fetch_vsx_registers instead of
2322 (store_register): Call store_vsx_registers instead of
2324 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2325 new regno parameter.
2326 (store_ppc_registers): Call store_vsx_registers with -1 for the
2327 new regno parameter.
2328 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2329 (ppc_collect_vsxregset): Remove.
2331 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2333 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2335 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2336 for vector register offset fields.
2337 (ppc64_fbsd_reg_offsets): Likewise.
2338 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2339 to vector register offset fields.
2340 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2341 to vector register offset fields.
2342 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2343 vector register offset fields.
2344 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2345 initializers for vector register offset fields.
2346 (rs6000_aix64_reg_offsets): Likewise.
2347 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2348 (ppc_supply_vrregset): Remove.
2349 (ppc_collect_vrregset): Remove.
2350 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2351 (ppc_linux_vrregset) : New function.
2352 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2353 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2354 (ppc32_linux_vrregset): Remove.
2355 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2356 and use result instead of ppc32_linux_vrregset.
2357 (ppc32_linux_reg_offsets): Remove initializers for vector register
2359 (ppc64_linux_reg_offsets): Likewise.
2360 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2361 * ppc-linux-nat.c: Include regset.h.
2362 (gdb_vrregset_t): Adjust comment to account for little-endian
2364 (supply_vrregset, fill_vrregset): Remove.
2365 (fetch_altivec_register, store_altivec_register): Remove.
2366 (fetch_altivec_registers): Add regno parameter. Get regset using
2367 ppc_linux_vrregset. Use regset to supply registers.
2368 (store_altivec_registers): Add regno parameter. Get regset using
2369 ppc_linux_vrregset. Use regset to collect registers.
2370 (fetch_register): Call fetch_altivec_registers instead of
2371 fetch_altivec_register.
2372 (store_register): Call store_altivec_registers instead of
2373 store_altivec_register.
2374 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2375 the new regno parameter.
2376 (store_ppc_registers): Call store_altivec_registers with -1 for
2377 the new regno parameter.
2379 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2381 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2382 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2383 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2384 (gdb_vrregset_t): Change array type size to
2385 PPC_LINUX_SIZEOF_VRREGSET.
2386 (gdb_vsxregset_t): Change array type size to
2387 PPC_LINUX_SIZEOF_VSXREGSET.
2388 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2389 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2390 PPC_LINUX_SIZEOF_VSXREGSET.
2392 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2394 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2395 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2397 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2398 ppc_linux_target_wordsize with tid.
2399 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2401 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2402 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2403 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2404 tid parameter. Remove static specifier.
2405 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2406 (ppc_linux_target_wordsize): New declaration.
2408 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2410 * arch/ppc-linux-common.c: New file.
2411 * arch/ppc-linux-common.h: New file.
2412 * arch/ppc-linux-tdesc.h: New file.
2413 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2414 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2415 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2416 arch/ppc-linux-tdesc.h.
2417 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2418 arch/ppc-linux-tdesc.h.
2419 (ppc_linux_nat_target::read_description): Remove target
2420 description matching code. Fill a ppc_linux_features struct and
2421 call ppc_linux_match_description with it. Move comment about ISA
2422 2.05 to ppc-linux-common.c.
2423 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2424 arch/ppc-linux-tdesc.h.
2425 (ppc_linux_core_read_description): Remove target description
2426 matching code. Fill a ppc_linux_features struct and call
2427 ppc_linux_match_description with it.
2428 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2429 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2430 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2431 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2432 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2433 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2434 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2435 (tdesc_powerpc_e500l): Remove.
2437 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2439 * ada-lang.c (catch_assert_command): Pass empty string instead
2440 of NULL for excep_string argument.
2442 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2444 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2445 the width of the requested register exceeds the width of the
2448 2018-05-21 Tom Tromey <tom@tromey.com>
2450 * printcmd.c (output_command): Remove.
2451 (output_command_const): Rename to output_command.
2452 * valprint.h (output_command): Rename from output_command_const.
2453 * tracepoint.c (trace_dump_actions): Call output_command.
2455 2018-05-21 Tom Tromey <tom@tromey.com>
2457 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2458 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2459 * ada-lang.h (create_ada_exception_catchpoint): Update.
2460 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2462 (create_excep_cond_exprs, ~ada_catchpoint)
2463 (should_stop_exception, print_one_exception)
2464 (print_mention_exception, print_recreate_exception): Update.
2465 (ada_get_next_arg): Remove.
2466 (catch_ada_exception_command_split): Use std::string. Change type
2467 of "excep_string", "cond_string".
2468 (catch_ada_exception_command): Update.
2469 (create_ada_exception_catchpoint): Change type of excep_string.
2470 (ada_exception_sal): Remove excep_string parameter.
2471 (~ada_catchpoint): Remove.
2473 2018-05-21 Tom Tromey <tom@tromey.com>
2475 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2478 2018-05-21 Tom Tromey <tom@tromey.com>
2480 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2481 Return unique_xmalloc_ptr.
2482 (print_it_exception): Update.
2484 2018-05-21 Tom Tromey <tom@tromey.com>
2486 * tracepoint.c (trace_dump_actions): Use std::string.
2488 2018-05-21 Tom Tromey <tom@tromey.com>
2490 * symfile.c (reread_symbols): Use std::string for original_name.
2492 2018-05-21 Tom Tromey <tom@tromey.com>
2494 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2495 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2498 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2500 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2502 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2503 * objfiles.c (get_objfile_bfd_data): Allocate
2504 objfile_per_bfd_storage with obstack_new when allocating on
2507 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2509 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2511 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2512 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2513 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2514 (add_pending): Likewise.
2515 (parse_symbol): Likewise.
2516 (parse_partial_symbols): Likewise.
2517 (psymtab_to_symtab_1): Likewise.
2518 (new_psymtab): Likewise.
2519 (elfmdebug_build_psymtabs): Likewise.
2520 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2521 * objfiles.c (get_objfile_bfd_data): Likewise.
2522 (objfile_register_static_link): Likewise.
2523 * psymtab.c (allocate_psymtab): Likewise.
2524 * stabsread.c (read_member_functions): Likewise.
2525 * xcoffread.c (xcoff_end_psymtab): Likewise.
2527 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2529 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2530 compiler supports std::is_trivially_constructible.
2531 * common/poison.h: Include obstack.h.
2532 (IsMallocable): Define to is_trivially_constructible if the
2533 compiler supports it, define to true_type otherwise.
2537 (XOBNEWVEC): Redefine.
2538 * gdb_obstack.h (obstack_zalloc): New.
2539 (OBSTACK_ZALLOC): Redefine.
2540 (obstack_calloc): New.
2541 (OBSTACK_CALLOC): Redefine.
2543 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2544 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2546 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2547 obstack_calloc/obstack_zalloc.
2548 (gdbarch_obstack_zalloc): Remove.
2549 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2551 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2553 * stack.c (backtrace_command_1): Remove useless variable int i.
2555 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2557 * stack.c (print_frame_info): Fix comment.
2559 2018-05-18 Tom Tromey <tom@tromey.com>
2561 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2562 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2563 (~dwarf2_per_objfile): Update
2564 (dwarf2_get_dwz_file): Use new.
2565 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2568 2018-05-18 Tom Tromey <tom@tromey.com>
2570 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2572 * dwarf2read.c (struct dwp_file): Add constructor and
2574 (open_and_init_dwp_file): Return a unique_ptr.
2575 (dwarf2_per_objfile, create_dwp_hash_table)
2576 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2577 (lookup_dwo_unit_in_dwp): Update.
2578 (open_and_init_dwp_file, get_dwp_file): Update.
2580 2018-05-18 Tom Tromey <tom@tromey.com>
2582 * dwarf2read.c (dwarf2_per_objfile): Update.
2583 (struct mapped_index): Add initializers.
2584 (dwarf2_read_index): Use new.
2585 (dw2_symtab_iter_init): Update.
2586 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2589 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2591 * dwarf2read.c (mapped_index) <total_size>: Remove.
2593 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2595 * unittests/format_pieces-selftests.c (test_format_specifier):
2598 2018-05-18 Tom Tromey <tom@tromey.com>
2600 * c-typeprint.c (maybe_print_hole): New function.
2601 (c_print_type_struct_field_offset): Update.
2602 (c_type_print_base_struct_union): Call maybe_print_hole.
2604 2018-05-17 Keith Seitz <keiths@redhat.com>
2606 * breakpoint.c (build_bpstat_chain): New function, moved from
2608 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2609 If no stop chain is passed, call build_bpstat_chain to build it.
2610 * breakpoint.h (build_bpstat_chain): Declare.
2611 (bpstat_stop_status): Move documentation here from breakpoint.c.
2612 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2613 build the stop chain and pass it to skip_inline_frames.
2614 Pass this stop chain to bpstat_stop_status.
2615 * inline-frame.c: Include breakpoint.h.
2616 (stopped_by_user_bp_inline_frame): New function.
2617 (skip_inline_frames): Add parameter `stop_chain'.
2618 Move documention to inline-frame.h.
2619 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2620 whether the frame should be elided.
2621 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2622 Add moved documentation and update for new parameter.
2624 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2627 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2628 unittests/format_pieces-selftests.c.
2629 * common/format.h (format_piece) <operator==>: New.
2630 (format_pieces) <operator[]>: Remove.
2631 * common/format.c (format_pieces::format_pieces): Handle \e.
2632 * unittests/format_pieces-selftests.c: New.
2634 2018-05-17 Tom Tromey <tom@tromey.com>
2637 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2638 (dw2_instantiate_symtab): Add skip_partial parameter.
2639 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2640 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2641 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2642 (dw2_expand_symtabs_matching_one)
2643 (dw2_find_pc_sect_compunit_symtab)
2644 (dw2_debug_names_lookup_symbol)
2645 (dw2_debug_names_expand_symtabs_for_function): Update.
2646 (init_cutu_and_read_dies): Add skip_partial parameter.
2647 (process_psymtab_comp_unit, build_type_psymtabs_1)
2648 (process_skeletonless_type_unit, load_partial_comp_unit)
2649 (psymtab_to_symtab_1): Update.
2650 (load_full_comp_unit): Add skip_partial parameter.
2651 (process_imported_unit_die, dwarf2_read_addr_index)
2652 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2653 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2654 (read_signatured_type): Update.
2656 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2658 * value.c (release_value): Remove unused variable.
2659 (record_latest_value): Likewise.
2660 (access_value_history): Likewise.
2661 (preserve_values): Likewise.
2663 2018-05-17 Tom Tromey <tom@tromey.com>
2665 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2668 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2671 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2672 Also handle registers whose width is not a multiple of
2674 (linux_nat_trad_target::store_register): Likewise.
2676 2018-05-16 Tom Tromey <tom@tromey.com>
2678 * gdbcore.h (core_bfd): Redefine.
2679 * corelow.c (core_target::close): Update.
2680 (core_target_open): Update.
2681 * progspace.h (struct program_space) <cbfd>: Now a
2684 2018-05-16 Tom Tromey <tom@tromey.com>
2687 * symfile-add-flags.h (enum symfile_add_flags)
2688 <SYMFILE_NOT_FILENAME>: New constant.
2689 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2690 objfile name from BFD.
2691 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2692 * minidebug.c (find_separate_debug_file_in_section): Put
2693 ".gnu_debugdata" into BFD's file name.
2695 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2697 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2700 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2703 * aarch64-tdep.c (aarch64_analyze_prologue,
2704 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2705 Indicate not interested in errors.
2707 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2709 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2710 Supply the MIPS_ZERO_REGNUM register.
2712 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2714 * mips-tdep.c (mask_address_var): Make variable static.
2716 2018-05-14 Tom Tromey <tom@tromey.com>
2718 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2720 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2722 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2723 FXSAVE_ADDR for the mxcsr register.
2725 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2727 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2729 2018-05-11 Pedro Alves <palves@redhat.com>
2731 * corelow.c (core_target) <core_target>: No longer inline.
2732 Initialize m_core_gdbarch, m_core_vec and build the section table
2734 <~core_target>: New.
2735 <core_gdbarch, get_core_register_section>: New methods.
2736 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2737 factored out from ...
2738 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2740 (sniff_core_bfd): Add gdbarch parameter.
2741 (core_close): Delete, merged into ...
2742 (core_target::close): ... here. Delete self.
2743 (core_close_cleanup): Delete.
2744 (core_target_open): Allocate a core_target on the heap. Use a
2745 unique_ptr instead of a cleanup. Bits moved into the core_target
2746 ctor. Adjust to use core_target methods instead of globals.
2747 (get_core_register_section): Rename to ...
2748 (core_target::get_core_register_section): ... this and adjust.
2749 (struct get_core_registers_cb_data): New.
2750 (get_core_registers_cb): Use it. Use bool.
2751 (core_target::fetch_registers, core_target::files_info)
2752 (core_target::xfer_partial, core_target::read_description)
2753 (core_target::pid_to, core_target::thread_name): Adjust to
2754 reference class fields instead of globals.
2755 * target.h (struct target_ops_deleter, target_ops_up): New.
2757 2018-05-11 Pedro Alves <palves@redhat.com>
2759 * corefile.c (core_file_command): Move to corelow.c.
2760 * corelow.c (the_core_target): Delete.
2761 (core_file_command): Moved from corefile.c. Check exec_bfd
2762 instead of the_core_target. Use target_detach instead of calling
2763 into the_core_target directly.
2764 (maybe_say_no_core_file_now): New.
2765 (core_target::detach): Use it.
2766 (_initialize_corelow): Remove references to the_core_target.
2767 * gdbcore.h (the_core_target): Delete.
2769 2018-05-11 Tom Tromey <tromey@redhat.com>
2770 Pedro Alves <palves@redhat.com>
2772 * corefile.c (core_bfd): Remove.
2773 * gdbcore.h (core_bfd): Now a macro.
2774 * progspace.h (struct program_space) <cbfd>: New field.
2776 2018-05-11 Tom Tromey <tom@tromey.com>
2778 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2781 2018-05-10 Tom Tromey <tom@tromey.com>
2783 * configure: Rebuild.
2784 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2786 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2789 * regformats/regdat.sh: Adjust script, following the addition
2790 of the new expedite_regs parameter to init_target_desc.
2792 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2795 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2796 set_gdbarch_significant_addr_bit.
2797 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2798 set_gdbarch_significant_addr_bit.
2799 * utils.c (address_significant): Update to sign extend addr.
2801 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2803 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2804 (xtensa_linux_init_abi): Limit tdep->num_regs by
2805 tdep->num_nopriv_regs.
2806 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2807 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2810 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2812 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2814 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2816 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2817 (I387_MXCSR_INIT_VAL): New constant.
2818 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2819 buffer if it was supplied by the inferior.
2820 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2821 (i387_xsave_get_clear_bv): New function.
2822 (i387_supply_xsave): Only read x87 control registers from the
2823 xsave buffer if the feature is enabled, and the state will have
2824 been written, otherwise, provide a suitable default.
2825 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2826 including x87 control registers. Update control registers if they
2827 have changed from the default value, and mark features as enabled
2829 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2831 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2833 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2835 2018-05-07 Tom Tromey <tom@tromey.com>
2837 * configure: Rebuild.
2838 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2840 2018-05-07 Tom Tromey <tom@tromey.com>
2843 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2844 bit. Use correct value for VDIV.
2846 2018-05-04 Tom Tromey <tom@tromey.com>
2848 * configure: Rebuild.
2849 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2851 2018-05-04 Tom Tromey <tom@tromey.com>
2853 * linux-record.c (record_linux_system_call) <case
2854 RECORD_SYS_RECVFROM>: Add "break".
2856 2018-05-04 Tom Tromey <tom@tromey.com>
2858 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2859 Add missing "break".
2860 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2861 Add missing "break".
2863 2018-05-04 Tom Tromey <tom@tromey.com>
2865 * rs6000-tdep.c (ppc_process_record_op4)
2866 (ppc_process_record_op63): Add fall-through comment.
2868 2018-05-04 Tom Tromey <tom@tromey.com>
2870 * i386-tdep.c (i386_process_record): Add fall-through comment.
2872 2018-05-04 Tom Tromey <tom@tromey.com>
2874 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2877 2018-05-04 Tom Tromey <tom@tromey.com>
2879 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2880 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2881 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2883 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2885 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2888 2018-05-04 Tom Tromey <tom@tromey.com>
2890 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2892 2018-05-04 Tom Tromey <tom@tromey.com>
2894 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2895 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2896 * symfile.c (section_is_mapped): Fix fall-through comment.
2897 * stabsread.c (define_symbol, read_member_functions): Fix
2898 fall-through comment.
2899 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2901 * remote.c (remote_wait_as): Fix fall-through comment.
2902 * p-exp.y (yylex): Fix fall-through comment.
2903 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2905 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2906 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2907 * jv-exp.y (yylex): Fix fall-through comment.
2908 * go-exp.y (lex_one_token): Fix fall-through comment.
2909 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2910 fall-through comment.
2911 * f-exp.y (yylex): Fix fall-through comment.
2912 * dwarf2read.c (process_die): Fix fall-through comments.
2913 * dbxread.c (process_one_symbol): Fix fall-through comment.
2914 * d-exp.y (lex_one_token): Fix fall-through comment.
2915 * cp-name-parser.y (yylex): Fix fall-through comment.
2916 * coffread.c (coff_symtab_read): Fix fall-through comment.
2917 * c-exp.y (lex_one_token): Fix fall-through comment.
2918 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2920 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2923 2018-05-04 Tom Tromey <tom@tromey.com>
2926 * NEWS: Mention gdb.execute change.
2927 * gdbcmd.h (execute_control_command): Don't declare.
2928 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2929 execute_control_commands, execute_control_commands_to_string.
2930 * cli/cli-script.h (execute_control_commands)
2931 (execute_control_commands_to_string): Declare.
2932 (execute_control_command): Add from_tty parameter.
2933 * cli/cli-script.c (execute_control_commands)
2934 (execute_control_commands_to_string): New functions.
2935 (execute_user_command): Use execute_control_commands.
2936 (execute_control_command_1): Add "from_tty" parameter. Update.
2937 (execute_control_command): Likewise.
2939 2018-05-04 Tom Tromey <tom@tromey.com>
2942 * NEWS: Mention that breakpoint commands are writable.
2943 * python/py-breakpoint.c (bppy_set_commands): New function.
2944 (breakpoint_object_getset) <"commands">: Use it.
2946 2018-05-04 Tom Tromey <tom@tromey.com>
2948 * tracepoint.c (actions_command): Update.
2949 * mi/mi-cmd-break.c (mi_command_line_array)
2950 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2951 (mi_read_next_line): Remove.
2952 (mi_cmd_break_commands): Update.
2953 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2955 * cli/cli-script.c (get_command_line): Update.
2956 (process_next_line): Use function_view. Constify.
2957 (recurse_read_control_structure, read_command_lines)
2958 (read_command_lines_1): Change argument types to function_view.
2959 (do_define_command, document_command): Update.
2960 * breakpoint.h (check_tracepoint_command): Don't declare.
2961 * breakpoint.c (check_tracepoint_command): Remove.
2962 (commands_command_1, create_tracepoint_from_upload): Update.
2964 2018-05-04 Tom Tromey <tom@tromey.com>
2967 * cli/cli-script.h (enum command_control_type) <define_control>:
2969 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2970 (build_command_line, execute_control_command_1)
2971 (process_next_line): Likewise.
2972 (do_define_command): New function, extracted from define_command.
2973 (define_command): Use it.
2975 2018-05-04 Tom Tromey <tom@tromey.com>
2977 * tracepoint.c (actions_command): Update.
2978 * cli/cli-script.h (read_command_lines): Update.
2979 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2980 (MAX_TMPBUF): Remove define.
2981 (define_command): Use string_printf.
2982 (document_command): Likewise.
2983 * breakpoint.c (commands_command_1): Update.
2985 2018-05-04 Tom Tromey <tom@tromey.com>
2987 * top.c (execute_command): Update.
2988 * cli/cli-script.h (print_command_lines): Now varargs.
2989 * cli/cli-script.c (print_command_lines): Now varargs.
2990 (execute_control_command_1) <case while_control, case if_control>:
2993 2018-05-04 Tom Tromey <tom@tromey.com>
2995 * tracepoint.c (all_tracepoint_actions): Rename from
2996 all_tracepoint_actions_and_cleanup. Change return type.
2997 (actions_command, encode_actions_1, encode_actions)
2998 (trace_dump_actions, tdump_command): Update.
2999 * remote.c (remote_download_command_source): Update.
3000 * python/python.c (gdbpy_eval_from_control_command)
3001 (python_command, python_interactive_command): Update.
3002 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3003 * guile/guile.c (guile_command)
3004 (gdbscm_eval_from_control_command, guile_command): Update.
3005 * compile/compile.c (compile_code_command)
3006 (compile_print_command, compile_to_object): Update.
3007 * cli/cli-script.h (struct command_lines_deleter): New.
3008 (counted_command_line): New typedef.
3009 (struct command_line): Add constructor, destructor.
3010 <body_list>: Remove.
3011 <body_list_0, body_list_1>: New members.
3012 (command_line_up): Remove typedef.
3013 (read_command_lines, read_command_lines_1, get_command_line):
3015 (copy_command_lines): Don't declare.
3016 * cli/cli-script.c (build_command_line): Use "new".
3017 (get_command_line): Return counted_command_line.
3018 (print_command_lines, execute_user_command)
3019 (execute_control_command_1, while_command, if_command): Update.
3020 (realloc_body_list): Remove.
3021 (process_next_line, recurse_read_control_structure): Update.
3022 (read_command_lines, read_command_lines_1): Return counted_command_line.
3023 (free_command_lines): Use "delete".
3024 (copy_command_lines): Remove.
3025 (define_command, document_command, show_user_1): Update.
3026 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3027 a counted_command_line.
3028 * breakpoint.h (counted_command_line): Remove typedef.
3029 (breakpoint_set_commands): Update.
3030 * breakpoint.c (check_no_tracepoint_commands)
3031 (validate_commands_for_breakpoint): Update.
3032 (breakpoint_set_commands): Change commands to be a
3033 counted_command_line.
3034 (commands_command_1, update_dprintf_command_list)
3035 (create_tracepoint_from_upload): Update.
3037 2018-05-04 Tom Tromey <tom@tromey.com>
3039 * cli/cli-decode.h (cmd_list_element): New constructor.
3040 (~cmd_list_element): New destructor.
3041 (struct cmd_list_element): Add initializers.
3042 * cli/cli-decode.c (do_add_cmd): Use "new".
3043 (delete_cmd): Use "delete".
3045 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3046 Pedro Alves <palves@redhat.com>
3048 PR breakpoints/19806 and support for PR external/20207.
3049 * NEWS: Mention Aarch64 watchpoint improvements.
3050 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3051 watchpoints and PR external/20207 watchpoints.
3052 * nat/aarch64-linux-hw-point.c
3053 (kernel_supports_any_contiguous_range): New.
3054 (aarch64_watchpoint_offset): New.
3055 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3056 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3057 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3058 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3059 next_addr_orig_p. Support PR external/20207 watchpoints.
3060 (aarch64_downgrade_regs): New.
3061 (aarch64_dr_state_insert_one_point): New parameters offset and
3063 (aarch64_dr_state_remove_one_point): Likewise.
3064 (aarch64_handle_breakpoint): Update caller.
3065 (aarch64_handle_aligned_watchpoint): Likewise.
3066 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3068 (aarch64_linux_set_debug_regs): Remove const from state. Call
3069 aarch64_downgrade_regs.
3070 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3071 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3072 (DR_CONTROL_MASK): ... this.
3073 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3074 (unsigned int aarch64_watchpoint_offset): New prototype.
3075 (aarch64_linux_set_debug_regs): Remove const from state.
3076 * utils.c (align_up, align_down): Move to ...
3077 * common/common-utils.c (align_up, align_down): ... here.
3078 * utils.h (align_up, align_down): Move to ...
3079 * common/common-utils.h (align_up, align_down): ... here.
3081 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3083 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3084 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3085 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3086 Re-implement to match the ABI as summarized in GCC's
3087 gcc/config/sparc/sparc.c. All callers updated.
3088 (sparc32_store_arguments): Remove assertion.
3090 2018-05-04 Tom Tromey <tom@tromey.com>
3092 * printcmd.c: Don't include tui.h.
3093 (decode_format): Use skip_spaces.
3095 2018-05-04 Tom Tromey <tom@tromey.com>
3098 * printcmd.c (last_count): New global.
3099 (x_command): Use saved count when repeating.
3101 2018-05-04 Tom Tromey <tom@tromey.com>
3103 * nto-procfs.c (do_closedir_cleanup): Remove.
3104 (procfs_pidlist): Use gdb_dir_up.
3105 * procfs.c (do_closedir_cleanup): Remove.
3106 (proc_update_threads): Use gdb_dir_up.
3107 * common/filestuff.h (struct gdb_dir_deleter): New.
3108 (gdb_dir_up): New typedef.
3110 2018-05-04 Tom Tromey <tom@tromey.com>
3112 * ada-lang.c (print_mention_exception): Use std::string.
3114 2018-05-04 Tom Tromey <tom@tromey.com>
3116 * ada-lang.c (create_excep_cond_exprs): Update.
3117 (ada_exception_catchpoint_cond_string): Use std::string.
3119 2018-05-04 Tom Tromey <tom@tromey.com>
3121 * ada-lang.c (xget_renaming_scope): Return std::string.
3122 (old_renaming_is_invisible): Update.
3124 2018-05-04 Tom Tromey <tom@tromey.com>
3126 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3127 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3129 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3131 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3133 2018-05-04 Tom Tromey <tom@tromey.com>
3135 * remote.c (remote_query_supported_append): Change type.
3136 (remote_check_symbols): Update.
3138 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3141 * configure.ac: Prepend libpython.
3142 * python/python-config.py: Likewise.
3143 * configure: Regenerate.
3145 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3147 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3149 2018-05-03 Pedro Alves <palves@redhat.com>
3152 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3153 override. Write 'true' instead of '1'.
3154 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3157 2018-05-02 Pedro Alves <palves@redhat.com>
3159 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3160 add_inf_child_target.
3161 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3162 add_inf_child_target.
3163 * aix-thread.c (aix_thread_target_info): New.
3164 (aix_thread_target) <shortname, longname, doc>: Delete.
3166 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3167 add_inf_child_target.
3168 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3169 add_inf_child_target.
3170 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3171 add_inf_child_target.
3172 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3173 add_inf_child_target.
3174 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3175 add_inf_child_target.
3176 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3177 add_inf_child_target.
3178 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3179 add_inf_child_target.
3180 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3181 add_inf_child_target.
3182 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3183 add_inf_child_target.
3184 * bfd-target.c (target_bfd_target_info): New.
3185 (target_bfd) <shortname, longname, doc>: Delete.
3187 * bsd-kvm.c (bsd_kvm_target_info): New.
3188 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3190 (bsd_kvm_target::open): Rename to ...
3191 (bsd_kvm_target_open): ... this. Adjust.
3192 * bsd-uthread.c (bsd_uthread_target_info): New.
3193 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3195 * corefile.c (core_file_command): Adjust.
3196 * corelow.c (core_target_info): New.
3197 (core_target) <shortname, longname, doc>: Delete.
3199 (core_target::open): Rename to ...
3200 (core_target_open): ... this. Adjust.
3201 * ctf.c (ctf_target_info): New.
3202 (ctf_target) <shortname, longname, doc>: Delete.
3204 (ctf_target::open): Rename to ...
3205 (ctf_target_open): ... this.
3206 (_initialize_ctf): Adjust.
3207 * exec.c (exec_target_info): New.
3208 (exec_target) <shortname, longname, doc>: Delete.
3210 (exec_target::open): Rename to ...
3211 (exec_target_open): ... this.
3212 * gdbcore.h (core_target_open): Declare.
3213 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3214 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3215 add_inf_child_target.
3216 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3217 add_inf_child_target.
3218 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3219 add_inf_child_target.
3220 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3221 add_inf_child_target.
3222 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3223 add_inf_child_target.
3224 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3225 add_inf_child_target.
3226 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3227 add_inf_child_target.
3228 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3229 add_inf_child_target.
3230 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3231 add_inf_child_target.
3232 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3233 add_inf_child_target.
3234 * inf-child.c (inf_child_target_info): New.
3235 (inf_child_target::info): New.
3236 (inf_child_open_target): Remove 'target' parameter. Use
3237 get_native_target instead.
3238 (inf_child_target::open): Delete.
3239 (add_inf_child_target): New.
3240 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3243 (add_inf_child_target): Declare.
3244 (inf_child_open_target): Declare.
3245 * linux-thread-db.c (thread_db_target_info): New.
3246 (thread_db_target) <shortname, longname, doc>: Delete.
3248 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3249 add_inf_child_target.
3250 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3251 add_inf_child_target.
3252 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3253 add_inf_child_target.
3254 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3255 add_inf_child_target.
3256 * make-target-delegates (print_class): Adjust.
3257 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3258 add_inf_child_target.
3259 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3260 add_inf_child_target.
3261 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3262 add_inf_child_target.
3263 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3264 add_inf_child_target.
3265 * nto-procfs.c (nto_native_target_info): New.
3266 (nto_procfs_target_native) <shortname, longname, doc>:
3269 (nto_procfs_target_info): New.
3270 (nto_procfs_target_procfs) <shortname, longname, doc>:
3273 (init_procfs_targets): Adjust.
3274 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3275 add_inf_child_target.
3276 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3277 add_inf_child_target.
3278 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3279 add_inf_child_target.
3280 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3281 add_inf_child_target.
3282 * ravenscar-thread.c (ravenscar_target_info): New.
3283 (ravenscar_thread_target) <shortname, longname, doc>:
3286 * record-btrace.c (record_btrace_target_info):
3287 (record_btrace_target) <shortname, longname, doc>: Delete.
3289 (record_btrace_target::open): Rename to ...
3290 (record_btrace_target_open): ... this. Adjust.
3291 * record-full.c (record_longname, record_doc): New.
3292 (record_full_base_target) <shortname, longname, doc>: Delete.
3294 (record_full_target_info): New.
3295 (record_full_target): <shortname>: Delete.
3297 (record_full_core_open_1, record_full_open_1): Update comments.
3298 (record_full_base_target::open): Rename to ...
3299 (record_full_open): ... this.
3300 (cmd_record_full_restore): Update.
3301 (_initialize_record_full): Update.
3302 * remote-sim.c (remote_sim_target_info): New.
3303 (gdbsim_target) <shortname, longname, doc>: Delete.
3305 (gdbsim_target::open): Rename to ...
3306 (gdbsim_target_open): ... this.
3307 (_initialize_remote_sim): Adjust.
3308 * remote.c (remote_doc): New.
3309 (remote_target_info): New.
3310 (remote_target) <shortname, longname, doc>: Delete.
3312 (extended_remote_target_info): New.
3313 (extended_remote_target) <shortname, longname, doc>: Delete.
3315 (remote_target::open_1): Make static. Adjust.
3316 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3317 * s390-linux-nat.c (_initialize_s390_nat): Use
3318 add_inf_child_target.
3319 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3320 add_inf_child_target.
3321 * sol-thread.c (thread_db_target_info): New.
3322 (sol_thread_target) <shortname, longname, doc>: Delete.
3324 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3325 add_inf_child_target.
3326 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3327 add_inf_child_target.
3328 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3329 add_inf_child_target.
3330 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3331 add_inf_child_target.
3332 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3333 add_inf_child_target.
3334 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3335 add_inf_child_target.
3336 * spu-linux-nat.c (_initialize_spu_nat): Use
3337 add_inf_child_target.
3338 * spu-multiarch.c (spu_multiarch_target_info): New.
3339 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3341 * target-delegates.c: Regenerate.
3342 * target.c: Include <unordered_map>.
3343 (target_ops_p): Delete.
3344 (DEF_VEC_P(target_ops_p)): Delete.
3345 (target_factories): New.
3346 (test_target_info): New.
3347 (test_target_ops::info): New.
3348 (open_target): Adjust to use target_factories.
3349 (add_target_with_completer): Rename to ...
3350 (add_target): ... this. Change prototype. Register target_info
3351 and open callback in target_factories. Register target_info in
3352 command context instead of target_ops.
3353 (add_target): Delete old implementation.
3354 (add_deprecated_target_alias): Change prototype. Adjust.
3355 (the_native_target): New.
3356 (set_native_target, get_native_target): New.
3357 (find_default_run_target): Use the_native_target.
3358 (find_attach_target, find_run_target): Simplify.
3359 (target_ops::open): Delete.
3360 (dummy_target_info): New.
3361 (dummy_target::shortname, dummy_target::longname)
3362 (dummy_target::doc): Delete.
3363 (dummy_target::info): New.
3364 (debug_target::shortname, debug_target::longname)
3365 (debug_target::doc): Delete.
3366 (debug_target::info): New.
3367 * target.h (struct target_info): New.
3368 (target_ops::~target_ops): Add comment.
3369 (target_ops::info): New.
3370 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3371 longer virtual. Implement in terms of target_info.
3372 (set_native_target, get_native_target): Declare.
3373 (target_open_ftype): New.
3374 (add_target, add_target_with_completer)
3375 (add_deprecated_target_alias): Change prototype.
3376 (test_target) <shortname, longname, doc>: Delete.
3378 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3379 add_inf_child_target.
3380 * tracefile-tfile.c (tfile_target_info): New.
3381 (tfile_target) <shortname, longname, doc>: Delete.
3383 (tfile_target::open): Rename to ...
3384 (tfile_target_open): ... this.
3385 (_initialize_tracefile_tfile): Adjust.
3386 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3387 add_inf_child_target.
3388 * windows-nat.c (_initialize_windows_nat): Use
3389 add_inf_child_target.
3390 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3391 add_inf_child_target.
3393 2018-05-02 Pedro Alves <palves@redhat.com>
3395 * linux-nat.h (linux_nat_target) <low_new_thread,
3396 low_delete_thread, low_new_fork, low_forget_process,
3397 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3398 New virtual methods.
3399 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3400 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3401 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3402 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3403 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3405 * linux-fork.c (delete_fork): Adjust to call low method.
3406 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3407 (linux_nat_new_fork, linux_nat_forget_process_hook)
3408 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3409 (linux_nat_status_is_event):
3410 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3411 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3413 (sigtrap_is_event): Rename to ...
3414 (linux_nat_target::low_status_is_event): ... this.
3415 (linux_nat_set_status_is_event): Delete.
3416 (save_stop_reason, linux_nat_wait_1)
3417 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3419 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3420 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3421 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3422 (linux_nat_set_prepare_to_resume): Delete.
3423 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3424 low virtual methods.
3425 * amd64-linux-nat.c: Likewise.
3426 * arm-linux-nat.c: Likewise.
3427 * i386-linux-nat.c: Likewise.
3428 * ia64-linux-nat.c: Likewise.
3429 * mips-linux-nat.c: Likewise.
3430 * ppc-linux-nat.c: Likewise.
3431 * s390-linux-nat.c: Likewise.
3432 * sparc64-linux-nat.c: Likewise.
3433 * x86-linux-nat.c: Likewise.
3434 * x86-linux-nat.h: Include "nat/x86-linux.h".
3435 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3436 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3439 2018-05-02 Pedro Alves <palves@redhat.com>
3441 * target.h (target_ops)
3442 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3443 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3444 stopped_by_watchpoint, have_continuable_watchpoint,
3445 stopped_data_address, watchpoint_addr_within_range,
3446 can_accel_watchpoint_condition, can_run, thread_alive,
3447 has_all_memory, has_memory, has_stack, has_registers,
3448 has_execution, can_async_p, is_async_p, supports_non_stop,
3449 always_non_stop_p, can_execute_reverse, supports_multi_process,
3450 supports_enable_disable_tracepoint,
3451 supports_disable_randomization, supports_string_tracing,
3452 supports_evaluation_of_breakpoint_conditions,
3453 can_run_breakpoint_commands, filesystem_is_local,
3454 can_download_tracepoint, get_trace_state_variable_value,
3455 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3456 record_is_replaying, record_will_replay,
3457 augmented_libraries_svr4_read>: Adjust to return bool.
3458 * aarch64-linux-nat.c: All implementations adjusted.
3459 * aix-thread.c: All implementations adjusted.
3460 * arm-linux-nat.c: All implementations adjusted.
3461 * breakpoint.c: All implementations adjusted.
3462 * bsd-kvm.c: All implementations adjusted.
3463 * bsd-uthread.c: All implementations adjusted.
3464 * corelow.c: All implementations adjusted.
3465 * ctf.c: All implementations adjusted.
3466 * darwin-nat.c: All implementations adjusted.
3467 * darwin-nat.h: All implementations adjusted.
3468 * exec.c: All implementations adjusted.
3469 * fbsd-nat.c: All implementations adjusted.
3470 * fbsd-nat.h: All implementations adjusted.
3471 * gnu-nat.c: All implementations adjusted.
3472 * gnu-nat.h: All implementations adjusted.
3473 * go32-nat.c: All implementations adjusted.
3474 * ia64-linux-nat.c: All implementations adjusted.
3475 * inf-child.c: All implementations adjusted.
3476 * inf-child.h: All implementations adjusted.
3477 * inf-ptrace.c: All implementations adjusted.
3478 * inf-ptrace.h: All implementations adjusted.
3479 * linux-nat.c: All implementations adjusted.
3480 * linux-nat.h: All implementations adjusted.
3481 * mips-linux-nat.c: All implementations adjusted.
3482 * nto-procfs.c: All implementations adjusted.
3483 * ppc-linux-nat.c: All implementations adjusted.
3484 * procfs.c: All implementations adjusted.
3485 * ravenscar-thread.c: All implementations adjusted.
3486 * record-btrace.c: All implementations adjusted.
3487 * record-full.c: All implementations adjusted.
3488 * remote-sim.c: All implementations adjusted.
3489 * remote.c: All implementations adjusted.
3490 * s390-linux-nat.c: All implementations adjusted.
3491 * sol-thread.c: All implementations adjusted.
3492 * spu-multiarch.c: All implementations adjusted.
3493 * target-delegates.c: All implementations adjusted.
3494 * target.c: All implementations adjusted.
3495 * target.h: All implementations adjusted.
3496 * tracefile-tfile.c: All implementations adjusted.
3497 * tracefile.c: All implementations adjusted.
3498 * tracefile.h: All implementations adjusted.
3499 * windows-nat.c: All implementations adjusted.
3500 * x86-linux-nat.h: All implementations adjusted.
3501 * x86-nat.h: All implementations adjusted.
3503 2018-05-02 Pedro Alves <palves@redhat.com>
3505 * make-target-delegates (scan_target_h): Don't trim lines here.
3506 Replace sequences of tabs and/or whitespace with a single
3508 (top level, parsing methods): Trim each line before processing it
3511 2018-05-02 Pedro Alves <palves@redhat.com>
3512 John Baldwin <jhb@freebsd.org>
3514 * target.h (enum strata) <debug_stratum>: New.
3515 (struct target_ops) <all delegation methods>: Replace by C++
3516 virtual methods, and drop "to_" prefix. All references updated
3518 <to_shortname, to_longname, to_doc, to_data,
3519 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3520 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3521 virtual methods. All references updated throughout.
3522 <can_attach, supports_terminal_ours, can_create_inferior,
3523 get_thread_control_capabilities, attach_no_wait>: New
3525 <insert_breakpoint, remove_breakpoint>: Now
3526 TARGET_DEFAULT_NORETURN methods.
3527 <info_proc>: Now returns bool.
3529 (OPS_MAGIC): Delete.
3530 (current_target): Delete. All references replaced by references
3532 (target_stack): ... this. New.
3533 (target_shortname, target_longname): Adjust.
3534 (target_can_run): Now a function declaration.
3535 (default_child_has_all_memory, default_child_has_memory)
3536 (default_child_has_stack, default_child_has_registers)
3537 (default_child_has_execution): Remove target_ops parameter.
3538 (complete_target_initialization): Delete.
3539 (memory_breakpoint_target): New template class.
3540 (test_target_ops): Refactor as a C++ class with virtual methods.
3541 * make-target-delegates (NAME_PART): Tighten.
3542 (POINTER_PART, CP_SYMBOL): New.
3543 (SIMPLE_RETURN_PART): Reimplement.
3544 (VEC_RETURN_PART): Expect less.
3545 (RETURN_PART, VIRTUAL_PART): New.
3546 (METHOD): Adjust to C++ virtual methods.
3547 (scan_target_h): Remove reference to C99.
3548 (dname): Output "target_ops::" prefix.
3549 (write_function_header): Adjust to output a C++ class method.
3550 (write_declaration): New.
3551 (write_delegator): Adjust to output a C++ class method.
3552 (tdname): Output "dummy_target::" prefix.
3553 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3555 (tdefault_names, debug_names): Delete.
3556 (return_types, tdefaults, styles, argtypes_array): New.
3557 (top level): All methods are delegators.
3559 (top level): Print dummy_target and debug_target classes.
3560 * target-delegates.c: Regenerate.
3561 * target-debug.h (target_debug_print_enum_info_proc_what)
3562 (target_debug_print_thread_control_capabilities)
3563 (target_debug_print_thread_info_p): New.
3564 * target.c (dummy_target): Delete.
3565 (the_dummy_target, the_debug_target): New.
3566 (target_stack): Now extern.
3567 (set_targetdebug): Push/unpush debug target.
3568 (default_child_has_all_memory, default_child_has_memory)
3569 (default_child_has_stack, default_child_has_registers)
3570 (default_child_has_execution): Remove target_ops parameter.
3571 (complete_target_initialization): Delete.
3572 (add_target_with_completer): No longer call
3573 complete_target_initialization.
3574 (target_supports_terminal_ours): Use regular delegation.
3575 (update_current_target): Delete.
3576 (push_target): No longer check magic number. Don't call
3577 update_current_target.
3578 (unpush_target): Don't call update_current_target.
3579 (target_is_pushed): No longer check magic number.
3580 (target_require_runnable): Skip for all stratums over
3582 (target_ops::info_proc): New.
3583 (target_info_proc): Use find_target_at and
3584 find_default_run_target.
3585 (target_supports_disable_randomization): Use regular delegation.
3586 (target_get_osdata): Use find_target_at.
3587 (target_ops::open, target_ops::close, target_ops::can_attach)
3588 (target_ops::attach, target_ops::can_create_inferior)
3589 (target_ops::create_inferior, target_ops::can_run)
3590 (target_can_run): New.
3591 (default_fileio_target): Use regular delegation.
3592 (target_ops::fileio_open, target_ops::fileio_pwrite)
3593 (target_ops::fileio_pread, target_ops::fileio_fstat)
3594 (target_ops::fileio_close, target_ops::fileio_unlink)
3595 (target_ops::fileio_readlink): New.
3596 (target_fileio_open_1, target_fileio_unlink)
3597 (target_fileio_readlink): Always call the target method. Handle
3599 (return_zero, return_zero_has_execution): Delete.
3600 (init_dummy_target): Delete.
3601 (dummy_target::dummy_target, dummy_target::shortname)
3602 (dummy_target::longname, dummy_target::doc)
3603 (debug_target::debug_target, debug_target::shortname)
3604 (debug_target::longname, debug_target::doc): New.
3605 (target_supports_delete_record): Use regular delegation.
3606 (setup_target_debug): Delete.
3607 (maintenance_print_target_stack): Skip debug_stratum.
3608 (initialize_targets): Instantiate the_dummy_target and
3610 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3612 (target_auxv_search, fprint_target_auxv): Adjust.
3613 (info_auxv_command): Adjust to use target_stack.
3614 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3615 * exceptions.c (print_flush): Handle a NULL target_stack.
3616 * regcache.c (target_ops_no_register): Refactor as class with
3619 * exec.c (exec_target): New class.
3620 (exec_ops): Now an exec_target.
3621 (exec_open, exec_close_1, exec_get_section_table)
3622 (exec_xfer_partial, exec_files_info, exec_has_memory)
3623 (exec_make_note_section): Refactor as exec_target methods.
3624 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3626 (exec_target::find_memory_regions): New.
3627 (_initialize_exec): Don't call init_exec_ops.
3628 * gdbcore.h (exec_file_clear): Delete.
3630 * corefile.c (core_target): Delete.
3631 (core_file_command): Adjust.
3632 * corelow.c (core_target): New class.
3633 (the_core_target): New.
3634 (core_close): Remove target_ops parameter.
3635 (core_close_cleanup): Adjust.
3636 (core_target::close): New.
3637 (core_open, core_detach, get_core_registers, core_files_info)
3638 (core_xfer_partial, core_thread_alive, core_read_description)
3639 (core_pid_to_str, core_thread_name, core_has_memory)
3640 (core_has_stack, core_has_registers, core_info_proc): Rework as
3641 core_target methods.
3642 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3643 (_initialize_corelow): Initialize the_core_target.
3644 * gdbcore.h (core_target): Delete.
3645 (the_core_target): New.
3647 * ctf.c: (ctf_target): New class.
3648 (ctf_ops): Now a ctf_target.
3649 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3650 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3651 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3653 (init_ctf_ops): Delete.
3654 (_initialize_ctf): Don't call it.
3655 * tracefile-tfile.c (tfile_target): New class.
3656 (tfile_ops): Now a tfile_target.
3657 (tfile_open, tfile_close, tfile_files_info)
3658 (tfile_get_tracepoint_status, tfile_trace_find)
3659 (tfile_fetch_registers, tfile_xfer_partial)
3660 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3661 Refactor as tfile_target methods.
3662 (tfile_xfer_partial_features): Remove target_ops parameter.
3663 (init_tfile_ops): Delete.
3664 (_initialize_tracefile_tfile): Don't call it.
3665 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3666 (tracefile_has_stack, tracefile_has_registers)
3667 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3668 tracefile_target methods.
3669 (init_tracefile_ops): Delete.
3670 (tracefile_target::tracefile_target): New.
3671 * tracefile.h: Include "target.h".
3672 (tracefile_target): New class.
3673 (init_tracefile_ops): Delete.
3675 * spu-multiarch.c (spu_multiarch_target): New class.
3676 (spu_ops): Now a spu_multiarch_target.
3677 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3678 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3679 (spu_search_memory, spu_mourn_inferior): Refactor as
3680 spu_multiarch_target methods.
3681 (init_spu_ops): Delete.
3682 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3683 complete_target_initialization.
3685 * ravenscar-thread.c (ravenscar_thread_target): New class.
3686 (ravenscar_ops): Now a ravenscar_thread_target.
3687 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3688 (ravenscar_thread_alive, ravenscar_pid_to_str)
3689 (ravenscar_fetch_registers, ravenscar_store_registers)
3690 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3691 (ravenscar_stopped_by_hw_breakpoint)
3692 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3693 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3694 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3696 (init_ravenscar_thread_ops): Delete.
3697 (_initialize_ravenscar): Remove references to
3698 init_ravenscar_thread_ops and complete_target_initialization.
3700 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3701 (bsd_uthread_target): New class.
3702 (bsd_uthread_ops): Now a bsd_uthread_target.
3703 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3704 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3705 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3706 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3707 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3708 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3709 (bsd_uthread_target): Delete function.
3710 (_initialize_bsd_uthread): Remove reference to
3711 complete_target_initialization.
3713 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3714 (target_bfd): ... this new class.
3715 (target_bfd_xfer_partial, target_bfd_get_section_table)
3716 (target_bfd_close): Refactor as target_bfd methods.
3717 (target_bfd::~target_bfd): New.
3718 (target_bfd_reopen): Adjust.
3719 (target_bfd::close): New.
3721 * record-btrace.c (record_btrace_target): New class.
3722 (record_btrace_ops): Now a record_btrace_target.
3723 (record_btrace_open, record_btrace_stop_recording)
3724 (record_btrace_disconnect, record_btrace_close)
3725 (record_btrace_async, record_btrace_info)
3726 (record_btrace_insn_history, record_btrace_insn_history_range)
3727 (record_btrace_insn_history_from, record_btrace_call_history)
3728 (record_btrace_call_history_range)
3729 (record_btrace_call_history_from, record_btrace_record_method)
3730 (record_btrace_is_replaying, record_btrace_will_replay)
3731 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3732 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3733 (record_btrace_store_registers, record_btrace_prepare_to_store)
3734 (record_btrace_to_get_unwinder)
3735 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3736 (record_btrace_commit_resume, record_btrace_wait)
3737 (record_btrace_stop, record_btrace_can_execute_reverse)
3738 (record_btrace_stopped_by_sw_breakpoint)
3739 (record_btrace_supports_stopped_by_sw_breakpoint)
3740 (record_btrace_stopped_by_hw_breakpoint)
3741 (record_btrace_supports_stopped_by_hw_breakpoint)
3742 (record_btrace_update_thread_list, record_btrace_thread_alive)
3743 (record_btrace_goto_begin, record_btrace_goto_end)
3744 (record_btrace_goto, record_btrace_stop_replaying_all)
3745 (record_btrace_execution_direction)
3746 (record_btrace_prepare_to_generate_core)
3747 (record_btrace_done_generating_core): Refactor as
3748 record_btrace_target methods.
3749 (init_record_btrace_ops): Delete.
3750 (_initialize_record_btrace): Remove reference to
3751 init_record_btrace_ops.
3752 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3753 the execution_direction global.
3754 (record_full_base_target, record_full_target)
3755 (record_full_core_target): New classes.
3756 (record_full_ops): Now a record_full_target.
3757 (record_full_core_ops): Now a record_full_core_target.
3758 (record_full_target::detach, record_full_target::disconnect)
3759 (record_full_core_target::disconnect)
3760 (record_full_target::mourn_inferior, record_full_target::kill):
3762 (record_full_open, record_full_close, record_full_async): Refactor
3763 as methods of the record_full_base_target class.
3764 (record_full_resume, record_full_commit_resume): Refactor
3765 as methods of the record_full_target class.
3766 (record_full_wait, record_full_stopped_by_watchpoint)
3767 (record_full_stopped_data_address)
3768 (record_full_stopped_by_sw_breakpoint)
3769 (record_full_supports_stopped_by_sw_breakpoint)
3770 (record_full_stopped_by_hw_breakpoint)
3771 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3772 methods of the record_full_base_target class.
3773 (record_full_store_registers, record_full_xfer_partial)
3774 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3775 Refactor as methods of the record_full_target class.
3776 (record_full_can_execute_reverse, record_full_get_bookmark)
3777 (record_full_goto_bookmark, record_full_execution_direction)
3778 (record_full_record_method, record_full_info, record_full_delete)
3779 (record_full_is_replaying, record_full_will_replay)
3780 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3781 (record_full_stop_replaying): Refactor as methods of the
3782 record_full_base_target class.
3783 (record_full_core_resume, record_full_core_kill)
3784 (record_full_core_fetch_registers)
3785 (record_full_core_prepare_to_store)
3786 (record_full_core_store_registers, record_full_core_xfer_partial)
3787 (record_full_core_insert_breakpoint)
3788 (record_full_core_remove_breakpoint)
3789 (record_full_core_has_execution): Refactor
3790 as methods of the record_full_core_target class.
3791 (record_full_base_target::supports_delete_record): New.
3792 (init_record_full_ops): Delete.
3793 (init_record_full_core_ops): Delete.
3794 (record_full_save): Refactor as method of the
3795 record_full_base_target class.
3796 (_initialize_record_full): Remove references to
3797 init_record_full_ops and init_record_full_core_ops.
3799 * remote.c (remote_target, extended_remote_target): New classes.
3800 (remote_ops): Now a remote_target.
3801 (extended_remote_ops): Now an extended_remote_target.
3802 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3803 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3804 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3805 (remote_pass_signals, remote_set_syscall_catchpoint)
3806 (remote_program_signals, )
3807 (remote_thread_always_alive): Remove target_ops parameter.
3808 (remote_thread_alive, remote_thread_name)
3809 (remote_update_thread_list, remote_threads_extra_info)
3810 (remote_static_tracepoint_marker_at)
3811 (remote_static_tracepoint_markers_by_strid)
3812 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3813 (remote_open): Refactor as methods of remote_target.
3814 (extended_remote_open, extended_remote_detach)
3815 (extended_remote_attach, extended_remote_post_attach):
3816 (extended_remote_supports_disable_randomization)
3817 (extended_remote_create_inferior): : Refactor as method of
3818 extended_remote_target.
3819 (remote_set_permissions, remote_open_1, remote_detach)
3820 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3821 (remote_resume, remote_commit_resume, remote_stop)
3822 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3823 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3824 (remote_prepare_to_store, remote_store_registers)
3825 (remote_flash_erase, remote_flash_done, remote_files_info)
3826 (remote_kill, remote_mourn, remote_insert_breakpoint)
3827 (remote_remove_breakpoint, remote_insert_watchpoint)
3828 (remote_watchpoint_addr_within_range)
3829 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3830 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3831 (remote_supports_stopped_by_sw_breakpoint)
3832 (remote_stopped_by_hw_breakpoint)
3833 (remote_supports_stopped_by_hw_breakpoint)
3834 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3835 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3836 (remote_verify_memory): Refactor as methods of remote_target.
3837 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3839 (remote_xfer_partial, remote_get_memory_xfer_limit)
3840 (remote_search_memory, remote_rcmd, remote_memory_map)
3841 (remote_pid_to_str, remote_get_thread_local_address)
3842 (remote_get_tib_address, remote_read_description): Refactor as
3843 methods of remote_target.
3844 (remote_target::fileio_open, remote_target::fileio_pwrite)
3845 (remote_target::fileio_pread, remote_target::fileio_close): New.
3846 (remote_hostio_readlink, remote_hostio_fstat)
3847 (remote_filesystem_is_local, remote_can_execute_reverse)
3848 (remote_supports_non_stop, remote_supports_disable_randomization)
3849 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3850 (remote_supports_enable_disable_tracepoint)
3851 (remote_supports_string_tracing)
3852 (remote_can_run_breakpoint_commands, remote_trace_init)
3853 (remote_download_tracepoint, remote_can_download_tracepoint)
3854 (remote_download_trace_state_variable, remote_enable_tracepoint)
3855 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3856 (remote_trace_start, remote_get_trace_status)
3857 (remote_get_tracepoint_status, remote_trace_stop)
3858 (remote_trace_find, remote_get_trace_state_variable_value)
3859 (remote_save_trace_data, remote_get_raw_trace_data)
3860 (remote_set_disconnected_tracing, remote_core_of_thread)
3861 (remote_set_circular_trace_buffer, remote_traceframe_info)
3862 (remote_get_min_fast_tracepoint_insn_len)
3863 (remote_set_trace_buffer_size, remote_set_trace_notes)
3864 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3865 (remote_disable_btrace, remote_teardown_btrace)
3866 (remote_read_btrace, remote_btrace_conf)
3867 (remote_augmented_libraries_svr4_read, remote_load)
3868 (remote_pid_to_exec_file, remote_can_do_single_step)
3869 (remote_execution_direction, remote_thread_handle_to_thread_info):
3870 Refactor as methods of remote_target.
3871 (init_remote_ops, init_extended_remote_ops): Delete.
3872 (remote_can_async_p, remote_is_async_p, remote_async)
3873 (remote_thread_events, remote_upload_tracepoints)
3874 (remote_upload_trace_state_variables): Refactor as methods of
3876 (_initialize_remote): Remove references to init_remote_ops and
3877 init_extended_remote_ops.
3879 * remote-sim.c (gdbsim_target): New class.
3880 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3881 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3882 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3883 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3884 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3885 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3886 Refactor as methods of gdbsim_target.
3887 (gdbsim_ops): Now a gdbsim_target.
3888 (init_gdbsim_ops): Delete.
3889 (gdbsim_cntrl_c): Adjust.
3890 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3892 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3893 (the_amd64_linux_nat_target): New.
3894 (amd64_linux_fetch_inferior_registers)
3895 (amd64_linux_store_inferior_registers): Refactor as methods of
3896 amd64_linux_nat_target.
3897 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3898 * i386-linux-nat.c: Don't include "linux-nat.h".
3899 (i386_linux_nat_target): New class.
3900 (the_i386_linux_nat_target): New.
3901 (i386_linux_fetch_inferior_registers)
3902 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3903 as methods of i386_linux_nat_target.
3904 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3905 * inf-child.c (inf_child_ops): Delete.
3906 (inf_child_fetch_inferior_registers)
3907 (inf_child_store_inferior_registers): Delete.
3908 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3909 methods of inf_child_target.
3910 (inf_child_target::supports_terminal_ours)
3911 (inf_child_target::terminal_init)
3912 (inf_child_target::terminal_inferior)
3913 (inf_child_target::terminal_ours_for_output)
3914 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3915 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3917 (inf_child_open, inf_child_disconnect, inf_child_close)
3918 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3919 (inf_child_post_startup_inferior, inf_child_can_run)
3920 (inf_child_pid_to_exec_file): Refactor as methods of
3922 (inf_child_follow_fork): Delete.
3923 (inf_child_target::can_create_inferior)
3924 (inf_child_target::can_attach): New.
3925 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3926 (inf_child_target::has_stack, inf_child_target::has_registers)
3927 (inf_child_target::has_execution): New.
3928 (inf_child_fileio_open, inf_child_fileio_pwrite)
3929 (inf_child_fileio_pread, inf_child_fileio_fstat)
3930 (inf_child_fileio_close, inf_child_fileio_unlink)
3931 (inf_child_fileio_readlink, inf_child_use_agent)
3932 (inf_child_can_use_agent): Refactor as methods of
3934 (return_zero, inf_child_target): Delete.
3935 (inf_child_target::inf_child_target): New.
3936 * inf-child.h: Include "target.h".
3937 (inf_child_target): Delete function prototype.
3938 (inf_child_target): New class.
3939 (inf_child_open_target, inf_child_mourn_inferior)
3940 (inf_child_maybe_unpush_target): Delete.
3941 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3942 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3943 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3944 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3945 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3946 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3947 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3948 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3949 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3950 methods of inf_ptrace_target.
3951 (inf_ptrace_target): Delete function.
3952 * inf-ptrace.h: Include "inf-child.h".
3953 (inf_ptrace_target): Delete function declaration.
3954 (inf_ptrace_target): New class.
3955 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3956 * linux-nat.c (linux_target): New.
3957 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3958 (linux_nat_target::~linux_nat_target): New.
3959 (linux_child_post_attach, linux_child_post_startup_inferior)
3960 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3961 (linux_child_remove_fork_catchpoint)
3962 (linux_child_insert_vfork_catchpoint)
3963 (linux_child_remove_vfork_catchpoint)
3964 (linux_child_insert_exec_catchpoint)
3965 (linux_child_remove_exec_catchpoint)
3966 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3967 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3968 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3969 (linux_nat_stopped_data_address)
3970 (linux_nat_stopped_by_sw_breakpoint)
3971 (linux_nat_supports_stopped_by_sw_breakpoint)
3972 (linux_nat_stopped_by_hw_breakpoint)
3973 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3974 (linux_nat_kill, linux_nat_mourn_inferior)
3975 (linux_nat_xfer_partial, linux_nat_thread_alive)
3976 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3977 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3978 (linux_child_static_tracepoint_markers_by_strid)
3979 (linux_nat_is_async_p, linux_nat_can_async_p)
3980 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3981 (linux_nat_supports_multi_process)
3982 (linux_nat_supports_disable_randomization, linux_nat_async)
3983 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3984 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3985 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3986 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3987 methods of linux_nat_target.
3988 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3989 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3991 (check_stopped_by_watchpoint): Adjust.
3992 (linux_xfer_partial): Delete.
3993 (linux_target_install_ops, linux_target, linux_nat_add_target):
3995 (linux_nat_target::linux_nat_target): New.
3996 * linux-nat.h: Include "inf-ptrace.h".
3997 (linux_nat_target): New.
3998 (linux_target, linux_target_install_ops, linux_nat_add_target):
3999 Delete function declarations.
4000 (linux_target): Declare global.
4001 * linux-thread-db.c (thread_db_target): New.
4002 (thread_db_target::thread_db_target): New.
4003 (thread_db_ops): Delete.
4004 (the_thread_db_target): New.
4005 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4006 (thread_db_update_thread_list, thread_db_pid_to_str)
4007 (thread_db_extra_thread_info)
4008 (thread_db_thread_handle_to_thread_info)
4009 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4010 (thread_db_resume): Refactor as methods of thread_db_target.
4011 (init_thread_db_ops): Delete.
4012 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4013 * x86-linux-nat.c: Don't include "linux-nat.h".
4014 (super_post_startup_inferior): Delete.
4015 (x86_linux_nat_target::~x86_linux_nat_target): New.
4016 (x86_linux_child_post_startup_inferior)
4017 (x86_linux_read_description, x86_linux_enable_btrace)
4018 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4019 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4020 methods of x86_linux_nat_target.
4021 (x86_linux_create_target): Delete. Bits folded ...
4022 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4024 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4025 (x86_linux_nat_target): New class.
4026 (x86_linux_create_target): Delete.
4027 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4028 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4029 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4030 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4031 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4032 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4034 (x86_use_watchpoints): Delete.
4035 * x86-nat.h: Include "breakpoint.h" and "target.h".
4036 (x86_use_watchpoints): Delete.
4037 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4038 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4039 (x86_insert_watchpoint, x86_remove_watchpoint)
4040 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4041 (x86_stopped_by_hw_breakpoint): New declarations.
4042 (x86_nat_target): New template class.
4044 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4045 (the_ppc_linux_nat_target): New.
4046 (ppc_linux_fetch_inferior_registers)
4047 (ppc_linux_can_use_hw_breakpoint)
4048 (ppc_linux_region_ok_for_hw_watchpoint)
4049 (ppc_linux_ranged_break_num_registers)
4050 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4051 (ppc_linux_insert_mask_watchpoint)
4052 (ppc_linux_remove_mask_watchpoint)
4053 (ppc_linux_can_accel_watchpoint_condition)
4054 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4055 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4056 (ppc_linux_watchpoint_addr_within_range)
4057 (ppc_linux_masked_watch_num_registers)
4058 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4059 (ppc_linux_read_description): Refactor as methods of
4060 ppc_linux_nat_target.
4061 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4063 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4064 (procfs_target): New class.
4065 (the_procfs_target): New.
4066 (procfs_target): Delete function.
4067 (procfs_auxv_parse, procfs_attach, procfs_detach)
4068 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4069 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4070 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4071 (procfs_create_inferior, procfs_update_thread_list)
4072 (procfs_thread_alive, procfs_pid_to_str)
4073 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4074 (procfs_stopped_data_address, procfs_insert_watchpoint)
4075 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4076 (proc_find_memory_regions, procfs_info_proc)
4077 (procfs_make_note_section): Refactor as methods of procfs_target.
4078 (_initialize_procfs): Adjust.
4079 * sol-thread.c (sol_thread_target): New class.
4080 (sol_thread_ops): Now a sol_thread_target.
4081 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4082 (sol_thread_fetch_registers, sol_thread_store_registers)
4083 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4084 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4085 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4086 (init_sol_thread_ops): Delete.
4087 (_initialize_sol_thread): Adjust. Remove references to
4088 init_sol_thread_ops and complete_target_initialization.
4090 * windows-nat.c (windows_nat_target): New class.
4091 (windows_fetch_inferior_registers)
4092 (windows_store_inferior_registers, windows_resume, windows_wait)
4093 (windows_attach, windows_detach, windows_pid_to_exec_file)
4094 (windows_files_info, windows_create_inferior)
4095 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4096 (windows_close, windows_pid_to_str, windows_xfer_partial)
4097 (windows_get_tib_address, windows_get_ada_task_ptid)
4098 (windows_thread_name, windows_thread_alive): Refactor as
4099 windows_nat_target methods.
4100 (do_initial_windows_stuff): Adjust.
4101 (windows_target): Delete function.
4102 (_initialize_windows_nat): Adjust.
4104 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4105 (darwin_mourn_inferior, darwin_kill_inferior)
4106 (darwin_create_inferior, darwin_attach, darwin_detach)
4107 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4108 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4109 (darwin_supports_multi_process): Refactor as darwin_nat_target
4111 (darwin_resume_to, darwin_files_info): Delete.
4112 (_initialize_darwin_inferior): Rename to ...
4113 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4114 * darwin-nat.h: Include "inf-child.h".
4115 (darwin_nat_target): New class.
4116 (darwin_complete_target): Delete.
4117 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4118 (darwin_target): New.
4119 (i386_darwin_fetch_inferior_registers)
4120 (i386_darwin_store_inferior_registers): Refactor as methods of
4122 (darwin_complete_target): Delete, with ...
4123 (_initialize_i386_darwin_nat): ... bits factored out here.
4125 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4126 (the_alpha_linux_nat_target): New.
4127 (alpha_linux_register_u_offset): Refactor as
4128 alpha_linux_nat_target method.
4129 (_initialize_alpha_linux_nat): Adjust.
4130 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4131 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4132 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4133 methods of linux_nat_trad_target.
4134 (linux_trad_target): Delete.
4135 * linux-nat-trad.h (linux_trad_target): Delete function.
4136 (linux_nat_trad_target): New class.
4137 * mips-linux-nat.c (mips_linux_nat_target): New class.
4138 (super_fetch_registers, super_store_registers, super_close):
4140 (the_mips_linux_nat_target): New.
4141 (mips64_linux_regsets_fetch_registers)
4142 (mips64_linux_regsets_store_registers)
4143 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4144 (mips_linux_register_u_offset, mips_linux_read_description)
4145 (mips_linux_can_use_hw_breakpoint)
4146 (mips_linux_stopped_by_watchpoint)
4147 (mips_linux_stopped_data_address)
4148 (mips_linux_region_ok_for_hw_watchpoint)
4149 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4150 (mips_linux_close): Refactor as methods of mips_linux_nat.
4151 (_initialize_mips_linux_nat): Adjust to C++ification.
4153 * aix-thread.c (aix_thread_target): New class.
4154 (aix_thread_ops): Now an aix_thread_target.
4155 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4156 (aix_thread_fetch_registers, aix_thread_store_registers)
4157 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4158 (aix_thread_thread_alive, aix_thread_pid_to_str)
4159 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4160 Refactor as methods of aix_thread_target.
4161 (init_aix_thread_ops): Delete.
4162 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4163 and complete_target_initialization.
4164 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4165 (rs6000_nat_target): New class.
4166 (the_rs6000_nat_target): New.
4167 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4168 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4169 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4170 (super_create_inferior): Delete.
4171 (_initialize_rs6000_nat): Adjust to C++ification.
4173 * arm-linux-nat.c (arm_linux_nat_target): New class.
4174 (the_arm_linux_nat_target): New.
4175 (arm_linux_fetch_inferior_registers)
4176 (arm_linux_store_inferior_registers, arm_linux_read_description)
4177 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4178 (arm_linux_remove_hw_breakpoint)
4179 (arm_linux_region_ok_for_hw_watchpoint)
4180 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4181 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4182 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4183 arm_linux_nat_target.
4184 (_initialize_arm_linux_nat): Adjust to C++ification.
4186 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4187 (the_aarch64_linux_nat_target): New.
4188 (aarch64_linux_fetch_inferior_registers)
4189 (aarch64_linux_store_inferior_registers)
4190 (aarch64_linux_child_post_startup_inferior)
4191 (aarch64_linux_read_description)
4192 (aarch64_linux_can_use_hw_breakpoint)
4193 (aarch64_linux_insert_hw_breakpoint)
4194 (aarch64_linux_remove_hw_breakpoint)
4195 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4196 (aarch64_linux_region_ok_for_hw_watchpoint)
4197 (aarch64_linux_stopped_data_address)
4198 (aarch64_linux_stopped_by_watchpoint)
4199 (aarch64_linux_watchpoint_addr_within_range)
4200 (aarch64_linux_can_do_single_step): Refactor as methods of
4201 aarch64_linux_nat_target.
4202 (super_post_startup_inferior): Delete.
4203 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4205 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4206 (the_hppa_linux_nat_target): New.
4207 (hppa_linux_fetch_inferior_registers)
4208 (hppa_linux_store_inferior_registers): Refactor as methods of
4209 hppa_linux_nat_target.
4210 (_initialize_hppa_linux_nat): Adjust to C++ification.
4212 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4213 (the_ia64_linux_nat_target): New.
4214 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4215 (ia64_linux_stopped_data_address)
4216 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4217 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4218 ia64_linux_nat_target methods.
4219 (super_xfer_partial): Delete.
4220 (_initialize_ia64_linux_nat): Adjust to C++ification.
4222 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4223 (the_m32r_linux_nat_target): New.
4224 (m32r_linux_fetch_inferior_registers)
4225 (m32r_linux_store_inferior_registers): Refactor as
4226 m32r_linux_nat_target methods.
4227 (_initialize_m32r_linux_nat): Adjust to C++ification.
4229 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4230 (the_m68k_linux_nat_target): New.
4231 (m68k_linux_fetch_inferior_registers)
4232 (m68k_linux_store_inferior_registers): Refactor as
4233 m68k_linux_nat_target methods.
4234 (_initialize_m68k_linux_nat): Adjust to C++ification.
4236 * s390-linux-nat.c (s390_linux_nat_target): New class.
4237 (the_s390_linux_nat_target): New.
4238 (s390_linux_fetch_inferior_registers)
4239 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4240 (s390_insert_watchpoint, s390_remove_watchpoint)
4241 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4242 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4243 (s390_auxv_parse, s390_read_description): Refactor as methods of
4244 s390_linux_nat_target.
4245 (_initialize_s390_nat): Adjust to C++ification.
4247 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4248 (the_sparc_linux_nat_target): New.
4249 (_initialize_sparc_linux_nat): Adjust to C++ification.
4250 * sparc-nat.c (sparc_fetch_inferior_registers)
4251 (sparc_store_inferior_registers): Remove target_ops parameter.
4252 * sparc-nat.h (sparc_fetch_inferior_registers)
4253 (sparc_store_inferior_registers): Remove target_ops parameter.
4254 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4255 (the_sparc64_linux_nat_target): New.
4256 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4258 * spu-linux-nat.c (spu_linux_nat_target): New class.
4259 (the_spu_linux_nat_target): New.
4260 (spu_child_post_startup_inferior, spu_child_post_attach)
4261 (spu_child_wait, spu_fetch_inferior_registers)
4262 (spu_store_inferior_registers, spu_xfer_partial)
4263 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4265 (_initialize_spu_nat): Adjust to C++ification.
4267 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4268 (the_tilegx_linux_nat_target): New.
4269 (fetch_inferior_registers, store_inferior_registers):
4270 Refactor as methods.
4271 (_initialize_tile_linux_nat): Adjust to C++ification.
4273 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4274 (the_xtensa_linux_nat_target): New.
4275 (xtensa_linux_fetch_inferior_registers)
4276 (xtensa_linux_store_inferior_registers): Refactor as
4277 xtensa_linux_nat_target methods.
4278 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4280 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4281 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4282 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4283 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4284 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4285 (fbsd_stopped_by_sw_breakpoint)
4286 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4287 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4288 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4289 (fbsd_post_startup_inferior, fbsd_post_attach)
4290 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4291 (fbsd_set_syscall_catchpoint)
4292 (super_xfer_partial, super_resume, super_wait)
4293 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4294 (fbsd_handle_debug_trap): Remove target_ops parameter.
4295 (fbsd_nat_add_target): Delete.
4296 * fbsd-nat.h: Include "inf-ptrace.h".
4297 (fbsd_nat_add_target): Delete.
4298 (USE_SIGTRAP_SIGINFO): Define.
4299 (fbsd_nat_target): New class.
4301 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4302 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4303 (amd64bsd_target): Delete.
4304 * amd64-bsd-nat.h: New file.
4305 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4307 (amd64_fbsd_nat_target): New class.
4308 (the_amd64_fbsd_nat_target): New.
4309 (amd64fbsd_read_description): Refactor as method of
4310 amd64_fbsd_nat_target.
4311 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4312 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4313 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4314 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4315 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4316 (i386bsd_target): Delete.
4317 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4318 (i386bsd_fetch_inferior_registers)
4319 (i386bsd_store_inferior_registers): Declare.
4320 (i386_bsd_nat_target): New class.
4321 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4322 (the_i386_fbsd_nat_target): New.
4323 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4324 i386_fbsd_nat_target methods.
4325 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4326 (_initialize_i386fbsd_nat): Adjust to C++ification.
4327 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4328 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4329 (_initialize_x86_bsd_nat): Adjust to C++ification.
4330 * x86-bsd-nat.h: Include "x86-nat.h".
4331 (x86bsd_target): Delete declaration.
4332 (x86bsd_nat_target): New class.
4334 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4335 (the_aarch64_fbsd_nat_target): New.
4336 (aarch64_fbsd_fetch_inferior_registers)
4337 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4338 aarch64_fbsd_nat_target.
4339 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4340 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4341 (the_alpha_bsd_nat_target): New.
4342 (alphabsd_fetch_inferior_registers)
4343 (alphabsd_store_inferior_registers): Refactor as
4344 alpha_bsd_nat_target methods.
4345 (_initialize_alphabsd_nat): Refactor as methods of
4346 alpha_bsd_nat_target.
4347 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4348 (the_amd64_nbsd_nat_target): New.
4349 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4350 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4351 (the_amd64_obsd_nat_target): New.
4352 (_initialize_amd64obsd_nat): Adjust to C++ification.
4353 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4354 (the_arm_fbsd_nat_target): New.
4355 (arm_fbsd_fetch_inferior_registers)
4356 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4357 (_initialize_arm_fbsd_nat): Refactor as methods of
4358 arm_fbsd_nat_target.
4359 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4360 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4361 (the_arm_netbsd_nat_target): New.
4362 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4363 arm_netbsd_nat_target.
4364 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4365 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4366 (the_hppa_nbsd_nat_target): New.
4367 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4368 hppa_nbsd_nat_target methods.
4369 (_initialize_hppanbsd_nat): Adjust to C++ification.
4370 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4371 (the_hppa_obsd_nat_target): New.
4372 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4373 methods of hppa_obsd_nat_target.
4374 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4376 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4377 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4379 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4380 (_initialize_i386obsd_nat): Use add_target.
4381 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4382 (the_m68k_bsd_nat_target): New.
4383 (m68kbsd_fetch_inferior_registers)
4384 (m68kbsd_store_inferior_registers): Refactor as methods of
4385 m68k_bsd_nat_target.
4386 (_initialize_m68kbsd_nat): Adjust to C++ification.
4387 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4388 (the_mips_fbsd_nat_target): New.
4389 (mips_fbsd_fetch_inferior_registers)
4390 (mips_fbsd_store_inferior_registers): Refactor as methods of
4391 mips_fbsd_nat_target.
4392 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4394 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4395 (the_mips_nbsd_nat_target): New.
4396 (mipsnbsd_fetch_inferior_registers)
4397 (mipsnbsd_store_inferior_registers): Refactor as methods of
4398 mips_nbsd_nat_target.
4399 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4400 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4401 (the_mips64_obsd_nat_target): New.
4402 (mips64obsd_fetch_inferior_registers)
4403 (mips64obsd_store_inferior_registers): Refactor as methods of
4404 mips64_obsd_nat_target.
4405 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4407 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4409 * nbsd-nat.h: Include "inf-ptrace.h".
4410 (nbsd_nat_target): New class.
4411 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4412 (obsd_wait): Refactor as methods of obsd_nat_target.
4413 (obsd_add_target): Delete.
4414 * obsd-nat.h: Include "inf-ptrace.h".
4415 (obsd_nat_target): New class.
4416 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4417 (the_ppc_fbsd_nat_target): New.
4418 (ppcfbsd_fetch_inferior_registers)
4419 (ppcfbsd_store_inferior_registers): Refactor as methods of
4420 ppc_fbsd_nat_target.
4421 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4423 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4424 (the_ppc_nbsd_nat_target): New.
4425 (ppcnbsd_fetch_inferior_registers)
4426 (ppcnbsd_store_inferior_registers): Refactor as methods of
4427 ppc_nbsd_nat_target.
4428 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4429 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4430 (the_ppc_obsd_nat_target): New.
4431 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4432 methods of ppc_obsd_nat_target.
4433 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4435 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4436 (the_sh_nbsd_nat_target): New.
4437 (shnbsd_fetch_inferior_registers)
4438 (shnbsd_store_inferior_registers): Refactor as methods of
4440 (_initialize_shnbsd_nat): Adjust to C++ification.
4441 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4442 (inf_ptrace_xfer_partial): Delete.
4443 (sparc_xfer_partial, sparc_target): Delete.
4444 * sparc-nat.h (sparc_fetch_inferior_registers)
4445 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4446 (sparc_target): Delete function declaration.
4447 (sparc_target): New template class.
4448 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4449 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4450 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4451 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4453 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4454 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4455 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4456 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4458 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4459 (the_vax_bsd_nat_target): New.
4460 (vaxbsd_fetch_inferior_registers)
4461 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4463 (_initialize_vaxbsd_nat): Adjust to C++ification.
4465 * bsd-kvm.c (bsd_kvm_target): New class.
4466 (bsd_kvm_ops): Now a bsd_kvm_target.
4467 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4468 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4469 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4471 (bsd_kvm_return_one): Delete.
4472 (bsd_kvm_add_target): Adjust to C++ification.
4474 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4475 (nto_procfs_target_procfs): New classes.
4476 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4477 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4478 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4479 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4480 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4481 (procfs_remove_hw_breakpoint, procfs_resume)
4482 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4483 (procfs_kill_inferior, procfs_store_registers)
4484 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4485 as methods of nto_procfs_target.
4486 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4487 (nto_native_ops): Delete.
4488 (procfs_open, procfs_native_open): Delete.
4489 (nto_native_ops): Now an nto_procfs_target_native.
4490 (init_procfs_targets): Adjust to C++ification.
4491 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4492 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4493 Refactor as methods of nto_procfs_target.
4495 * go32-nat.c (go32_nat_target): New class.
4496 (the_go32_nat_target): New.
4497 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4498 (go32_store_registers, go32_xfer_partial, go32_files_info)
4499 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4500 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4501 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4502 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4503 (go32_target): Delete.
4504 (_initialize_go32_nat): Adjust to C++ification.
4506 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4507 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4508 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4509 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4511 (gnu_target): Delete.
4512 * gnu-nat.h (gnu_target): Delete.
4513 (gnu_nat_target): New class.
4514 * i386-gnu-nat.c (gnu_base_target): New.
4515 (i386_gnu_nat_target): New class.
4516 (the_i386_gnu_nat_target): New.
4517 (_initialize_i386gnu_nat): Adjust to C++ification.
4519 2018-05-02 Pedro Alves <palves@redhat.com>
4521 * bfd-target.c (target_bfd_xclose): Rename to ...
4522 (target_bfd_close): ... this.
4523 (target_bfd_reopen): Adjust.
4524 * target.c (target_close): Remove references to to_xclose.
4525 * target.h (target_ops::to_xclose): Delete.
4526 (target_ops::to_close): Update comments.
4528 2018-05-02 Pedro Alves <palves@redhat.com>
4530 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4532 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4533 * inf-ptrace.c (inf_ptrace_register_u_offset)
4534 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4535 (inf_ptrace_store_register, inf_ptrace_store_registers)
4536 (inf_ptrace_trad_target): Move to ...
4537 * linux-nat-trad.c: ... this new file.
4538 * linux-nat-trad.h: New file.
4539 * linux-nat.c (linux_target_install_ops): Make extern.
4540 (linux_trad_target): Delete.
4541 * linux-nat.h (linux_trad_target): Delete declaration.
4542 (linux_target_install_ops): Declare.
4543 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4546 2018-05-02 Pedro Alves <palves@redhat.com>
4548 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4549 procfs_target/add_target here.
4550 * procfs.c (procfs_target): Make static.
4551 (_initialize_procfs): Call add_target here.
4552 * procfs.h (struct target_ops): Remove forward declaration.
4553 (procfs_target): Remove declaration.
4554 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4556 2018-05-02 Pedro Alves <palves@redhat.com>
4558 * procfs.c (procfs_stopped_by_watchpoint)
4559 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4560 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4562 (procfs_use_watchpoints): Delete, move contents...
4563 (procfs_target): ... here.
4564 * procfs.h (procfs_use_watchpoints): Delete declaration.
4565 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4566 procfs_use_watchpoints.
4567 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4568 procfs_use_watchpoints.
4570 2018-05-02 Tom Tromey <tom@tromey.com>
4573 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4574 and var_zuinteger_unlimited.
4575 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4576 and PARAM_ZUINTEGER_UNLIMITED.
4577 (set_parameter_value): Handle var_zuinteger and
4578 var_zuinteger_unlimited.
4579 (add_setshow_generic): Likewise.
4580 (parmpy_init): Likewise.
4582 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4585 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4586 pointer is not null before dereferencing it.
4588 2018-04-30 Tom Tromey <tom@tromey.com>
4590 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4593 2018-04-30 Tom Tromey <tom@tromey.com>
4595 * breakpoint.c (mention): Remove use of is_mi_like_p.
4596 (print_mention_ranged_breakpoint): Likewise.
4597 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4600 2018-04-30 Tom Tromey <tom@tromey.com>
4602 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4604 2018-04-30 Tom Tromey <tom@tromey.com>
4606 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4607 (info_spu_event_command): Remove some uses of is_mi_like_p.
4609 2018-04-30 Tom Tromey <tom@tromey.com>
4611 * python/py-framefilter.c (py_print_single_arg)
4612 (enumerate_locals, py_print_args, py_print_frame): Remove some
4613 uses of is_mi_like_p.
4615 2018-04-30 Tom Tromey <tom@tromey.com>
4618 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4619 * ui-out.h (ui_out::is_mi_like_p): Now const.
4620 (ui_out::do_is_mi_like_p): Now const.
4621 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4623 2018-04-30 Tom Tromey <tom@tromey.com>
4625 * varobj.c (varobj_set_visualizer): Use new_reference.
4626 * python/python.c (gdbpy_decode_line): Use new_reference.
4627 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4630 2018-04-30 Tom Tromey <tom@tromey.com>
4632 * varobj.c (install_new_value): Use new_reference.
4633 * value.h (value_incref): Return void. Swap intro comment with
4635 * value.c (set_value_parent): Use new_reference.
4636 (value_incref): Return void. Update intro comment.
4637 (release_value): Use new_reference.
4638 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4640 2018-04-30 Tom Tromey <tom@tromey.com>
4642 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4643 * gdb_bfd.h (new_bfd_ref): Remove.
4644 (gdb_bfd_open): Update comment.
4645 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4646 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4647 (gdb_bfd_fdopenr): Use new_reference.
4648 * exec.c (exec_file_attach): Use new_reference.
4650 2018-04-30 Tom Tromey <tom@tromey.com>
4652 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4655 2018-04-30 Tom Tromey <tom@tromey.com>
4657 * jit.c (jit_read_code_entry): Use type_align.
4658 * i386-tdep.c (i386_gdbarch_init): Don't call
4659 set_gdbarch_long_long_align_bit.
4660 * gdbarch.sh: Remove long_long_align_bit.
4661 * gdbarch.c, gdbarch.h: Rebuild.
4662 * arc-tdep.c (arc_type_align): New function.
4663 (arc_gdbarch_init): Use arc_type_align. Don't call
4664 set_gdbarch_long_long_align_bit.
4666 2018-04-30 Tom Tromey <tom@tromey.com>
4668 * rust-lang.c (rust_type_alignment): Remove.
4669 (rust_composite_type): Use type_align.
4671 2018-04-30 Tom Tromey <tom@tromey.com>
4673 * NEWS: Mention Type.align.
4674 * python/py-type.c (typy_get_alignof): New function.
4675 (type_object_getset): Add "alignof".
4677 2018-04-30 Tom Tromey <tom@tromey.com>
4681 * std-operator.def (UNOP_ALIGNOF): New operator.
4682 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4684 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4685 * c-lang.c (c_op_print_tab): Add alignof.
4686 * c-exp.y (ALIGNOF): New token.
4687 (exp): Add "ALIGNOF" production.
4688 (ident_tokens): Add _Alignof and alignof.
4690 2018-04-30 Tom Tromey <tom@tromey.com>
4692 * i386-tdep.c (i386_type_align): New function.
4693 (i386_gdbarch_init): Update.
4694 * gdbarch.sh (type_align): New method.
4695 * gdbarch.c, gdbarch.h: Rebuild.
4696 * arch-utils.h (default_type_align): Declare.
4697 * arch-utils.c (default_type_align): New function.
4698 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4699 (struct type) <align_log2>: New field.
4700 <instance_flags>: Now a bitfield.
4701 (TYPE_RAW_ALIGN): New macro.
4702 (type_align, type_raw_align, set_type_align): Declare.
4703 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4705 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4706 (get_alignment, maybe_set_alignment): New functions.
4707 (read_structure_type, read_enumeration_type, read_array_type)
4708 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4709 (read_subrange_type, read_base_type): Set type alignment.
4711 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4713 * dwarf2read.c (read_index_from_section): Use bool.
4715 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4718 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4721 2018-04-29 John Reiser <jreiser@BitWagon.com>
4724 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4725 last step, and do it atomically.
4727 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4729 * compile/compile-c-types.c (convert_int, convert_float):
4732 2018-04-27 Tom Tromey <tom@tromey.com>
4735 * rust-lang.c (rust_inclusive_range_type_p): New function.
4736 (rust_range): Handle inclusive ranges.
4737 (rust_compute_range): Likewise.
4738 * rust-exp.y (struct rust_op) <inclusive>: New field.
4739 (DOTDOTEQ): New constant.
4740 (range_expr): Add "..=" productions.
4741 (operator_tokens): Add "..=" token.
4742 (ast_range): Add "inclusive" parameter.
4743 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4745 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4747 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4748 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4750 * expprint.c (print_subexp_standard): Handle new bounds values.
4751 (dump_subexp_body_standard): Likewise.
4753 2018-04-27 Tom Tromey <tom@tromey.com>
4755 * configure: Rebuild.
4756 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4757 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4759 (class symbol_needs_eval_context): Likewise.
4760 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4761 (mock_mapped_index::symbol_name_at): Use "override". Remove
4763 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4765 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4766 * aarch64-tdep.c (instruction_reader::read): Use "override".
4767 (instruction_reader_test::read): Likewise.
4768 * arm-tdep.c (instruction_reader::read): Use "override".
4769 (instruction_reader_thumb::read): Likewise.
4771 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4774 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4775 instead of remote_send.
4776 (remote_send): Remove.
4778 2018-04-26 Pedro Alves <palves@redhat.com>
4780 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4781 find_function_start_sal instead of find_pc_line.
4783 2018-04-26 Pedro Alves <palves@redhat.com>
4785 * breakpoint.c (set_breakpoint_location_function): Handle
4787 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4788 * elfread.c (elf_symtab_read): Give data symbols with
4789 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4790 (elf_rel_plt_read): Update comment.
4791 * linespec.c (convert_linespec_to_sals): Handle
4793 (minsym_found): Handle mst_data_gnu_ifunc.
4794 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4795 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4796 * parse.c (find_minsym_type_and_address): Handle
4798 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4799 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4800 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4802 <mst_data_gnu_ifunc>: New enumerator.
4804 2018-04-26 Pedro Alves <palves@redhat.com>
4806 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4807 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4808 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4810 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4811 (lookup_minimal_symbol_by_pc): Adjust.
4812 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4813 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4814 * minsyms.h (lookup_msym_prefer): New enum.
4815 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4816 parameter by a lookup_msym_prefer parameter.
4818 2018-04-26 Pedro Alves <palves@redhat.com>
4820 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4821 ends in "@plt" instead of looking at the symbol's section.
4823 2018-04-26 Pedro Alves <palves@redhat.com>
4825 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4827 (find_pc_partial_function_gnu_ifunc): Rename to ...
4828 (find_pc_partial_function): ... this, and remove references to
4830 (find_pc_partial_function): Delete old implementation.
4831 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4833 2018-04-26 Pedro Alves <palves@redhat.com>
4835 * linespec.c (struct bound_minimal_symbol_search_key): New.
4836 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4837 skip first line if we found a GNU ifunc minimal symbol by name.
4838 (compare_msymbols): Change parameters to work with a destructured
4840 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4843 2018-04-26 Pedro Alves <palves@redhat.com>
4845 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4846 ifunc targets here. Instead, if we have an ifunc minsym, use its
4848 (add_location_to_breakpoint): Store the minsym and the objfile in
4849 the breakpoint location.
4850 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4851 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4852 Record the minsym in the sal.
4853 * symtab.h (symtab_and_line) <msymbol>: New field.
4855 2018-04-26 Pedro Alves <palves@redhat.com>
4857 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4858 unless we actually resolved the ifunc.
4860 2018-04-26 Pedro Alves <palves@redhat.com>
4862 * c-exp.y (variable production): Prefer ifunc minsyms over
4863 regular function symbols.
4864 * symtab.c (find_gnu_ifunc): New function.
4865 * minsyms.h (lookup_msym_prefer): New enum.
4866 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4867 parameter by a lookup_msym_prefer parameter.
4868 * symtab.h (find_gnu_ifunc): New declaration.
4870 2018-04-26 Pedro Alves <palves@redhat.com>
4872 * blockframe.c (find_gnu_ifunc_target_type): New function.
4873 (find_function_type): New.
4874 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4875 return a value with a memory address.
4876 (eval_call): For calls to GNU ifunc functions, try to find the
4877 type of the target function from the type that the resolver
4879 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4881 * infcall.c (find_function_return_type): Delete.
4882 (find_function_addr): Add 'function_type' parameter. For calls to
4883 GNU ifunc functions, try to find the type of the target function
4884 from the type that the resolver returns, and return it via
4886 (call_function_by_hand_dummy): Adjust to use the function type
4887 returned by find_function_addr.
4888 (find_function_addr): Add 'function_type' parameter and move
4890 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4893 2018-04-26 Pedro Alves <palves@redhat.com>
4895 * c-exp.y (variable production): Skip finding an alias for ifunc
4898 2018-04-26 Pedro Alves <palves@redhat.com>
4900 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4902 2018-04-25 Pedro Alves <palves@redhat.com>
4904 * infcmd.c (kill_command): Print the pid as string, not the whole
4905 thread's ptid. Add comment. s/has been killed/killed/ in output
4907 * remote.c (remote_detach_1): Print the pid as string, not the
4908 whole thread's ptid.
4910 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4911 Sergio Durigan Junior <sergiodj@redhat.com>
4912 Pedro Alves <palves@redhat.com>
4914 * infcmd.c (kill_command): Print message when inferior has
4916 * inferior.c (print_inferior_events): Remove 'static'. Set as
4918 (add_inferior): Improve message printed when
4919 'print_inferior_events' is on.
4920 (exit_inferior): Remove message printed when
4921 'print_inferior_events' is on.
4922 (detach_inferior): Improve message printed when
4923 'print_inferior_events' is on.
4924 (initialize_inferiors): Use 'add_inferior_silent' to set
4925 'current_inferior_'.
4926 * inferior.h (print_inferior_events): Declare here as
4928 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4929 '[Detaching...]' messages when 'print_inferior_events' is on.
4930 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4931 as prefix/suffix for messages. Remove periods. Fix erroneous
4932 'Detaching after fork from child...', replace it by '... from
4934 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4935 prefix/suffix when printing 'Detaching...' messages. Print
4936 them when 'print_inferior_events' is on.
4937 * remote.c (remote_detach_1): Print message when detaching
4938 from inferior and '!is_fork_parent'.
4940 2018-04-24 Tom Tromey <tom@tromey.com>
4942 * cli-out.h: Reindent.
4944 2018-04-24 Tom Tromey <tom@tromey.com>
4946 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4947 (cli_ui_out::do_field_string): Use fputs_filtered.
4948 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4950 2018-04-23 Tom Tromey <tom@tromey.com>
4952 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4953 gdb::unique_xmalloc_ptr.
4955 2018-04-23 Tom Tromey <tom@tromey.com>
4957 * configure: Rebuild.
4959 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4962 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4963 prepare_for_testing. Set normal_bp to r_debug_state if target
4966 2018-04-21 Pedro Alves <palves@redhat.com>
4967 Rajendra SY <rajendra.sy@gmail.com>
4969 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4970 * remote.c (extended_remote_attach): In all-stop mode, mark the
4971 thread as executing.
4973 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4975 * thread.c (thread_apply_all_command): Fix comment.
4976 (thread_command): Fix comment.
4978 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4980 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4982 * features/aarch64-core.c (create_feature_aarch64_core):
4984 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4986 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4988 * features/i386/32bit-avx512.c
4989 (create_feature_i386_32bit_avx512): Likewise.
4990 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4992 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4994 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4996 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4998 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5000 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5002 * features/i386/64bit-avx512.c
5003 (create_feature_i386_64bit_avx512): Likewise.
5004 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5006 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5008 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5010 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5012 * features/i386/64bit-segments.c
5013 (create_feature_i386_64bit_segments): Likewise.
5014 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5016 * features/i386/x32-core.c
5017 (create_feature_i386_x32_core): Likewise.
5018 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5019 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5020 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5021 * target-descriptions.c: In generated code, don't pass xml
5024 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5026 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5027 (print_xml_feature::visit_post): Likewise.
5028 (print_xml_feature::visit): Likewise.
5029 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5030 (print_xml_feature): Add new class.
5031 * regformats/regdat.sh: Null xmltarget on feature targets.
5032 * target-descriptions.c (struct target_desc): Add xmltarget.
5033 (maintenance_check_tdesc_xml_convert): Add unittest function.
5034 (tdesc_get_features_xml): Add function to get xml.
5035 (maintenance_check_xml_descriptions): Test xml generation.
5036 * xml-tdesc.c (string_read_description_xml): Add function.
5037 * xml-tdesc.h (string_read_description_xml): Add declaration.
5039 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5041 * features/Makefile: Add feature marker to targets with new style
5042 target descriptions.
5043 * regformats/aarch64.dat: Regenerate.
5044 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5045 * regformats/i386/amd64-avx-linux.dat: Likewise.
5046 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5047 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5048 * regformats/i386/amd64-linux.dat: Likewise.
5049 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5050 * regformats/i386/amd64.dat: Likewise.
5051 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5052 * regformats/i386/i386-avx-linux.dat: Likewise.
5053 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5054 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5055 * regformats/i386/i386-linux.dat: Likewise.
5056 * regformats/i386/i386-mmx-linux.dat: Likewise.
5057 * regformats/i386/i386-mpx-linux.dat: Likewise.
5058 * regformats/i386/i386.dat: Likewise.
5059 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5060 * regformats/i386/x32-avx-linux.dat: Likewise.
5061 * regformats/i386/x32-linux.dat: Likewise.
5062 * regformats/tic6x-c62x-linux.dat: Likewise.
5063 * regformats/tic6x-c64x-linux.dat: Likewise.
5064 * regformats/tic6x-c64xp-linux.dat: Likewise.
5065 * regformats/regdat.sh: Parse feature marker.
5067 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5069 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5070 (tdesc_osabi_name): Likewise.
5071 * target-descriptions.c (tdesc_architecture_name): Add new
5073 (tdesc_osabi_name): Likewise.
5075 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5077 * common/tdesc.c (tdesc_predefined_type): Move to here.
5078 (tdesc_named_type): Likewise.
5079 (tdesc_create_vector): Likewise.
5080 (tdesc_create_struct): Likewise.
5081 (tdesc_set_struct_size): Likewise.
5082 (tdesc_create_union): Likewise.
5083 (tdesc_create_flags): Likewise.
5084 (tdesc_create_enum): Likewise.
5085 (tdesc_add_field): Likewise.
5086 (tdesc_add_typed_bitfield): Likewise.
5087 (tdesc_add_bitfield): Likewise.
5088 (tdesc_add_flag): Likewise.
5089 (tdesc_add_enum_value): Likewise.
5090 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5091 (struct tdesc_type_vector): Likewise.
5092 (struct tdesc_type_field): Likewise.
5093 (struct tdesc_type_with_fields): Likewise.
5094 (tdesc_create_enum): Add declaration.
5095 (tdesc_add_typed_bitfield): Likewise.
5096 (tdesc_add_enum_value): Likewise.
5097 * target-descriptions.c (tdesc_type_field): Move from here.
5098 (tdesc_type_builtin): Likewise.
5099 (tdesc_type_vector): Likewise.
5100 (tdesc_type_with_fields): Likewise.
5101 (tdesc_predefined_types): Likewise.
5102 (tdesc_named_type): Likewise.
5103 (tdesc_create_vector): Likewise.
5104 (tdesc_create_struct): Likewise.
5105 (tdesc_set_struct_size): Likewise.
5106 (tdesc_create_union): Likewise.
5107 (tdesc_create_flags): Likewise.
5108 (tdesc_create_enum): Likewise.
5109 (tdesc_add_field): Likewise.
5110 (tdesc_add_typed_bitfield): Likewise.
5111 (tdesc_add_bitfield): Likewise.
5112 (tdesc_add_flag): Likewise.
5113 (tdesc_add_enum_value): Likewise.
5114 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5115 (tdesc_add_typed_bitfield): Likewise.
5116 (tdesc_add_enum_value): Likewise.
5118 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5120 * common/tdesc.c (tdesc_feature::accept): Move to here.
5121 (tdesc_feature::operator==): Likewise.
5122 (tdesc_create_reg): Likewise.
5123 * common/tdesc.h (tdesc_type_kind): Likewise.
5124 (struct tdesc_type): Likewise.
5125 (struct tdesc_feature): Likewise.
5126 * regformats/regdat.sh: Create a feature.
5127 * target-descriptions.c (tdesc_type_kind): Move from here.
5128 (tdesc_type): Likewise.
5129 (tdesc_type_up): Likewise.
5130 (tdesc_feature): Likewise.
5131 (tdesc_create_reg): Likewise.
5133 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5135 * Makefile.in: Add arch/tdesc.c
5136 * common/tdesc.c: New file.
5137 * common/tdesc.h (tdesc_element_visitor): Move to here.
5138 (tdesc_element): Likewise.
5139 (tdesc_reg): Likewise.
5140 (tdesc_reg_up): Likewise.
5141 * regformats/regdef.h (reg): Add offset to constructors.
5142 * target-descriptions.c (tdesc_element_visitor): Move from here.
5143 (tdesc_element): Likewise.
5144 (tdesc_reg): Likewise.
5145 (tdesc_reg_up): Likewise.
5147 2018-04-17 Tom Tromey <tom@tromey.com>
5149 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5152 2018-04-17 Tom Tromey <tom@tromey.com>
5154 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5156 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5158 * symtab.c (print_symbol_info): Skip printing filename and line
5159 number when `last' is NULL.
5160 (symtab_symbol_info): Use empty string instead of NULL for first
5161 invocation of print_symbol_info.
5162 (rbreak_command): Pass NULL to `last' parameter of
5165 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5167 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5170 2018-04-16 Pedro Alves <palves@redhat.com>
5172 * MAINTAINERS (sh): Remove.
5173 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5174 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5175 (ALLDEPFILES): Remove sh64-tdep.c.
5176 * NEWS: Mentions that support for SH-5/SH64 is removed.
5177 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5178 (sh*-*-openbsd*): Ditto.
5179 (sh64-*-elf*): Remove.
5181 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5182 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5183 * sh-tdep.c: No longer include "sh64-tdep.h".
5184 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5185 * sh64-tdep.c, sh64-tdep.h: Remove files.
5187 2018-04-16 Pedro Alves <palves@redhat.com>
5189 * MAINTAINERS: Remove m88k.
5190 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5191 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5192 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5193 * NEWS: Mention that support for m88k was removed.
5194 * configure.host (m88*-*-*): Remove support.
5195 * configure.nat (m88k-*-*): Remove support.
5196 * configure.tgt (m88*-*-openbsd*): Remove.
5197 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5199 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5201 * configure.tgt (x86_tobjs): New variable.
5202 (amd64_tobjs, i386_tobjs): Use it.
5204 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5206 * symtab.c (print_symbol_info): Precede the symbol definition by
5207 the line number when available.
5208 * NEWS: Advertise this enhancement.
5210 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5212 * NEWS (New options): announce set/show record btrace cpu.
5213 * btrace.c: Include record-btrace.h.
5214 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5215 the vendor is unknown.
5216 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5217 Maybe overwrite the btrace configuration's cpu.
5218 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5219 (btrace_fetch): Add cpu parameter. Update callers.
5220 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5221 Maybe overwrite the btrace configuration's cpu. Skip enabling
5222 errata workarounds if the vendor is unknown.
5223 * python/py-record-btrace.c: Include record-btrace.h.
5224 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5225 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5226 * record-btrace.c (record_btrace_cpu_state_kind): New.
5227 (record_btrace_cpu): New.
5228 (set_record_btrace_cpu_cmdlist): New.
5229 (record_btrace_get_cpu): New.
5230 (require_btrace_thread, record_btrace_info)
5231 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5232 (cmd_set_record_btrace_cpu_none): New.
5233 (cmd_set_record_btrace_cpu_auto): New.
5234 (cmd_set_record_btrace_cpu): New.
5235 (cmd_show_record_btrace_cpu): New.
5236 (_initialize_record_btrace): Initialize set/show record btrace cpu
5238 * record-btrace.h (record_btrace_get_cpu): New.
5240 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5242 * record.c (set_record_command): Fix typo in message.
5244 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5246 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5248 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5250 * infrun.c (process_event_stop_test): Call
5251 gdbarch_in_indirect_branch_thunk.
5252 * gdbarch.sh (in_indirect_branch_thunk): New.
5253 * gdbarch.c: Regenerated.
5254 * gdbarch.h: Regenerated.
5257 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5258 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5259 (ALLDEPFILES): Add x86-tdep.c.
5260 * arch-utils.h (default_in_indirect_branch_thunk): New.
5261 * arch-utils.c (default_in_indirect_branch_thunk): New.
5262 * i386-tdep: Include x86-tdep.h.
5263 (i386_in_indirect_branch_thunk): New.
5264 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5266 * amd64-tdep: Include x86-tdep.h.
5267 (amd64_in_indirect_branch_thunk): New.
5268 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5270 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5273 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5274 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5275 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5278 2018-04-12 Tom Tromey <tom@tromey.com>
5280 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5281 (rust_evaluate_subexp): Likewise.
5283 2018-04-12 Pedro Alves <palves@redhat.com>
5285 * procfs.c (procfs_detach): Make forward declaration's prototype
5286 match definition's protototype.
5287 (proc_get_LDT_entry): Remove stale do_cleanups call.
5289 2018-04-12 Pedro Alves <palves@redhat.com>
5291 * target.h (target_ops::to_has_exited): Delete.
5292 (target_has_exited): Delete.
5293 * target-delegates.c: Regenerate.
5295 2018-04-11 Pedro Alves <palves@redhat.com>
5297 * target.c (fileio_fh_t::t): Add comment.
5298 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5299 (target_fileio_close): Handle a NULL target.
5300 (invalidate_fileio_fh): New.
5301 (target_close): Call it.
5302 * remote.c (remote_hostio_send_command): No longer check whether
5303 remote_desc is open.
5305 2018-04-11 Pedro Alves <palves@redhat.com>
5307 * target.c (fileio_fh_t): Make it a named struct instead of a
5309 (fileio_fh_t::is_closed): New method.
5310 (DEF_VEC_O (fileio_fh_t)): Remove.
5311 (fileio_fhandles): Now a std::vector.
5312 (is_closed_fileio_fh): Delete.
5313 (acquire_fileio_fd): Adjust. Rename parameters.
5314 (release_fileio_fd): Adjust.
5315 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5316 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5317 (target_fileio_close): Adjust.
5319 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5321 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5324 2018-04-10 Pedro Alves <palves@redhat.com>
5326 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5327 (scoped_finish_thread_state): New class.
5328 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5330 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5331 (fetch_inferior_event, normal_stop): Likewise.
5332 * thread.c (finish_thread_state_cleanup): Delete.
5334 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5335 Pedro Alves <palves@redhat.com>
5337 * value.c: Include "selftest.h" and "common/array-view.h".
5338 (struct range) <operator ==>: New.
5339 (test_ranges_contain): New.
5340 (check_ranges_vector): New.
5341 (test_insert_into_bit_range_vector): New.
5342 (_initialize_values): Register selftests.
5343 * common/array-view.h (operator==, operator!=): New.
5345 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5347 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5349 * inline-frame.c: Include <algorithm>.
5350 (struct inline_state): Add constructor.
5351 (inline_state_s): Remove.
5352 (DEF_VEC_O(inline_state_s)): Remove.
5353 (inline_states): Change type to std::vector.
5354 (find_inline_frame_state): Adjust to std::vector.
5355 (allocate_inline_frame_state): Remove.
5356 (clear_inline_frame_state): Adjust to std::vector.
5357 (skip_inline_frames): Adjust to std::vector.
5359 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5361 * tracepoint.h (struct trace_state_variable): Add constructor.
5362 <name>: Change type to std::string.
5363 * tracepoint.c (tsv_s): Remove.
5364 (DEF_VEC_O(tsv_s)): Remove.
5365 (tvariables): Change to std::vector.
5366 (create_trace_state_variable): Adjust to std::vector.
5367 (find_trace_state_variable): Likewise.
5368 (find_trace_state_variable_by_number): Likewise.
5369 (delete_trace_state_variable): Likewise.
5370 (trace_variable_command): Adjust to std::string.
5371 (delete_trace_variable_command): Likewise.
5372 (tvariables_info_1): Adjust to std::vector.
5373 (save_trace_state_variables): Likewise.
5374 (start_tracing): Likewise.
5375 (merge_uploaded_trace_state_variables): Adjust to std::vector
5377 * target.h (struct target_ops)
5378 <to_download_trace_state_variable>: Pass reference to
5379 trace_state_variable.
5380 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5381 * target-delegates.c: Re-generate.
5382 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5383 (mi_tsv_deleted): Likewise.
5384 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5385 * remote.c (remote_download_trace_state_variable): Change
5386 pointer to reference and adjust.
5387 * make-target-delegates (parse_argtypes): Handle references.
5388 (write_function_header): Likewise.
5389 (munge_type): Likewise.
5391 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5393 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5394 string_view-selftests.c.
5395 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5397 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5398 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5399 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5400 * unittests/basic_string_view/element_access/char/1.cc:
5402 * unittests/basic_string_view/element_access/char/empty.cc:
5404 * unittests/basic_string_view/element_access/char/front_back.cc:
5406 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5407 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5409 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5411 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5413 * unittests/basic_string_view/operations/compare/char/1.cc:
5415 * unittests/basic_string_view/operations/compare/char/13650.cc:
5417 * unittests/basic_string_view/operations/copy/char/1.cc:
5419 * unittests/basic_string_view/operations/data/char/1.cc:
5421 * unittests/basic_string_view/operations/find/char/1.cc:
5423 * unittests/basic_string_view/operations/find/char/2.cc:
5425 * unittests/basic_string_view/operations/find/char/3.cc:
5427 * unittests/basic_string_view/operations/find/char/4.cc:
5429 * unittests/basic_string_view/operations/rfind/char/1.cc:
5431 * unittests/basic_string_view/operations/rfind/char/2.cc:
5433 * unittests/basic_string_view/operations/rfind/char/3.cc:
5435 * unittests/basic_string_view/operations/substr/char/1.cc:
5437 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5438 * unittests/string_view-selftests.c: New file.
5440 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5442 * unittests/basic_string_view/capacity/1.cc: New file.
5443 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5444 * unittests/basic_string_view/cons/char/1.cc: New file.
5445 * unittests/basic_string_view/cons/char/2.cc: New file.
5446 * unittests/basic_string_view/cons/char/3.cc: New file.
5447 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5448 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5449 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5450 * unittests/basic_string_view/element_access/char/1.cc: New file.
5451 * unittests/basic_string_view/element_access/char/2.cc: New file.
5452 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5453 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5454 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5455 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5456 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5457 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5458 * unittests/basic_string_view/include.cc: New file.
5459 * unittests/basic_string_view/inserters/char/1.cc: New file.
5460 * unittests/basic_string_view/inserters/char/2.cc: New file.
5461 * unittests/basic_string_view/inserters/char/3.cc: New file.
5462 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5463 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5464 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5465 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5466 * unittests/basic_string_view/literals/types.cc: New file.
5467 * unittests/basic_string_view/literals/values.cc: New file.
5468 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5469 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5470 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5471 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5472 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5473 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5474 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5475 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5476 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5477 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5478 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5479 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5480 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5481 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5482 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5483 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5484 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5485 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5486 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5487 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5488 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5489 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5490 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5491 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5492 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5493 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5494 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5495 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5496 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5497 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5498 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5499 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5500 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5501 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5502 * unittests/basic_string_view/operators/char/2.cc: New file.
5503 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5504 * unittests/basic_string_view/range_access/char/1.cc: New file.
5505 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5506 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5507 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5508 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5509 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5510 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5511 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5512 * unittests/basic_string_view/typedefs.cc: New file.
5513 * unittests/basic_string_view/types/1.cc: New file.
5515 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5517 * common/gdb_string_view.h: Remove libstdc++ implementation
5518 details, adjust to gdb reality.
5519 * common/gdb_string_view.tcc: Likewise.
5520 * cli/cli-script.c (struct string_view): Remove.
5521 (user_args) <m_args>: Change element type to gdb::string_view.
5522 (user_args::insert_args): Adjust.
5524 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5526 * common/gdb_string_view.h: New file.
5527 * common/gdb_string_view.tcc: New file.
5529 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5531 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5532 * configure: Re-generate.
5534 2018-04-09 Pedro Alves <palves@redhat.com>
5536 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5537 (set_target_gdbarch): Call
5538 gdb::observers::architecture_changed.notify instead of
5539 observer_notify_architecture_changed.
5541 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5543 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5544 (do_restore_current_traceframe_cleanup): Remove.
5545 (restore_current_traceframe_cleanup_dtor): Remove.
5546 (make_cleanup_restore_current_traceframe): Remove.
5547 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5549 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5550 * infrun.c (fetch_inferior_event): Use
5551 scoped_restore_current_traceframe.
5553 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5555 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5557 <n_allocated_type_units>: Remove.
5558 <all_type_units>: Change to std::vector.
5559 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5560 to std::vector change.
5561 (dwarf2_per_objfile::get_cutu): Likewise.
5562 (dwarf2_per_objfile::get_tu): Likewise.
5563 (create_signatured_type_table_from_index): Likewise.
5564 (create_signatured_type_table_from_debug_names): Likewise.
5565 (dw2_symtab_iter_next): Likewise.
5566 (dw2_print_stats): Likewise.
5567 (dw2_expand_all_symtabs): Likewise.
5568 (dw2_expand_marked_cus): Likewise.
5569 (dw2_debug_names_iterator::next): Likewise.
5570 (dwarf2_initialize_objfile): Likewise.
5571 (add_signatured_type_cu_to_table): Likewise.
5572 (create_all_type_units): Likewise.
5573 (add_type_unit): Likewise.
5574 (struct tu_abbrev_offset): Add constructor.
5575 (build_type_psymtabs_1): Adjust to std::vector change.
5576 (print_tu_stats): Likewise.
5577 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5578 (write_debug_names): Likewise.
5580 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5582 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5583 Make an std::vector.
5584 <n_comp_units>: Remove.
5585 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5586 to std::vector change.
5587 (dwarf2_per_objfile::get_cutu): Likewise.
5588 (dwarf2_per_objfile::get_cu): Likewise.
5589 (create_cus_from_index): Likewise.
5590 (create_addrmap_from_index): Likewise.
5591 (create_addrmap_from_aranges): Likewise.
5592 (dwarf2_read_index): Likewise.
5593 (dw2_find_last_source_symtab): Likewise.
5594 (dw2_map_symtabs_matching_filename): Likewise.
5595 (dw2_symtab_iter_next): Likewise.
5596 (dw2_print_stats): Likewise.
5597 (dw2_expand_all_symtabs): Likewise.
5598 (dw2_expand_symtabs_with_fullname): Likewise.
5599 (dw2_expand_marked_cus): Likewise.
5600 (dw2_map_symbol_filenames): Likewise.
5601 (create_cus_from_debug_names): Likewise.
5602 (dwarf2_read_debug_names): Likewise.
5603 (dw2_debug_names_iterator::next): Likewise.
5604 (dwarf2_initialize_objfile): Likewise.
5605 (set_partial_user): Likewise.
5606 (dwarf2_build_psymtabs_hard): Likewise.
5607 (read_comp_units_from_section): Remove arguments, adjust to
5609 (create_all_comp_units): Adjust to std::vector and
5610 read_comp_units_from_section changes.
5611 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5613 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5614 (psyms_seen_size): Likewise.
5615 (write_gdbindex): Likewise.
5616 (write_debug_names): Likewise.
5618 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5620 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5621 with dwarf2_per_objfile.
5622 (create_cus_from_index): Likewise.
5623 (create_signatured_type_table_from_index): Likewise.
5624 (dwarf2_read_index): Likewise.
5625 (dwarf2_initialize_objfile): Likewise.
5626 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5627 per_cu rather than get_dwarf2_per_objfile.
5629 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5631 * dwarf2read.h (struct signatured_type): Forward declare.
5632 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5634 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5635 (dw2_get_cutu): ...this.
5636 (dwarf2_per_objfile::get_cu): Rename from...
5637 (dw2_get_cu): ...this.
5638 (dwarf2_per_objfile::get_tu): New.
5639 (create_addrmap_from_index): Adjust.
5640 (create_addrmap_from_aranges): Adjust.
5641 (dw2_find_last_source_symtab): Adjust.
5642 (dw2_map_symtabs_matching_filename): Adjust.
5643 (dw2_symtab_iter_next): Adjust.
5644 (dw2_print_stats): Adjust.
5645 (dw2_expand_all_symtabs): Adjust.
5646 (dw2_expand_symtabs_with_fullname): Adjust.
5647 (dw2_expand_marked_cus): Adjust.
5648 (dw_expand_symtabs_matching_file_matcher): Adjust.
5649 (dw2_map_symbol_filenames): Adjust.
5650 (dw2_debug_names_iterator::next): Adjust.
5651 (dwarf2_initialize_objfile): Adjust.
5652 (set_partial_user): Adjust.
5653 (dwarf2_build_psymtabs_hard): Adjust.
5655 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5657 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5658 Remove unused variables.
5659 (dw2_map_symtabs_matching_filename): Likewise.
5660 (dwarf2_record_block_ranges): Likewise.
5661 (dwarf2_read_addr_index): Likewise.
5662 (follow_die_offset): Likewise.
5664 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5666 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5667 to symbol_file_add_main.
5669 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5672 * mi/mi-console.c (do_fputc_async_safe): New.
5673 (mi_console_file::write_async_safe): New.
5674 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5675 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5677 * ui-file.c (ui_file::putstrn): Adjust call to
5678 fputstrn_unfiltered.
5679 * utils.c (printchar): Replace do_fputs and do_fprintf
5680 parameters by do_fputc.
5681 (fputstr_filtered): Adjust call to printchar.
5682 (fputstr_unfiltered): Likewise.
5683 (fputstrn_filtered): Likewise.
5684 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5686 * utils.h (do_fputc_ftype): New typedef.
5687 (fputstrn_unfiltered): Add do_fputc parameter.
5689 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5691 * regformats/i386/i386-avx.dat: Remove.
5693 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5696 * amd64-tdep.c (amd64_none_init_abi): New function.
5697 (amd64_x32_none_init_abi): New function.
5698 (_initialize_amd64_tdep): Register handlers for x86-64 and
5699 x64_32 with GDB_OSABI_NONE.
5700 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5701 GDB_OSABI_NONE osabi.
5703 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5706 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5708 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5709 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5711 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5713 * common/byte-vector.h (char_vector): New type.
5714 * target.h (target_read_alloc): Return
5715 gdb::optional<byte_vector>.
5716 (target_read_stralloc): Return gdb::optional<char_vector>.
5717 (target_get_osdata): Return gdb::optional<char_vector>.
5718 * target.c (target_read_alloc_1): Templatize. Replacement
5719 manual memory management with vector.
5720 (target_read_alloc): Change return type, adjust.
5721 (target_read_stralloc): Change return type, adjust.
5722 (target_get_osdata): Change return type, adjust.
5723 * auxv.c (struct auxv_info) <length>: Remove.
5724 <data>: Change type to gdb::optional<byte_vector>.
5725 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5726 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5727 (target_auxv_search): Adjust.
5728 (fprint_target_auxv): Adjust.
5729 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5730 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5731 (linux_make_corefile_notes): Adjust.
5732 * osdata.c (get_osdata): Adjust.
5733 * remote.c (remote_get_threads_with_qxfer): Adjust.
5734 (remote_memory_map): Adjust.
5735 (remote_traceframe_info): Adjust.
5736 (btrace_read_config): Adjust.
5737 (remote_read_btrace): Adjust.
5738 (remote_pid_to_exec_file): Adjust.
5739 * solib-aix.c (solib_aix_get_library_list): Adjust.
5740 * solib-dsbt.c (decode_loadmap): Don't free buf.
5741 (dsbt_get_initial_loadmaps): Adjust.
5742 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5743 * solib-target.c (solib_target_current_sos): Adjust.
5744 * tracepoint.c (sdata_make_value): Adjust.
5745 * xml-support.c (xinclude_start_include): Adjust.
5746 (xml_fetch_content_from_file): Adjust.
5747 * xml-support.h (xml_fetch_another): Change return type.
5748 (xml_fetch_content_from_file): Change return type.
5749 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5750 * xml-tdesc.c (file_read_description_xml): Adjust.
5751 (fetch_available_features_from_target): Change return type.
5752 (target_fetch_description_xml): Adjust.
5753 (target_read_description_xml): Adjust.
5755 2018-04-06 Tom Tromey <tom@tromey.com>
5757 * value.c (~value): Update.
5758 (struct value) <contents>: Now unique_xmalloc_ptr.
5759 (value_contents_bits_eq, allocate_value_contents)
5760 (value_contents_raw, value_contents_all_raw)
5761 (value_contents_for_printing, value_contents_for_printing_const)
5762 (set_value_enclosing_type): Update.
5764 2018-04-06 Tom Tromey <tom@tromey.com>
5766 * value.c (range_s): Remove typedef, VEC.
5767 (struct range): Add operator<.
5768 (range_lessthan): Remove.
5769 (ranges_contain): Change type.
5771 (struct value) <unavailable, optimized_out>: Now std::vector.
5772 (value_entirely_available)
5773 (value_entirely_covered_by_range_vector)
5774 (value_entirely_unavailable, value_entirely_optimized_out):
5776 (insert_into_bit_range_vector): Change argument type.
5777 (find_first_range_overlap): Likewise.
5778 (struct ranges_and_idx, value_contents_bits_eq)
5779 (require_not_optimized_out, require_available): Update.
5780 (ranges_copy_adjusted): Change argument types.
5781 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5783 2018-04-06 Tom Tromey <tom@tromey.com>
5785 * value.c (~value): Update.
5786 (struct value) <parent>: Now a value_ref_ptr.
5787 (value_parent, set_value_parent, value_address, value_copy):
5790 2018-04-06 Tom Tromey <tom@tromey.com>
5792 * value.c (struct value): Add constructor, destructor, and member
5794 (allocate_value_lazy, value_decref): Update.
5796 2018-04-06 Tom Tromey <tom@tromey.com>
5798 * value.c (struct value) <released, next>: Remove.
5799 (all_values): Now a std::vector.
5800 (allocate_value_lazy): Update.
5801 (value_next): Remove.
5802 (value_mark, value_free_to_mark, release_value)
5803 (value_release_to_mark): Update.
5805 2018-04-06 Tom Tromey <tom@tromey.com>
5807 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5808 (free_value_chain): Remove.
5809 * value.c (free_value_chain): Remove.
5810 (value_release_to_mark): Return a std::vector.
5811 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5813 (check_condition): Update.
5814 * eval.c (fetch_subexp_value): Change "val_chain" to a
5816 * breakpoint.c (update_watchpoint): Update.
5817 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5819 2018-04-06 Tom Tromey <tom@tromey.com>
5821 * value.h (free_all_values): Remove.
5822 * value.c (free_all_values): Remove.
5824 2018-04-06 Tom Tromey <tom@tromey.com>
5826 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5827 (value_history_chain, value_history_count): Remove.
5828 (value_history): New global.
5829 (record_latest_value, access_value_history, show_values)
5830 (preserve_values): Update.
5832 2018-04-06 Tom Tromey <tom@tromey.com>
5834 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5835 * varobj.c (varobj_set_display_format, varobj_set_value)
5836 (install_default_visualizer, construct_visualizer)
5837 (install_new_value, ~varobj, varobj_get_value_type)
5838 (my_value_of_variable, varobj_editable_p): Update.
5839 * c-varobj.c (c_describe_child, c_value_of_variable)
5840 (cplus_number_of_children, cplus_describe_child): Update.
5841 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5842 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5843 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5845 2018-04-06 Tom Tromey <tom@tromey.com>
5847 * printcmd.c (last_examine_address): Change type to
5849 (do_examine, x_command): Update.
5851 2018-04-06 Tom Tromey <tom@tromey.com>
5853 * value.c (release_value): Update.
5854 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5855 (struct bpstats) <val>: Now a value_ref_ptr.
5856 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5857 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5858 (~watchpoint, print_it_watchpoint, watch_command_1)
5859 (invalidate_bp_value_on_memory_change): Update.
5861 2018-04-06 Tom Tromey <tom@tromey.com>
5863 * varobj.c (varobj_clear_saved_item)
5864 (update_dynamic_varobj_children, install_new_value, ~varobj):
5866 * value.h (value_incref): Move declaration earlier.
5867 (value_decref): Rename from value_free.
5868 (struct value_ref_policy): New.
5869 (value_ref_ptr): New typedef.
5870 (struct value_deleter): Remove.
5871 (gdb_value_up): Remove typedef.
5872 (release_value): Change return type.
5873 (release_value_or_incref): Remove.
5874 * value.c (set_value_parent): Update.
5875 (value_incref): Change return type.
5876 (value_decref): Rename from value_free.
5877 (value_free_to_mark, free_all_values, free_value_chain): Update.
5878 (release_value): Return value_ref_ptr.
5879 (release_value_or_incref): Remove.
5880 (record_latest_value, set_internalvar, clear_internalvar):
5882 * stack.c (info_frame_command): Don't call value_free.
5883 * python/py-value.c (valpy_dealloc, valpy_new)
5884 (value_to_value_object): Update.
5885 * printcmd.c (do_examine): Update.
5886 * opencl-lang.c (lval_func_free_closure): Update.
5887 * mi/mi-main.c (register_changed_p): Don't call value_free.
5888 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5889 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5890 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5892 * guile/scm-value.c (vlscm_free_value_smob)
5893 (vlscm_scm_from_value): Update.
5894 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5895 (frame_unwind_register_unsigned, get_frame_register_bytes)
5896 (put_frame_register_bytes): Don't call value_free.
5897 * findvar.c (address_from_register): Don't call value_free.
5898 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5899 * dwarf2loc.c (entry_data_value_free_closure)
5900 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5901 (dwarf2_evaluate_loc_desc_full): Update.
5902 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5903 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5904 (~watchpoint, watch_command_1)
5905 (invalidate_bp_value_on_memory_change): Update.
5906 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5908 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5911 * warning.m4: Add -Wno-error=deprecated-register.
5912 * configure: Re-generate.
5914 2018-04-05 Tom Tromey <tom@tromey.com>
5916 * linespec.h: Remove include of "vec.h".
5918 2018-04-05 Tom Tromey <tom@tromey.com>
5920 * linespec.c (typep): Remove typedef.
5921 (find_methods, find_superclass_methods): Take a std::vector.
5922 (find_method): Use std::vector.
5924 2018-04-05 Tom Tromey <tom@tromey.com>
5926 * utils.c (compare_strings): Remove.
5927 * utils.h (compare_strings): Remove.
5928 * objc-lang.h (find_imps): Update.
5929 * objc-lang.c (find_methods): Take a std::vector.
5930 (uniquify_strings, find_imps): Likewise.
5931 * linespec.c (find_methods): Take a std::vector.
5932 (decode_objc): Use std::vector.
5933 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5935 (find_method, find_function_symbols): Use std::vector.
5937 2018-04-05 Tom Tromey <tom@tromey.com>
5939 * completer.c (completion_tracker::completion_tracker): Remove
5941 (completion_tracker::discard_completions): Likewise.
5942 * breakpoint.c (ambiguous_names_p): Remove cast.
5943 * ada-lang.c (_initialize_ada_language): Remove cast.
5944 * utils.h (streq): Update.
5945 (streq_hash): Add new declaration.
5946 * utils.c (streq): Return bool.
5947 (streq_hash): New function.
5949 2018-04-05 Tom Tromey <tom@tromey.com>
5951 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5952 Remove a string copy.
5954 2018-04-05 Tom Tromey <tom@tromey.com>
5956 * linespec.c (filter_results): Use std::vector.
5957 (decode_line_2, decode_line_full): Update.
5959 2018-04-05 Tom Tromey <tom@tromey.com>
5961 * linespec.c (canonical_to_fullform): Return std::string.
5962 (filter_results): Update.
5963 (struct decode_line_2_item): Add constructor.
5964 <fullform, displayform>: Now std::string.
5965 (decode_line_2_compare_items): Now a std::sort comparator.
5966 (decode_line_2): Update.
5968 2018-04-05 Tom Tromey <tom@tromey.com>
5970 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5971 (unexpected_linespec_error): Update.
5972 (linespec_parse_basic, parse_linespec): Update.
5974 2018-04-05 Tom Tromey <tom@tromey.com>
5976 * linespec.c (linespec_parse_basic): Reindent.
5978 2018-04-05 Tom Tromey <tom@tromey.com>
5980 * minsyms.h (iterate_over_minimal_symbols): Update.
5981 * minsyms.c (iterate_over_minimal_symbols): Take a
5983 * linespec.c (struct collect_minsyms): Remove.
5984 (compare_msyms): Now a std::sort comparator.
5985 (add_minsym): Add parameters.
5986 (search_minsyms_for_name): Update. Use std::vector.
5988 2018-04-03 Tom Tromey <tom@tromey.com>
5990 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5993 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5995 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5997 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6000 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6001 printing static type.
6003 2018-04-01 Tom Tromey <tom@tromey.com>
6005 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6006 (rs6000_xfer_shared_libraries): Update.
6008 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6010 * common/gdb_vecs.h (char_ptr): Remove.
6011 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6013 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6015 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6017 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6019 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6021 * tracepoint.h (struct uploaded_tp): Initialize fields.
6022 <actions, step_actions, cmd_strings>: Change type to
6023 std::vector<char *>.
6024 * tracepoint.c (get_uploaded_tp): Allocate with new.
6025 (free_uploaded_tps): Free with delete.
6026 (parse_tracepoint_definition): Adjust to std::vector change.
6027 * breakpoint.c (read_uploaded_action): Likewise.
6028 (create_tracepoint_from_upload): Likewise.
6029 * ctf.c (ctf_write_uploaded_tp): Likewise.
6030 (SET_ARRAY_FIELD): Likewise.
6031 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6033 2018-03-30 Tom Tromey <tom@tromey.com>
6035 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6037 (svr4_keep_data_in_core): Update.
6038 (svr4_read_so_list): Update.
6040 2018-03-30 Tom Tromey <tom@tromey.com>
6042 * windows-nat.c (handle_output_debug_string, handle_exception):
6044 * target.h (target_read_string): Update.
6045 * target.c (target_read_string): Change "string" to
6047 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6049 * solib-frv.c (frv_current_sos): Update.
6050 * solib-dsbt.c (dsbt_current_sos): Update.
6051 * solib-darwin.c (darwin_current_sos): Update.
6052 * linux-thread-db.c (inferior_has_bug): Update.
6053 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6054 Update. Remove alloca.
6055 * ada-lang.c (ada_main_name): Update.
6057 2018-03-30 Tom Tromey <tom@tromey.com>
6059 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6060 (struct dwo_file_deleter): New.
6061 (dwo_file_up): New typedef.
6062 (open_and_init_dwo_file): Use dwo_file_up.
6063 (free_dwo_file_cleanup): Remove.
6065 2018-03-30 Tom Tromey <tom@tromey.com>
6067 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6068 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6070 2018-03-30 Tom Tromey <tom@tromey.com>
6072 * dwarf2read.c (class free_cached_comp_units): New class.
6073 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6074 (free_cached_comp_units): Remove function.
6076 2018-03-30 Tom Tromey <tom@tromey.com>
6078 * utils.h (make_cleanup_unpush_target): Remove.
6079 * inf-ptrace.c (struct target_unpusher): New.
6080 (target_unpush_up) New typedef.
6081 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6083 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6085 2018-03-27 Tom Tromey <tom@tromey.com>
6087 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6089 2018-03-27 Pedro Alves <palves@redhat.com>
6090 Tom Tromey <tom@tromey.com>
6092 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6093 destructor. Now a class.
6094 (gdb_readline_wrapper_cleanup): Remove function.
6095 (gdb_readline_wrapper): Remove cleanups.
6097 2018-03-27 Tom Tromey <tom@tromey.com>
6099 * typeprint.h (struct type_print_options) <local_typedefs,
6100 global_typedefs>: Remove "struct" keyword.
6101 (class typedef_hash_table): New class.
6102 (recursively_update_typedef_hash, add_template_parameters)
6103 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6104 (find_typedef_in_hash): Don't declare.
6105 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6106 (typedef_hash_table::recursively_update): Rename from
6107 recursively_update_typedef_hash. Now a member.
6108 (typedef_hash_table::add_template_parameters): Rename from
6109 add_template_parameters. Now a member.
6110 (typedef_hash_table::typedef_hash_table): Now a constructor;
6111 rename from create_typedef_hash.
6112 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6113 rename from free_typedef_hash.
6114 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6115 (do_free_global_table): Remove.
6116 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6117 from copy_type_recursive.
6118 (create_global_typedef_table): Remove.
6119 (typedef_hash_table::find_global_typedef): Now a member of
6121 (typedef_hash_table::find_typedef): Rename from
6122 find_typedef_in_hash; now a member.
6123 (whatis_exp): Update.
6124 * extension.h (struct ext_lang_type_printers): Add constructor and
6126 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6128 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6129 Now a constructor; rename from start_ext_lang_type_printers.
6130 (ext_lang_type_printers): Now a destructor; rename from
6131 free_ext_lang_type_printers.
6132 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6134 (c_type_print_base_struct_union): Update. Remove cleanups.
6136 2018-03-27 Tom Tromey <tom@tromey.com>
6138 * dwarf-index-write.c: Include <cmath>.
6140 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6142 * NEWS: Add entry describing new "set|show varsize-limit" command.
6143 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6145 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6148 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6150 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6152 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6153 * dwarf-index-common.c: New file.
6154 * dwarf-index-common.h: New file.
6155 * dwarf-index-write.c: New file.
6156 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6157 (struct dwarf2_section_info): Move from here.
6158 (dwarf2_section_info_def): Likewise.
6159 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6160 (offset_type): Likewise.
6161 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6162 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6163 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6164 (byte_swap): Likewise.
6165 (MAYBE_SWAP): Likewise.
6166 (dwarf2_per_cu_ptr): Likewise.
6167 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6168 (struct tu_stats): Likewise.
6169 (struct dwarf2_per_objfile): Likewise.
6170 (struct dwarf2_per_cu_data): Likewise.
6171 (struct signatured_type): Likewise.
6172 (sig_type_ptr): Likewise.
6173 (DEF_VEC_P (sig_type_ptr)): Likewise.
6174 (INDEX4_SUFFIX): Likewise.
6175 (INDEX5_SUFFIX): Likewise.
6176 (DEBUG_STR_SUFFIX): Likewise.
6177 (dwarf2_read_section): Make non-static.
6178 (mapped_index_string_hash): Move from here.
6179 (dwarf5_djb_hash): Likewise.
6180 (file_write): Likewise.
6181 (class data_buf): Likewise.
6182 (struct symtab_index_entry): Likewise.
6183 (struct mapped_symtab): Likewise.
6184 (find_slot): Likewise.
6185 (hash_expand): Likewise.
6186 (add_index_entry): Likewise.
6187 (uniquify_cu_indices): Likewise.
6188 (class c_str_view): Likewise.
6189 (class c_str_view_hasher): Likewise.
6190 (class vector_hasher): Likewise.
6191 (write_hash_table): Likewise.
6192 (psym_index_map): Likewise.
6193 (struct addrmap_index_data): Likewise.
6194 (add_address_entry): Likewise.
6195 (add_address_entry_worker): Likewise.
6196 (write_address_map): Likewise.
6197 (symbol_kind): Likewise.
6198 (write_psymbols): Likewise.
6199 (struct signatured_type_index_data): Likewise.
6200 (write_one_signatured_type): Likewise.
6201 (recursively_count_psymbols): Likewise.
6202 (recursively_write_psymbols): Likewise.
6203 (class debug_names): Likewise.
6204 (check_dwarf64_offsets): Likewise.
6205 (psyms_seen_size): Likewise.
6206 (write_gdbindex): Likewise.
6207 (write_debug_names): Likewise.
6208 (assert_file_size): Likewise.
6209 (write_psymtabs_to_index): Likewise.
6210 (save_gdb_index_command): Likewise.
6211 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6213 * dwarf2read.h: New file.
6215 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6218 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6219 symbol name if the CU's language stores symbol names in linkage
6221 * language.h (struct language_defn)
6222 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6223 all instances of this struct.
6225 2018-03-26 Tom Tromey <tom@tromey.com>
6227 * stack.c (backtrace_command_1): Remove verbose code.
6229 2018-03-26 Tom Tromey <tom@tromey.com>
6231 * python/py-framefilter.c (py_print_type): Don't catch
6232 exceptions. Return void.
6233 (py_print_value): Likewise.
6234 (py_print_single_arg): Likewise.
6235 (enumerate_args): Don't catch exceptions.
6236 (py_print_args): Likewise.
6237 (py_print_frame): Likewise.
6238 (gdbpy_apply_frame_filter): Catch exceptions here.
6240 2018-03-26 Tom Tromey <tom@tromey.com>
6242 * stack.c (_initialize_stack): Remove trailing newlines from help
6243 text. Add "Usage" line to "backtrace" help.
6245 2018-03-26 Tom Tromey <tom@tromey.com>
6248 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6250 2018-03-26 Tom Tromey <tom@tromey.com>
6252 * python/py-framefilter.c (py_print_single_arg): Return
6253 EXT_LANG_BT_ERROR from catch.
6255 2018-03-26 Tom Tromey <tom@tromey.com>
6258 * stack.c (backtrace_command_1): Move some code into no-filters
6261 2018-03-26 Tom Tromey <tom@tromey.com>
6263 * python/py-framefilter.c (throw_quit_or_print_exception): New
6265 (gdbpy_apply_frame_filter): Use it.
6267 2018-03-26 Tom Tromey <tom@tromey.com>
6270 * python/py-framefilter.c (py_print_type, py_print_value)
6271 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6274 2018-03-26 Tom Tromey <tom@tromey.com>
6276 * python/py-framefilter.c (enumerate_args): Use
6277 gdb::unique_xmalloc_ptr.
6279 2018-03-26 Tom Tromey <tom@tromey.com>
6281 * python/py-framefilter.c (py_print_frame): Return
6283 (gdbpy_apply_frame_filter): Update comment.
6284 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6286 <EXT_LANG_BT_NO_FILTERS>: Change value.
6288 2018-03-26 Tom Tromey <tom@tromey.com>
6291 * stack.c (backtrace_command): Parse "hide" argument.
6292 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6293 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6296 2018-03-26 Tom Tromey <tom@tromey.com>
6298 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6300 (backtrace_command): Remove "fulltrace", add "flags".
6302 2018-03-26 Tom Tromey <tom@tromey.com>
6304 * stack.c (backtrace_command): Rewrite command line parsing.
6306 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6308 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6310 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6312 * filename-seen-cache.h: Add include guard.
6314 2018-03-26 Keith Seitz <keiths@redhat.com>
6316 * symfile.c (place_section): Remove "struct" from section_addr_info
6318 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6319 "struct" keyword from section_addr_info.
6321 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6323 * regformats/regdef.h (reg): Add constructors.
6325 2018-03-25 Pedro Alves <palves@redhat.com>
6327 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6328 if then/else bodies in var_func_name extraction.
6330 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6332 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6333 lookup_minimal_symbol() to find symbol entry.
6334 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6336 2018-03-23 Keith Seitz <keiths@redhat.com>
6339 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6340 nested type definitions for C++, too.
6342 2018-03-23 Tom Tromey <tom@tromey.com>
6344 * machoread.c (struct oso_el): Add a constructor. Don't define as
6346 (macho_register_oso): Remove.
6347 (macho_symtab_read): Take a std::vector.
6348 (oso_el_compare_name): Now a std::sort comparator.
6349 (macho_symfile_read_all_oso): Take a std::vector.
6350 (macho_symfile_read): Use std::vector. Remove cleanups.
6352 2018-03-22 Tom Tromey <tom@tromey.com>
6354 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6355 (record_full_goto_bookmark): Use std::string.
6357 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6360 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6363 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6365 * rs6000-tdep.c (store_insn_p): New function.
6366 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6367 and cr_reg to their unshifted values. Use store_insn_p to
6368 match LR saves using either R1 or fdata->alloca_reg. Use
6369 store_insn_p to match CR saves. Set alloca_reg_offset
6370 when alloca_reg and framep are set. Remove lr_reg shift
6371 when assigning to fdata->lr_register.
6373 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6375 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6376 command line args instead of emitting a warning.
6378 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6380 * tracepoint.h (struct static_tracepoint_marker): Initialize
6381 fields, define default constructor, move constructor and move
6382 assignment, disable the rest.
6383 <str_id, extra>: Make std::string.
6384 (release_static_tracepoint_marker): Remove.
6385 (free_current_marker): Remove.
6386 * tracepoint.c (free_current_marker): Remove.
6387 (parse_static_tracepoint_marker_definition): Adjust to
6388 std::string, use new hex2str overload.
6389 (release_static_tracepoint_marker): Remove.
6390 (print_one_static_tracepoint_marker): Get marker by reference
6391 and adjust to std::string.
6392 (info_static_tracepoint_markers_command): Adjust to std::vector
6394 * target.h (static_tracepoint_marker_p): Remove typedef.
6395 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6396 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6398 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6400 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6401 (target_debug_print_std_vector_static_tracepoint_marker): New.
6402 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6404 (target_debug_print_static_tracepoint_marker_p): ... this.
6405 * target-delegates.c: Re-generate.
6406 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6408 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6409 (decode_static_tracepoint_spec): Adjust to std::vector.
6410 (tracepoint_print_one_detail): Adjust to std::string.
6411 (strace_marker_decode_location): Adjust to std::string.
6412 (update_static_tracepoint): Adjust to std::string, remove call
6413 to release_static_tracepoint_marker.
6414 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6415 Adjust to std::vector.
6416 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6417 (remote_static_tracepoint_markers_by_strid): Adjust to
6419 * common/rsp-low.h (hex2str): New overload with explicit count
6421 * common/rsp-low.c (hex2str): New overload with explicit count
6423 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6424 (_initialize_rsp_low_selftests): Add test_hex2str test.
6425 * unittests/tracepoint-selftests.c
6426 (test_parse_static_tracepoint_marker_definition): Adjust to
6429 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6431 * tracepoint.c (parse_static_tracepoint_marker_definition):
6432 Consider case where the definition is followed by more
6434 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6435 tracepoint-selftests.c.
6436 * unittests/tracepoint-selftests.c: New.
6438 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6440 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6443 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6445 * symtab.c (find_pc_sect_line): fixed indentation.
6447 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6449 * symtab.c (find_pc_sect_line): now uses binary search.
6451 2018-03-19 Tom Tromey <tom@tromey.com>
6453 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6456 2018-03-19 Pedro Alves <palves@redhat.com>
6457 Tom Tromey <tom@tromey.com>
6459 * unittests/observable-selftests.c: New file.
6460 * common/observable.h: New file.
6461 * observable.h: New file.
6462 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6463 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6464 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6465 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6466 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6467 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6468 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6469 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6470 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6471 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6472 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6473 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6474 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6475 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6476 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6477 tui/tui-interp.c, valops.c: Update all users.
6478 * tui/tui-hooks.c (tui_bp_created_observer)
6479 (tui_bp_deleted_observer, tui_bp_modified_observer)
6480 (tui_inferior_exit_observer, tui_before_prompt_observer)
6481 (tui_normal_stop_observer, tui_register_changed_observer):
6483 (tui_observers_token): New global.
6484 (attach_or_detach, tui_attach_detach_observers): New functions.
6485 (tui_install_hooks, tui_remove_hooks): Use
6486 tui_attach_detach_observers.
6487 * record-btrace.c (record_btrace_thread_observer): Remove.
6488 (record_btrace_thread_observer_token): New global.
6489 * observer.sh: Remove.
6490 * observer.c: Rename to observable.c.
6491 * observable.c (namespace gdb_observers): Define new objects.
6492 (observer_debug): Move into gdb_observers namespace.
6493 (struct observer, struct observer_list, xalloc_observer_list_node)
6494 (xfree_observer_list_node, generic_observer_attach)
6495 (generic_observer_detach, generic_observer_notify): Remove.
6496 (_initialize_observer): Update.
6497 Don't include observer.inc.
6498 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6499 (clean mostlyclean): Likewise.
6500 (observer.h, observer.inc): Remove targets.
6501 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6502 (COMMON_SFILES): Use observable.c, not observer.c.
6503 * .gitignore: Remove observer.h.
6505 2018-03-18 Tom Tromey <tom@tromey.com>
6507 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6509 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6511 2018-03-17 Tom Tromey <tom@tromey.com>
6513 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6515 2018-03-17 Tom Tromey <tom@tromey.com>
6517 * target.c (class scoped_target_fd): New.
6518 (target_fileio_close_cleanup): Remove.
6519 (target_fileio_read_alloc_1): Use scoped_target_fd.
6521 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6523 * silent-rules.mk: New.
6524 * Makefile.in: Include silent-rules.mk
6525 (srcdir, VPATH, top_srcdir): Move up.
6526 (COMPILE): Add ECHO_CXX.
6527 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6528 (init.c): Add ECHO_INIT_C.
6529 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6530 (version.c): Add ECHO_GEN.
6531 (printcmd.o): Add ECHO_CXX.
6532 (target-float.o): Add ECHO_CXX.
6533 (ada-exp.o): Add ECHO_CXX.
6534 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6535 (insight$(EXEEXT)): Add ECHO_CXXLD.
6536 * gnulib/configure.ac: Add AM_SILENT_RULES.
6537 * gnulib/aclocal.m4: Re-generate.
6538 * gnulib/configure: Re-generate.
6539 * gnulib/import/Makefile.in: Re-generate.
6541 2018-03-16 Tom Tromey <tom@tromey.com>
6543 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6544 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6545 * utils.c (do_free_section_addr_info)
6546 (make_cleanup_free_section_addr_info): Remove.
6547 * symfile.h (struct other_sections): Add constructor.
6548 (struct section_addr_info): Remove.
6549 (section_addr_info): New typedef.
6550 (struct sym_fns) <sym_offsets>: Change type of parameter.
6551 (build_section_addr_info_from_objfile)
6552 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6553 (default_symfile_offsets, symbol_file_add)
6554 (symbol_file_add_from_bfd)
6555 (build_section_addr_info_from_section_table): Update.
6556 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6557 * symfile.c (alloc_section_addr_info): Remove.
6558 (build_section_addr_info_from_section_table): Change return type.
6560 (build_section_addr_info_from_bfd)
6561 (build_section_addr_info_from_objfile): Likewise.
6562 (free_section_addr_info): Remove.
6563 (relative_addr_info_to_section_offsets): Change type of "addrs".
6564 (addrs_section_compar): Now a std::sort comparator.
6565 (addrs_section_sort): Change return type.
6566 (addr_info_make_relative): Change type of "addrs". Update.
6567 (default_symfile_offsets, syms_from_objfile_1)
6568 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6569 (symbol_file_add_separate): Update.
6570 (symbol_file_add): Change type of "addrs". Update.
6571 (add_symbol_file_command): Update. Remove cleanups.
6572 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6574 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6575 * solib.c (solib_read_symbols): Update.
6576 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6577 * machoread.c (macho_symfile_offsets): Update.
6578 * jit.c (jit_bfd_try_read_symtab): Update.
6580 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6582 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6583 unittests/utils-selftests.c.
6584 * unittests/utils-selftests.c: New file.
6586 2018-03-14 Tom Tromey <tom@tromey.com>
6589 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6592 2018-03-14 Tom Tromey <tom@tromey.com>
6595 * printcmd.c (printf_pointer): Allow "-" in format.
6597 2018-03-14 Tom Tromey <tom@tromey.com>
6599 * printcmd.c (_initialize_printcmd): Add usage to printf.
6601 2018-03-14 Yao Qi <qiyao@sourceware.org>
6603 * MAINTAINERS: Update my email address.
6605 2018-03-13 Tom Tromey <tom@tromey.com>
6607 * machoread.c (macho_check_dsym): Change filenamep to a
6609 (macho_symfile_read): Update.
6610 * symfile.c (load_command): Use std::string.
6612 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6614 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6615 to error message string.
6616 (riscv_register_name): Use xsnprintf instead of sprintf.
6617 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6619 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6621 (riscv_push_dummy_call): Likewise.
6623 2018-03-12 Tom Tromey <tom@tromey.com>
6625 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6626 Use gdb::byte_vector.
6627 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6629 2018-03-12 Yao Qi <yao.qi@linaro.org>
6631 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6632 parameter type to readable_regcache.
6633 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6636 2018-03-11 Tom Tromey <tom@tromey.com>
6638 * dwarf2read.c (struct nextfield): Add initializers.
6639 (struct nextfnfield): Remove.
6640 (struct fnfieldlist): Add initializers. Remove "length" and
6641 "head", use std::vector.
6642 (struct decl_field_list): Remove.
6643 (struct field_info): Add initializers.
6644 <fields, baseclasses>: Now std::vector.
6645 <nbaseclasses, nfnfields, typedef_field_list_count,
6646 nested_types_list_count>: Remove.
6647 (dwarf2_add_field, dwarf2_add_type_defn)
6648 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6649 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6650 (process_structure_scope): Update.
6652 2018-03-11 Tom Tromey <tom@tromey.com>
6654 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6655 for use by std::sort.
6656 (build_type_psymtabs_1): Use std::vector.
6658 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6660 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6661 and LIBMPFR in the printed configuration.
6663 2018-03-08 Tom Tromey <tom@tromey.com>
6665 * source.c (get_filename_and_charpos): Use scoped_fd.
6666 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6667 (procfs_pidlist): Likewise.
6668 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6669 (iterate_over_mappings): Likewise.
6671 2018-03-08 Tom Tromey <tom@tromey.com>
6673 * infcall.c (struct call_return_meta_info)
6674 <stack_temporaries_enabled>: Remove.
6675 (get_call_return_value, call_function_by_hand_dummy): Update.
6676 * thread.c (disable_thread_stack_temporaries): Remove.
6677 (enable_thread_stack_temporaries): Remove.
6678 (thread_stack_temporaries_enabled_p): Return bool.
6679 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6680 (get_last_thread_stack_temporary): Update.
6681 * eval.c (evaluate_subexp): Update.
6682 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6683 class, not a function.
6684 (value_ptr, value_vec): Remove typedefs.
6685 (class thread_info) <stack_temporaries_enabled>: Now bool.
6686 <stack_temporaries>: Now a std::vector.
6687 (thread_stack_temporaries_enabled_p)
6688 (value_in_thread_stack_temporaries): Return bool.
6690 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6692 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6693 (getpkt_or_notif_sane_1): Likewise.
6695 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6697 * build-id.c (build_id_to_debug_bfd): Use std::string.
6699 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6701 * build-id.c (find_separate_debug_file_by_buildid): Return
6703 * build-id.h (find_separate_debug_file_by_buildid): Return
6705 * coffread.c (coff_symfile_read): Adjust to std::string.
6706 * elfread.c (elf_symfile_read): Adjust to std::string.
6707 * symfile.c (separate_debug_file_exists): Change parameter to
6709 (find_separate_debug_file): Return std::string.
6710 (find_separate_debug_file_by_debuglink): Return std::string.
6711 * symfile.h (find_separate_debug_file_by_debuglink): Return
6714 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6716 * common/xml-utils.c (xml_escape_text): Move code to...
6717 (xml_escape_text_append): ... this new function.
6718 * common/xml-utils.h (xml_escape_text_append): New declaration.
6719 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6721 (_initialize_xml_utils): register test_xml_escape_text_append as
6724 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6726 * defs.h: Remove MAX_REGISTER_SIZE.
6727 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6729 * python/py-unwind.c (pyuw_sniffer): Likewise.
6731 2018-03-07 Tom Tromey <tom@tromey.com>
6733 * linux-tdep.c (linux_info_proc): Update.
6734 * target.h (struct target_ops) <to_fileio_readlink>: Return
6736 (target_fileio_readlink): Return optional<string>.
6737 * remote.c (remote_hostio_readlink): Return optional<string>.
6738 * inf-child.c (inf_child_fileio_readlink): Return
6740 * target.c (target_fileio_readlink): Return optional<string>.
6742 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6744 * regcache.c (cooked_read_test): Add riscv to the list of
6745 architectures that have a save_reggroup.
6747 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6749 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6750 value is not a dynamic class object.
6752 2018-03-06 Tom Tromey <tom@tromey.com>
6754 * rust-exp.y: Formatting fixes.
6756 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6758 * riscv-tdep.c (riscv_register_name): Remove target description
6760 (riscv_gdbarch_init): Remove target description check.
6762 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6764 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6766 * riscv-tdep.h: Likewise.
6768 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6770 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6771 (riscv_pseudo_register_write): Delete.
6772 (riscv_gdbarch_init): Remove all use of pseudo registers.
6774 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6776 * record-btrace.c (btrace_print_lines): Replace cleanup
6777 parameter with RAII equivalents.
6778 (btrace_insn_history): Replace cleanup with RAII equivalents.
6779 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6780 make_cleanup_ui_out_tuple_begin_end): Remove.
6781 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6782 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6783 make_cleanup_ui_out_list_begin_end): Remove.
6785 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6787 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6788 parameter types to std::vector. Use bool.
6789 (record_btrace_wait): Replace VEC(tp_t) with
6790 std::vector<thread_info *>.
6791 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6793 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6795 * record-btrace.c (record_btrace_disable_callback): Remove.
6796 (struct scoped_btrace_disable): New.
6797 (record_btrace_open): Use scoped_btrace_disable.
6799 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6801 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6802 reading values from registers.
6804 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6806 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6809 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6811 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6812 change parameter type. Use GDB's print functions, and use
6813 core_addr_to_string where appropriate.
6814 (riscv_push_dummy_call): Use core_addr_to_string where
6815 appropriate, update call to riscv_print_arg_location, and reindent
6817 (riscv_return_value): Update call to riscv_print_arg_location.
6819 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6820 Tim Newsome <tim@sifive.com>
6821 Albert Ou <a0u@eecs.berkeley.edu>
6822 Darius Rad <darius@bluespec.com>
6824 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6825 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6826 (ALLDEPFILES): Add riscv-tdep.c
6827 * configure.tgt: Add riscv support.
6828 * riscv-tdep.c: New file.
6829 * riscv-tdep.h: New file.
6830 * NEWS: Mention new target.
6831 * MAINTAINERS: Add entry for riscv.
6833 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6835 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6836 fields within aggregates.
6838 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6840 * record-btrace.c (btrace_print_lines): Change type of flags to
6841 gdb_disassembly_flags.
6843 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6845 * fbsd-nat.c: Include "inf-ptrace.h".
6846 (USE_SIGTRAP_SIGINFO): Conditionally define.
6847 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6848 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6849 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6851 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6853 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6855 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6856 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6857 "supports_stopped_by_hw_breakpoint" target methods.
6859 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6861 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6862 * fbsd-nat.c (debug_fbsd_nat): New variable.
6863 (show_fbsd_nat_debug): New function.
6864 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6865 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6867 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6869 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6870 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6872 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6873 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6876 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6878 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6879 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6881 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6883 * charset.c (struct charset_vector): New.
6884 (charsets): Change type to charset_vector.
6885 (find_charset_names): Adjust.
6887 (_initialize_charset): Adjust.
6889 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6891 * progspace.h (struct program_space) <deleted_solibs>: Change
6892 type to std::vector<std::string>.
6893 * progspace.c (clear_program_space_solib_cache): Adjust.
6894 * breakpoint.c (print_solib_event): Adjust.
6895 (check_status_catch_solib): Adjust.
6896 * solib.c (update_solib_list): Adjust.
6897 * ui-out.h (class ui_out) <field_string>: New overload.
6898 * ui-out.c (ui_out::field_string): New overload.
6900 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6902 * progspace.h (struct program_space): Add constructor and
6903 destructor, initialize fields.
6904 (add_program_space): Remove.
6905 * progspace.c (add_program_space): Rename to...
6906 (program_space::program_space): ... this.
6907 (release_program_space): Rename to...
6908 (program_space::~program_space): ... this.
6909 (delete_program_space): Use delete to delete program_space.
6910 (initialize_progspace): Use new to allocate program_space.
6911 * inferior.c (add_inferior_with_spaces): Likewise.
6912 (clone_inferior_command): Likewise.
6913 * infrun.c (follow_fork_inferior): Likewise.
6914 (handle_vfork_child_exec_or_exit): Likewise.
6916 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6918 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6919 (delim_string_to_char_ptr_vec): Return std::vector of
6920 gdb::unique_xmalloc_ptr.
6921 (dirnames_to_char_ptr_vec_append): Take std::vector of
6922 gdb::unique_xmalloc_ptr.
6923 (dirnames_to_char_ptr_vec): Return std::vector of
6924 gdb::unique_xmalloc_ptr.
6925 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6926 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6927 (delim_string_to_char_ptr_vec): Return an std::vector of
6928 gdb::unique_xmalloc_ptr, adjust the code.
6929 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6930 gdb::unique_xmalloc_ptr, adjust the code.
6931 (dirnames_to_char_ptr_vec): Return an std::vector of
6932 gdb::unique_xmalloc_ptr, adjust the code.
6933 * auto-load.c (auto_load_safe_path_vec): Change type to
6934 std::vector of gdb::unique_xmalloc_ptr.
6935 (auto_load_expand_dir_vars): Return an std::vector of
6936 gdb::unique_xmalloc_ptr, adjust the code.
6937 (auto_load_safe_path_vec_update): Adjust.
6938 (filename_is_in_auto_load_safe_path_vec): Adjust.
6939 (auto_load_objfile_script_1): Adjust.
6940 * build-id.c (build_id_to_debug_bfd): Adjust.
6941 * linux-thread-db.c (thread_db_load_search): Adjust.
6942 * source.c (add_path): Adjust.
6944 * symfile.c (find_separate_debug_file): Adjust.
6945 * utils.c (do_free_char_ptr_vec): Remove.
6946 (make_cleanup_free_char_ptr_vec): Remove.
6948 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6951 * common/pathstuff.c: Conditionally include "<windows.h>".
6953 2018-03-01 Georg Sauthoff <mail@georg.so>
6956 * gcore.in: Quote variables and switch interpreter to bash.
6958 2018-03-01 Tom Tromey <tom@tromey.com>
6960 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6961 assertion. Add assertion for discriminant_index.
6962 (quirk_rust_enum): Use correct base type name in univariant case.
6964 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6966 * record.c (get_call_history_modifiers): Return a
6968 (cmd_record_call_history): Adjust.
6969 * record-btrace.c (record_btrace_call_history): Adjust.
6970 (record_btrace_call_history_range): Adjust.
6971 (record_btrace_call_history_from): Adjust.
6972 * target-debug.h (target_debug_print_record_print_flags): New.
6973 * target-delegates.c: Re-generate.
6974 * target.c (target_call_history): Change flags type.
6975 (target_call_history_from): Likewise.
6976 (target_call_history_range): Likewise.
6977 * target.h (struct target_ops) <target_call_history>: Likewise.
6978 (target_call_history_from): Likewise.
6979 (target_call_history_range): Likewise.
6981 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6982 Simon Marchi <simon.marchi@polymtl.ca>
6984 * common/common-utils.c: Include "sys/stat.h".
6985 (is_regular_file): Move here from "source.c"; change return
6987 * common/common-utils.h (is_regular_file): New prototype.
6988 * common/pathstuff.c (contains_dir_separator): New function.
6989 * common/pathstuff.h (contains_dir_separator): New prototype.
6990 * source.c: Don't include "sys/stat.h".
6991 (is_regular_file): Move to "common/common-utils.c".
6993 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6995 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6996 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6997 * auto-load.c: Include "common/pathstuff.h".
6998 * common/common-def.h (current_directory): Move here.
6999 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7001 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7003 * common/pathstuff.c: New file.
7004 * common/pathstuff.h: New file.
7005 * compile/compile.c: Include "common/pathstuff.h".
7006 * defs.h (current_directory): Move to "common/common-defs.h".
7007 * dwarf2read.c: Include "common/pathstuff.h".
7009 * guile/scm-safe-call.c: Likewise.
7010 * linux-thread-db.c: Likewise.
7012 * nto-tdep.c: Likewise.
7013 * objfiles.c: Likewise.
7014 * source.c: Likewise.
7015 * symtab.c: Likewise.
7016 * utils.c: Include "common/pathstuff.h".
7017 (gdb_realpath): Move to "common/pathstuff.c".
7018 (gdb_realpath_keepfile): Likewise.
7019 (gdb_abspath): Likewise.
7020 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7021 (gdb_realpath_keepfile): Likewise.
7022 (gdb_abspath): Likewise.
7024 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7026 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7027 wildcard process pid for super_resume for kernels with a
7030 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7032 * compile/compile.c (get_args): Add additional comments
7033 explaining function.
7035 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7036 Tom Tromey <tom@tromey.com>
7038 * target.h (memory_write_request_s): Remove typedef. Don't define
7040 (target_write_memory_blocks): Change argument to std::vector.
7041 (struct memory_write_request): Add constructor.
7042 * target-memory.c (compare_block_starting_address): Return bool.
7043 Change argument types.
7044 (claim_memory): Change arguments to use std::vector.
7045 (split_regular_and_flash_blocks, blocks_to_erase)
7046 (compute_garbled_blocks): Likewise.
7047 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7048 (target_write_memory_blocks): Change argument to std::vector.
7049 * symfile.c (struct load_section_data): Add constructor and
7050 destructor. Use std::vector for "requests".
7051 (struct load_progress_data): Add initializers.
7052 (load_section_callback): Update. Use "new".
7053 (clear_memory_write_data): Remove.
7054 (generic_load): Update.
7056 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7058 * arch/aarch64.h: Use common/tdesc.h.
7060 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7062 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7063 architecture with a 64-bit ABI.
7065 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7067 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7068 ahead of target description loading.
7070 2018-02-26 Tom Tromey <tom@tromey.com>
7072 * stack.c (backtrace_command_1): Update.
7073 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7075 * python/py-framefilter.c (py_print_frame)
7076 (gdbpy_apply_frame_filter): Change type of "flags".
7077 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7079 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7080 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7081 * extension.h (enum frame_filter_flag): Rename from
7083 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7084 (apply_ext_lang_frame_filter): Change type of "flags".
7085 * extension.c (apply_ext_lang_frame_filter): Change type of
7087 * extension-priv.h (struct extension_language_ops)
7088 <apply_frame_filter>: Change type of "flags".
7090 2018-02-26 Tom Tromey <tom@tromey.com>
7093 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7094 off-by-one in py_end computation.
7095 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7097 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7100 2018-02-26 Tom Tromey <tom@tromey.com>
7102 * dwarf2read.c (struct variant_field): New.
7103 (struct nextfield) <variant>: New field.
7104 (dwarf2_add_field): Handle DW_TAG_variant_part.
7105 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7106 discriminated union.
7107 (read_structure_type): Handle DW_TAG_variant_part.
7108 (handle_struct_member_die): New function, extracted from
7109 process_structure_scope. Handle DW_TAG_variant.
7110 (process_structure_scope): Handle discriminated unions. Call
7111 handle_struct_member_die.
7113 2018-02-26 Tom Tromey <tom@tromey.com>
7115 * rust-lang.h (rust_last_path_segment): Declare.
7116 * rust-lang.c (rust_last_path_segment): Now public. Change
7118 (struct disr_info): Remove.
7119 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7120 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7121 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7122 (rust_enum_p, rust_enum_variant): New function.
7123 (rust_underscore_fields): Remove "offset" parameter.
7124 (rust_print_enum): New function.
7125 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7126 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7127 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7129 (rust_internal_print_type): New function, from rust_print_type.
7131 (rust_print_type): Call rust_internal_print_type.
7132 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7133 Update enum handling.
7134 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7135 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7136 (rust_union_quirks): New functions.
7137 (process_full_comp_unit, process_full_type_unit): Call
7139 (process_structure_scope): Update rust_unions if necessary.
7141 2018-02-26 Tom Tromey <tom@tromey.com>
7143 * value.h (value_union_variant): Declare.
7144 * valops.c (value_union_variant): New function.
7145 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7146 (struct discriminant_info): New.
7147 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7149 (struct main_type) <flag_discriminated_union>: New field.
7151 2018-02-26 Tom Tromey <tom@tromey.com>
7153 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7154 unittests/unpack-selftests.c.
7155 * unittests/unpack-selftests.c: New file.
7156 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7158 2018-02-26 Yao Qi <yao.qi@linaro.org>
7160 * dwarf2read.c (struct partial_die_info) <read>: New method.
7161 (read_partial_die): Remove the declaration.
7162 (load_partial_dies): Update.
7163 (partial_die_info::partial_die_info):
7164 (read_partial_die): Change it to partial_die_info::read.
7166 2018-02-26 Yao Qi <yao.qi@linaro.org>
7168 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7169 (fixup_partial_die): Remove declaration.
7170 (scan_partial_symbols): Update.
7171 (partial_die_parent_scope): Likewise.
7172 (partial_die_full_name): Likewise.
7173 (fixup_partial_die): Change it to partial_die_info::fixup.
7175 2018-02-26 Yao Qi <yao.qi@linaro.org>
7177 * dwarf2read.c (read_partial_die): Update the declaration.
7178 (load_partial_dies): Caller update.
7179 (read_partial_die): Remove one argument abbrev_len.
7181 2018-02-26 Yao Qi <yao.qi@linaro.org>
7183 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7184 assignment operator.
7185 (load_partial_dies): Use ctor and copy ctor.
7186 (read_partial_die): Update.
7187 (dwarf2_cu::find_partial_die): Use ctor.
7189 2018-02-26 Yao Qi <yao.qi@linaro.org>
7191 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7192 (find_partial_die_in_comp_unit): Change it to
7193 dwarf2_cu::find_partial_die.
7194 (find_partial_die): Update.
7196 2018-02-26 Yao Qi <yao.qi@linaro.org>
7198 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7201 2018-02-26 Yao Qi <yao.qi@linaro.org>
7203 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7205 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7207 * arch/amd64.h: Use common/tdesc.h.
7208 * arch/i386.c: Likewise.
7209 * arch/i386.h: Likewise.
7210 * arch/tic6x.c: Likewise.
7211 * arch/tdesc.h: Move file from here...
7212 * common/tdesc.h: ...to here.
7213 * features/aarch64-core.c: Regenerate.
7214 * features/aarch64-fpu.c: Regenerate.
7215 * features/i386/32bit-avx.c: Regenerate.
7216 * features/i386/32bit-avx512.c: Regenerate.
7217 * features/i386/32bit-core.c: Regenerate.
7218 * features/i386/32bit-linux.c: Regenerate.
7219 * features/i386/32bit-mpx.c: Regenerate.
7220 * features/i386/32bit-pkeys.c: Regenerate.
7221 * features/i386/32bit-sse.c: Regenerate.
7222 * features/i386/64bit-avx.c: Regenerate.
7223 * features/i386/64bit-avx512.c: Regenerate.
7224 * features/i386/64bit-core.c: Regenerate.
7225 * features/i386/64bit-linux.c: Regenerate.
7226 * features/i386/64bit-mpx.c: Regenerate.
7227 * features/i386/64bit-pkeys.c: Regenerate.
7228 * features/i386/64bit-segments.c: Regenerate.
7229 * features/i386/64bit-sse.c: Regenerate.
7230 * features/i386/x32-core.c: Regenerate.
7231 * features/tic6x-c6xp.c: Regenerate.
7232 * features/tic6x-core.c: Regenerate.
7233 * features/tic6x-gp.c: Regenerate.
7234 * target-descriptions.c: Use common/tdesc.h.
7235 * target-descriptions.h: Likewise.
7237 2018-02-24 Tom Tromey <tom@tromey.com>
7239 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7240 (try_thread_db_load_from_dir, thread_db_load_search): Use
7242 (info_auto_load_libthread_db_compare): Return bool. Change
7244 (info_auto_load_libthread_db): Use std::vector, std::string.
7247 2018-02-24 Tom Tromey <tom@tromey.com>
7249 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7251 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7253 * gdbarch.c: Rebuild.
7254 * gdbarch.h: Rebuild.
7255 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7256 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7257 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7260 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7262 * gdbtypes.h (sect_offset): Change type to uint64_t.
7263 (sect_offset_str): New function.
7264 * dwarf2read.c (create_addrmap_from_aranges): Use
7266 (error_check_comp_unit_head): Likewise.
7267 (create_debug_type_hash_table): Likewise.
7268 (read_cutu_die_from_dwo): Likewise.
7269 (init_cutu_and_read_dies): Likewise.
7270 (init_cutu_and_read_dies_no_follow): Likewise.
7271 (process_psymtab_comp_unit_reader): Likewise.
7272 (partial_die_parent_scope): Likewise.
7273 (peek_die_abbrev): Likewise.
7274 (process_queue): Likewise.
7275 (dwarf2_physname): Likewise.
7276 (read_namespace_alias): Likewise.
7277 (read_import_statement): Likewise.
7278 (create_dwo_cu_reader): Likewise.
7279 (create_cus_hash_table): Likewise.
7280 (lookup_dwo_cutu): Likewise.
7281 (inherit_abstract_dies): Likewise.
7282 (read_func_scope): Likewise.
7283 (read_call_site_scope): Likewise.
7284 (dwarf2_add_member_fn): Likewise.
7285 (read_common_block): Likewise.
7286 (read_module_type): Likewise.
7287 (read_typedef): Likewise.
7288 (read_subrange_type): Likewise.
7289 (load_partial_dies): Likewise.
7290 (read_partial_die): Likewise.
7291 (find_partial_die): Likewise.
7292 (read_str_index): Likewise.
7293 (dwarf2_string_attr): Likewise.
7294 (build_error_marker_type): Likewise.
7295 (lookup_die_type): Likewise.
7296 (dump_die_shallow): Likewise.
7297 (follow_die_ref): Likewise.
7298 (dwarf2_fetch_die_loc_sect_off): Likewise.
7299 (dwarf2_fetch_constant_bytes): Likewise.
7300 (follow_die_sig): Likewise.
7301 (get_signatured_type): Likewise.
7302 (get_DW_AT_signature_type): Likewise.
7303 (dwarf2_find_containing_comp_unit): Likewise.
7304 (set_die_type): Likewise.
7306 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7308 * arch/aarch64.c: Include "common-defs.h".
7309 * arch/amd64.c: Likewise.
7310 * arch/i386.c: Likewise.
7312 2018-02-21 Tom Tromey <tom@tromey.com>
7314 * value.h: (extract_field_op): Update.
7315 * eval.c (extract_field_op): Return a const char *.
7316 * expression.h (parse_expression_for_completion): Update.
7317 * completer.c (complete_expression): Update.
7318 (add_struct_fields): Make fieldname const.
7319 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7320 (mark_completion_tag, parse_exp_in_context_1): Update.
7321 (parse_expression_for_completion): Change "name" to
7322 unique_xmalloc_ptr*.
7324 2018-02-21 Tom Tromey <tom@tromey.com>
7326 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7328 2018-02-21 Yao Qi <yao.qi@linaro.org>
7330 * avr-tdep.c (avr_read_pc): Change parameter type to
7332 * gdbarch.sh (read_pc): Likewise.
7333 * gdbarch.c: Re-generated.
7334 * gdbarch.h: Re-generated.
7335 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7337 * ia64-tdep.c (ia64_read_pc): Likewise.
7338 * mips-tdep.c (mips_read_pc): Likewise.
7339 * spu-tdep.c (spu_read_pc): Likewise.
7341 2018-02-21 Yao Qi <yao.qi@linaro.org>
7343 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7344 * regcache-dump.c: New file.
7345 * regcache.c: Move register_dump to regcache-dump.c.
7346 (maintenance_print_registers): Likewise.
7347 (maintenance_print_raw_registers): Likewise.
7348 (maintenance_print_cooked_registers): Likewise.
7349 (maintenance_print_register_groups): Likewise.
7350 (maintenance_print_remote_registers): Likewise.
7351 (_initialize_regcache): Likewise.
7352 * regcache.h (register_dump): Moved from regcache.c.
7354 2018-02-21 Yao Qi <yao.qi@linaro.org>
7356 * regcache.c (regcache::regcache): Update.
7357 (regcache::invalidate): Move it to detached_regcache::invalidate.
7358 (get_thread_arch_aspace_regcache): Update.
7359 (regcache::raw_update): Update.
7360 (regcache::cooked_read): Remove some code.
7361 (regcache::cooked_read_value): Likewise.
7362 (regcache::raw_write): Remove assert on m_readonly_p.
7363 (regcache::raw_supply_integer): Move it to
7364 detached_regcache::raw_supply_integer.
7365 (regcache::raw_supply_zeroed): Likewise.
7366 * regcache.h (detached_regcache) <raw_supply_integer>: New
7368 <raw_supply_zeroed, invalidate>: Likewise.
7369 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7370 <invalidate>: Likewise.
7371 <m_readonly_p>: Removed.
7373 2018-02-21 Yao Qi <yao.qi@linaro.org>
7375 * infcmd.c (get_return_value): Let stop_regs point to
7376 get_current_regcache.
7377 * regcache.c (regcache::regcache): Remove.
7378 (register_dump_reg_buffer): New class.
7379 (regcache_print): Adjust.
7380 * regcache.h (regcache): Remove constructors.
7382 2018-02-21 Yao Qi <yao.qi@linaro.org>
7384 * regcache.c (class register_dump): New class.
7385 (register_dump_regcache, register_dump_none): New class.
7386 (register_dump_remote, register_dump_groups): New class.
7387 (regcache_print): Update.
7388 * regcache.h (regcache_dump_what): Move it to regcache.c.
7389 (regcache) <dump>: Remove.
7391 2018-02-21 Yao Qi <yao.qi@linaro.org>
7393 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7395 (jit_unwind_reg_set_impl): Call raw_supply.
7396 (jit_frame_sniffer): Use reg_buffer_rw.
7397 * record-full.c (record_full_core_regbuf): Change its type.
7398 (record_full_core_open_1): Use reg_buffer_rw.
7399 (record_full_close): Likewise.
7400 (record_full_core_fetch_registers): Use regcache->raw_supply.
7401 (record_full_core_store_registers): Likewise.
7402 * regcache.c (regcache::get_register_status): Move it to
7404 (regcache_raw_set_cached_value): Remove.
7405 (regcache::raw_set_cached_value): Remove.
7406 (regcache::raw_write): Call raw_supply.
7407 (regcache::raw_supply): Move it to reg_buffer_rw.
7408 * regcache.h (regcache_raw_set_cached_value): Remove.
7409 (reg_buffer_rw): New class.
7411 2018-02-21 Yao Qi <yao.qi@linaro.org>
7413 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7414 readonly_detached_regcache.
7415 (dummy_frame_prev_register): Use regcache->cooked_read.
7416 * frame.c (frame_save_as_regcache): Change return type.
7417 (frame_pop): Update.
7418 * frame.h (frame_save_as_regcache): Update declaration.
7419 * inferior.h (get_infcall_suspend_state_regcache): Update
7421 * infrun.c (infcall_suspend_state) <registers>: use
7422 readonly_detached_regcache.
7423 (save_infcall_suspend_state): Don't use regcache_dup.
7424 (get_infcall_suspend_state_regcache): Change return type.
7425 * linux-fork.c (struct fork_info) <savedregs>: Change to
7426 readonly_detached_regcache.
7428 (fork_save_infrun_state): Don't use regcache_dup.
7429 (info_checkpoints_command): Adjust.
7430 * mi/mi-main.c (register_changed_p): Update declaration.
7431 (mi_cmd_data_list_changed_registers): Use
7432 readonly_detached_regcache.
7433 (register_changed_p): Change parameter type to
7434 readonly_detached_regcache.
7435 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7436 readonly_detached_regcache.
7437 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7438 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7440 (regcache::save): Move it to reg_buffer.
7441 (regcache::restore): Change parameter type.
7442 (regcache_dup): Remove.
7443 * regcache.h (reg_buffer) <save>: New method.
7444 (readonly_detached_regcache): New class.
7445 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7446 readonly_detached_regcache.
7447 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7449 2018-02-21 Yao Qi <yao.qi@linaro.org>
7451 * frame.c (frame_save_as_regcache): Use regcache method save.
7452 (frame_pop): Use regcache method restore.
7453 * infrun.c (restore_infcall_suspend_state): Likewise.
7454 * linux-fork.c (fork_load_infrun_state): Likewise.
7455 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7457 * regcache.c (regcache_save): Remove.
7458 (regcache::restore): More asserts.
7459 (regcache_cpy): Remove.
7460 * regcache.h (regcache_save): Remove the declaration.
7461 (regcache::restore): Move from private to public.
7462 Remove the friend declaration of regcache_cpy.
7463 (regcache_cpy): Remove declaration.
7465 2018-02-21 Yao Qi <yao.qi@linaro.org>
7467 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7468 parameter type to 'readable_regcache *'.
7469 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7470 * arm-tdep.c (arm_neon_quad_read): Likewise.
7471 (arm_pseudo_read): Likewise.
7472 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7473 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7474 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7475 * gdbarch.c: Re-generated.
7476 * gdbarch.h: Re-generated.
7477 * gdbarch.sh (pseudo_register_read): Change parameter type to
7478 'readable_regcache *'.
7479 (pseudo_register_read_value): Likewise.
7480 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7481 (h8300_pseudo_register_read): Likewise.
7482 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7483 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7484 (i386_pseudo_register_read_into_value): Likewise.
7485 (i386_pseudo_register_read_value): Likewise.
7486 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7488 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7489 * m32c-tdep.c (m32c_raw_read): Likewise.
7490 (m32c_read_flg): Likewise.
7491 (m32c_banked_register): Likewise.
7492 (m32c_banked_read): Likewise.
7493 (m32c_sb_read): Likewise.
7494 (m32c_part_read): Likewise.
7495 (m32c_cat_read): Likewise.
7496 (m32c_r3r2r1r0_read): Likewise.
7497 (m32c_pseudo_register_read): Likewise.
7498 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7499 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7500 (mep_pseudo_cr64_read): Likewise.
7501 (mep_pseudo_register_read): Likewise.
7502 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7503 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7504 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7505 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7506 (regcache::cooked_read): Likewise.
7507 (regcache::cooked_read_value): Likewise.
7508 (regcache_cooked_read_signed):
7509 (regcache::cooked_read): Likewise.
7510 * regcache.h (readable_regcache): New class.
7511 (regcache): Inherit readable_regcache. Move some methods to
7513 * rl78-tdep.c (rl78_pseudo_register_read): Change
7514 parameter type to 'readable_regcache *'.
7515 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7516 (e500_pseudo_register_read): Change parameter type to
7517 'readable_regcache *'.
7518 (dfp_pseudo_register_read): Likewise.
7519 (vsx_pseudo_register_read): Likewise.
7520 (efpr_pseudo_register_read): Likewise.
7521 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7522 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7523 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7524 (sh64_pseudo_register_read): Likewise.
7525 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7526 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7527 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7528 (spu_pseudo_register_read): Likewise.
7529 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7530 (xtensa_pseudo_register_read): Likewise.
7532 2018-02-21 Yao Qi <yao.qi@linaro.org>
7534 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7535 (regcache::arch): Move it to reg_buffer::arch.
7536 (regcache::register_buffer): Likewise.
7537 (regcache::assert_regnum): Likewise.
7538 (regcache::num_raw_registers): Likewise.
7539 * regcache.h (reg_buffer): New class.
7540 (regcache): Inherit reg_buffer.
7542 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7544 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7545 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7547 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7549 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7551 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7553 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7554 (SFILES): Remove common/*.c files.
7555 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7556 * common/common.host: Add common reference.
7557 * configure.ac: Likewise.
7558 * configure: Regenerate.
7560 2018-02-16 Yao Qi <yao.qi@linaro.org>
7562 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7563 (block_initialize_namespace): Use new.
7564 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7565 (dwarf2_free_objfile): Use delete.
7566 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7567 (copy_type_recursive): Use new.
7568 * gdb_obstack.h (allocate_on_obstack): New.
7570 2018-02-15 Yao Qi <yao.qi@linaro.org>
7573 * inferior.c (exit_inferior_1): Reset inf->control.
7575 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7577 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7580 2018-02-14 Pedro Alves <palves@redhat.com>
7582 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7583 frame_cleanup_after_sniffer on exception.
7585 2018-02-14 Tom Tromey <tom@tromey.com>
7587 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7589 (solib_bfd_open): Make pathname const.
7590 * solib.c (solib_bfd_open): Make pathname const.
7591 * solib-spu.c (spu_bfd_fopen): Make name const.
7592 (spu_bfd_open): Make pathname const.
7593 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7594 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7596 2018-02-14 Tom Tromey <tom@tromey.com>
7598 * symfile.c (symfile_bfd_open): Update.
7599 * source.h (openp, source_full_path_of, find_and_open_source):
7600 Change argument type to unique_xmalloc_ptr.
7601 * source.c (openp): Take a unique_xmalloc_ptr.
7602 (source_full_path_of, find_and_open_source): Likewise.
7603 (open_source_file, symtab_to_fullname): Update.
7604 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7606 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7607 (exec_file_find): Update.
7608 * psymtab.c (psymtab_to_fullname): Update.
7609 * nto-tdep.h (nto_find_and_open_solib): Update.
7610 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7612 * exec.c (exec_file_attach): Update.
7613 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7614 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7616 2018-02-14 Tom Tromey <tom@tromey.com>
7618 * solib.c: Include source.h.
7619 * nto-tdep.c: Include source.h.
7620 * mi/mi-cmd-env.c: Include source.h.
7621 * infcmd.c: Include source.h.
7622 * exec.c: Include source.h.
7623 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7624 (add_path, directory_switch, source_path, init_source_path): Move
7626 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7627 (add_path, directory_switch, source_path, init_source_path):
7630 2018-02-14 Tom Tromey <tom@tromey.com>
7632 * solist.h (exec_file_find, solib_find): Return
7634 (solib_bfd_fopen): Take a const char *.
7635 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7636 (exec_file_find, solib_find): Likewise.
7637 (solib_bfd_fopen): Do not take ownership of "pathname".
7638 (solib_bfd_open): Use unique_xmalloc_ptr.
7639 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7640 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7641 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7642 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7644 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7646 * ada-lang.c (name_match_type_from_name): Remove reference to
7647 ada_name_for_lookup in function's documentation.
7648 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7650 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7652 * defs.h (enum openp_flags): New enum.
7653 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7654 Move to enum openp_flags.
7655 (openp_flags): New enum flags.
7656 (openp): Change parameter type to openp_flags.
7657 * source.c (openp): Change parameter type to openp_flags.
7658 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7659 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7661 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7663 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7666 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7668 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7670 (class dwarf2_queue_guard): ...the destructor of this new class.
7671 (dw2_do_instantiate_symtab): Create instance of the new class
7672 dwarf2_queue_guard, remove cleanup.
7674 2018-02-09 Tom Tromey <tom@tromey.com>
7676 * source.c (find_source_lines): Don't reference past the end of
7679 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7681 * remote.c (remote_btrace_maybe_reopen): Change error message.
7682 * btrace.c (btrace_enable): Likewise.
7683 (parse_xml_btrace): Likewise.
7684 (parse_xml_btrace_conf): Likewise.
7686 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7688 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7689 (linux_enable_pt, linux_enable_bts): Call
7690 diagnose_perf_event_open_fail.
7692 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7694 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7695 Remove parameter and change return type. Update callers. Move it.
7696 (linux_enable_bts, linux_enable_pt): Improve error message.
7697 (linux_enable_pt): Remove zero buffer size check.
7698 (linux_enable_btrace): Improve error messages. Remove NULL return
7701 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7703 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7704 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7705 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7706 (linux_supports_pt, linux_supports_btrace): Remove.
7707 (linux_enable_bts): Call cpu_supports_bts.
7708 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7709 * remote.c (remote_supports_btrace): Remove.
7710 (init_remote_ops): Remove remote_supports_btrace.
7711 * target-delegates.c: Regenerated.
7712 * target.c (target_supports_btrace): Remove.
7713 * target.h (target_ops) <to_supports_btrace>: Remove
7714 (target_supports_btrace): Remove.
7715 * x86-linux-nat.c (x86_linux_create_target): Remove
7716 linux_supports_btrace.
7718 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7720 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7722 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7723 exception and use message in own exception.
7725 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7727 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7728 (perf_event_pt_event_type): Use gdb_file_up.
7729 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7730 scoped_fd, and scoped_mmap.
7732 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7734 * common/scoped_mmap.h: New.
7735 * unittests/scoped_mmap-selftest.c: New.
7736 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7737 unittests/scoped_mmap-selftest.c.
7739 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7741 * common/scoped_fd.h: New.
7742 * unittests/scoped_fd-selftest.c: New.
7743 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7744 unittests/scoped_fd-selftest.c.
7746 2018-02-09 Tom Tromey <tom@tromey.com>
7748 * auto-load.c (auto_load_section_scripts): Use
7749 gdb::unique_xmalloc_ptr.
7751 2018-02-09 Tom Tromey <tom@tromey.com>
7753 * auto-load.c (execute_script_contents): Use std::string.
7755 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7757 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7758 Python function, rather than a new command.
7760 2018-02-08 Tom Tromey <tom@tromey.com>
7762 * solib.c (solib_find_1): Use std::string.
7763 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7765 2018-02-08 Tom Tromey <tom@tromey.com>
7767 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7769 2018-02-08 Tom Tromey <tom@tromey.com>
7771 * source.c (find_source_lines): Use gdb::def_vector.
7773 2018-02-08 Tom Tromey <tom@tromey.com>
7775 * macrocmd.c (struct temporary_macro_definition): New.
7776 (macro_define_command): Use temporary_macro_definition. Remove
7778 (free_macro_definition_ptr): Remove.
7780 2018-02-08 Tom Tromey <tom@tromey.com>
7782 * macroexp.c (maybe_expand): Use std::string.
7784 2018-02-08 Tom Tromey <tom@tromey.com>
7786 * macroexp.c (struct macro_buffer): Add initializers for some
7788 (init_buffer, init_shared_buffer, free_buffer)
7789 (free_buffer_return_text): Remove.
7790 (macro_buffer): New constructors.
7791 (~macro_buffer): New destructor.
7792 (macro_buffer::set_shared): New method.
7793 (macro_buffer::resize_buffer, macro_buffer::appendc)
7794 (macro_buffer::appendmem): Now methods, not free functions.
7795 (set_token, append_tokens_without_splicing, stringify)
7796 (macro_stringify): Update.
7797 (gather_arguments): Change return type. Remove argc_p argument,
7798 add args_ptr argument. Use std::vector.
7799 (substitute_args): Remove argc argument. Accept std::vector.
7800 (expand): Update. Use std::vector.
7801 (scan, macro_expand, macro_expand_next): Update.
7803 2018-02-08 Tom Tromey <tom@tromey.com>
7805 * symtab.c (default_collect_symbol_completion_matches_break_on):
7806 Use unique_xmalloc_ptr.
7807 * macroscope.h: (sal_macro_scope, user_macro_scope)
7808 (default_macro_scope): Return unique_xmalloc_ptr.
7809 * macroscope.c (sal_macro_scope, user_macro_scope)
7810 (default_macro_scope): Return unique_xmalloc_ptr.
7811 * macroexp.h (macro_expand, macro_expand_once): Return
7813 * macroexp.c (macro_expand, macro_expand_once): Return
7815 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7816 (info_macro_command, info_macros_command): Use
7818 * compile/compile-c-support.c (write_macro_definitions): Use
7820 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7822 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7824 * value.c (value_static_field): Assign field type instead of
7825 containing type when returning an optimized out value.
7827 2018-02-06 Yao Qi <yao.qi@linaro.org>
7829 * ft32-tdep.c (ft32_read_pc): Remove.
7830 (ft32_write_pc): Remove.
7831 (ft32_gdbarch_init): Update.
7832 * m32r-tdep.c (m32r_read_pc): Remove.
7833 (m32r_gdbarch_init): Update.
7834 * mep-tdep.c (mep_read_pc): Remove.
7835 (mep_gdbarch_init): Update.
7836 * microblaze-tdep.c (microblaze_write_pc): Remove.
7837 (microblaze_gdbarch_init): Update.
7838 * mn10300-tdep.c (mn10300_read_pc): Remove.
7839 (mn10300_write_pc): Remove.
7840 (mn10300_gdbarch_init): Update.
7841 * moxie-tdep.c (moxie_read_pc): Remove.
7842 (moxie_write_pc): Remove.
7843 (moxie_gdbarch_init): Update.
7845 2018-02-06 Yao Qi <yao.qi@linaro.org>
7847 * expprint.c (print_subexp_standard): Handle
7848 OP_F77_UNDETERMINED_ARGLIST.
7849 (dump_subexp_body_standard): Likewise.
7851 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7853 * target-descriptions.c (tdesc_element_visitor) Add empty
7855 (tdesc_type): Move make_gdb_type from here.
7856 (tdesc_type_builtin): Likewise.
7857 (tdesc_type_vector): Likewise.
7858 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7859 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7860 (make_gdb_type_union): Likewise.
7861 (make_gdb_type_flags): Likewise.
7862 (make_gdb_type_enum): Likewise.
7863 (make_gdb_type): New function.
7864 (tdesc_register_type): Use static make_gdb_type.
7866 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7868 * infcmd.c (default_print_one_register_info): Align natural-format
7869 column values consistently one under another.
7870 (pad_to_column): New function.
7872 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7874 * dwarf2read.c (dwarf2_physname): Move commment.
7876 2018-02-01 Leszek Swirski <leszeks@google.com>
7878 * varobj.c (varobj_formatted_print_options): Allow recursive
7879 pretty printing if pretty printing is enabled.
7881 2018-02-01 Leszek Swirski <leszeks@google.com>
7883 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7884 names after a structop as a filename.
7886 2018-02-01 Yao Qi <yao.qi@linaro.org>
7888 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7889 (arm_record_coproc_data_proc): Likewise.
7891 2018-02-01 Yao Qi <yao.qi@linaro.org>
7893 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7895 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7897 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7898 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7900 2018-01-31 Pedro Alves <palves@redhat.com>
7902 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7903 * inflow.c (child_terminal_save_inferior): Wrap reference to
7904 tcgetpgrp in HAVE_TERMIOS_H.
7905 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7907 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7908 always iterate over all inferiors.
7909 (gdbsim_cntrl_c): Adjust.
7910 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7912 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7914 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7915 index type is objfile-owned if the element type is as well.
7917 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7921 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7923 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7924 "features/s390x-linux64.c".
7925 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7926 s390_linux32 and s390x_linux64.
7927 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7929 * s390-tdep.c: Include "features/s390-linux32.c" and
7930 "features/s390x-linux64.c".
7931 (s390_tdesc_valid): Add check for tdesc_has_registers.
7932 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7933 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7934 tdesc_s390x_linux64.
7935 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7936 tdesc_s390x_linux64 to...
7937 * s390-tdep.h: ...here.
7939 2018-01-30 Pedro Alves <palves@redhat.com>
7942 * config.in, configure: Regenerate.
7943 * configure.ac: Check for getpgid.
7944 * go32-nat.c (go32_pass_ctrlc): New.
7945 (go32_target): Install it.
7946 * inf-child.c (inf_child_target): Install
7947 child_terminal_save_inferior, child_pass_ctrlc and
7949 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7950 (inf_ptrace_target): No longer install it.
7951 * infcmd.c (interrupt_target_1): Adjust.
7952 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7953 (child_interrupt): Declare.
7954 (inferior::terminal_state): New.
7955 * inflow.c (struct terminal_info): Update comments.
7956 (inferior_process_group): Delete.
7957 (terminal_is_ours): Delete.
7958 (gdb_tty_state): New.
7959 (child_terminal_init): Adjust.
7960 (is_gdb_terminal, sharing_input_terminal_1)
7961 (sharing_input_terminal): New functions.
7962 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7963 Set the process's actual process group in the foreground if
7964 possible. Handle is_ours_for_output/is_ours distinction. Don't
7965 mark terminal as the inferior's if not sharing GDB's terminal.
7966 Don't check attach_flag.
7967 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7968 pass down a target_terminal_state.
7969 (child_terminal_save_inferior): New, factored out from ...
7970 (child_terminal_ours_1): ... this. Handle
7971 target_terminal_state::is_ours_for_output.
7972 (child_interrupt, child_pass_ctrlc): New.
7973 (inflow_inferior_exit): Clear the inferior's terminal_state.
7974 (copy_terminal_info): Copy the inferior's terminal state.
7975 (_initialize_inflow): Remove reference to terminal_is_ours.
7976 * inflow.h (inferior_process_group): Delete.
7977 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7978 * procfs.c (procfs_target): Don't install procfs_interrupt.
7979 (procfs_interrupt): Delete.
7980 * remote.c (remote_serial_quit_handler): Adjust.
7981 (remote_interrupt): Remove ptid parameter. Adjust.
7982 * target-delegates.c: Regenerate.
7983 * target.c: Include "terminal.h".
7984 (target_terminal::terminal_state): Rename to ...
7985 (target_terminal::m_terminal_state): ... this.
7986 (target_terminal::init): Adjust.
7987 (target_terminal::inferior): Adjust to per-inferior
7989 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7990 (target_terminal::ours, target_terminal::ours_for_output): Use
7991 target_terminal_is_ours_kind.
7992 (target_interrupt): Remove ptid parameter. Adjust.
7993 (default_target_pass_ctrlc): Adjust.
7994 * target.h (target_ops::to_terminal_save_inferior): New field.
7995 (target_ops::to_interrupt): Remove ptid_t parameter.
7996 (target_interrupt): Remove ptid_t parameter. Update comment.
7997 (target_pass_ctrlc): Update comment.
7998 * target/target.h (target_terminal_state): New scoped enum,
8000 (target_terminal::terminal_state): ... here.
8001 (target_terminal::inferior): Update comments.
8002 (target_terminal::restore_inferior): New.
8003 (target_terminal::is_inferior, target_terminal::is_ours)
8004 (target_terminal::is_ours_for_output): Adjust.
8005 (target_terminal::scoped_restore_terminal_state): Adjust to
8006 rename, and call restore_inferior() instead of inferior().
8007 (target_terminal::scoped_restore_terminal_state::m_state): Change
8009 (target_terminal::terminal_state): Rename to ...
8010 (target_terminal::m_terminal_state): ... this and change type.
8012 2018-01-30 Pedro Alves <palves@redhat.com>
8014 * linux-nat.c (wait_for_signal): New function.
8015 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8017 (async_terminal_is_ours)
8018 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8019 (linux_nat_add_target): Don't override
8020 to_terminal_inferior/to_terminal_ours.
8022 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8024 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8026 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8028 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8029 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8030 dwarf2_per_objfile_free here.
8031 (dwarf2_per_objfile_free): Remove.
8032 (_initialize_dwarf2_read): Don't register
8033 dwarf2_per_objfile_free as a registry cleanup.
8035 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8037 Avoid compilation errors in MinGW native builds
8039 The error is triggered by including python-internal.h, and the
8042 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8043 from build-gnulib/import/math.h:27,
8044 from d:/usr/Python26/include/pyport.h:235,
8045 from d:/usr/Python26/include/Python.h:58,
8046 from python/python-internal.h:94,
8047 from python/py-arch.c:24:
8048 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8052 This happens because Python headers define 'hypot' to expand t
8053 '_hypot' in the Windows builds.
8054 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8055 'hypoth'. This avoids a compilation error.
8057 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8059 * MAINTAINERS (Write After Approval): Fix ordering.
8061 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8063 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8065 2018-01-26 Alan Modra <amodra@gmail.com>
8067 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8068 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8069 Remove nop. Make const. Comment.
8070 (powerpc32_plt_stub_so_2): New.
8071 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8072 Correct count. Update uses.
8073 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8074 Move common code reading PLT entry word. Correct
8075 powerpc32_plt_stub PLT address calculation.
8076 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8077 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8078 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8079 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8080 (ppc64_standard_linkage8): Likewise.
8081 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8082 Correct insns description.
8083 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8085 2018-01-24 Pedro Alves <palves@redhat.com>
8087 GCC PR libstdc++/83906
8088 * gdbtypes.c (operator==(const dynamic_prop &,
8089 const dynamic_prop &)): New.
8090 (operator==(const range_bounds &, const range_bounds &)): New.
8091 (check_types_equal): Use them instead of memcmp.
8092 * gdbtypes.h (operator==(const dynamic_prop &,
8093 const dynamic_prop &)): Declare.
8094 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8095 (operator==(const range_bounds &, const range_bounds &)): Declare.
8096 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8098 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8100 * s390-linux-tdep.c (s390_record_address_mask)
8101 (s390_record_calc_disp_common, s390_record_calc_disp)
8102 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8103 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8104 (s390_process_record): Move to s390-tdep.c.
8105 (s390_linux_init_abi_any): Adjust.
8106 * s390-tdep.c (s390_record_address_mask)
8107 (s390_record_calc_disp_common, s390_record_calc_disp)
8108 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8109 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8110 (s390_process_record): Moved from s390-linux-tdep.c
8111 (s390_gdbarch_init): Adjust.
8113 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8115 * s390-linux-nat.c (s390-tdep.h): New include.
8116 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8117 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8118 (ALLDEPFILES): Add s390-tdep.c.
8119 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8120 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8121 * s390-tdep.h: ...this. New file.
8122 * s390-linux-tdep.c (s390-tdep.h): New include.
8123 (_initialize_s390_tdep): Rename to...
8124 (_initialize_s390_linux_tdep): ...this and adjust.
8125 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8126 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8128 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8129 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8130 (s390_is_partial_instruction, s390_software_single_step)
8131 (is_non_branch_ril, s390_displaced_step_copy_insn)
8132 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8133 (s390_prologue_data, s390_addr, s390_store, s390_load)
8134 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8135 (s390_register_call_saved, s390_guess_tracepoint_registers)
8136 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8137 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8138 (s390_pseudo_register_name, s390_pseudo_register_type)
8139 (s390_pseudo_register_read, s390_pseudo_register_write)
8140 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8141 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8142 (s390_addr_bits_remove, s390_address_class_type_flags)
8143 (s390_address_class_type_flags_to_name)
8144 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8145 (s390_function_arg_float, s390_function_arg_vector)
8146 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8147 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8148 (s390_frame_align, s390_register_return_value, s390_return_value)
8149 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8150 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8151 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8152 (s390_trad_frame_prev_register, s390_unwind_cache)
8153 (s390_prologue_frame_unwind_cache)
8154 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8155 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8156 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8157 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8158 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8159 (s390_frame_base_address, s390_local_base_address)
8160 (s390_frame_base, s390_gcc_target_options)
8161 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8162 (s390_validate_reg_range, s390_tdesc_valid)
8163 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8164 * s390-tdep.c: ...this. New file.
8166 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8168 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8169 (s390_process_record, s390_gdbarch_tdep_alloc)
8170 (s390_linux_init_abi_any): Use/set new hook.
8172 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8174 * s390-linux-tdep.c (osabi.h): New include.
8175 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8176 (s390_linux_init_abi_any): New functions.
8177 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8179 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8181 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8182 tdesc_has_registers check
8184 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8186 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8187 (s390_validate_reg_range): New macro.
8188 (s390_gdbarch_init): Adjust.
8190 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8192 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8193 (s390_gdbarch_tdep_alloc): Adjust.
8194 (s390_gdbarch_init): Adjust.
8196 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8198 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8199 <have_tdb>: Change type to bool.
8200 (s390_gdbarch_tdep_alloc): Adjust.
8201 (s390_gdbarch_init): Adjust.
8203 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8205 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8206 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8207 (s390_gdbarch_tdep_alloc): New function.
8208 (s390_gdbarch_init): Allocate tdep at start and use its fields
8209 instead of separate variables.
8211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8213 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8214 when looking for cached gdbarch and add comment for remaining.
8216 2018-01-22 Pedro Alves <palves@redhat.com>
8217 Sergio Durigan Junior <sergiodj@redhat.com>
8219 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8222 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8224 * MAINTAINERS: Update my company e-mail address.
8226 2018-01-22 Yao Qi <yao.qi@linaro.org>
8228 * regcache.c (cooked_write_test): New function.
8229 (_initialize_regcache): Register the test.
8231 2018-01-22 Yao Qi <yao.qi@linaro.org>
8233 * ia64-tdep.c (ia64_pseudo_register_read): Call
8234 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8235 * m32c-tdep.c (m32c_cat_read): Likewise.
8236 (m32c_r3r2r1r0_read): Likewise.
8237 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8238 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8240 2018-01-22 Yao Qi <yao.qi@linaro.org>
8242 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8243 method raw_read instead of regcache_raw_read.
8244 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8245 * arm-tdep.c (arm_neon_quad_read): Likewise.
8246 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8247 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8248 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8249 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8250 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8251 (i386_pseudo_register_read_into_value): Likewise.
8252 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8253 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8254 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8255 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8256 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8257 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8258 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8259 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8260 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8262 2018-01-22 Yao Qi <yao.qi@linaro.org>
8264 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8265 * configure.tgt: Remove target mt.
8266 * mt-tdep.c: Remove.
8267 * regcache.c (cooked_read_test): Remove the check for mt.
8269 2018-01-22 Yao Qi <yao.qi@linaro.org>
8271 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8272 instead of gdbarch_pseudo_register_read_value.
8274 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8276 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8279 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8281 * linespec.c (create_sals_line_offset): Remove code that preserved
8282 the symtab_and_line's line number.
8284 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8286 * varobj.c (varobj_create): Don't set valid_block when creating a
8289 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8291 * varobj.c (varobj_create): Remove out of date comment.
8293 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8296 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8297 updating innermost block.
8298 * parse.c (innermost_block_tracker::update): Take extra type
8299 parameter, and check types match before updating innermost block.
8300 (write_dollar_variable): Update innermost block for registers.
8301 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8302 (innermost_block_tracker::innermost_block_tracker): Initialise
8304 (innermost_block_tracker::reset): Take type parameter.
8305 (innermost_block_tracker::update): Take type parameter, and pass
8306 type through as needed.
8307 (innermost_block_tracker::m_types): New member.
8308 * varobj.c (varobj_create): Pass type when reseting innermost
8311 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8313 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8314 * ada-lang.c (resolve_subexp): Likewise.
8315 * breakpoint.c (set_breakpoint_condition) Likewise.
8316 (watch_command_1) Likewise.
8317 * c-exp.y (variable): Likewise.
8318 * d-exp.y (PrimaryExpression): Likewise.
8319 * f-exp.y (variable): Likewise.
8320 * go-exp.y (variable): Likewise.
8321 * m2-exp.y (variable): Likewise.
8322 * objfiles.c (objfile::~objfile): Likewise.
8323 * p-exp.y (variable): Likewise.
8324 * parse.c (innermost_block): Change type.
8325 * parser-defs.h (class innermost_block_tracker): New.
8326 (innermost_block): Change to innermost_block_tracker.
8327 * printcmd.c (display_command): Switch to innermost_block API.
8328 (do_one_display): Likewise.
8329 * rust-exp.y (do_one_display): Likewise.
8330 * symfile.c (clear_symtab_users): Likewise.
8331 * varobj.c (varobj_create): Switch to innermost_block API, replace
8332 use of innermost_block with block stored on varobj object.
8334 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8336 * expression.h (innermost_block): Remove declaration.
8337 * varobj.c: Add 'parser-defs.h' include.
8339 2018-01-19 Tom Tromey <tom@tromey.com>
8341 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8342 symbols in the static and global blocks.
8344 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8346 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8347 gdb_ptrace.h, and move including gdb_wait.h ...
8348 * nat/linux-ptrace.h: ... to here.
8350 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8352 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8353 inf_ptrace_detach_success.
8354 (inf_ptrace_detach_success): Add inferior parameter, use it
8355 instead of inferior_ptid, pass it to detach_inferior.
8356 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8358 * inferior.c (detach_inferior): Add overload that takes an
8360 * inferior.h (detach_inferior): Likewise.
8361 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8362 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8363 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8365 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8367 * target.h (struct target_ops) <to_detach>: Add inferior
8369 (target_detach): Likewise.
8370 * target.c (dispose_inferior): Pass inferior down.
8371 (target_detach): Pass inferior down. Assert that it is equal to
8372 the current inferior.
8373 * aix-thread.c (aix_thread_detach): Pass inferior down.
8374 * corefile.c (core_file_command): Pass current_inferior() down.
8375 * corelow.c (core_detach): Add inferior parameter.
8376 * darwin-nat.c (darwin_detach): Likewise.
8377 * gnu-nat.c (gnu_detach): Likewise.
8378 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8379 * infcmd.c (detach_command): Pass current_inferior() down to
8381 * infrun.c (follow_fork_inferior): Pass parent_inf to
8383 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8385 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8386 * linux-thread-db.c (thread_db_detach): Likewise.
8387 * nto-procfs.c (procfs_detach): Likewise.
8388 * procfs.c (procfs_detach): Likewise.
8389 * record.c (record_detach): Likewise.
8390 * record.h (struct inferior): Forward-declare.
8391 (record_detach): Add inferior parameter.
8392 * remote-sim.c (gdbsim_detach): Likewise.
8393 * remote.c (remote_detach_1): Likewise.
8394 (remote_detach): Likewise.
8395 (extended_remote_detach): Likewise.
8396 * sol-thread.c (sol_thread_detach): Likewise.
8397 * target-debug.h (target_debug_print_inferior_p): New macro.
8398 * target-delegates.c: Re-generate.
8399 * top.c (kill_or_detach): Pass inferior down to target_detach.
8400 * windows-nat.c (windows_detach): Add inferior parameter.
8402 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8404 * target.h (struct target_ops) <to_detach>: Remove args
8406 (target_detach): Likewise.
8407 * target.c (dispose_inferior): Adjust.
8408 (target_detach): Remove args parameter, adjust.
8409 * aix-thread.c (aix_thread_detach): Adjust.
8410 * corefile.c (core_file_command): Adjust.
8411 * corelow.c (core_detach): Adjust.
8412 * darwin-nat.c (darwin_detach): Adjust.
8413 * gnu-nat.c (gnu_detach): Adjust.
8414 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8415 * infcmd.c (detach_command): Adjust
8416 * infrun.c (follow_fork_inferior): Adjust.
8417 (handle_vfork_child_exec_or_exit): Adjust.
8418 * linux-fork.c (linux_fork_detach): Remove args parameter.
8419 * linux-fork.h (linux_fork_detach): Likewise.
8420 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8421 * linux-thread-db.c (thread_db_detach): Likewise.
8422 * nto-procfs.c (procfs_detach): Likewise.
8423 * procfs.c (procfs_detach): Likewise.
8424 (do_detach): Remove signo parameter.
8425 * record.c (record_detach): Remove args parameter.
8426 * record.h (record_detach): Likewise.
8427 * remote-sim.c (gdbsim_detach): Likewise.
8428 * remote.c (remote_detach_1): Likewise.
8429 (remote_detach): Likewise.
8430 (extended_remote_detach): Likewise.
8431 * sol-thread.c (sol_thread_detach): Likewise.
8432 * target-delegates.c: Re-generate.
8433 * top.c (struct qt_args) <args>: Remove field.
8434 (kill_or_detach): Don't pass args.
8435 (quit_force): Don't set args.
8436 * windows-nat.c (windows_detach): Remove args parameter.
8438 2018-01-19 Yao Qi <yao.qi@linaro.org>
8440 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8441 (arm_linux_init_abi): Install it.
8443 2018-01-19 Yao Qi <yao.qi@linaro.org>
8445 * osabi.c (gdb_osabi_names): Extend the regexp for
8446 arm-linux-gnueabihf.
8448 2018-01-18 Yao Qi <yao.qi@linaro.org>
8450 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8452 (abbrev_table::add_abbrev): Update.
8453 (abbrev_table::lookup_abbrev): Update.
8455 2018-01-18 Yao Qi <yao.qi@linaro.org>
8457 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8459 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8461 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8464 2018-01-17 Tom Tromey <tom@tromey.com>
8466 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8468 2018-01-17 Tom Tromey <tom@tromey.com>
8470 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8471 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8472 (create_array_type_with_stride): Update.
8473 * dwarf2read.c (set_die_type): Update.
8475 2018-01-17 Tom Tromey <tom@tromey.com>
8477 * dwarf2read.c (delayed_method_info): Remove typedef.
8478 (dwarf2_cu::method_info): Now a std::vector.
8479 (add_to_method_list): Update.
8480 (free_delayed_list): Remove.
8481 (compute_delayed_physnames): Update.
8482 (process_full_comp_unit, process_full_type_unit): Clear the method
8483 list. Remove cleanups.
8484 (psymtab_include_file_name): Add name_holder parameter. Use
8486 (dwarf_decode_lines): Update.
8488 2018-01-17 Tom Tromey <tom@tromey.com>
8489 Simon Marchi <simon.marchi@ericsson.com>
8491 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8492 (dwarf2_per_objfile::free_cached_comp_units)
8493 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8494 (init_cutu_and_read_dies_no_follow): Update.
8495 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8496 (dwarf2_cu::~dwarf2_cu): New.
8497 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8498 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8500 2018-01-17 Tom Tromey <tom@tromey.com>
8501 Simon Marchi <simon.marchi@ericsson.com>
8503 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8504 (struct die_reader_specs) <abbrev_table>: New member.
8505 (struct abbrev_table): Add constructor.
8506 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8507 <abbrev_obstack>: Now an auto_obstack.
8508 (abbrev_table_up): New typedef.
8509 (init_cu_die_reader): Add abbrev_table parameter.
8510 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8511 Add result_dwo_abbrev_table.
8512 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8513 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8515 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8517 (skip_children): Update.
8518 (abbrev_table::alloc_abbrev): Rename from
8519 abbrev_table_alloc_abbrev.
8520 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8521 (abbrev_table::lookup_abbrev): Rename from
8522 abbrev_table_lookup_abbrev.
8523 (abbrev_table_read_table): Return abbrev_table_up.
8524 (abbrev_table_free, abbrev_table_free_cleanup)
8525 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8526 (load_partial_dies): Update.
8528 2018-01-17 Tom Tromey <tom@tromey.com>
8530 * dwarf2read.c (dwarf2_compute_name): Update comment.
8531 (read_func_scope, read_variable): Update.
8532 (new_symbol): Remove.
8533 (new_symbol_full): Rename to new_symbol.
8535 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8538 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8539 a warning instead of throwing an error, set section size to 0 and return
8541 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8543 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8545 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8547 (linux_ptrace_attach_fail_reason_string): Likewise.
8548 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8550 (linux_ptrace_attach_fail_reason_string): Likewise.
8551 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8553 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8555 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8557 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8560 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8561 checking for fs_base/gs_base fields in struct user_regs_struct.
8562 * configure: Regenerate.
8564 2018-01-17 Yao Qi <yao.qi@linaro.org>
8566 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8568 (aarch64_linux_init_abi): Install it to gdbarch hook
8571 2018-01-15 Pedro Alves <palves@redhat.com>
8573 * common/signals-state-save-restore.c
8574 (save_original_signals_state): Fix typos.
8576 2017-01-12 Tom Tromey <tom@tromey.com>
8577 Sergio Durigan Junior <sergiodj@redhat.com>
8579 * Makefile.in (install-only): Install gdb-add-index.
8581 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8583 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8585 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8587 * infrun.c (keep_going_pass_signal): Clear step-over info when
8588 insert_breakpoints fails.
8590 2018-01-11 Pedro Alves <palves@redhat.com>
8593 * infrun.c (resume): Rename to ...
8594 (resume_1): ... this.
8595 (resume): Reimplement as wrapper around resume_1.
8597 2018-01-11 Pedro Alves <palves@redhat.com>
8600 * remote.c (remote_parse_stop_reply): Default to the last-set
8601 general thread instead of to 'magic_null_ptid'.
8603 2018-01-10 Pedro Alves <palves@redhat.com>
8605 * language.h (language_get_symbol_name_matcher): Rename ...
8606 (get_symbol_name_matcher): ... this.
8607 * language.c (language_get_symbol_name_matcher): Ditto.
8608 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8611 2018-01-10 Pedro Alves <palves@redhat.com>
8615 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8616 Adjust to use language_get_symbol_name_matcher instead of
8617 language_defn::la_get_symbol_name_matcher.
8618 * language.c (language_get_symbol_name_matcher): If in Ada mode
8619 and the lookup name is a verbatim match, return Ada's matcher.
8620 * language.h (language_get_symbol_name_matcher): Adjust comment.
8621 (ada_lookup_name_info::verbatim_p):: New method.
8623 2018-01-10 Pedro Alves <palves@redhat.com>
8626 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8627 minsym's language is language_auto or language_cplus, pass down
8628 language_ada instead.
8629 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8631 2018-01-10 Pedro Alves <palves@redhat.com>
8634 * minsyms.c (linkage_name_str): New function.
8635 (iterate_over_minimal_symbols): Use it.
8637 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8639 * NEWS: Document that 'info proc' now works on FreeBSD.
8641 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8643 * configure.ac: Check for kinfo_getfile in libutil.
8644 * configure: Regenerate.
8645 * config.in: Regenerate.
8646 * fbsd-nat.c: Include "fbsd-tdep.h".
8647 (fbsd_fetch_cmdline): New.
8648 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8649 rather than calling error.
8650 (fbsd_info_proc): New.
8651 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8652 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8653 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8655 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8657 * fbsd-nat.c (struct free_deleter): Remove.
8658 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8660 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8662 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8663 NULL for an empty pathname.
8665 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8667 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8668 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8669 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8670 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8671 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8672 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8673 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8674 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8675 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8676 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8677 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8678 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8679 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8680 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8681 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8683 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8685 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8686 (gnu_xfer_auxv): New function.
8687 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8690 2018-01-08 Yao Qi <yao.qi@linaro.org>
8691 Simon Marchi <simon.marchi@ericsson.com>
8693 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8695 (COMMON_OBS): Remove selftest.o.
8696 * configure.ac: Append selftest-arch.c and common/selftest.c to
8697 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8698 * configure: Re-generated.
8699 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8701 (maintenance_info_selftests): Likewise.
8703 2018-01-08 Xavier Roirand <roirand@adacore.com>
8705 * ada-valprint.c (val_print_packed_array_elements): Use
8706 proper number of elements when printing an array indexed
8707 by an enumeration type.
8709 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8711 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8712 (dw2_get_file_names_reader): Adjust.
8713 (lookup_dwo_signatured_type): Adjust.
8714 (lookup_dwp_signatured_type): Adjust.
8715 (lookup_signatured_type): Adjust.
8716 (create_type_unit_group): Adjust.
8717 (get_type_unit_group): Adjust.
8718 (process_psymtab_comp_unit_reader): Adjust.
8719 (build_type_psymtabs_reader): Adjust.
8720 (scan_partial_symbols): Adjust.
8721 (add_partial_symbol): Adjust.
8722 (add_partial_subprogram): Adjust.
8723 (peek_die_abbrev): Adjust.
8724 (fixup_go_packaging): Adjust.
8725 (process_imported_unit_die): Adjust.
8726 (dwarf2_compute_name): Adjust.
8727 (dwarf2_physname): Adjust.
8728 (read_import_statement): Adjust.
8729 (handle_DW_AT_stmt_list): Adjust.
8730 (read_file_scope): Adjust.
8731 (read_func_scope): Adjust.
8732 (read_lexical_block_scope): Adjust.
8733 (read_call_site_scope): Adjust.
8734 (read_variable): Adjust.
8735 (dwarf2_rnglists_process): Adjust.
8736 (dwarf2_ranges_process): Adjust.
8737 (dwarf2_ranges_read): Adjust.
8738 (dwarf2_get_pc_bounds): Adjust.
8739 (dwarf2_record_block_ranges): Adjust.
8740 (dwarf2_add_field): Adjust.
8741 (dwarf2_add_member_fn): Adjust.
8742 (read_structure_type): Adjust.
8743 (process_structure_scope): Adjust.
8744 (read_enumeration_type): Adjust.
8745 (read_array_type): Adjust.
8746 (mark_common_block_symbol_computed): Adjust.
8747 (read_common_block): Adjust.
8748 (read_namespace_type): Adjust.
8749 (read_namespace): Adjust.
8750 (read_module_type): Adjust.
8751 (read_tag_pointer_type): Adjust.
8752 (read_tag_ptr_to_member_type): Adjust.
8753 (read_tag_string_type): Adjust.
8754 (read_subroutine_type): Adjust.
8755 (read_typedef): Adjust.
8756 (read_base_type): Adjust.
8757 (attr_to_dynamic_prop): Adjust.
8758 (read_subrange_type): Adjust.
8759 (read_unspecified_type): Adjust.
8760 (dwarf2_read_abbrevs): Adjust.
8761 (load_partial_dies): Adjust.
8762 (read_partial_die): Adjust.
8763 (find_partial_die): Adjust.
8764 (guess_partial_die_structure_name): Adjust.
8765 (fixup_partial_die): Adjust.
8766 (read_attribute_value): Adjust.
8767 (read_addr_index): Adjust.
8768 (read_addr_index_from_leb128): Adjust.
8769 (read_str_index): Adjust.
8770 (dwarf2_string_attr): Adjust.
8771 (get_debug_line_section): Adjust.
8772 (dwarf_decode_line_header): Adjust.
8773 (lnp_state_machine::check_line_address): Adjust.
8774 (dwarf_decode_lines_1): Adjust.
8775 (dwarf_decode_lines): Adjust.
8776 (dwarf2_start_symtab): Adjust.
8777 (var_decode_location): Adjust.
8778 (new_symbol_full): Adjust.
8779 (dwarf2_const_value_data): Adjust.
8780 (dwarf2_const_value_attr): Adjust.
8781 (dwarf2_const_value): Adjust.
8783 (die_containing_type): Adjust.
8784 (build_error_marker_type): Adjust.
8785 (lookup_die_type): Adjust.
8786 (guess_full_die_structure_name): Adjust.
8787 (anonymous_struct_prefix): Adjust.
8788 (determine_prefix): Adjust.
8789 (dwarf2_name): Adjust.
8790 (follow_die_ref_or_sig): Adjust.
8791 (follow_die_offset): Adjust.
8792 (follow_die_ref): Adjust.
8793 (follow_die_sig_1): Adjust.
8794 (follow_die_sig): Adjust.
8795 (get_signatured_type): Adjust.
8796 (get_DW_AT_signature_type): Adjust.
8797 (decode_locdesc): Adjust.
8798 (dwarf_decode_macros): Adjust.
8799 (cu_debug_loc_section): Adjust.
8800 (fill_in_loclist_baton): Adjust.
8801 (dwarf2_symbol_mark_computed): Adjust.
8802 (init_one_comp_unit): Don't assign
8803 dwarf2_cu::dwarf2_per_objfile.
8804 (set_die_type): Adjust.
8806 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8808 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8809 <dwarf2_per_objfile>: New field.
8810 (dwarf2_per_objfile): Remove global.
8811 (get_dwarf2_per_objfile): New function.
8812 (set_dwarf2_per_objfile): New function.
8813 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8815 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8816 (read_abbrev_offset): Likewise.
8817 (read_indirect_string): Likewise.
8818 (read_indirect_line_string): Likewise.
8819 (read_indirect_string_at_offset): Likewise.
8820 (read_indirect_string_from_dwz): Likewise.
8821 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8823 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8824 (create_all_comp_units): Change objfile parameter to
8826 (create_all_type_units): Likewise.
8827 (process_queue): Add dwarf2_per_objfile parameter.
8828 (read_and_check_comp_unit_head): Likewise.
8829 (lookup_dwo_unit_in_dwp): Likewise.
8830 (get_dwp_file): Likewise.
8831 (process_cu_includes): Likewise.
8832 (struct free_dwo_file_cleanup_data): New struct.
8833 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8834 set_dwarf2_per_objfile.
8835 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8836 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8837 context, adjust calls.
8838 (dw2_instantiate_symtab): Likewise.
8839 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8840 (dw2_get_cu): Likewise.
8841 (create_cu_from_index_list): Change objfile parameter to
8843 (create_cus_from_index_list): Get dwarf2_per_objfile from
8844 context, adjust calls.
8845 (create_cus_from_index): Likewise.
8846 (create_signatured_type_table_from_index): Change objfile
8847 parameter to dwarf2_per_objfile.
8848 (create_signatured_type_table_from_debug_names): Change objfile
8849 parameter to dwarf2_per_objfile.
8850 (create_addrmap_from_index): Likewise.
8851 (create_addrmap_from_aranges): Likewise.
8852 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8853 (dw2_setup): Remove.
8854 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8856 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8857 get_dwarf2_per_objfile.
8858 (dw2_forget_cached_source_info): Likewise.
8859 (dw2_map_symtabs_matching_filename): Likewise.
8860 (struct dw2_symtab_iterator) <index>: Remove.
8861 <dwarf2_per_objfile>: New field.
8862 (dw2_symtab_iter_init): Replace index parameter with
8864 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8865 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8866 (dw2_print_stats): Likewise.
8867 (dw2_dump): Likewise.
8868 (dw2_expand_symtabs_for_function): Likewise.
8869 (dw2_expand_all_symtabs): Likewise.
8870 (dw2_expand_symtabs_with_fullname): Likewise.
8871 (dw2_expand_marked_cus): Replace index and objfile parameters
8872 with dwarf2_per_objfile.
8873 (dw_expand_symtabs_matching_file_matcher): Add
8874 dwarf2_per_objfile parameter and adjust calls.
8875 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8877 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8878 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8880 (create_cus_from_debug_names_list): Replace objfile parameter
8881 with dwarf2_per_objfile and adjust calls.
8882 (create_cus_from_debug_names): Likewise.
8883 (dwarf2_read_debug_names): Likewise.
8884 (mapped_debug_names::namei_to_name): Adjust call.
8885 (dw2_debug_names_iterator::next): Likewise.
8886 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8887 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8888 (dw2_debug_names_dump): Likewise.
8889 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8890 (dw2_debug_names_expand_symtabs_matching): Likewise.
8891 (dwarf2_initialize_objfile): Likewise.
8892 (dwarf2_build_psymtabs): Likewise.
8893 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8895 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8896 (read_and_check_comp_unit_head): Likewise.
8897 (read_abbrev_offset): Likewise.
8898 (create_debug_type_hash_table): Likewise.
8899 (create_debug_types_hash_table): Likewise.
8900 (create_all_type_units): Replace objfile parameter with
8902 (add_type_unit): Add dwarf2_per_objfile parameter.
8903 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8904 with dwarf2_per_objfile.
8905 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8906 (lookup_dwp_signatured_type): Likewise.
8907 (lookup_signatured_type): Likewise.
8908 (read_cutu_die_from_dwo): Likewise.
8909 (init_tu_and_read_dwo_dies): Likewise.
8910 (init_cutu_and_read_dies): Likewise.
8911 (init_cutu_and_read_dies_no_follow): Likewise.
8912 (allocate_type_unit_groups_table): Add objfile parameter.
8913 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8914 (get_type_unit_group): Likewise.
8915 (process_psymtab_comp_unit): Update call.
8916 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8917 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8918 (print_tu_stats): Likewise.
8919 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8921 (build_type_psymtabs): Change objfile parameter to
8923 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8924 passed in void* parameter.
8925 (process_skeletonless_type_units): Change objfile parameter to
8927 (set_partial_user): Likewise.
8928 (dwarf2_build_psymtabs_hard): Likewise.
8929 (read_comp_units_from_section): Likewise.
8930 (create_all_comp_units): Likewise.
8931 (scan_partial_symbols): Update calls.
8932 (add_partial_symbol): Likewise.
8933 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8934 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8935 (process_queue): Add dwarf2_per_objfile parameter.
8936 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8937 (compute_compunit_symtab_includes): Likewise.
8938 (process_cu_includes): Add dwarf2_per_objfile parameter.
8939 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8940 (process_full_type_unit): Likewise.
8941 (process_imported_unit_die): Update call.
8942 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8943 (read_file_scope): Likewise.
8944 (allocate_dwo_file_hash_table): Add objfile parameter.
8945 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8946 (create_cus_hash_table): Likewise.
8947 (create_dwp_hash_table): Likewise.
8948 (create_dwo_unit_in_dwp_v1): Likewise.
8949 (create_dwp_v2_section): Likewise.
8950 (create_dwo_unit_in_dwp_v2): Likewise.
8951 (lookup_dwo_unit_in_dwp): Likewise.
8952 (try_open_dwop_file): Likewise.
8953 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8954 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8955 cleanup to include a reference to dwarf2_per_objfile.
8956 (open_dwp_file): Add dwarf2_per_objfile parameter.
8957 (open_and_init_dwp_file): Likewise.
8958 (get_dwp_file): Likewise.
8959 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8960 (queue_and_load_all_dwo_tus): Update call.
8961 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8963 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8964 (dwarf2_ranges_process): Likewise.
8965 (dwarf2_get_pc_bounds): Likewise.
8966 (mark_common_block_symbol_computed): Likewise.
8967 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8968 (dwarf2_read_abbrevs): Update call.
8969 (read_partial_die): Use dwarf2_per_objfile from cu.
8970 (find_partial_die): Likewise.
8971 (fixup_partial_die): Likewise.
8972 (read_attribute_value): Likewise.
8973 (read_indirect_string_at_offset_from): Add objfile parameter.
8974 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8976 (read_indirect_string_from_dwz): Add objfile parameter.
8977 (read_indirect_string): Add objfile parameter.
8978 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8979 (read_addr_index): Use dwarf2_per_objfile from cu.
8980 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8982 (read_str_index): Use dwarf2_per_objfile from cu.
8983 (get_debug_line_section): Likewise.
8984 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8985 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8986 (new_symbol_full): Use dwarf2_per_objfile from cu.
8987 (build_error_marker_type): Likewise.
8988 (lookup_die_type): Likewise.
8989 (determine_prefix): Likewise.
8990 (follow_die_offset): Likewise.
8991 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8992 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8993 (dwarf2_fetch_die_type_sect_off): Likewise.
8994 (dwarf2_get_die_type): Likewise.
8995 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8996 (get_signatured_type): Likewise.
8997 (get_DW_AT_signature_type): Likewise.
8998 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8999 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9000 (cu_debug_loc_section): Likewise.
9001 (fill_in_loclist_baton): Likewise.
9002 (dwarf2_symbol_mark_computed): Likewise.
9003 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9005 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9007 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9008 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9009 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9010 (set_die_type): Use dwarf2_free_objfile from cu.
9011 (get_die_type_at_offset): Likewise.
9012 (dwarf2_per_objfile_free): Don't assign global variable.
9013 (debug_names) <constructor>: Add dwarf2_per_objfile
9014 parameter, update m_debugstrlookup construction.
9015 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9017 <m_dwarf2_per_objfile>: New field.
9018 <lookup>: Use m_dwarf2_per_objfile.
9019 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9020 (psyms_seen_size): Likewise.
9021 (write_gdbindex): Replace objfile parameter with
9023 (write_debug_names): Likewise.
9024 (write_psymtabs_to_index): Likewise.
9025 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9028 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9030 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9031 <dwarf2_per_objfile>: New field.
9032 (struct dwarf2_per_cu_data) <objfile>: Remove.
9033 <dwarf2_per_objfile>: New field.
9034 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9036 (create_signatured_type_table_from_index): Likewise.
9037 (create_debug_type_hash_table): Likewise.
9038 (fill_in_sig_entry_from_dwo_entry): Likewise.
9039 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9040 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9042 (create_partial_symtab): Access objfile through
9044 (process_psymtab_comp_unit_reader): Likewise.
9045 (read_comp_units_from_section): Likewise.
9046 (scan_partial_symbols): Likewise.
9047 (add_partial_symbol): Likewise.
9048 (add_partial_subprogram): Likewise.
9049 (peek_die_abbrev): Likewise.
9050 (fixup_go_packaging): Likewise.
9051 (process_full_comp_unit): Likewise.
9052 (process_full_type_unit): Likewise.
9053 (process_imported_unit_die): Likewise.
9054 (dwarf2_compute_name): Likewise.
9055 (dwarf2_physname): Likewise.
9056 (read_import_statement): Likewise.
9057 (create_cus_hash_table): Assign dwarf2_physname instead of
9059 (read_func_scope): Access objfile through dwarf2_per_objfile.
9060 (read_lexical_block_scope): Likewise.
9061 (read_call_site_scope): Likewise.
9062 (read_variable): Likewise.
9063 (dwarf2_rnglists_process): Likewise.
9064 (dwarf2_ranges_process): Likewise.
9065 (dwarf2_ranges_read): Likewise.
9066 (dwarf2_record_block_ranges): Likewise.
9067 (dwarf2_add_field): Likewise.
9068 (dwarf2_add_member_fn): Likewise.
9069 (read_structure_type): Likewise.
9070 (process_structure_scope): Likewise.
9071 (read_enumeration_type): Likewise.
9072 (read_array_type): Likewise.
9073 (read_common_block): Likewise.
9074 (read_namespace_type): Likewise.
9075 (read_namespace): Likewise.
9076 (read_module_type): Likewise.
9077 (read_tag_pointer_type): Likewise.
9078 (read_tag_ptr_to_member_type): Likewise.
9079 (read_tag_string_type): Likewise.
9080 (read_subroutine_type): Likewise.
9081 (read_typedef): Likewise.
9082 (read_base_type): Likewise.
9083 (attr_to_dynamic_prop): Likewise.
9084 (read_subrange_type): Likewise.
9085 (read_unspecified_type): Likewise.
9086 (load_partial_dies): Likewise.
9087 (read_partial_die): Likewise.
9088 (find_partial_die): Likewise.
9089 (guess_partial_die_structure_name): Likewise.
9090 (fixup_partial_die): Likewise.
9091 (read_attribute_value): Likewise.
9092 (read_addr_index_from_leb128): Likewise.
9093 (dwarf2_read_addr_index): Likewise.
9094 (dwarf2_string_attr): Likewise.
9095 (lnp_state_machine::check_line_address): Likewise.
9096 (dwarf_decode_lines_1): Likewise.
9097 (dwarf_decode_lines): Likewise.
9098 (dwarf2_start_symtab): Likewise.
9099 (var_decode_location): Likewise.
9100 (new_symbol_full): Likewise.
9101 (dwarf2_const_value_data): Likewise.
9102 (dwarf2_const_value_attr): Likewise.
9103 (dwarf2_const_value): Likewise.
9104 (die_type): Likewise.
9105 (die_containing_type): Likewise.
9106 (lookup_die_type): Likewise.
9107 (guess_full_die_structure_name): Likewise.
9108 (anonymous_struct_prefix): Likewise.
9109 (dwarf2_name): Likewise.
9110 (follow_die_ref_or_sig): Likewise.
9111 (follow_die_offset): Likewise.
9112 (follow_die_ref): Likewise.
9113 (dwarf2_fetch_die_loc_sect_off): Likewise.
9114 (dwarf2_fetch_constant_bytes): Likewise.
9115 (dwarf2_fetch_die_type_sect_off): Likewise.
9116 (dwarf2_get_die_type): Likewise.
9117 (follow_die_sig): Likewise.
9118 (decode_locdesc): Likewise.
9119 (dwarf2_per_cu_objfile): Likewise.
9120 (dwarf2_per_cu_text_offset): Likewise.
9121 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9123 (set_die_type): Access objfile through
9126 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9128 * valprint.c (converted_character_d): Remove typedef.
9129 (DEF_VEC_O (converted_character_d)): Remove.
9130 (count_next_character): Use std::vector.
9131 (print_converted_chars_to_obstack): Likewise.
9132 (generic_printstr): Likewise.
9134 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9136 * xml-support.h (struct gdb_xml_value): Add constructor.
9137 <value>: Change type to unique_xmalloc_ptr.
9138 (gdb_xml_value_s): Remove typedef.
9139 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9140 (gdb_xml_element_start_handler): Change parameter type to
9142 (xml_find_attribute): Likewise.
9143 * xml-support.c (xml_find_attribute): Change parameter type to
9144 std::vector and adjust.
9145 (gdb_xml_values_cleanup): Remove.
9146 (gdb_xml_parser::start_element): Adjust to std::vector.
9147 (xinclude_start_include): Change paraeter type to std::vector
9149 * btrace.c (check_xml_btrace_version): Likewise.
9150 (parse_xml_btrace_block): Likewise.
9151 (parse_xml_btrace_pt_config_cpu): Likewise.
9152 (parse_xml_btrace_pt): Likewise.
9153 (parse_xml_btrace_conf_bts): Likewise.
9154 (parse_xml_btrace_conf_pt): Likewise.
9155 * memory-map.c (memory_map_start_memory): Likewise.
9156 (memory_map_start_property): Likewise.
9157 * osdata.c (osdata_start_osdata): Likewise.
9158 (osdata_start_item): Likewise.
9159 (osdata_start_column): Likewise.
9160 * remote.c (start_thread): Likewise.
9161 * solib-aix.c (library_list_start_library): Likewise.
9162 (library_list_start_list): Likewise.
9163 * solib-svr4.c (library_list_start_library): Likewise.
9164 (svr4_library_list_start_list): Likewise.
9165 * solib-target.c (library_list_start_segment): Likewise.
9166 (library_list_start_section): Likewise.
9167 (library_list_start_library): Likewise.
9168 (library_list_start_list): Likewise.
9169 * tracepoint.c (traceframe_info_start_memory): Likewise.
9170 (traceframe_info_start_tvar): Likewise.
9171 * xml-syscall.c (syscall_start_syscall): Likewise.
9172 * xml-tdesc.c (tdesc_start_target): Likewise.
9173 (tdesc_start_feature): Likewise.
9174 (tdesc_start_reg): Likewise.
9175 (tdesc_start_union): Likewise.
9176 (tdesc_start_struct): Likewise.
9177 (tdesc_start_flags): Likewise.
9178 (tdesc_start_enum): Likewise.
9179 (tdesc_start_field): Likewise.
9180 (tdesc_start_enum_value): Likewise.
9181 (tdesc_start_vector): Likewise.
9183 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9185 * extension.h (struct xmethod_worker) <clone>: Remove.
9186 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9188 (python_xmethod_worker::clone): Remove.
9189 * valops.c (find_overload_match): Use std::move instead of
9192 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9194 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9195 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9196 <free_xmethod_worker_data>: Remove.
9197 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9198 <get_xmethod_arg_types>: Remove.
9199 <get_xmethod_result_type>: Remove.
9200 <invoke_xmethod>: Remove.
9201 * extension.c (new_xmethod_worker): Remove.
9202 (clone_xmethod_worker): Remove.
9203 (get_matching_xmethod_workers): Return void, pass std::vector by
9205 (get_xmethod_arg_types): Rename to...
9206 (xmethod_worker::get_arg_types): ... this, and adjust.
9207 (get_xmethod_result_type): Rename to...
9208 (xmethod_worker::get_result_type): ... this, and adjust.
9209 (invoke_xmethod): Remove.
9210 (free_xmethod_worker): Remove.
9211 (free_xmethod_worker_vec): Remove.
9212 * extension.h (enum ext_lang_rc): Move here from
9214 (struct xmethod_worker): Add constructor and destructor.
9217 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9218 virtual pure methods.
9219 <get_arg_types, get_result_type>: New methods.
9220 (xmethod_worker_ptr): Remove typedef.
9221 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9222 (xmethod_worker_vec): Remove typedef.
9223 (xmethod_worker_up): New typedef.
9224 (invoke_xmethod): Remove.
9225 (clone_xmethod_worker): Remove.
9226 (free_xmethod_worker): Remove.
9227 (free_xmethod_worker_vec): Remove.
9228 (get_xmethod_arg_types): Remove.
9229 (get_xmethod_result_type): Remove.
9230 * valops.c (find_method_list): Use std::vector, don't use
9231 intermediate vector.
9232 (value_find_oload_method_list): Use std::vector.
9233 (find_overload_match): Use std::vector.
9234 (find_oload_champ): Use std::vector.
9235 * value.c (value_free): Use operator delete.
9236 (value_of_xmethod): Rename to...
9237 (value_from_xmethod): ... this. Don't assign
9238 xmethod_worker::value, take rvalue-reference.
9239 (result_type_of_xmethod): Adjust.
9240 (call_xmethod): Adjust.
9241 * value.h: Include extension.h.
9242 (struct xmethod_worker): Don't forward-declare.
9243 (value_of_xmethod): Rename to...
9244 (value_from_xmethod): ... this, take rvalue-reference.
9245 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9246 (struct python_xmethod_worker): ... this, add constructor and
9248 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9249 (gdbpy_free_xmethod_worker_data): Rename to...
9250 (python_xmethod_worker::~python_xmethod_worker): ... this and
9252 (gdbpy_clone_xmethod_worker_data): Rename to...
9253 (python_xmethod_worker::clone): ... this and adjust.
9254 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9256 (gdbpy_get_xmethod_arg_types): Rename to...
9257 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9258 (gdbpy_get_xmethod_result_type): Rename to...
9259 (python_xmethod_worker::do_get_result_type): ... this and
9261 (gdbpy_invoke_xmethod): Rename to...
9262 (python_xmethod_worker::invoke): ... this and adjust.
9263 (new_python_xmethod_worker): Rename to...
9264 (python_xmethod_worker::python_xmethod_worker): ... this and
9266 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9268 (gdbpy_free_xmethod_worker_data): Remove.
9269 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9270 (gdbpy_get_xmethod_arg_types): Remove.
9271 (gdbpy_get_xmethod_result_type): Remove.
9272 (gdbpy_invoke_xmethod): Remove.
9273 * python/python.c (python_extension_ops): Remove obsolete
9276 2018-01-05 Pedro Alves <palves@redhat.com>
9279 * common/signals-state-save-restore.c
9280 (save_original_signals_state): New parameter 'quiet'. Warn if we
9281 find a custom handler preinstalled, instead of internal erroring.
9282 But only warn if !quiet.
9283 * common/signals-state-save-restore.h
9284 (save_original_signals_state): New parameter 'quiet'.
9285 * main.c (captured_main_1): Move save_original_signals_state call
9286 after option handling, and pass QUIET.
9288 2018-01-05 Pedro Alves <palves@redhat.com>
9290 * spu-tdep.c (spu_catch_start): Pass
9291 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9293 2018-01-05 Pedro Alves <palves@redhat.com>
9296 * ada-lang.c (literal_symbol_name_matcher): New function.
9297 (ada_get_symbol_name_matcher): Use it for
9298 symbol_name_match_type::SEARCH_NAME.
9299 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9300 it down instead of assuming symbol_name_match_type::FULL.
9301 * block.h (block_lookup_symbol): New parameter 'match_type'.
9302 * c-valprint.c (print_unpacked_pointer): Use
9303 lookup_symbol_search_name instead of lookup_symbol.
9304 * compile/compile-object-load.c (get_out_value_type): Pass down
9305 symbol_name_match_type::SEARCH_NAME.
9306 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9307 symbol_name_match_type::FULL.
9308 * cp-support.c (cp_get_symbol_name_matcher): Handle
9309 symbol_name_match_type::SEARCH_NAME.
9310 * infrun.c (insert_exception_resume_breakpoint): Use
9311 lookup_symbol_search_name.
9312 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9313 * psymtab.c (maintenance_check_psymtabs): Use
9314 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9315 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9317 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9318 if symbol_name_match_type::SEARCH_NAME.
9319 (lookup_symbol_in_language): Pass down
9320 symbol_name_match_type::FULL.
9321 (lookup_symbol_search_name): New.
9322 (lookup_language_this): Pass down
9323 symbol_name_match_type::SEARCH_NAME.
9324 (lookup_symbol_aux, lookup_local_symbol): New parameter
9325 'match_type'. Pass it down.
9326 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9327 (lookup_symbol_search_name): New declaration.
9328 (lookup_symbol_in_block): New 'match_type' parameter.
9330 2018-01-05 Pedro Alves <palves@redhat.com>
9333 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9335 (ada_lookup_symbol): Reimplement in terms of
9336 ada_lookup_symbol_list, bits factored out from
9337 ada_lookup_encoded_symbol.
9339 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9341 * ada-exp.y (write_object_renaming): When subscripting an array
9342 using a symbol as the index, pass the block in call to
9343 ada_lookup_encoded_symbol when looking that symbol up.
9345 2018-01-05 Jerome Guitton <guitton@adacore.com>
9347 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9350 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9352 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9353 the case where VALUE_LVAL (val0) is not lval_memory.
9355 2018-01-05 Xavier Roirand <roirand@adacore.com>
9357 * ada-valprint.c (print_optional_low_bound): Handle
9358 character-indexed array printing like boolean-indexed array
9361 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9363 * NEWS: Create a new section for the next release branch.
9364 Rename the section of the current branch, now that it has
9367 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9369 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9370 * version.in: Bump version to 8.1.50.DATE-git.
9372 2018-01-03 Xavier Roirand <roirand@adacore.com>
9374 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9376 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9378 (default_exception_support_info) <catch_handlers_sym>: Add field.
9379 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9380 (ada_exception_name_addr_1): Add "catch handlers" handling.
9381 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9383 (create_excep_cond_exprs) <ex>: Add parameter.
9384 (re_set_exception): Update create_excep_cond_exprs call.
9385 (print_it_exception, print_one_exception, print_mention_exception)
9386 (print_recreate_exception): Add "catch handler" handling.
9387 (allocate_location_catch_handlers, re_set_catch_handlers)
9388 (check_status_catch_handlers, print_it_catch_handlers)
9389 (print_one_catch_handlers, print_mention_catch_handlers)
9390 (print_recreate_catch_handlers): New function.
9391 (catch_handlers_breakpoint_ops): New variable.
9392 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9393 Add parameter. Add "catch handler" handling.
9394 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9395 Add "catch handler" handling.
9396 (ada_exception_catchpoint_cond_string): Add "catch handler"
9398 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9400 (catch_ada_handlers_command): New function.
9401 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9402 operations structure.
9403 (_initialize_ada_language): Add "catch handlers" command entry.
9404 * NEWS: Document "catch handlers" feature.
9406 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9408 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9409 account when creating the array type of the slice.
9410 (ada_value_slice): Likewise.
9412 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9414 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9416 (create_array_type_with_stride): Add byte_stride_prop parameter.
9417 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9418 New parameter. Update all callers in this file.
9419 (array_type_has_dynamic_stride): New function.
9420 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9421 of arrays with dynamic byte strides.
9422 * dwarf2read.c (read_array_type): Add support for dynamic
9423 DW_AT_byte_stride attributes.
9425 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9427 * dwarf2read.c (read_unspecified_type): Treat
9428 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9430 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9432 Update copyright year range in all GDB files.
9434 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9436 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9437 and gdb/testsuite/gdb.base/step-line.c.
9439 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9441 * copyright.py (main): Dump the contents of
9442 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9443 even if BY_HAND is empty.
9445 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9447 * top.c (print_gdb_version): Update Copyright year in version
9450 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9452 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9454 For older changes see ChangeLog-2017.
9460 version-control: never