mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-07 13:39:43 +08:00
A subsequent patch will make the Linux backend's target_wait method pull all events out of the kernel (with waitpid) and store them as pending status in the LWP structure if no pending status was already available. Then, the backend goes over the pending statuses and pick one to report to the core. With that, the existing thread-execl.exp test exposes a bug, like: (gdb) set scheduler-locking on (gdb) PASS: gdb.threads/thread-execl.exp: schedlock on: set scheduler-locking on next FAIL: gdb.threads/thread-execl.exp: schedlock on: get to main in new image (timeout) Recall that when the non-leader thread execs, all threads in the process die, the execing thread changes its pid to the tgid, and then waitpid returns an exec event to the tgid. If GDB didn't resume the leader LWP, then GDB sees an event for an LWP that was supposedly stopped, and thus not marked as resumed. Because the code that picks a pending event to report to the core ignores not-resumed LWPs: /* Return non-zero if LP has a wait status pending. */ static int status_callback (struct lwp_info *lp, void *data) { /* Only report a pending wait status if we pretend that this has indeed been resumed. */ if (!lp->resumed) return 0; the event ends up pending forever, thus the timeout. gdb/ 2015-01-09 Pedro Alves <palves@redhat.com> * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>: Set the LWP's 'resumed' flag.
193 lines
6.6 KiB
Plaintext
193 lines
6.6 KiB
Plaintext
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
|
||
Set the LWP's 'resumed' flag.
|
||
|
||
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* linux-nat.c (linux_resume_one_lwp): New function.
|
||
(resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
|
||
(linux_nat_resume): Use lwp_status_pending_p and
|
||
linux_resume_one_lwp.
|
||
(linux_handle_syscall_trap): Use linux_resume_one_lwp.
|
||
(linux_handle_extended_wait): Use linux_resume_one_lwp.
|
||
(status_callback, running_callback): Use lwp_status_pending_p.
|
||
(lwp_status_pending_p): New function.
|
||
(stop_and_resume_callback): Use lwp_status_pending_p.
|
||
(linux_nat_filter_event): Use linux_resume_one_lwp.
|
||
(linux_nat_wait_1): Always use status_callback to look for an LWP
|
||
with a pending status. Use linux_resume_one_lwp.
|
||
(resume_stopped_resumed_lwps): Use lwp_status_pending_p and
|
||
linux_resume_one_lwp.
|
||
|
||
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* breakpoint.c (bp_location_inserted_here_p): New function,
|
||
factored out from ...
|
||
(breakpoint_inserted_here_p): ... here. Use
|
||
ALL_BP_LOCATIONS_AT_ADDR.
|
||
(software_breakpoint_inserted_here_p): Use
|
||
bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
|
||
|
||
2014-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
Skip enabling event reporting if the kernel supports
|
||
PTRACE_EVENT_CLONE.
|
||
* linux-thread-db.c: Include "nat/linux-ptrace.h".
|
||
(thread_db_use_events): New function.
|
||
(try_thread_db_load_1): Check thread_db_use_events before enabling
|
||
event reporting.
|
||
(update_thread_state): New function.
|
||
(attach_thread): Use it. Check thread_db_use_events before
|
||
enabling event reporting.
|
||
(thread_db_detach): Check thread_db_use_events before disabling
|
||
event reporting.
|
||
(find_new_threads_callback): Check thread_db_use_events before
|
||
enabling event reporting. Update the thread's state if not using
|
||
libthread_db events.
|
||
|
||
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
|
||
about to wait for is > 0.
|
||
* linux-thread-db.c (find_new_threads_callback): Ignore thread if
|
||
the kernel thread ID is -1.
|
||
|
||
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* linux-nat.c (attach_proc_task_lwp_callback): New function.
|
||
(linux_nat_attach): Use linux_proc_attach_tgid_threads.
|
||
(wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
|
||
ptrace option flags.
|
||
* linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
|
||
field.
|
||
* nat/linux-procfs.c: Include <dirent.h>.
|
||
(linux_proc_get_int): New parameter "warn". Handle it.
|
||
(linux_proc_get_tgid): Adjust.
|
||
(linux_proc_get_tracerpid): Rename to ...
|
||
(linux_proc_get_tracerpid_nowarn): ... this.
|
||
(linux_proc_pid_get_state): New function, factored out from
|
||
(linux_proc_pid_has_state): ... this. Add new parameter "warn"
|
||
and handle it.
|
||
(linux_proc_pid_is_gone): New function.
|
||
(linux_proc_pid_is_stopped): Adjust.
|
||
(linux_proc_pid_is_zombie_maybe_warn)
|
||
(linux_proc_pid_is_zombie_nowarn): New functions.
|
||
(linux_proc_pid_is_zombie): Use
|
||
linux_proc_pid_is_zombie_maybe_warn.
|
||
(linux_proc_attach_tgid_threads): New function.
|
||
* nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
|
||
(linux_proc_get_tracerpid): Rename to ...
|
||
(linux_proc_get_tracerpid_nowarn): ... this, and update comment.
|
||
(linux_proc_pid_is_gone): New declaration.
|
||
(linux_proc_pid_is_zombie): Update comment.
|
||
(linux_proc_pid_is_zombie_nowarn): New declaration.
|
||
(linux_proc_attach_lwp_func): New typedef.
|
||
(linux_proc_attach_tgid_threads): New declaration.
|
||
* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
|
||
use nowarn functions.
|
||
(linux_ptrace_attach_fail_reason_string): Move here from
|
||
gdbserver/linux-low.c and rename.
|
||
(ptrace_supports_feature): If the current ptrace options are not
|
||
known yet, check them now, instead of asserting.
|
||
* nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
|
||
Declare.
|
||
|
||
2015-01-09 Pedro Alves <palves@redhat.com>
|
||
|
||
* linux-thread-db.c (thread_db_find_new_threads_silently)
|
||
(try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
|
||
(find_new_threads_once): Print debug output on gdb_stdlog.
|
||
|
||
2015-01-09 Chen Gang <gang.chen.5i5j@gmail.com>
|
||
Pedro Alves <palves@redhat.com>
|
||
|
||
* compile/compile.c: Include "gdb_wait.h".
|
||
(do_rmdir): Check return value, and free 'zap'.
|
||
|
||
2015-01-08 Pedro Alves <palves@redhat.com>
|
||
Yao Qi <yao@codesourcery.com>
|
||
|
||
* dwarf2loc.c (indirect_pieced_value): Don't call
|
||
gdb_sign_extend. Call extract_signed_integer instead.
|
||
* utils.c (gdb_sign_extend): Remove.
|
||
* utils.h (gdb_sign_extend): Remove declaration.
|
||
|
||
2015-01-07 Pierre Muller <muller@sourceware.org>
|
||
|
||
PR symtab/17811
|
||
* stabsread.c (define_symbol): Set language for C++ special symbols.
|
||
|
||
2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
|
||
|
||
* inflow.c (initial_gdb_ttystate): Tweak comment.
|
||
|
||
2015-01-07 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* inflow.c (set_initial_gdb_ttystate): Add empty line after
|
||
comment documenting function.
|
||
|
||
2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
|
||
|
||
* terminal.h (set_initial_gdb_ttystate): Declare.
|
||
* inflow.c (initial_gdb_ttystate): New static variable.
|
||
(set_initial_gdb_ttystate): New setter.
|
||
(child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
|
||
instead of our current terminal state.
|
||
* top.c (gdb_init): Call set_initial_gdb_ttystate.
|
||
|
||
2015-01-07 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* guile/scm-type.c (tyscm_array_1): Add comment.
|
||
* python/py-type.c (typy_array_1): Add comment.
|
||
|
||
2015-01-06 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
|
||
error if N2 is equal to N1 - 1.
|
||
|
||
2015-01-06 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* python/py-type.c (typy_array_1): Do not raise negative-length
|
||
exception if N2 is equal to N1 - 1.
|
||
|
||
2015-01-03 Doug Evans <xdje42@gmail.com>
|
||
|
||
* c-exp.y: Whitespace cleanup.
|
||
(classify_inner_name): Remove extra ;.
|
||
|
||
2015-01-02 Maciej W. Rozycki <macro@codesourcery.com>
|
||
|
||
* mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
|
||
offset signed.
|
||
|
||
2015-01-02 Doug Evans <dje@google.com>
|
||
|
||
* dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
|
||
|
||
2015-01-02 Doug Evans <dje@google.com>
|
||
|
||
* symtab.h (struct symbol): Fix typo in comment.
|
||
|
||
2015-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
2015-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* top.c (print_gdb_version): Update copyright year to 2015.
|
||
|
||
2015-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
|
||
|
||
For older changes see ChangeLog-2014.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
coding: utf-8
|
||
End:
|