linux-nat.c: clean up pending status checking and resuming LWPs
[binutils-gdb.git] / gdb / ChangeLog
1 2015-01-09 Pedro Alves <palves@redhat.com>
2
3 * linux-nat.c (linux_resume_one_lwp): New function.
4 (resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
5 (linux_nat_resume): Use lwp_status_pending_p and
6 linux_resume_one_lwp.
7 (linux_handle_syscall_trap): Use linux_resume_one_lwp.
8 (linux_handle_extended_wait): Use linux_resume_one_lwp.
9 (status_callback, running_callback): Use lwp_status_pending_p.
10 (lwp_status_pending_p): New function.
11 (stop_and_resume_callback): Use lwp_status_pending_p.
12 (linux_nat_filter_event): Use linux_resume_one_lwp.
13 (linux_nat_wait_1): Always use status_callback to look for an LWP
14 with a pending status. Use linux_resume_one_lwp.
15 (resume_stopped_resumed_lwps): Use lwp_status_pending_p and
16 linux_resume_one_lwp.
17
18 2015-01-09 Pedro Alves <palves@redhat.com>
19
20 * breakpoint.c (bp_location_inserted_here_p): New function,
21 factored out from ...
22 (breakpoint_inserted_here_p): ... here. Use
23 ALL_BP_LOCATIONS_AT_ADDR.
24 (software_breakpoint_inserted_here_p): Use
25 bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
26
27 2014-01-09 Pedro Alves <palves@redhat.com>
28
29 Skip enabling event reporting if the kernel supports
30 PTRACE_EVENT_CLONE.
31 * linux-thread-db.c: Include "nat/linux-ptrace.h".
32 (thread_db_use_events): New function.
33 (try_thread_db_load_1): Check thread_db_use_events before enabling
34 event reporting.
35 (update_thread_state): New function.
36 (attach_thread): Use it. Check thread_db_use_events before
37 enabling event reporting.
38 (thread_db_detach): Check thread_db_use_events before disabling
39 event reporting.
40 (find_new_threads_callback): Check thread_db_use_events before
41 enabling event reporting. Update the thread's state if not using
42 libthread_db events.
43
44 2015-01-09 Pedro Alves <palves@redhat.com>
45
46 * linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
47 about to wait for is > 0.
48 * linux-thread-db.c (find_new_threads_callback): Ignore thread if
49 the kernel thread ID is -1.
50
51 2015-01-09 Pedro Alves <palves@redhat.com>
52
53 * linux-nat.c (attach_proc_task_lwp_callback): New function.
54 (linux_nat_attach): Use linux_proc_attach_tgid_threads.
55 (wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
56 ptrace option flags.
57 * linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
58 field.
59 * nat/linux-procfs.c: Include <dirent.h>.
60 (linux_proc_get_int): New parameter "warn". Handle it.
61 (linux_proc_get_tgid): Adjust.
62 (linux_proc_get_tracerpid): Rename to ...
63 (linux_proc_get_tracerpid_nowarn): ... this.
64 (linux_proc_pid_get_state): New function, factored out from
65 (linux_proc_pid_has_state): ... this. Add new parameter "warn"
66 and handle it.
67 (linux_proc_pid_is_gone): New function.
68 (linux_proc_pid_is_stopped): Adjust.
69 (linux_proc_pid_is_zombie_maybe_warn)
70 (linux_proc_pid_is_zombie_nowarn): New functions.
71 (linux_proc_pid_is_zombie): Use
72 linux_proc_pid_is_zombie_maybe_warn.
73 (linux_proc_attach_tgid_threads): New function.
74 * nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
75 (linux_proc_get_tracerpid): Rename to ...
76 (linux_proc_get_tracerpid_nowarn): ... this, and update comment.
77 (linux_proc_pid_is_gone): New declaration.
78 (linux_proc_pid_is_zombie): Update comment.
79 (linux_proc_pid_is_zombie_nowarn): New declaration.
80 (linux_proc_attach_lwp_func): New typedef.
81 (linux_proc_attach_tgid_threads): New declaration.
82 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
83 use nowarn functions.
84 (linux_ptrace_attach_fail_reason_string): Move here from
85 gdbserver/linux-low.c and rename.
86 (ptrace_supports_feature): If the current ptrace options are not
87 known yet, check them now, instead of asserting.
88 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
89 Declare.
90
91 2015-01-09 Pedro Alves <palves@redhat.com>
92
93 * linux-thread-db.c (thread_db_find_new_threads_silently)
94 (try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
95 (find_new_threads_once): Print debug output on gdb_stdlog.
96
97 2015-01-09 Chen Gang <gang.chen.5i5j@gmail.com>
98 Pedro Alves <palves@redhat.com>
99
100 * compile/compile.c: Include "gdb_wait.h".
101 (do_rmdir): Check return value, and free 'zap'.
102
103 2015-01-08 Pedro Alves <palves@redhat.com>
104 Yao Qi <yao@codesourcery.com>
105
106 * dwarf2loc.c (indirect_pieced_value): Don't call
107 gdb_sign_extend. Call extract_signed_integer instead.
108 * utils.c (gdb_sign_extend): Remove.
109 * utils.h (gdb_sign_extend): Remove declaration.
110
111 2015-01-07 Pierre Muller <muller@sourceware.org>
112
113 PR symtab/17811
114 * stabsread.c (define_symbol): Set language for C++ special symbols.
115
116 2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
117
118 * inflow.c (initial_gdb_ttystate): Tweak comment.
119
120 2015-01-07 Joel Brobecker <brobecker@adacore.com>
121
122 * inflow.c (set_initial_gdb_ttystate): Add empty line after
123 comment documenting function.
124
125 2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
126
127 * terminal.h (set_initial_gdb_ttystate): Declare.
128 * inflow.c (initial_gdb_ttystate): New static variable.
129 (set_initial_gdb_ttystate): New setter.
130 (child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
131 instead of our current terminal state.
132 * top.c (gdb_init): Call set_initial_gdb_ttystate.
133
134 2015-01-07 Joel Brobecker <brobecker@adacore.com>
135
136 * guile/scm-type.c (tyscm_array_1): Add comment.
137 * python/py-type.c (typy_array_1): Add comment.
138
139 2015-01-06 Joel Brobecker <brobecker@adacore.com>
140
141 * guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
142 error if N2 is equal to N1 - 1.
143
144 2015-01-06 Joel Brobecker <brobecker@adacore.com>
145
146 * python/py-type.c (typy_array_1): Do not raise negative-length
147 exception if N2 is equal to N1 - 1.
148
149 2015-01-03 Doug Evans <xdje42@gmail.com>
150
151 * c-exp.y: Whitespace cleanup.
152 (classify_inner_name): Remove extra ;.
153
154 2015-01-02 Maciej W. Rozycki <macro@codesourcery.com>
155
156 * mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
157 offset signed.
158
159 2015-01-02 Doug Evans <dje@google.com>
160
161 * dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
162
163 2015-01-02 Doug Evans <dje@google.com>
164
165 * symtab.h (struct symbol): Fix typo in comment.
166
167 2015-01-01 Joel Brobecker <brobecker@adacore.com>
168
169 Update year range in copyright notice of all files.
170
171 2015-01-01 Joel Brobecker <brobecker@adacore.com>
172
173 * top.c (print_gdb_version): Update copyright year to 2015.
174
175 2015-01-01 Joel Brobecker <brobecker@adacore.com>
176
177 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
178
179 For older changes see ChangeLog-2014.
180 \f
181 Local Variables:
182 mode: change-log
183 left-margin: 8
184 fill-column: 74
185 version-control: never
186 coding: utf-8
187 End: