gdb/
* continuations.h (continuation_ftype): Add `err' parameter.
Document parameters.
(do_all_continuations, do_all_continuations_thread)
(do_all_intermediate_continuations)
(do_all_intermediate_continuations_thread)
(do_all_inferior_continuations): Add `err' parameter.
* continuations.c (do_my_continuations_1, do_my_continuations)
(do_all_inferior_continuations, do_all_continuations_ptid)
(do_all_continuations_thread_callback)
(do_all_continuations_thread, do_all_continuations)
(do_all_intermediate_continuations_thread_callback)
(do_all_intermediate_continuations_thread)
(do_all_intermediate_continuations): Add `err' parameter, and pass
it down all the way to the continuations proper.
* inf-loop.c (inferior_event_handler): If fetching an inferior
event throws an error, don't pop the target, and still call the
continuations, but with `err' set. Adjust all other continuation
calls.
* breakpoint.c (until_break_command_continuation): Add `err'
parameter.
* infcmd.c (step_1_continuation): Add `err' parameter. Don't
issue another step if `err' is set.
(struct until_next_continuation_args): New.
(until_next_continuation): Add `err' parameter. Adjust.
(until_next_command): Adjust.
(struct finish_command_continuation_args): Add `thread' field.
(finish_command_continuation): Add `err' parameter. Handle it.
(finish_forward): Adjust.
(attach_command_continuation): Add `err' parameter. Handle it.
* infrun.c (infrun_thread_stop_requested_callback): Adjust to
cancel the continuations.
* interps.c (interp_set): Adjust to cancel the continuations.
* thread.c (clear_thread_inferior_resources): Adjust to cancel the
continuations rather than discarding.
(free_thread): Don't clear thread inferior resources here.
(delete_thread_1): Do it here instead. And do it before removing
the thread from the threads list. Tag the thread as exited before
clearing thread inferior resources.
The current --sysroot parsing attempts to keep from leaking memory by
treating the empty string specially (sine this is the initial value),
but it ends up leaking memory when the arg is an empty string. So if
someone uses --sysroot "", the old value is leaked, as is the new one.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Fix PR 10970, PR 12702.
* linux-nat.c (linux_lwp_is_zombie): New function.
(wait_lwp): Initialize status. New variable prev_mask. Block signals.
Check for linux_lwp_is_zombie. Use WNOHANG and sigsuspend.
gdb/testsuite/
* gdb.threads/leader-exit.c: New file.
* gdb.threads/leader-exit.exp: New file.
* archive.c (_bfd_get_elt_at_filepos): Set correct error value if
unable to read a file pointed to by an entry in a thin archive.
(adjust_relative_path): Use lrealpath to canonicalize paths.
Handle the case where the reference path is above the current
path in the directory tree.
* incremental.cc (Incremental_inputs::report_input_section): Fix
comment, indentation.
(Incremental_inputs::report_comdat_group): New function.
(Output_section_incremental_inputs::set_final_data_size): Adjust size
of data for incremental input file entry.
(Output_section_incremental_inputs::write_info_blocks): Write COMDAT
group count, COMDAT group signatures.
(Sized_incr_relobj::do_layout): Record kept COMDAT group info from
an unchanged input file.
* incremental.h (Incremental_object_entry::Incremental_object_entry):
Initialize new data member.
(Incremental_object_entry::add_comdat_group): New function.
(Incremental_object_entry::get_comdat_group_count): New function.
(Incremental_object_entry::get_comdat_signature_key): New function.
(Incremental_object_entry::groups_): New data member.
(Incremental_inputs::report_comdat_group): New function.
(Incremental_input_entry_reader::get_symbol_offset): Adjust size of
data for incremental input file entry.
(Incremental_input_entry_reader::get_comdat_group_count): New function.
(Incremental_input_entry_reader::get_input_section): Adjust size of
data for incremental input file entry.
(Incremental_input_entry_reader::get_global_symbol_reader): Likewise.
(Incremental_input_entry_reader::get_comdat_group_signature): New
function.
* object.cc (Sized_relobj::include_section_group): Report kept
COMDAT groups for incremental links.
A semi-recent change which regenerated nltvals.def somehow missed all of
the Blackfin syscalls. So regenerate against the latest tree to get them
back.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdb/
* record.c: Include event-loop.h, inf-loop.h.
(record_beneath_to_async): New global.
(tmp_to_async): New global.
(record_async_inferior_event_token): New global.
(record_open_1): Don't error out if async is enabled.
(record_open): Handle to_async. Create an async event source in
the event loop.
(record_close): Delete the async event source.
(record_resumed): New global.
(record_execution_dir): New global.
(record_resume, record_core_resume): Set them. Register the
target on the event loop.
(record_wait): Rename to ...
(record_wait_1): ... this. Add more debug output. Handle
TARGET_WNOHANG, and the target beneath returning
TARGET_WAITKIND_IGNORE.
(record_wait): Reimplement on top of record_wait_1.
(record_async_mask_value): New global.
(record_async, record_async_mask, record_can_async_p)
(record_is_async_p, record_execution_direction): New functions.
(init_record_ops, init_record_core_ops): Install new methods.
* infrun.c (fetch_inferior_event): Temporarily switch the global
execution direction to the direction the target was going.
(execution_direction): Change type to int.
* target.c (default_execution_direction): New function.
(update_current_target): Inherit and de_fault
to_execution_direction.
* target.h (struct target_ops) <to_execution_direction>: New
field.
(target_execution_direction): New macro.
* inferior.h (execution_direction): Change type to int.
gdb/
* infcmd.c (finish_backward): Set a step-resume breakpoint at the
function's entry point instead of a manually managed momentary
breakpoint, and only ever issue one proceed call.
* infrun.c (handle_inferior_event) <BPSTAT_WHAT_STEP_RESUME>: If
doing a reverse-finish, switch to stepi mode, to do another step.
(insert_step_resume_breakpoint_at_sal): Make public.
(normal_stop): No need to save function value return registers if
going reverse.
* inferior.h (insert_step_resume_breakpoint_at_sal): Declare.
gdb/testsuite/
* gdb.reverse/finish-reverse-bkpt.exp: New test.
for ALPHA_ZERO_REGNUM.
(alpha_supply_int_regs): Explicitly supply zero as the value for
ALPHA_ZERO_REGNUM in the register cache.
* alpha-nat.c (fetch_osf_core_registers): Ditto.
Now that the common code supports the syscall trace level, change the
Blackfin code from using the event level to the syscall level.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
It's useful to be able to trace just the system calls the simulated
program is calling, so add a new --trace-syscall option for ports to
leverage if they choose.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>