1 2018-06-28 Pedro Alves <palves@redhat.com>
3 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5 (switch_to_thread_no_regs): Adjust comment.
6 * infcmd.c (stop_pc): Delete.
7 (post_create_inferior, info_program_command): Replace references
8 to stop_pc with references to thread_info->suspend.stop_pc.
9 * inferior.h (stop_pc): Delete declaration.
10 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
11 (handle_inferior_event_1, handle_signal_stop)
12 (process_event_stop_test, keep_going_stepped_thread)
13 (handle_step_into_function, handle_step_into_function_backward)
14 (print_stop_location): Replace references to stop_pc with
15 references to thread_info->suspend.stop_pc.
16 (struct infcall_suspend_state) <stop_pc>: Delete field.
17 (save_infcall_suspend_state, restore_infcall_suspend_state):
18 Remove references to inf_stat->stop_pc.
19 * linux-fork.c (fork_load_infrun_state): Likewise.
20 * record-btrace.c (record_btrace_set_replay): Likewise.
21 * record-full.c (record_full_goto_entry): Likewise.
22 * remote.c (print_one_stopped_thread): Likewise.
23 * target.c (target_resume): Extend comment.
24 * thread.c (set_executing_thread): New.
25 (set_executing): Use it.
26 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
27 Remove references to stop_pc.
29 2018-06-28 Pedro Alves <palves@redhat.com>
31 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
32 Moving fetching stop_pc until after ecs->event_thread is refreshed.
34 2018-06-28 Tom Tromey <tom@tromey.com>
36 * coffread.c (coff_symfile_finish): Update.
37 * xcoffread.c (xcoff_symfile_finish): Update.
38 * elfread.c (elf_symfile_finish): Update.
39 * symfile.h (dwarf2_free_objfile): Don't declare.
40 * dwarf2read.c (_initialize_dwarf2_read): Use
41 register_objfile_data_with_cleanup.
42 (dwarf2_free_objfile): Now static. Change signature.
44 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
46 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
47 option "-o" to add-symbol-file-load to add an offset to each
48 section's load address.
49 * symfile.c (set_objfile_default_section_offset): New function.
51 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
53 * symfile.c (add_symbol_file_command): Make sure that sections
54 with the same name are sorted in the same order.
56 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
58 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
59 require the second argument. If omitted, load sections at the
60 addresses specified in the file.
62 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
64 * symfile.c (symbol_file_command, symbol_file_add_main_1)
65 (_initialize_symfile): Add option "-o" to symbol-file to add an
66 offset to each section of the symbol file.
68 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
70 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
72 2018-06-27 Tom Tromey <tom@tromey.com>
74 * stack.c (_initialize_stack): Update "func" help text.
76 2018-06-27 Tom Tromey <tom@tromey.com>
78 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
80 (unwind_infopy_str, pyuw_create_unwind_info)
81 (unwind_infopy_add_saved_register, pyuw_sniffer)
82 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
84 (struct saved_reg): Add constructor.
85 <value>: Now a gdbpy_ref<>.
87 2018-06-27 Tom Tromey <tom@tromey.com>
89 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
91 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
93 * gdb-gdb.py.in: Format using autopep8.
95 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
97 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
98 (type_lookup_function): Recognize CORE_ADDR values.
100 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
102 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
105 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
107 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
110 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
112 * gdb-gdb.py: Move to...
113 * gdb-gdb.py.in: ... here.
114 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
115 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
117 (distclean): Remove gdb-gdb.py when cleaning.
118 (gdb-gdb.py, gdb-gdb.gdb): New rules.
119 * configure: Re-generate.
121 2018-06-27 Pedro Alves <palves@redhat.com>
123 * proc-service.c (get_ps_regcache): New.
124 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
125 (ps_lsetfpregs): Use it.
127 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
130 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
131 (dwarf_decode_lines_1): Adjust.
133 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
135 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
137 <info_proc>: Likewise.
139 2018-06-26 Joel Brobecker <brobecker@adacore.com>
141 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
142 to windows_fetch_one_register, and only handle the case of
143 fetching one register. Move the code that reloads the context
144 and iterates over all registers if R is negative to...
145 (windows_nat_target::fetch_registers): ... here.
146 (do_windows_store_inferior_registers): Rename to
147 windows_store_one_register, and only handle the case of storing
148 one register. Move the code that handles the case where r is
150 (windows_nat_target::store_registers) ... here.
152 2018-06-26 Tom Tromey <tom@tromey.com>
155 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
156 * rust-lang.c (rust_print_struct_def): Add podata parameter.
158 (rust_internal_print_type): Add podata parameter.
159 (rust_print_type): Update.
161 2018-06-26 Tom Tromey <tom@tromey.com>
163 * typeprint.h (struct print_offset_data) <update, finish,
164 maybe_print_hole>: New methods.
165 <indentation>: New constant.
166 * typeprint.c (print_offset_data::indentation): Define.
167 (print_offset_data::maybe_print_hole, print_offset_data::update)
168 (print_offset_data::finish): Move from c-typeprint.c and rename.
169 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
170 (print_spaces_filtered_with_print_options): Update.
171 (c_print_type_union_field_offset, maybe_print_hole)
172 (c_print_type_struct_field_offset): Move to typeprint.c and
174 (c_type_print_base_struct_union): Update.
176 2018-06-25 Pedro Alves <palves@redhat.com>
178 * gdbthread.h (thread_info_ref, delete_thread)
179 (delete_thread_silent, first_thread_of_inferior)
180 (any_thread_of_inferior, switch_to_thread)
181 (enable_thread_stack_temporaries)
182 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
183 (get_last_thread_stack_temporary)
184 (value_in_thread_stack_temporaries, can_access_registers_thread):
185 Spell out "struct thread_info" instead of just "thread_info".
186 * inferior.h (notice_new_inferior): Likewise.
188 2018-06-25 Pedro Alves <palves@redhat.com>
190 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
191 pass thread_info pointer to delete_thread.
192 (windows_nat_target::detach): Pass inferior pointer to
194 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
196 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
197 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
198 and pass a thread_info pointer to delete_thread.
199 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
200 pass thread_info pointer to delete_thread.
201 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
202 delete_thread_silent call.
203 * procfs.c (procfs_target::detach): Pass inferior pointer to
205 (procfs_target::wait): Pass thread_info pointer to delete_thread.
206 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
207 delete_thread_silent call.
208 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
209 pass thread_info pointer to delete_thread.
210 (windows_nat_target::detach): Pass inferior pointer to
213 2018-06-22 Alan Hayward <alan.hayward@arm.com>
215 * regcache.c (readable_regcache::read_part): Fix asserts.
216 (reg_buffer::raw_collect_part): New function.
217 (regcache::write_part): Fix asserts.
218 (reg_buffer::raw_supply_part): New function.
219 (regcache::transfer_regset_register): New helper function.
220 (regcache::transfer_regset): Call new functions.
221 (regcache_supply_regset): Use gdb_byte*.
222 (regcache::supply_regset): Likewise.
223 (regcache_collect_regset): Likewise.
224 (regcache::collect_regset): Likewise.
225 * regcache.h (reg_buffer::raw_collect_part): New declaration.
226 (reg_buffer::raw_supply_part): Likewise.
227 (regcache::transfer_regset_register): Likewise.
228 (regcache::transfer_regset): Use gdb_byte*.
230 2018-06-22 Alan Hayward <alan.hayward@arm.com>
232 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
234 2018-06-21 Pedro Alves <palves@redhat.com>
236 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
237 instead of a ptid_t. All callers adjusted.
238 * ada-tasks.c (ada_get_task_number): Likewise. All callers
240 (print_ada_task_info, display_current_task_id, task_command_1):
242 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
244 (breakpoint_kind): Adjust.
245 (remove_breakpoints_pid): Rename to ...
246 (remove_breakpoints_inf): ... this. Adjust to take an inferior
247 pointer. All callers adjusted.
248 (bpstat_clear_actions): Use inferior_thread.
249 (get_bpstat_thread): New.
250 (bpstat_do_actions): Use it.
251 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
252 to take a thread_info pointer. All callers adjusted.
253 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
254 (breakpoint_re_set_thread): Use inferior_thread.
255 * breakpoint.h (struct inferior): Forward declare.
256 (bpstat_stop_status): Update.
257 (remove_breakpoints_pid): Delete.
258 (remove_breakpoints_inf): New.
259 * bsd-uthread.c (bsd_uthread_target::wait)
260 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
261 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
262 (maint_btrace_packet_history_cmd)
263 (maint_btrace_clear_packet_history_cmd): Adjust.
264 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
266 * cli/cli-interp.c: Include "inferior.h".
267 * common/refcounted-object.h (struct
268 refcounted_object_ref_policy): New.
269 * compile/compile-object-load.c: Include gdbthread.h.
270 (store_regs): Use inferior_thread.
271 * corelow.c (core_target::close): Use current_inferior.
272 (core_target_open): Adjust to use first_thread_of_inferior and use
273 the current inferior.
274 * ctf.c (ctf_target::close): Adjust to use current_inferior.
275 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
276 <thread>: ... this new field. All references adjusted.
277 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
278 Take a thread_info pointer instead of a ptid_t.
279 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
280 (dummy_frame_discard, register_dummy_frame_dtor): Take a
281 thread_info pointer instead of a ptid_t.
282 * elfread.c: Include "inferior.h".
283 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
285 * eval.c (evaluate_subexp): Likewise.
286 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
288 * gdb_proc_service.h (struct thread_info): Forward declare.
289 (struct ps_prochandle) <ptid>: Delete, replaced by ...
290 <thread>: ... this new field. All references adjusted.
291 * gdbarch.h, gdbarch.c: Regenerate.
292 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
293 'thread' parameter. All implementations and callers adjusted.
294 * gdbthread.h (thread_info) <set_running>: New method.
295 (delete_thread, delete_thread_silent): Take a thread_info pointer
297 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
298 (first_thread_of_process): Delete, replaced by ...
299 (first_thread_of_inferior): ... this new function. All callers
301 (any_live_thread_of_process): Delete, replaced by ...
302 (any_live_thread_of_inferior): ... this new function. All callers
304 (switch_to_thread, switch_to_no_thread): Declare.
305 (is_executing): Delete.
306 (enable_thread_stack_temporaries): Update comment.
307 <enable_thread_stack_temporaries>: Take a thread_info pointer
308 instead of a ptid_t. Incref the thread.
309 <~enable_thread_stack_temporaries>: Decref the thread.
312 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
313 (get_last_thread_stack_temporary)
314 (value_in_thread_stack_temporaries, can_access_registers_thread):
315 Take a thread_info pointer instead of a ptid_t. All callers
317 * infcall.c (get_call_return_value): Use inferior_thread.
318 (run_inferior_call): Work with thread pointers instead of ptid_t.
319 (call_function_by_hand_dummy): Work with thread pointers instead
320 of ptid_t. Use thread_info_ref.
321 * infcmd.c (proceed_thread_callback): Access thread's state
323 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
324 access thread's state directly.
325 (continue_command): Use inferior_thread.
326 (info_program_command): Use find_thread_ptid and access thread
328 (proceed_after_attach_callback): Use thread state directly.
329 (notice_new_inferior): Take a thread_info pointer instead of a
330 ptid_t. All callers adjusted.
331 (exit_inferior): Take an inferior pointer instead of a pid. All
333 (exit_inferior_silent): New.
334 (detach_inferior): Delete.
335 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
336 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
337 (detach_inferior_command, kill_inferior_command): Use
338 find_inferior_id instead of valid_gdb_inferior_id and
339 gdb_inferior_id_to_pid.
340 (inferior_command): Use inferior and thread pointers.
341 * inferior.h (struct thread_info): Forward declare.
342 (notice_new_inferior): Take a thread_info pointer instead of a
343 ptid_t. All callers adjusted.
344 (detach_inferior): Delete declaration.
345 (exit_inferior, exit_inferior_silent): Take an inferior pointer
346 instead of a pid. All callers adjusted.
347 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
348 (valid_gdb_inferior_id): Delete.
349 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
350 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
351 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
353 <inf>: ... this new field.
354 <step_ptid>: Delete, replaced by ...
355 <step_thread>: ... this new field.
356 (get_displaced_stepping_state): Take an inferior pointer instead
357 of a pid. All callers adjusted.
358 (displaced_step_in_progress_any_inferior): Adjust.
359 (displaced_step_in_progress_thread): Take a thread pointer instead
360 of a ptid_t. All callers adjusted.
361 (displaced_step_in_progress, add_displaced_stepping_state): Take
362 an inferior pointer instead of a pid. All callers adjusted.
363 (get_displaced_step_closure_by_addr): Adjust.
364 (remove_displaced_stepping_state): Take an inferior pointer
365 instead of a pid. All callers adjusted.
366 (displaced_step_prepare_throw, displaced_step_prepare)
367 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
368 All callers adjusted.
369 (start_step_over): Adjust.
370 (infrun_thread_ptid_changed): Remove bit updating ptids in the
371 displaced step queue.
372 (do_target_resume): Adjust.
373 (fetch_inferior_event): Use inferior_thread.
374 (context_switch, get_inferior_stop_soon): Take an
375 execution_control_state pointer instead of a ptid_t. All callers
377 (switch_to_thread_cleanup): Delete.
378 (stop_all_threads): Use scoped_restore_current_thread.
379 * inline-frame.c: Include "gdbthread.h".
380 (inline_state) <inline_state>: Take a thread pointer instead of a
381 ptid_t. All callers adjusted.
382 <ptid>: Delete, replaced by ...
383 <thread>: ... this new field.
384 (find_inline_frame_state): Take a thread pointer instead of a
385 ptid_t. All callers adjusted.
386 (skip_inline_frames, step_into_inline_frame)
387 (inline_skipped_frames, inline_skipped_symbol): Take a thread
388 pointer instead of a ptid_t. All callers adjusted.
389 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
390 (inline_skipped_frames, inline_skipped_symbol): Likewise.
391 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
393 * linux-nat.c (get_detach_signal): Likewise.
394 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
395 (thread_db_notice_clone): Adjust.
396 (thread_db_find_new_threads_silently)
397 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
398 a thread pointer instead of a ptid_t. All callers adjusted.
399 * mi/mi-cmd-var.c: Include "inferior.h".
400 (mi_cmd_var_update_iter): Update to use thread pointers.
401 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
403 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
405 (mi_output_running): ... this new function.
406 (mi_on_resume_1): Adjust to use it.
407 (mi_user_selected_context_changed): Adjust to use inferior_thread.
408 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
410 (interrupt_thread_callback): : Adjust to use thread and inferior
412 * proc-service.c: Include "gdbthread.h".
413 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
414 * progspace-and-thread.c: Include "inferior.h".
415 * progspace.c: Include "inferior.h".
416 * python/py-exitedevent.c (create_exited_event_object): Adjust to
417 hold a reference to an inferior_object.
418 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
420 * python/py-inferior.c (struct inferior_object): Give the type a
421 tag name instead of a typedef.
422 (python_on_normal_stop): No need to check if the current thread is
424 (inferior_to_inferior_object): Change return type to
425 inferior_object. All callers adjusted.
426 (find_thread_object): Delete, bits factored out to ...
427 (thread_to_thread_object): ... this new function.
428 * python/py-infthread.c (create_thread_object): Use
429 inferior_to_inferior_object.
430 (thpy_is_stopped): Use thread pointer directly.
431 (gdbpy_selected_thread): Use inferior_thread.
432 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
433 field, replaced with ...
434 <thread>: ... this new field. All users adjusted.
435 (btpy_insn_or_gap_new): Drop const.
436 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
438 * python/py-record.c: Include "gdbthread.h".
439 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
440 a ptid_t. All callers adjusted.
441 (gdbpy_current_recording): Use inferior_thread.
442 * python/py-record.h (recpy_record_object) <ptid>: Delete
443 field, replaced with ...
444 <thread>: ... this new field. All users adjusted.
445 (recpy_element_object) <ptid>: Delete
446 field, replaced with ...
447 <thread>: ... this new field. All users adjusted.
448 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
449 a ptid_t. All callers adjusted.
450 * python/py-threadevent.c: Include "gdbthread.h".
451 (get_event_thread): Use thread_to_thread_object.
452 * python/python-internal.h (struct inferior_object): Forward
454 (find_thread_object, find_inferior_object): Delete declarations.
455 (thread_to_thread_object, inferior_to_inferior_object): New
457 * record-btrace.c: Include "inferior.h".
458 (require_btrace_thread): Use inferior_thread.
459 (record_btrace_frame_sniffer)
460 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
461 (get_thread_current_frame): Use scoped_restore_current_thread and
463 (get_thread_current_frame): Use thread pointer directly.
464 (record_btrace_replay_at_breakpoint): Use thread's inferior
466 * record-full.c: Include "inferior.h".
467 * regcache.c: Include "gdbthread.h".
468 (get_thread_arch_regcache): Use the inferior's address space
470 (get_thread_regcache, registers_changed_thread): New.
471 * regcache.h (get_thread_regcache(thread_info *thread)): New
473 (registers_changed_thread): New.
474 (remote_target) <remote_detach_1>: Swap order of parameters.
475 (remote_add_thread): <remote_add_thread>: Return the new thread.
476 (get_remote_thread_info(ptid_t)): New overload.
477 (remote_target::remote_notice_new_inferior): Use thread pointers
479 (remote_target::process_initial_stop_replies): Use
480 thread_info::set_running.
481 (remote_target::remote_detach_1, remote_target::detach)
482 (extended_remote_target::detach): Adjust.
483 * stack.c (frame_show_address): Use inferior_thread.
484 * target-debug.h (target_debug_print_thread_info_pp): New.
485 * target-delegates.c: Regenerate.
486 * target.c (default_thread_address_space): Delete.
487 (memory_xfer_partial_1): Use current_inferior.
488 (target_detach): Use current_inferior.
489 (target_thread_address_space): Delete.
490 (generic_mourn_inferior): Use current_inferior.
491 * target.h (struct target_ops) <thread_address_space>: Delete.
492 (target_thread_address_space): Delete.
493 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
495 (delete_thread_1, delete_thread, delete_thread_silent): Take a
496 thread pointer instead of a ptid_t. Adjust all callers.
497 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
498 (first_thread_of_process): Delete, replaced by ...
499 (first_thread_of_inferior): ... this new function. All callers
501 (any_thread_of_process): Rename to ...
502 (any_thread_of_inferior): ... this, and take an inferior pointer.
503 (any_live_thread_of_process): Rename to ...
504 (any_live_thread_of_inferior): ... this, and take an inferior
506 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
507 (value_in_thread_stack_temporaries)
508 (get_last_thread_stack_temporary): Take a thread pointer instead
509 of a ptid_t. Adjust all callers.
510 (thread_info::set_running): New.
511 (validate_registers_access): Use inferior_thread.
512 (can_access_registers_ptid): Rename to ...
513 (can_access_registers_thread): ... this, and take a thread
515 (print_thread_info_1): Adjust to compare thread pointers instead
517 (switch_to_no_thread, switch_to_thread): Make extern.
518 (scoped_restore_current_thread::~scoped_restore_current_thread):
519 Use m_thread pointer directly.
520 (scoped_restore_current_thread::scoped_restore_current_thread):
522 (thread_command): Use thread pointer directly.
523 (thread_num_make_value_helper): Use inferior_thread.
524 * top.c (execute_command): Use inferior_thread.
525 * tui/tui-interp.c: Include "inferior.h".
526 * varobj.c (varobj_create): Use inferior_thread.
527 (value_of_root_1): Use find_thread_global_id instead of
528 global_thread_id_to_ptid.
530 2018-06-21 Alan Hayward <alan.hayward@arm.com>
532 * regcache.c (readable_regcache::read_part): Avoid memcpy when
534 (regcache::write_part): Likewise.
535 (readable_regcache::cooked_read_part): Update comment.
536 (readable_regcache::cooked_write_part): Likewise.
537 * regcache.h: (readable_regcache::read_part): Likewise.
538 (regcache::write_part): Likewise.
540 2018-06-21 Richard Bunt <richard.bunt@arm.com>
541 Dirk Schubert <dirk.schubert@arm.com>
543 * aarch64-linux-nat.c (post_attach): New.
544 (aarch64_linux_nat_target::post_attach): Override post_attach to
545 record the number of hardware debug registers.
547 2018-06-20 Tom Tromey <tom@tromey.com>
549 * python/py-param.c (add_setshow_generic): Make parameters const.
550 (parmpy_init): Update.
552 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
554 * regcache.h (regcache_cooked_read_ftype): Rename to...
555 (register_read_ftype): ...this, change type to function_view.
556 (class reg_buffer) <save>: Remove src parameter.
557 (readonly_detached_regcache) <readonly_detached_regcache>: Make
558 parameter non-const in first overload. Remove src parameter in
560 * regcache.c (do_cooked_read): Remove.
561 (readonly_detached_regcache::readonly_detached_regcache): Make
562 parameter non-const, adjust call to other constructor.
563 (reg_buffer::save): Remove src parameter.
564 * frame.c (do_frame_register_read): Remove.
565 (frame_save_as_regcache): Use lambda function.
566 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
567 parameter to ppu2spu_data *.
568 (ppu2spu_sniffer): Use lambda function.
570 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
572 * record-full.c (record_full_target::insert_breakpoint): Remove
573 "struct" keyword, add const.
575 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
577 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
578 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
579 * configure.ac: Remove AC_PREREQ, add missing quoting.
580 * gnulib/configure.ac: Modernize usage of
581 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
582 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
583 (AUTOMAKE_VERSION): Bump to 1.15.1.
584 * configure: Re-generate.
585 * config.in: Re-generate.
586 * aclocal.m4: Re-generate.
587 * gnulib/aclocal.m4: Re-generate.
588 * gnulib/config.in: Re-generate.
589 * gnulib/configure: Re-generate.
590 * gnulib/import/Makefile.in: Re-generate.
592 2018-06-19 Pedro Alves <palves@redhat.com>
594 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
595 (lookup_minimal_symbol_by_pc_section): ... here with
596 gdb_assert_not_reached added.
598 2018-06-19 Pedro Alves <palves@redhat.com>
600 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
601 parameter with a block parameter. Compare location's block symbol
602 with the frame's block instead of addresses.
603 (skip_inline_frames): Pass the current block instead of the
604 frame's address. Break out as soon as we determine the frame
605 should not be skipped.
607 2018-06-18 Tom Tromey <tom@tromey.com>
609 * solib-aix.c (solib_aix_get_section_offsets): Return
611 (solib_aix_solib_create_inferior_hook): Update.
613 2018-06-18 Tom Tromey <tom@tromey.com>
615 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
617 2018-06-18 Tom Tromey <tom@tromey.com>
619 * solib-frv.c (frv_relocate_main_executable): Use
621 * solib-dsbt.c (dsbt_relocate_main_executable): Use
624 2018-06-18 Tom Tromey <tom@tromey.com>
626 * objfiles.h (inhibit_section_map_updates): Update.
627 (resume_section_map_updates, resume_section_map_updates_cleanup):
629 * solib-svr4.c (svr4_handle_solib_event): Update.
630 * objfiles.c (inhibit_section_map_updates): Return
631 scoped_restore_tmpl<int>.
632 (resume_section_map_updates, resume_section_map_updates_cleanup):
635 2018-06-18 Tom Tromey <tom@tromey.com>
637 * valprint.h (read_string): Update.
638 * valprint.c (read_string): Change type of "buffer".
639 (val_print_string): Update.
640 * python/py-value.c (valpy_string): Update.
641 * language.h (struct language_defn) <la_get_string>: Change
643 (default_get_string, c_get_string): Update.
644 * language.c (default_get_string): Change type of "buffer".
645 * guile/scm-value.c (gdbscm_value_to_string): Update.
646 * c-lang.c (c_get_string): Change type of "buffer".
648 2018-06-18 Tom Tromey <tom@tromey.com>
650 * ser-mingw.c (struct pipe_state_destroyer): New.
651 (pipe_state_up): New typedef.
652 (cleanup_pipe_state): Remove.
653 (pipe_windows_open): Use pipe_state_up. Don't release argv.
655 2018-06-18 Tom Tromey <tom@tromey.com>
657 * rust-lang.h (rust_yyerror): Don't declare.
658 * rust-lang.c (rust_language_defn): Update.
659 * rust-exp.y (yyerror): Now static.
660 * parse.c (parse_exp_in_context_1): Update.
661 * p-lang.h (p_yyerror): Don't declare.
662 * p-lang.c (p_language_defn): Update.
663 * p-exp.y (yyerror): Now static.
664 * opencl-lang.c (opencl_language_defn): Update.
665 * objc-lang.c (objc_language_defn): Update.
666 * m2-lang.h (m2_yyerror): Don't declare.
667 * m2-lang.c (m2_language_defn): Update.
668 * m2-exp.y (yyerror): Now static.
669 * language.h (struct language_defn) <la_error>: Remove.
670 * language.c (unk_lang_error): Remove.
671 (unknown_language_defn, auto_language_defn): Remove.
672 * go-lang.h (go_yyerror): Don't declare.
673 * go-lang.c (go_language_defn): Update.
674 * go-exp.y (yyerror): Now static.
675 * f-lang.h (f_yyerror): Don't declare.
676 * f-lang.c (f_language_defn): Update.
677 * f-exp.y (yyerror): Now static.
678 * d-lang.h (d_yyerror): Don't declare.
679 * d-lang.c (d_language_defn): Update.
680 * d-exp.y (yyerror): Now static.
681 * c-lang.h (c_yyerror): Don't declare.
682 * c-lang.c (c_language_defn, cplus_language_defn)
683 (asm_language_defn, minimal_language_defn): Update.
684 * c-exp.y (yyerror): Now static.
685 * ada-lang.h (ada_yyerror): Don't declare.
686 * ada-lang.c (ada_language_defn): Update.
687 * ada-exp.y (yyerror): Now static.
689 2018-06-18 Alan Hayward <alan.hayward@arm.com>
691 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
692 (store_sveregs_to_thread): Likewise.
693 (aarch64_linux_fetch_inferior_registers): Check for SVE.
694 (aarch64_linux_store_inferior_registers): Likewise.
695 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
697 (aarch64_sve_regs_copy_to_regcache): Likewise.
698 (aarch64_sve_regs_copy_from_regcache): Likewise.
699 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
701 (aarch64_sve_regs_copy_to_regcache): Likewise.
702 (aarch64_sve_regs_copy_from_regcache): Likewise.
703 (sve_context): Structure from Linux headers.
704 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
705 (SVE_SIG_ZREG_SIZE): Likewise.
706 (SVE_SIG_PREG_SIZE): Likewise.
707 (SVE_SIG_FFR_SIZE): Likewise.
708 (SVE_SIG_REGS_OFFSET): Likewise.
709 (SVE_SIG_ZREGS_OFFSET): Likewise.
710 (SVE_SIG_ZREG_OFFSET): Likewise.
711 (SVE_SIG_ZREGS_SIZE): Likewise.
712 (SVE_SIG_PREGS_OFFSET): Likewise.
713 (SVE_SIG_PREG_OFFSET): Likewise.
714 (SVE_SIG_PREGS_SIZE): Likewise.
715 (SVE_SIG_FFR_OFFSET): Likewise.
716 (SVE_SIG_REGS_SIZE): Likewise.
717 (SVE_SIG_CONTEXT_SIZE): Likewise.
718 (SVE_PT_REGS_MASK): Likewise.
719 (SVE_PT_REGS_FPSIMD): Likewise.
720 (SVE_PT_REGS_SVE): Likewise.
721 (SVE_PT_VL_INHERIT): Likewise.
722 (SVE_PT_VL_ONEXEC): Likewise.
723 (SVE_PT_REGS_OFFSET): Likewise.
724 (SVE_PT_FPSIMD_OFFSET): Likewise.
725 (SVE_PT_FPSIMD_SIZE): Likewise.
726 (SVE_PT_SVE_ZREG_SIZE): Likewise.
727 (SVE_PT_SVE_PREG_SIZE): Likewise.
728 (SVE_PT_SVE_FFR_SIZE): Likewise.
729 (SVE_PT_SVE_FPSR_SIZE): Likewise.
730 (SVE_PT_SVE_FPCR_SIZE): Likewise.
731 (__SVE_SIG_TO_PT): Likewise.
732 (SVE_PT_SVE_OFFSET): Likewise.
733 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
734 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
735 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
736 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
737 (SVE_PT_SVE_PREG_OFFSET): Likewise.
738 (SVE_PT_SVE_PREGS_SIZE): Likewise.
739 (SVE_PT_SVE_FFR_OFFSET): Likewise.
740 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
741 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
742 (SVE_PT_SVE_SIZE): Likewise.
743 (SVE_PT_SIZE): Likewise.
744 (HAS_SVE_STATE): New define.
746 2018-06-18 Alan Hayward <alan.hayward@arm.com>
748 * nat/aarch64-sve-linux-sigcontext.h: New file.
749 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
751 (SVE_VQ_MIN): Likewise.
752 (SVE_VQ_MAX): Likewise.
753 (SVE_VL_MIN): Likewise.
754 (SVE_VL_MAX): Likewise.
755 (SVE_NUM_ZREGS): Likewise.
756 (SVE_NUM_PREGS): Likewise.
757 (sve_vl_valid): Likewise.
758 (struct user_sve_header): Likewise.
760 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
761 Richard Bunt <Richard.Bunt@arm.com>
763 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
764 was requested by GDB.
766 2018-06-15 Tom de Vries <tdevries@suse.de>
768 * MAINTAINERS (Write After Approval): Add Tom de Vries.
770 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
772 * gnulib/update-gnulib.sh: Print expected versions of
775 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
777 * arch-utils.c (default_type_align): Use type_length_units.
778 * gdbtypes.c (type_align): Use type_length_units.
780 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
782 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
785 2018-06-14 Tom de Vries <tdevries@suse.de>
788 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
789 get_no_prettyformat_print_options.
791 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
793 * sparc-nat.h: Include target.h.
794 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
795 <fetch_registers>: Remove this argument in function call.
796 <store_registers>: Remove this argument in function call, remove
798 <low_forget_process>: Call sparc64_forget_process instead of
799 sparc_forget_process.
801 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
803 * procfs.c (_initialize_procfs): Use add_inf_child_target.
804 (procfs_target::make_corefile_notes): Adjust to new
805 target_read_alloc return type.
807 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
808 Stephen Roberts <stephen.roberts@arm.com>
811 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
812 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
813 Move should_notify_stop local into more inner scope.
815 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
816 Stephen Roberts <stephen.roberts@arm.com>
819 * infrun.c (resume_1): Add call to mark_async_event_handler.
821 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
823 * infrun.c (do_target_wait): Change old version of $pc printed.
825 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
827 * dwarf2read.c (read_index_from_section): Rename to...
828 (read_gdb_index_from_section): ... this, update all callers.
829 (dwarf2_read_index): Rename to...
830 (dwarf2_read_gdb_index): ... this, update all callers.
832 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
834 * gdb/hppa-linux-nat.c
835 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
836 hppa_linux_nat_target::fetch_registers.
838 2018-06-11 Alan Hayward <alan.hayward@arm.com>
840 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
841 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
842 (AARCH64_DWARF_SVE_FFR): Likewise.
843 (AARCH64_DWARF_SVE_P0): Likewise.
844 (AARCH64_DWARF_SVE_Z0): Likewise.
846 2018-06-11 Alan Hayward <alan.hayward@arm.com>
848 * common/common-regcache.h (raw_compare): New function.
849 * regcache.c (regcache::raw_compare): Likewise.
850 * regcache.h (regcache::raw_compare): New declaration.
852 2018-06-11 Alan Hayward <alan.hayward@arm.com>
854 * common/common-regcache.h (reg_buffer_common): New structure.
855 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
856 (reg_buffer::raw_supply): Likewise.
857 (reg_buffer::raw_supply_integer): Likewise.
858 (reg_buffer::raw_supply_zeroed): Likewise.
859 (reg_buffer::raw_collect): Likewise.
860 (reg_buffer::raw_collect_integer): Likewise.
861 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
862 (reg_buffer::raw_supply): Likewise.
863 (reg_buffer::raw_supply_integer): Likewise.
864 (reg_buffer::raw_supply_zeroed): Likewise.
865 (reg_buffer::raw_collect): Likewise.
866 (reg_buffer::raw_collect_integer): Likewise.
868 2018-06-10 Tom Tromey <tom@tromey.com>
870 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
871 (class remote_state) <stop_reply_queue>: Now std::vector.
872 (remote_state::~remote_state)
873 (remote_target::stop_reply_queue_length): Update.
874 (struct queue_iter_param, remove_child_of_pending_fork)
875 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
876 (check_pending_event_prevents_wildcard_vcont_callback)
877 (remove_stop_reply_for_inferior)
878 (remove_stop_reply_of_remote_state)
879 (remote_notif_remove_once_on_match)
880 (stop_reply_match_ptid_and_ws)
881 (remote_kill_child_of_pending_fork): Remove.
882 (remote_target::remove_new_fork_children)
883 (remote_target::check_pending_events_prevent_wildcard_vcont)
884 (remote_target::discard_pending_stop_replies)
885 (remote_target::discard_pending_stop_replies_in_queue)
886 (remote_target::remote_notif_remove_queued_reply)
887 (remote_target::queued_stop_reply)
888 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
889 (remote_target::wait, remote_target::kill_new_fork_children)
890 (remote_target::async): Update.
892 2018-06-10 Tom Tromey <tom@tromey.com>
894 * record-full.c (record_full_arch_list_cleanups): Remove.
895 (record_full_message): Use try/catch.
896 (record_full_wait_cleanups): Remove.
897 (record_full_wait_1): Use try/catch.
898 (record_full_restore): Likewise.
900 2018-06-10 Tom Tromey <tom@tromey.com>
902 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
903 declare VEC. Add constructor.
904 <in_target_beneath>: Now bool.
905 (record_full_breakpoints): Now a std::vector, static.
906 (record_full_sync_record_breakpoints)
907 (record_full_init_record_breakpoints)
908 (record_full_target::insert_breakpoint)
909 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
911 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
913 * dwarf2read.c (process_cu_includes): Remove struct keyword.
914 * serial.c (serial_interface_lookup): Remove struct keyword.
916 2018-06-10 Tom Tromey <tom@tromey.com>
918 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
920 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
922 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
924 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
925 "beneath" as a method.
926 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
927 Use "beneath" as a method.
929 2018-06-10 Tom Tromey <tom@tromey.com>
931 * tracefile.c (struct trace_file_writer_deleter): New.
932 <operator()>: Rename from trace_file_writer_xfree.
933 (trace_file_writer_up): New typedef.
934 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
936 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
938 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
939 <m_registers, m_register_status>: Change type to
941 * regcache.c (reg_buffer::reg_buffer): Use new instead of
944 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
946 * common/common-regcache.h (enum register_status): Add
947 underlying type "signed char".
948 * regcache.h (reg_buffer) <m_register_status>: Change type to
950 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
951 register_status instead of signed char.
952 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
953 (reg_buffer::get_register_status): Remove cast.
954 (readable_regcache::raw_read): Remove cast.
955 (readable_regcache::cooked_read): Remove cast.
957 2018-06-09 Tom Tromey <tom@tromey.com>
959 * source.c (reverse_search_command, forward_search_command): Use
962 2018-06-09 Tom Tromey <tom@tromey.com>
964 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
965 (serial_ops_list): Now static, std::vector.
966 (serial_interface_lookup, serial_add_interface): Update.
968 2018-06-09 Tom Tromey <tom@tromey.com>
970 * dwarf2read.c (process_cu_includes): Update.
971 (process_full_comp_unit): Update.
972 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
975 2018-06-08 Paul Koning <paul_koning@dell.com>
979 * python/python.c (do_start_initialization):
980 Avoid call to internal Python API.
981 (init__gdb_module): New function.
983 2018-06-08 Gary Benson <gbenson@redhat.com>
985 * linux-thread-db.c (valprint.h): New include.
986 (struct check_thread_db_info): New structure.
987 (check_thread_db_on_load, tdb_testinfo): New static globals.
988 (check_thread_db, check_thread_db_callback): New functions.
989 (try_thread_db_load_1): Run integrity checks if requested.
990 (maintenance_check_libthread_db): New function.
991 (_initialize_thread_db): Register "maint check libthread-db"
992 and "maint set/show check-libthread-db".
993 * NEWS: Mention the above new commands.
995 2018-06-08 Tom Tromey <tom@tromey.com>
997 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1000 2018-06-08 Tom Tromey <tom@tromey.com>
1002 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1004 2018-06-08 Tom Tromey <tom@tromey.com>
1006 * common/btrace-common.h (struct btrace_data): Add constructor,
1007 destructor, move assignment operator.
1008 <empty, clear, fini>: New methods.
1009 <format>: Initialize.
1010 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1011 (btrace_data_empty): Don't declare.
1012 * common/btrace-common.c (btrace_data_init): Remove.
1013 (btrace_data::fini): Rename from btrace_data_fini.
1014 (btrace_data::empty): Rename from btrace_data_empty.
1015 (btrace_data::clear): Rename from btrace_data_clear. Return
1017 * btrace.h (make_cleanup_btrace_data): Don't declare.
1018 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1019 (parse_xml_btrace): Update.
1020 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1021 (maint_btrace_clear_packet_history_cmd): Update.
1023 2018-06-07 Pedro Alves <palves@redhat.com>
1025 * target.h (target_ops) <beneath>: Now a method. All references
1027 (class target_stack): New.
1028 * target.c (g_target_stack): New.
1029 (g_current_top_target): Delete.
1030 (current_top_target): Get the top target out of g_target_stack.
1031 (target_stack::push, target_stack::unpush): New.
1032 (push_target, unpush_target): Reimplement.
1033 (target_is_pushed): Reimplement in terms of g_target_stack.
1034 (target_ops::beneath, target_stack::find_beneath): New.
1036 2018-06-07 Pedro Alves <palves@redhat.com>
1038 * target.h (find_target_beneath): Delete declaration.
1039 * target.c (find_target_beneath): Delete definition.
1040 * aix-thread.c: All callers of find_target_beneath adjusted to
1041 call target_ops::beneath instead.
1042 * bsd-uthread.c: Likewise.
1043 * linux-thread-db.c: Likewise.
1044 * ravenscar-thread.c: Likewise.
1045 * sol-thread.c: Likewise.
1046 * spu-multiarch.c: Likewise.
1048 2018-06-07 Pedro Alves <palves@redhat.com>
1050 * target.h (target_ops) <beneath>: Now a method. All references
1052 (target_ops) <m_beneath>: New.
1053 * target.c (target_ops::beneath): New.
1054 * corelow.c: Adjust all references to target_ops::beneath.
1055 * linux-thread-db.c: Likewise.
1056 * make-target-delegates: Likewise.
1057 * record-btrace.c: Likewise.
1058 * record-full.c: Likewise.
1059 * remote.c: Likewise.
1060 * target.c: Likewise.
1061 * target-delegates.c: Regenerate.
1063 2018-06-07 Pedro Alves <palves@redhat.com>
1065 * target.h (target_stack): Delete.
1066 (current_top_target): Declare function.
1067 * target.c (target_stack): Delete.
1068 (g_current_top_target): New.
1069 (current_top_target): New function.
1070 * auxv.c: Use current_top_target instead of target_stack
1072 * avr-tdep.c: Likewise.
1073 * breakpoint.c: Likewise.
1074 * corefile.c: Likewise.
1075 * elfread.c: Likewise.
1077 * exceptions.c: Likewise.
1078 * frame.c: Likewise.
1079 * gdbarch-selftests.c: Likewise.
1080 * gnu-v3-abi.c: Likewise.
1081 * ia64-tdep.c: Likewise.
1082 * ia64-vms-tdep.c: Likewise.
1083 * infcall.c: Likewise.
1084 * infcmd.c: Likewise.
1085 * infrun.c: Likewise.
1086 * linespec.c: Likewise.
1087 * linux-tdep.c: Likewise.
1088 * minsyms.c: Likewise.
1089 * ppc-linux-nat.c: Likewise.
1090 * ppc-linux-tdep.c: Likewise.
1091 * procfs.c: Likewise.
1092 * regcache.c: Likewise.
1093 * remote.c: Likewise.
1094 * rs6000-tdep.c: Likewise.
1095 * s390-linux-nat.c: Likewise.
1096 * s390-tdep.c: Likewise.
1097 * solib-aix.c: Likewise.
1098 * solib-darwin.c: Likewise.
1099 * solib-dsbt.c: Likewise.
1100 * solib-spu.c: Likewise.
1101 * solib-svr4.c: Likewise.
1102 * solib-target.c: Likewise.
1103 * sparc-tdep.c: Likewise.
1104 * sparc64-tdep.c: Likewise.
1105 * spu-tdep.c: Likewise.
1106 * symfile.c: Likewise.
1107 * symtab.c: Likewise.
1108 * target-descriptions.c: Likewise.
1109 * target-memory.c: Likewise.
1110 * target.c: Likewise.
1111 * target.h: Likewise.
1112 * tracefile-tfile.c: Likewise.
1113 * tracepoint.c: Likewise.
1114 * valops.c: Likewise.
1115 * valprint.c: Likewise.
1116 * value.c: Likewise.
1117 * windows-tdep.c: Likewise.
1118 * mi/mi-main.c: Likewise.
1120 2018-06-07 Tom Tromey <tom@tromey.com>
1122 * valprint.h (build_address_symbolic): Declare.
1123 * printcmd.c (print_address_symbolic): Update.
1124 (build_address_symbolic): Change "name" and "filename" to
1126 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1128 * defs.h (build_address_symbolic): Remove declaration.
1130 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1132 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1133 (aarch64_vnv_type): Add function.
1134 (aarch64_pseudo_register_name): Add V regs for SVE.
1135 (aarch64_pseudo_register_type): Likewise.
1136 (aarch64_pseudo_register_reggroup_p): Likewise.
1137 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1138 (aarch64_pseudo_read_value): Add V regs for SVE.
1139 (aarch64_pseudo_write_2): Use V0 offset for SVE
1140 (aarch64_pseudo_write): Add V regs for SVE.
1141 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1143 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1145 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1146 (sve_vl_from_vq): Likewise.
1148 2018-06-05 Tom Tromey <tom@tromey.com>
1150 * cli/cli-cmds.c (show_version): Update.
1151 * top.c (print_gdb_version): Add "interactive" parameter.
1153 * main.c (captured_main_1): Update.
1154 * top.h (print_gdb_version): Add "interactive" parameter and a
1157 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1159 * common/enum-flags.h: Add trailing semicolon to example in
1162 2018-06-05 Tom Tromey <tom@tromey.com>
1165 * NEWS: Add entry about pager.
1166 * utils.c (pagination_disabled_for_command): New global.
1167 (prompt_for_continue): Allow "c" response to prompt.
1168 (reinitialize_more_filter): Clear
1169 pagination_disabled_for_command.
1170 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1172 2018-06-04 Tom Tromey <tom@tromey.com>
1174 * ada-lang.h (ada_lookup_symbol_list): Update.
1175 * ada-lang.c (resolve_subexp): Update.
1176 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1178 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1179 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1180 results parameter to std::vector.
1181 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1183 * ada-exp.y (block_lookup): Update.
1184 (select_possible_type_sym): Change type of syms. Remove nsyms
1186 (write_var_or_type, write_name_assoc): Update.
1188 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1190 * windows-nat.c (windows_nat_target::xfer_partial): Return
1191 TARGET_XFER_E_IO if we need to delegate to the target beneath
1192 but BENEATH is NULL.
1194 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1196 * Makefile.in (config.status): Add configure.nat as a
1199 2018-06-04 Tom Tromey <tom@tromey.com>
1201 * cp-name-parser.y (cpname_state): Add method declarations.
1202 (HANDLE_QUAL): Update.
1203 (cpname_state::d_grab, cpname_state::fill_comp)
1204 (cpname_state::make_operator, cpname_state::make_dtor)
1205 (cpname_state::make_builtin_type, cpname_state::make_name)
1206 (cpname_state::d_qualify, cpname_state::d_int_type)
1207 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1208 (%union): Move earlier.
1210 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1212 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1214 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1216 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1217 (aarch64_pseudo_write_1): Likewise.
1218 (aarch64_pseudo_read_value): Use helper.
1219 (aarch64_pseudo_write): Likewise.
1221 2018-06-04 Pedro Alves <palves@redhat.com>
1223 * darwin-nat.c (darwin_ops): Delete.
1224 (darwin_attach_pid): Use get_native_target.
1226 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1228 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1229 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1231 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1233 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1234 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1235 (aarch64_gdbarch_init): Check for SVE.
1236 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1238 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1240 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1241 * aarch64-tdep.h (aarch64_read_description): Likewise.
1242 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1243 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1244 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1245 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1246 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1248 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1250 * value.c (value_fetch_lazy_bitfield): New.
1251 (value_fetch_lazy_memory): New.
1252 (value_fetch_lazy_register): New.
1253 (value_fetch_lazy): Factor out to smaller functions.
1255 2018-06-01 Tom Tromey <tom@tromey.com>
1257 * cp-name-parser.y (backslashable, represented): Now const.
1259 2018-06-01 Tom Tromey <tom@tromey.com>
1261 * cp-name-parser.y: Include parser-defs.h.
1262 (parser_fprintf): Remove declaration.
1264 2018-06-01 Tom Tromey <tom@tromey.com>
1266 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1268 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1269 (global_result): Remove globals.
1270 (struct cpname_state): New.
1271 (yyparse): Don't declare.
1272 (yylex, yyerror): Move declarations after %union.
1273 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1274 (make_name): Add state parameter.
1276 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1278 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1280 (yylex): Add lvalp, state parameters.
1281 (yyerror): Add state parameter.
1282 (cp_demangled_name_to_comp): Update.
1284 2018-06-01 Tom Tromey <tom@tromey.com>
1286 * cp-name-parser.y (parser_fprintf): Declare.
1287 (GDB_YY_REMAP_PREFIX): Define.
1288 Include yy-remap.h. Don't redefine yy* identifiers.
1290 2018-06-01 Tom Tromey <tom@tromey.com>
1292 * python/py-type.c (typy_legacy_template_argument): Update.
1293 * cp-support.h (cp_demangled_name_to_comp): Update.
1294 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1295 parameter to be a "std::string *".
1298 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1300 * ada-lex.l: Include "diagnostics.h" instead of
1301 "common/diagnostics.h".
1302 * unittests/environ-selftests.c: Likewise.
1303 * common/diagnostics.h: Moved to ../include.
1305 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1307 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1308 to language_mode_manual while calling breakpoint_re_set_one.
1310 2018-06-01 Tom Tromey <tom@tromey.com>
1312 * valops.c (value_cast_structs, destructor_name_p): Update.
1313 * symtab.c (gdb_mangle_name): Update.
1314 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1316 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1317 (pascal_object_print_value_fields, pascal_object_print_value):
1319 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1320 * linespec.c (find_methods): Update.
1321 * gdbtypes.h (type_name_no_tag): Remove.
1322 (type_name_or_error): Rename from type_name_no_tag_or_error.
1323 * gdbtypes.c (type_name_no_tag): Remove.
1324 (type_name_or_error): Rename from type_name_no_tag_or_error.
1325 (lookup_struct_elt_type, check_typedef): Update.
1326 * expprint.c (print_subexp_standard): Update.
1327 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1328 * d-namespace.c (d_lookup_nested_symbol): Update.
1329 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1330 (cp_print_class_member): Update.
1331 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1332 * completer.c (add_struct_fields): Update.
1333 * c-typeprint.c (cp_type_print_derivation_info)
1334 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1336 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1337 (ada_prefer_type, ada_is_exception_sym): Update.
1339 2018-06-01 Tom Tromey <tom@tromey.com>
1341 * valops.c (enum_constant_from_type, value_namespace_elt)
1342 (value_maybe_namespace_elt): Update.
1343 * valarith.c (find_size_for_pointer_math): Update.
1344 * target-descriptions.c (make_gdb_type): Update.
1345 * symmisc.c (print_symbol): Update.
1346 * stabsread.c (define_symbol, read_type)
1347 (complain_about_struct_wipeout, add_undefined_type)
1348 (cleanup_undefined_types_1): Update.
1349 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1350 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1351 (rust_internal_print_type, rust_composite_type)
1352 (rust_evaluate_funcall, rust_evaluate_subexp)
1353 (rust_inclusive_range_type_p): Update.
1354 * python/py-type.c (typy_get_tag): Update.
1355 * p-typeprint.c (pascal_type_print_base): Update.
1356 * mdebugread.c (parse_symbol, parse_type): Update.
1357 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1359 * guile/scm-type.c (gdbscm_type_tag): Update.
1360 * go-lang.c (sixg_string_p): Update.
1361 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1363 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1364 (TYPE_TAG_NAME): Remove.
1365 * gdbtypes.c (type_name_no_tag): Simplify.
1366 (check_typedef, check_types_equal, recursive_dump_type)
1367 (copy_type_recursive, arch_composite_type): Update.
1368 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1369 in summary mode when needed.
1370 * eval.c (evaluate_funcall): Update.
1371 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1372 (process_structure_scope, read_enumeration_type)
1373 (read_namespace_type, read_module_type, determine_prefix): Update.
1374 * cp-support.c (inspect_type): Update.
1375 * coffread.c (process_coff_symbol, decode_base_type): Update.
1376 * c-varobj.c (c_is_path_expr_parent): Update.
1377 * c-typeprint.c (c_type_print_base_struct_union): Update.
1378 (c_type_print_base_1): Update. Print struct/class/union/enum in
1379 summary when using C language.
1380 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1381 (gen_maybe_namespace_elt): Update.
1382 * ada-lang.c (ada_type_name): Simplify.
1383 (empty_record, ada_template_to_fixed_record_type_1)
1384 (template_to_static_fixed_type)
1385 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1387 2018-06-01 Tom Tromey <tom@tromey.com>
1389 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1391 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1392 (c_print_type): Update.
1393 (c_print_type): New overload.
1394 (c_type_print_varspec_prefix, c_type_print_args)
1395 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1396 (c_type_print_base_struct_union, c_type_print_base_1)
1397 (cp_type_print_method_args): Add "language" parameter.
1398 (c_type_print_base): Update.
1399 * c-lang.h (c_print_type): Add new overload.
1401 2018-06-01 Tom Tromey <tom@tromey.com>
1403 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1404 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1406 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1408 * aarch64-tdep.c (aarch64_sve_register_names): New const
1410 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1411 (AARCH64_SVE_Z_REGS_NUM): New define.
1412 (AARCH64_SVE_P_REGS_NUM): Likewise.
1413 (AARCH64_SVE_NUM_REGS): Likewise.
1415 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1417 * nat/linux-ptrace.h [__alpha__]
1418 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1421 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1423 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1424 the endianness selected.
1425 * NEWS: Document `set endian auto' mode operation update.
1427 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1429 * Makefile.in: Add new header.
1430 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1431 (sve_vl_from_vg): Likewise.
1432 (sve_vq_from_vl): Likewise.
1433 (sve_vl_from_vq): Likewise.
1434 (sve_vq_from_vg): Likewise.
1435 (sve_vg_from_vq): Likewise.
1436 * configure.nat: Add new c file.
1437 * nat/aarch64-sve-linux-ptrace.c: New file.
1438 * nat/aarch64-sve-linux-ptrace.h: New file.
1440 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1442 * aarch64-linux-nat.c (aarch64_linux_read_description):
1444 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1446 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1447 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1448 (aarch64_gdbarch_init): Add parmeter zero.
1449 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1450 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1451 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1453 * doc/gdb.texinfo: Describe SVE feature
1454 * features/aarch64-sve.c: New file.
1456 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1459 * gdbarch.sh (significant_addr_bit): Default to zero when
1460 not set by target architecture.
1461 * gdbarch.c: Re-generated.
1462 * utils.c (address_significant): Update.
1464 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1466 * stack.c (func_command): Remove trailing newline in call to error.
1468 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1470 * regcache.h (regcache_raw_collect): Remove, update callers to
1471 use regcache::raw_collect.
1472 * regcache.c (regcache_raw_collect): Remove.
1474 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1476 * regcache.h (regcache_raw_supply): Remove, update callers to
1477 use detached_regcache::raw_supply.
1478 * regcache.c (regcache_raw_supply): Remove.
1480 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1482 * regcache.h (regcache_cooked_write_part): Remove, update
1483 callers to use regcache::cooked_write_part.
1484 * regcache.c (regcache_cooked_write_part): Remove.
1486 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1488 * regcache.h (regcache_cooked_read_part): Remove, update callers
1489 to use readable_regcache::cooked_read_part.
1490 * regcache.c (regcache_cooked_read_part): Remove.
1492 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1494 * regcache.h (regcache_cooked_read_value): Remove, update
1495 callers to use readable_regcache::cooked_read_value.
1496 * regcache.c (regcache_cooked_read_value): Remove.
1498 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1500 * regcache.h (regcache_cooked_write): Remove, update callers to
1501 use regcache::cooked_write.
1502 * regcache.c (regcache_cooked_write): Remove.
1504 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1506 * regcache.h (regcache_invalidate): Remove, update callers to
1507 use detached_regcache::invalidate instead.
1508 * regcache.c (regcache_invalidate): Remove.
1510 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1512 * regcache.h (regcache_raw_write_part): Remove, update callers
1513 to use regcache::raw_write_part instead.
1514 * regcache.c (regcache_raw_write_part): Remove.
1516 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1518 * regcache.h (regcache_raw_read_part): Remove, update callers to
1519 use readable_regcache::raw_read_part instead.
1520 * regcache.c (regcache_raw_read_part): Remove.
1522 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1524 * regcache.h (regcache_cooked_read): Remove, update callers to
1525 use readable_regcache::cooked_read instead.
1526 * regcache.c (regcache_cooked_read): Remove.
1528 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1530 * regcache.h (regcache_raw_write): Remove, update callers to use
1531 regcache::raw_write instead.
1532 * regcache.c (regcache_raw_write): Remove.
1534 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1536 * regcache.h (regcache_raw_read): Remove, update callers to use
1537 readable_regcache::raw_read instead.
1538 * regcache.c (regcache_raw_read): Remove.
1540 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1542 * regcache.h (regcache_raw_update): Remove, update callers to
1543 use readable_regcache::raw_update instead.
1544 * regcache.c (regcache_raw_update): Remove.
1546 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1548 * regcache.h (regcache_register_status): Remove, update callers
1549 to use reg_buffer::get_register_status directly instead.
1550 * regcache.c (regcache_register_status): Remove.
1552 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1554 * regcache.h (regcache_get_ptid): Remove, update all callers to
1555 call regcache::ptid instead.
1556 * regcache.c (regcache_get_ptid): Remove.
1558 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1560 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1562 2018-05-30 Pedro Alves <palves@redhat.com>
1564 * common/common-exceptions.h (exception_rethrow): Use
1567 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1569 * breakpoint.c (print_solib_event, check_status_catch_solib):
1570 Remove struct keyword in range-based for loops.
1571 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1572 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1574 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1576 * symfile.c (addr_info_make_relative): Likewise.
1577 * thread.c (value_in_thread_stack_temporaries): Likewise.
1579 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1582 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1583 aggregate type to get its real type before accessing it.
1585 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1587 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1588 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1589 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1590 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1591 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1592 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1593 * printcmd.c (info_address_command): Likewise.
1595 2018-05-29 Tom Tromey <tom@tromey.com>
1597 * windows-nat.c (handle_exception): Update fall-through comment.
1599 2018-05-29 Tom Tromey <tom@tromey.com>
1601 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1602 (struct program_space) <added_solibs>: Now a std::vector.
1603 * breakpoint.c (print_solib_event): Update.
1604 (check_status_catch_solib): Update.
1605 * progspace.c (clear_program_space_solib_cache): Update.
1606 * solib.c (update_solib_list): Update.
1608 2018-05-29 Tom Tromey <tom@tromey.com>
1610 * python/py-type.c (typy_richcompare): Update.
1611 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1612 * gdbtypes.h (types_deeply_equal): Return bool.
1613 (types_equal): Likewise.
1614 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1616 (check_types_equal): Change worklist to std::vector. Return
1618 (struct type_equality_entry): Add constructor.
1619 (compare_maybe_null_strings): Return bool.
1620 (check_types_worklist): Return bool. Change worklist to
1622 (types_deeply_equal): Use std::vector.
1623 (types_equal): Return bool.
1624 (compare_maybe_null_strings): Simplify.
1626 2018-05-29 Tom Tromey <tom@tromey.com>
1628 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1630 2018-05-29 Tom Tromey <tom@tromey.com>
1632 * objc-lang.h: Don't include cp-support.h.
1633 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1636 2018-05-27 Tom Tromey <tom@tromey.com>
1638 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1640 2018-05-25 Tom Tromey <tom@tromey.com>
1642 * value.c (value::location): Initialize.
1644 2018-05-25 Tom Tromey <tom@tromey.com>
1646 * dbxread.c (init_bincl_list): Remove.
1647 (bincl_list): Now a std::vector.
1648 (bincls_allocated, next_bincl): Remove.
1649 (free_bincl_list, do_free_bincl_list_cleanup)
1650 (make_cleanup_free_bincl_list): Remove.
1651 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1653 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1654 (struct header_file_location): Add constructor.
1655 (add_bincl_to_list): Remove.
1657 2018-05-25 Tom Tromey <tom@tromey.com>
1659 * tui/tui.c (tui_enable): Update.
1660 * mi/mi-interp.c (mi_interp::init): Update.
1661 * interps.h (class interp) <name>: New method.
1662 <m_name>: Rename from name.
1663 (~scoped_restore_interp): Update.
1664 * interps.c (interp::interp): Update.
1665 (interp_add, interp_set, interp_lookup_existing)
1666 (current_interp_named_p): Update.
1668 2018-05-25 Tom Tromey <tom@tromey.com>
1670 * interps.c (interp_name): Remove.
1671 * mi/mi-interp.c (mi_interp::init): Update.
1672 * interps.h (interp_name): Remove.
1673 (~scoped_restore_interp): Update.
1674 * tui/tui.c (tui_enable): Update.
1676 2018-05-25 Tom Tromey <tom@tromey.com>
1678 * utils.c (fputs_maybe_filtered): Update.
1679 * linespec.c (decode_line_full): Update.
1680 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1681 (mi_print_breakpoint_for_event, mi_solib_loaded)
1682 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1683 (mi_user_selected_context_changed): Update.
1684 * mi/mi-main.c (mi_execute_command): Update.
1685 * cli/cli-script.c (execute_control_command): Update.
1686 * python/python.c (execute_gdb_command): Update.
1687 * solib.c (info_sharedlibrary_command): Update.
1688 * interps.c (interp_ui_out): Remove.
1689 * interps.h (interp_ui_out): Remove.
1691 2018-05-25 Tom Tromey <tom@tromey.com>
1693 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1694 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1695 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1697 2018-05-25 Tom Tromey <tom@tromey.com>
1699 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1700 * interps.c (interp_exec): Use scoped_restore.
1702 2018-05-25 Tom Tromey <tom@tromey.com>
1704 * remote.c (remote_target::remote_file_get): Use
1706 (remote_target::remote_file_put): Likewise.
1708 2018-05-25 Tom Tromey <tom@tromey.com>
1710 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1712 (get_pe_section_index, add_pe_exported_sym): Update.
1713 (read_pe_exported_syms): Use gdb::def_vector.
1715 2018-05-25 Tom Tromey <tom@tromey.com>
1717 * frame.c (remove_prev_frame): Remove.
1718 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1720 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1722 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1724 * mips-linux-nat.c (supply_fpregset): Always call
1725 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1726 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1727 `mips_fill_fpregset'.
1728 * mips-linux-tdep.c (mips_supply_fpregset)
1729 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1730 (mips_fill_fpregset_wrapper): Remove functions.
1731 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1732 (mips_linux_fpregset): Remove variable.
1733 (mips_linux_iterate_over_regset_sections): Use
1734 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1735 (mips_linux_o32_sigframe_init): Remove comment.
1737 2018-05-25 Pedro Alves <palves@redhat.com>
1739 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1740 (struct readahead_cache, struct packet_reg, struct
1741 remote_arch_state, class remote_state): Move higher up in the
1743 (remote_target::m_remote_state): Now an object instead of a pointer.
1744 (remote_target::get_remote_state): Adjust.
1746 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1748 * stack.c (select_and_print_frame): Delete.
1749 (struct function_bounds): Move struct within function.
1750 (func_command): Most content moved into new function
1751 find_frame_for_function, use new function, print result, add
1753 (find_frame_for_function): New function, now returns a result.
1755 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1757 * stack.c (iterate_over_block_arg_vars): Fix comment.
1758 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1760 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1764 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1766 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1768 * frame.h (class scoped_restore_selected_frame): New class.
1769 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1770 of any exception, use scoped_restore_selected_frame to restore the
1773 2018-05-24 Pedro Alves <palves@redhat.com>
1775 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1778 2018-05-23 Tom Tromey <tom@tromey.com>
1780 * complaints.c (struct complaints): Remove.
1781 (symfile_complaint_book): Remove.
1782 (series): New global.
1783 (complaint_internal): Update.
1784 (clear_complaints): Update.
1786 2018-05-23 Tom Tromey <tom@tromey.com>
1788 * complaints.c (counters): New global.
1789 (struct complain): Remove.
1790 (struct complaints) <root>: Remove.
1791 (complaint_sentinel): Remove.
1792 (symfile_complaint_book): Update.
1793 (find_complaint) Remove.
1794 (complaint_internal, clear_complaints): Update.
1796 2018-05-23 Tom Tromey <tom@tromey.com>
1798 * complaints.c (struct complain) <file, line>: Remove.
1799 (find_complaint): Remove file, line parameters.
1800 (complaint_internal): Update.
1802 2018-05-23 Tom Tromey <tom@tromey.com>
1804 * complaints.c (vcomplaint): Remove.
1805 (complaint_internal) Merge in contents of vcomplaint.
1807 2018-05-23 Tom Tromey <tom@tromey.com>
1809 * complaints.c (struct complaints) <explanation>: Remove.
1810 (symfile_explanations): Remove.
1811 (symfile_complaint_book): Update.
1812 (vcomplaint): Update.
1813 (struct explanation): Remove.
1815 2018-05-23 Tom Tromey <tom@tromey.com>
1817 * complaints.c (symfile_complaints): Remove.
1818 (complaint_internal): Remove "complaints" parameter.
1819 (clear_complaints, vcomplaint): Remove "c" parameter.
1820 (get_complaints): Remove.
1821 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1822 (dwarf2_debug_line_missing_file_complaint)
1823 (dwarf2_debug_line_missing_end_sequence_complaint)
1824 (dwarf2_complex_location_expr_complaint)
1825 (dwarf2_const_value_length_mismatch_complaint)
1826 (dwarf2_section_buffer_overflow_complaint)
1827 (dwarf2_macro_malformed_definition_complaint)
1828 (dwarf2_invalid_attrib_class_complaint)
1829 (create_addrmap_from_index, dw2_symtab_iter_next)
1830 (dw2_expand_marked_cus)
1831 (dw2_debug_names_iterator::find_vec_in_debug_names)
1832 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1833 (create_debug_type_hash_table, init_cutu_and_read_dies)
1834 (partial_die_parent_scope, add_partial_enumeration)
1835 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1836 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1837 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1838 (create_cus_hash_table, create_dwp_hash_table)
1839 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1840 (dwarf2_rnglists_process, dwarf2_ranges_process)
1841 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1842 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1843 (handle_struct_member_die, process_structure_scope)
1844 (read_array_type, read_common_block, read_module_type)
1845 (read_tag_pointer_type, read_typedef, read_base_type)
1846 (read_subrange_type, load_partial_dies, partial_die_info::read)
1847 (partial_die_info::read, partial_die_info::read)
1848 (partial_die_info::read, read_checked_initial_length_and_offset)
1849 (dwarf2_string_attr, read_formatted_entries)
1850 (dwarf_decode_line_header)
1851 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1852 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1853 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1854 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1855 (get_signatured_type, get_DW_AT_signature_type)
1856 (decode_locdesc, file_file_name, consume_improper_spaces)
1857 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1858 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1859 (dwarf2_symbol_mark_computed, set_die_type)
1860 (read_attribute_value): Update.
1861 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1863 * dbxread.c (unknown_symtype_complaint)
1864 (lbrac_mismatch_complaint, repeated_header_complaint)
1865 (set_namestring, function_outside_compilation_unit_complaint)
1866 (read_dbx_symtab, process_one_symbol): Update.
1867 * gdbtypes.c (stub_noname_complaint): Update.
1868 * windows-nat.c (handle_unload_dll): Update.
1869 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1870 (decode_base_type): Update.
1871 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1872 (eb_complaint, record_include_begin, record_include_end)
1873 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1874 (process_xcoff_symbol, read_symbol)
1875 (function_outside_compilation_unit_complaint)
1876 (scan_xcoff_symtab): Update.
1877 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1878 * buildsym.c (finish_block_internal, make_blockvector)
1879 (end_symtab_get_static_block, augment_type_symtab): Update.
1880 * dtrace-probe.c (dtrace_process_dof)
1881 (dtrace_static_probe_ops::get_probes): Update.
1882 * complaints.h (struct complaint): Don't declare.
1883 (symfile_complaints): Remove.
1884 (complaint_internal): Remove "complaints" parameter.
1885 (complaint): Likewise.
1886 (clear_complaints): Likewise.
1887 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1888 (reread_symbols): Update.
1889 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1890 (dwarf2_frame_cache, decode_frame_entry): Update.
1891 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1892 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1893 (info_selectors_command): Update.
1894 * macrotab.c (macro_include, check_for_redefinition)
1895 (macro_undef): Update.
1896 * objfiles.c (filter_overlapping_sections): Update.
1897 * stabsread.c (invalid_cpp_abbrev_complaint)
1898 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1899 (define_symbol, error_type, read_type, rs6000_builtin_type)
1900 (stabs_method_name_from_physname, read_member_functions)
1901 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1902 (attach_fields_to_type, complain_about_struct_wipeout)
1903 (read_range_type, read_args, common_block_start)
1904 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1906 * mdebugread.c (index_complaint, unknown_ext_complaint)
1907 (basic_type_complaint, bad_tag_guess_complaint)
1908 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1909 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1910 (parse_procedure, parse_lines)
1911 (function_outside_compilation_unit_complaint)
1912 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1913 (bad_tag_guess_complaint, reg_value_complaint): Update.
1914 * cp-support.c (demangled_name_complaint): Update.
1915 * macroscope.c (sal_macro_scope): Update.
1916 * dwarf-index-write.c (class debug_names): Update.
1918 2018-05-23 Tom Tromey <tom@tromey.com>
1920 * complaints.c (clear_complaints): Remove "noisy" parameter.
1921 * complaints.h (clear_complaints): Update.
1922 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1923 (reread_symbols): Update.
1925 2018-05-23 Tom Tromey <tom@tromey.com>
1927 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1929 (vcomplaint, clear_complaints): Update.
1930 (symfile_explanations): Remove some messages.
1932 2018-05-23 Tom Tromey <tom@tromey.com>
1934 * complaints.c (internal_complaint): Remove.
1935 * complaints.h (internal_complaint): Remove.
1937 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1939 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1941 2018-05-22 Pedro Alves <palves@redhat.com>
1943 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1944 (remote_fileio_badfd, remote_fileio_return_errno)
1945 (remote_fileio_return_success, remote_fileio_func_open)
1946 (remote_fileio_func_open, remote_fileio_func_close)
1947 (remote_fileio_func_read, remote_fileio_func_write)
1948 (remote_fileio_func_lseek, remote_fileio_func_rename)
1949 (remote_fileio_func_unlink, remote_fileio_func_stat)
1950 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1951 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1952 remote_target parameter.
1953 (remote_fio_func_map) <func>: Add remote_target parameter.
1954 (do_remote_fileio_request, remote_fileio_request):
1955 * remote-fileio.h (remote_fileio_request):
1956 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1957 remote_target parameter.
1958 (remote_notif_process, handle_notification): Adjust to pass down
1960 (remote_notif_state_allocate): Add remote_target parameter. Save
1962 * remote-notif.h (struct remote_target): Forward declare.
1963 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1964 remote_target parameter.
1965 (struct remote_notif_state) <remote>: New field.
1966 (remote_notif_ack, remote_notif_parse): Add remote_target
1968 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1969 remote_target parameter.
1970 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1971 (threads_listing_context, rmt_thread_action, protocol_feature)
1972 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1973 (packet_result, struct threads_listing_context, remote_state):
1974 Move definitions and declarations higher up.
1975 (remote_target) <~remote_target>: Declare.
1976 (remote_download_command_source, remote_file_put, remote_file_get)
1977 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1978 (remote_hostio_pread_vFile, remote_hostio_send_command)
1979 (remote_hostio_set_filesystem, remote_hostio_open)
1980 (remote_hostio_close, remote_hostio_unlink, remote_state)
1981 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1982 (get_memory_write_packet_size, get_memory_read_packet_size)
1983 (append_pending_thread_resumptions, remote_detach_1)
1984 (append_resumption, remote_resume_with_vcont)
1985 (add_current_inferior_and_thread, wait_ns, wait_as)
1986 (process_stop_reply, remote_notice_new_inferior)
1987 (process_initial_stop_replies, remote_add_thread)
1988 (btrace_sync_conf, remote_btrace_maybe_reopen)
1989 (remove_new_fork_children, kill_new_fork_children)
1990 (discard_pending_stop_replies, stop_reply_queue_length)
1991 (check_pending_events_prevent_wildcard_vcont)
1992 (discard_pending_stop_replies_in_queue, stop_reply)
1993 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1994 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1995 (remote_interrupt_as, remote_interrupt_ns)
1996 (remote_get_noisy_reply, remote_query_attached)
1997 (remote_add_inferior, remote_current_thread, get_current_thread)
1998 (set_thread, set_general_thread, set_continue_thread)
1999 (set_general_process, write_ptid)
2000 (remote_unpack_thread_info_response, remote_get_threadinfo)
2001 (parse_threadlist_response, remote_get_threadlist)
2002 (remote_threadlist_iterator, remote_get_threads_with_ql)
2003 (remote_get_threads_with_qxfer)
2004 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2005 (get_offsets, remote_check_symbols, remote_supported_packet)
2006 (remote_query_supported, remote_packet_size)
2007 (remote_serial_quit_handler, remote_detach_pid)
2008 (remote_vcont_probe, remote_resume_with_hc)
2009 (send_interrupt_sequence, interrupt_query)
2010 (remote_notif_get_pending_events, fetch_register_using_p)
2011 (send_g_packet, process_g_packet, fetch_registers_using_g)
2012 (store_register_using_P, store_registers_using_G)
2013 (set_remote_traceframe, check_binary_download)
2014 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2015 (remote_xfer_live_readonly_partial, remote_read_bytes)
2016 (remote_send_printf, remote_flash_write, readchar)
2017 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2018 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2019 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2020 (extended_remote_disable_randomization, extended_remote_run)
2021 (send_environment_packet, extended_remote_environment_support)
2022 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2023 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2024 (packet_command): Now methods of ...
2025 (remote_target): ... this class.
2026 (m_remote_state) <remote_target>: New field.
2027 (struct remote_state) <stop_reply_queue,
2028 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2030 (remote_state::remote_state): Allocate stop_reply_queue.
2031 (remote_state): Delete global.
2032 (get_remote_state_raw): Delete.
2033 (remote_target::get_remote_state): Allocate m_remote_state on
2035 (get_current_remote_target): New.
2036 (remote_ops, extended_remote_ops): Delete.
2037 (wait_forever_enabled_p, remote_async_inferior_event_token):
2038 Delete, moved to struct remote_state.
2039 (remote_target::close): Delete self. Destruction bits split to
2041 (remote_target::~remote_target): ... this.
2042 (show_memory_packet_size): Adjust to use
2043 get_current_remote_target.
2044 (struct protocol_feature) <func>: Add remote_target parameter.
2045 All callers adjusted.
2046 (curr_quit_handler_target): New.
2047 (remote_serial_quit_handler): Reimplement.
2048 (remote_target::open_1): Adjust to use get_current_remote_target.
2049 Heap-allocate remote_target/extended_remote_target instances.
2050 (vcont_builder::vcont_builder): Add remote_target parameter, and
2051 save it in m_remote. All callers adjusted.
2052 (vcont_builder::m_remote): New field.
2053 (vcont_builder::restart, vcont_builder::flush)
2054 (vcont_builder::push_action): Use it.
2055 (remote_target::commit_resume): Use it.
2056 (struct queue_iter_param) <remote>: New field.
2057 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2058 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2059 (check_pending_event_prevents_wildcard_vcont_callback)
2060 (remote_target::check_pending_events_prevent_wildcard_vcont)
2061 (remote_target::discard_pending_stop_replies)
2062 (remote_target::discard_pending_stop_replies_in_queue)
2063 (remote_target::remote_notif_remove_queued_reply): Fill in
2065 (remote_notif_get_pending_events): New.
2066 (remote_target::readchar, remote_target::remote_serial_write):
2067 Save/restore curr_quit_handler_target.
2069 (kill_new_fork_children): Fill in 'remote' field.
2070 (packet_command): Use get_current_remote_target, defer to
2071 remote_target method of same name.
2072 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2073 parameter, and save it in m_remote. All callers adjusted.
2074 (scoped_remote_fd::release): Use m_remote.
2075 (scoped_remote_fd::m_remote): New field.
2076 (remote_file_put, remote_file_get, remote_file_delete): Use
2077 get_current_remote_target, defer to remote_target method of same
2079 (remote_btrace_reset): Add remote_state paremeter. Update all
2081 (remote_async_inferior_event_handler). Pass down 'data'.
2082 (remote_new_objfile): Use get_current_remote_target.
2083 (remote_target::vcont_r_supported): New.
2084 (set_range_stepping): Use get_current_remote_target and
2085 remote_target::vcont_r_supported.
2086 (_initialize_remote): Don't allocate 'remote_state' and
2087 'stop_reply_queue' globals.
2088 * remote.h (struct remote_target): Forward declare.
2089 (getpkt, putpkt, remote_notif_get_pending_events): Add
2090 'remote_target' parameter.
2092 2018-05-22 Pedro Alves <palves@redhat.com>
2094 * remote.c (vcont_builder): Now a class. Make all data members
2096 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2098 (vcont_builder_restart): Rename to ...
2099 (vcont_builder::restart): ... this.
2100 (vcont_builder_flush): Rename to ...
2101 (vcont_builder::flush): ... this.
2102 (vcont_builder_push_action): Rename to ...
2103 (vcont_builder::push_action): ... this.
2104 (remote_target::commit_resume): Adjust.
2106 2018-05-22 Pedro Alves <palves@redhat.com>
2108 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2109 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2110 (get_fixed_memory_packet_size): New.
2111 (get_memory_packet_size): Use it.
2112 (set_memory_packet_size): Don't override the config size with
2113 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2114 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2115 Don't refer to get_memory_packet_size if not connected to a remote
2116 target. Show "(default)" if configured size is 0.
2118 2018-05-22 Pedro Alves <palves@redhat.com>
2120 * remote.c (remote_target::mourn_inferior): Move
2121 discard_pending_stop_replies call here from ...
2122 (_initialize_remote): ... here.
2124 2018-05-22 Pedro Alves <palves@redhat.com>
2126 * remote.c (compare_section_command): Remove set_general_process
2129 2018-05-22 Pedro Alves <palves@redhat.com>
2131 * remote.c (struct packet_reg, struct remote_arch_state):
2132 Move higher up in the file.
2133 (remote_state) <m_arch_states>: Store remote_arch_state values
2134 instead of remote_arch_state pointers.
2135 (remote_state::get_remote_arch_state): Adjust.
2137 2018-05-22 Pedro Alves <palves@redhat.com>
2139 * remote.c: Include <unordered_map>.
2140 (remote_state): Now a class.
2141 (remote_state) <get_remote_arch_state>: Declare method.
2142 <get_remote_arch_state>: New field.
2143 (remote_arch_state) <remote_arch_state>: Declare ctor.
2144 <regs>: Now a unique_ptr.
2145 (remote_gdbarch_data_handle): Delete.
2146 (get_remote_arch_state): Delete.
2147 (remote_state::get_remote_arch_state): New.
2148 (get_remote_state): Adjust to call remote_state's
2149 get_remote_arch_state method.
2150 (init_remote_state): Delete, bits factored out to ...
2151 (remote_arch_state::remote_arch_state): ... this new method.
2152 (get_remote_packet_size, get_memory_packet_size)
2153 (process_g_packet, remote_target::fetch_registers)
2154 (remote_target::prepare_to_store, store_registers_using_G)
2155 (remote_target::store_registers, remote_target::get_trace_status):
2156 Adjust to call remote_state's method.
2157 (_initialize_remote): Remove reference to
2158 remote_gdbarch_data_handle.
2160 2018-05-22 Pedro Alves <palves@redhat.com>
2162 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2163 pread>: New method declarations.
2164 (remote_target::open_1): Adjust.
2165 (readahead_cache_invalidate): Rename to ...
2166 (readahead_cache::invalidate): ... this, and adjust to be a class
2168 (readahead_cache_invalidate_fd): Rename to ...
2169 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2171 (remote_hostio_pwrite): Adjust.
2172 (remote_hostio_pread_from_cache): Rename to ...
2173 (readahead_cache::pread): ... this, and adjust to be a class
2175 (remote_hostio_close): Adjust.
2177 2018-05-22 Pedro Alves <palves@redhat.com>
2179 * remote.c (remote_hostio_close_cleanup): Delete.
2180 (class scoped_remote_fd): New.
2181 (remote_file_put, remote_file_get): Use it.
2183 2018-05-22 Pedro Alves <palves@redhat.com>
2185 (struct vCont_action_support): Use bool and initialize all fields.
2186 (struct readahead_cache): Initialize all fields.
2187 (remote_state): Use bool and initialize all fields.
2188 (remote_state::remote_state, remote_state::~remote_state): New.
2189 (new_remote_state): Delete.
2190 (_initialize_remote): Use new to allocate remote_state.
2192 2018-05-22 Pedro Alves <palves@redhat.com>
2196 * c-exp.y: Include "c-support.h".
2197 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2198 of tolower. Use c_ident_is_alpha to scan names.
2199 * c-lang.c: Include "c-support.h".
2200 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2201 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2202 * c-support.h: New file, with bits factored out from ...
2203 * cp-name-parser.y: ... this file.
2204 Include "c-support.h".
2205 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2206 c-support.h and renamed.
2207 (symbol_end, yylex): Adjust.
2209 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2211 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2212 parameter type to CORE_ADDR.
2213 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2214 parameter type in declaration to CORE_ADDR.
2215 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2216 target_auxv_search to get AT_HWCAP and use the result to get the
2218 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2219 to CORE_ADDR. Remove the cast of the return value to unsigned
2220 long. Fix error predicate of target_auxv_search.
2221 (ppc_linux_nat_target::read_description): Change the type of the
2222 hwcap variable to CORE_ADDR.
2224 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2226 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2227 if the size of fpscr is larger than 32 bits.
2229 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2231 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2232 (ppc32_linux_vsxregmap): New global.
2233 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2234 regcache_supply_regset, and regcache_collect_regset.
2235 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2236 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2237 (fetch_vsx_register, store_vsx_register): Remove.
2238 (fetch_vsx_registers): Add regno parameter. Get regset using
2239 ppc_linux_vsxregset. Use regset to supply registers.
2240 (store_vsx_registers): Add regno parameter. Get regset using
2241 ppc_linux_vsxregset. Use regset to collect registers.
2242 (fetch_register): Call fetch_vsx_registers instead of
2244 (store_register): Call store_vsx_registers instead of
2246 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2247 new regno parameter.
2248 (store_ppc_registers): Call store_vsx_registers with -1 for the
2249 new regno parameter.
2250 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2251 (ppc_collect_vsxregset): Remove.
2253 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2255 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2257 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2258 for vector register offset fields.
2259 (ppc64_fbsd_reg_offsets): Likewise.
2260 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2261 to vector register offset fields.
2262 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2263 to vector register offset fields.
2264 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2265 vector register offset fields.
2266 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2267 initializers for vector register offset fields.
2268 (rs6000_aix64_reg_offsets): Likewise.
2269 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2270 (ppc_supply_vrregset): Remove.
2271 (ppc_collect_vrregset): Remove.
2272 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2273 (ppc_linux_vrregset) : New function.
2274 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2275 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2276 (ppc32_linux_vrregset): Remove.
2277 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2278 and use result instead of ppc32_linux_vrregset.
2279 (ppc32_linux_reg_offsets): Remove initializers for vector register
2281 (ppc64_linux_reg_offsets): Likewise.
2282 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2283 * ppc-linux-nat.c: Include regset.h.
2284 (gdb_vrregset_t): Adjust comment to account for little-endian
2286 (supply_vrregset, fill_vrregset): Remove.
2287 (fetch_altivec_register, store_altivec_register): Remove.
2288 (fetch_altivec_registers): Add regno parameter. Get regset using
2289 ppc_linux_vrregset. Use regset to supply registers.
2290 (store_altivec_registers): Add regno parameter. Get regset using
2291 ppc_linux_vrregset. Use regset to collect registers.
2292 (fetch_register): Call fetch_altivec_registers instead of
2293 fetch_altivec_register.
2294 (store_register): Call store_altivec_registers instead of
2295 store_altivec_register.
2296 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2297 the new regno parameter.
2298 (store_ppc_registers): Call store_altivec_registers with -1 for
2299 the new regno parameter.
2301 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2303 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2304 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2305 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2306 (gdb_vrregset_t): Change array type size to
2307 PPC_LINUX_SIZEOF_VRREGSET.
2308 (gdb_vsxregset_t): Change array type size to
2309 PPC_LINUX_SIZEOF_VSXREGSET.
2310 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2311 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2312 PPC_LINUX_SIZEOF_VSXREGSET.
2314 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2316 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2317 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2319 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2320 ppc_linux_target_wordsize with tid.
2321 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2323 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2324 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2325 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2326 tid parameter. Remove static specifier.
2327 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2328 (ppc_linux_target_wordsize): New declaration.
2330 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2332 * arch/ppc-linux-common.c: New file.
2333 * arch/ppc-linux-common.h: New file.
2334 * arch/ppc-linux-tdesc.h: New file.
2335 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2336 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2337 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2338 arch/ppc-linux-tdesc.h.
2339 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2340 arch/ppc-linux-tdesc.h.
2341 (ppc_linux_nat_target::read_description): Remove target
2342 description matching code. Fill a ppc_linux_features struct and
2343 call ppc_linux_match_description with it. Move comment about ISA
2344 2.05 to ppc-linux-common.c.
2345 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2346 arch/ppc-linux-tdesc.h.
2347 (ppc_linux_core_read_description): Remove target description
2348 matching code. Fill a ppc_linux_features struct and call
2349 ppc_linux_match_description with it.
2350 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2351 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2352 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2353 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2354 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2355 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2356 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2357 (tdesc_powerpc_e500l): Remove.
2359 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2361 * ada-lang.c (catch_assert_command): Pass empty string instead
2362 of NULL for excep_string argument.
2364 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2366 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2367 the width of the requested register exceeds the width of the
2370 2018-05-21 Tom Tromey <tom@tromey.com>
2372 * printcmd.c (output_command): Remove.
2373 (output_command_const): Rename to output_command.
2374 * valprint.h (output_command): Rename from output_command_const.
2375 * tracepoint.c (trace_dump_actions): Call output_command.
2377 2018-05-21 Tom Tromey <tom@tromey.com>
2379 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2380 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2381 * ada-lang.h (create_ada_exception_catchpoint): Update.
2382 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2384 (create_excep_cond_exprs, ~ada_catchpoint)
2385 (should_stop_exception, print_one_exception)
2386 (print_mention_exception, print_recreate_exception): Update.
2387 (ada_get_next_arg): Remove.
2388 (catch_ada_exception_command_split): Use std::string. Change type
2389 of "excep_string", "cond_string".
2390 (catch_ada_exception_command): Update.
2391 (create_ada_exception_catchpoint): Change type of excep_string.
2392 (ada_exception_sal): Remove excep_string parameter.
2393 (~ada_catchpoint): Remove.
2395 2018-05-21 Tom Tromey <tom@tromey.com>
2397 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2400 2018-05-21 Tom Tromey <tom@tromey.com>
2402 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2403 Return unique_xmalloc_ptr.
2404 (print_it_exception): Update.
2406 2018-05-21 Tom Tromey <tom@tromey.com>
2408 * tracepoint.c (trace_dump_actions): Use std::string.
2410 2018-05-21 Tom Tromey <tom@tromey.com>
2412 * symfile.c (reread_symbols): Use std::string for original_name.
2414 2018-05-21 Tom Tromey <tom@tromey.com>
2416 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2417 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2420 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2422 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2424 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2425 * objfiles.c (get_objfile_bfd_data): Allocate
2426 objfile_per_bfd_storage with obstack_new when allocating on
2429 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2431 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2433 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2434 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2435 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2436 (add_pending): Likewise.
2437 (parse_symbol): Likewise.
2438 (parse_partial_symbols): Likewise.
2439 (psymtab_to_symtab_1): Likewise.
2440 (new_psymtab): Likewise.
2441 (elfmdebug_build_psymtabs): Likewise.
2442 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2443 * objfiles.c (get_objfile_bfd_data): Likewise.
2444 (objfile_register_static_link): Likewise.
2445 * psymtab.c (allocate_psymtab): Likewise.
2446 * stabsread.c (read_member_functions): Likewise.
2447 * xcoffread.c (xcoff_end_psymtab): Likewise.
2449 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2451 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2452 compiler supports std::is_trivially_constructible.
2453 * common/poison.h: Include obstack.h.
2454 (IsMallocable): Define to is_trivially_constructible if the
2455 compiler supports it, define to true_type otherwise.
2459 (XOBNEWVEC): Redefine.
2460 * gdb_obstack.h (obstack_zalloc): New.
2461 (OBSTACK_ZALLOC): Redefine.
2462 (obstack_calloc): New.
2463 (OBSTACK_CALLOC): Redefine.
2465 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2466 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2468 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2469 obstack_calloc/obstack_zalloc.
2470 (gdbarch_obstack_zalloc): Remove.
2471 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2473 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2475 * stack.c (backtrace_command_1): Remove useless variable int i.
2477 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2479 * stack.c (print_frame_info): Fix comment.
2481 2018-05-18 Tom Tromey <tom@tromey.com>
2483 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2484 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2485 (~dwarf2_per_objfile): Update
2486 (dwarf2_get_dwz_file): Use new.
2487 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2490 2018-05-18 Tom Tromey <tom@tromey.com>
2492 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2494 * dwarf2read.c (struct dwp_file): Add constructor and
2496 (open_and_init_dwp_file): Return a unique_ptr.
2497 (dwarf2_per_objfile, create_dwp_hash_table)
2498 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2499 (lookup_dwo_unit_in_dwp): Update.
2500 (open_and_init_dwp_file, get_dwp_file): Update.
2502 2018-05-18 Tom Tromey <tom@tromey.com>
2504 * dwarf2read.c (dwarf2_per_objfile): Update.
2505 (struct mapped_index): Add initializers.
2506 (dwarf2_read_index): Use new.
2507 (dw2_symtab_iter_init): Update.
2508 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2511 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2513 * dwarf2read.c (mapped_index) <total_size>: Remove.
2515 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2517 * unittests/format_pieces-selftests.c (test_format_specifier):
2520 2018-05-18 Tom Tromey <tom@tromey.com>
2522 * c-typeprint.c (maybe_print_hole): New function.
2523 (c_print_type_struct_field_offset): Update.
2524 (c_type_print_base_struct_union): Call maybe_print_hole.
2526 2018-05-17 Keith Seitz <keiths@redhat.com>
2528 * breakpoint.c (build_bpstat_chain): New function, moved from
2530 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2531 If no stop chain is passed, call build_bpstat_chain to build it.
2532 * breakpoint.h (build_bpstat_chain): Declare.
2533 (bpstat_stop_status): Move documentation here from breakpoint.c.
2534 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2535 build the stop chain and pass it to skip_inline_frames.
2536 Pass this stop chain to bpstat_stop_status.
2537 * inline-frame.c: Include breakpoint.h.
2538 (stopped_by_user_bp_inline_frame): New function.
2539 (skip_inline_frames): Add parameter `stop_chain'.
2540 Move documention to inline-frame.h.
2541 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2542 whether the frame should be elided.
2543 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2544 Add moved documentation and update for new parameter.
2546 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2550 unittests/format_pieces-selftests.c.
2551 * common/format.h (format_piece) <operator==>: New.
2552 (format_pieces) <operator[]>: Remove.
2553 * common/format.c (format_pieces::format_pieces): Handle \e.
2554 * unittests/format_pieces-selftests.c: New.
2556 2018-05-17 Tom Tromey <tom@tromey.com>
2559 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2560 (dw2_instantiate_symtab): Add skip_partial parameter.
2561 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2562 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2563 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2564 (dw2_expand_symtabs_matching_one)
2565 (dw2_find_pc_sect_compunit_symtab)
2566 (dw2_debug_names_lookup_symbol)
2567 (dw2_debug_names_expand_symtabs_for_function): Update.
2568 (init_cutu_and_read_dies): Add skip_partial parameter.
2569 (process_psymtab_comp_unit, build_type_psymtabs_1)
2570 (process_skeletonless_type_unit, load_partial_comp_unit)
2571 (psymtab_to_symtab_1): Update.
2572 (load_full_comp_unit): Add skip_partial parameter.
2573 (process_imported_unit_die, dwarf2_read_addr_index)
2574 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2575 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2576 (read_signatured_type): Update.
2578 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2580 * value.c (release_value): Remove unused variable.
2581 (record_latest_value): Likewise.
2582 (access_value_history): Likewise.
2583 (preserve_values): Likewise.
2585 2018-05-17 Tom Tromey <tom@tromey.com>
2587 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2590 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2593 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2594 Also handle registers whose width is not a multiple of
2596 (linux_nat_trad_target::store_register): Likewise.
2598 2018-05-16 Tom Tromey <tom@tromey.com>
2600 * gdbcore.h (core_bfd): Redefine.
2601 * corelow.c (core_target::close): Update.
2602 (core_target_open): Update.
2603 * progspace.h (struct program_space) <cbfd>: Now a
2606 2018-05-16 Tom Tromey <tom@tromey.com>
2609 * symfile-add-flags.h (enum symfile_add_flags)
2610 <SYMFILE_NOT_FILENAME>: New constant.
2611 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2612 objfile name from BFD.
2613 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2614 * minidebug.c (find_separate_debug_file_in_section): Put
2615 ".gnu_debugdata" into BFD's file name.
2617 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2619 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2622 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2625 * aarch64-tdep.c (aarch64_analyze_prologue,
2626 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2627 Indicate not interested in errors.
2629 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2631 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2632 Supply the MIPS_ZERO_REGNUM register.
2634 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2636 * mips-tdep.c (mask_address_var): Make variable static.
2638 2018-05-14 Tom Tromey <tom@tromey.com>
2640 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2642 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2644 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2645 FXSAVE_ADDR for the mxcsr register.
2647 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2649 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2651 2018-05-11 Pedro Alves <palves@redhat.com>
2653 * corelow.c (core_target) <core_target>: No longer inline.
2654 Initialize m_core_gdbarch, m_core_vec and build the section table
2656 <~core_target>: New.
2657 <core_gdbarch, get_core_register_section>: New methods.
2658 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2659 factored out from ...
2660 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2662 (sniff_core_bfd): Add gdbarch parameter.
2663 (core_close): Delete, merged into ...
2664 (core_target::close): ... here. Delete self.
2665 (core_close_cleanup): Delete.
2666 (core_target_open): Allocate a core_target on the heap. Use a
2667 unique_ptr instead of a cleanup. Bits moved into the core_target
2668 ctor. Adjust to use core_target methods instead of globals.
2669 (get_core_register_section): Rename to ...
2670 (core_target::get_core_register_section): ... this and adjust.
2671 (struct get_core_registers_cb_data): New.
2672 (get_core_registers_cb): Use it. Use bool.
2673 (core_target::fetch_registers, core_target::files_info)
2674 (core_target::xfer_partial, core_target::read_description)
2675 (core_target::pid_to, core_target::thread_name): Adjust to
2676 reference class fields instead of globals.
2677 * target.h (struct target_ops_deleter, target_ops_up): New.
2679 2018-05-11 Pedro Alves <palves@redhat.com>
2681 * corefile.c (core_file_command): Move to corelow.c.
2682 * corelow.c (the_core_target): Delete.
2683 (core_file_command): Moved from corefile.c. Check exec_bfd
2684 instead of the_core_target. Use target_detach instead of calling
2685 into the_core_target directly.
2686 (maybe_say_no_core_file_now): New.
2687 (core_target::detach): Use it.
2688 (_initialize_corelow): Remove references to the_core_target.
2689 * gdbcore.h (the_core_target): Delete.
2691 2018-05-11 Tom Tromey <tromey@redhat.com>
2692 Pedro Alves <palves@redhat.com>
2694 * corefile.c (core_bfd): Remove.
2695 * gdbcore.h (core_bfd): Now a macro.
2696 * progspace.h (struct program_space) <cbfd>: New field.
2698 2018-05-11 Tom Tromey <tom@tromey.com>
2700 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2703 2018-05-10 Tom Tromey <tom@tromey.com>
2705 * configure: Rebuild.
2706 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2708 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2711 * regformats/regdat.sh: Adjust script, following the addition
2712 of the new expedite_regs parameter to init_target_desc.
2714 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2717 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2718 set_gdbarch_significant_addr_bit.
2719 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2720 set_gdbarch_significant_addr_bit.
2721 * utils.c (address_significant): Update to sign extend addr.
2723 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2725 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2726 (xtensa_linux_init_abi): Limit tdep->num_regs by
2727 tdep->num_nopriv_regs.
2728 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2729 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2732 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2734 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2736 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2738 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2739 (I387_MXCSR_INIT_VAL): New constant.
2740 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2741 buffer if it was supplied by the inferior.
2742 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2743 (i387_xsave_get_clear_bv): New function.
2744 (i387_supply_xsave): Only read x87 control registers from the
2745 xsave buffer if the feature is enabled, and the state will have
2746 been written, otherwise, provide a suitable default.
2747 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2748 including x87 control registers. Update control registers if they
2749 have changed from the default value, and mark features as enabled
2751 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2753 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2755 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2757 2018-05-07 Tom Tromey <tom@tromey.com>
2759 * configure: Rebuild.
2760 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2762 2018-05-07 Tom Tromey <tom@tromey.com>
2765 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2766 bit. Use correct value for VDIV.
2768 2018-05-04 Tom Tromey <tom@tromey.com>
2770 * configure: Rebuild.
2771 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2773 2018-05-04 Tom Tromey <tom@tromey.com>
2775 * linux-record.c (record_linux_system_call) <case
2776 RECORD_SYS_RECVFROM>: Add "break".
2778 2018-05-04 Tom Tromey <tom@tromey.com>
2780 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2781 Add missing "break".
2782 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2783 Add missing "break".
2785 2018-05-04 Tom Tromey <tom@tromey.com>
2787 * rs6000-tdep.c (ppc_process_record_op4)
2788 (ppc_process_record_op63): Add fall-through comment.
2790 2018-05-04 Tom Tromey <tom@tromey.com>
2792 * i386-tdep.c (i386_process_record): Add fall-through comment.
2794 2018-05-04 Tom Tromey <tom@tromey.com>
2796 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2799 2018-05-04 Tom Tromey <tom@tromey.com>
2801 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2802 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2803 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2805 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2807 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2810 2018-05-04 Tom Tromey <tom@tromey.com>
2812 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2814 2018-05-04 Tom Tromey <tom@tromey.com>
2816 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2817 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2818 * symfile.c (section_is_mapped): Fix fall-through comment.
2819 * stabsread.c (define_symbol, read_member_functions): Fix
2820 fall-through comment.
2821 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2823 * remote.c (remote_wait_as): Fix fall-through comment.
2824 * p-exp.y (yylex): Fix fall-through comment.
2825 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2827 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2828 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2829 * jv-exp.y (yylex): Fix fall-through comment.
2830 * go-exp.y (lex_one_token): Fix fall-through comment.
2831 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2832 fall-through comment.
2833 * f-exp.y (yylex): Fix fall-through comment.
2834 * dwarf2read.c (process_die): Fix fall-through comments.
2835 * dbxread.c (process_one_symbol): Fix fall-through comment.
2836 * d-exp.y (lex_one_token): Fix fall-through comment.
2837 * cp-name-parser.y (yylex): Fix fall-through comment.
2838 * coffread.c (coff_symtab_read): Fix fall-through comment.
2839 * c-exp.y (lex_one_token): Fix fall-through comment.
2840 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2842 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2845 2018-05-04 Tom Tromey <tom@tromey.com>
2848 * NEWS: Mention gdb.execute change.
2849 * gdbcmd.h (execute_control_command): Don't declare.
2850 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2851 execute_control_commands, execute_control_commands_to_string.
2852 * cli/cli-script.h (execute_control_commands)
2853 (execute_control_commands_to_string): Declare.
2854 (execute_control_command): Add from_tty parameter.
2855 * cli/cli-script.c (execute_control_commands)
2856 (execute_control_commands_to_string): New functions.
2857 (execute_user_command): Use execute_control_commands.
2858 (execute_control_command_1): Add "from_tty" parameter. Update.
2859 (execute_control_command): Likewise.
2861 2018-05-04 Tom Tromey <tom@tromey.com>
2864 * NEWS: Mention that breakpoint commands are writable.
2865 * python/py-breakpoint.c (bppy_set_commands): New function.
2866 (breakpoint_object_getset) <"commands">: Use it.
2868 2018-05-04 Tom Tromey <tom@tromey.com>
2870 * tracepoint.c (actions_command): Update.
2871 * mi/mi-cmd-break.c (mi_command_line_array)
2872 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2873 (mi_read_next_line): Remove.
2874 (mi_cmd_break_commands): Update.
2875 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2877 * cli/cli-script.c (get_command_line): Update.
2878 (process_next_line): Use function_view. Constify.
2879 (recurse_read_control_structure, read_command_lines)
2880 (read_command_lines_1): Change argument types to function_view.
2881 (do_define_command, document_command): Update.
2882 * breakpoint.h (check_tracepoint_command): Don't declare.
2883 * breakpoint.c (check_tracepoint_command): Remove.
2884 (commands_command_1, create_tracepoint_from_upload): Update.
2886 2018-05-04 Tom Tromey <tom@tromey.com>
2889 * cli/cli-script.h (enum command_control_type) <define_control>:
2891 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2892 (build_command_line, execute_control_command_1)
2893 (process_next_line): Likewise.
2894 (do_define_command): New function, extracted from define_command.
2895 (define_command): Use it.
2897 2018-05-04 Tom Tromey <tom@tromey.com>
2899 * tracepoint.c (actions_command): Update.
2900 * cli/cli-script.h (read_command_lines): Update.
2901 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2902 (MAX_TMPBUF): Remove define.
2903 (define_command): Use string_printf.
2904 (document_command): Likewise.
2905 * breakpoint.c (commands_command_1): Update.
2907 2018-05-04 Tom Tromey <tom@tromey.com>
2909 * top.c (execute_command): Update.
2910 * cli/cli-script.h (print_command_lines): Now varargs.
2911 * cli/cli-script.c (print_command_lines): Now varargs.
2912 (execute_control_command_1) <case while_control, case if_control>:
2915 2018-05-04 Tom Tromey <tom@tromey.com>
2917 * tracepoint.c (all_tracepoint_actions): Rename from
2918 all_tracepoint_actions_and_cleanup. Change return type.
2919 (actions_command, encode_actions_1, encode_actions)
2920 (trace_dump_actions, tdump_command): Update.
2921 * remote.c (remote_download_command_source): Update.
2922 * python/python.c (gdbpy_eval_from_control_command)
2923 (python_command, python_interactive_command): Update.
2924 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2925 * guile/guile.c (guile_command)
2926 (gdbscm_eval_from_control_command, guile_command): Update.
2927 * compile/compile.c (compile_code_command)
2928 (compile_print_command, compile_to_object): Update.
2929 * cli/cli-script.h (struct command_lines_deleter): New.
2930 (counted_command_line): New typedef.
2931 (struct command_line): Add constructor, destructor.
2932 <body_list>: Remove.
2933 <body_list_0, body_list_1>: New members.
2934 (command_line_up): Remove typedef.
2935 (read_command_lines, read_command_lines_1, get_command_line):
2937 (copy_command_lines): Don't declare.
2938 * cli/cli-script.c (build_command_line): Use "new".
2939 (get_command_line): Return counted_command_line.
2940 (print_command_lines, execute_user_command)
2941 (execute_control_command_1, while_command, if_command): Update.
2942 (realloc_body_list): Remove.
2943 (process_next_line, recurse_read_control_structure): Update.
2944 (read_command_lines, read_command_lines_1): Return counted_command_line.
2945 (free_command_lines): Use "delete".
2946 (copy_command_lines): Remove.
2947 (define_command, document_command, show_user_1): Update.
2948 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2949 a counted_command_line.
2950 * breakpoint.h (counted_command_line): Remove typedef.
2951 (breakpoint_set_commands): Update.
2952 * breakpoint.c (check_no_tracepoint_commands)
2953 (validate_commands_for_breakpoint): Update.
2954 (breakpoint_set_commands): Change commands to be a
2955 counted_command_line.
2956 (commands_command_1, update_dprintf_command_list)
2957 (create_tracepoint_from_upload): Update.
2959 2018-05-04 Tom Tromey <tom@tromey.com>
2961 * cli/cli-decode.h (cmd_list_element): New constructor.
2962 (~cmd_list_element): New destructor.
2963 (struct cmd_list_element): Add initializers.
2964 * cli/cli-decode.c (do_add_cmd): Use "new".
2965 (delete_cmd): Use "delete".
2967 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2968 Pedro Alves <palves@redhat.com>
2970 PR breakpoints/19806 and support for PR external/20207.
2971 * NEWS: Mention Aarch64 watchpoint improvements.
2972 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2973 watchpoints and PR external/20207 watchpoints.
2974 * nat/aarch64-linux-hw-point.c
2975 (kernel_supports_any_contiguous_range): New.
2976 (aarch64_watchpoint_offset): New.
2977 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2978 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2979 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2980 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2981 next_addr_orig_p. Support PR external/20207 watchpoints.
2982 (aarch64_downgrade_regs): New.
2983 (aarch64_dr_state_insert_one_point): New parameters offset and
2985 (aarch64_dr_state_remove_one_point): Likewise.
2986 (aarch64_handle_breakpoint): Update caller.
2987 (aarch64_handle_aligned_watchpoint): Likewise.
2988 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2990 (aarch64_linux_set_debug_regs): Remove const from state. Call
2991 aarch64_downgrade_regs.
2992 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2993 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2994 (DR_CONTROL_MASK): ... this.
2995 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2996 (unsigned int aarch64_watchpoint_offset): New prototype.
2997 (aarch64_linux_set_debug_regs): Remove const from state.
2998 * utils.c (align_up, align_down): Move to ...
2999 * common/common-utils.c (align_up, align_down): ... here.
3000 * utils.h (align_up, align_down): Move to ...
3001 * common/common-utils.h (align_up, align_down): ... here.
3003 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3005 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3006 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3007 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3008 Re-implement to match the ABI as summarized in GCC's
3009 gcc/config/sparc/sparc.c. All callers updated.
3010 (sparc32_store_arguments): Remove assertion.
3012 2018-05-04 Tom Tromey <tom@tromey.com>
3014 * printcmd.c: Don't include tui.h.
3015 (decode_format): Use skip_spaces.
3017 2018-05-04 Tom Tromey <tom@tromey.com>
3020 * printcmd.c (last_count): New global.
3021 (x_command): Use saved count when repeating.
3023 2018-05-04 Tom Tromey <tom@tromey.com>
3025 * nto-procfs.c (do_closedir_cleanup): Remove.
3026 (procfs_pidlist): Use gdb_dir_up.
3027 * procfs.c (do_closedir_cleanup): Remove.
3028 (proc_update_threads): Use gdb_dir_up.
3029 * common/filestuff.h (struct gdb_dir_deleter): New.
3030 (gdb_dir_up): New typedef.
3032 2018-05-04 Tom Tromey <tom@tromey.com>
3034 * ada-lang.c (print_mention_exception): Use std::string.
3036 2018-05-04 Tom Tromey <tom@tromey.com>
3038 * ada-lang.c (create_excep_cond_exprs): Update.
3039 (ada_exception_catchpoint_cond_string): Use std::string.
3041 2018-05-04 Tom Tromey <tom@tromey.com>
3043 * ada-lang.c (xget_renaming_scope): Return std::string.
3044 (old_renaming_is_invisible): Update.
3046 2018-05-04 Tom Tromey <tom@tromey.com>
3048 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3049 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3051 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3053 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3055 2018-05-04 Tom Tromey <tom@tromey.com>
3057 * remote.c (remote_query_supported_append): Change type.
3058 (remote_check_symbols): Update.
3060 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3063 * configure.ac: Prepend libpython.
3064 * python/python-config.py: Likewise.
3065 * configure: Regenerate.
3067 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3069 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3071 2018-05-03 Pedro Alves <palves@redhat.com>
3074 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3075 override. Write 'true' instead of '1'.
3076 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3079 2018-05-02 Pedro Alves <palves@redhat.com>
3081 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3082 add_inf_child_target.
3083 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3084 add_inf_child_target.
3085 * aix-thread.c (aix_thread_target_info): New.
3086 (aix_thread_target) <shortname, longname, doc>: Delete.
3088 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3089 add_inf_child_target.
3090 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3091 add_inf_child_target.
3092 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3093 add_inf_child_target.
3094 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3095 add_inf_child_target.
3096 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3097 add_inf_child_target.
3098 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3099 add_inf_child_target.
3100 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3101 add_inf_child_target.
3102 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3103 add_inf_child_target.
3104 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3105 add_inf_child_target.
3106 * bfd-target.c (target_bfd_target_info): New.
3107 (target_bfd) <shortname, longname, doc>: Delete.
3109 * bsd-kvm.c (bsd_kvm_target_info): New.
3110 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3112 (bsd_kvm_target::open): Rename to ...
3113 (bsd_kvm_target_open): ... this. Adjust.
3114 * bsd-uthread.c (bsd_uthread_target_info): New.
3115 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3117 * corefile.c (core_file_command): Adjust.
3118 * corelow.c (core_target_info): New.
3119 (core_target) <shortname, longname, doc>: Delete.
3121 (core_target::open): Rename to ...
3122 (core_target_open): ... this. Adjust.
3123 * ctf.c (ctf_target_info): New.
3124 (ctf_target) <shortname, longname, doc>: Delete.
3126 (ctf_target::open): Rename to ...
3127 (ctf_target_open): ... this.
3128 (_initialize_ctf): Adjust.
3129 * exec.c (exec_target_info): New.
3130 (exec_target) <shortname, longname, doc>: Delete.
3132 (exec_target::open): Rename to ...
3133 (exec_target_open): ... this.
3134 * gdbcore.h (core_target_open): Declare.
3135 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3136 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3137 add_inf_child_target.
3138 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3139 add_inf_child_target.
3140 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3141 add_inf_child_target.
3142 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3143 add_inf_child_target.
3144 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3145 add_inf_child_target.
3146 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3147 add_inf_child_target.
3148 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3149 add_inf_child_target.
3150 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3151 add_inf_child_target.
3152 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3153 add_inf_child_target.
3154 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3155 add_inf_child_target.
3156 * inf-child.c (inf_child_target_info): New.
3157 (inf_child_target::info): New.
3158 (inf_child_open_target): Remove 'target' parameter. Use
3159 get_native_target instead.
3160 (inf_child_target::open): Delete.
3161 (add_inf_child_target): New.
3162 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3165 (add_inf_child_target): Declare.
3166 (inf_child_open_target): Declare.
3167 * linux-thread-db.c (thread_db_target_info): New.
3168 (thread_db_target) <shortname, longname, doc>: Delete.
3170 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3171 add_inf_child_target.
3172 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3173 add_inf_child_target.
3174 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3175 add_inf_child_target.
3176 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3177 add_inf_child_target.
3178 * make-target-delegates (print_class): Adjust.
3179 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3180 add_inf_child_target.
3181 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3182 add_inf_child_target.
3183 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3184 add_inf_child_target.
3185 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3186 add_inf_child_target.
3187 * nto-procfs.c (nto_native_target_info): New.
3188 (nto_procfs_target_native) <shortname, longname, doc>:
3191 (nto_procfs_target_info): New.
3192 (nto_procfs_target_procfs) <shortname, longname, doc>:
3195 (init_procfs_targets): Adjust.
3196 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3197 add_inf_child_target.
3198 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3199 add_inf_child_target.
3200 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3201 add_inf_child_target.
3202 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3203 add_inf_child_target.
3204 * ravenscar-thread.c (ravenscar_target_info): New.
3205 (ravenscar_thread_target) <shortname, longname, doc>:
3208 * record-btrace.c (record_btrace_target_info):
3209 (record_btrace_target) <shortname, longname, doc>: Delete.
3211 (record_btrace_target::open): Rename to ...
3212 (record_btrace_target_open): ... this. Adjust.
3213 * record-full.c (record_longname, record_doc): New.
3214 (record_full_base_target) <shortname, longname, doc>: Delete.
3216 (record_full_target_info): New.
3217 (record_full_target): <shortname>: Delete.
3219 (record_full_core_open_1, record_full_open_1): Update comments.
3220 (record_full_base_target::open): Rename to ...
3221 (record_full_open): ... this.
3222 (cmd_record_full_restore): Update.
3223 (_initialize_record_full): Update.
3224 * remote-sim.c (remote_sim_target_info): New.
3225 (gdbsim_target) <shortname, longname, doc>: Delete.
3227 (gdbsim_target::open): Rename to ...
3228 (gdbsim_target_open): ... this.
3229 (_initialize_remote_sim): Adjust.
3230 * remote.c (remote_doc): New.
3231 (remote_target_info): New.
3232 (remote_target) <shortname, longname, doc>: Delete.
3234 (extended_remote_target_info): New.
3235 (extended_remote_target) <shortname, longname, doc>: Delete.
3237 (remote_target::open_1): Make static. Adjust.
3238 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3239 * s390-linux-nat.c (_initialize_s390_nat): Use
3240 add_inf_child_target.
3241 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3242 add_inf_child_target.
3243 * sol-thread.c (thread_db_target_info): New.
3244 (sol_thread_target) <shortname, longname, doc>: Delete.
3246 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3247 add_inf_child_target.
3248 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3249 add_inf_child_target.
3250 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3251 add_inf_child_target.
3252 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3253 add_inf_child_target.
3254 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3255 add_inf_child_target.
3256 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3257 add_inf_child_target.
3258 * spu-linux-nat.c (_initialize_spu_nat): Use
3259 add_inf_child_target.
3260 * spu-multiarch.c (spu_multiarch_target_info): New.
3261 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3263 * target-delegates.c: Regenerate.
3264 * target.c: Include <unordered_map>.
3265 (target_ops_p): Delete.
3266 (DEF_VEC_P(target_ops_p)): Delete.
3267 (target_factories): New.
3268 (test_target_info): New.
3269 (test_target_ops::info): New.
3270 (open_target): Adjust to use target_factories.
3271 (add_target_with_completer): Rename to ...
3272 (add_target): ... this. Change prototype. Register target_info
3273 and open callback in target_factories. Register target_info in
3274 command context instead of target_ops.
3275 (add_target): Delete old implementation.
3276 (add_deprecated_target_alias): Change prototype. Adjust.
3277 (the_native_target): New.
3278 (set_native_target, get_native_target): New.
3279 (find_default_run_target): Use the_native_target.
3280 (find_attach_target, find_run_target): Simplify.
3281 (target_ops::open): Delete.
3282 (dummy_target_info): New.
3283 (dummy_target::shortname, dummy_target::longname)
3284 (dummy_target::doc): Delete.
3285 (dummy_target::info): New.
3286 (debug_target::shortname, debug_target::longname)
3287 (debug_target::doc): Delete.
3288 (debug_target::info): New.
3289 * target.h (struct target_info): New.
3290 (target_ops::~target_ops): Add comment.
3291 (target_ops::info): New.
3292 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3293 longer virtual. Implement in terms of target_info.
3294 (set_native_target, get_native_target): Declare.
3295 (target_open_ftype): New.
3296 (add_target, add_target_with_completer)
3297 (add_deprecated_target_alias): Change prototype.
3298 (test_target) <shortname, longname, doc>: Delete.
3300 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3301 add_inf_child_target.
3302 * tracefile-tfile.c (tfile_target_info): New.
3303 (tfile_target) <shortname, longname, doc>: Delete.
3305 (tfile_target::open): Rename to ...
3306 (tfile_target_open): ... this.
3307 (_initialize_tracefile_tfile): Adjust.
3308 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3309 add_inf_child_target.
3310 * windows-nat.c (_initialize_windows_nat): Use
3311 add_inf_child_target.
3312 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3313 add_inf_child_target.
3315 2018-05-02 Pedro Alves <palves@redhat.com>
3317 * linux-nat.h (linux_nat_target) <low_new_thread,
3318 low_delete_thread, low_new_fork, low_forget_process,
3319 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3320 New virtual methods.
3321 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3322 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3323 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3324 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3325 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3327 * linux-fork.c (delete_fork): Adjust to call low method.
3328 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3329 (linux_nat_new_fork, linux_nat_forget_process_hook)
3330 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3331 (linux_nat_status_is_event):
3332 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3333 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3335 (sigtrap_is_event): Rename to ...
3336 (linux_nat_target::low_status_is_event): ... this.
3337 (linux_nat_set_status_is_event): Delete.
3338 (save_stop_reason, linux_nat_wait_1)
3339 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3341 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3342 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3343 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3344 (linux_nat_set_prepare_to_resume): Delete.
3345 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3346 low virtual methods.
3347 * amd64-linux-nat.c: Likewise.
3348 * arm-linux-nat.c: Likewise.
3349 * i386-linux-nat.c: Likewise.
3350 * ia64-linux-nat.c: Likewise.
3351 * mips-linux-nat.c: Likewise.
3352 * ppc-linux-nat.c: Likewise.
3353 * s390-linux-nat.c: Likewise.
3354 * sparc64-linux-nat.c: Likewise.
3355 * x86-linux-nat.c: Likewise.
3356 * x86-linux-nat.h: Include "nat/x86-linux.h".
3357 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3358 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3361 2018-05-02 Pedro Alves <palves@redhat.com>
3363 * target.h (target_ops)
3364 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3365 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3366 stopped_by_watchpoint, have_continuable_watchpoint,
3367 stopped_data_address, watchpoint_addr_within_range,
3368 can_accel_watchpoint_condition, can_run, thread_alive,
3369 has_all_memory, has_memory, has_stack, has_registers,
3370 has_execution, can_async_p, is_async_p, supports_non_stop,
3371 always_non_stop_p, can_execute_reverse, supports_multi_process,
3372 supports_enable_disable_tracepoint,
3373 supports_disable_randomization, supports_string_tracing,
3374 supports_evaluation_of_breakpoint_conditions,
3375 can_run_breakpoint_commands, filesystem_is_local,
3376 can_download_tracepoint, get_trace_state_variable_value,
3377 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3378 record_is_replaying, record_will_replay,
3379 augmented_libraries_svr4_read>: Adjust to return bool.
3380 * aarch64-linux-nat.c: All implementations adjusted.
3381 * aix-thread.c: All implementations adjusted.
3382 * arm-linux-nat.c: All implementations adjusted.
3383 * breakpoint.c: All implementations adjusted.
3384 * bsd-kvm.c: All implementations adjusted.
3385 * bsd-uthread.c: All implementations adjusted.
3386 * corelow.c: All implementations adjusted.
3387 * ctf.c: All implementations adjusted.
3388 * darwin-nat.c: All implementations adjusted.
3389 * darwin-nat.h: All implementations adjusted.
3390 * exec.c: All implementations adjusted.
3391 * fbsd-nat.c: All implementations adjusted.
3392 * fbsd-nat.h: All implementations adjusted.
3393 * gnu-nat.c: All implementations adjusted.
3394 * gnu-nat.h: All implementations adjusted.
3395 * go32-nat.c: All implementations adjusted.
3396 * ia64-linux-nat.c: All implementations adjusted.
3397 * inf-child.c: All implementations adjusted.
3398 * inf-child.h: All implementations adjusted.
3399 * inf-ptrace.c: All implementations adjusted.
3400 * inf-ptrace.h: All implementations adjusted.
3401 * linux-nat.c: All implementations adjusted.
3402 * linux-nat.h: All implementations adjusted.
3403 * mips-linux-nat.c: All implementations adjusted.
3404 * nto-procfs.c: All implementations adjusted.
3405 * ppc-linux-nat.c: All implementations adjusted.
3406 * procfs.c: All implementations adjusted.
3407 * ravenscar-thread.c: All implementations adjusted.
3408 * record-btrace.c: All implementations adjusted.
3409 * record-full.c: All implementations adjusted.
3410 * remote-sim.c: All implementations adjusted.
3411 * remote.c: All implementations adjusted.
3412 * s390-linux-nat.c: All implementations adjusted.
3413 * sol-thread.c: All implementations adjusted.
3414 * spu-multiarch.c: All implementations adjusted.
3415 * target-delegates.c: All implementations adjusted.
3416 * target.c: All implementations adjusted.
3417 * target.h: All implementations adjusted.
3418 * tracefile-tfile.c: All implementations adjusted.
3419 * tracefile.c: All implementations adjusted.
3420 * tracefile.h: All implementations adjusted.
3421 * windows-nat.c: All implementations adjusted.
3422 * x86-linux-nat.h: All implementations adjusted.
3423 * x86-nat.h: All implementations adjusted.
3425 2018-05-02 Pedro Alves <palves@redhat.com>
3427 * make-target-delegates (scan_target_h): Don't trim lines here.
3428 Replace sequences of tabs and/or whitespace with a single
3430 (top level, parsing methods): Trim each line before processing it
3433 2018-05-02 Pedro Alves <palves@redhat.com>
3434 John Baldwin <jhb@freebsd.org>
3436 * target.h (enum strata) <debug_stratum>: New.
3437 (struct target_ops) <all delegation methods>: Replace by C++
3438 virtual methods, and drop "to_" prefix. All references updated
3440 <to_shortname, to_longname, to_doc, to_data,
3441 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3442 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3443 virtual methods. All references updated throughout.
3444 <can_attach, supports_terminal_ours, can_create_inferior,
3445 get_thread_control_capabilities, attach_no_wait>: New
3447 <insert_breakpoint, remove_breakpoint>: Now
3448 TARGET_DEFAULT_NORETURN methods.
3449 <info_proc>: Now returns bool.
3451 (OPS_MAGIC): Delete.
3452 (current_target): Delete. All references replaced by references
3454 (target_stack): ... this. New.
3455 (target_shortname, target_longname): Adjust.
3456 (target_can_run): Now a function declaration.
3457 (default_child_has_all_memory, default_child_has_memory)
3458 (default_child_has_stack, default_child_has_registers)
3459 (default_child_has_execution): Remove target_ops parameter.
3460 (complete_target_initialization): Delete.
3461 (memory_breakpoint_target): New template class.
3462 (test_target_ops): Refactor as a C++ class with virtual methods.
3463 * make-target-delegates (NAME_PART): Tighten.
3464 (POINTER_PART, CP_SYMBOL): New.
3465 (SIMPLE_RETURN_PART): Reimplement.
3466 (VEC_RETURN_PART): Expect less.
3467 (RETURN_PART, VIRTUAL_PART): New.
3468 (METHOD): Adjust to C++ virtual methods.
3469 (scan_target_h): Remove reference to C99.
3470 (dname): Output "target_ops::" prefix.
3471 (write_function_header): Adjust to output a C++ class method.
3472 (write_declaration): New.
3473 (write_delegator): Adjust to output a C++ class method.
3474 (tdname): Output "dummy_target::" prefix.
3475 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3477 (tdefault_names, debug_names): Delete.
3478 (return_types, tdefaults, styles, argtypes_array): New.
3479 (top level): All methods are delegators.
3481 (top level): Print dummy_target and debug_target classes.
3482 * target-delegates.c: Regenerate.
3483 * target-debug.h (target_debug_print_enum_info_proc_what)
3484 (target_debug_print_thread_control_capabilities)
3485 (target_debug_print_thread_info_p): New.
3486 * target.c (dummy_target): Delete.
3487 (the_dummy_target, the_debug_target): New.
3488 (target_stack): Now extern.
3489 (set_targetdebug): Push/unpush debug target.
3490 (default_child_has_all_memory, default_child_has_memory)
3491 (default_child_has_stack, default_child_has_registers)
3492 (default_child_has_execution): Remove target_ops parameter.
3493 (complete_target_initialization): Delete.
3494 (add_target_with_completer): No longer call
3495 complete_target_initialization.
3496 (target_supports_terminal_ours): Use regular delegation.
3497 (update_current_target): Delete.
3498 (push_target): No longer check magic number. Don't call
3499 update_current_target.
3500 (unpush_target): Don't call update_current_target.
3501 (target_is_pushed): No longer check magic number.
3502 (target_require_runnable): Skip for all stratums over
3504 (target_ops::info_proc): New.
3505 (target_info_proc): Use find_target_at and
3506 find_default_run_target.
3507 (target_supports_disable_randomization): Use regular delegation.
3508 (target_get_osdata): Use find_target_at.
3509 (target_ops::open, target_ops::close, target_ops::can_attach)
3510 (target_ops::attach, target_ops::can_create_inferior)
3511 (target_ops::create_inferior, target_ops::can_run)
3512 (target_can_run): New.
3513 (default_fileio_target): Use regular delegation.
3514 (target_ops::fileio_open, target_ops::fileio_pwrite)
3515 (target_ops::fileio_pread, target_ops::fileio_fstat)
3516 (target_ops::fileio_close, target_ops::fileio_unlink)
3517 (target_ops::fileio_readlink): New.
3518 (target_fileio_open_1, target_fileio_unlink)
3519 (target_fileio_readlink): Always call the target method. Handle
3521 (return_zero, return_zero_has_execution): Delete.
3522 (init_dummy_target): Delete.
3523 (dummy_target::dummy_target, dummy_target::shortname)
3524 (dummy_target::longname, dummy_target::doc)
3525 (debug_target::debug_target, debug_target::shortname)
3526 (debug_target::longname, debug_target::doc): New.
3527 (target_supports_delete_record): Use regular delegation.
3528 (setup_target_debug): Delete.
3529 (maintenance_print_target_stack): Skip debug_stratum.
3530 (initialize_targets): Instantiate the_dummy_target and
3532 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3534 (target_auxv_search, fprint_target_auxv): Adjust.
3535 (info_auxv_command): Adjust to use target_stack.
3536 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3537 * exceptions.c (print_flush): Handle a NULL target_stack.
3538 * regcache.c (target_ops_no_register): Refactor as class with
3541 * exec.c (exec_target): New class.
3542 (exec_ops): Now an exec_target.
3543 (exec_open, exec_close_1, exec_get_section_table)
3544 (exec_xfer_partial, exec_files_info, exec_has_memory)
3545 (exec_make_note_section): Refactor as exec_target methods.
3546 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3548 (exec_target::find_memory_regions): New.
3549 (_initialize_exec): Don't call init_exec_ops.
3550 * gdbcore.h (exec_file_clear): Delete.
3552 * corefile.c (core_target): Delete.
3553 (core_file_command): Adjust.
3554 * corelow.c (core_target): New class.
3555 (the_core_target): New.
3556 (core_close): Remove target_ops parameter.
3557 (core_close_cleanup): Adjust.
3558 (core_target::close): New.
3559 (core_open, core_detach, get_core_registers, core_files_info)
3560 (core_xfer_partial, core_thread_alive, core_read_description)
3561 (core_pid_to_str, core_thread_name, core_has_memory)
3562 (core_has_stack, core_has_registers, core_info_proc): Rework as
3563 core_target methods.
3564 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3565 (_initialize_corelow): Initialize the_core_target.
3566 * gdbcore.h (core_target): Delete.
3567 (the_core_target): New.
3569 * ctf.c: (ctf_target): New class.
3570 (ctf_ops): Now a ctf_target.
3571 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3572 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3573 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3575 (init_ctf_ops): Delete.
3576 (_initialize_ctf): Don't call it.
3577 * tracefile-tfile.c (tfile_target): New class.
3578 (tfile_ops): Now a tfile_target.
3579 (tfile_open, tfile_close, tfile_files_info)
3580 (tfile_get_tracepoint_status, tfile_trace_find)
3581 (tfile_fetch_registers, tfile_xfer_partial)
3582 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3583 Refactor as tfile_target methods.
3584 (tfile_xfer_partial_features): Remove target_ops parameter.
3585 (init_tfile_ops): Delete.
3586 (_initialize_tracefile_tfile): Don't call it.
3587 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3588 (tracefile_has_stack, tracefile_has_registers)
3589 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3590 tracefile_target methods.
3591 (init_tracefile_ops): Delete.
3592 (tracefile_target::tracefile_target): New.
3593 * tracefile.h: Include "target.h".
3594 (tracefile_target): New class.
3595 (init_tracefile_ops): Delete.
3597 * spu-multiarch.c (spu_multiarch_target): New class.
3598 (spu_ops): Now a spu_multiarch_target.
3599 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3600 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3601 (spu_search_memory, spu_mourn_inferior): Refactor as
3602 spu_multiarch_target methods.
3603 (init_spu_ops): Delete.
3604 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3605 complete_target_initialization.
3607 * ravenscar-thread.c (ravenscar_thread_target): New class.
3608 (ravenscar_ops): Now a ravenscar_thread_target.
3609 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3610 (ravenscar_thread_alive, ravenscar_pid_to_str)
3611 (ravenscar_fetch_registers, ravenscar_store_registers)
3612 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3613 (ravenscar_stopped_by_hw_breakpoint)
3614 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3615 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3616 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3618 (init_ravenscar_thread_ops): Delete.
3619 (_initialize_ravenscar): Remove references to
3620 init_ravenscar_thread_ops and complete_target_initialization.
3622 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3623 (bsd_uthread_target): New class.
3624 (bsd_uthread_ops): Now a bsd_uthread_target.
3625 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3626 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3627 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3628 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3629 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3630 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3631 (bsd_uthread_target): Delete function.
3632 (_initialize_bsd_uthread): Remove reference to
3633 complete_target_initialization.
3635 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3636 (target_bfd): ... this new class.
3637 (target_bfd_xfer_partial, target_bfd_get_section_table)
3638 (target_bfd_close): Refactor as target_bfd methods.
3639 (target_bfd::~target_bfd): New.
3640 (target_bfd_reopen): Adjust.
3641 (target_bfd::close): New.
3643 * record-btrace.c (record_btrace_target): New class.
3644 (record_btrace_ops): Now a record_btrace_target.
3645 (record_btrace_open, record_btrace_stop_recording)
3646 (record_btrace_disconnect, record_btrace_close)
3647 (record_btrace_async, record_btrace_info)
3648 (record_btrace_insn_history, record_btrace_insn_history_range)
3649 (record_btrace_insn_history_from, record_btrace_call_history)
3650 (record_btrace_call_history_range)
3651 (record_btrace_call_history_from, record_btrace_record_method)
3652 (record_btrace_is_replaying, record_btrace_will_replay)
3653 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3654 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3655 (record_btrace_store_registers, record_btrace_prepare_to_store)
3656 (record_btrace_to_get_unwinder)
3657 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3658 (record_btrace_commit_resume, record_btrace_wait)
3659 (record_btrace_stop, record_btrace_can_execute_reverse)
3660 (record_btrace_stopped_by_sw_breakpoint)
3661 (record_btrace_supports_stopped_by_sw_breakpoint)
3662 (record_btrace_stopped_by_hw_breakpoint)
3663 (record_btrace_supports_stopped_by_hw_breakpoint)
3664 (record_btrace_update_thread_list, record_btrace_thread_alive)
3665 (record_btrace_goto_begin, record_btrace_goto_end)
3666 (record_btrace_goto, record_btrace_stop_replaying_all)
3667 (record_btrace_execution_direction)
3668 (record_btrace_prepare_to_generate_core)
3669 (record_btrace_done_generating_core): Refactor as
3670 record_btrace_target methods.
3671 (init_record_btrace_ops): Delete.
3672 (_initialize_record_btrace): Remove reference to
3673 init_record_btrace_ops.
3674 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3675 the execution_direction global.
3676 (record_full_base_target, record_full_target)
3677 (record_full_core_target): New classes.
3678 (record_full_ops): Now a record_full_target.
3679 (record_full_core_ops): Now a record_full_core_target.
3680 (record_full_target::detach, record_full_target::disconnect)
3681 (record_full_core_target::disconnect)
3682 (record_full_target::mourn_inferior, record_full_target::kill):
3684 (record_full_open, record_full_close, record_full_async): Refactor
3685 as methods of the record_full_base_target class.
3686 (record_full_resume, record_full_commit_resume): Refactor
3687 as methods of the record_full_target class.
3688 (record_full_wait, record_full_stopped_by_watchpoint)
3689 (record_full_stopped_data_address)
3690 (record_full_stopped_by_sw_breakpoint)
3691 (record_full_supports_stopped_by_sw_breakpoint)
3692 (record_full_stopped_by_hw_breakpoint)
3693 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3694 methods of the record_full_base_target class.
3695 (record_full_store_registers, record_full_xfer_partial)
3696 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3697 Refactor as methods of the record_full_target class.
3698 (record_full_can_execute_reverse, record_full_get_bookmark)
3699 (record_full_goto_bookmark, record_full_execution_direction)
3700 (record_full_record_method, record_full_info, record_full_delete)
3701 (record_full_is_replaying, record_full_will_replay)
3702 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3703 (record_full_stop_replaying): Refactor as methods of the
3704 record_full_base_target class.
3705 (record_full_core_resume, record_full_core_kill)
3706 (record_full_core_fetch_registers)
3707 (record_full_core_prepare_to_store)
3708 (record_full_core_store_registers, record_full_core_xfer_partial)
3709 (record_full_core_insert_breakpoint)
3710 (record_full_core_remove_breakpoint)
3711 (record_full_core_has_execution): Refactor
3712 as methods of the record_full_core_target class.
3713 (record_full_base_target::supports_delete_record): New.
3714 (init_record_full_ops): Delete.
3715 (init_record_full_core_ops): Delete.
3716 (record_full_save): Refactor as method of the
3717 record_full_base_target class.
3718 (_initialize_record_full): Remove references to
3719 init_record_full_ops and init_record_full_core_ops.
3721 * remote.c (remote_target, extended_remote_target): New classes.
3722 (remote_ops): Now a remote_target.
3723 (extended_remote_ops): Now an extended_remote_target.
3724 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3725 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3726 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3727 (remote_pass_signals, remote_set_syscall_catchpoint)
3728 (remote_program_signals, )
3729 (remote_thread_always_alive): Remove target_ops parameter.
3730 (remote_thread_alive, remote_thread_name)
3731 (remote_update_thread_list, remote_threads_extra_info)
3732 (remote_static_tracepoint_marker_at)
3733 (remote_static_tracepoint_markers_by_strid)
3734 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3735 (remote_open): Refactor as methods of remote_target.
3736 (extended_remote_open, extended_remote_detach)
3737 (extended_remote_attach, extended_remote_post_attach):
3738 (extended_remote_supports_disable_randomization)
3739 (extended_remote_create_inferior): : Refactor as method of
3740 extended_remote_target.
3741 (remote_set_permissions, remote_open_1, remote_detach)
3742 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3743 (remote_resume, remote_commit_resume, remote_stop)
3744 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3745 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3746 (remote_prepare_to_store, remote_store_registers)
3747 (remote_flash_erase, remote_flash_done, remote_files_info)
3748 (remote_kill, remote_mourn, remote_insert_breakpoint)
3749 (remote_remove_breakpoint, remote_insert_watchpoint)
3750 (remote_watchpoint_addr_within_range)
3751 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3752 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3753 (remote_supports_stopped_by_sw_breakpoint)
3754 (remote_stopped_by_hw_breakpoint)
3755 (remote_supports_stopped_by_hw_breakpoint)
3756 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3757 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3758 (remote_verify_memory): Refactor as methods of remote_target.
3759 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3761 (remote_xfer_partial, remote_get_memory_xfer_limit)
3762 (remote_search_memory, remote_rcmd, remote_memory_map)
3763 (remote_pid_to_str, remote_get_thread_local_address)
3764 (remote_get_tib_address, remote_read_description): Refactor as
3765 methods of remote_target.
3766 (remote_target::fileio_open, remote_target::fileio_pwrite)
3767 (remote_target::fileio_pread, remote_target::fileio_close): New.
3768 (remote_hostio_readlink, remote_hostio_fstat)
3769 (remote_filesystem_is_local, remote_can_execute_reverse)
3770 (remote_supports_non_stop, remote_supports_disable_randomization)
3771 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3772 (remote_supports_enable_disable_tracepoint)
3773 (remote_supports_string_tracing)
3774 (remote_can_run_breakpoint_commands, remote_trace_init)
3775 (remote_download_tracepoint, remote_can_download_tracepoint)
3776 (remote_download_trace_state_variable, remote_enable_tracepoint)
3777 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3778 (remote_trace_start, remote_get_trace_status)
3779 (remote_get_tracepoint_status, remote_trace_stop)
3780 (remote_trace_find, remote_get_trace_state_variable_value)
3781 (remote_save_trace_data, remote_get_raw_trace_data)
3782 (remote_set_disconnected_tracing, remote_core_of_thread)
3783 (remote_set_circular_trace_buffer, remote_traceframe_info)
3784 (remote_get_min_fast_tracepoint_insn_len)
3785 (remote_set_trace_buffer_size, remote_set_trace_notes)
3786 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3787 (remote_disable_btrace, remote_teardown_btrace)
3788 (remote_read_btrace, remote_btrace_conf)
3789 (remote_augmented_libraries_svr4_read, remote_load)
3790 (remote_pid_to_exec_file, remote_can_do_single_step)
3791 (remote_execution_direction, remote_thread_handle_to_thread_info):
3792 Refactor as methods of remote_target.
3793 (init_remote_ops, init_extended_remote_ops): Delete.
3794 (remote_can_async_p, remote_is_async_p, remote_async)
3795 (remote_thread_events, remote_upload_tracepoints)
3796 (remote_upload_trace_state_variables): Refactor as methods of
3798 (_initialize_remote): Remove references to init_remote_ops and
3799 init_extended_remote_ops.
3801 * remote-sim.c (gdbsim_target): New class.
3802 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3803 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3804 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3805 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3806 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3807 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3808 Refactor as methods of gdbsim_target.
3809 (gdbsim_ops): Now a gdbsim_target.
3810 (init_gdbsim_ops): Delete.
3811 (gdbsim_cntrl_c): Adjust.
3812 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3814 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3815 (the_amd64_linux_nat_target): New.
3816 (amd64_linux_fetch_inferior_registers)
3817 (amd64_linux_store_inferior_registers): Refactor as methods of
3818 amd64_linux_nat_target.
3819 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3820 * i386-linux-nat.c: Don't include "linux-nat.h".
3821 (i386_linux_nat_target): New class.
3822 (the_i386_linux_nat_target): New.
3823 (i386_linux_fetch_inferior_registers)
3824 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3825 as methods of i386_linux_nat_target.
3826 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3827 * inf-child.c (inf_child_ops): Delete.
3828 (inf_child_fetch_inferior_registers)
3829 (inf_child_store_inferior_registers): Delete.
3830 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3831 methods of inf_child_target.
3832 (inf_child_target::supports_terminal_ours)
3833 (inf_child_target::terminal_init)
3834 (inf_child_target::terminal_inferior)
3835 (inf_child_target::terminal_ours_for_output)
3836 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3837 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3839 (inf_child_open, inf_child_disconnect, inf_child_close)
3840 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3841 (inf_child_post_startup_inferior, inf_child_can_run)
3842 (inf_child_pid_to_exec_file): Refactor as methods of
3844 (inf_child_follow_fork): Delete.
3845 (inf_child_target::can_create_inferior)
3846 (inf_child_target::can_attach): New.
3847 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3848 (inf_child_target::has_stack, inf_child_target::has_registers)
3849 (inf_child_target::has_execution): New.
3850 (inf_child_fileio_open, inf_child_fileio_pwrite)
3851 (inf_child_fileio_pread, inf_child_fileio_fstat)
3852 (inf_child_fileio_close, inf_child_fileio_unlink)
3853 (inf_child_fileio_readlink, inf_child_use_agent)
3854 (inf_child_can_use_agent): Refactor as methods of
3856 (return_zero, inf_child_target): Delete.
3857 (inf_child_target::inf_child_target): New.
3858 * inf-child.h: Include "target.h".
3859 (inf_child_target): Delete function prototype.
3860 (inf_child_target): New class.
3861 (inf_child_open_target, inf_child_mourn_inferior)
3862 (inf_child_maybe_unpush_target): Delete.
3863 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3864 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3865 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3866 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3867 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3868 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3869 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3870 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3871 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3872 methods of inf_ptrace_target.
3873 (inf_ptrace_target): Delete function.
3874 * inf-ptrace.h: Include "inf-child.h".
3875 (inf_ptrace_target): Delete function declaration.
3876 (inf_ptrace_target): New class.
3877 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3878 * linux-nat.c (linux_target): New.
3879 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3880 (linux_nat_target::~linux_nat_target): New.
3881 (linux_child_post_attach, linux_child_post_startup_inferior)
3882 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3883 (linux_child_remove_fork_catchpoint)
3884 (linux_child_insert_vfork_catchpoint)
3885 (linux_child_remove_vfork_catchpoint)
3886 (linux_child_insert_exec_catchpoint)
3887 (linux_child_remove_exec_catchpoint)
3888 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3889 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3890 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3891 (linux_nat_stopped_data_address)
3892 (linux_nat_stopped_by_sw_breakpoint)
3893 (linux_nat_supports_stopped_by_sw_breakpoint)
3894 (linux_nat_stopped_by_hw_breakpoint)
3895 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3896 (linux_nat_kill, linux_nat_mourn_inferior)
3897 (linux_nat_xfer_partial, linux_nat_thread_alive)
3898 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3899 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3900 (linux_child_static_tracepoint_markers_by_strid)
3901 (linux_nat_is_async_p, linux_nat_can_async_p)
3902 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3903 (linux_nat_supports_multi_process)
3904 (linux_nat_supports_disable_randomization, linux_nat_async)
3905 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3906 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3907 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3908 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3909 methods of linux_nat_target.
3910 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3911 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3913 (check_stopped_by_watchpoint): Adjust.
3914 (linux_xfer_partial): Delete.
3915 (linux_target_install_ops, linux_target, linux_nat_add_target):
3917 (linux_nat_target::linux_nat_target): New.
3918 * linux-nat.h: Include "inf-ptrace.h".
3919 (linux_nat_target): New.
3920 (linux_target, linux_target_install_ops, linux_nat_add_target):
3921 Delete function declarations.
3922 (linux_target): Declare global.
3923 * linux-thread-db.c (thread_db_target): New.
3924 (thread_db_target::thread_db_target): New.
3925 (thread_db_ops): Delete.
3926 (the_thread_db_target): New.
3927 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3928 (thread_db_update_thread_list, thread_db_pid_to_str)
3929 (thread_db_extra_thread_info)
3930 (thread_db_thread_handle_to_thread_info)
3931 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3932 (thread_db_resume): Refactor as methods of thread_db_target.
3933 (init_thread_db_ops): Delete.
3934 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3935 * x86-linux-nat.c: Don't include "linux-nat.h".
3936 (super_post_startup_inferior): Delete.
3937 (x86_linux_nat_target::~x86_linux_nat_target): New.
3938 (x86_linux_child_post_startup_inferior)
3939 (x86_linux_read_description, x86_linux_enable_btrace)
3940 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3941 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3942 methods of x86_linux_nat_target.
3943 (x86_linux_create_target): Delete. Bits folded ...
3944 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3946 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3947 (x86_linux_nat_target): New class.
3948 (x86_linux_create_target): Delete.
3949 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3950 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3951 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3952 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3953 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3954 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3956 (x86_use_watchpoints): Delete.
3957 * x86-nat.h: Include "breakpoint.h" and "target.h".
3958 (x86_use_watchpoints): Delete.
3959 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3960 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3961 (x86_insert_watchpoint, x86_remove_watchpoint)
3962 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3963 (x86_stopped_by_hw_breakpoint): New declarations.
3964 (x86_nat_target): New template class.
3966 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3967 (the_ppc_linux_nat_target): New.
3968 (ppc_linux_fetch_inferior_registers)
3969 (ppc_linux_can_use_hw_breakpoint)
3970 (ppc_linux_region_ok_for_hw_watchpoint)
3971 (ppc_linux_ranged_break_num_registers)
3972 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3973 (ppc_linux_insert_mask_watchpoint)
3974 (ppc_linux_remove_mask_watchpoint)
3975 (ppc_linux_can_accel_watchpoint_condition)
3976 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3977 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3978 (ppc_linux_watchpoint_addr_within_range)
3979 (ppc_linux_masked_watch_num_registers)
3980 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3981 (ppc_linux_read_description): Refactor as methods of
3982 ppc_linux_nat_target.
3983 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3985 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3986 (procfs_target): New class.
3987 (the_procfs_target): New.
3988 (procfs_target): Delete function.
3989 (procfs_auxv_parse, procfs_attach, procfs_detach)
3990 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3991 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3992 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3993 (procfs_create_inferior, procfs_update_thread_list)
3994 (procfs_thread_alive, procfs_pid_to_str)
3995 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3996 (procfs_stopped_data_address, procfs_insert_watchpoint)
3997 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3998 (proc_find_memory_regions, procfs_info_proc)
3999 (procfs_make_note_section): Refactor as methods of procfs_target.
4000 (_initialize_procfs): Adjust.
4001 * sol-thread.c (sol_thread_target): New class.
4002 (sol_thread_ops): Now a sol_thread_target.
4003 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4004 (sol_thread_fetch_registers, sol_thread_store_registers)
4005 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4006 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4007 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4008 (init_sol_thread_ops): Delete.
4009 (_initialize_sol_thread): Adjust. Remove references to
4010 init_sol_thread_ops and complete_target_initialization.
4012 * windows-nat.c (windows_nat_target): New class.
4013 (windows_fetch_inferior_registers)
4014 (windows_store_inferior_registers, windows_resume, windows_wait)
4015 (windows_attach, windows_detach, windows_pid_to_exec_file)
4016 (windows_files_info, windows_create_inferior)
4017 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4018 (windows_close, windows_pid_to_str, windows_xfer_partial)
4019 (windows_get_tib_address, windows_get_ada_task_ptid)
4020 (windows_thread_name, windows_thread_alive): Refactor as
4021 windows_nat_target methods.
4022 (do_initial_windows_stuff): Adjust.
4023 (windows_target): Delete function.
4024 (_initialize_windows_nat): Adjust.
4026 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4027 (darwin_mourn_inferior, darwin_kill_inferior)
4028 (darwin_create_inferior, darwin_attach, darwin_detach)
4029 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4030 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4031 (darwin_supports_multi_process): Refactor as darwin_nat_target
4033 (darwin_resume_to, darwin_files_info): Delete.
4034 (_initialize_darwin_inferior): Rename to ...
4035 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4036 * darwin-nat.h: Include "inf-child.h".
4037 (darwin_nat_target): New class.
4038 (darwin_complete_target): Delete.
4039 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4040 (darwin_target): New.
4041 (i386_darwin_fetch_inferior_registers)
4042 (i386_darwin_store_inferior_registers): Refactor as methods of
4044 (darwin_complete_target): Delete, with ...
4045 (_initialize_i386_darwin_nat): ... bits factored out here.
4047 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4048 (the_alpha_linux_nat_target): New.
4049 (alpha_linux_register_u_offset): Refactor as
4050 alpha_linux_nat_target method.
4051 (_initialize_alpha_linux_nat): Adjust.
4052 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4053 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4054 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4055 methods of linux_nat_trad_target.
4056 (linux_trad_target): Delete.
4057 * linux-nat-trad.h (linux_trad_target): Delete function.
4058 (linux_nat_trad_target): New class.
4059 * mips-linux-nat.c (mips_linux_nat_target): New class.
4060 (super_fetch_registers, super_store_registers, super_close):
4062 (the_mips_linux_nat_target): New.
4063 (mips64_linux_regsets_fetch_registers)
4064 (mips64_linux_regsets_store_registers)
4065 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4066 (mips_linux_register_u_offset, mips_linux_read_description)
4067 (mips_linux_can_use_hw_breakpoint)
4068 (mips_linux_stopped_by_watchpoint)
4069 (mips_linux_stopped_data_address)
4070 (mips_linux_region_ok_for_hw_watchpoint)
4071 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4072 (mips_linux_close): Refactor as methods of mips_linux_nat.
4073 (_initialize_mips_linux_nat): Adjust to C++ification.
4075 * aix-thread.c (aix_thread_target): New class.
4076 (aix_thread_ops): Now an aix_thread_target.
4077 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4078 (aix_thread_fetch_registers, aix_thread_store_registers)
4079 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4080 (aix_thread_thread_alive, aix_thread_pid_to_str)
4081 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4082 Refactor as methods of aix_thread_target.
4083 (init_aix_thread_ops): Delete.
4084 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4085 and complete_target_initialization.
4086 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4087 (rs6000_nat_target): New class.
4088 (the_rs6000_nat_target): New.
4089 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4090 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4091 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4092 (super_create_inferior): Delete.
4093 (_initialize_rs6000_nat): Adjust to C++ification.
4095 * arm-linux-nat.c (arm_linux_nat_target): New class.
4096 (the_arm_linux_nat_target): New.
4097 (arm_linux_fetch_inferior_registers)
4098 (arm_linux_store_inferior_registers, arm_linux_read_description)
4099 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4100 (arm_linux_remove_hw_breakpoint)
4101 (arm_linux_region_ok_for_hw_watchpoint)
4102 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4103 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4104 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4105 arm_linux_nat_target.
4106 (_initialize_arm_linux_nat): Adjust to C++ification.
4108 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4109 (the_aarch64_linux_nat_target): New.
4110 (aarch64_linux_fetch_inferior_registers)
4111 (aarch64_linux_store_inferior_registers)
4112 (aarch64_linux_child_post_startup_inferior)
4113 (aarch64_linux_read_description)
4114 (aarch64_linux_can_use_hw_breakpoint)
4115 (aarch64_linux_insert_hw_breakpoint)
4116 (aarch64_linux_remove_hw_breakpoint)
4117 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4118 (aarch64_linux_region_ok_for_hw_watchpoint)
4119 (aarch64_linux_stopped_data_address)
4120 (aarch64_linux_stopped_by_watchpoint)
4121 (aarch64_linux_watchpoint_addr_within_range)
4122 (aarch64_linux_can_do_single_step): Refactor as methods of
4123 aarch64_linux_nat_target.
4124 (super_post_startup_inferior): Delete.
4125 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4127 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4128 (the_hppa_linux_nat_target): New.
4129 (hppa_linux_fetch_inferior_registers)
4130 (hppa_linux_store_inferior_registers): Refactor as methods of
4131 hppa_linux_nat_target.
4132 (_initialize_hppa_linux_nat): Adjust to C++ification.
4134 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4135 (the_ia64_linux_nat_target): New.
4136 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4137 (ia64_linux_stopped_data_address)
4138 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4139 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4140 ia64_linux_nat_target methods.
4141 (super_xfer_partial): Delete.
4142 (_initialize_ia64_linux_nat): Adjust to C++ification.
4144 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4145 (the_m32r_linux_nat_target): New.
4146 (m32r_linux_fetch_inferior_registers)
4147 (m32r_linux_store_inferior_registers): Refactor as
4148 m32r_linux_nat_target methods.
4149 (_initialize_m32r_linux_nat): Adjust to C++ification.
4151 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4152 (the_m68k_linux_nat_target): New.
4153 (m68k_linux_fetch_inferior_registers)
4154 (m68k_linux_store_inferior_registers): Refactor as
4155 m68k_linux_nat_target methods.
4156 (_initialize_m68k_linux_nat): Adjust to C++ification.
4158 * s390-linux-nat.c (s390_linux_nat_target): New class.
4159 (the_s390_linux_nat_target): New.
4160 (s390_linux_fetch_inferior_registers)
4161 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4162 (s390_insert_watchpoint, s390_remove_watchpoint)
4163 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4164 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4165 (s390_auxv_parse, s390_read_description): Refactor as methods of
4166 s390_linux_nat_target.
4167 (_initialize_s390_nat): Adjust to C++ification.
4169 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4170 (the_sparc_linux_nat_target): New.
4171 (_initialize_sparc_linux_nat): Adjust to C++ification.
4172 * sparc-nat.c (sparc_fetch_inferior_registers)
4173 (sparc_store_inferior_registers): Remove target_ops parameter.
4174 * sparc-nat.h (sparc_fetch_inferior_registers)
4175 (sparc_store_inferior_registers): Remove target_ops parameter.
4176 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4177 (the_sparc64_linux_nat_target): New.
4178 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4180 * spu-linux-nat.c (spu_linux_nat_target): New class.
4181 (the_spu_linux_nat_target): New.
4182 (spu_child_post_startup_inferior, spu_child_post_attach)
4183 (spu_child_wait, spu_fetch_inferior_registers)
4184 (spu_store_inferior_registers, spu_xfer_partial)
4185 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4187 (_initialize_spu_nat): Adjust to C++ification.
4189 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4190 (the_tilegx_linux_nat_target): New.
4191 (fetch_inferior_registers, store_inferior_registers):
4192 Refactor as methods.
4193 (_initialize_tile_linux_nat): Adjust to C++ification.
4195 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4196 (the_xtensa_linux_nat_target): New.
4197 (xtensa_linux_fetch_inferior_registers)
4198 (xtensa_linux_store_inferior_registers): Refactor as
4199 xtensa_linux_nat_target methods.
4200 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4202 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4203 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4204 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4205 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4206 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4207 (fbsd_stopped_by_sw_breakpoint)
4208 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4209 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4210 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4211 (fbsd_post_startup_inferior, fbsd_post_attach)
4212 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4213 (fbsd_set_syscall_catchpoint)
4214 (super_xfer_partial, super_resume, super_wait)
4215 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4216 (fbsd_handle_debug_trap): Remove target_ops parameter.
4217 (fbsd_nat_add_target): Delete.
4218 * fbsd-nat.h: Include "inf-ptrace.h".
4219 (fbsd_nat_add_target): Delete.
4220 (USE_SIGTRAP_SIGINFO): Define.
4221 (fbsd_nat_target): New class.
4223 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4224 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4225 (amd64bsd_target): Delete.
4226 * amd64-bsd-nat.h: New file.
4227 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4229 (amd64_fbsd_nat_target): New class.
4230 (the_amd64_fbsd_nat_target): New.
4231 (amd64fbsd_read_description): Refactor as method of
4232 amd64_fbsd_nat_target.
4233 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4234 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4235 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4236 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4237 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4238 (i386bsd_target): Delete.
4239 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4240 (i386bsd_fetch_inferior_registers)
4241 (i386bsd_store_inferior_registers): Declare.
4242 (i386_bsd_nat_target): New class.
4243 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4244 (the_i386_fbsd_nat_target): New.
4245 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4246 i386_fbsd_nat_target methods.
4247 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4248 (_initialize_i386fbsd_nat): Adjust to C++ification.
4249 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4250 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4251 (_initialize_x86_bsd_nat): Adjust to C++ification.
4252 * x86-bsd-nat.h: Include "x86-nat.h".
4253 (x86bsd_target): Delete declaration.
4254 (x86bsd_nat_target): New class.
4256 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4257 (the_aarch64_fbsd_nat_target): New.
4258 (aarch64_fbsd_fetch_inferior_registers)
4259 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4260 aarch64_fbsd_nat_target.
4261 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4262 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4263 (the_alpha_bsd_nat_target): New.
4264 (alphabsd_fetch_inferior_registers)
4265 (alphabsd_store_inferior_registers): Refactor as
4266 alpha_bsd_nat_target methods.
4267 (_initialize_alphabsd_nat): Refactor as methods of
4268 alpha_bsd_nat_target.
4269 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4270 (the_amd64_nbsd_nat_target): New.
4271 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4272 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4273 (the_amd64_obsd_nat_target): New.
4274 (_initialize_amd64obsd_nat): Adjust to C++ification.
4275 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4276 (the_arm_fbsd_nat_target): New.
4277 (arm_fbsd_fetch_inferior_registers)
4278 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4279 (_initialize_arm_fbsd_nat): Refactor as methods of
4280 arm_fbsd_nat_target.
4281 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4282 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4283 (the_arm_netbsd_nat_target): New.
4284 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4285 arm_netbsd_nat_target.
4286 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4287 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4288 (the_hppa_nbsd_nat_target): New.
4289 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4290 hppa_nbsd_nat_target methods.
4291 (_initialize_hppanbsd_nat): Adjust to C++ification.
4292 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4293 (the_hppa_obsd_nat_target): New.
4294 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4295 methods of hppa_obsd_nat_target.
4296 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4298 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4299 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4301 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4302 (_initialize_i386obsd_nat): Use add_target.
4303 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4304 (the_m68k_bsd_nat_target): New.
4305 (m68kbsd_fetch_inferior_registers)
4306 (m68kbsd_store_inferior_registers): Refactor as methods of
4307 m68k_bsd_nat_target.
4308 (_initialize_m68kbsd_nat): Adjust to C++ification.
4309 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4310 (the_mips_fbsd_nat_target): New.
4311 (mips_fbsd_fetch_inferior_registers)
4312 (mips_fbsd_store_inferior_registers): Refactor as methods of
4313 mips_fbsd_nat_target.
4314 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4316 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4317 (the_mips_nbsd_nat_target): New.
4318 (mipsnbsd_fetch_inferior_registers)
4319 (mipsnbsd_store_inferior_registers): Refactor as methods of
4320 mips_nbsd_nat_target.
4321 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4322 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4323 (the_mips64_obsd_nat_target): New.
4324 (mips64obsd_fetch_inferior_registers)
4325 (mips64obsd_store_inferior_registers): Refactor as methods of
4326 mips64_obsd_nat_target.
4327 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4329 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4331 * nbsd-nat.h: Include "inf-ptrace.h".
4332 (nbsd_nat_target): New class.
4333 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4334 (obsd_wait): Refactor as methods of obsd_nat_target.
4335 (obsd_add_target): Delete.
4336 * obsd-nat.h: Include "inf-ptrace.h".
4337 (obsd_nat_target): New class.
4338 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4339 (the_ppc_fbsd_nat_target): New.
4340 (ppcfbsd_fetch_inferior_registers)
4341 (ppcfbsd_store_inferior_registers): Refactor as methods of
4342 ppc_fbsd_nat_target.
4343 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4345 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4346 (the_ppc_nbsd_nat_target): New.
4347 (ppcnbsd_fetch_inferior_registers)
4348 (ppcnbsd_store_inferior_registers): Refactor as methods of
4349 ppc_nbsd_nat_target.
4350 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4351 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4352 (the_ppc_obsd_nat_target): New.
4353 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4354 methods of ppc_obsd_nat_target.
4355 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4357 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4358 (the_sh_nbsd_nat_target): New.
4359 (shnbsd_fetch_inferior_registers)
4360 (shnbsd_store_inferior_registers): Refactor as methods of
4362 (_initialize_shnbsd_nat): Adjust to C++ification.
4363 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4364 (inf_ptrace_xfer_partial): Delete.
4365 (sparc_xfer_partial, sparc_target): Delete.
4366 * sparc-nat.h (sparc_fetch_inferior_registers)
4367 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4368 (sparc_target): Delete function declaration.
4369 (sparc_target): New template class.
4370 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4371 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4372 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4373 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4375 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4376 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4377 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4378 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4380 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4381 (the_vax_bsd_nat_target): New.
4382 (vaxbsd_fetch_inferior_registers)
4383 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4385 (_initialize_vaxbsd_nat): Adjust to C++ification.
4387 * bsd-kvm.c (bsd_kvm_target): New class.
4388 (bsd_kvm_ops): Now a bsd_kvm_target.
4389 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4390 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4391 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4393 (bsd_kvm_return_one): Delete.
4394 (bsd_kvm_add_target): Adjust to C++ification.
4396 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4397 (nto_procfs_target_procfs): New classes.
4398 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4399 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4400 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4401 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4402 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4403 (procfs_remove_hw_breakpoint, procfs_resume)
4404 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4405 (procfs_kill_inferior, procfs_store_registers)
4406 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4407 as methods of nto_procfs_target.
4408 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4409 (nto_native_ops): Delete.
4410 (procfs_open, procfs_native_open): Delete.
4411 (nto_native_ops): Now an nto_procfs_target_native.
4412 (init_procfs_targets): Adjust to C++ification.
4413 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4414 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4415 Refactor as methods of nto_procfs_target.
4417 * go32-nat.c (go32_nat_target): New class.
4418 (the_go32_nat_target): New.
4419 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4420 (go32_store_registers, go32_xfer_partial, go32_files_info)
4421 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4422 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4423 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4424 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4425 (go32_target): Delete.
4426 (_initialize_go32_nat): Adjust to C++ification.
4428 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4429 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4430 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4431 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4433 (gnu_target): Delete.
4434 * gnu-nat.h (gnu_target): Delete.
4435 (gnu_nat_target): New class.
4436 * i386-gnu-nat.c (gnu_base_target): New.
4437 (i386_gnu_nat_target): New class.
4438 (the_i386_gnu_nat_target): New.
4439 (_initialize_i386gnu_nat): Adjust to C++ification.
4441 2018-05-02 Pedro Alves <palves@redhat.com>
4443 * bfd-target.c (target_bfd_xclose): Rename to ...
4444 (target_bfd_close): ... this.
4445 (target_bfd_reopen): Adjust.
4446 * target.c (target_close): Remove references to to_xclose.
4447 * target.h (target_ops::to_xclose): Delete.
4448 (target_ops::to_close): Update comments.
4450 2018-05-02 Pedro Alves <palves@redhat.com>
4452 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4454 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4455 * inf-ptrace.c (inf_ptrace_register_u_offset)
4456 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4457 (inf_ptrace_store_register, inf_ptrace_store_registers)
4458 (inf_ptrace_trad_target): Move to ...
4459 * linux-nat-trad.c: ... this new file.
4460 * linux-nat-trad.h: New file.
4461 * linux-nat.c (linux_target_install_ops): Make extern.
4462 (linux_trad_target): Delete.
4463 * linux-nat.h (linux_trad_target): Delete declaration.
4464 (linux_target_install_ops): Declare.
4465 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4468 2018-05-02 Pedro Alves <palves@redhat.com>
4470 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4471 procfs_target/add_target here.
4472 * procfs.c (procfs_target): Make static.
4473 (_initialize_procfs): Call add_target here.
4474 * procfs.h (struct target_ops): Remove forward declaration.
4475 (procfs_target): Remove declaration.
4476 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4478 2018-05-02 Pedro Alves <palves@redhat.com>
4480 * procfs.c (procfs_stopped_by_watchpoint)
4481 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4482 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4484 (procfs_use_watchpoints): Delete, move contents...
4485 (procfs_target): ... here.
4486 * procfs.h (procfs_use_watchpoints): Delete declaration.
4487 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4488 procfs_use_watchpoints.
4489 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4490 procfs_use_watchpoints.
4492 2018-05-02 Tom Tromey <tom@tromey.com>
4495 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4496 and var_zuinteger_unlimited.
4497 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4498 and PARAM_ZUINTEGER_UNLIMITED.
4499 (set_parameter_value): Handle var_zuinteger and
4500 var_zuinteger_unlimited.
4501 (add_setshow_generic): Likewise.
4502 (parmpy_init): Likewise.
4504 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4507 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4508 pointer is not null before dereferencing it.
4510 2018-04-30 Tom Tromey <tom@tromey.com>
4512 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4515 2018-04-30 Tom Tromey <tom@tromey.com>
4517 * breakpoint.c (mention): Remove use of is_mi_like_p.
4518 (print_mention_ranged_breakpoint): Likewise.
4519 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4522 2018-04-30 Tom Tromey <tom@tromey.com>
4524 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4526 2018-04-30 Tom Tromey <tom@tromey.com>
4528 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4529 (info_spu_event_command): Remove some uses of is_mi_like_p.
4531 2018-04-30 Tom Tromey <tom@tromey.com>
4533 * python/py-framefilter.c (py_print_single_arg)
4534 (enumerate_locals, py_print_args, py_print_frame): Remove some
4535 uses of is_mi_like_p.
4537 2018-04-30 Tom Tromey <tom@tromey.com>
4540 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4541 * ui-out.h (ui_out::is_mi_like_p): Now const.
4542 (ui_out::do_is_mi_like_p): Now const.
4543 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4545 2018-04-30 Tom Tromey <tom@tromey.com>
4547 * varobj.c (varobj_set_visualizer): Use new_reference.
4548 * python/python.c (gdbpy_decode_line): Use new_reference.
4549 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4552 2018-04-30 Tom Tromey <tom@tromey.com>
4554 * varobj.c (install_new_value): Use new_reference.
4555 * value.h (value_incref): Return void. Swap intro comment with
4557 * value.c (set_value_parent): Use new_reference.
4558 (value_incref): Return void. Update intro comment.
4559 (release_value): Use new_reference.
4560 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4562 2018-04-30 Tom Tromey <tom@tromey.com>
4564 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4565 * gdb_bfd.h (new_bfd_ref): Remove.
4566 (gdb_bfd_open): Update comment.
4567 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4568 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4569 (gdb_bfd_fdopenr): Use new_reference.
4570 * exec.c (exec_file_attach): Use new_reference.
4572 2018-04-30 Tom Tromey <tom@tromey.com>
4574 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4577 2018-04-30 Tom Tromey <tom@tromey.com>
4579 * jit.c (jit_read_code_entry): Use type_align.
4580 * i386-tdep.c (i386_gdbarch_init): Don't call
4581 set_gdbarch_long_long_align_bit.
4582 * gdbarch.sh: Remove long_long_align_bit.
4583 * gdbarch.c, gdbarch.h: Rebuild.
4584 * arc-tdep.c (arc_type_align): New function.
4585 (arc_gdbarch_init): Use arc_type_align. Don't call
4586 set_gdbarch_long_long_align_bit.
4588 2018-04-30 Tom Tromey <tom@tromey.com>
4590 * rust-lang.c (rust_type_alignment): Remove.
4591 (rust_composite_type): Use type_align.
4593 2018-04-30 Tom Tromey <tom@tromey.com>
4595 * NEWS: Mention Type.align.
4596 * python/py-type.c (typy_get_alignof): New function.
4597 (type_object_getset): Add "alignof".
4599 2018-04-30 Tom Tromey <tom@tromey.com>
4603 * std-operator.def (UNOP_ALIGNOF): New operator.
4604 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4606 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4607 * c-lang.c (c_op_print_tab): Add alignof.
4608 * c-exp.y (ALIGNOF): New token.
4609 (exp): Add "ALIGNOF" production.
4610 (ident_tokens): Add _Alignof and alignof.
4612 2018-04-30 Tom Tromey <tom@tromey.com>
4614 * i386-tdep.c (i386_type_align): New function.
4615 (i386_gdbarch_init): Update.
4616 * gdbarch.sh (type_align): New method.
4617 * gdbarch.c, gdbarch.h: Rebuild.
4618 * arch-utils.h (default_type_align): Declare.
4619 * arch-utils.c (default_type_align): New function.
4620 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4621 (struct type) <align_log2>: New field.
4622 <instance_flags>: Now a bitfield.
4623 (TYPE_RAW_ALIGN): New macro.
4624 (type_align, type_raw_align, set_type_align): Declare.
4625 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4627 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4628 (get_alignment, maybe_set_alignment): New functions.
4629 (read_structure_type, read_enumeration_type, read_array_type)
4630 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4631 (read_subrange_type, read_base_type): Set type alignment.
4633 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4635 * dwarf2read.c (read_index_from_section): Use bool.
4637 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4640 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4643 2018-04-29 John Reiser <jreiser@BitWagon.com>
4646 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4647 last step, and do it atomically.
4649 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4651 * compile/compile-c-types.c (convert_int, convert_float):
4654 2018-04-27 Tom Tromey <tom@tromey.com>
4657 * rust-lang.c (rust_inclusive_range_type_p): New function.
4658 (rust_range): Handle inclusive ranges.
4659 (rust_compute_range): Likewise.
4660 * rust-exp.y (struct rust_op) <inclusive>: New field.
4661 (DOTDOTEQ): New constant.
4662 (range_expr): Add "..=" productions.
4663 (operator_tokens): Add "..=" token.
4664 (ast_range): Add "inclusive" parameter.
4665 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4667 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4669 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4670 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4672 * expprint.c (print_subexp_standard): Handle new bounds values.
4673 (dump_subexp_body_standard): Likewise.
4675 2018-04-27 Tom Tromey <tom@tromey.com>
4677 * configure: Rebuild.
4678 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4679 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4681 (class symbol_needs_eval_context): Likewise.
4682 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4683 (mock_mapped_index::symbol_name_at): Use "override". Remove
4685 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4687 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4688 * aarch64-tdep.c (instruction_reader::read): Use "override".
4689 (instruction_reader_test::read): Likewise.
4690 * arm-tdep.c (instruction_reader::read): Use "override".
4691 (instruction_reader_thumb::read): Likewise.
4693 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4696 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4697 instead of remote_send.
4698 (remote_send): Remove.
4700 2018-04-26 Pedro Alves <palves@redhat.com>
4702 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4703 find_function_start_sal instead of find_pc_line.
4705 2018-04-26 Pedro Alves <palves@redhat.com>
4707 * breakpoint.c (set_breakpoint_location_function): Handle
4709 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4710 * elfread.c (elf_symtab_read): Give data symbols with
4711 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4712 (elf_rel_plt_read): Update comment.
4713 * linespec.c (convert_linespec_to_sals): Handle
4715 (minsym_found): Handle mst_data_gnu_ifunc.
4716 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4717 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4718 * parse.c (find_minsym_type_and_address): Handle
4720 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4721 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4722 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4724 <mst_data_gnu_ifunc>: New enumerator.
4726 2018-04-26 Pedro Alves <palves@redhat.com>
4728 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4729 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4730 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4732 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4733 (lookup_minimal_symbol_by_pc): Adjust.
4734 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4735 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4736 * minsyms.h (lookup_msym_prefer): New enum.
4737 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4738 parameter by a lookup_msym_prefer parameter.
4740 2018-04-26 Pedro Alves <palves@redhat.com>
4742 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4743 ends in "@plt" instead of looking at the symbol's section.
4745 2018-04-26 Pedro Alves <palves@redhat.com>
4747 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4749 (find_pc_partial_function_gnu_ifunc): Rename to ...
4750 (find_pc_partial_function): ... this, and remove references to
4752 (find_pc_partial_function): Delete old implementation.
4753 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4755 2018-04-26 Pedro Alves <palves@redhat.com>
4757 * linespec.c (struct bound_minimal_symbol_search_key): New.
4758 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4759 skip first line if we found a GNU ifunc minimal symbol by name.
4760 (compare_msymbols): Change parameters to work with a destructured
4762 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4765 2018-04-26 Pedro Alves <palves@redhat.com>
4767 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4768 ifunc targets here. Instead, if we have an ifunc minsym, use its
4770 (add_location_to_breakpoint): Store the minsym and the objfile in
4771 the breakpoint location.
4772 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4773 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4774 Record the minsym in the sal.
4775 * symtab.h (symtab_and_line) <msymbol>: New field.
4777 2018-04-26 Pedro Alves <palves@redhat.com>
4779 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4780 unless we actually resolved the ifunc.
4782 2018-04-26 Pedro Alves <palves@redhat.com>
4784 * c-exp.y (variable production): Prefer ifunc minsyms over
4785 regular function symbols.
4786 * symtab.c (find_gnu_ifunc): New function.
4787 * minsyms.h (lookup_msym_prefer): New enum.
4788 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4789 parameter by a lookup_msym_prefer parameter.
4790 * symtab.h (find_gnu_ifunc): New declaration.
4792 2018-04-26 Pedro Alves <palves@redhat.com>
4794 * blockframe.c (find_gnu_ifunc_target_type): New function.
4795 (find_function_type): New.
4796 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4797 return a value with a memory address.
4798 (eval_call): For calls to GNU ifunc functions, try to find the
4799 type of the target function from the type that the resolver
4801 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4803 * infcall.c (find_function_return_type): Delete.
4804 (find_function_addr): Add 'function_type' parameter. For calls to
4805 GNU ifunc functions, try to find the type of the target function
4806 from the type that the resolver returns, and return it via
4808 (call_function_by_hand_dummy): Adjust to use the function type
4809 returned by find_function_addr.
4810 (find_function_addr): Add 'function_type' parameter and move
4812 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4815 2018-04-26 Pedro Alves <palves@redhat.com>
4817 * c-exp.y (variable production): Skip finding an alias for ifunc
4820 2018-04-26 Pedro Alves <palves@redhat.com>
4822 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4824 2018-04-25 Pedro Alves <palves@redhat.com>
4826 * infcmd.c (kill_command): Print the pid as string, not the whole
4827 thread's ptid. Add comment. s/has been killed/killed/ in output
4829 * remote.c (remote_detach_1): Print the pid as string, not the
4830 whole thread's ptid.
4832 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4833 Sergio Durigan Junior <sergiodj@redhat.com>
4834 Pedro Alves <palves@redhat.com>
4836 * infcmd.c (kill_command): Print message when inferior has
4838 * inferior.c (print_inferior_events): Remove 'static'. Set as
4840 (add_inferior): Improve message printed when
4841 'print_inferior_events' is on.
4842 (exit_inferior): Remove message printed when
4843 'print_inferior_events' is on.
4844 (detach_inferior): Improve message printed when
4845 'print_inferior_events' is on.
4846 (initialize_inferiors): Use 'add_inferior_silent' to set
4847 'current_inferior_'.
4848 * inferior.h (print_inferior_events): Declare here as
4850 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4851 '[Detaching...]' messages when 'print_inferior_events' is on.
4852 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4853 as prefix/suffix for messages. Remove periods. Fix erroneous
4854 'Detaching after fork from child...', replace it by '... from
4856 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4857 prefix/suffix when printing 'Detaching...' messages. Print
4858 them when 'print_inferior_events' is on.
4859 * remote.c (remote_detach_1): Print message when detaching
4860 from inferior and '!is_fork_parent'.
4862 2018-04-24 Tom Tromey <tom@tromey.com>
4864 * cli-out.h: Reindent.
4866 2018-04-24 Tom Tromey <tom@tromey.com>
4868 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4869 (cli_ui_out::do_field_string): Use fputs_filtered.
4870 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4872 2018-04-23 Tom Tromey <tom@tromey.com>
4874 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4875 gdb::unique_xmalloc_ptr.
4877 2018-04-23 Tom Tromey <tom@tromey.com>
4879 * configure: Rebuild.
4881 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4884 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4885 prepare_for_testing. Set normal_bp to r_debug_state if target
4888 2018-04-21 Pedro Alves <palves@redhat.com>
4889 Rajendra SY <rajendra.sy@gmail.com>
4891 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4892 * remote.c (extended_remote_attach): In all-stop mode, mark the
4893 thread as executing.
4895 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4897 * thread.c (thread_apply_all_command): Fix comment.
4898 (thread_command): Fix comment.
4900 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4902 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4904 * features/aarch64-core.c (create_feature_aarch64_core):
4906 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4908 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4910 * features/i386/32bit-avx512.c
4911 (create_feature_i386_32bit_avx512): Likewise.
4912 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4914 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4916 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4918 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4920 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4922 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4924 * features/i386/64bit-avx512.c
4925 (create_feature_i386_64bit_avx512): Likewise.
4926 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4928 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4930 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4932 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4934 * features/i386/64bit-segments.c
4935 (create_feature_i386_64bit_segments): Likewise.
4936 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4938 * features/i386/x32-core.c
4939 (create_feature_i386_x32_core): Likewise.
4940 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4941 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4942 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4943 * target-descriptions.c: In generated code, don't pass xml
4946 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4948 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4949 (print_xml_feature::visit_post): Likewise.
4950 (print_xml_feature::visit): Likewise.
4951 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4952 (print_xml_feature): Add new class.
4953 * regformats/regdat.sh: Null xmltarget on feature targets.
4954 * target-descriptions.c (struct target_desc): Add xmltarget.
4955 (maintenance_check_tdesc_xml_convert): Add unittest function.
4956 (tdesc_get_features_xml): Add function to get xml.
4957 (maintenance_check_xml_descriptions): Test xml generation.
4958 * xml-tdesc.c (string_read_description_xml): Add function.
4959 * xml-tdesc.h (string_read_description_xml): Add declaration.
4961 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4963 * features/Makefile: Add feature marker to targets with new style
4964 target descriptions.
4965 * regformats/aarch64.dat: Regenerate.
4966 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4967 * regformats/i386/amd64-avx-linux.dat: Likewise.
4968 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4969 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4970 * regformats/i386/amd64-linux.dat: Likewise.
4971 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4972 * regformats/i386/amd64.dat: Likewise.
4973 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4974 * regformats/i386/i386-avx-linux.dat: Likewise.
4975 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4976 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4977 * regformats/i386/i386-linux.dat: Likewise.
4978 * regformats/i386/i386-mmx-linux.dat: Likewise.
4979 * regformats/i386/i386-mpx-linux.dat: Likewise.
4980 * regformats/i386/i386.dat: Likewise.
4981 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4982 * regformats/i386/x32-avx-linux.dat: Likewise.
4983 * regformats/i386/x32-linux.dat: Likewise.
4984 * regformats/tic6x-c62x-linux.dat: Likewise.
4985 * regformats/tic6x-c64x-linux.dat: Likewise.
4986 * regformats/tic6x-c64xp-linux.dat: Likewise.
4987 * regformats/regdat.sh: Parse feature marker.
4989 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4991 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4992 (tdesc_osabi_name): Likewise.
4993 * target-descriptions.c (tdesc_architecture_name): Add new
4995 (tdesc_osabi_name): Likewise.
4997 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4999 * common/tdesc.c (tdesc_predefined_type): Move to here.
5000 (tdesc_named_type): Likewise.
5001 (tdesc_create_vector): Likewise.
5002 (tdesc_create_struct): Likewise.
5003 (tdesc_set_struct_size): Likewise.
5004 (tdesc_create_union): Likewise.
5005 (tdesc_create_flags): Likewise.
5006 (tdesc_create_enum): Likewise.
5007 (tdesc_add_field): Likewise.
5008 (tdesc_add_typed_bitfield): Likewise.
5009 (tdesc_add_bitfield): Likewise.
5010 (tdesc_add_flag): Likewise.
5011 (tdesc_add_enum_value): Likewise.
5012 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5013 (struct tdesc_type_vector): Likewise.
5014 (struct tdesc_type_field): Likewise.
5015 (struct tdesc_type_with_fields): Likewise.
5016 (tdesc_create_enum): Add declaration.
5017 (tdesc_add_typed_bitfield): Likewise.
5018 (tdesc_add_enum_value): Likewise.
5019 * target-descriptions.c (tdesc_type_field): Move from here.
5020 (tdesc_type_builtin): Likewise.
5021 (tdesc_type_vector): Likewise.
5022 (tdesc_type_with_fields): Likewise.
5023 (tdesc_predefined_types): Likewise.
5024 (tdesc_named_type): Likewise.
5025 (tdesc_create_vector): Likewise.
5026 (tdesc_create_struct): Likewise.
5027 (tdesc_set_struct_size): Likewise.
5028 (tdesc_create_union): Likewise.
5029 (tdesc_create_flags): Likewise.
5030 (tdesc_create_enum): Likewise.
5031 (tdesc_add_field): Likewise.
5032 (tdesc_add_typed_bitfield): Likewise.
5033 (tdesc_add_bitfield): Likewise.
5034 (tdesc_add_flag): Likewise.
5035 (tdesc_add_enum_value): Likewise.
5036 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5037 (tdesc_add_typed_bitfield): Likewise.
5038 (tdesc_add_enum_value): Likewise.
5040 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5042 * common/tdesc.c (tdesc_feature::accept): Move to here.
5043 (tdesc_feature::operator==): Likewise.
5044 (tdesc_create_reg): Likewise.
5045 * common/tdesc.h (tdesc_type_kind): Likewise.
5046 (struct tdesc_type): Likewise.
5047 (struct tdesc_feature): Likewise.
5048 * regformats/regdat.sh: Create a feature.
5049 * target-descriptions.c (tdesc_type_kind): Move from here.
5050 (tdesc_type): Likewise.
5051 (tdesc_type_up): Likewise.
5052 (tdesc_feature): Likewise.
5053 (tdesc_create_reg): Likewise.
5055 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5057 * Makefile.in: Add arch/tdesc.c
5058 * common/tdesc.c: New file.
5059 * common/tdesc.h (tdesc_element_visitor): Move to here.
5060 (tdesc_element): Likewise.
5061 (tdesc_reg): Likewise.
5062 (tdesc_reg_up): Likewise.
5063 * regformats/regdef.h (reg): Add offset to constructors.
5064 * target-descriptions.c (tdesc_element_visitor): Move from here.
5065 (tdesc_element): Likewise.
5066 (tdesc_reg): Likewise.
5067 (tdesc_reg_up): Likewise.
5069 2018-04-17 Tom Tromey <tom@tromey.com>
5071 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5074 2018-04-17 Tom Tromey <tom@tromey.com>
5076 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5078 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5080 * symtab.c (print_symbol_info): Skip printing filename and line
5081 number when `last' is NULL.
5082 (symtab_symbol_info): Use empty string instead of NULL for first
5083 invocation of print_symbol_info.
5084 (rbreak_command): Pass NULL to `last' parameter of
5087 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5089 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5092 2018-04-16 Pedro Alves <palves@redhat.com>
5094 * MAINTAINERS (sh): Remove.
5095 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5096 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5097 (ALLDEPFILES): Remove sh64-tdep.c.
5098 * NEWS: Mentions that support for SH-5/SH64 is removed.
5099 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5100 (sh*-*-openbsd*): Ditto.
5101 (sh64-*-elf*): Remove.
5103 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5104 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5105 * sh-tdep.c: No longer include "sh64-tdep.h".
5106 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5107 * sh64-tdep.c, sh64-tdep.h: Remove files.
5109 2018-04-16 Pedro Alves <palves@redhat.com>
5111 * MAINTAINERS: Remove m88k.
5112 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5113 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5114 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5115 * NEWS: Mention that support for m88k was removed.
5116 * configure.host (m88*-*-*): Remove support.
5117 * configure.nat (m88k-*-*): Remove support.
5118 * configure.tgt (m88*-*-openbsd*): Remove.
5119 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5121 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5123 * configure.tgt (x86_tobjs): New variable.
5124 (amd64_tobjs, i386_tobjs): Use it.
5126 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5128 * symtab.c (print_symbol_info): Precede the symbol definition by
5129 the line number when available.
5130 * NEWS: Advertise this enhancement.
5132 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5134 * NEWS (New options): announce set/show record btrace cpu.
5135 * btrace.c: Include record-btrace.h.
5136 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5137 the vendor is unknown.
5138 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5139 Maybe overwrite the btrace configuration's cpu.
5140 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5141 (btrace_fetch): Add cpu parameter. Update callers.
5142 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5143 Maybe overwrite the btrace configuration's cpu. Skip enabling
5144 errata workarounds if the vendor is unknown.
5145 * python/py-record-btrace.c: Include record-btrace.h.
5146 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5147 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5148 * record-btrace.c (record_btrace_cpu_state_kind): New.
5149 (record_btrace_cpu): New.
5150 (set_record_btrace_cpu_cmdlist): New.
5151 (record_btrace_get_cpu): New.
5152 (require_btrace_thread, record_btrace_info)
5153 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5154 (cmd_set_record_btrace_cpu_none): New.
5155 (cmd_set_record_btrace_cpu_auto): New.
5156 (cmd_set_record_btrace_cpu): New.
5157 (cmd_show_record_btrace_cpu): New.
5158 (_initialize_record_btrace): Initialize set/show record btrace cpu
5160 * record-btrace.h (record_btrace_get_cpu): New.
5162 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5164 * record.c (set_record_command): Fix typo in message.
5166 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5168 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5170 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5172 * infrun.c (process_event_stop_test): Call
5173 gdbarch_in_indirect_branch_thunk.
5174 * gdbarch.sh (in_indirect_branch_thunk): New.
5175 * gdbarch.c: Regenerated.
5176 * gdbarch.h: Regenerated.
5179 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5180 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5181 (ALLDEPFILES): Add x86-tdep.c.
5182 * arch-utils.h (default_in_indirect_branch_thunk): New.
5183 * arch-utils.c (default_in_indirect_branch_thunk): New.
5184 * i386-tdep: Include x86-tdep.h.
5185 (i386_in_indirect_branch_thunk): New.
5186 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5188 * amd64-tdep: Include x86-tdep.h.
5189 (amd64_in_indirect_branch_thunk): New.
5190 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5192 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5195 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5196 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5197 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5200 2018-04-12 Tom Tromey <tom@tromey.com>
5202 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5203 (rust_evaluate_subexp): Likewise.
5205 2018-04-12 Pedro Alves <palves@redhat.com>
5207 * procfs.c (procfs_detach): Make forward declaration's prototype
5208 match definition's protototype.
5209 (proc_get_LDT_entry): Remove stale do_cleanups call.
5211 2018-04-12 Pedro Alves <palves@redhat.com>
5213 * target.h (target_ops::to_has_exited): Delete.
5214 (target_has_exited): Delete.
5215 * target-delegates.c: Regenerate.
5217 2018-04-11 Pedro Alves <palves@redhat.com>
5219 * target.c (fileio_fh_t::t): Add comment.
5220 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5221 (target_fileio_close): Handle a NULL target.
5222 (invalidate_fileio_fh): New.
5223 (target_close): Call it.
5224 * remote.c (remote_hostio_send_command): No longer check whether
5225 remote_desc is open.
5227 2018-04-11 Pedro Alves <palves@redhat.com>
5229 * target.c (fileio_fh_t): Make it a named struct instead of a
5231 (fileio_fh_t::is_closed): New method.
5232 (DEF_VEC_O (fileio_fh_t)): Remove.
5233 (fileio_fhandles): Now a std::vector.
5234 (is_closed_fileio_fh): Delete.
5235 (acquire_fileio_fd): Adjust. Rename parameters.
5236 (release_fileio_fd): Adjust.
5237 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5238 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5239 (target_fileio_close): Adjust.
5241 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5243 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5246 2018-04-10 Pedro Alves <palves@redhat.com>
5248 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5249 (scoped_finish_thread_state): New class.
5250 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5252 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5253 (fetch_inferior_event, normal_stop): Likewise.
5254 * thread.c (finish_thread_state_cleanup): Delete.
5256 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5257 Pedro Alves <palves@redhat.com>
5259 * value.c: Include "selftest.h" and "common/array-view.h".
5260 (struct range) <operator ==>: New.
5261 (test_ranges_contain): New.
5262 (check_ranges_vector): New.
5263 (test_insert_into_bit_range_vector): New.
5264 (_initialize_values): Register selftests.
5265 * common/array-view.h (operator==, operator!=): New.
5267 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5269 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5271 * inline-frame.c: Include <algorithm>.
5272 (struct inline_state): Add constructor.
5273 (inline_state_s): Remove.
5274 (DEF_VEC_O(inline_state_s)): Remove.
5275 (inline_states): Change type to std::vector.
5276 (find_inline_frame_state): Adjust to std::vector.
5277 (allocate_inline_frame_state): Remove.
5278 (clear_inline_frame_state): Adjust to std::vector.
5279 (skip_inline_frames): Adjust to std::vector.
5281 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5283 * tracepoint.h (struct trace_state_variable): Add constructor.
5284 <name>: Change type to std::string.
5285 * tracepoint.c (tsv_s): Remove.
5286 (DEF_VEC_O(tsv_s)): Remove.
5287 (tvariables): Change to std::vector.
5288 (create_trace_state_variable): Adjust to std::vector.
5289 (find_trace_state_variable): Likewise.
5290 (find_trace_state_variable_by_number): Likewise.
5291 (delete_trace_state_variable): Likewise.
5292 (trace_variable_command): Adjust to std::string.
5293 (delete_trace_variable_command): Likewise.
5294 (tvariables_info_1): Adjust to std::vector.
5295 (save_trace_state_variables): Likewise.
5296 (start_tracing): Likewise.
5297 (merge_uploaded_trace_state_variables): Adjust to std::vector
5299 * target.h (struct target_ops)
5300 <to_download_trace_state_variable>: Pass reference to
5301 trace_state_variable.
5302 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5303 * target-delegates.c: Re-generate.
5304 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5305 (mi_tsv_deleted): Likewise.
5306 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5307 * remote.c (remote_download_trace_state_variable): Change
5308 pointer to reference and adjust.
5309 * make-target-delegates (parse_argtypes): Handle references.
5310 (write_function_header): Likewise.
5311 (munge_type): Likewise.
5313 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5315 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5316 string_view-selftests.c.
5317 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5319 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5320 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5321 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5322 * unittests/basic_string_view/element_access/char/1.cc:
5324 * unittests/basic_string_view/element_access/char/empty.cc:
5326 * unittests/basic_string_view/element_access/char/front_back.cc:
5328 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5329 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5331 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5333 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5335 * unittests/basic_string_view/operations/compare/char/1.cc:
5337 * unittests/basic_string_view/operations/compare/char/13650.cc:
5339 * unittests/basic_string_view/operations/copy/char/1.cc:
5341 * unittests/basic_string_view/operations/data/char/1.cc:
5343 * unittests/basic_string_view/operations/find/char/1.cc:
5345 * unittests/basic_string_view/operations/find/char/2.cc:
5347 * unittests/basic_string_view/operations/find/char/3.cc:
5349 * unittests/basic_string_view/operations/find/char/4.cc:
5351 * unittests/basic_string_view/operations/rfind/char/1.cc:
5353 * unittests/basic_string_view/operations/rfind/char/2.cc:
5355 * unittests/basic_string_view/operations/rfind/char/3.cc:
5357 * unittests/basic_string_view/operations/substr/char/1.cc:
5359 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5360 * unittests/string_view-selftests.c: New file.
5362 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5364 * unittests/basic_string_view/capacity/1.cc: New file.
5365 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5366 * unittests/basic_string_view/cons/char/1.cc: New file.
5367 * unittests/basic_string_view/cons/char/2.cc: New file.
5368 * unittests/basic_string_view/cons/char/3.cc: New file.
5369 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5370 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5371 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5372 * unittests/basic_string_view/element_access/char/1.cc: New file.
5373 * unittests/basic_string_view/element_access/char/2.cc: New file.
5374 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5375 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5376 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5377 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5378 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5379 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5380 * unittests/basic_string_view/include.cc: New file.
5381 * unittests/basic_string_view/inserters/char/1.cc: New file.
5382 * unittests/basic_string_view/inserters/char/2.cc: New file.
5383 * unittests/basic_string_view/inserters/char/3.cc: New file.
5384 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5385 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5386 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5387 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5388 * unittests/basic_string_view/literals/types.cc: New file.
5389 * unittests/basic_string_view/literals/values.cc: New file.
5390 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5391 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5392 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5393 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5394 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5395 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5396 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5397 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5398 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5399 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5400 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5401 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5402 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5403 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5404 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5405 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5406 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5407 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5408 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5409 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5410 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5411 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5412 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5413 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5414 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5415 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5416 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5417 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5418 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5419 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5420 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5421 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5422 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5423 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5424 * unittests/basic_string_view/operators/char/2.cc: New file.
5425 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5426 * unittests/basic_string_view/range_access/char/1.cc: New file.
5427 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5428 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5429 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5430 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5431 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5432 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5433 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5434 * unittests/basic_string_view/typedefs.cc: New file.
5435 * unittests/basic_string_view/types/1.cc: New file.
5437 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5439 * common/gdb_string_view.h: Remove libstdc++ implementation
5440 details, adjust to gdb reality.
5441 * common/gdb_string_view.tcc: Likewise.
5442 * cli/cli-script.c (struct string_view): Remove.
5443 (user_args) <m_args>: Change element type to gdb::string_view.
5444 (user_args::insert_args): Adjust.
5446 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5448 * common/gdb_string_view.h: New file.
5449 * common/gdb_string_view.tcc: New file.
5451 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5453 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5454 * configure: Re-generate.
5456 2018-04-09 Pedro Alves <palves@redhat.com>
5458 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5459 (set_target_gdbarch): Call
5460 gdb::observers::architecture_changed.notify instead of
5461 observer_notify_architecture_changed.
5463 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5465 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5466 (do_restore_current_traceframe_cleanup): Remove.
5467 (restore_current_traceframe_cleanup_dtor): Remove.
5468 (make_cleanup_restore_current_traceframe): Remove.
5469 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5471 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5472 * infrun.c (fetch_inferior_event): Use
5473 scoped_restore_current_traceframe.
5475 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5477 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5479 <n_allocated_type_units>: Remove.
5480 <all_type_units>: Change to std::vector.
5481 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5482 to std::vector change.
5483 (dwarf2_per_objfile::get_cutu): Likewise.
5484 (dwarf2_per_objfile::get_tu): Likewise.
5485 (create_signatured_type_table_from_index): Likewise.
5486 (create_signatured_type_table_from_debug_names): Likewise.
5487 (dw2_symtab_iter_next): Likewise.
5488 (dw2_print_stats): Likewise.
5489 (dw2_expand_all_symtabs): Likewise.
5490 (dw2_expand_marked_cus): Likewise.
5491 (dw2_debug_names_iterator::next): Likewise.
5492 (dwarf2_initialize_objfile): Likewise.
5493 (add_signatured_type_cu_to_table): Likewise.
5494 (create_all_type_units): Likewise.
5495 (add_type_unit): Likewise.
5496 (struct tu_abbrev_offset): Add constructor.
5497 (build_type_psymtabs_1): Adjust to std::vector change.
5498 (print_tu_stats): Likewise.
5499 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5500 (write_debug_names): Likewise.
5502 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5504 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5505 Make an std::vector.
5506 <n_comp_units>: Remove.
5507 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5508 to std::vector change.
5509 (dwarf2_per_objfile::get_cutu): Likewise.
5510 (dwarf2_per_objfile::get_cu): Likewise.
5511 (create_cus_from_index): Likewise.
5512 (create_addrmap_from_index): Likewise.
5513 (create_addrmap_from_aranges): Likewise.
5514 (dwarf2_read_index): Likewise.
5515 (dw2_find_last_source_symtab): Likewise.
5516 (dw2_map_symtabs_matching_filename): Likewise.
5517 (dw2_symtab_iter_next): Likewise.
5518 (dw2_print_stats): Likewise.
5519 (dw2_expand_all_symtabs): Likewise.
5520 (dw2_expand_symtabs_with_fullname): Likewise.
5521 (dw2_expand_marked_cus): Likewise.
5522 (dw2_map_symbol_filenames): Likewise.
5523 (create_cus_from_debug_names): Likewise.
5524 (dwarf2_read_debug_names): Likewise.
5525 (dw2_debug_names_iterator::next): Likewise.
5526 (dwarf2_initialize_objfile): Likewise.
5527 (set_partial_user): Likewise.
5528 (dwarf2_build_psymtabs_hard): Likewise.
5529 (read_comp_units_from_section): Remove arguments, adjust to
5531 (create_all_comp_units): Adjust to std::vector and
5532 read_comp_units_from_section changes.
5533 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5535 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5536 (psyms_seen_size): Likewise.
5537 (write_gdbindex): Likewise.
5538 (write_debug_names): Likewise.
5540 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5542 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5543 with dwarf2_per_objfile.
5544 (create_cus_from_index): Likewise.
5545 (create_signatured_type_table_from_index): Likewise.
5546 (dwarf2_read_index): Likewise.
5547 (dwarf2_initialize_objfile): Likewise.
5548 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5549 per_cu rather than get_dwarf2_per_objfile.
5551 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5553 * dwarf2read.h (struct signatured_type): Forward declare.
5554 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5556 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5557 (dw2_get_cutu): ...this.
5558 (dwarf2_per_objfile::get_cu): Rename from...
5559 (dw2_get_cu): ...this.
5560 (dwarf2_per_objfile::get_tu): New.
5561 (create_addrmap_from_index): Adjust.
5562 (create_addrmap_from_aranges): Adjust.
5563 (dw2_find_last_source_symtab): Adjust.
5564 (dw2_map_symtabs_matching_filename): Adjust.
5565 (dw2_symtab_iter_next): Adjust.
5566 (dw2_print_stats): Adjust.
5567 (dw2_expand_all_symtabs): Adjust.
5568 (dw2_expand_symtabs_with_fullname): Adjust.
5569 (dw2_expand_marked_cus): Adjust.
5570 (dw_expand_symtabs_matching_file_matcher): Adjust.
5571 (dw2_map_symbol_filenames): Adjust.
5572 (dw2_debug_names_iterator::next): Adjust.
5573 (dwarf2_initialize_objfile): Adjust.
5574 (set_partial_user): Adjust.
5575 (dwarf2_build_psymtabs_hard): Adjust.
5577 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5579 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5580 Remove unused variables.
5581 (dw2_map_symtabs_matching_filename): Likewise.
5582 (dwarf2_record_block_ranges): Likewise.
5583 (dwarf2_read_addr_index): Likewise.
5584 (follow_die_offset): Likewise.
5586 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5588 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5589 to symbol_file_add_main.
5591 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5594 * mi/mi-console.c (do_fputc_async_safe): New.
5595 (mi_console_file::write_async_safe): New.
5596 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5597 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5599 * ui-file.c (ui_file::putstrn): Adjust call to
5600 fputstrn_unfiltered.
5601 * utils.c (printchar): Replace do_fputs and do_fprintf
5602 parameters by do_fputc.
5603 (fputstr_filtered): Adjust call to printchar.
5604 (fputstr_unfiltered): Likewise.
5605 (fputstrn_filtered): Likewise.
5606 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5608 * utils.h (do_fputc_ftype): New typedef.
5609 (fputstrn_unfiltered): Add do_fputc parameter.
5611 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5613 * regformats/i386/i386-avx.dat: Remove.
5615 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5618 * amd64-tdep.c (amd64_none_init_abi): New function.
5619 (amd64_x32_none_init_abi): New function.
5620 (_initialize_amd64_tdep): Register handlers for x86-64 and
5621 x64_32 with GDB_OSABI_NONE.
5622 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5623 GDB_OSABI_NONE osabi.
5625 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5628 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5630 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5631 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5633 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5635 * common/byte-vector.h (char_vector): New type.
5636 * target.h (target_read_alloc): Return
5637 gdb::optional<byte_vector>.
5638 (target_read_stralloc): Return gdb::optional<char_vector>.
5639 (target_get_osdata): Return gdb::optional<char_vector>.
5640 * target.c (target_read_alloc_1): Templatize. Replacement
5641 manual memory management with vector.
5642 (target_read_alloc): Change return type, adjust.
5643 (target_read_stralloc): Change return type, adjust.
5644 (target_get_osdata): Change return type, adjust.
5645 * auxv.c (struct auxv_info) <length>: Remove.
5646 <data>: Change type to gdb::optional<byte_vector>.
5647 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5648 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5649 (target_auxv_search): Adjust.
5650 (fprint_target_auxv): Adjust.
5651 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5652 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5653 (linux_make_corefile_notes): Adjust.
5654 * osdata.c (get_osdata): Adjust.
5655 * remote.c (remote_get_threads_with_qxfer): Adjust.
5656 (remote_memory_map): Adjust.
5657 (remote_traceframe_info): Adjust.
5658 (btrace_read_config): Adjust.
5659 (remote_read_btrace): Adjust.
5660 (remote_pid_to_exec_file): Adjust.
5661 * solib-aix.c (solib_aix_get_library_list): Adjust.
5662 * solib-dsbt.c (decode_loadmap): Don't free buf.
5663 (dsbt_get_initial_loadmaps): Adjust.
5664 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5665 * solib-target.c (solib_target_current_sos): Adjust.
5666 * tracepoint.c (sdata_make_value): Adjust.
5667 * xml-support.c (xinclude_start_include): Adjust.
5668 (xml_fetch_content_from_file): Adjust.
5669 * xml-support.h (xml_fetch_another): Change return type.
5670 (xml_fetch_content_from_file): Change return type.
5671 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5672 * xml-tdesc.c (file_read_description_xml): Adjust.
5673 (fetch_available_features_from_target): Change return type.
5674 (target_fetch_description_xml): Adjust.
5675 (target_read_description_xml): Adjust.
5677 2018-04-06 Tom Tromey <tom@tromey.com>
5679 * value.c (~value): Update.
5680 (struct value) <contents>: Now unique_xmalloc_ptr.
5681 (value_contents_bits_eq, allocate_value_contents)
5682 (value_contents_raw, value_contents_all_raw)
5683 (value_contents_for_printing, value_contents_for_printing_const)
5684 (set_value_enclosing_type): Update.
5686 2018-04-06 Tom Tromey <tom@tromey.com>
5688 * value.c (range_s): Remove typedef, VEC.
5689 (struct range): Add operator<.
5690 (range_lessthan): Remove.
5691 (ranges_contain): Change type.
5693 (struct value) <unavailable, optimized_out>: Now std::vector.
5694 (value_entirely_available)
5695 (value_entirely_covered_by_range_vector)
5696 (value_entirely_unavailable, value_entirely_optimized_out):
5698 (insert_into_bit_range_vector): Change argument type.
5699 (find_first_range_overlap): Likewise.
5700 (struct ranges_and_idx, value_contents_bits_eq)
5701 (require_not_optimized_out, require_available): Update.
5702 (ranges_copy_adjusted): Change argument types.
5703 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5705 2018-04-06 Tom Tromey <tom@tromey.com>
5707 * value.c (~value): Update.
5708 (struct value) <parent>: Now a value_ref_ptr.
5709 (value_parent, set_value_parent, value_address, value_copy):
5712 2018-04-06 Tom Tromey <tom@tromey.com>
5714 * value.c (struct value): Add constructor, destructor, and member
5716 (allocate_value_lazy, value_decref): Update.
5718 2018-04-06 Tom Tromey <tom@tromey.com>
5720 * value.c (struct value) <released, next>: Remove.
5721 (all_values): Now a std::vector.
5722 (allocate_value_lazy): Update.
5723 (value_next): Remove.
5724 (value_mark, value_free_to_mark, release_value)
5725 (value_release_to_mark): Update.
5727 2018-04-06 Tom Tromey <tom@tromey.com>
5729 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5730 (free_value_chain): Remove.
5731 * value.c (free_value_chain): Remove.
5732 (value_release_to_mark): Return a std::vector.
5733 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5735 (check_condition): Update.
5736 * eval.c (fetch_subexp_value): Change "val_chain" to a
5738 * breakpoint.c (update_watchpoint): Update.
5739 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5741 2018-04-06 Tom Tromey <tom@tromey.com>
5743 * value.h (free_all_values): Remove.
5744 * value.c (free_all_values): Remove.
5746 2018-04-06 Tom Tromey <tom@tromey.com>
5748 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5749 (value_history_chain, value_history_count): Remove.
5750 (value_history): New global.
5751 (record_latest_value, access_value_history, show_values)
5752 (preserve_values): Update.
5754 2018-04-06 Tom Tromey <tom@tromey.com>
5756 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5757 * varobj.c (varobj_set_display_format, varobj_set_value)
5758 (install_default_visualizer, construct_visualizer)
5759 (install_new_value, ~varobj, varobj_get_value_type)
5760 (my_value_of_variable, varobj_editable_p): Update.
5761 * c-varobj.c (c_describe_child, c_value_of_variable)
5762 (cplus_number_of_children, cplus_describe_child): Update.
5763 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5764 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5765 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5767 2018-04-06 Tom Tromey <tom@tromey.com>
5769 * printcmd.c (last_examine_address): Change type to
5771 (do_examine, x_command): Update.
5773 2018-04-06 Tom Tromey <tom@tromey.com>
5775 * value.c (release_value): Update.
5776 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5777 (struct bpstats) <val>: Now a value_ref_ptr.
5778 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5779 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5780 (~watchpoint, print_it_watchpoint, watch_command_1)
5781 (invalidate_bp_value_on_memory_change): Update.
5783 2018-04-06 Tom Tromey <tom@tromey.com>
5785 * varobj.c (varobj_clear_saved_item)
5786 (update_dynamic_varobj_children, install_new_value, ~varobj):
5788 * value.h (value_incref): Move declaration earlier.
5789 (value_decref): Rename from value_free.
5790 (struct value_ref_policy): New.
5791 (value_ref_ptr): New typedef.
5792 (struct value_deleter): Remove.
5793 (gdb_value_up): Remove typedef.
5794 (release_value): Change return type.
5795 (release_value_or_incref): Remove.
5796 * value.c (set_value_parent): Update.
5797 (value_incref): Change return type.
5798 (value_decref): Rename from value_free.
5799 (value_free_to_mark, free_all_values, free_value_chain): Update.
5800 (release_value): Return value_ref_ptr.
5801 (release_value_or_incref): Remove.
5802 (record_latest_value, set_internalvar, clear_internalvar):
5804 * stack.c (info_frame_command): Don't call value_free.
5805 * python/py-value.c (valpy_dealloc, valpy_new)
5806 (value_to_value_object): Update.
5807 * printcmd.c (do_examine): Update.
5808 * opencl-lang.c (lval_func_free_closure): Update.
5809 * mi/mi-main.c (register_changed_p): Don't call value_free.
5810 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5811 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5812 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5814 * guile/scm-value.c (vlscm_free_value_smob)
5815 (vlscm_scm_from_value): Update.
5816 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5817 (frame_unwind_register_unsigned, get_frame_register_bytes)
5818 (put_frame_register_bytes): Don't call value_free.
5819 * findvar.c (address_from_register): Don't call value_free.
5820 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5821 * dwarf2loc.c (entry_data_value_free_closure)
5822 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5823 (dwarf2_evaluate_loc_desc_full): Update.
5824 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5825 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5826 (~watchpoint, watch_command_1)
5827 (invalidate_bp_value_on_memory_change): Update.
5828 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5830 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5833 * warning.m4: Add -Wno-error=deprecated-register.
5834 * configure: Re-generate.
5836 2018-04-05 Tom Tromey <tom@tromey.com>
5838 * linespec.h: Remove include of "vec.h".
5840 2018-04-05 Tom Tromey <tom@tromey.com>
5842 * linespec.c (typep): Remove typedef.
5843 (find_methods, find_superclass_methods): Take a std::vector.
5844 (find_method): Use std::vector.
5846 2018-04-05 Tom Tromey <tom@tromey.com>
5848 * utils.c (compare_strings): Remove.
5849 * utils.h (compare_strings): Remove.
5850 * objc-lang.h (find_imps): Update.
5851 * objc-lang.c (find_methods): Take a std::vector.
5852 (uniquify_strings, find_imps): Likewise.
5853 * linespec.c (find_methods): Take a std::vector.
5854 (decode_objc): Use std::vector.
5855 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5857 (find_method, find_function_symbols): Use std::vector.
5859 2018-04-05 Tom Tromey <tom@tromey.com>
5861 * completer.c (completion_tracker::completion_tracker): Remove
5863 (completion_tracker::discard_completions): Likewise.
5864 * breakpoint.c (ambiguous_names_p): Remove cast.
5865 * ada-lang.c (_initialize_ada_language): Remove cast.
5866 * utils.h (streq): Update.
5867 (streq_hash): Add new declaration.
5868 * utils.c (streq): Return bool.
5869 (streq_hash): New function.
5871 2018-04-05 Tom Tromey <tom@tromey.com>
5873 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5874 Remove a string copy.
5876 2018-04-05 Tom Tromey <tom@tromey.com>
5878 * linespec.c (filter_results): Use std::vector.
5879 (decode_line_2, decode_line_full): Update.
5881 2018-04-05 Tom Tromey <tom@tromey.com>
5883 * linespec.c (canonical_to_fullform): Return std::string.
5884 (filter_results): Update.
5885 (struct decode_line_2_item): Add constructor.
5886 <fullform, displayform>: Now std::string.
5887 (decode_line_2_compare_items): Now a std::sort comparator.
5888 (decode_line_2): Update.
5890 2018-04-05 Tom Tromey <tom@tromey.com>
5892 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5893 (unexpected_linespec_error): Update.
5894 (linespec_parse_basic, parse_linespec): Update.
5896 2018-04-05 Tom Tromey <tom@tromey.com>
5898 * linespec.c (linespec_parse_basic): Reindent.
5900 2018-04-05 Tom Tromey <tom@tromey.com>
5902 * minsyms.h (iterate_over_minimal_symbols): Update.
5903 * minsyms.c (iterate_over_minimal_symbols): Take a
5905 * linespec.c (struct collect_minsyms): Remove.
5906 (compare_msyms): Now a std::sort comparator.
5907 (add_minsym): Add parameters.
5908 (search_minsyms_for_name): Update. Use std::vector.
5910 2018-04-03 Tom Tromey <tom@tromey.com>
5912 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5915 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5917 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5919 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5922 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5923 printing static type.
5925 2018-04-01 Tom Tromey <tom@tromey.com>
5927 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5928 (rs6000_xfer_shared_libraries): Update.
5930 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5932 * common/gdb_vecs.h (char_ptr): Remove.
5933 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5935 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5937 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5939 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5941 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5943 * tracepoint.h (struct uploaded_tp): Initialize fields.
5944 <actions, step_actions, cmd_strings>: Change type to
5945 std::vector<char *>.
5946 * tracepoint.c (get_uploaded_tp): Allocate with new.
5947 (free_uploaded_tps): Free with delete.
5948 (parse_tracepoint_definition): Adjust to std::vector change.
5949 * breakpoint.c (read_uploaded_action): Likewise.
5950 (create_tracepoint_from_upload): Likewise.
5951 * ctf.c (ctf_write_uploaded_tp): Likewise.
5952 (SET_ARRAY_FIELD): Likewise.
5953 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5955 2018-03-30 Tom Tromey <tom@tromey.com>
5957 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5959 (svr4_keep_data_in_core): Update.
5960 (svr4_read_so_list): Update.
5962 2018-03-30 Tom Tromey <tom@tromey.com>
5964 * windows-nat.c (handle_output_debug_string, handle_exception):
5966 * target.h (target_read_string): Update.
5967 * target.c (target_read_string): Change "string" to
5969 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5971 * solib-frv.c (frv_current_sos): Update.
5972 * solib-dsbt.c (dsbt_current_sos): Update.
5973 * solib-darwin.c (darwin_current_sos): Update.
5974 * linux-thread-db.c (inferior_has_bug): Update.
5975 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5976 Update. Remove alloca.
5977 * ada-lang.c (ada_main_name): Update.
5979 2018-03-30 Tom Tromey <tom@tromey.com>
5981 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5982 (struct dwo_file_deleter): New.
5983 (dwo_file_up): New typedef.
5984 (open_and_init_dwo_file): Use dwo_file_up.
5985 (free_dwo_file_cleanup): Remove.
5987 2018-03-30 Tom Tromey <tom@tromey.com>
5989 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5990 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5992 2018-03-30 Tom Tromey <tom@tromey.com>
5994 * dwarf2read.c (class free_cached_comp_units): New class.
5995 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5996 (free_cached_comp_units): Remove function.
5998 2018-03-30 Tom Tromey <tom@tromey.com>
6000 * utils.h (make_cleanup_unpush_target): Remove.
6001 * inf-ptrace.c (struct target_unpusher): New.
6002 (target_unpush_up) New typedef.
6003 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6005 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6007 2018-03-27 Tom Tromey <tom@tromey.com>
6009 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6011 2018-03-27 Pedro Alves <palves@redhat.com>
6012 Tom Tromey <tom@tromey.com>
6014 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6015 destructor. Now a class.
6016 (gdb_readline_wrapper_cleanup): Remove function.
6017 (gdb_readline_wrapper): Remove cleanups.
6019 2018-03-27 Tom Tromey <tom@tromey.com>
6021 * typeprint.h (struct type_print_options) <local_typedefs,
6022 global_typedefs>: Remove "struct" keyword.
6023 (class typedef_hash_table): New class.
6024 (recursively_update_typedef_hash, add_template_parameters)
6025 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6026 (find_typedef_in_hash): Don't declare.
6027 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6028 (typedef_hash_table::recursively_update): Rename from
6029 recursively_update_typedef_hash. Now a member.
6030 (typedef_hash_table::add_template_parameters): Rename from
6031 add_template_parameters. Now a member.
6032 (typedef_hash_table::typedef_hash_table): Now a constructor;
6033 rename from create_typedef_hash.
6034 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6035 rename from free_typedef_hash.
6036 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6037 (do_free_global_table): Remove.
6038 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6039 from copy_type_recursive.
6040 (create_global_typedef_table): Remove.
6041 (typedef_hash_table::find_global_typedef): Now a member of
6043 (typedef_hash_table::find_typedef): Rename from
6044 find_typedef_in_hash; now a member.
6045 (whatis_exp): Update.
6046 * extension.h (struct ext_lang_type_printers): Add constructor and
6048 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6050 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6051 Now a constructor; rename from start_ext_lang_type_printers.
6052 (ext_lang_type_printers): Now a destructor; rename from
6053 free_ext_lang_type_printers.
6054 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6056 (c_type_print_base_struct_union): Update. Remove cleanups.
6058 2018-03-27 Tom Tromey <tom@tromey.com>
6060 * dwarf-index-write.c: Include <cmath>.
6062 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6064 * NEWS: Add entry describing new "set|show varsize-limit" command.
6065 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6067 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6070 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6072 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6074 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6075 * dwarf-index-common.c: New file.
6076 * dwarf-index-common.h: New file.
6077 * dwarf-index-write.c: New file.
6078 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6079 (struct dwarf2_section_info): Move from here.
6080 (dwarf2_section_info_def): Likewise.
6081 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6082 (offset_type): Likewise.
6083 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6084 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6085 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6086 (byte_swap): Likewise.
6087 (MAYBE_SWAP): Likewise.
6088 (dwarf2_per_cu_ptr): Likewise.
6089 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6090 (struct tu_stats): Likewise.
6091 (struct dwarf2_per_objfile): Likewise.
6092 (struct dwarf2_per_cu_data): Likewise.
6093 (struct signatured_type): Likewise.
6094 (sig_type_ptr): Likewise.
6095 (DEF_VEC_P (sig_type_ptr)): Likewise.
6096 (INDEX4_SUFFIX): Likewise.
6097 (INDEX5_SUFFIX): Likewise.
6098 (DEBUG_STR_SUFFIX): Likewise.
6099 (dwarf2_read_section): Make non-static.
6100 (mapped_index_string_hash): Move from here.
6101 (dwarf5_djb_hash): Likewise.
6102 (file_write): Likewise.
6103 (class data_buf): Likewise.
6104 (struct symtab_index_entry): Likewise.
6105 (struct mapped_symtab): Likewise.
6106 (find_slot): Likewise.
6107 (hash_expand): Likewise.
6108 (add_index_entry): Likewise.
6109 (uniquify_cu_indices): Likewise.
6110 (class c_str_view): Likewise.
6111 (class c_str_view_hasher): Likewise.
6112 (class vector_hasher): Likewise.
6113 (write_hash_table): Likewise.
6114 (psym_index_map): Likewise.
6115 (struct addrmap_index_data): Likewise.
6116 (add_address_entry): Likewise.
6117 (add_address_entry_worker): Likewise.
6118 (write_address_map): Likewise.
6119 (symbol_kind): Likewise.
6120 (write_psymbols): Likewise.
6121 (struct signatured_type_index_data): Likewise.
6122 (write_one_signatured_type): Likewise.
6123 (recursively_count_psymbols): Likewise.
6124 (recursively_write_psymbols): Likewise.
6125 (class debug_names): Likewise.
6126 (check_dwarf64_offsets): Likewise.
6127 (psyms_seen_size): Likewise.
6128 (write_gdbindex): Likewise.
6129 (write_debug_names): Likewise.
6130 (assert_file_size): Likewise.
6131 (write_psymtabs_to_index): Likewise.
6132 (save_gdb_index_command): Likewise.
6133 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6135 * dwarf2read.h: New file.
6137 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6140 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6141 symbol name if the CU's language stores symbol names in linkage
6143 * language.h (struct language_defn)
6144 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6145 all instances of this struct.
6147 2018-03-26 Tom Tromey <tom@tromey.com>
6149 * stack.c (backtrace_command_1): Remove verbose code.
6151 2018-03-26 Tom Tromey <tom@tromey.com>
6153 * python/py-framefilter.c (py_print_type): Don't catch
6154 exceptions. Return void.
6155 (py_print_value): Likewise.
6156 (py_print_single_arg): Likewise.
6157 (enumerate_args): Don't catch exceptions.
6158 (py_print_args): Likewise.
6159 (py_print_frame): Likewise.
6160 (gdbpy_apply_frame_filter): Catch exceptions here.
6162 2018-03-26 Tom Tromey <tom@tromey.com>
6164 * stack.c (_initialize_stack): Remove trailing newlines from help
6165 text. Add "Usage" line to "backtrace" help.
6167 2018-03-26 Tom Tromey <tom@tromey.com>
6170 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6172 2018-03-26 Tom Tromey <tom@tromey.com>
6174 * python/py-framefilter.c (py_print_single_arg): Return
6175 EXT_LANG_BT_ERROR from catch.
6177 2018-03-26 Tom Tromey <tom@tromey.com>
6180 * stack.c (backtrace_command_1): Move some code into no-filters
6183 2018-03-26 Tom Tromey <tom@tromey.com>
6185 * python/py-framefilter.c (throw_quit_or_print_exception): New
6187 (gdbpy_apply_frame_filter): Use it.
6189 2018-03-26 Tom Tromey <tom@tromey.com>
6192 * python/py-framefilter.c (py_print_type, py_print_value)
6193 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6196 2018-03-26 Tom Tromey <tom@tromey.com>
6198 * python/py-framefilter.c (enumerate_args): Use
6199 gdb::unique_xmalloc_ptr.
6201 2018-03-26 Tom Tromey <tom@tromey.com>
6203 * python/py-framefilter.c (py_print_frame): Return
6205 (gdbpy_apply_frame_filter): Update comment.
6206 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6208 <EXT_LANG_BT_NO_FILTERS>: Change value.
6210 2018-03-26 Tom Tromey <tom@tromey.com>
6213 * stack.c (backtrace_command): Parse "hide" argument.
6214 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6215 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6218 2018-03-26 Tom Tromey <tom@tromey.com>
6220 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6222 (backtrace_command): Remove "fulltrace", add "flags".
6224 2018-03-26 Tom Tromey <tom@tromey.com>
6226 * stack.c (backtrace_command): Rewrite command line parsing.
6228 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6230 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6232 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6234 * filename-seen-cache.h: Add include guard.
6236 2018-03-26 Keith Seitz <keiths@redhat.com>
6238 * symfile.c (place_section): Remove "struct" from section_addr_info
6240 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6241 "struct" keyword from section_addr_info.
6243 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6245 * regformats/regdef.h (reg): Add constructors.
6247 2018-03-25 Pedro Alves <palves@redhat.com>
6249 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6250 if then/else bodies in var_func_name extraction.
6252 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6254 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6255 lookup_minimal_symbol() to find symbol entry.
6256 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6258 2018-03-23 Keith Seitz <keiths@redhat.com>
6261 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6262 nested type definitions for C++, too.
6264 2018-03-23 Tom Tromey <tom@tromey.com>
6266 * machoread.c (struct oso_el): Add a constructor. Don't define as
6268 (macho_register_oso): Remove.
6269 (macho_symtab_read): Take a std::vector.
6270 (oso_el_compare_name): Now a std::sort comparator.
6271 (macho_symfile_read_all_oso): Take a std::vector.
6272 (macho_symfile_read): Use std::vector. Remove cleanups.
6274 2018-03-22 Tom Tromey <tom@tromey.com>
6276 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6277 (record_full_goto_bookmark): Use std::string.
6279 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6282 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6285 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6287 * rs6000-tdep.c (store_insn_p): New function.
6288 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6289 and cr_reg to their unshifted values. Use store_insn_p to
6290 match LR saves using either R1 or fdata->alloca_reg. Use
6291 store_insn_p to match CR saves. Set alloca_reg_offset
6292 when alloca_reg and framep are set. Remove lr_reg shift
6293 when assigning to fdata->lr_register.
6295 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6297 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6298 command line args instead of emitting a warning.
6300 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6302 * tracepoint.h (struct static_tracepoint_marker): Initialize
6303 fields, define default constructor, move constructor and move
6304 assignment, disable the rest.
6305 <str_id, extra>: Make std::string.
6306 (release_static_tracepoint_marker): Remove.
6307 (free_current_marker): Remove.
6308 * tracepoint.c (free_current_marker): Remove.
6309 (parse_static_tracepoint_marker_definition): Adjust to
6310 std::string, use new hex2str overload.
6311 (release_static_tracepoint_marker): Remove.
6312 (print_one_static_tracepoint_marker): Get marker by reference
6313 and adjust to std::string.
6314 (info_static_tracepoint_markers_command): Adjust to std::vector
6316 * target.h (static_tracepoint_marker_p): Remove typedef.
6317 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6318 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6320 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6322 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6323 (target_debug_print_std_vector_static_tracepoint_marker): New.
6324 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6326 (target_debug_print_static_tracepoint_marker_p): ... this.
6327 * target-delegates.c: Re-generate.
6328 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6330 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6331 (decode_static_tracepoint_spec): Adjust to std::vector.
6332 (tracepoint_print_one_detail): Adjust to std::string.
6333 (strace_marker_decode_location): Adjust to std::string.
6334 (update_static_tracepoint): Adjust to std::string, remove call
6335 to release_static_tracepoint_marker.
6336 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6337 Adjust to std::vector.
6338 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6339 (remote_static_tracepoint_markers_by_strid): Adjust to
6341 * common/rsp-low.h (hex2str): New overload with explicit count
6343 * common/rsp-low.c (hex2str): New overload with explicit count
6345 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6346 (_initialize_rsp_low_selftests): Add test_hex2str test.
6347 * unittests/tracepoint-selftests.c
6348 (test_parse_static_tracepoint_marker_definition): Adjust to
6351 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6353 * tracepoint.c (parse_static_tracepoint_marker_definition):
6354 Consider case where the definition is followed by more
6356 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6357 tracepoint-selftests.c.
6358 * unittests/tracepoint-selftests.c: New.
6360 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6362 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6365 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6367 * symtab.c (find_pc_sect_line): fixed indentation.
6369 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6371 * symtab.c (find_pc_sect_line): now uses binary search.
6373 2018-03-19 Tom Tromey <tom@tromey.com>
6375 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6378 2018-03-19 Pedro Alves <palves@redhat.com>
6379 Tom Tromey <tom@tromey.com>
6381 * unittests/observable-selftests.c: New file.
6382 * common/observable.h: New file.
6383 * observable.h: New file.
6384 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6385 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6386 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6387 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6388 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6389 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6390 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6391 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6392 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6393 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6394 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6395 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6396 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6397 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6398 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6399 tui/tui-interp.c, valops.c: Update all users.
6400 * tui/tui-hooks.c (tui_bp_created_observer)
6401 (tui_bp_deleted_observer, tui_bp_modified_observer)
6402 (tui_inferior_exit_observer, tui_before_prompt_observer)
6403 (tui_normal_stop_observer, tui_register_changed_observer):
6405 (tui_observers_token): New global.
6406 (attach_or_detach, tui_attach_detach_observers): New functions.
6407 (tui_install_hooks, tui_remove_hooks): Use
6408 tui_attach_detach_observers.
6409 * record-btrace.c (record_btrace_thread_observer): Remove.
6410 (record_btrace_thread_observer_token): New global.
6411 * observer.sh: Remove.
6412 * observer.c: Rename to observable.c.
6413 * observable.c (namespace gdb_observers): Define new objects.
6414 (observer_debug): Move into gdb_observers namespace.
6415 (struct observer, struct observer_list, xalloc_observer_list_node)
6416 (xfree_observer_list_node, generic_observer_attach)
6417 (generic_observer_detach, generic_observer_notify): Remove.
6418 (_initialize_observer): Update.
6419 Don't include observer.inc.
6420 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6421 (clean mostlyclean): Likewise.
6422 (observer.h, observer.inc): Remove targets.
6423 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6424 (COMMON_SFILES): Use observable.c, not observer.c.
6425 * .gitignore: Remove observer.h.
6427 2018-03-18 Tom Tromey <tom@tromey.com>
6429 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6431 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6433 2018-03-17 Tom Tromey <tom@tromey.com>
6435 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6437 2018-03-17 Tom Tromey <tom@tromey.com>
6439 * target.c (class scoped_target_fd): New.
6440 (target_fileio_close_cleanup): Remove.
6441 (target_fileio_read_alloc_1): Use scoped_target_fd.
6443 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6445 * silent-rules.mk: New.
6446 * Makefile.in: Include silent-rules.mk
6447 (srcdir, VPATH, top_srcdir): Move up.
6448 (COMPILE): Add ECHO_CXX.
6449 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6450 (init.c): Add ECHO_INIT_C.
6451 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6452 (version.c): Add ECHO_GEN.
6453 (printcmd.o): Add ECHO_CXX.
6454 (target-float.o): Add ECHO_CXX.
6455 (ada-exp.o): Add ECHO_CXX.
6456 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6457 (insight$(EXEEXT)): Add ECHO_CXXLD.
6458 * gnulib/configure.ac: Add AM_SILENT_RULES.
6459 * gnulib/aclocal.m4: Re-generate.
6460 * gnulib/configure: Re-generate.
6461 * gnulib/import/Makefile.in: Re-generate.
6463 2018-03-16 Tom Tromey <tom@tromey.com>
6465 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6466 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6467 * utils.c (do_free_section_addr_info)
6468 (make_cleanup_free_section_addr_info): Remove.
6469 * symfile.h (struct other_sections): Add constructor.
6470 (struct section_addr_info): Remove.
6471 (section_addr_info): New typedef.
6472 (struct sym_fns) <sym_offsets>: Change type of parameter.
6473 (build_section_addr_info_from_objfile)
6474 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6475 (default_symfile_offsets, symbol_file_add)
6476 (symbol_file_add_from_bfd)
6477 (build_section_addr_info_from_section_table): Update.
6478 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6479 * symfile.c (alloc_section_addr_info): Remove.
6480 (build_section_addr_info_from_section_table): Change return type.
6482 (build_section_addr_info_from_bfd)
6483 (build_section_addr_info_from_objfile): Likewise.
6484 (free_section_addr_info): Remove.
6485 (relative_addr_info_to_section_offsets): Change type of "addrs".
6486 (addrs_section_compar): Now a std::sort comparator.
6487 (addrs_section_sort): Change return type.
6488 (addr_info_make_relative): Change type of "addrs". Update.
6489 (default_symfile_offsets, syms_from_objfile_1)
6490 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6491 (symbol_file_add_separate): Update.
6492 (symbol_file_add): Change type of "addrs". Update.
6493 (add_symbol_file_command): Update. Remove cleanups.
6494 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6496 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6497 * solib.c (solib_read_symbols): Update.
6498 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6499 * machoread.c (macho_symfile_offsets): Update.
6500 * jit.c (jit_bfd_try_read_symtab): Update.
6502 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6504 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6505 unittests/utils-selftests.c.
6506 * unittests/utils-selftests.c: New file.
6508 2018-03-14 Tom Tromey <tom@tromey.com>
6511 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6514 2018-03-14 Tom Tromey <tom@tromey.com>
6517 * printcmd.c (printf_pointer): Allow "-" in format.
6519 2018-03-14 Tom Tromey <tom@tromey.com>
6521 * printcmd.c (_initialize_printcmd): Add usage to printf.
6523 2018-03-14 Yao Qi <qiyao@sourceware.org>
6525 * MAINTAINERS: Update my email address.
6527 2018-03-13 Tom Tromey <tom@tromey.com>
6529 * machoread.c (macho_check_dsym): Change filenamep to a
6531 (macho_symfile_read): Update.
6532 * symfile.c (load_command): Use std::string.
6534 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6536 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6537 to error message string.
6538 (riscv_register_name): Use xsnprintf instead of sprintf.
6539 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6541 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6543 (riscv_push_dummy_call): Likewise.
6545 2018-03-12 Tom Tromey <tom@tromey.com>
6547 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6548 Use gdb::byte_vector.
6549 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6551 2018-03-12 Yao Qi <yao.qi@linaro.org>
6553 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6554 parameter type to readable_regcache.
6555 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6558 2018-03-11 Tom Tromey <tom@tromey.com>
6560 * dwarf2read.c (struct nextfield): Add initializers.
6561 (struct nextfnfield): Remove.
6562 (struct fnfieldlist): Add initializers. Remove "length" and
6563 "head", use std::vector.
6564 (struct decl_field_list): Remove.
6565 (struct field_info): Add initializers.
6566 <fields, baseclasses>: Now std::vector.
6567 <nbaseclasses, nfnfields, typedef_field_list_count,
6568 nested_types_list_count>: Remove.
6569 (dwarf2_add_field, dwarf2_add_type_defn)
6570 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6571 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6572 (process_structure_scope): Update.
6574 2018-03-11 Tom Tromey <tom@tromey.com>
6576 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6577 for use by std::sort.
6578 (build_type_psymtabs_1): Use std::vector.
6580 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6582 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6583 and LIBMPFR in the printed configuration.
6585 2018-03-08 Tom Tromey <tom@tromey.com>
6587 * source.c (get_filename_and_charpos): Use scoped_fd.
6588 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6589 (procfs_pidlist): Likewise.
6590 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6591 (iterate_over_mappings): Likewise.
6593 2018-03-08 Tom Tromey <tom@tromey.com>
6595 * infcall.c (struct call_return_meta_info)
6596 <stack_temporaries_enabled>: Remove.
6597 (get_call_return_value, call_function_by_hand_dummy): Update.
6598 * thread.c (disable_thread_stack_temporaries): Remove.
6599 (enable_thread_stack_temporaries): Remove.
6600 (thread_stack_temporaries_enabled_p): Return bool.
6601 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6602 (get_last_thread_stack_temporary): Update.
6603 * eval.c (evaluate_subexp): Update.
6604 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6605 class, not a function.
6606 (value_ptr, value_vec): Remove typedefs.
6607 (class thread_info) <stack_temporaries_enabled>: Now bool.
6608 <stack_temporaries>: Now a std::vector.
6609 (thread_stack_temporaries_enabled_p)
6610 (value_in_thread_stack_temporaries): Return bool.
6612 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6614 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6615 (getpkt_or_notif_sane_1): Likewise.
6617 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6619 * build-id.c (build_id_to_debug_bfd): Use std::string.
6621 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6623 * build-id.c (find_separate_debug_file_by_buildid): Return
6625 * build-id.h (find_separate_debug_file_by_buildid): Return
6627 * coffread.c (coff_symfile_read): Adjust to std::string.
6628 * elfread.c (elf_symfile_read): Adjust to std::string.
6629 * symfile.c (separate_debug_file_exists): Change parameter to
6631 (find_separate_debug_file): Return std::string.
6632 (find_separate_debug_file_by_debuglink): Return std::string.
6633 * symfile.h (find_separate_debug_file_by_debuglink): Return
6636 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6638 * common/xml-utils.c (xml_escape_text): Move code to...
6639 (xml_escape_text_append): ... this new function.
6640 * common/xml-utils.h (xml_escape_text_append): New declaration.
6641 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6643 (_initialize_xml_utils): register test_xml_escape_text_append as
6646 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6648 * defs.h: Remove MAX_REGISTER_SIZE.
6649 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6651 * python/py-unwind.c (pyuw_sniffer): Likewise.
6653 2018-03-07 Tom Tromey <tom@tromey.com>
6655 * linux-tdep.c (linux_info_proc): Update.
6656 * target.h (struct target_ops) <to_fileio_readlink>: Return
6658 (target_fileio_readlink): Return optional<string>.
6659 * remote.c (remote_hostio_readlink): Return optional<string>.
6660 * inf-child.c (inf_child_fileio_readlink): Return
6662 * target.c (target_fileio_readlink): Return optional<string>.
6664 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6666 * regcache.c (cooked_read_test): Add riscv to the list of
6667 architectures that have a save_reggroup.
6669 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6671 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6672 value is not a dynamic class object.
6674 2018-03-06 Tom Tromey <tom@tromey.com>
6676 * rust-exp.y: Formatting fixes.
6678 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6680 * riscv-tdep.c (riscv_register_name): Remove target description
6682 (riscv_gdbarch_init): Remove target description check.
6684 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6686 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6688 * riscv-tdep.h: Likewise.
6690 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6692 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6693 (riscv_pseudo_register_write): Delete.
6694 (riscv_gdbarch_init): Remove all use of pseudo registers.
6696 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6698 * record-btrace.c (btrace_print_lines): Replace cleanup
6699 parameter with RAII equivalents.
6700 (btrace_insn_history): Replace cleanup with RAII equivalents.
6701 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6702 make_cleanup_ui_out_tuple_begin_end): Remove.
6703 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6704 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6705 make_cleanup_ui_out_list_begin_end): Remove.
6707 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6709 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6710 parameter types to std::vector. Use bool.
6711 (record_btrace_wait): Replace VEC(tp_t) with
6712 std::vector<thread_info *>.
6713 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6715 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6717 * record-btrace.c (record_btrace_disable_callback): Remove.
6718 (struct scoped_btrace_disable): New.
6719 (record_btrace_open): Use scoped_btrace_disable.
6721 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6723 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6724 reading values from registers.
6726 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6728 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6731 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6733 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6734 change parameter type. Use GDB's print functions, and use
6735 core_addr_to_string where appropriate.
6736 (riscv_push_dummy_call): Use core_addr_to_string where
6737 appropriate, update call to riscv_print_arg_location, and reindent
6739 (riscv_return_value): Update call to riscv_print_arg_location.
6741 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6742 Tim Newsome <tim@sifive.com>
6743 Albert Ou <a0u@eecs.berkeley.edu>
6744 Darius Rad <darius@bluespec.com>
6746 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6747 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6748 (ALLDEPFILES): Add riscv-tdep.c
6749 * configure.tgt: Add riscv support.
6750 * riscv-tdep.c: New file.
6751 * riscv-tdep.h: New file.
6752 * NEWS: Mention new target.
6753 * MAINTAINERS: Add entry for riscv.
6755 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6757 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6758 fields within aggregates.
6760 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6762 * record-btrace.c (btrace_print_lines): Change type of flags to
6763 gdb_disassembly_flags.
6765 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6767 * fbsd-nat.c: Include "inf-ptrace.h".
6768 (USE_SIGTRAP_SIGINFO): Conditionally define.
6769 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6770 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6771 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6773 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6775 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6777 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6778 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6779 "supports_stopped_by_hw_breakpoint" target methods.
6781 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6783 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6784 * fbsd-nat.c (debug_fbsd_nat): New variable.
6785 (show_fbsd_nat_debug): New function.
6786 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6787 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6789 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6791 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6792 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6794 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6795 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6798 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6800 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6801 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6803 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6805 * charset.c (struct charset_vector): New.
6806 (charsets): Change type to charset_vector.
6807 (find_charset_names): Adjust.
6809 (_initialize_charset): Adjust.
6811 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6813 * progspace.h (struct program_space) <deleted_solibs>: Change
6814 type to std::vector<std::string>.
6815 * progspace.c (clear_program_space_solib_cache): Adjust.
6816 * breakpoint.c (print_solib_event): Adjust.
6817 (check_status_catch_solib): Adjust.
6818 * solib.c (update_solib_list): Adjust.
6819 * ui-out.h (class ui_out) <field_string>: New overload.
6820 * ui-out.c (ui_out::field_string): New overload.
6822 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6824 * progspace.h (struct program_space): Add constructor and
6825 destructor, initialize fields.
6826 (add_program_space): Remove.
6827 * progspace.c (add_program_space): Rename to...
6828 (program_space::program_space): ... this.
6829 (release_program_space): Rename to...
6830 (program_space::~program_space): ... this.
6831 (delete_program_space): Use delete to delete program_space.
6832 (initialize_progspace): Use new to allocate program_space.
6833 * inferior.c (add_inferior_with_spaces): Likewise.
6834 (clone_inferior_command): Likewise.
6835 * infrun.c (follow_fork_inferior): Likewise.
6836 (handle_vfork_child_exec_or_exit): Likewise.
6838 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6840 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6841 (delim_string_to_char_ptr_vec): Return std::vector of
6842 gdb::unique_xmalloc_ptr.
6843 (dirnames_to_char_ptr_vec_append): Take std::vector of
6844 gdb::unique_xmalloc_ptr.
6845 (dirnames_to_char_ptr_vec): Return std::vector of
6846 gdb::unique_xmalloc_ptr.
6847 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6848 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6849 (delim_string_to_char_ptr_vec): Return an std::vector of
6850 gdb::unique_xmalloc_ptr, adjust the code.
6851 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6852 gdb::unique_xmalloc_ptr, adjust the code.
6853 (dirnames_to_char_ptr_vec): Return an std::vector of
6854 gdb::unique_xmalloc_ptr, adjust the code.
6855 * auto-load.c (auto_load_safe_path_vec): Change type to
6856 std::vector of gdb::unique_xmalloc_ptr.
6857 (auto_load_expand_dir_vars): Return an std::vector of
6858 gdb::unique_xmalloc_ptr, adjust the code.
6859 (auto_load_safe_path_vec_update): Adjust.
6860 (filename_is_in_auto_load_safe_path_vec): Adjust.
6861 (auto_load_objfile_script_1): Adjust.
6862 * build-id.c (build_id_to_debug_bfd): Adjust.
6863 * linux-thread-db.c (thread_db_load_search): Adjust.
6864 * source.c (add_path): Adjust.
6866 * symfile.c (find_separate_debug_file): Adjust.
6867 * utils.c (do_free_char_ptr_vec): Remove.
6868 (make_cleanup_free_char_ptr_vec): Remove.
6870 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6873 * common/pathstuff.c: Conditionally include "<windows.h>".
6875 2018-03-01 Georg Sauthoff <mail@georg.so>
6878 * gcore.in: Quote variables and switch interpreter to bash.
6880 2018-03-01 Tom Tromey <tom@tromey.com>
6882 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6883 assertion. Add assertion for discriminant_index.
6884 (quirk_rust_enum): Use correct base type name in univariant case.
6886 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6888 * record.c (get_call_history_modifiers): Return a
6890 (cmd_record_call_history): Adjust.
6891 * record-btrace.c (record_btrace_call_history): Adjust.
6892 (record_btrace_call_history_range): Adjust.
6893 (record_btrace_call_history_from): Adjust.
6894 * target-debug.h (target_debug_print_record_print_flags): New.
6895 * target-delegates.c: Re-generate.
6896 * target.c (target_call_history): Change flags type.
6897 (target_call_history_from): Likewise.
6898 (target_call_history_range): Likewise.
6899 * target.h (struct target_ops) <target_call_history>: Likewise.
6900 (target_call_history_from): Likewise.
6901 (target_call_history_range): Likewise.
6903 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6904 Simon Marchi <simon.marchi@polymtl.ca>
6906 * common/common-utils.c: Include "sys/stat.h".
6907 (is_regular_file): Move here from "source.c"; change return
6909 * common/common-utils.h (is_regular_file): New prototype.
6910 * common/pathstuff.c (contains_dir_separator): New function.
6911 * common/pathstuff.h (contains_dir_separator): New prototype.
6912 * source.c: Don't include "sys/stat.h".
6913 (is_regular_file): Move to "common/common-utils.c".
6915 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6917 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6918 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6919 * auto-load.c: Include "common/pathstuff.h".
6920 * common/common-def.h (current_directory): Move here.
6921 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6923 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6925 * common/pathstuff.c: New file.
6926 * common/pathstuff.h: New file.
6927 * compile/compile.c: Include "common/pathstuff.h".
6928 * defs.h (current_directory): Move to "common/common-defs.h".
6929 * dwarf2read.c: Include "common/pathstuff.h".
6931 * guile/scm-safe-call.c: Likewise.
6932 * linux-thread-db.c: Likewise.
6934 * nto-tdep.c: Likewise.
6935 * objfiles.c: Likewise.
6936 * source.c: Likewise.
6937 * symtab.c: Likewise.
6938 * utils.c: Include "common/pathstuff.h".
6939 (gdb_realpath): Move to "common/pathstuff.c".
6940 (gdb_realpath_keepfile): Likewise.
6941 (gdb_abspath): Likewise.
6942 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6943 (gdb_realpath_keepfile): Likewise.
6944 (gdb_abspath): Likewise.
6946 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6948 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6949 wildcard process pid for super_resume for kernels with a
6952 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6954 * compile/compile.c (get_args): Add additional comments
6955 explaining function.
6957 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6958 Tom Tromey <tom@tromey.com>
6960 * target.h (memory_write_request_s): Remove typedef. Don't define
6962 (target_write_memory_blocks): Change argument to std::vector.
6963 (struct memory_write_request): Add constructor.
6964 * target-memory.c (compare_block_starting_address): Return bool.
6965 Change argument types.
6966 (claim_memory): Change arguments to use std::vector.
6967 (split_regular_and_flash_blocks, blocks_to_erase)
6968 (compute_garbled_blocks): Likewise.
6969 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6970 (target_write_memory_blocks): Change argument to std::vector.
6971 * symfile.c (struct load_section_data): Add constructor and
6972 destructor. Use std::vector for "requests".
6973 (struct load_progress_data): Add initializers.
6974 (load_section_callback): Update. Use "new".
6975 (clear_memory_write_data): Remove.
6976 (generic_load): Update.
6978 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6980 * arch/aarch64.h: Use common/tdesc.h.
6982 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6984 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6985 architecture with a 64-bit ABI.
6987 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6989 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6990 ahead of target description loading.
6992 2018-02-26 Tom Tromey <tom@tromey.com>
6994 * stack.c (backtrace_command_1): Update.
6995 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6997 * python/py-framefilter.c (py_print_frame)
6998 (gdbpy_apply_frame_filter): Change type of "flags".
6999 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7001 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7002 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7003 * extension.h (enum frame_filter_flag): Rename from
7005 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7006 (apply_ext_lang_frame_filter): Change type of "flags".
7007 * extension.c (apply_ext_lang_frame_filter): Change type of
7009 * extension-priv.h (struct extension_language_ops)
7010 <apply_frame_filter>: Change type of "flags".
7012 2018-02-26 Tom Tromey <tom@tromey.com>
7015 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7016 off-by-one in py_end computation.
7017 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7019 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7022 2018-02-26 Tom Tromey <tom@tromey.com>
7024 * dwarf2read.c (struct variant_field): New.
7025 (struct nextfield) <variant>: New field.
7026 (dwarf2_add_field): Handle DW_TAG_variant_part.
7027 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7028 discriminated union.
7029 (read_structure_type): Handle DW_TAG_variant_part.
7030 (handle_struct_member_die): New function, extracted from
7031 process_structure_scope. Handle DW_TAG_variant.
7032 (process_structure_scope): Handle discriminated unions. Call
7033 handle_struct_member_die.
7035 2018-02-26 Tom Tromey <tom@tromey.com>
7037 * rust-lang.h (rust_last_path_segment): Declare.
7038 * rust-lang.c (rust_last_path_segment): Now public. Change
7040 (struct disr_info): Remove.
7041 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7042 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7043 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7044 (rust_enum_p, rust_enum_variant): New function.
7045 (rust_underscore_fields): Remove "offset" parameter.
7046 (rust_print_enum): New function.
7047 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7048 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7049 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7051 (rust_internal_print_type): New function, from rust_print_type.
7053 (rust_print_type): Call rust_internal_print_type.
7054 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7055 Update enum handling.
7056 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7057 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7058 (rust_union_quirks): New functions.
7059 (process_full_comp_unit, process_full_type_unit): Call
7061 (process_structure_scope): Update rust_unions if necessary.
7063 2018-02-26 Tom Tromey <tom@tromey.com>
7065 * value.h (value_union_variant): Declare.
7066 * valops.c (value_union_variant): New function.
7067 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7068 (struct discriminant_info): New.
7069 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7071 (struct main_type) <flag_discriminated_union>: New field.
7073 2018-02-26 Tom Tromey <tom@tromey.com>
7075 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7076 unittests/unpack-selftests.c.
7077 * unittests/unpack-selftests.c: New file.
7078 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7080 2018-02-26 Yao Qi <yao.qi@linaro.org>
7082 * dwarf2read.c (struct partial_die_info) <read>: New method.
7083 (read_partial_die): Remove the declaration.
7084 (load_partial_dies): Update.
7085 (partial_die_info::partial_die_info):
7086 (read_partial_die): Change it to partial_die_info::read.
7088 2018-02-26 Yao Qi <yao.qi@linaro.org>
7090 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7091 (fixup_partial_die): Remove declaration.
7092 (scan_partial_symbols): Update.
7093 (partial_die_parent_scope): Likewise.
7094 (partial_die_full_name): Likewise.
7095 (fixup_partial_die): Change it to partial_die_info::fixup.
7097 2018-02-26 Yao Qi <yao.qi@linaro.org>
7099 * dwarf2read.c (read_partial_die): Update the declaration.
7100 (load_partial_dies): Caller update.
7101 (read_partial_die): Remove one argument abbrev_len.
7103 2018-02-26 Yao Qi <yao.qi@linaro.org>
7105 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7106 assignment operator.
7107 (load_partial_dies): Use ctor and copy ctor.
7108 (read_partial_die): Update.
7109 (dwarf2_cu::find_partial_die): Use ctor.
7111 2018-02-26 Yao Qi <yao.qi@linaro.org>
7113 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7114 (find_partial_die_in_comp_unit): Change it to
7115 dwarf2_cu::find_partial_die.
7116 (find_partial_die): Update.
7118 2018-02-26 Yao Qi <yao.qi@linaro.org>
7120 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7123 2018-02-26 Yao Qi <yao.qi@linaro.org>
7125 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7127 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7129 * arch/amd64.h: Use common/tdesc.h.
7130 * arch/i386.c: Likewise.
7131 * arch/i386.h: Likewise.
7132 * arch/tic6x.c: Likewise.
7133 * arch/tdesc.h: Move file from here...
7134 * common/tdesc.h: ...to here.
7135 * features/aarch64-core.c: Regenerate.
7136 * features/aarch64-fpu.c: Regenerate.
7137 * features/i386/32bit-avx.c: Regenerate.
7138 * features/i386/32bit-avx512.c: Regenerate.
7139 * features/i386/32bit-core.c: Regenerate.
7140 * features/i386/32bit-linux.c: Regenerate.
7141 * features/i386/32bit-mpx.c: Regenerate.
7142 * features/i386/32bit-pkeys.c: Regenerate.
7143 * features/i386/32bit-sse.c: Regenerate.
7144 * features/i386/64bit-avx.c: Regenerate.
7145 * features/i386/64bit-avx512.c: Regenerate.
7146 * features/i386/64bit-core.c: Regenerate.
7147 * features/i386/64bit-linux.c: Regenerate.
7148 * features/i386/64bit-mpx.c: Regenerate.
7149 * features/i386/64bit-pkeys.c: Regenerate.
7150 * features/i386/64bit-segments.c: Regenerate.
7151 * features/i386/64bit-sse.c: Regenerate.
7152 * features/i386/x32-core.c: Regenerate.
7153 * features/tic6x-c6xp.c: Regenerate.
7154 * features/tic6x-core.c: Regenerate.
7155 * features/tic6x-gp.c: Regenerate.
7156 * target-descriptions.c: Use common/tdesc.h.
7157 * target-descriptions.h: Likewise.
7159 2018-02-24 Tom Tromey <tom@tromey.com>
7161 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7162 (try_thread_db_load_from_dir, thread_db_load_search): Use
7164 (info_auto_load_libthread_db_compare): Return bool. Change
7166 (info_auto_load_libthread_db): Use std::vector, std::string.
7169 2018-02-24 Tom Tromey <tom@tromey.com>
7171 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7173 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7175 * gdbarch.c: Rebuild.
7176 * gdbarch.h: Rebuild.
7177 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7178 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7179 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7182 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7184 * gdbtypes.h (sect_offset): Change type to uint64_t.
7185 (sect_offset_str): New function.
7186 * dwarf2read.c (create_addrmap_from_aranges): Use
7188 (error_check_comp_unit_head): Likewise.
7189 (create_debug_type_hash_table): Likewise.
7190 (read_cutu_die_from_dwo): Likewise.
7191 (init_cutu_and_read_dies): Likewise.
7192 (init_cutu_and_read_dies_no_follow): Likewise.
7193 (process_psymtab_comp_unit_reader): Likewise.
7194 (partial_die_parent_scope): Likewise.
7195 (peek_die_abbrev): Likewise.
7196 (process_queue): Likewise.
7197 (dwarf2_physname): Likewise.
7198 (read_namespace_alias): Likewise.
7199 (read_import_statement): Likewise.
7200 (create_dwo_cu_reader): Likewise.
7201 (create_cus_hash_table): Likewise.
7202 (lookup_dwo_cutu): Likewise.
7203 (inherit_abstract_dies): Likewise.
7204 (read_func_scope): Likewise.
7205 (read_call_site_scope): Likewise.
7206 (dwarf2_add_member_fn): Likewise.
7207 (read_common_block): Likewise.
7208 (read_module_type): Likewise.
7209 (read_typedef): Likewise.
7210 (read_subrange_type): Likewise.
7211 (load_partial_dies): Likewise.
7212 (read_partial_die): Likewise.
7213 (find_partial_die): Likewise.
7214 (read_str_index): Likewise.
7215 (dwarf2_string_attr): Likewise.
7216 (build_error_marker_type): Likewise.
7217 (lookup_die_type): Likewise.
7218 (dump_die_shallow): Likewise.
7219 (follow_die_ref): Likewise.
7220 (dwarf2_fetch_die_loc_sect_off): Likewise.
7221 (dwarf2_fetch_constant_bytes): Likewise.
7222 (follow_die_sig): Likewise.
7223 (get_signatured_type): Likewise.
7224 (get_DW_AT_signature_type): Likewise.
7225 (dwarf2_find_containing_comp_unit): Likewise.
7226 (set_die_type): Likewise.
7228 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7230 * arch/aarch64.c: Include "common-defs.h".
7231 * arch/amd64.c: Likewise.
7232 * arch/i386.c: Likewise.
7234 2018-02-21 Tom Tromey <tom@tromey.com>
7236 * value.h: (extract_field_op): Update.
7237 * eval.c (extract_field_op): Return a const char *.
7238 * expression.h (parse_expression_for_completion): Update.
7239 * completer.c (complete_expression): Update.
7240 (add_struct_fields): Make fieldname const.
7241 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7242 (mark_completion_tag, parse_exp_in_context_1): Update.
7243 (parse_expression_for_completion): Change "name" to
7244 unique_xmalloc_ptr*.
7246 2018-02-21 Tom Tromey <tom@tromey.com>
7248 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7250 2018-02-21 Yao Qi <yao.qi@linaro.org>
7252 * avr-tdep.c (avr_read_pc): Change parameter type to
7254 * gdbarch.sh (read_pc): Likewise.
7255 * gdbarch.c: Re-generated.
7256 * gdbarch.h: Re-generated.
7257 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7259 * ia64-tdep.c (ia64_read_pc): Likewise.
7260 * mips-tdep.c (mips_read_pc): Likewise.
7261 * spu-tdep.c (spu_read_pc): Likewise.
7263 2018-02-21 Yao Qi <yao.qi@linaro.org>
7265 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7266 * regcache-dump.c: New file.
7267 * regcache.c: Move register_dump to regcache-dump.c.
7268 (maintenance_print_registers): Likewise.
7269 (maintenance_print_raw_registers): Likewise.
7270 (maintenance_print_cooked_registers): Likewise.
7271 (maintenance_print_register_groups): Likewise.
7272 (maintenance_print_remote_registers): Likewise.
7273 (_initialize_regcache): Likewise.
7274 * regcache.h (register_dump): Moved from regcache.c.
7276 2018-02-21 Yao Qi <yao.qi@linaro.org>
7278 * regcache.c (regcache::regcache): Update.
7279 (regcache::invalidate): Move it to detached_regcache::invalidate.
7280 (get_thread_arch_aspace_regcache): Update.
7281 (regcache::raw_update): Update.
7282 (regcache::cooked_read): Remove some code.
7283 (regcache::cooked_read_value): Likewise.
7284 (regcache::raw_write): Remove assert on m_readonly_p.
7285 (regcache::raw_supply_integer): Move it to
7286 detached_regcache::raw_supply_integer.
7287 (regcache::raw_supply_zeroed): Likewise.
7288 * regcache.h (detached_regcache) <raw_supply_integer>: New
7290 <raw_supply_zeroed, invalidate>: Likewise.
7291 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7292 <invalidate>: Likewise.
7293 <m_readonly_p>: Removed.
7295 2018-02-21 Yao Qi <yao.qi@linaro.org>
7297 * infcmd.c (get_return_value): Let stop_regs point to
7298 get_current_regcache.
7299 * regcache.c (regcache::regcache): Remove.
7300 (register_dump_reg_buffer): New class.
7301 (regcache_print): Adjust.
7302 * regcache.h (regcache): Remove constructors.
7304 2018-02-21 Yao Qi <yao.qi@linaro.org>
7306 * regcache.c (class register_dump): New class.
7307 (register_dump_regcache, register_dump_none): New class.
7308 (register_dump_remote, register_dump_groups): New class.
7309 (regcache_print): Update.
7310 * regcache.h (regcache_dump_what): Move it to regcache.c.
7311 (regcache) <dump>: Remove.
7313 2018-02-21 Yao Qi <yao.qi@linaro.org>
7315 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7317 (jit_unwind_reg_set_impl): Call raw_supply.
7318 (jit_frame_sniffer): Use reg_buffer_rw.
7319 * record-full.c (record_full_core_regbuf): Change its type.
7320 (record_full_core_open_1): Use reg_buffer_rw.
7321 (record_full_close): Likewise.
7322 (record_full_core_fetch_registers): Use regcache->raw_supply.
7323 (record_full_core_store_registers): Likewise.
7324 * regcache.c (regcache::get_register_status): Move it to
7326 (regcache_raw_set_cached_value): Remove.
7327 (regcache::raw_set_cached_value): Remove.
7328 (regcache::raw_write): Call raw_supply.
7329 (regcache::raw_supply): Move it to reg_buffer_rw.
7330 * regcache.h (regcache_raw_set_cached_value): Remove.
7331 (reg_buffer_rw): New class.
7333 2018-02-21 Yao Qi <yao.qi@linaro.org>
7335 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7336 readonly_detached_regcache.
7337 (dummy_frame_prev_register): Use regcache->cooked_read.
7338 * frame.c (frame_save_as_regcache): Change return type.
7339 (frame_pop): Update.
7340 * frame.h (frame_save_as_regcache): Update declaration.
7341 * inferior.h (get_infcall_suspend_state_regcache): Update
7343 * infrun.c (infcall_suspend_state) <registers>: use
7344 readonly_detached_regcache.
7345 (save_infcall_suspend_state): Don't use regcache_dup.
7346 (get_infcall_suspend_state_regcache): Change return type.
7347 * linux-fork.c (struct fork_info) <savedregs>: Change to
7348 readonly_detached_regcache.
7350 (fork_save_infrun_state): Don't use regcache_dup.
7351 (info_checkpoints_command): Adjust.
7352 * mi/mi-main.c (register_changed_p): Update declaration.
7353 (mi_cmd_data_list_changed_registers): Use
7354 readonly_detached_regcache.
7355 (register_changed_p): Change parameter type to
7356 readonly_detached_regcache.
7357 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7358 readonly_detached_regcache.
7359 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7360 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7362 (regcache::save): Move it to reg_buffer.
7363 (regcache::restore): Change parameter type.
7364 (regcache_dup): Remove.
7365 * regcache.h (reg_buffer) <save>: New method.
7366 (readonly_detached_regcache): New class.
7367 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7368 readonly_detached_regcache.
7369 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7371 2018-02-21 Yao Qi <yao.qi@linaro.org>
7373 * frame.c (frame_save_as_regcache): Use regcache method save.
7374 (frame_pop): Use regcache method restore.
7375 * infrun.c (restore_infcall_suspend_state): Likewise.
7376 * linux-fork.c (fork_load_infrun_state): Likewise.
7377 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7379 * regcache.c (regcache_save): Remove.
7380 (regcache::restore): More asserts.
7381 (regcache_cpy): Remove.
7382 * regcache.h (regcache_save): Remove the declaration.
7383 (regcache::restore): Move from private to public.
7384 Remove the friend declaration of regcache_cpy.
7385 (regcache_cpy): Remove declaration.
7387 2018-02-21 Yao Qi <yao.qi@linaro.org>
7389 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7390 parameter type to 'readable_regcache *'.
7391 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7392 * arm-tdep.c (arm_neon_quad_read): Likewise.
7393 (arm_pseudo_read): Likewise.
7394 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7395 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7396 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7397 * gdbarch.c: Re-generated.
7398 * gdbarch.h: Re-generated.
7399 * gdbarch.sh (pseudo_register_read): Change parameter type to
7400 'readable_regcache *'.
7401 (pseudo_register_read_value): Likewise.
7402 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7403 (h8300_pseudo_register_read): Likewise.
7404 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7405 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7406 (i386_pseudo_register_read_into_value): Likewise.
7407 (i386_pseudo_register_read_value): Likewise.
7408 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7410 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7411 * m32c-tdep.c (m32c_raw_read): Likewise.
7412 (m32c_read_flg): Likewise.
7413 (m32c_banked_register): Likewise.
7414 (m32c_banked_read): Likewise.
7415 (m32c_sb_read): Likewise.
7416 (m32c_part_read): Likewise.
7417 (m32c_cat_read): Likewise.
7418 (m32c_r3r2r1r0_read): Likewise.
7419 (m32c_pseudo_register_read): Likewise.
7420 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7421 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7422 (mep_pseudo_cr64_read): Likewise.
7423 (mep_pseudo_register_read): Likewise.
7424 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7425 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7426 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7427 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7428 (regcache::cooked_read): Likewise.
7429 (regcache::cooked_read_value): Likewise.
7430 (regcache_cooked_read_signed):
7431 (regcache::cooked_read): Likewise.
7432 * regcache.h (readable_regcache): New class.
7433 (regcache): Inherit readable_regcache. Move some methods to
7435 * rl78-tdep.c (rl78_pseudo_register_read): Change
7436 parameter type to 'readable_regcache *'.
7437 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7438 (e500_pseudo_register_read): Change parameter type to
7439 'readable_regcache *'.
7440 (dfp_pseudo_register_read): Likewise.
7441 (vsx_pseudo_register_read): Likewise.
7442 (efpr_pseudo_register_read): Likewise.
7443 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7444 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7445 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7446 (sh64_pseudo_register_read): Likewise.
7447 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7448 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7449 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7450 (spu_pseudo_register_read): Likewise.
7451 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7452 (xtensa_pseudo_register_read): Likewise.
7454 2018-02-21 Yao Qi <yao.qi@linaro.org>
7456 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7457 (regcache::arch): Move it to reg_buffer::arch.
7458 (regcache::register_buffer): Likewise.
7459 (regcache::assert_regnum): Likewise.
7460 (regcache::num_raw_registers): Likewise.
7461 * regcache.h (reg_buffer): New class.
7462 (regcache): Inherit reg_buffer.
7464 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7466 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7467 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7469 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7471 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7473 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7475 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7476 (SFILES): Remove common/*.c files.
7477 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7478 * common/common.host: Add common reference.
7479 * configure.ac: Likewise.
7480 * configure: Regenerate.
7482 2018-02-16 Yao Qi <yao.qi@linaro.org>
7484 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7485 (block_initialize_namespace): Use new.
7486 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7487 (dwarf2_free_objfile): Use delete.
7488 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7489 (copy_type_recursive): Use new.
7490 * gdb_obstack.h (allocate_on_obstack): New.
7492 2018-02-15 Yao Qi <yao.qi@linaro.org>
7495 * inferior.c (exit_inferior_1): Reset inf->control.
7497 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7499 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7502 2018-02-14 Pedro Alves <palves@redhat.com>
7504 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7505 frame_cleanup_after_sniffer on exception.
7507 2018-02-14 Tom Tromey <tom@tromey.com>
7509 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7511 (solib_bfd_open): Make pathname const.
7512 * solib.c (solib_bfd_open): Make pathname const.
7513 * solib-spu.c (spu_bfd_fopen): Make name const.
7514 (spu_bfd_open): Make pathname const.
7515 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7516 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7518 2018-02-14 Tom Tromey <tom@tromey.com>
7520 * symfile.c (symfile_bfd_open): Update.
7521 * source.h (openp, source_full_path_of, find_and_open_source):
7522 Change argument type to unique_xmalloc_ptr.
7523 * source.c (openp): Take a unique_xmalloc_ptr.
7524 (source_full_path_of, find_and_open_source): Likewise.
7525 (open_source_file, symtab_to_fullname): Update.
7526 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7528 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7529 (exec_file_find): Update.
7530 * psymtab.c (psymtab_to_fullname): Update.
7531 * nto-tdep.h (nto_find_and_open_solib): Update.
7532 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7534 * exec.c (exec_file_attach): Update.
7535 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7536 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7538 2018-02-14 Tom Tromey <tom@tromey.com>
7540 * solib.c: Include source.h.
7541 * nto-tdep.c: Include source.h.
7542 * mi/mi-cmd-env.c: Include source.h.
7543 * infcmd.c: Include source.h.
7544 * exec.c: Include source.h.
7545 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7546 (add_path, directory_switch, source_path, init_source_path): Move
7548 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7549 (add_path, directory_switch, source_path, init_source_path):
7552 2018-02-14 Tom Tromey <tom@tromey.com>
7554 * solist.h (exec_file_find, solib_find): Return
7556 (solib_bfd_fopen): Take a const char *.
7557 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7558 (exec_file_find, solib_find): Likewise.
7559 (solib_bfd_fopen): Do not take ownership of "pathname".
7560 (solib_bfd_open): Use unique_xmalloc_ptr.
7561 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7562 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7563 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7564 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7566 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7568 * ada-lang.c (name_match_type_from_name): Remove reference to
7569 ada_name_for_lookup in function's documentation.
7570 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7572 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7574 * defs.h (enum openp_flags): New enum.
7575 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7576 Move to enum openp_flags.
7577 (openp_flags): New enum flags.
7578 (openp): Change parameter type to openp_flags.
7579 * source.c (openp): Change parameter type to openp_flags.
7580 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7581 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7583 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7585 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7588 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7590 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7592 (class dwarf2_queue_guard): ...the destructor of this new class.
7593 (dw2_do_instantiate_symtab): Create instance of the new class
7594 dwarf2_queue_guard, remove cleanup.
7596 2018-02-09 Tom Tromey <tom@tromey.com>
7598 * source.c (find_source_lines): Don't reference past the end of
7601 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7603 * remote.c (remote_btrace_maybe_reopen): Change error message.
7604 * btrace.c (btrace_enable): Likewise.
7605 (parse_xml_btrace): Likewise.
7606 (parse_xml_btrace_conf): Likewise.
7608 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7610 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7611 (linux_enable_pt, linux_enable_bts): Call
7612 diagnose_perf_event_open_fail.
7614 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7616 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7617 Remove parameter and change return type. Update callers. Move it.
7618 (linux_enable_bts, linux_enable_pt): Improve error message.
7619 (linux_enable_pt): Remove zero buffer size check.
7620 (linux_enable_btrace): Improve error messages. Remove NULL return
7623 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7625 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7626 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7627 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7628 (linux_supports_pt, linux_supports_btrace): Remove.
7629 (linux_enable_bts): Call cpu_supports_bts.
7630 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7631 * remote.c (remote_supports_btrace): Remove.
7632 (init_remote_ops): Remove remote_supports_btrace.
7633 * target-delegates.c: Regenerated.
7634 * target.c (target_supports_btrace): Remove.
7635 * target.h (target_ops) <to_supports_btrace>: Remove
7636 (target_supports_btrace): Remove.
7637 * x86-linux-nat.c (x86_linux_create_target): Remove
7638 linux_supports_btrace.
7640 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7642 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7644 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7645 exception and use message in own exception.
7647 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7649 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7650 (perf_event_pt_event_type): Use gdb_file_up.
7651 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7652 scoped_fd, and scoped_mmap.
7654 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7656 * common/scoped_mmap.h: New.
7657 * unittests/scoped_mmap-selftest.c: New.
7658 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7659 unittests/scoped_mmap-selftest.c.
7661 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7663 * common/scoped_fd.h: New.
7664 * unittests/scoped_fd-selftest.c: New.
7665 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7666 unittests/scoped_fd-selftest.c.
7668 2018-02-09 Tom Tromey <tom@tromey.com>
7670 * auto-load.c (auto_load_section_scripts): Use
7671 gdb::unique_xmalloc_ptr.
7673 2018-02-09 Tom Tromey <tom@tromey.com>
7675 * auto-load.c (execute_script_contents): Use std::string.
7677 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7679 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7680 Python function, rather than a new command.
7682 2018-02-08 Tom Tromey <tom@tromey.com>
7684 * solib.c (solib_find_1): Use std::string.
7685 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7687 2018-02-08 Tom Tromey <tom@tromey.com>
7689 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7691 2018-02-08 Tom Tromey <tom@tromey.com>
7693 * source.c (find_source_lines): Use gdb::def_vector.
7695 2018-02-08 Tom Tromey <tom@tromey.com>
7697 * macrocmd.c (struct temporary_macro_definition): New.
7698 (macro_define_command): Use temporary_macro_definition. Remove
7700 (free_macro_definition_ptr): Remove.
7702 2018-02-08 Tom Tromey <tom@tromey.com>
7704 * macroexp.c (maybe_expand): Use std::string.
7706 2018-02-08 Tom Tromey <tom@tromey.com>
7708 * macroexp.c (struct macro_buffer): Add initializers for some
7710 (init_buffer, init_shared_buffer, free_buffer)
7711 (free_buffer_return_text): Remove.
7712 (macro_buffer): New constructors.
7713 (~macro_buffer): New destructor.
7714 (macro_buffer::set_shared): New method.
7715 (macro_buffer::resize_buffer, macro_buffer::appendc)
7716 (macro_buffer::appendmem): Now methods, not free functions.
7717 (set_token, append_tokens_without_splicing, stringify)
7718 (macro_stringify): Update.
7719 (gather_arguments): Change return type. Remove argc_p argument,
7720 add args_ptr argument. Use std::vector.
7721 (substitute_args): Remove argc argument. Accept std::vector.
7722 (expand): Update. Use std::vector.
7723 (scan, macro_expand, macro_expand_next): Update.
7725 2018-02-08 Tom Tromey <tom@tromey.com>
7727 * symtab.c (default_collect_symbol_completion_matches_break_on):
7728 Use unique_xmalloc_ptr.
7729 * macroscope.h: (sal_macro_scope, user_macro_scope)
7730 (default_macro_scope): Return unique_xmalloc_ptr.
7731 * macroscope.c (sal_macro_scope, user_macro_scope)
7732 (default_macro_scope): Return unique_xmalloc_ptr.
7733 * macroexp.h (macro_expand, macro_expand_once): Return
7735 * macroexp.c (macro_expand, macro_expand_once): Return
7737 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7738 (info_macro_command, info_macros_command): Use
7740 * compile/compile-c-support.c (write_macro_definitions): Use
7742 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7744 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7746 * value.c (value_static_field): Assign field type instead of
7747 containing type when returning an optimized out value.
7749 2018-02-06 Yao Qi <yao.qi@linaro.org>
7751 * ft32-tdep.c (ft32_read_pc): Remove.
7752 (ft32_write_pc): Remove.
7753 (ft32_gdbarch_init): Update.
7754 * m32r-tdep.c (m32r_read_pc): Remove.
7755 (m32r_gdbarch_init): Update.
7756 * mep-tdep.c (mep_read_pc): Remove.
7757 (mep_gdbarch_init): Update.
7758 * microblaze-tdep.c (microblaze_write_pc): Remove.
7759 (microblaze_gdbarch_init): Update.
7760 * mn10300-tdep.c (mn10300_read_pc): Remove.
7761 (mn10300_write_pc): Remove.
7762 (mn10300_gdbarch_init): Update.
7763 * moxie-tdep.c (moxie_read_pc): Remove.
7764 (moxie_write_pc): Remove.
7765 (moxie_gdbarch_init): Update.
7767 2018-02-06 Yao Qi <yao.qi@linaro.org>
7769 * expprint.c (print_subexp_standard): Handle
7770 OP_F77_UNDETERMINED_ARGLIST.
7771 (dump_subexp_body_standard): Likewise.
7773 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7775 * target-descriptions.c (tdesc_element_visitor) Add empty
7777 (tdesc_type): Move make_gdb_type from here.
7778 (tdesc_type_builtin): Likewise.
7779 (tdesc_type_vector): Likewise.
7780 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7781 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7782 (make_gdb_type_union): Likewise.
7783 (make_gdb_type_flags): Likewise.
7784 (make_gdb_type_enum): Likewise.
7785 (make_gdb_type): New function.
7786 (tdesc_register_type): Use static make_gdb_type.
7788 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7790 * infcmd.c (default_print_one_register_info): Align natural-format
7791 column values consistently one under another.
7792 (pad_to_column): New function.
7794 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7796 * dwarf2read.c (dwarf2_physname): Move commment.
7798 2018-02-01 Leszek Swirski <leszeks@google.com>
7800 * varobj.c (varobj_formatted_print_options): Allow recursive
7801 pretty printing if pretty printing is enabled.
7803 2018-02-01 Leszek Swirski <leszeks@google.com>
7805 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7806 names after a structop as a filename.
7808 2018-02-01 Yao Qi <yao.qi@linaro.org>
7810 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7811 (arm_record_coproc_data_proc): Likewise.
7813 2018-02-01 Yao Qi <yao.qi@linaro.org>
7815 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7817 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7819 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7820 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7822 2018-01-31 Pedro Alves <palves@redhat.com>
7824 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7825 * inflow.c (child_terminal_save_inferior): Wrap reference to
7826 tcgetpgrp in HAVE_TERMIOS_H.
7827 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7829 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7830 always iterate over all inferiors.
7831 (gdbsim_cntrl_c): Adjust.
7832 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7834 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7836 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7837 index type is objfile-owned if the element type is as well.
7839 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7843 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7845 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7846 "features/s390x-linux64.c".
7847 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7848 s390_linux32 and s390x_linux64.
7849 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7851 * s390-tdep.c: Include "features/s390-linux32.c" and
7852 "features/s390x-linux64.c".
7853 (s390_tdesc_valid): Add check for tdesc_has_registers.
7854 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7855 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7856 tdesc_s390x_linux64.
7857 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7858 tdesc_s390x_linux64 to...
7859 * s390-tdep.h: ...here.
7861 2018-01-30 Pedro Alves <palves@redhat.com>
7864 * config.in, configure: Regenerate.
7865 * configure.ac: Check for getpgid.
7866 * go32-nat.c (go32_pass_ctrlc): New.
7867 (go32_target): Install it.
7868 * inf-child.c (inf_child_target): Install
7869 child_terminal_save_inferior, child_pass_ctrlc and
7871 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7872 (inf_ptrace_target): No longer install it.
7873 * infcmd.c (interrupt_target_1): Adjust.
7874 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7875 (child_interrupt): Declare.
7876 (inferior::terminal_state): New.
7877 * inflow.c (struct terminal_info): Update comments.
7878 (inferior_process_group): Delete.
7879 (terminal_is_ours): Delete.
7880 (gdb_tty_state): New.
7881 (child_terminal_init): Adjust.
7882 (is_gdb_terminal, sharing_input_terminal_1)
7883 (sharing_input_terminal): New functions.
7884 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7885 Set the process's actual process group in the foreground if
7886 possible. Handle is_ours_for_output/is_ours distinction. Don't
7887 mark terminal as the inferior's if not sharing GDB's terminal.
7888 Don't check attach_flag.
7889 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7890 pass down a target_terminal_state.
7891 (child_terminal_save_inferior): New, factored out from ...
7892 (child_terminal_ours_1): ... this. Handle
7893 target_terminal_state::is_ours_for_output.
7894 (child_interrupt, child_pass_ctrlc): New.
7895 (inflow_inferior_exit): Clear the inferior's terminal_state.
7896 (copy_terminal_info): Copy the inferior's terminal state.
7897 (_initialize_inflow): Remove reference to terminal_is_ours.
7898 * inflow.h (inferior_process_group): Delete.
7899 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7900 * procfs.c (procfs_target): Don't install procfs_interrupt.
7901 (procfs_interrupt): Delete.
7902 * remote.c (remote_serial_quit_handler): Adjust.
7903 (remote_interrupt): Remove ptid parameter. Adjust.
7904 * target-delegates.c: Regenerate.
7905 * target.c: Include "terminal.h".
7906 (target_terminal::terminal_state): Rename to ...
7907 (target_terminal::m_terminal_state): ... this.
7908 (target_terminal::init): Adjust.
7909 (target_terminal::inferior): Adjust to per-inferior
7911 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7912 (target_terminal::ours, target_terminal::ours_for_output): Use
7913 target_terminal_is_ours_kind.
7914 (target_interrupt): Remove ptid parameter. Adjust.
7915 (default_target_pass_ctrlc): Adjust.
7916 * target.h (target_ops::to_terminal_save_inferior): New field.
7917 (target_ops::to_interrupt): Remove ptid_t parameter.
7918 (target_interrupt): Remove ptid_t parameter. Update comment.
7919 (target_pass_ctrlc): Update comment.
7920 * target/target.h (target_terminal_state): New scoped enum,
7922 (target_terminal::terminal_state): ... here.
7923 (target_terminal::inferior): Update comments.
7924 (target_terminal::restore_inferior): New.
7925 (target_terminal::is_inferior, target_terminal::is_ours)
7926 (target_terminal::is_ours_for_output): Adjust.
7927 (target_terminal::scoped_restore_terminal_state): Adjust to
7928 rename, and call restore_inferior() instead of inferior().
7929 (target_terminal::scoped_restore_terminal_state::m_state): Change
7931 (target_terminal::terminal_state): Rename to ...
7932 (target_terminal::m_terminal_state): ... this and change type.
7934 2018-01-30 Pedro Alves <palves@redhat.com>
7936 * linux-nat.c (wait_for_signal): New function.
7937 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7939 (async_terminal_is_ours)
7940 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7941 (linux_nat_add_target): Don't override
7942 to_terminal_inferior/to_terminal_ours.
7944 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7946 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7948 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7950 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7951 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7952 dwarf2_per_objfile_free here.
7953 (dwarf2_per_objfile_free): Remove.
7954 (_initialize_dwarf2_read): Don't register
7955 dwarf2_per_objfile_free as a registry cleanup.
7957 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7959 Avoid compilation errors in MinGW native builds
7961 The error is triggered by including python-internal.h, and the
7964 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7965 from build-gnulib/import/math.h:27,
7966 from d:/usr/Python26/include/pyport.h:235,
7967 from d:/usr/Python26/include/Python.h:58,
7968 from python/python-internal.h:94,
7969 from python/py-arch.c:24:
7970 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7974 This happens because Python headers define 'hypot' to expand t
7975 '_hypot' in the Windows builds.
7976 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7977 'hypoth'. This avoids a compilation error.
7979 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7981 * MAINTAINERS (Write After Approval): Fix ordering.
7983 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7985 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7987 2018-01-26 Alan Modra <amodra@gmail.com>
7989 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7990 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7991 Remove nop. Make const. Comment.
7992 (powerpc32_plt_stub_so_2): New.
7993 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7994 Correct count. Update uses.
7995 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7996 Move common code reading PLT entry word. Correct
7997 powerpc32_plt_stub PLT address calculation.
7998 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7999 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8000 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8001 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8002 (ppc64_standard_linkage8): Likewise.
8003 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8004 Correct insns description.
8005 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8007 2018-01-24 Pedro Alves <palves@redhat.com>
8009 GCC PR libstdc++/83906
8010 * gdbtypes.c (operator==(const dynamic_prop &,
8011 const dynamic_prop &)): New.
8012 (operator==(const range_bounds &, const range_bounds &)): New.
8013 (check_types_equal): Use them instead of memcmp.
8014 * gdbtypes.h (operator==(const dynamic_prop &,
8015 const dynamic_prop &)): Declare.
8016 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8017 (operator==(const range_bounds &, const range_bounds &)): Declare.
8018 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8020 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8022 * s390-linux-tdep.c (s390_record_address_mask)
8023 (s390_record_calc_disp_common, s390_record_calc_disp)
8024 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8025 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8026 (s390_process_record): Move to s390-tdep.c.
8027 (s390_linux_init_abi_any): Adjust.
8028 * s390-tdep.c (s390_record_address_mask)
8029 (s390_record_calc_disp_common, s390_record_calc_disp)
8030 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8031 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8032 (s390_process_record): Moved from s390-linux-tdep.c
8033 (s390_gdbarch_init): Adjust.
8035 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8037 * s390-linux-nat.c (s390-tdep.h): New include.
8038 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8039 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8040 (ALLDEPFILES): Add s390-tdep.c.
8041 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8042 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8043 * s390-tdep.h: ...this. New file.
8044 * s390-linux-tdep.c (s390-tdep.h): New include.
8045 (_initialize_s390_tdep): Rename to...
8046 (_initialize_s390_linux_tdep): ...this and adjust.
8047 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8048 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8050 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8051 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8052 (s390_is_partial_instruction, s390_software_single_step)
8053 (is_non_branch_ril, s390_displaced_step_copy_insn)
8054 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8055 (s390_prologue_data, s390_addr, s390_store, s390_load)
8056 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8057 (s390_register_call_saved, s390_guess_tracepoint_registers)
8058 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8059 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8060 (s390_pseudo_register_name, s390_pseudo_register_type)
8061 (s390_pseudo_register_read, s390_pseudo_register_write)
8062 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8063 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8064 (s390_addr_bits_remove, s390_address_class_type_flags)
8065 (s390_address_class_type_flags_to_name)
8066 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8067 (s390_function_arg_float, s390_function_arg_vector)
8068 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8069 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8070 (s390_frame_align, s390_register_return_value, s390_return_value)
8071 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8072 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8073 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8074 (s390_trad_frame_prev_register, s390_unwind_cache)
8075 (s390_prologue_frame_unwind_cache)
8076 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8077 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8078 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8079 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8080 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8081 (s390_frame_base_address, s390_local_base_address)
8082 (s390_frame_base, s390_gcc_target_options)
8083 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8084 (s390_validate_reg_range, s390_tdesc_valid)
8085 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8086 * s390-tdep.c: ...this. New file.
8088 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8090 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8091 (s390_process_record, s390_gdbarch_tdep_alloc)
8092 (s390_linux_init_abi_any): Use/set new hook.
8094 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8096 * s390-linux-tdep.c (osabi.h): New include.
8097 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8098 (s390_linux_init_abi_any): New functions.
8099 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8101 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8103 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8104 tdesc_has_registers check
8106 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8108 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8109 (s390_validate_reg_range): New macro.
8110 (s390_gdbarch_init): Adjust.
8112 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8114 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8115 (s390_gdbarch_tdep_alloc): Adjust.
8116 (s390_gdbarch_init): Adjust.
8118 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8120 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8121 <have_tdb>: Change type to bool.
8122 (s390_gdbarch_tdep_alloc): Adjust.
8123 (s390_gdbarch_init): Adjust.
8125 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8127 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8128 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8129 (s390_gdbarch_tdep_alloc): New function.
8130 (s390_gdbarch_init): Allocate tdep at start and use its fields
8131 instead of separate variables.
8133 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8135 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8136 when looking for cached gdbarch and add comment for remaining.
8138 2018-01-22 Pedro Alves <palves@redhat.com>
8139 Sergio Durigan Junior <sergiodj@redhat.com>
8141 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8144 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8146 * MAINTAINERS: Update my company e-mail address.
8148 2018-01-22 Yao Qi <yao.qi@linaro.org>
8150 * regcache.c (cooked_write_test): New function.
8151 (_initialize_regcache): Register the test.
8153 2018-01-22 Yao Qi <yao.qi@linaro.org>
8155 * ia64-tdep.c (ia64_pseudo_register_read): Call
8156 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8157 * m32c-tdep.c (m32c_cat_read): Likewise.
8158 (m32c_r3r2r1r0_read): Likewise.
8159 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8160 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8162 2018-01-22 Yao Qi <yao.qi@linaro.org>
8164 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8165 method raw_read instead of regcache_raw_read.
8166 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8167 * arm-tdep.c (arm_neon_quad_read): Likewise.
8168 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8169 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8170 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8171 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8172 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8173 (i386_pseudo_register_read_into_value): Likewise.
8174 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8175 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8176 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8177 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8178 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8179 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8180 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8181 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8182 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8184 2018-01-22 Yao Qi <yao.qi@linaro.org>
8186 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8187 * configure.tgt: Remove target mt.
8188 * mt-tdep.c: Remove.
8189 * regcache.c (cooked_read_test): Remove the check for mt.
8191 2018-01-22 Yao Qi <yao.qi@linaro.org>
8193 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8194 instead of gdbarch_pseudo_register_read_value.
8196 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8198 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8201 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8203 * linespec.c (create_sals_line_offset): Remove code that preserved
8204 the symtab_and_line's line number.
8206 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8208 * varobj.c (varobj_create): Don't set valid_block when creating a
8211 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8213 * varobj.c (varobj_create): Remove out of date comment.
8215 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8218 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8219 updating innermost block.
8220 * parse.c (innermost_block_tracker::update): Take extra type
8221 parameter, and check types match before updating innermost block.
8222 (write_dollar_variable): Update innermost block for registers.
8223 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8224 (innermost_block_tracker::innermost_block_tracker): Initialise
8226 (innermost_block_tracker::reset): Take type parameter.
8227 (innermost_block_tracker::update): Take type parameter, and pass
8228 type through as needed.
8229 (innermost_block_tracker::m_types): New member.
8230 * varobj.c (varobj_create): Pass type when reseting innermost
8233 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8235 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8236 * ada-lang.c (resolve_subexp): Likewise.
8237 * breakpoint.c (set_breakpoint_condition) Likewise.
8238 (watch_command_1) Likewise.
8239 * c-exp.y (variable): Likewise.
8240 * d-exp.y (PrimaryExpression): Likewise.
8241 * f-exp.y (variable): Likewise.
8242 * go-exp.y (variable): Likewise.
8243 * m2-exp.y (variable): Likewise.
8244 * objfiles.c (objfile::~objfile): Likewise.
8245 * p-exp.y (variable): Likewise.
8246 * parse.c (innermost_block): Change type.
8247 * parser-defs.h (class innermost_block_tracker): New.
8248 (innermost_block): Change to innermost_block_tracker.
8249 * printcmd.c (display_command): Switch to innermost_block API.
8250 (do_one_display): Likewise.
8251 * rust-exp.y (do_one_display): Likewise.
8252 * symfile.c (clear_symtab_users): Likewise.
8253 * varobj.c (varobj_create): Switch to innermost_block API, replace
8254 use of innermost_block with block stored on varobj object.
8256 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8258 * expression.h (innermost_block): Remove declaration.
8259 * varobj.c: Add 'parser-defs.h' include.
8261 2018-01-19 Tom Tromey <tom@tromey.com>
8263 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8264 symbols in the static and global blocks.
8266 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8268 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8269 gdb_ptrace.h, and move including gdb_wait.h ...
8270 * nat/linux-ptrace.h: ... to here.
8272 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8274 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8275 inf_ptrace_detach_success.
8276 (inf_ptrace_detach_success): Add inferior parameter, use it
8277 instead of inferior_ptid, pass it to detach_inferior.
8278 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8280 * inferior.c (detach_inferior): Add overload that takes an
8282 * inferior.h (detach_inferior): Likewise.
8283 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8284 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8285 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8287 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8289 * target.h (struct target_ops) <to_detach>: Add inferior
8291 (target_detach): Likewise.
8292 * target.c (dispose_inferior): Pass inferior down.
8293 (target_detach): Pass inferior down. Assert that it is equal to
8294 the current inferior.
8295 * aix-thread.c (aix_thread_detach): Pass inferior down.
8296 * corefile.c (core_file_command): Pass current_inferior() down.
8297 * corelow.c (core_detach): Add inferior parameter.
8298 * darwin-nat.c (darwin_detach): Likewise.
8299 * gnu-nat.c (gnu_detach): Likewise.
8300 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8301 * infcmd.c (detach_command): Pass current_inferior() down to
8303 * infrun.c (follow_fork_inferior): Pass parent_inf to
8305 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8307 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8308 * linux-thread-db.c (thread_db_detach): Likewise.
8309 * nto-procfs.c (procfs_detach): Likewise.
8310 * procfs.c (procfs_detach): Likewise.
8311 * record.c (record_detach): Likewise.
8312 * record.h (struct inferior): Forward-declare.
8313 (record_detach): Add inferior parameter.
8314 * remote-sim.c (gdbsim_detach): Likewise.
8315 * remote.c (remote_detach_1): Likewise.
8316 (remote_detach): Likewise.
8317 (extended_remote_detach): Likewise.
8318 * sol-thread.c (sol_thread_detach): Likewise.
8319 * target-debug.h (target_debug_print_inferior_p): New macro.
8320 * target-delegates.c: Re-generate.
8321 * top.c (kill_or_detach): Pass inferior down to target_detach.
8322 * windows-nat.c (windows_detach): Add inferior parameter.
8324 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8326 * target.h (struct target_ops) <to_detach>: Remove args
8328 (target_detach): Likewise.
8329 * target.c (dispose_inferior): Adjust.
8330 (target_detach): Remove args parameter, adjust.
8331 * aix-thread.c (aix_thread_detach): Adjust.
8332 * corefile.c (core_file_command): Adjust.
8333 * corelow.c (core_detach): Adjust.
8334 * darwin-nat.c (darwin_detach): Adjust.
8335 * gnu-nat.c (gnu_detach): Adjust.
8336 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8337 * infcmd.c (detach_command): Adjust
8338 * infrun.c (follow_fork_inferior): Adjust.
8339 (handle_vfork_child_exec_or_exit): Adjust.
8340 * linux-fork.c (linux_fork_detach): Remove args parameter.
8341 * linux-fork.h (linux_fork_detach): Likewise.
8342 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8343 * linux-thread-db.c (thread_db_detach): Likewise.
8344 * nto-procfs.c (procfs_detach): Likewise.
8345 * procfs.c (procfs_detach): Likewise.
8346 (do_detach): Remove signo parameter.
8347 * record.c (record_detach): Remove args parameter.
8348 * record.h (record_detach): Likewise.
8349 * remote-sim.c (gdbsim_detach): Likewise.
8350 * remote.c (remote_detach_1): Likewise.
8351 (remote_detach): Likewise.
8352 (extended_remote_detach): Likewise.
8353 * sol-thread.c (sol_thread_detach): Likewise.
8354 * target-delegates.c: Re-generate.
8355 * top.c (struct qt_args) <args>: Remove field.
8356 (kill_or_detach): Don't pass args.
8357 (quit_force): Don't set args.
8358 * windows-nat.c (windows_detach): Remove args parameter.
8360 2018-01-19 Yao Qi <yao.qi@linaro.org>
8362 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8363 (arm_linux_init_abi): Install it.
8365 2018-01-19 Yao Qi <yao.qi@linaro.org>
8367 * osabi.c (gdb_osabi_names): Extend the regexp for
8368 arm-linux-gnueabihf.
8370 2018-01-18 Yao Qi <yao.qi@linaro.org>
8372 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8374 (abbrev_table::add_abbrev): Update.
8375 (abbrev_table::lookup_abbrev): Update.
8377 2018-01-18 Yao Qi <yao.qi@linaro.org>
8379 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8381 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8383 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8386 2018-01-17 Tom Tromey <tom@tromey.com>
8388 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8390 2018-01-17 Tom Tromey <tom@tromey.com>
8392 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8393 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8394 (create_array_type_with_stride): Update.
8395 * dwarf2read.c (set_die_type): Update.
8397 2018-01-17 Tom Tromey <tom@tromey.com>
8399 * dwarf2read.c (delayed_method_info): Remove typedef.
8400 (dwarf2_cu::method_info): Now a std::vector.
8401 (add_to_method_list): Update.
8402 (free_delayed_list): Remove.
8403 (compute_delayed_physnames): Update.
8404 (process_full_comp_unit, process_full_type_unit): Clear the method
8405 list. Remove cleanups.
8406 (psymtab_include_file_name): Add name_holder parameter. Use
8408 (dwarf_decode_lines): Update.
8410 2018-01-17 Tom Tromey <tom@tromey.com>
8411 Simon Marchi <simon.marchi@ericsson.com>
8413 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8414 (dwarf2_per_objfile::free_cached_comp_units)
8415 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8416 (init_cutu_and_read_dies_no_follow): Update.
8417 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8418 (dwarf2_cu::~dwarf2_cu): New.
8419 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8420 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8422 2018-01-17 Tom Tromey <tom@tromey.com>
8423 Simon Marchi <simon.marchi@ericsson.com>
8425 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8426 (struct die_reader_specs) <abbrev_table>: New member.
8427 (struct abbrev_table): Add constructor.
8428 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8429 <abbrev_obstack>: Now an auto_obstack.
8430 (abbrev_table_up): New typedef.
8431 (init_cu_die_reader): Add abbrev_table parameter.
8432 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8433 Add result_dwo_abbrev_table.
8434 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8435 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8437 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8439 (skip_children): Update.
8440 (abbrev_table::alloc_abbrev): Rename from
8441 abbrev_table_alloc_abbrev.
8442 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8443 (abbrev_table::lookup_abbrev): Rename from
8444 abbrev_table_lookup_abbrev.
8445 (abbrev_table_read_table): Return abbrev_table_up.
8446 (abbrev_table_free, abbrev_table_free_cleanup)
8447 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8448 (load_partial_dies): Update.
8450 2018-01-17 Tom Tromey <tom@tromey.com>
8452 * dwarf2read.c (dwarf2_compute_name): Update comment.
8453 (read_func_scope, read_variable): Update.
8454 (new_symbol): Remove.
8455 (new_symbol_full): Rename to new_symbol.
8457 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8460 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8461 a warning instead of throwing an error, set section size to 0 and return
8463 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8465 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8467 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8469 (linux_ptrace_attach_fail_reason_string): Likewise.
8470 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8472 (linux_ptrace_attach_fail_reason_string): Likewise.
8473 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8475 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8477 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8479 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8482 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8483 checking for fs_base/gs_base fields in struct user_regs_struct.
8484 * configure: Regenerate.
8486 2018-01-17 Yao Qi <yao.qi@linaro.org>
8488 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8490 (aarch64_linux_init_abi): Install it to gdbarch hook
8493 2018-01-15 Pedro Alves <palves@redhat.com>
8495 * common/signals-state-save-restore.c
8496 (save_original_signals_state): Fix typos.
8498 2017-01-12 Tom Tromey <tom@tromey.com>
8499 Sergio Durigan Junior <sergiodj@redhat.com>
8501 * Makefile.in (install-only): Install gdb-add-index.
8503 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8505 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8507 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8509 * infrun.c (keep_going_pass_signal): Clear step-over info when
8510 insert_breakpoints fails.
8512 2018-01-11 Pedro Alves <palves@redhat.com>
8515 * infrun.c (resume): Rename to ...
8516 (resume_1): ... this.
8517 (resume): Reimplement as wrapper around resume_1.
8519 2018-01-11 Pedro Alves <palves@redhat.com>
8522 * remote.c (remote_parse_stop_reply): Default to the last-set
8523 general thread instead of to 'magic_null_ptid'.
8525 2018-01-10 Pedro Alves <palves@redhat.com>
8527 * language.h (language_get_symbol_name_matcher): Rename ...
8528 (get_symbol_name_matcher): ... this.
8529 * language.c (language_get_symbol_name_matcher): Ditto.
8530 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8533 2018-01-10 Pedro Alves <palves@redhat.com>
8537 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8538 Adjust to use language_get_symbol_name_matcher instead of
8539 language_defn::la_get_symbol_name_matcher.
8540 * language.c (language_get_symbol_name_matcher): If in Ada mode
8541 and the lookup name is a verbatim match, return Ada's matcher.
8542 * language.h (language_get_symbol_name_matcher): Adjust comment.
8543 (ada_lookup_name_info::verbatim_p):: New method.
8545 2018-01-10 Pedro Alves <palves@redhat.com>
8548 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8549 minsym's language is language_auto or language_cplus, pass down
8550 language_ada instead.
8551 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8553 2018-01-10 Pedro Alves <palves@redhat.com>
8556 * minsyms.c (linkage_name_str): New function.
8557 (iterate_over_minimal_symbols): Use it.
8559 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8561 * NEWS: Document that 'info proc' now works on FreeBSD.
8563 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8565 * configure.ac: Check for kinfo_getfile in libutil.
8566 * configure: Regenerate.
8567 * config.in: Regenerate.
8568 * fbsd-nat.c: Include "fbsd-tdep.h".
8569 (fbsd_fetch_cmdline): New.
8570 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8571 rather than calling error.
8572 (fbsd_info_proc): New.
8573 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8574 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8575 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8577 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8579 * fbsd-nat.c (struct free_deleter): Remove.
8580 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8582 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8584 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8585 NULL for an empty pathname.
8587 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8589 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8590 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8591 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8592 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8593 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8594 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8595 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8596 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8597 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8598 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8599 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8600 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8601 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8602 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8603 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8605 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8607 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8608 (gnu_xfer_auxv): New function.
8609 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8612 2018-01-08 Yao Qi <yao.qi@linaro.org>
8613 Simon Marchi <simon.marchi@ericsson.com>
8615 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8617 (COMMON_OBS): Remove selftest.o.
8618 * configure.ac: Append selftest-arch.c and common/selftest.c to
8619 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8620 * configure: Re-generated.
8621 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8623 (maintenance_info_selftests): Likewise.
8625 2018-01-08 Xavier Roirand <roirand@adacore.com>
8627 * ada-valprint.c (val_print_packed_array_elements): Use
8628 proper number of elements when printing an array indexed
8629 by an enumeration type.
8631 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8633 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8634 (dw2_get_file_names_reader): Adjust.
8635 (lookup_dwo_signatured_type): Adjust.
8636 (lookup_dwp_signatured_type): Adjust.
8637 (lookup_signatured_type): Adjust.
8638 (create_type_unit_group): Adjust.
8639 (get_type_unit_group): Adjust.
8640 (process_psymtab_comp_unit_reader): Adjust.
8641 (build_type_psymtabs_reader): Adjust.
8642 (scan_partial_symbols): Adjust.
8643 (add_partial_symbol): Adjust.
8644 (add_partial_subprogram): Adjust.
8645 (peek_die_abbrev): Adjust.
8646 (fixup_go_packaging): Adjust.
8647 (process_imported_unit_die): Adjust.
8648 (dwarf2_compute_name): Adjust.
8649 (dwarf2_physname): Adjust.
8650 (read_import_statement): Adjust.
8651 (handle_DW_AT_stmt_list): Adjust.
8652 (read_file_scope): Adjust.
8653 (read_func_scope): Adjust.
8654 (read_lexical_block_scope): Adjust.
8655 (read_call_site_scope): Adjust.
8656 (read_variable): Adjust.
8657 (dwarf2_rnglists_process): Adjust.
8658 (dwarf2_ranges_process): Adjust.
8659 (dwarf2_ranges_read): Adjust.
8660 (dwarf2_get_pc_bounds): Adjust.
8661 (dwarf2_record_block_ranges): Adjust.
8662 (dwarf2_add_field): Adjust.
8663 (dwarf2_add_member_fn): Adjust.
8664 (read_structure_type): Adjust.
8665 (process_structure_scope): Adjust.
8666 (read_enumeration_type): Adjust.
8667 (read_array_type): Adjust.
8668 (mark_common_block_symbol_computed): Adjust.
8669 (read_common_block): Adjust.
8670 (read_namespace_type): Adjust.
8671 (read_namespace): Adjust.
8672 (read_module_type): Adjust.
8673 (read_tag_pointer_type): Adjust.
8674 (read_tag_ptr_to_member_type): Adjust.
8675 (read_tag_string_type): Adjust.
8676 (read_subroutine_type): Adjust.
8677 (read_typedef): Adjust.
8678 (read_base_type): Adjust.
8679 (attr_to_dynamic_prop): Adjust.
8680 (read_subrange_type): Adjust.
8681 (read_unspecified_type): Adjust.
8682 (dwarf2_read_abbrevs): Adjust.
8683 (load_partial_dies): Adjust.
8684 (read_partial_die): Adjust.
8685 (find_partial_die): Adjust.
8686 (guess_partial_die_structure_name): Adjust.
8687 (fixup_partial_die): Adjust.
8688 (read_attribute_value): Adjust.
8689 (read_addr_index): Adjust.
8690 (read_addr_index_from_leb128): Adjust.
8691 (read_str_index): Adjust.
8692 (dwarf2_string_attr): Adjust.
8693 (get_debug_line_section): Adjust.
8694 (dwarf_decode_line_header): Adjust.
8695 (lnp_state_machine::check_line_address): Adjust.
8696 (dwarf_decode_lines_1): Adjust.
8697 (dwarf_decode_lines): Adjust.
8698 (dwarf2_start_symtab): Adjust.
8699 (var_decode_location): Adjust.
8700 (new_symbol_full): Adjust.
8701 (dwarf2_const_value_data): Adjust.
8702 (dwarf2_const_value_attr): Adjust.
8703 (dwarf2_const_value): Adjust.
8705 (die_containing_type): Adjust.
8706 (build_error_marker_type): Adjust.
8707 (lookup_die_type): Adjust.
8708 (guess_full_die_structure_name): Adjust.
8709 (anonymous_struct_prefix): Adjust.
8710 (determine_prefix): Adjust.
8711 (dwarf2_name): Adjust.
8712 (follow_die_ref_or_sig): Adjust.
8713 (follow_die_offset): Adjust.
8714 (follow_die_ref): Adjust.
8715 (follow_die_sig_1): Adjust.
8716 (follow_die_sig): Adjust.
8717 (get_signatured_type): Adjust.
8718 (get_DW_AT_signature_type): Adjust.
8719 (decode_locdesc): Adjust.
8720 (dwarf_decode_macros): Adjust.
8721 (cu_debug_loc_section): Adjust.
8722 (fill_in_loclist_baton): Adjust.
8723 (dwarf2_symbol_mark_computed): Adjust.
8724 (init_one_comp_unit): Don't assign
8725 dwarf2_cu::dwarf2_per_objfile.
8726 (set_die_type): Adjust.
8728 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8730 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8731 <dwarf2_per_objfile>: New field.
8732 (dwarf2_per_objfile): Remove global.
8733 (get_dwarf2_per_objfile): New function.
8734 (set_dwarf2_per_objfile): New function.
8735 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8737 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8738 (read_abbrev_offset): Likewise.
8739 (read_indirect_string): Likewise.
8740 (read_indirect_line_string): Likewise.
8741 (read_indirect_string_at_offset): Likewise.
8742 (read_indirect_string_from_dwz): Likewise.
8743 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8745 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8746 (create_all_comp_units): Change objfile parameter to
8748 (create_all_type_units): Likewise.
8749 (process_queue): Add dwarf2_per_objfile parameter.
8750 (read_and_check_comp_unit_head): Likewise.
8751 (lookup_dwo_unit_in_dwp): Likewise.
8752 (get_dwp_file): Likewise.
8753 (process_cu_includes): Likewise.
8754 (struct free_dwo_file_cleanup_data): New struct.
8755 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8756 set_dwarf2_per_objfile.
8757 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8758 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8759 context, adjust calls.
8760 (dw2_instantiate_symtab): Likewise.
8761 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8762 (dw2_get_cu): Likewise.
8763 (create_cu_from_index_list): Change objfile parameter to
8765 (create_cus_from_index_list): Get dwarf2_per_objfile from
8766 context, adjust calls.
8767 (create_cus_from_index): Likewise.
8768 (create_signatured_type_table_from_index): Change objfile
8769 parameter to dwarf2_per_objfile.
8770 (create_signatured_type_table_from_debug_names): Change objfile
8771 parameter to dwarf2_per_objfile.
8772 (create_addrmap_from_index): Likewise.
8773 (create_addrmap_from_aranges): Likewise.
8774 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8775 (dw2_setup): Remove.
8776 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8778 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8779 get_dwarf2_per_objfile.
8780 (dw2_forget_cached_source_info): Likewise.
8781 (dw2_map_symtabs_matching_filename): Likewise.
8782 (struct dw2_symtab_iterator) <index>: Remove.
8783 <dwarf2_per_objfile>: New field.
8784 (dw2_symtab_iter_init): Replace index parameter with
8786 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8787 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8788 (dw2_print_stats): Likewise.
8789 (dw2_dump): Likewise.
8790 (dw2_expand_symtabs_for_function): Likewise.
8791 (dw2_expand_all_symtabs): Likewise.
8792 (dw2_expand_symtabs_with_fullname): Likewise.
8793 (dw2_expand_marked_cus): Replace index and objfile parameters
8794 with dwarf2_per_objfile.
8795 (dw_expand_symtabs_matching_file_matcher): Add
8796 dwarf2_per_objfile parameter and adjust calls.
8797 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8799 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8800 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8802 (create_cus_from_debug_names_list): Replace objfile parameter
8803 with dwarf2_per_objfile and adjust calls.
8804 (create_cus_from_debug_names): Likewise.
8805 (dwarf2_read_debug_names): Likewise.
8806 (mapped_debug_names::namei_to_name): Adjust call.
8807 (dw2_debug_names_iterator::next): Likewise.
8808 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8809 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8810 (dw2_debug_names_dump): Likewise.
8811 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8812 (dw2_debug_names_expand_symtabs_matching): Likewise.
8813 (dwarf2_initialize_objfile): Likewise.
8814 (dwarf2_build_psymtabs): Likewise.
8815 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8817 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8818 (read_and_check_comp_unit_head): Likewise.
8819 (read_abbrev_offset): Likewise.
8820 (create_debug_type_hash_table): Likewise.
8821 (create_debug_types_hash_table): Likewise.
8822 (create_all_type_units): Replace objfile parameter with
8824 (add_type_unit): Add dwarf2_per_objfile parameter.
8825 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8826 with dwarf2_per_objfile.
8827 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8828 (lookup_dwp_signatured_type): Likewise.
8829 (lookup_signatured_type): Likewise.
8830 (read_cutu_die_from_dwo): Likewise.
8831 (init_tu_and_read_dwo_dies): Likewise.
8832 (init_cutu_and_read_dies): Likewise.
8833 (init_cutu_and_read_dies_no_follow): Likewise.
8834 (allocate_type_unit_groups_table): Add objfile parameter.
8835 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8836 (get_type_unit_group): Likewise.
8837 (process_psymtab_comp_unit): Update call.
8838 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8839 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8840 (print_tu_stats): Likewise.
8841 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8843 (build_type_psymtabs): Change objfile parameter to
8845 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8846 passed in void* parameter.
8847 (process_skeletonless_type_units): Change objfile parameter to
8849 (set_partial_user): Likewise.
8850 (dwarf2_build_psymtabs_hard): Likewise.
8851 (read_comp_units_from_section): Likewise.
8852 (create_all_comp_units): Likewise.
8853 (scan_partial_symbols): Update calls.
8854 (add_partial_symbol): Likewise.
8855 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8856 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8857 (process_queue): Add dwarf2_per_objfile parameter.
8858 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8859 (compute_compunit_symtab_includes): Likewise.
8860 (process_cu_includes): Add dwarf2_per_objfile parameter.
8861 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8862 (process_full_type_unit): Likewise.
8863 (process_imported_unit_die): Update call.
8864 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8865 (read_file_scope): Likewise.
8866 (allocate_dwo_file_hash_table): Add objfile parameter.
8867 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8868 (create_cus_hash_table): Likewise.
8869 (create_dwp_hash_table): Likewise.
8870 (create_dwo_unit_in_dwp_v1): Likewise.
8871 (create_dwp_v2_section): Likewise.
8872 (create_dwo_unit_in_dwp_v2): Likewise.
8873 (lookup_dwo_unit_in_dwp): Likewise.
8874 (try_open_dwop_file): Likewise.
8875 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8876 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8877 cleanup to include a reference to dwarf2_per_objfile.
8878 (open_dwp_file): Add dwarf2_per_objfile parameter.
8879 (open_and_init_dwp_file): Likewise.
8880 (get_dwp_file): Likewise.
8881 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8882 (queue_and_load_all_dwo_tus): Update call.
8883 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8885 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8886 (dwarf2_ranges_process): Likewise.
8887 (dwarf2_get_pc_bounds): Likewise.
8888 (mark_common_block_symbol_computed): Likewise.
8889 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8890 (dwarf2_read_abbrevs): Update call.
8891 (read_partial_die): Use dwarf2_per_objfile from cu.
8892 (find_partial_die): Likewise.
8893 (fixup_partial_die): Likewise.
8894 (read_attribute_value): Likewise.
8895 (read_indirect_string_at_offset_from): Add objfile parameter.
8896 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8898 (read_indirect_string_from_dwz): Add objfile parameter.
8899 (read_indirect_string): Add objfile parameter.
8900 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8901 (read_addr_index): Use dwarf2_per_objfile from cu.
8902 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8904 (read_str_index): Use dwarf2_per_objfile from cu.
8905 (get_debug_line_section): Likewise.
8906 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8907 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8908 (new_symbol_full): Use dwarf2_per_objfile from cu.
8909 (build_error_marker_type): Likewise.
8910 (lookup_die_type): Likewise.
8911 (determine_prefix): Likewise.
8912 (follow_die_offset): Likewise.
8913 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8914 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8915 (dwarf2_fetch_die_type_sect_off): Likewise.
8916 (dwarf2_get_die_type): Likewise.
8917 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8918 (get_signatured_type): Likewise.
8919 (get_DW_AT_signature_type): Likewise.
8920 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8921 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8922 (cu_debug_loc_section): Likewise.
8923 (fill_in_loclist_baton): Likewise.
8924 (dwarf2_symbol_mark_computed): Likewise.
8925 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8927 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8929 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8930 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8931 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8932 (set_die_type): Use dwarf2_free_objfile from cu.
8933 (get_die_type_at_offset): Likewise.
8934 (dwarf2_per_objfile_free): Don't assign global variable.
8935 (debug_names) <constructor>: Add dwarf2_per_objfile
8936 parameter, update m_debugstrlookup construction.
8937 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8939 <m_dwarf2_per_objfile>: New field.
8940 <lookup>: Use m_dwarf2_per_objfile.
8941 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8942 (psyms_seen_size): Likewise.
8943 (write_gdbindex): Replace objfile parameter with
8945 (write_debug_names): Likewise.
8946 (write_psymtabs_to_index): Likewise.
8947 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8950 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8952 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8953 <dwarf2_per_objfile>: New field.
8954 (struct dwarf2_per_cu_data) <objfile>: Remove.
8955 <dwarf2_per_objfile>: New field.
8956 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8958 (create_signatured_type_table_from_index): Likewise.
8959 (create_debug_type_hash_table): Likewise.
8960 (fill_in_sig_entry_from_dwo_entry): Likewise.
8961 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8962 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8964 (create_partial_symtab): Access objfile through
8966 (process_psymtab_comp_unit_reader): Likewise.
8967 (read_comp_units_from_section): Likewise.
8968 (scan_partial_symbols): Likewise.
8969 (add_partial_symbol): Likewise.
8970 (add_partial_subprogram): Likewise.
8971 (peek_die_abbrev): Likewise.
8972 (fixup_go_packaging): Likewise.
8973 (process_full_comp_unit): Likewise.
8974 (process_full_type_unit): Likewise.
8975 (process_imported_unit_die): Likewise.
8976 (dwarf2_compute_name): Likewise.
8977 (dwarf2_physname): Likewise.
8978 (read_import_statement): Likewise.
8979 (create_cus_hash_table): Assign dwarf2_physname instead of
8981 (read_func_scope): Access objfile through dwarf2_per_objfile.
8982 (read_lexical_block_scope): Likewise.
8983 (read_call_site_scope): Likewise.
8984 (read_variable): Likewise.
8985 (dwarf2_rnglists_process): Likewise.
8986 (dwarf2_ranges_process): Likewise.
8987 (dwarf2_ranges_read): Likewise.
8988 (dwarf2_record_block_ranges): Likewise.
8989 (dwarf2_add_field): Likewise.
8990 (dwarf2_add_member_fn): Likewise.
8991 (read_structure_type): Likewise.
8992 (process_structure_scope): Likewise.
8993 (read_enumeration_type): Likewise.
8994 (read_array_type): Likewise.
8995 (read_common_block): Likewise.
8996 (read_namespace_type): Likewise.
8997 (read_namespace): Likewise.
8998 (read_module_type): Likewise.
8999 (read_tag_pointer_type): Likewise.
9000 (read_tag_ptr_to_member_type): Likewise.
9001 (read_tag_string_type): Likewise.
9002 (read_subroutine_type): Likewise.
9003 (read_typedef): Likewise.
9004 (read_base_type): Likewise.
9005 (attr_to_dynamic_prop): Likewise.
9006 (read_subrange_type): Likewise.
9007 (read_unspecified_type): Likewise.
9008 (load_partial_dies): Likewise.
9009 (read_partial_die): Likewise.
9010 (find_partial_die): Likewise.
9011 (guess_partial_die_structure_name): Likewise.
9012 (fixup_partial_die): Likewise.
9013 (read_attribute_value): Likewise.
9014 (read_addr_index_from_leb128): Likewise.
9015 (dwarf2_read_addr_index): Likewise.
9016 (dwarf2_string_attr): Likewise.
9017 (lnp_state_machine::check_line_address): Likewise.
9018 (dwarf_decode_lines_1): Likewise.
9019 (dwarf_decode_lines): Likewise.
9020 (dwarf2_start_symtab): Likewise.
9021 (var_decode_location): Likewise.
9022 (new_symbol_full): Likewise.
9023 (dwarf2_const_value_data): Likewise.
9024 (dwarf2_const_value_attr): Likewise.
9025 (dwarf2_const_value): Likewise.
9026 (die_type): Likewise.
9027 (die_containing_type): Likewise.
9028 (lookup_die_type): Likewise.
9029 (guess_full_die_structure_name): Likewise.
9030 (anonymous_struct_prefix): Likewise.
9031 (dwarf2_name): Likewise.
9032 (follow_die_ref_or_sig): Likewise.
9033 (follow_die_offset): Likewise.
9034 (follow_die_ref): Likewise.
9035 (dwarf2_fetch_die_loc_sect_off): Likewise.
9036 (dwarf2_fetch_constant_bytes): Likewise.
9037 (dwarf2_fetch_die_type_sect_off): Likewise.
9038 (dwarf2_get_die_type): Likewise.
9039 (follow_die_sig): Likewise.
9040 (decode_locdesc): Likewise.
9041 (dwarf2_per_cu_objfile): Likewise.
9042 (dwarf2_per_cu_text_offset): Likewise.
9043 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9045 (set_die_type): Access objfile through
9048 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9050 * valprint.c (converted_character_d): Remove typedef.
9051 (DEF_VEC_O (converted_character_d)): Remove.
9052 (count_next_character): Use std::vector.
9053 (print_converted_chars_to_obstack): Likewise.
9054 (generic_printstr): Likewise.
9056 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9058 * xml-support.h (struct gdb_xml_value): Add constructor.
9059 <value>: Change type to unique_xmalloc_ptr.
9060 (gdb_xml_value_s): Remove typedef.
9061 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9062 (gdb_xml_element_start_handler): Change parameter type to
9064 (xml_find_attribute): Likewise.
9065 * xml-support.c (xml_find_attribute): Change parameter type to
9066 std::vector and adjust.
9067 (gdb_xml_values_cleanup): Remove.
9068 (gdb_xml_parser::start_element): Adjust to std::vector.
9069 (xinclude_start_include): Change paraeter type to std::vector
9071 * btrace.c (check_xml_btrace_version): Likewise.
9072 (parse_xml_btrace_block): Likewise.
9073 (parse_xml_btrace_pt_config_cpu): Likewise.
9074 (parse_xml_btrace_pt): Likewise.
9075 (parse_xml_btrace_conf_bts): Likewise.
9076 (parse_xml_btrace_conf_pt): Likewise.
9077 * memory-map.c (memory_map_start_memory): Likewise.
9078 (memory_map_start_property): Likewise.
9079 * osdata.c (osdata_start_osdata): Likewise.
9080 (osdata_start_item): Likewise.
9081 (osdata_start_column): Likewise.
9082 * remote.c (start_thread): Likewise.
9083 * solib-aix.c (library_list_start_library): Likewise.
9084 (library_list_start_list): Likewise.
9085 * solib-svr4.c (library_list_start_library): Likewise.
9086 (svr4_library_list_start_list): Likewise.
9087 * solib-target.c (library_list_start_segment): Likewise.
9088 (library_list_start_section): Likewise.
9089 (library_list_start_library): Likewise.
9090 (library_list_start_list): Likewise.
9091 * tracepoint.c (traceframe_info_start_memory): Likewise.
9092 (traceframe_info_start_tvar): Likewise.
9093 * xml-syscall.c (syscall_start_syscall): Likewise.
9094 * xml-tdesc.c (tdesc_start_target): Likewise.
9095 (tdesc_start_feature): Likewise.
9096 (tdesc_start_reg): Likewise.
9097 (tdesc_start_union): Likewise.
9098 (tdesc_start_struct): Likewise.
9099 (tdesc_start_flags): Likewise.
9100 (tdesc_start_enum): Likewise.
9101 (tdesc_start_field): Likewise.
9102 (tdesc_start_enum_value): Likewise.
9103 (tdesc_start_vector): Likewise.
9105 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9107 * extension.h (struct xmethod_worker) <clone>: Remove.
9108 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9110 (python_xmethod_worker::clone): Remove.
9111 * valops.c (find_overload_match): Use std::move instead of
9114 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9116 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9117 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9118 <free_xmethod_worker_data>: Remove.
9119 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9120 <get_xmethod_arg_types>: Remove.
9121 <get_xmethod_result_type>: Remove.
9122 <invoke_xmethod>: Remove.
9123 * extension.c (new_xmethod_worker): Remove.
9124 (clone_xmethod_worker): Remove.
9125 (get_matching_xmethod_workers): Return void, pass std::vector by
9127 (get_xmethod_arg_types): Rename to...
9128 (xmethod_worker::get_arg_types): ... this, and adjust.
9129 (get_xmethod_result_type): Rename to...
9130 (xmethod_worker::get_result_type): ... this, and adjust.
9131 (invoke_xmethod): Remove.
9132 (free_xmethod_worker): Remove.
9133 (free_xmethod_worker_vec): Remove.
9134 * extension.h (enum ext_lang_rc): Move here from
9136 (struct xmethod_worker): Add constructor and destructor.
9139 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9140 virtual pure methods.
9141 <get_arg_types, get_result_type>: New methods.
9142 (xmethod_worker_ptr): Remove typedef.
9143 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9144 (xmethod_worker_vec): Remove typedef.
9145 (xmethod_worker_up): New typedef.
9146 (invoke_xmethod): Remove.
9147 (clone_xmethod_worker): Remove.
9148 (free_xmethod_worker): Remove.
9149 (free_xmethod_worker_vec): Remove.
9150 (get_xmethod_arg_types): Remove.
9151 (get_xmethod_result_type): Remove.
9152 * valops.c (find_method_list): Use std::vector, don't use
9153 intermediate vector.
9154 (value_find_oload_method_list): Use std::vector.
9155 (find_overload_match): Use std::vector.
9156 (find_oload_champ): Use std::vector.
9157 * value.c (value_free): Use operator delete.
9158 (value_of_xmethod): Rename to...
9159 (value_from_xmethod): ... this. Don't assign
9160 xmethod_worker::value, take rvalue-reference.
9161 (result_type_of_xmethod): Adjust.
9162 (call_xmethod): Adjust.
9163 * value.h: Include extension.h.
9164 (struct xmethod_worker): Don't forward-declare.
9165 (value_of_xmethod): Rename to...
9166 (value_from_xmethod): ... this, take rvalue-reference.
9167 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9168 (struct python_xmethod_worker): ... this, add constructor and
9170 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9171 (gdbpy_free_xmethod_worker_data): Rename to...
9172 (python_xmethod_worker::~python_xmethod_worker): ... this and
9174 (gdbpy_clone_xmethod_worker_data): Rename to...
9175 (python_xmethod_worker::clone): ... this and adjust.
9176 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9178 (gdbpy_get_xmethod_arg_types): Rename to...
9179 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9180 (gdbpy_get_xmethod_result_type): Rename to...
9181 (python_xmethod_worker::do_get_result_type): ... this and
9183 (gdbpy_invoke_xmethod): Rename to...
9184 (python_xmethod_worker::invoke): ... this and adjust.
9185 (new_python_xmethod_worker): Rename to...
9186 (python_xmethod_worker::python_xmethod_worker): ... this and
9188 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9190 (gdbpy_free_xmethod_worker_data): Remove.
9191 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9192 (gdbpy_get_xmethod_arg_types): Remove.
9193 (gdbpy_get_xmethod_result_type): Remove.
9194 (gdbpy_invoke_xmethod): Remove.
9195 * python/python.c (python_extension_ops): Remove obsolete
9198 2018-01-05 Pedro Alves <palves@redhat.com>
9201 * common/signals-state-save-restore.c
9202 (save_original_signals_state): New parameter 'quiet'. Warn if we
9203 find a custom handler preinstalled, instead of internal erroring.
9204 But only warn if !quiet.
9205 * common/signals-state-save-restore.h
9206 (save_original_signals_state): New parameter 'quiet'.
9207 * main.c (captured_main_1): Move save_original_signals_state call
9208 after option handling, and pass QUIET.
9210 2018-01-05 Pedro Alves <palves@redhat.com>
9212 * spu-tdep.c (spu_catch_start): Pass
9213 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9215 2018-01-05 Pedro Alves <palves@redhat.com>
9218 * ada-lang.c (literal_symbol_name_matcher): New function.
9219 (ada_get_symbol_name_matcher): Use it for
9220 symbol_name_match_type::SEARCH_NAME.
9221 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9222 it down instead of assuming symbol_name_match_type::FULL.
9223 * block.h (block_lookup_symbol): New parameter 'match_type'.
9224 * c-valprint.c (print_unpacked_pointer): Use
9225 lookup_symbol_search_name instead of lookup_symbol.
9226 * compile/compile-object-load.c (get_out_value_type): Pass down
9227 symbol_name_match_type::SEARCH_NAME.
9228 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9229 symbol_name_match_type::FULL.
9230 * cp-support.c (cp_get_symbol_name_matcher): Handle
9231 symbol_name_match_type::SEARCH_NAME.
9232 * infrun.c (insert_exception_resume_breakpoint): Use
9233 lookup_symbol_search_name.
9234 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9235 * psymtab.c (maintenance_check_psymtabs): Use
9236 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9237 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9239 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9240 if symbol_name_match_type::SEARCH_NAME.
9241 (lookup_symbol_in_language): Pass down
9242 symbol_name_match_type::FULL.
9243 (lookup_symbol_search_name): New.
9244 (lookup_language_this): Pass down
9245 symbol_name_match_type::SEARCH_NAME.
9246 (lookup_symbol_aux, lookup_local_symbol): New parameter
9247 'match_type'. Pass it down.
9248 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9249 (lookup_symbol_search_name): New declaration.
9250 (lookup_symbol_in_block): New 'match_type' parameter.
9252 2018-01-05 Pedro Alves <palves@redhat.com>
9255 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9257 (ada_lookup_symbol): Reimplement in terms of
9258 ada_lookup_symbol_list, bits factored out from
9259 ada_lookup_encoded_symbol.
9261 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9263 * ada-exp.y (write_object_renaming): When subscripting an array
9264 using a symbol as the index, pass the block in call to
9265 ada_lookup_encoded_symbol when looking that symbol up.
9267 2018-01-05 Jerome Guitton <guitton@adacore.com>
9269 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9272 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9274 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9275 the case where VALUE_LVAL (val0) is not lval_memory.
9277 2018-01-05 Xavier Roirand <roirand@adacore.com>
9279 * ada-valprint.c (print_optional_low_bound): Handle
9280 character-indexed array printing like boolean-indexed array
9283 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9285 * NEWS: Create a new section for the next release branch.
9286 Rename the section of the current branch, now that it has
9289 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9291 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9292 * version.in: Bump version to 8.1.50.DATE-git.
9294 2018-01-03 Xavier Roirand <roirand@adacore.com>
9296 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9298 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9300 (default_exception_support_info) <catch_handlers_sym>: Add field.
9301 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9302 (ada_exception_name_addr_1): Add "catch handlers" handling.
9303 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9305 (create_excep_cond_exprs) <ex>: Add parameter.
9306 (re_set_exception): Update create_excep_cond_exprs call.
9307 (print_it_exception, print_one_exception, print_mention_exception)
9308 (print_recreate_exception): Add "catch handler" handling.
9309 (allocate_location_catch_handlers, re_set_catch_handlers)
9310 (check_status_catch_handlers, print_it_catch_handlers)
9311 (print_one_catch_handlers, print_mention_catch_handlers)
9312 (print_recreate_catch_handlers): New function.
9313 (catch_handlers_breakpoint_ops): New variable.
9314 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9315 Add parameter. Add "catch handler" handling.
9316 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9317 Add "catch handler" handling.
9318 (ada_exception_catchpoint_cond_string): Add "catch handler"
9320 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9322 (catch_ada_handlers_command): New function.
9323 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9324 operations structure.
9325 (_initialize_ada_language): Add "catch handlers" command entry.
9326 * NEWS: Document "catch handlers" feature.
9328 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9330 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9331 account when creating the array type of the slice.
9332 (ada_value_slice): Likewise.
9334 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9336 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9338 (create_array_type_with_stride): Add byte_stride_prop parameter.
9339 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9340 New parameter. Update all callers in this file.
9341 (array_type_has_dynamic_stride): New function.
9342 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9343 of arrays with dynamic byte strides.
9344 * dwarf2read.c (read_array_type): Add support for dynamic
9345 DW_AT_byte_stride attributes.
9347 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9349 * dwarf2read.c (read_unspecified_type): Treat
9350 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9352 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9354 Update copyright year range in all GDB files.
9356 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9358 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9359 and gdb/testsuite/gdb.base/step-line.c.
9361 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9363 * copyright.py (main): Dump the contents of
9364 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9365 even if BY_HAND is empty.
9367 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9369 * top.c (print_gdb_version): Update Copyright year in version
9372 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9374 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9376 For older changes see ChangeLog-2017.
9382 version-control: never