Call CloseHandle from ~windows_thread_info
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-08 Tom Tromey <tromey@adacore.com>
2
3 * win32-low.c (delete_thread_info): Don't call CloseHandle.
4
5 2020-04-08 Tom Tromey <tromey@adacore.com>
6
7 * win32-low.c (win32_require_context, suspend_one_thread): Use
8 windows_thread_info::suspend.
9 (continue_one_thread): Use windows_thread_info::resume.
10 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
11
12 2020-04-08 Tom Tromey <tromey@adacore.com>
13
14 * win32-i386-low.c (update_debug_registers)
15 (i386_prepare_to_resume, i386_thread_added): Update.
16
17 2020-04-08 Tom Tromey <tromey@adacore.com>
18
19 * win32-low.c (child_add_thread): Use new.
20 (delete_thread_info): Use delete.
21
22 2020-04-08 Tom Tromey <tromey@adacore.com>
23
24 * win32-low.h (struct windows_thread_info): Remove.
25
26 2020-04-08 Tom Tromey <tromey@adacore.com>
27
28 * win32-low.h (struct windows_thread_info): Rename from
29 win32_thread_info. Remove typedef.
30 (struct win32_target_ops, win32_require_context): Update.
31 * win32-low.c (win32_get_thread_context)
32 (win32_set_thread_context, win32_prepare_to_resume)
33 (win32_require_context, thread_rec, child_add_thread)
34 (delete_thread_info, continue_one_thread)
35 (child_fetch_inferior_registers, child_store_inferior_registers)
36 (win32_resume, suspend_one_thread, win32_get_tib_address):
37 Update.
38 * win32-i386-low.c (update_debug_registers)
39 (win32_get_current_dr, i386_get_thread_context)
40 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
41 (i386_fetch_inferior_register, i386_store_inferior_register):
42 Update.
43 * win32-arm-low.c (arm_get_thread_context)
44 (arm_fetch_inferior_register, arm_store_inferior_register):
45 Update.
46
47 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
48
49 * linux-low.h (struct linux_target_ops): Remove.
50 (the_low_target): Remove.
51 * linux-x86-low.cc (the_low_target): Remove.
52 * linux-aarch64-low.cc (the_low_target): Ditto.
53 * linux-arm-low.cc (the_low_target): Ditto.
54 * linux-bfin-low.cc (the_low_target): Ditto.
55 * linux-cris-low.cc (the_low_target): Ditto.
56 * linux-crisv32-low.cc (the_low_target): Ditto.
57 * linux-ia64-low.cc (the_low_target): Ditto.
58 * linux-m32r-low.cc (the_low_target): Ditto.
59 * linux-m68k-low.cc (the_low_target): Ditto.
60 * linux-mips-low.cc (the_low_target): Ditto.
61 * linux-nios2-low.cc (the_low_target): Ditto.
62 * linux-ppc-low.cc (the_low_target): Ditto.
63 * linux-riscv-low.cc (the_low_target): Ditto.
64 * linux-s390-low.cc (the_low_target): Ditto.
65 * linux-sh-low.cc (the_low_target): Ditto.
66 * linux-sparc-low.cc (the_low_target): Ditto.
67 * linux-tic6x-low.cc (the_low_target): Ditto.
68 * linux-tile-low.cc (the_low_target): Ditto.
69 * linux-xtensa-low.cc (the_low_target): Ditto.
70
71 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
72
73 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
74 linux target define the op by overriding the declaration in
75 process_stratum_target.
76
77 * linux-low.h (struct linux_target_ops): Remove the op.
78 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
79 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
80 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
81 (x86_get_ipa_tdesc_idx): Turn into...
82 (x86_target::get_ipa_tdesc_idx): ...this.
83 (the_low_target): Remove the op field.
84 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
85 (ppc_get_ipa_tdesc_idx): Turn into...
86 (ppc_target::get_ipa_tdesc_idx): ...this.
87 (the_low_target): Remove the op field.
88 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
89 (s390_get_ipa_tdesc_idx): Turn into...
90 (s390_target::get_ipa_tdesc_idx): ...this.
91 (the_low_target): Remove the op field.
92
93 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
94
95 Turn the 'get_syscall_trapinfo' linux target op into a method
96 of process_stratum_target.
97
98 * linux-low.h (struct linux_target_ops): Remove the op.
99 (class linux_process_target) <get_syscall_trapinfo>
100 <gdb_catch_this_syscall>
101 <low_supports_catch_syscall>
102 <low_get_syscall_trapinfo>: Declare.
103 * linux-low.cc (get_syscall_trapinfo): Turn into...
104 (linux_process_target::get_syscall_trapinfo): ...this.
105 (linux_process_target::low_get_syscall_trapinfo): Define.
106 (gdb_catch_this_syscall_p): Turn into...
107 (linux_process_target::gdb_catch_this_syscall): ...this.
108 (linux_process_target::low_supports_catch_syscall): Define.
109
110 Update the callers below.
111
112 (linux_process_target::wait_1)
113 (linux_process_target::supports_catch_syscall)
114
115 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
116 <low_get_syscall_trapinfo>: Declare.
117 (x86_target::low_supports_catch_syscall): Define.
118 (x86_get_syscall_trapinfo): Turn into...
119 (x86_target::low_get_syscall_trapinfo): ...this.
120 (the_low_target): Remove the op field.
121 * linux-aarch64-low.cc (class aarch64_target)
122 <low_supports_catch_syscall>
123 <low_get_syscall_trapinfo>: Declare.
124 (aarch64_target::low_supports_catch_syscall): Define.
125 (aarch64_get_syscall_trapinfo): Turn into...
126 (aarch64_target::low_get_syscall_trapinfo): ...this.
127 (the_low_target): Remove the op field.
128 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
129 <low_get_syscall_trapinfo>: Declare.
130 (arm_target::low_supports_catch_syscall): Define.
131 (arm_get_syscall_trapinfo): Turn into...
132 (arm_target::low_get_syscall_trapinfo): ...this.
133 (the_low_target): Remove the op field.
134 * linux-ppc-low.cc (the_low_target): Remove the op field.
135 * linux-s390-low.cc (the_low_target): Remove the op field.
136
137 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
138
139 Remove the 'supports_hardware_single_step' linux target op and
140 override the process_stratum_target's op definition in
141 linux_process_target to return true.
142
143 * linux-low.h (struct linux_target_ops): Remove the op.
144 (class linux_process_target) <finish_step_over>
145 <maybe_hw_step>: Declare.
146 * linux-low.cc (can_hardware_single_step): Remove.
147 (maybe_hw_step): Turn into...
148 (linux_process_target::maybe_hw_step): ...this.
149 (finish_step_over): Turn into...
150 (linux_process_target::finish_step_over): ...this.
151 (linux_process_target::supports_hardware_single_step): Update
152 to return true.
153
154 Update the callers below.
155
156 (linux_process_target::single_step)
157 (linux_process_target::resume_one_lwp_throw)
158
159 * linux-arm-low.cc (class arm_target)
160 <supports_hardware_single_step>: Declare.
161 (arm_supports_hardware_single_step): Turn into...
162 (arm_target::supports_hardware_single_step): ...this.
163 (the_low_target): Remove the op field.
164 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
165 (the_low_target): Remove the op field.
166 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
167 Remove.
168 (the_low_target): Remove the op field.
169 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
170 (the_low_target): Remove the op field.
171 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
172 (the_low_target): Remove the op field.
173 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
174 (the_low_target): Remove the op field.
175 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
176 (the_low_target): Remove the op field.
177 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
178 (the_low_target): Remove the op field.
179 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
180 (the_low_target): Remove the op field.
181 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
182 (the_low_target): Remove the op field.
183 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
184 (the_low_target): Remove the op field.
185 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
186 (the_low_target): Remove the op field.
187 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
188 Remove.
189 (the_low_target): Remove the op field.
190
191 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
192
193 Turn the 'supports_range_stepping' linux target op into a method
194 of linux_process_target.
195
196 * linux-low.h (struct linux_target_ops): Remove the op.
197 (class linux_process_target) <low_supports_range_stepping>: Declare.
198 * linux-low.cc (linux_process_target::low_supports_range_stepping):
199 Define.
200 (linux_process_target::supports_range_stepping): Update the call
201 site.
202 * linux-x86-low.cc (class x86_target)
203 <low_supports_range_stepping>: Declare.
204 (x86_supports_range_stepping): Turn into...
205 (x86_target::low_supports_range_stepping): ...this.
206 (the_low_target): Remove the op field.
207 * linux-aarch64-low.cc (class aarch64_target)
208 <low_supports_range_stepping>: Declare.
209 (aarch64_supports_range_stepping): Turn into...
210 (aarch64_target::low_supports_range_stepping): ...this.
211 (the_low_target): Remove the op field.
212 * linux-arm-low.cc (the_low_target): Remove the op field.
213 * linux-bfin-low.cc (the_low_target): Ditto.
214 * linux-crisv32-low.cc (the_low_target): Ditto.
215 * linux-m32r-low.cc (the_low_target): Ditto.
216 * linux-m68k-low.cc (the_low_target): Ditto.
217 * linux-ppc-low.cc (the_low_target): Ditto.
218 * linux-s390-low.cc (the_low_target): Ditto.
219 * linux-sh-low.cc (the_low_target): Ditto.
220 * linux-tic6x-low.cc (the_low_target): Ditto.
221 * linux-tile-low.cc (the_low_target): Ditto.
222 * linux-xtensa-low.cc (the_low_target): Ditto.
223
224 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
225
226 Remove the 'emit_ops' linux target ops and let the concrete
227 linux target define the op by overriding the declaration of
228 process_stratum_target.
229
230 * linux-low.h (struct linux_target_ops): Remove the op.
231 (class linux_process_target) <emit_ops>: Remove.
232 * linux-low.cc (linux_process_target::emit_ops): Remove.
233 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
234 (x86_emit_ops): Turn into...
235 (x86_target::emit_ops): ...this.
236 (the_low_target): Remove the op field.
237 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
238 (aarch64_emit_ops): Turn into...
239 (aarch64_target::emit_ops): ...this.
240 (the_low_target): Remove the op field.
241 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
242 (ppc_emit_ops): Turn into...
243 (ppc_target::emit_ops): ...this.
244 (the_low_target): Remove the op field.
245 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
246 (s390_emit_ops): Turn into...
247 (s390_target::emit_ops): ...this.
248 (the_low_target): Remove the op field.
249 * linux-arm-low.cc (the_low_target): Remove the op field.
250 * linux-bfin-low.cc (the_low_target): Ditto.
251 * linux-crisv32-low.cc (the_low_target): Ditto.
252 * linux-m32r-low.cc (the_low_target): Ditto.
253 * linux-m68k-low.cc (the_low_target): Ditto.
254 * linux-sh-low.cc (the_low_target): Ditto.
255 * linux-tic6x-low.cc (the_low_target): Ditto.
256 * linux-tile-low.cc (the_low_target): Ditto.
257 * linux-xtensa-low.cc (the_low_target): Ditto.
258
259 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
260
261 Remove the 'install_fast_tracepoint_jump_pad' and
262 'get_min_fast_tracepoint_insn_len' linux target ops to let the
263 concrete linux target define the ops by overriding the declarations
264 of process_stratum_target.
265
266 * linux-low.h (struct linux_target_ops): Remove the ops.
267 (class linux_process_target) <supports_fast_tracepoints>
268 <install_fast_tracepoint_jump_pad>
269 <get_min_fast_tracepoint_insn_len>: Remove.
270 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
271 (linux_process_target::install_fast_tracepoint_jump_pad)
272 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
273 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
274 <install_fast_tracepoint_jump_pad>
275 <get_min_fast_tracepoint_insn_len>: Declare.
276 (x86_target::supports_fast_tracepoints): Define.
277 (x86_install_fast_tracepoint_jump_pad): Turn into...
278 (x86_target::install_fast_tracepoint_jump_pad): ...this.
279 (x86_get_min_fast_tracepoint_insn_len): Turn into...
280 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
281 (the_low_target): Remove the op fields.
282 * linux-aarch64-low.cc (class aarch64_target)
283 <supports_fast_tracepoints>
284 <install_fast_tracepoint_jump_pad>
285 <get_min_fast_tracepoint_insn_len>: Declare.
286 (aarch64_target::supports_fast_tracepoints): Define.
287 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
288 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
289 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
290 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
291 (the_low_target): Remove the op fields.
292 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
293 <install_fast_tracepoint_jump_pad>
294 <get_min_fast_tracepoint_insn_len>: Declare.
295 (ppc_target::supports_fast_tracepoints): Define.
296 (ppc_install_fast_tracepoint_jump_pad): Turn into...
297 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
298 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
299 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
300 (the_low_target): Remove the op fields.
301 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
302 <install_fast_tracepoint_jump_pad>
303 <get_min_fast_tracepoint_insn_len>: Declare.
304 (s390_target::supports_fast_tracepoints): Define.
305 (s390_install_fast_tracepoint_jump_pad): Turn into...
306 (s390_target::install_fast_tracepoint_jump_pad): ...this.
307 (s390_get_min_fast_tracepoint_insn_len): Turn into...
308 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
309 (the_low_target): Remove the op fields.
310 * linux-arm-low.cc (the_low_target): Remove the op fields.
311 * linux-bfin-low.cc (the_low_target): Ditto.
312 * linux-crisv32-low.cc (the_low_target): Ditto.
313 * linux-m32r-low.cc (the_low_target): Ditto.
314 * linux-m68k-low.cc (the_low_target): Ditto.
315 * linux-sh-low.cc (the_low_target): Ditto.
316 * linux-tic6x-low.cc (the_low_target): Ditto.
317 * linux-tile-low.cc (the_low_target): Ditto.
318 * linux-xtensa-low.cc (the_low_target): Ditto.
319
320 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
321
322 Turn the 'get_thread_area' linux target op into a method of
323 process_stratum_target.
324
325 * linux-low.h (struct linux_target_ops): Remove the op.
326 (class linux_process_target) <stuck_in_jump_pad>
327 <linux_fast_tracepoint_collecting>
328 <low_get_thread_area>: Declare.
329 * linux-low.cc (supports_fast_tracepoints): Remove.
330 (linux_fast_tracepoint_collecting): Turn into...
331 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
332 (linux_process_target::low_get_thread_area): Define.
333 (stuck_in_jump_pad_callback): Turn into...
334 (linux_process_target::stuck_in_jump_pad): ...this.
335
336 Update the caller below.
337
338 (linux_process_target::stabilize_threads)
339
340 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
341 Declare.
342 (x86_get_thread_area): Turn into...
343 (x86_target::low_get_thread_area): ...this.
344 (the_low_target): Remove the op field.
345 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
346 Declare.
347 (aarch64_get_thread_area): Turn into...
348 (aarch64_target::low_get_thread_area): ...this.
349 (the_low_target): Remove the op field.
350 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
351 Declare.
352 (ppc_get_thread_area): Turn into...
353 (ppc_target::low_get_thread_area): ...this.
354 (the_low_target): Remove the op field.
355 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
356 Declare.
357 (s390_get_thread_area): Turn into...
358 (s390_target::low_get_thread_area): ...this.
359 (the_low_target): Remove the op field.
360 * linux-arm-low.cc (the_low_target): Remove the op field.
361 * linux-bfin-low.cc (the_low_target): Ditto.
362 * linux-crisv32-low.cc (the_low_target): Ditto.
363 * linux-m32r-low.cc (the_low_target): Ditto.
364 * linux-m68k-low.cc (the_low_target): Ditto.
365 * linux-sh-low.cc (the_low_target): Ditto.
366 * linux-tic6x-low.cc (the_low_target): Ditto.
367 * linux-tile-low.cc (the_low_target): Ditto.
368 * linux-xtensa-low.cc (the_low_target): Ditto.
369
370 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
371
372 Remote the 'supports_tracepoints' linux target op and let the
373 concrete linux target define it by overriding the op declared in
374 process_stratum_target.
375
376 * linux-low.h (struct linux_target_ops): Remove the op.
377 (class linux_process_target) <supports_tracepoints>: Remove.
378 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
379 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
380 Declare.
381 (x86_supports_tracepoints): Turn into...
382 (x86_target::supports_tracepoints): ...this.
383 (the_low_target): Remove the op field.
384 * linux-aarch64-low.cc (class aarch64_target)
385 <supports_tracepoints>: Declare.
386 (aarch64_supports_tracepoints): Turn into...
387 (aarch64_target::supports_tracepoints): ...this.
388 (the_low_target): Remove the op field.
389 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
390 Declare.
391 (ppc_supports_tracepoints): Turn into...
392 (ppc_target::supports_tracepoints): ...this.
393 (the_low_target): Remove the op field.
394 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
395 Declare.
396 (s390_supports_tracepoints): Turn into...
397 (s390_target::supports_tracepoints): ...this.
398 (the_low_target): Remove the op field.
399 * linux-arm-low.cc (the_low_target): Remove the op field.
400 * linux-bfin-low.cc (the_low_target): Ditto.
401 * linux-crisv32-low.cc (the_low_target): Ditto.
402 * linux-m32r-low.cc (the_low_target): Ditto.
403 * linux-m68k-low.cc (the_low_target): Ditto.
404 * linux-sh-low.cc (the_low_target): Ditto.
405 * linux-tic6x-low.cc (the_low_target): Ditto.
406 * linux-tile-low.cc (the_low_target): Ditto.
407 * linux-xtensa-low.cc (the_low_target): Ditto.
408
409 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
410
411 Remove the 'process_qsupported' linux target op and let a concrete
412 linux target define the op by overriding the op declaration in
413 process_stratum_target.
414
415 * linux-low.h (struct linux_target_ops): Remove the op.
416 (class linux_process_target) <process_qsupported>: Remove.
417 * linux-low.cc (linux_process_target::process_qsupported): Remove.
418 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
419 (x86_linux_process_qsupported): Turn into...
420 (x86_target::process_qsupported): ...this.
421 (the_low_target): Remove the op field.
422 * linux-aarch64-low.cc (the_low_target): Remove the op
423 field.
424 * linux-arm-low.cc (the_low_target): Ditto.
425 * linux-bfin-low.cc (the_low_target): Ditto.
426 * linux-crisv32-low.cc (the_low_target): Ditto.
427 * linux-m32r-low.cc (the_low_target): Ditto.
428 * linux-m68k-low.cc (the_low_target): Ditto.
429 * linux-ppc-low.cc (the_low_target): Ditto.
430 * linux-s390-low.cc (the_low_target): Ditto.
431 * linux-sh-low.cc (the_low_target): Ditto.
432 * linux-tic6x-low.cc (the_low_target): Ditto.
433 * linux-tile-low.cc (the_low_target): Ditto.
434 * linux-xtensa-low.cc (the_low_target): Ditto.
435
436 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
437
438 Turn the 'prepare_to_resume' linux target op into a method of
439 linux_process_target.
440
441 * linux-low.h (struct linux_target_ops): Remove the op.
442 (class linux_process_target) <low_prepare_to_resume>: Declare.
443 * linux-low.cc (linux_process_target::low_prepare_to_resume):
444 Define.
445
446 Update the callers below:
447
448 (linux_process_target::resume_one_lwp_throw)
449 (linux_process_target::low_prepare_to_resume)
450
451 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
452 Declare.
453 (x86_target::low_prepare_to_resume): Define.
454 (the_low_target): Remove the op field.
455 * linux-aarch64-low.cc (class aarch64_target)
456 <low_prepare_to_resume>: Declare.
457 (aarch64_target::low_prepare_to_resume): Define.
458 (the_low_target): Remove the op field.
459 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
460 Declare.
461 (arm_prepare_to_resume): Turn into...
462 (arm_target::low_prepare_to_resume): ...this.
463 (the_low_target): Remove the op field.
464 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
465 Declare.
466 (mips_linux_prepare_to_resume): Turn into...
467 (mips_target::low_prepare_to_resume): ...this.
468 (the_low_target): Remove the op field.
469 * linux-bfin-low.cc (the_low_target): Remove the op field.
470 * linux-crisv32-low.cc (the_low_target): Ditto.
471 * linux-m32r-low.cc (the_low_target): Ditto.
472 * linux-m68k-low.cc (the_low_target): Ditto.
473 * linux-ppc-low.cc (the_low_target): Ditto.
474 * linux-s390-low.cc (the_low_target): Ditto.
475 * linux-sh-low.cc (the_low_target): Ditto.
476 * linux-tic6x-low.cc (the_low_target): Ditto.
477 * linux-tile-low.cc (the_low_target): Ditto.
478 * linux-xtensa-low.cc (the_low_target): Ditto.
479
480 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
481
482 Turn the 'new_process', 'delete_process', 'new_thread',
483 'delete_thread', and 'new_fork' linux target ops into methods
484 of linux_process_target.
485
486 * linux-low.h (struct linux_target_ops): Remove the ops.
487 (class linux_process_target) <add_linux_process>
488 <add_lwp>
489 <delete_lwp>
490 <attach_lwp>
491 <detach_one_lwp>
492 <check_zombie_leaders>
493 <filter_exit_event>
494 <low_new_process>
495 <low_delete_process>
496 <low_new_thread>
497 <low_delete_thread>
498 <low_new_fork>: Declare.
499 * linux-low.cc (delete_lwp): Turn into...
500 (linux_process_target::delete_lwp): ...this.
501 (linux_process_target::low_delete_thread): Define.
502 (linux_add_process): Turn into...
503 (linux_process_target::add_linux_process): ...this.
504 (linux_process_target::low_new_process): Define.
505 (linux_process_target::low_delete_process): Define.
506 (linux_process_target::low_new_fork): Define.
507 (add_lwp): Turn into...
508 (linux_process_target::add_lwp): ...this.
509 (linux_process_target::low_new_thread): Define.
510 (linux_attach_lwp): Turn into...
511 (linux_process_target::attach_lwp): ...this.
512 (linux_detach_one_lwp): Turn into...
513 (linux_process_target::detach_one_lwp): ...this.
514 (linux_detach_lwp_callback): Remove and inline...
515 (linux_process_target::detach): ...here.
516 (check_zombie_leaders): Turn into...
517 (linux_process_target::check_zombie_leaders): ...this.
518 (filter_exit_event): Turn into...
519 (linux_process_target::filter_exit_event): ...this.
520
521 Update the callers below.
522
523 (linux_process_target::handle_extended_wait)
524 (linux_process_target::create_inferior)
525 (attach_proc_task_lwp_callback)
526 (linux_process_target::attach)
527 (linux_process_target::detach)
528 (linux_process_target::mourn)
529 * thread-db.cc (attach_thread)
530
531 * linux-x86-low.cc (class x86_target) <low_new_process>
532 <low_delete_process>
533 <low_new_thread>
534 <low_delete_thread>
535 <low_new_fork>: Declare.
536 (x86_linux_new_process): Turn into...
537 (x86_target::low_new_process): ...this.
538 (x86_linux_delete_process): Turn into...
539 (x86_target::low_delete_process): ...this.
540 (x86_target::low_new_thread): Define.
541 (x86_target::low_delete_thread): Define.
542 (x86_linux_new_fork): Turn into...
543 (x86_target::low_new_fork): ...this.
544 (the_low_target): Remove the op fields.
545 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
546 <low_delete_process>
547 <low_new_thread>
548 <low_delete_thread>
549 <low_new_fork>: Declare.
550 (aarch64_linux_new_process): Turn into...
551 (aarch64_target::low_new_process): ...this.
552 (aarch64_linux_delete_process): Turn into...
553 (aarch64_target::low_delete_process): ...this.
554 (aarch64_target::low_new_thread): Define.
555 (aarch64_target::low_delete_thread): Define.
556 (aarch64_linux_new_fork): Turn into...
557 (aarch64_target::low_new_fork): ...this.
558 (the_low_target): Remove the op fields.
559 * linux-arm-low.cc (class arm_target) <low_new_process>
560 <low_delete_process>
561 <low_new_thread>
562 <low_delete_thread>
563 <low_new_fork>: Declare.
564 (arm_new_process): Turn into...
565 (arm_target::low_new_process): ...this.
566 (arm_delete_process): Turn into...
567 (arm_target::low_delete_process): ...this.
568 (arm_new_thread): Turn into...
569 (arm_target::low_new_thread): ...this.
570 (arm_delete_thread): Turn into...
571 (arm_target::low_delete_thread): ...this.
572 (arm_new_fork): Turn into...
573 (arm_target::low_new_fork): ...this.
574 (the_low_target): Remove the op fields.
575 * linux-mips-low.cc (class mips_target) <low_new_process>
576 <low_delete_process>
577 <low_new_thread>
578 <low_delete_thread>
579 <low_new_fork>: Declare.
580 (mips_linux_new_process): Turn into...
581 (mips_target::low_new_process): ...this.
582 (mips_linux_delete_process): Turn into...
583 (mips_target::low_delete_process): ...this.
584 (mips_linux_new_thread): Turn into...
585 (mips_target::low_new_thread): ...this.
586 (mips_linux_delete_thread): Turn into...
587 (mips_target::low_delete_thread): ...this.
588 (mips_linux_new_fork): Turn into...
589 (mips_target::low_new_fork): ...this.
590 (the_low_target): Remove the op fields.
591 * linux-bfin-low.cc (the_low_target): Remove the op fields.
592 * linux-crisv32-low.cc (the_low_target): Ditto.
593 * linux-m32r-low.cc (the_low_target): Ditto.
594 * linux-m68k-low.cc (the_low_target): Ditto.
595 * linux-ppc-low.cc (the_low_target): Ditto.
596 * linux-s390-low.cc (the_low_target): Ditto.
597 * linux-sh-low.cc (the_low_target): Ditto.
598 * linux-tic6x-low.cc (the_low_target): Ditto.
599 * linux-tile-low.cc (the_low_target): Ditto.
600 * linux-xtensa-low.cc (the_low_target): Ditto.
601
602 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
603
604 Turn the 'siginfo_fixup' linux target op into a method of
605 linux_process_target.
606
607 * linux-low.h (struct linux_target_ops): Remove the op.
608 (class linux_process_target) <siginfo_fixup>
609 <low_siginfo_fixup>: Declare.
610 * linux-low.cc (siginfo_fixup): Turn into...
611 (linux_process_target::siginfo_fixup): ...this.
612 (linux_process_target::low_siginfo_fixup): Define.
613 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
614 (x86_siginfo_fixup): Turn into...
615 (x86_target::low_siginfo_fixup): ...this.
616 (the_low_target): Remove the op field.
617 * linux-aarch64-low.cc (class aarch64_target):
618 <low_siginfo_fixup>: Declare.
619 (aarch64_linux_siginfo_fixup): Turn into...
620 (aarch64_target::low_siginfo_fixup): ...this.
621 (the_low_target): Remove the op field.
622 * linux-arm-low.cc (the_low_target): Remove the op field.
623 * linux-bfin-low.cc (the_low_target): Ditto.
624 * linux-crisv32-low.cc (the_low_target): Ditto.
625 * linux-m32r-low.cc (the_low_target): Ditto.
626 * linux-m68k-low.cc (the_low_target): Ditto.
627 * linux-mips-low.cc (the_low_target): Ditto.
628 * linux-ppc-low.cc (the_low_target): Ditto.
629 * linux-s390-low.cc (the_low_target): Ditto.
630 * linux-sh-low.cc (the_low_target): Ditto.
631 * linux-tic6x-low.cc (the_low_target): Ditto.
632 * linux-tile-low.cc (the_low_target): Ditto.
633 * linux-xtensa-low.cc (the_low_target): Ditto.
634
635 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636
637 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
638 linux target ops into methods of linux_process_target.
639
640 * linux-low.h (struct linux_target_ops): Remove the ops.
641 (class linux_process_target) <low_collect_ptrace_register>
642 <low_store_ptrace_register>: Declare.
643 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
644 (linux_process_target::low_supply_ptrace_register): Define.
645
646 Update the callers below.
647
648 (linux_process_target::fetch_register)
649 (linux_process_target::store_register)
650
651 * linux-x86-low.cc (the_low_target): Remove the op fields.
652 * linux-aarch64-low.cc (the_low_target): Ditto.
653 * linux-arm-low.cc (the_low_target): Ditto.
654 * linux-bfin-low.cc (the_low_target): Ditto.
655 * linux-crisv32-low.cc (the_low_target): Ditto.
656 * linux-m32r-low.cc (the_low_target): Ditto.
657 * linux-m68k-low.cc (the_low_target): Ditto.
658 * linux-sh-low.cc (the_low_target): Ditto.
659 * linux-sparc-low.cc (the_low_target): Ditto.
660 * linux-tic6x-low.cc (the_low_target): Ditto.
661 * linux-tile-low.cc (the_low_target): Ditto.
662 * linux-xtensa-low.cc (the_low_target): Ditto.
663 * linux-mips-low.cc (class mips_target)
664 <low_collect_ptrace_register>
665 <low_supply_ptrace_register>: Declare.
666 (mips_collect_ptrace_register): Turn into ...
667 (mips_target::low_collect_ptrace_register): ...this.
668 (mips_supply_ptrace_register): Turn into...
669 (mips_target::low_supply_ptrace_register): ...this.
670 (the_low_target): Remove the op fields.
671 * linux-ppc-low.cc (class ppc_target)
672 <low_collect_ptrace_register>
673 <low_supply_ptrace_register>: Declare.
674 (ppc_collect_ptrace_register): Turn into ...
675 (ppc_target::low_collect_ptrace_register): ...this.
676 (ppc_supply_ptrace_register): Turn into ...
677 (ppc_target::low_supply_ptrace_register): ...this.
678 (ppc_fill_gregset): Update for the calls to
679 low_collect_ptrace_register.
680 (the_low_target): Remove the op fields.
681 * linux-s390-low.cc (class s390_target)
682 <low_collect_ptrace_register>
683 <low_supply_ptrace_register>: Declare.
684 (s390_collect_ptrace_register): Turn into ...
685 (s390_target::low_collect_ptrace_register): ...this.
686 (s390_supply_ptrace_register): Turn into ...
687 (s390_target::low_supply_ptrace_register): ...this.
688 (s390_fill_gregset): Update for the calls to
689 low_collect_ptrace_register.
690 (the_low_target): Remove the op fields.
691
692 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
693
694 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
695 target ops into methods of linux_process_target.
696
697 * linux-low.h (struct linux_target_ops): Remove the ops.
698 (class linux_process_target) <check_stopped_by_watchpoint>
699 <low_stopped_by_watchpoint>
700 <low_stopped_data_address>: Declare.
701 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
702 (linux_process_target::check_stopped_by_watchpoint): ...this.
703 (linux_process_target::low_stopped_by_watchpoint): Define.
704 (linux_process_target::low_stopped_data_address): Define.
705 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
706 <low_stopped_data_address>: Declare.
707 (x86_stopped_by_watchpoint): Turn into...
708 (x86_target::low_stopped_by_watchpoint): ...this.
709 (x86_stopped_data_address): Turn into...
710 (x86_target::low_stopped_data_address): ...this.
711 (the_low_target): Remove the op fields.
712 * linux-aarch64-low.cc (class aarch64_target)
713 <low_stopped_by_watchpoint>
714 <low_stopped_data_address>: Declare.
715 (aarch64_stopped_by_watchpoint): Turn into...
716 (aarch64_target::low_stopped_by_watchpoint): ...this.
717 (aarch64_stopped_data_address): Turn into...
718 (aarch64_target::low_stopped_data_address): ...this.
719 (the_low_target): Remove the op fields.
720 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
721 <low_stopped_data_address>: Declare.
722 (arm_stopped_by_watchpoint): Turn into...
723 (arm_target::low_stopped_by_watchpoint): ...this.
724 (arm_stopped_data_address): Turn into...
725 (arm_target::low_stopped_data_address): ...this.
726 (the_low_target): Remove the op fields.
727 * linux-crisv32-low.cc (class crisv32_target)
728 <low_stopped_by_watchpoint>
729 <low_stopped_data_address>: Declare.
730 (cris_stopped_by_watchpoint): Turn into...
731 (crisv32_target::low_stopped_by_watchpoint): ...this.
732 (cris_stopped_data_address): Turn into...
733 (crisv32_target::low_stopped_data_address): ...this.
734 (the_low_target): Remove the op fields.
735 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
736 <low_stopped_data_address>: Declare.
737 (mips_stopped_by_watchpoint): Turn into...
738 (mips_target::low_stopped_by_watchpoint): ...this.
739 (mips_stopped_data_address): Turn into...
740 (mips_target::low_stopped_data_address): ...this.
741 (the_low_target): Remove the op fields.
742 * linux-bfin-low.cc (the_low_target): Remove the op fields.
743 * linux-m32r-low.cc (the_low_target): Ditto.
744 * linux-m68k-low.cc (the_low_target): Ditto.
745 * linux-ppc-low.cc (the_low_target): Ditto.
746 * linux-s390-low.cc (the_low_target): Ditto.
747 * linux-sh-low.cc (the_low_target): Ditto.
748 * linux-sparc-low.cc (the_low_target): Ditto.
749 * linux-tic6x-low.cc (the_low_target): Ditto.
750 * linux-tile-low.cc (the_low_target): Ditto.
751 * linux-xtensa-low.cc (the_low_target): Ditto.
752
753 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
754
755 Turn the 'insert_point' and 'remove_point' linux target ops into
756 methods of linux_process_target.
757
758 * linux-low.h (struct linux_target_ops): Remove the ops.
759 (class linux_process_target) <low_insert_point>
760 <low_remove_point>: Declare.
761 * linux-low.cc (linux_process_target::low_insert_point)
762 (linux_process_target::low_remove_point): Define.
763 (linux_process_target::insert_point)
764 (linux_process_target::remove_point): Update for calls to
765 low_insert_point and low_remove_point.
766 * linux-x86-low.cc (class x86_target) <low_insert_point>
767 <low_remove_point>: Declare.
768 (x86_insert_point): Turn into...
769 (x86_target::low_insert_point): ...this.
770 (x86_remove_point): Turn into...
771 (x86_target::low_remove_point): ...this.
772 (the_low_target): Remove the op fields.
773 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
774 <low_remove_point>: Declare.
775 (aarch64_insert_point): Turn into...
776 (aarch64_target::low_insert_point): ...this.
777 (aarch64_remove_point): Turn into...
778 (aarch64_target::low_remove_point): ...this.
779 (the_low_target): Remove the op fields.
780 * linux-arm-low.cc (class arm_target) <low_insert_point>
781 <low_remove_point>: Declare.
782 (arm_insert_point): Turn into...
783 (arm_target::low_insert_point): ...this.
784 (arm_remove_point): Turn into...
785 (arm_target::low_remove_point): ...this.
786 (the_low_target): Remove the op fields.
787 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
788 <low_remove_point>: Declare.
789 (crisv32_insert_point): Turn into...
790 (crisv32_target::low_insert_point): ...this.
791 (crisv32_remove_point): Turn into...
792 (crisv32_target::low_remove_point): ...this.
793 (the_low_target): Remove the op fields.
794 * linux-mips-low.cc (class mips_target) <low_insert_point>
795 <low_remove_point>: Declare.
796 (mips_insert_point): Turn into...
797 (mips_target::low_insert_point): ...this.
798 (mips_remove_point): Turn into...
799 (mips_target::low_remove_point): ...this.
800 (the_low_target): Remove the op fields.
801 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
802 <low_remove_point>: Declare.
803 (ppc_insert_point): Turn into...
804 (ppc_target::low_insert_point): ...this.
805 (ppc_remove_point): Turn into...
806 (ppc_target::low_remove_point): ...this.
807 (the_low_target): Remove the op fields.
808 * linux-bfin-low.cc (the_low_target): Remove the op fields.
809 * linux-m32r-low.cc (the_low_target): Ditto.
810 * linux-m68k-low.cc (the_low_target): Ditto.
811 * linux-s390-low.cc (the_low_target): Ditto.
812 * linux-sh-low.cc (the_low_target): Ditto.
813 * linux-sparc-low.cc (the_low_target): Ditto.
814 * linux-tic6x-low.cc (the_low_target): Ditto.
815 * linux-tile-low.cc (the_low_target): Ditto.
816 * linux-xtensa-low.cc (the_low_target): Ditto.
817
818 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
819
820 Remove the 'supports_z_point_type' linux target op and let the
821 concrete linux target define it by overriding the op declared in
822 process_stratum_target.
823
824 * linux-low.cc (linux_process_target::supports_z_point_type):
825 Remove.
826 * linux-low.h (struct linux_target_ops): Remove the op.
827 (class linux_process_target) <supports_z_point_type>: Remove.
828 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
829 Declare.
830 (x86_supports_z_point_type): Turn into...
831 (x86_target::supports_z_point_type): ...this.
832 (the_low_target): Remove the op field.
833 * linux-aarch64-low.cc (class aarch64_target)
834 <supports_z_point_type>: Declare.
835 (aarch64_supports_z_point_type): Turn into...
836 (aarch64_target::supports_z_point_type): ...this.
837 (the_low_target): Remove the op field.
838 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
839 Declare.
840 (arm_supports_z_point_type): Turn into...
841 (arm_target::supports_z_point_type): ...this.
842 (the_low_target): Remove the op field.
843 * linux-crisv32-low.cc (class crisv32_target)
844 <supports_z_point_type>: Declare.
845 (cris_supports_z_point_type): Turn into...
846 (crisv32_target::supports_z_point_type): ...this.
847 (the_low_target): Remove the op field.
848 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
849 Declare.
850 (mips_supports_z_point_type): Turn into...
851 (mips_target::supports_z_point_type): ...this.
852 (the_low_target): Remove the op field.
853 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
854 Declare.
855 (ppc_supports_z_point_type): Turn into...
856 (ppc_target::supports_z_point_type): ...this.
857 (the_low_target): Remove the op field.
858 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
859 Declare.
860 (s390_supports_z_point_type): Turn into...
861 (s390_target::supports_z_point_type): ...this.
862 (the_low_target): Remove the op field.
863 * linux-bfin-low.cc (the_low_target): Remove the op field.
864 * linux-m32r-low.cc (the_low_target): Ditto.
865 * linux-m68k-low.cc (the_low_target): Ditto.
866 * linux-sh-low.cc (the_low_target): Ditto.
867 * linux-sparc-low.cc (the_low_target): Ditto.
868 * linux-tic6x-low.cc (the_low_target): Ditto.
869 * linux-tile-low.cc (the_low_target): Ditto.
870 * linux-xtensa-low.cc (the_low_target): Ditto.
871
872 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
873
874 Turn the 'breakpoint_at' linux target op into a method of
875 linux_process_target.
876
877 * linux-low.h (struct linux_target_ops): Remove the op.
878 (class linux_process_target) <low_breakpoint_at>: Declare.
879
880 Update the callers below:
881
882 * linux-low.cc (linux_process_target::save_stop_reason)
883 (linux_process_target::thread_still_has_status_pending)
884 (linux_process_target::wait_1)
885
886 * linux-x86-low.cc (class x86_target)
887 <low_breakpoint_at>: Declare.
888 (x86_breakpoint_at): Turn into...
889 (x86_target::low_breakpoint_at): ...this.
890 (the_low_target): Remove the op field.
891 * linux-aarch64-low.cc (class aarch64_target)
892 <low_breakpoint_at>: Declare.
893 (aarch64_breakpoint_at): Turn into...
894 (aarch64_target::low_breakpoint_at): ...this.
895 (the_low_target): Remove the op field.
896 * linux-arm-low.cc (class arm_target)
897 <low_breakpoint_at>: Declare.
898 (arm_target::low_breakpoint_at): Define.
899 (the_low_target): Remove the op field.
900 * linux-bfin-low.cc (class bfin_target)
901 <low_breakpoint_at>: Declare.
902 (bfin_breakpoint_at): Turn into...
903 (bfin_target::low_breakpoint_at): ...this.
904 (the_low_target): Remove the op field.
905 * linux-cris-low.cc (class cris_target)
906 <low_breakpoint_at>: Declare.
907 (cris_breakpoint_at): Turn into...
908 (cris_target::low_breakpoint_at): ...this.
909 (the_low_target): Remove the op field.
910 * linux-crisv32-low.cc (class crisv32_target)
911 <low_breakpoint_at>: Declare.
912 (crisv32_breakpoint_at): Turn into...
913 (crisv32_target::low_breakpoint_at): ...this.
914 (the_low_target): Remove the op field.
915 * linux-ia64-low.cc (class ia64_target)
916 <low_breakpoint_at>: Declare.
917 (ia64_target::low_breakpoint_at): Define.
918 * linux-m32r-low.cc (class m32r_target)
919 <low_breakpoint_at>: Declare.
920 (m32r_breakpoint_at): Turn into...
921 (m32r_target::low_breakpoint_at): ...this.
922 (the_low_target): Remove the op field.
923 * linux-m68k-low.cc (class m68k_target)
924 <low_breakpoint_at>: Declare.
925 (m68k_breakpoint_at): Turn into...
926 (m68k_target::low_breakpoint_at): ...this.
927 (the_low_target): Remove the op field.
928 * linux-mips-low.cc (class mips_target)
929 <low_breakpoint_at>: Declare.
930 (mips_breakpoint_at): Turn into...
931 (mips_target::low_breakpoint_at): ...this.
932 (the_low_target): Remove the op field.
933 * linux-nios2-low.cc (class nios2_target)
934 <low_breakpoint_at>: Declare.
935 (nios2_breakpoint_at): Turn into...
936 (nios2_target::low_breakpoint_at): ...this.
937 (the_low_target): Remove the op field.
938 * linux-ppc-low.cc (class ppc_target)
939 <low_breakpoint_at>: Declare.
940 (ppc_breakpoint_at): Turn into...
941 (ppc_target::low_breakpoint_at): ...this.
942 (the_low_target): Remove the op field.
943 * linux-riscv-low.cc (class riscv_target)
944 <low_breakpoint_at>: Declare.
945 (riscv_breakpoint_at): Turn into...
946 (riscv_target::low_breakpoint_at): ...this.
947 (the_low_target): Remove the op field.
948 * linux-s390-low.cc (class s390_target)
949 <low_breakpoint_at>: Declare.
950 (s390_breakpoint_at): Turn into...
951 (s390_target::low_breakpoint_at): ...this.
952 (the_low_target): Remove the op field.
953 * linux-sh-low.cc (class sh_target)
954 <low_breakpoint_at>: Declare.
955 (sh_breakpoint_at): Turn into...
956 (sh_target::low_breakpoint_at): ...this.
957 (the_low_target): Remove the op field.
958 * linux-sparc-low.cc (class sparc_target)
959 <low_breakpoint_at>: Declare.
960 (sparc_breakpoint_at): Turn into...
961 (sparc_target::low_breakpoint_at): ...this.
962 (the_low_target): Remove the op field.
963 * linux-tic6x-low.cc (class tic6x_target)
964 <low_breakpoint_at>: Declare.
965 (tic6x_breakpoint_at): Turn into...
966 (tic6x_target::low_breakpoint_at): ...this.
967 (the_low_target): Remove the op field.
968 * linux-tile-low.cc (class tile_target)
969 <low_breakpoint_at>: Declare.
970 (tile_breakpoint_at): Turn into...
971 (tile_target::low_breakpoint_at): ...this.
972 (the_low_target): Remove the op field.
973 * linux-xtensa-low.cc (class xtensa_target)
974 <low_breakpoint_at>: Declare.
975 (xtensa_breakpoint_at): Turn into...
976 (xtensa_target::low_breakpoint_at): ...this.
977 (the_low_target): Remove the op field.
978
979 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
980
981 Turn the 'decr_pc_after_break' linux_target_ops field into
982 a method of linux_process_target.
983
984 * linux-low.h (struct linux_target_ops)
985 <decr_pc_after_break>: Remove.
986 (class linux_process_target) <low_decr_pc_after_break>: New method
987 declaration.
988 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
989 New method implementation.
990
991 Update the users below.
992
993 (linux_process_target::save_stop_reason)
994 (linux_process_target::wait_1)
995 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
996 New declaration.
997 (x86_target::low_decr_pc_after_break): New method implementation.
998 (the_low_target): Remove the field.
999 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1000 New declaration.
1001 (bfin_target::low_decr_pc_after_break): New method implementation.
1002 (the_low_target): Remove the field.
1003 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1004 New declaration.
1005 (m68k_target::low_decr_pc_after_break): New method implementation.
1006 (the_low_target): Remove the field.
1007 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1008 New declaration.
1009 (s390_target::low_decr_pc_after_break): New method implementation.
1010 (the_low_target): Remove the field.
1011 * linux-aarch64-low.cc (the_low_target): Remove the field.
1012 * linux-arm-low.cc (the_low_target): Remove the field.
1013 * linux-cris-low.cc (the_low_target): Remove the field.
1014 * linux-crisv32-low.cc (the_low_target): Remove the field.
1015 * linux-m32r-low.cc (the_low_target): Remove the field.
1016 * linux-mips-low.cc (the_low_target): Remove the field.
1017 * linux-nios2-low.cc (the_low_target): Remove the field.
1018 * linux-ppc-low.cc (the_low_target): Remove the field.
1019 * linux-riscv-low.cc (the_low_target): Remove the field.
1020 * linux-sh-low.cc (the_low_target): Remove the field.
1021 * linux-sparc-low.cc (the_low_target): Remove the field.
1022 * linux-tic6x-low.cc (the_low_target): Remove the field.
1023 * linux-tile-low.cc (the_low_target): Remove the field.
1024 * linux-xtensa-low.cc (the_low_target): Remove the field.
1025
1026 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1027
1028 Remove the 'supports_software_single_step' linux target op and let
1029 the concrete linux target define it by overriding the op in
1030 process_stratum_target.
1031 Turn the 'get_next_pcs' linux target op into a method of
1032 linux_process_target.
1033
1034 * linux-low.h (struct linux_target_ops): Remove the ops.
1035 (class linux_process_target) <supports_software_single_step>:
1036 Remove.
1037 <low_get_next_pcs>: Declare.
1038 * linux-low.cc (can_software_single_step): Remove.
1039 (linux_process_target::low_get_next_pcs): Define.
1040 (linux_process_target::supports_software_single_step): Remove.
1041
1042 Update the callers below.
1043
1044 (linux_process_target::handle_extended_wait)
1045 (linux_process_target::wait_1)
1046 (linux_process_target::install_software_single_step_breakpoints)
1047 (linux_process_target::single_step)
1048 (linux_process_target::thread_needs_step_over)
1049 (linux_process_target::proceed_one_lwp)
1050 (linux_process_target::supports_range_stepping)
1051
1052 * linux-x86-low.cc (the_low_target): Remove the op field.
1053 * linux-aarch64-low.cc (the_low_target): Ditto.
1054 * linux-bfin-low.cc (the_low_target): Ditto.
1055 * linux-cris-low.cc (the_low_target): Ditto.
1056 * linux-crisv32-low.cc (the_low_target): Ditto.
1057 * linux-m32r-low.cc (the_low_target): Ditto.
1058 * linux-m68k-low.cc (the_low_target): Ditto.
1059 * linux-mips-low.cc (the_low_target): Ditto.
1060 * linux-nios2-low.cc (the_low_target): Ditto.
1061 * linux-ppc-low.cc (the_low_target): Ditto.
1062 * linux-riscv-low.cc (the_low_target): Ditto.
1063 * linux-s390-low.cc (the_low_target): Ditto.
1064 * linux-sh-low.cc (the_low_target): Ditto.
1065 * linux-sparc-low.cc (the_low_target): Ditto.
1066 * linux-tic6x-low.cc (the_low_target): Ditto.
1067 * linux-tile-low.cc (the_low_target): Ditto.
1068 * linux-xtensa-low.cc (the_low_target): Ditto.
1069 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1070 <supports_software_single_step>: Declare.
1071 (arm_target::supports_software_single_step): Define.
1072 (arm_gdbserver_get_next_pcs): Turn into...
1073 (arm_target::low_get_next_pcs): ...this.
1074 (the_low_target): Remove the op field.
1075
1076 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1077
1078 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1079 the concrete linux target define it by overriding the op
1080 in process_stratum_target.
1081
1082 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1083 Remove.
1084 * linux-low.h (struct linux_target_ops): Remove the op.
1085 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1086 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1087 Declare.
1088 (x86_sw_breakpoint_from_kind): Turn into...
1089 (x86_target::sw_breakpoint_from_kind): ...this.
1090 (the_low_target): Remove the op field.
1091 * linux-aarch64-low.cc (class aarch64_target)
1092 <sw_breakpoint_from_kind>: Declare.
1093 (aarch64_sw_breakpoint_from_kind): Turn into...
1094 (aarch64_target::sw_breakpoint_from_kind): ...this.
1095 (the_low_target): Remove the op field.
1096 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1097 Declare.
1098 (arm_target::sw_breakpoint_from_kind): Define.
1099 (the_low_target): Remove the op field.
1100 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1101 Declare.
1102 (bfin_sw_breakpoint_from_kind): Turn into...
1103 (bfin_target::sw_breakpoint_from_kind): ...this.
1104 (the_low_target): Remove the op field.
1105 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1106 Declare.
1107 (cris_sw_breakpoint_from_kind): Turn into...
1108 (cris_target::sw_breakpoint_from_kind): ...this.
1109 (the_low_target): Remove the op field.
1110 * linux-crisv32-low.cc (class crisv32_target)
1111 <sw_breakpoint_from_kind>: Declare.
1112 (cris_sw_breakpoint_from_kind): Turn into...
1113 (crisv32_target::sw_breakpoint_from_kind): ...this.
1114 (the_low_target): Remove the op field.
1115 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1116 Declare.
1117 (ia64_target::sw_breakpoint_from_kind): Define.
1118 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1119 Declare.
1120 (m32r_sw_breakpoint_from_kind): Turn into...
1121 (m32r_target::sw_breakpoint_from_kind): ...this.
1122 (the_low_target): Remove the op field.
1123 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1124 Declare.
1125 (m68k_sw_breakpoint_from_kind): Turn into...
1126 (m68k_target::sw_breakpoint_from_kind): ...this.
1127 (the_low_target): Remove the op field.
1128 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1129 Declare.
1130 (mips_sw_breakpoint_from_kind): Turn into...
1131 (mips_target::sw_breakpoint_from_kind): ...this.
1132 (the_low_target): Remove the op field.
1133 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1134 Declare.
1135 (nios2_sw_breakpoint_from_kind): Turn into...
1136 (nios2_target::sw_breakpoint_from_kind): ...this.
1137 (the_low_target): Remove the op field.
1138 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1139 Declare.
1140 (ppc_sw_breakpoint_from_kind): Turn into...
1141 (ppc_target::sw_breakpoint_from_kind): ...this.
1142 (the_low_target): Remove the op field.
1143 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1144 Declare.
1145 (riscv_sw_breakpoint_from_kind): Turn into...
1146 (riscv_target::sw_breakpoint_from_kind): ...this.
1147 (the_low_target): Remove the op field.
1148 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1149 Declare.
1150 (s390_sw_breakpoint_from_kind): Turn into...
1151 (s390_target::sw_breakpoint_from_kind): ...this.
1152 (the_low_target): Remove the op field.
1153 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1154 Declare.
1155 (sh_sw_breakpoint_from_kind): Turn into...
1156 (sh_target::sw_breakpoint_from_kind): ...this.
1157 (the_low_target): Remove the op field.
1158 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1159 Declare.
1160 (sparc_sw_breakpoint_from_kind): Turn into...
1161 (sparc_target::sw_breakpoint_from_kind): ...this.
1162 (the_low_target): Remove the op field.
1163 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1164 Declare.
1165 (tic6x_sw_breakpoint_from_kind): Turn into...
1166 (tic6x_target::sw_breakpoint_from_kind): ...this.
1167 (the_low_target): Remove the op field.
1168 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1169 Declare.
1170 (tile_sw_breakpoint_from_kind): Turn into...
1171 (tile_target::sw_breakpoint_from_kind): ...this.
1172 (the_low_target): Remove the op field.
1173 * linux-xtensa-low.cc (class xtensa_target)
1174 <sw_breakpoint_from_kind>: Declare.
1175 (xtensa_sw_breakpoint_from_kind): Turn into...
1176 (xtensa_target::sw_breakpoint_from_kind): ...this.
1177 (the_low_target): Remove the op field.
1178
1179 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1180
1181 Remove the 'breakpoint_kind_from_pc' and
1182 'breakpoint_kind_from_current_state' linux target ops, and let the
1183 concrete linux target define them by overriding the ops of
1184 process_stratum_target.
1185
1186 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1187 Remove.
1188 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1189 * linux-low.h (struct linux_target_ops): Remove ops.
1190 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1191 <breakpoint_kind_from_current_state>: Remove.
1192 * linux-x86-low.cc (the_low_target): Remove the op fields.
1193 * linux-bfin-low.cc (the_low_target): Ditto.
1194 * linux-cris-low.cc (the_low_target): Ditto.
1195 * linux-crisv32-low.cc (the_low_target): Ditto.
1196 * linux-m32r-low.cc (the_low_target): Ditto.
1197 * linux-m68k-low.cc (the_low_target): Ditto.
1198 * linux-mips-low.cc (the_low_target): Ditto.
1199 * linux-nios2-low.cc (the_low_target): Ditto.
1200 * linux-ppc-low.cc (the_low_target): Ditto.
1201 * linux-s390-low.cc (the_low_target): Ditto.
1202 * linux-sh-low.cc (the_low_target): Ditto.
1203 * linux-sparc-low.cc (the_low_target): Ditto.
1204 * linux-tic6x-low.cc (the_low_target): Ditto.
1205 * linux-tile-low.cc (the_low_target): Ditto.
1206 * linux-xtensa-low.cc (the_low_target): Ditto.
1207 * linux-aarch64-low.cc (class aarch64_target)
1208 <breakpoint_kind_from_pc>
1209 <breakpoint_kind_from_current_state>: Declare.
1210 (aarch64_breakpoint_kind_from_pc): Turn into...
1211 (aarch64_target::breakpoint_kind_from_pc): ...this.
1212 (aarch64_breakpoint_kind_from_current_state): Turn into...
1213 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1214 (the_low_target): Remove the op fields.
1215 * linux-arm-low.cc (class arm_target):
1216 <breakpoint_kind_from_pc>
1217 <breakpoint_kind_from_current_state>: Declare.
1218 (arm_target::breakpoint_kind_from_pc): Define.
1219 (arm_target::breakpoint_kind_from_current_state): Define.
1220 (the_low_target): Remove the op fields.
1221 * linux-riscv-low.cc (class riscv_target):
1222 <breakpoint_kind_from_pc>: Declare.
1223 (riscv_breakpoint_kind_from_pc): Turn into...
1224 (riscv_target::breakpoint_kind_from_pc): ...this.
1225 (the_low_target): Remove the op fields.
1226
1227 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1228
1229 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1230 of linux_process_target.
1231
1232 * linux-low.h (struct linux_target_ops): Remove the ops.
1233 (class linux_process_target) <low_supports_breakpoints>
1234 <low_get_pc>
1235 <low_set_pc>: Declare.
1236 * linux-low.cc (supports_breakpoints): Turn into...
1237 (linux_process_target::low_supports_breakpoints): ...this.
1238 (linux_process_target::low_get_pc): Define.
1239 (linux_process_target::low_set_pc): Define.
1240
1241 Update the callers below.
1242
1243 (linux_process_target::get_pc)
1244 (linux_process_target::save_stop_reason)
1245 (linux_process_target::maybe_move_out_of_jump_pad)
1246 (linux_process_target::wait_1)
1247 (linux_process_target::resume_one_lwp_throw)
1248 (linux_process_target::resume)
1249 (linux_process_target::proceed_all_lwps)
1250 (linux_process_target::read_pc)
1251 (linux_process_target::write_pc)
1252
1253 * linux-x86-low.cc (class linux_process_target)
1254 <low_supports_breakpoints>
1255 <low_get_pc>
1256 <low_set_pc>: Declare.
1257 (x86_target::low_supports_breakpoints): Define.
1258 (x86_get_pc): Turn into...
1259 (x86_target::low_get_pc): ...this.
1260 (x86_set_pc): Turn into...
1261 (x86_target::low_set_pc): ...this.
1262 (the_low_target): Remove the op fields.
1263 * linux-arm-low.cc (class arm_target)
1264 <low_supports_breakpoints>
1265 <low_get_pc>
1266 <low_set_pc>: Declare.
1267 (arm_target::low_supports_breakpoints)
1268 (arm_target::low_get_pc)
1269 (arm_target::low_set_pc): Define.
1270 (the_low_target): Remove the op fields.
1271 * linux-bfin-low.cc (class bfin_target)
1272 <low_supports_breakpoints>
1273 <low_get_pc>
1274 <low_set_pc>: Declare.
1275 (bfin_target::low_supports_breakpoints)
1276 (bfin_target::low_get_pc)
1277 (bfin_target::low_set_pc): Define.
1278 (the_low_target): Remove the op fields.
1279 * linux-cris-low.cc (class cris_target)
1280 <low_supports_breakpoints>
1281 <low_get_pc>
1282 <low_set_pc>: Declare.
1283 (cris_target::low_supports_breakpoints)
1284 (cris_target::low_get_pc)
1285 (cris_target::low_set_pc): Define.
1286 (the_low_target): Remove the op fields.
1287 * linux-crisv32-low.cc (class crisv32_target)
1288 <low_supports_breakpoints>
1289 <low_get_pc>
1290 <low_set_pc>: Declare.
1291 (crisv32_target::low_supports_breakpoints)
1292 (crisv32_target::low_get_pc)
1293 (crisv32_target::low_set_pc): Define.
1294 (the_low_target): Remove the op fields.
1295 * linux-m32r-low.cc (class m32r_target)
1296 <low_supports_breakpoints>
1297 <low_get_pc>
1298 <low_set_pc>: Declare.
1299 (m32r_target::low_supports_breakpoints)
1300 (m32r_target::low_get_pc)
1301 (m32r_target::low_set_pc): Define.
1302 (the_low_target): Remove the op fields.
1303 * linux-m68k-low.cc (class m68k_target)
1304 <low_supports_breakpoints>
1305 <low_get_pc>
1306 <low_set_pc>: Declare.
1307 (m68k_target::low_supports_breakpoints)
1308 (m68k_target::low_get_pc)
1309 (m68k_target::low_set_pc): Define.
1310 (the_low_target): Remove the op fields.
1311 * linux-nios2-low.cc (class nios2_target)
1312 <low_supports_breakpoints>
1313 <low_get_pc>
1314 <low_set_pc>: Declare.
1315 (nios2_target::low_supports_breakpoints)
1316 (nios2_target::low_get_pc)
1317 (nios2_target::low_set_pc): Define.
1318 (the_low_target): Remove the op fields.
1319 * linux-sh-low.cc (class sh_target)
1320 <low_supports_breakpoints>
1321 <low_get_pc>
1322 <low_set_pc>: Declare.
1323 (sh_target::low_supports_breakpoints)
1324 (sh_target::low_get_pc)
1325 (sh_target::low_set_pc): Define.
1326 (the_low_target): Remove the op fields.
1327 * linux-xtensa-low.cc (class xtensa_target)
1328 <low_supports_breakpoints>
1329 <low_get_pc>
1330 <low_set_pc>: Declare.
1331 (xtensa_target::low_supports_breakpoints)
1332 (xtensa_target::low_get_pc)
1333 (xtensa_target::low_set_pc): Define.
1334 (the_low_target): Remove the op fields.
1335 * linux-sparc-low.cc (class sparc_target)
1336 <low_supports_breakpoints>
1337 <low_get_pc>: Declare.
1338 (sparc_target::low_supports_breakpoints)
1339 (sparc_target::low_get_pc): Define.
1340 (the_low_target): Remove the op fields.
1341 * linux-tile-low.cc (class tile_target)
1342 <low_supports_breakpoints>
1343 <low_get_pc>
1344 <low_set_pc>: Declare.
1345 (tile_target::low_supports_breakpoints)
1346 (tile_target::low_get_pc)
1347 (tile_target::low_set_pc): Define.
1348 (the_low_target): Remove the op fields.
1349 * linux-aarch64-low.cc (class aarch64_target)
1350 <low_supports_breakpoints>
1351 <low_get_pc>
1352 <low_set_pc>: Declare.
1353 (aarch64_target::low_supports_breakpoints): Define.
1354 (aarch64_get_pc): Turn into...
1355 (aarch64_target::low_get_pc): ...this.
1356 (aarch64_set_pc): Turn into...
1357 (aarch64_target::low_set_pc): ...this.
1358 (the_low_target): Remove the op fields.
1359 * linux-mips-low.cc (class mips_target)
1360 <low_supports_breakpoints>
1361 <low_get_pc>
1362 <low_set_pc>: Declare.
1363 (mips_target::low_supports_breakpoints): Define.
1364 (mips_get_pc): Turn into...
1365 (mips_target::low_get_pc): ...this.
1366 (mips_set_pc): Turn into...
1367 (mips_target::low_set_pc): ...this.
1368 (the_low_target): Remove the op fields.
1369 * linux-ppc-low.cc (class ppc_target)
1370 <low_supports_breakpoints>
1371 <low_get_pc>
1372 <low_set_pc>: Declare.
1373 (ppc_target::low_supports_breakpoints): Define.
1374 (ppc_get_pc): Turn into...
1375 (ppc_target::low_get_pc): ...this.
1376 (ppc_set_pc): Turn into...
1377 (ppc_target::low_set_pc): ...this.
1378 (the_low_target): Remove the op fields.
1379 * linux-riscv-low.cc (class riscv_target)
1380 <low_supports_breakpoints>
1381 <low_get_pc>
1382 <low_set_pc>: Declare.
1383 (riscv_target::low_supports_breakpoints): Define.
1384 (riscv_get_pc): Turn into...
1385 (riscv_target::low_get_pc): ...this.
1386 (riscv_set_pc): Turn into...
1387 (riscv_target::low_set_pc): ...this.
1388 (the_low_target): Remove the op fields.
1389 * linux-s390-low.cc (class s390_target)
1390 <low_supports_breakpoints>
1391 <low_get_pc>
1392 <low_set_pc>: Declare.
1393 (s390_target::low_supports_breakpoints): Define.
1394 (s390_get_pc): Turn into...
1395 (s390_target::low_get_pc): ...this.
1396 (s390_set_pc): Turn into...
1397 (s390_target::low_set_pc): ...this.
1398 (the_low_target): Remove the op fields.
1399 * linux-tic6x-low.cc (class tic6x_target)
1400 <low_supports_breakpoints>
1401 <low_get_pc>
1402 <low_set_pc>: Declare.
1403 (tic6x_target::low_supports_breakpoints): Define.
1404 (tic6x_get_pc): Turn into...
1405 (tic6x_target::low_get_pc): ...this.
1406 (tic6x_set_pc): Turn into...
1407 (tic6x_target::low_set_pc): ...this.
1408 (the_low_target): Remove the op fields.
1409
1410 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1411
1412 Turn some more static methods in linux-low into private methods
1413 of linux_process_target.
1414
1415 * linux-low.cc (get_pc): Turn into...
1416 (linux_process_target::get_pc): ...this.
1417 (save_stop_reason): Turn into...
1418 (linux_process_target::save_stop_reason): ...this.
1419 (thread_still_has_status_pending_p): Turn into...
1420 (linux_process_target::thread_still_has_status_pending): ...this.
1421 (status_pending_p_callback): Turn into...
1422 (linux_process_target::status_pending_p_callback): ...this.
1423 (resume_stopped_resumed_lwps): Turn into...
1424 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1425 (install_software_single_step_breakpoints): Turn into...
1426 (linux_process_target::install_software_single_step_breakpoints):
1427 ...this.
1428 (single_step): Turn into...
1429 (linux_process_target::single_step): ...this.
1430 (linux_resume_one_lwp_throw): Turn into...
1431 (linux_process_target::resume_one_lwp_throw): ...this.
1432 (linux_resume_one_lwp): Turn into...
1433 (linux_process_target::resume_one_lwp): ...this.
1434 (resume_status_pending_p): Turn into...
1435 (linux_process_target::resume_status_pending): ...this.
1436 (need_step_over_p): Turn into...
1437 (linux_process_target::thread_needs_step_over): ...this.
1438 (linux_resume_one_thread): Turn into...
1439 (linux_process_target::resume_one_thread): ...this.
1440 (proceed_one_lwp): Turn into...
1441 (linux_process_target::proceed_one_lwp): ...this.
1442 (unsuspend_and_proceed_one_lwp): Turn into...
1443 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1444
1445 Update the calls/references to the above functions below.
1446
1447 (linux_process_target::handle_extended_wait)
1448 (linux_process_target::filter_event)
1449 (linux_process_target::wait_for_event_filtered)
1450 (linux_process_target::wait_1)
1451 (linux_process_target::move_out_of_jump_pad)
1452 (linux_process_target::start_step_over)
1453 (linux_process_target::resume)
1454 (linux_process_target::proceed_all_lwps)
1455 (regsets_store_inferior_registers)
1456 (linux_process_target::store_register)
1457
1458 * linux-low.h (class linux_process_target)
1459 <get_pc>
1460 <save_stop_reason>
1461 <thread_still_has_status_pending>
1462 <status_pending_p_callback>
1463 <resume_stopped_resumed_lwps>
1464 <install_software_single_step_breakpoints>
1465 <single_step>
1466 <resume_one_lwp_throw>
1467 <resume_one_lwp>
1468 <resume_status_pending>
1469 <thread_needs_step_over>
1470 <resume_one_thread>
1471 <proceed_one_lwp>
1472 <unsuspend_and_proceed_one_lwp>: Declare.
1473
1474 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1475
1476 Turn the 'fetch_register' linux target op into a method of
1477 linux_process_target.
1478
1479 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1480 (class linux_process_target) <low_fetch_register>: Declare.
1481 * linux-x86-low.cc (the_low_target)
1482 * linux-aarch64-low.cc (the_low_target)
1483 * linux-arm-low.cc (the_low_target)
1484 * linux-bfin-low.cc (the_low_target)
1485 * linux-cris-low.cc (the_low_target)
1486 * linux-crisv32-low.cc (the_low_target)
1487 * linux-m32r-low.cc (the_low_target)
1488 * linux-m68k-low.cc (the_low_target)
1489 * linux-nios2-low.cc (the_low_target)
1490 * linux-ppc-low.cc (the_low_target)
1491 * linux-s390-low.cc (the_low_target)
1492 * linux-sh-low.cc (the_low_target)
1493 * linux-sparc-low.cc (the_low_target)
1494 * linux-tic6x-low.cc (the_low_target)
1495 * linux-tile-low.cc (the_low_target)
1496 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1497 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1498 Declare.
1499 (ia64_fetch_register): Turn into...
1500 (ia64_target::low_fetch_register): ...this.
1501 (the_low_target): Remove the op field.
1502 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1503 Declare.
1504 (mips_fetch_register): Turn into...
1505 (mips_target::low_fetch_register): ...this.
1506 (the_low_target): Remove the op field.
1507 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1508 Declare.
1509 (riscv_fetch_register): Turn into...
1510 (riscv_target::low_fetch_register): ...this.
1511 (the_low_target): Remove the op field.
1512
1513 Update the callers below.
1514
1515 * linux-low.cc (linux_process_target::fetch_registers)
1516 (linux_process_target::low_fetch_register)
1517
1518 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1519
1520 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1521 linux target ops into methods of linux_process_target.
1522
1523 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1524 (class linux_process_target) <fetch_register>
1525 <store_register>
1526 <usr_fetch_inferior_registers>
1527 <usr_store_inferior_registers>
1528 <low_cannot_fetch_register>
1529 <low_cannot_fetch_register> Declare.
1530 * linux-low.cc (fetch_register): Turn into...
1531 (linux_process_target::fetch_register): ...this.
1532 (store_register): Turn into ...
1533 (linux_process_target::store_register): ...this.
1534 (usr_fetch_inferior_registers): Turn into...
1535 (linux_process_target::usr_fetch_inferior_registers): ...this.
1536 (usr_store_inferior_registers): Turn into...
1537 (linux_process_target::usr_store_inferior_registers): ...this.
1538 * linux-x86-low.cc (class x86_target)
1539 <low_cannot_fetch_register>
1540 <low_cannot_store_register>: Declare.
1541 (x86_cannot_store_register): Turn into...
1542 (x86_target::low_cannot_store_register): ...this.
1543 (x86_cannot_fetch_register): Turn into...
1544 (x86_target::low_cannot_fetch_register): ...this.
1545 (the_low_target): Remove the target op fields.
1546 * linux-aarch64-low.cc (class aarch64_target)
1547 <low_cannot_fetch_register>
1548 <low_cannot_store_register>: Declare.
1549 (aarch64_target::low_cannot_fetch_register)
1550 (aarch64_target::low_cannot_store_register): Define.
1551 (the_low_target): Remove the op fields.
1552 * linux-arm-low.cc (class arm_target)
1553 <low_cannot_fetch_register>
1554 <low_cannot_store_register>: Declare.
1555 (arm_cannot_fetch_register): Turn into...
1556 (arm_target::low_cannot_fetch_register): ...this.
1557 (arm_cannot_store_register): Turn into...
1558 (arm_target::low_cannot_store_register): ...this.
1559 (the_low_target): Remove the op fields.
1560 * linux-bfin-low.cc (class bfin_target)
1561 <low_cannot_fetch_register>
1562 <low_cannot_store_register>: Declare.
1563 (bfin_cannot_fetch_register): Turn into...
1564 (bfin_target::low_cannot_fetch_register): ...this.
1565 (bfin_cannot_store_register): Turn into...
1566 (bfin_target::low_cannot_store_register): ...this.
1567 (the_low_target): Remove the op fields.
1568 * linux-cris-low.cc (class cris_target)
1569 <low_cannot_fetch_register>
1570 <low_cannot_store_register>: Declare.
1571 (cris_cannot_fetch_register): Turn into...
1572 (cris_target::low_cannot_fetch_register): ...this.
1573 (cris_cannot_store_register): Turn into...
1574 (cris_target::low_cannot_store_register): ...this.
1575 (the_low_target): Remove the op fields.
1576 * linux-crisv32-low.cc (class crisv32_target)
1577 <low_cannot_fetch_register>
1578 <low_cannot_store_register>: Declare.
1579 (crisv32_target::low_cannot_fetch_register)
1580 (crisv32_target::low_cannot_store_register): Define.
1581 (the_low_target): Remove the op fields.
1582 * linux-ia64-low.cc (class ia64_target)
1583 <low_cannot_fetch_register>
1584 <low_cannot_store_register>: Declare.
1585 (ia64_cannot_fetch_register): Turn into...
1586 (ia64_target::low_cannot_fetch_register): ...this.
1587 (ia64_cannot_store_register): Turn into...
1588 (ia64_target::low_cannot_store_register): ...this.
1589 (the_low_target): Remove the op fields.
1590 * linux-m32r-low.cc (class m32r_target)
1591 <low_cannot_fetch_register>
1592 <low_cannot_store_register>: Declare.
1593 (m32r_cannot_fetch_register): Turn into...
1594 (m32r_target::low_cannot_fetch_register): ...this.
1595 (m32r_cannot_store_register): Turn into...
1596 (m32r_target::low_cannot_store_register): ...this.
1597 (the_low_target): Remove the op fields.
1598 * linux-m68k-low.cc (class m68k_target)
1599 <low_cannot_fetch_register>
1600 <low_cannot_store_register>: Declare.
1601 (m68k_cannot_fetch_register): Turn into...
1602 (m68k_target::low_cannot_fetch_register): ...this.
1603 (m68k_cannot_store_register): Turn into...
1604 (m68k_target::low_cannot_store_register): ...this.
1605 (the_low_target): Remove the op fields.
1606 * linux-mips-low.cc (class mips_target)
1607 <low_cannot_fetch_register>
1608 <low_cannot_store_register>: Declare.
1609 (mips_cannot_fetch_register): Turn into...
1610 (mips_target::low_cannot_fetch_register): ...this.
1611 (mips_cannot_store_register): Turn into...
1612 (mips_target::low_cannot_store_register): ...this.
1613 (get_usrregs_info): Inline at the call sites in
1614 low_cannot_fetch_register and low_cannot_store_register,
1615 and remove.
1616 (the_low_target): Remove the op fields.
1617 * linux-nios2-low.cc (class nios2_target)
1618 <low_cannot_fetch_register>
1619 <low_cannot_store_register>: Declare.
1620 (nios2_cannot_fetch_register): Turn into...
1621 (nios2_target::low_cannot_fetch_register): ...this.
1622 (nios2_cannot_store_register): Turn into...
1623 (nios2_target::low_cannot_store_register): ...this.
1624 (the_low_target): Remove the op fields.
1625 * linux-ppc-low.cc (class ppc_target)
1626 <low_cannot_fetch_register>
1627 <low_cannot_store_register>: Declare.
1628 (ppc_cannot_fetch_register): Turn into...
1629 (ppc_target::low_cannot_fetch_register): ...this.
1630 (ppc_cannot_store_register): Turn into...
1631 (ppc_target::low_cannot_store_register): ...this.
1632 (the_low_target): Remove the op fields.
1633 * linux-riscv-low.cc (class riscv_target)
1634 <low_cannot_fetch_register>
1635 <low_cannot_store_register>: Declare.
1636 (riscv_target::low_cannot_fetch_register)
1637 (riscv_target::low_cannot_store_register): Define.
1638 (the_low_target): Remove the op fields.
1639 * linux-s390-low.cc (class s390_target)
1640 <low_cannot_fetch_register>
1641 <low_cannot_store_register>: Declare.
1642 (s390_cannot_fetch_register): Turn into...
1643 (s390_target::low_cannot_fetch_register): ...this.
1644 (s390_cannot_store_register): Turn into...
1645 (s390_target::low_cannot_store_register): ...this.
1646 (the_low_target): Remove the op fields.
1647 * linux-sh-low.cc (class sh_target)
1648 <low_cannot_fetch_register>
1649 <low_cannot_store_register>: Declare.
1650 (sh_cannot_fetch_register): Turn into...
1651 (sh_target::low_cannot_fetch_register): ...this.
1652 (sh_cannot_store_register): Turn into...
1653 (sh_target::low_cannot_store_register): ...this.
1654 (the_low_target): Remove the op fields.
1655 * linux-sparc-low.cc (class sparc_target)
1656 <low_cannot_fetch_register>
1657 <low_cannot_store_register>: Declare.
1658 (sparc_cannot_fetch_register): Turn into...
1659 (sparc_target::low_cannot_fetch_register): ...this.
1660 (sparc_cannot_store_register): Turn into...
1661 (sparc_target::low_cannot_store_register): ...this.
1662 (the_low_target): Remove the op fields.
1663 * linux-tic6x-low.cc (class tic6x_target)
1664 <low_cannot_fetch_register>
1665 <low_cannot_store_register>: Declare.
1666 (tic6x_cannot_fetch_register): Turn into...
1667 (tic6x_target::low_cannot_fetch_register): ...this.
1668 (tic6x_cannot_store_register): Turn into...
1669 (tic6x_target::low_cannot_store_register): ...this.
1670 (the_low_target): Remove the op fields.
1671 * linux-tile-low.cc (class tile_target)
1672 <low_cannot_fetch_register>
1673 <low_cannot_store_register>: Declare.
1674 (tile_cannot_fetch_register): Turn into...
1675 (tile_target::low_cannot_fetch_register): ...this.
1676 (tile_cannot_store_register): Turn into...
1677 (tile_target::low_cannot_store_register): ...this.
1678 (the_low_target): Remove the op fields.
1679 * linux-xtensa-low.cc (class xtensa_target)
1680 <low_cannot_fetch_register>
1681 <low_cannot_store_register>: Declare.
1682 (xtensa_target::low_cannot_fetch_register)
1683 (xtensa_target::low_cannot_store_register): Define.
1684 (the_low_target): Remove the op fields.
1685
1686 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1687
1688 Turn the 'regs_info' linux target op into a method of
1689 linux_process_target.
1690
1691 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1692 (class linux_process_target) <get_regs_info>: Define.
1693
1694 Update the callers below.
1695
1696 * linux-low.cc (linux_process_target::fetch_registers)
1697 (linux_process_target::store_registers)
1698 * proc-service.cc (gregset_info)
1699
1700 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1701 (x86_linux_regs_info): Turn into ...
1702 (x86_target::get_regs_info): ...this.
1703 (the_low_target): Remove the op field.
1704 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1705 Declare.
1706 (aarch64_regs_info): Turn into ...
1707 (aarch64_target::get_regs_info): ...this.
1708 (the_low_target): Remove the op field.
1709 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1710 (arm_regs_info): Turn into ...
1711 (arm_target::get_regs_info): ...this.
1712 (the_low_target): Remove the op field.
1713 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1714 (bfin_regs_info): Turn into ...
1715 (bfin_target::get_regs_info): ...this.
1716 (the_low_target): Remove the op field.
1717 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1718 (cris_regs_info): Turn into ...
1719 (cris_target::get_regs_info): ...this.
1720 (the_low_target): Remove the op field.
1721 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1722 Declare.
1723 (crisv32_regs_info): Turn into ...
1724 (crisv32_target::get_regs_info): ...this.
1725 (the_low_target): Remove the op field.
1726 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1727 (ia64_regs_info): Turn into ...
1728 (ia64_target::get_regs_info): ...this.
1729 (the_low_target): Remove the op field.
1730 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1731 (m32r_regs_info): Turn into ...
1732 (m32r_target::get_regs_info): ...this.
1733 (the_low_target): Remove the op field.
1734 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1735 (m68k_regs_info): Turn into ...
1736 (m68k_target::get_regs_info): ...this.
1737 (the_low_target): Remove the op field.
1738 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1739 (mips_regs_info): Turn into ...
1740 (mips_target::get_regs_info): ...this.
1741 (the_low_target): Remove the op field.
1742 (get_usrregs_info): Update the call to the op.
1743 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1744 (nios2_regs_info): Turn into ...
1745 (nios2_target::get_regs_info): ...this.
1746 (the_low_target): Remove the op field.
1747 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1748 (ppc_regs_info): Turn into ...
1749 (ppc_target::get_regs_info): ...this.
1750 (the_low_target): Remove the op field.
1751 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1752 (riscv_regs_info): Turn into ...
1753 (riscv_target::get_regs_info): ...this.
1754 (the_low_target): Remove the op field.
1755 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1756 (s390_regs_info): Turn into ...
1757 (s390_target::get_regs_info): ...this.
1758 (the_low_target): Remove the op field.
1759 (s390_collect_ptrace_register)
1760 (s390_supply_ptrace_register)
1761 (s390_fill_gregset): Update the call to the op.
1762 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1763 (sh_regs_info): Turn into ...
1764 (sh_target::get_regs_info): ...this.
1765 (the_low_target): Remove the op field.
1766 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1767 (sparc_regs_info): Turn into ...
1768 (sparc_target::get_regs_info): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1771 (tic6x_regs_info): Turn into ...
1772 (tic6x_target::get_regs_info): ...this.
1773 (the_low_target): Remove the op field.
1774 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1775 (tile_regs_info): Turn into ...
1776 (tile_target::get_regs_info): ...this.
1777 (the_low_target): Remove the op field.
1778 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1779 Declare.
1780 (xtensa_regs_info): Turn into ...
1781 (xtensa_target::get_regs_info): ...this.
1782 (the_low_target): Remove the op field.
1783
1784 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1785
1786 Turn the 'arch_setup' linux target op into a method of
1787 linux_process_target.
1788
1789 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1790 (class linux_process_target) <arch_setup_thread>
1791 <low_arch_setup>: New declarations.
1792 * linux-low.cc (linux_arch_setup): Delete.
1793 (linux_arch_setup_thread): Turn into...
1794 (linux_process_target::arch_setup_thread): ... this.
1795
1796 Update the callers below.
1797
1798 (linux_process_target::handle_extended_wait)
1799 (linux_process_target::post_create_inferior)
1800 (linux_process_target::filter_event)
1801
1802 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1803 declaration.
1804 (x86_linux_update_xmltarget): Turn into...
1805 (x86_target::update_xmltarget): ...this.
1806 (x86_linux_process_qsupported): Update the call to
1807 x86_linux_update_xmltarget.
1808 (x86_arch_setup): Turn into ...
1809 (x86_target::low_arch_setup): ...this.
1810 (the_low_target): Remove the op field.
1811 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1812 declaration.
1813 (aarch64_arch_setup): Turn into ...
1814 (aarch64_target::low_arch_setup): ...this.
1815 (the_low_target): Remove the op field.
1816 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1817 declaration.
1818 (arm_arch_setup): Turn into ...
1819 (arm_target::low_arch_setup): ...this.
1820 (the_low_target): Remove the op field.
1821 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1822 declaration.
1823 (bfin_arch_setup): Turn into ...
1824 (bfin_target::low_arch_setup): ...this.
1825 (the_low_target): Remove the op field.
1826 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1827 declaration.
1828 (cris_arch_setup): Turn into ...
1829 (cris_target::low_arch_setup): ...this.
1830 (the_low_target): Remove the op field.
1831 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1832 declaration.
1833 (crisv32_arch_setup): Turn into ...
1834 (crisv32_target::low_arch_setup): ...this.
1835 (the_low_target): Remove the op field.
1836 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1837 declaration.
1838 (ia64_arch_setup): Turn into ...
1839 (ia64_target::low_arch_setup): ...this.
1840 (the_low_target): Remove the op field.
1841 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1842 declaration.
1843 (m32r_arch_setup): Turn into ...
1844 (m32r_target::low_arch_setup): ...this.
1845 (the_low_target): Remove the op field.
1846 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1847 declaration.
1848 (m68k_arch_setup): Turn into ...
1849 (m68k_target::low_arch_setup): ...this.
1850 (the_low_target): Remove the op field.
1851 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1852 declaration.
1853 (mips_arch_setup): Turn into ...
1854 (mips_target::low_arch_setup): ...this.
1855 (the_low_target): Remove the op field.
1856 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1857 declaration.
1858 (nios2_arch_setup): Turn into ...
1859 (nios2_target::low_arch_setup): ...this.
1860 (the_low_target): Remove the op field.
1861 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1862 declaration.
1863 (ppc_arch_setup): Turn into ...
1864 (ppc_target::low_arch_setup): ...this.
1865 (the_low_target): Remove the op field.
1866 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1867 declaration.
1868 (riscv_arch_setup): Turn into ...
1869 (riscv_target::low_arch_setup): ...this.
1870 (the_low_target): Remove the op field.
1871 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1872 declaration.
1873 (s390_arch_setup): Turn into ...
1874 (s390_target::low_arch_setup): ...this.
1875 (the_low_target): Remove the op field.
1876 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1877 declaration.
1878 (sh_arch_setup): Turn into ...
1879 (sh_target::low_arch_setup): ...this.
1880 (the_low_target): Remove the op field.
1881 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1882 declaration.
1883 (sparc_arch_setup): Turn into ...
1884 (sparc_target::low_arch_setup): ...this.
1885 (the_low_target): Remove the op field.
1886 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1887 declaration.
1888 (tic6x_arch_setup): Turn into ...
1889 (tic6x_target::low_arch_setup): ...this.
1890 (the_low_target): Remove the op field.
1891 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1892 declaration.
1893 (tile_arch_setup): Turn into ...
1894 (tile_target::low_arch_setup): ...this.
1895 (the_low_target): Remove the op field.
1896 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1897 declaration.
1898 (xtensa_arch_setup): Turn into ...
1899 (xtensa_target::low_arch_setup): ...this.
1900 (the_low_target): Remove the op field.
1901
1902 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1903
1904 * linux-low.h (the_linux_target): New extern declaration.
1905 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1906 'the_target'.
1907 (the_linux_target): Remove.
1908 * linux-x86-low.cc (class x86_target): New class.
1909 (the_x86_target): New static object.
1910 (the_linux_target): Define as pointer to the_x86_target.
1911 * linux-aarch64-low.cc (class aarch64_target): New class.
1912 (the_aarch64_target): New static object.
1913 (the_linux_target): Define as pointer to the_aarch64_target.
1914 * linux-arm-low.cc (class arm_target): New class.
1915 (the_arm_target): New static object.
1916 (the_linux_target): Define as pointer to the_arm_target.
1917 * linux-bfin-low.cc (class bfin_target): New class.
1918 (the_bfin_target): New static object.
1919 (the_linux_target): Define as pointer to the_bfin_target.
1920 * linux-cris-low.cc (class cris_target): New class.
1921 (the_cris_target): New static object.
1922 (the_linux_target): Define as pointer to the_cris_target.
1923 * linux-crisv32-low.cc (class crisv32_target): New class.
1924 (the_crisv32_target): New static object.
1925 (the_linux_target): Define as pointer to the_crisv32_target.
1926 * linux-ia64-low.cc (class ia64_target): New class.
1927 (the_ia64_target): New static object.
1928 (the_linux_target): Define as pointer to the_ia64_target.
1929 * linux-m32r-low.cc (class m32r_target): New class.
1930 (the_m32r_target): New static object.
1931 (the_linux_target): Define as pointer to the_m32r_target.
1932 * linux-m68k-low.cc (class m68k_target): New class.
1933 (the_m68k_target): New static object.
1934 (the_linux_target): Define as pointer to the_m68k_target.
1935 * linux-mips-low.cc (class mips_target): New class.
1936 (the_mips_target): New static object.
1937 (the_linux_target): Define as pointer to the_mips_target.
1938 * linux-nios2-low.cc (class nios2_target): New class.
1939 (the_nios2_target): New static object.
1940 (the_linux_target): Define as pointer to the_nios2_target.
1941 * linux-ppc-low.cc (class ppc_target): New class.
1942 (the_ppc_target): New static object.
1943 (the_linux_target): Define as pointer to the_ppc_target.
1944 * linux-riscv-low.cc (class riscv_target): New class.
1945 (the_riscv_target): New static object.
1946 (the_linux_target): Define as pointer to the_riscv_target.
1947 * linux-s390-low.cc (class s390_target): New class.
1948 (the_s390_target): New static object.
1949 (the_linux_target): Define as pointer to the_s390_target.
1950 * linux-sh-low.cc (class sh_target): New class.
1951 (the_sh_target): New static object.
1952 (the_linux_target): Define as pointer to the_sh_target.
1953 * linux-sparc-low.cc (class sparc_target): New class.
1954 (the_sparc_target): New static object.
1955 (the_linux_target): Define as pointer to the_sparc_target.
1956 * linux-tic6x-low.cc (class tic6x_target): New class.
1957 (the_tic6x_target): New static object.
1958 (the_linux_target): Define as pointer to the_tic6x_target.
1959 * linux-tile-low.cc (class tile_target): New class.
1960 (the_tile_target): New static object.
1961 (the_linux_target): Define as pointer to the_tile_target.
1962 * linux-xtensa-low.cc (class xtensa_target): New class.
1963 (the_xtensa_target): New static object.
1964 (the_linux_target): Define as pointer to the_xtensa_target.
1965
1966 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1967
1968 Turn some static functions in linux-low.cc into private methods of
1969 linux_process_target.
1970
1971 * linux-low.cc (handle_extended_wait): Turn into ...
1972 (linux_process_target::handle_extended_wait): ...this. Call
1973 'mourn' on 'this' object instead of 'the_target'.
1974 (maybe_move_out_of_jump_pad): Turn into...
1975 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1976 (linux_low_filter_event): Turn into...
1977 (linux_process_target::filter_event): ...this.
1978 (linux_wait_for_event_filtered): Turn into...
1979 (linux_process_target::wait_for_event_filtered): ...this.
1980 (linux_wait_for_event): Turn into...
1981 (linux_process_target::wait_for_event): ...this.
1982 (linux_wait_1): Turn into...
1983 (linux_process_target::wait_1): ...this.
1984 (wait_for_sigstop): Turn into...
1985 (linux_process_target::wait_for_sigstop): ...this.
1986 (move_out_of_jump_pad_callback): Turn into...
1987 (linux_process_target::move_out_of_jump_pad): ...this.
1988 (stop_all_lwps): Turn into...
1989 (linux_process_target::stop_all_lwps): ...this.
1990 (start_step_over): Turn into...
1991 (linux_process_target::start_step_over): ...this.
1992 (complete_ongoing_step_over): Turn into...
1993 (linux_process_target::complete_ongoing_step_over): ...this.
1994 (proceed_all_lwps): Turn into...
1995 (linux_process_target::proceed_all_lwps): ...this.
1996 (unstop_all_lwps): Turn into...
1997 (linux_process_target::unstop_all_lwps): ...this.
1998
1999 * linux-low.h (class linux_process_target)
2000 <handle_extended_wait>
2001 <maybe_move_out_of_jump_pad>
2002 filter_event>
2003 <wait_for_event_filtered>
2004 <wait_for_event>
2005 <wait_1>
2006 <wait_for_sigstop>
2007 <move_out_of_jump_pad>
2008 <stop_all_lwps>
2009 <start_step_over>
2010 <complete_ongoing_step_over>
2011 <proceed_all_lwps>
2012 <unstop_all_lwps>: Declare.
2013
2014 Update the callers below.
2015
2016 * linux-low.cc (linux_process_target::attach): Update.
2017 (linux_process_target::stabilize_threads): Ditto.
2018 (linux_process_target::wait): Ditto.
2019
2020 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2021
2022 * linux-low.h (struct linux_target_ops): Update the comment for
2023 'cannot_store_register' to return 0 or 1.
2024 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2025 of 2.
2026
2027 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2028
2029 * config.in: Re-generate.
2030 * configure: Re-generate.
2031
2032 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2033
2034 * regcache.cc (find_register_by_number): Update.
2035 * tdesc.cc (init_target_desc): Likewise.
2036 * tdesc.h (target_desc::reg_defs): Likewise.
2037
2038 2020-03-12 Tom Tromey <tom@tromey.com>
2039
2040 * configure: Rebuild.
2041 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2042 (WIN32APILIBS): New subst.
2043 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2044 gdbsupport files.
2045 (gdbsupport/%.o): Remove target.
2046 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2047 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2048 (WIN32APILIBS): New variable.
2049 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2050 (gdbreplay$(EXEEXT)): Likewise.
2051
2052 2020-03-12 Tom Tromey <tom@tromey.com>
2053
2054 * config.in, configure: Rebuild.
2055 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2056 * acinclude.m4: Include gettext-sister.m4.
2057 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2058 variables.
2059 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2060 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2061
2062 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2063
2064 * acinclude.m4: Update path to selftest.m4.
2065
2066 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2067
2068 * configure.ac: Don't source bfd/development.sh, move
2069 GDB_AC_COMMON higher.
2070 * configure: Re-generate.
2071
2072 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2073
2074 * configure: Re-generate.
2075
2076 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2077
2078 * configure: Re-generate.
2079
2080 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2081
2082 * .dir-locals.el: New file.
2083
2084 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2085
2086 * .gitattributes: New file.
2087
2088 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2089
2090 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2091 reply into an S reply.
2092 * server.cc (disable_packet_T): New global.
2093 (captured_main): Set new global when appropriate.
2094 * server.h (disable_packet_T): Declare.
2095
2096 2020-02-21 Tom Tromey <tom@tromey.com>
2097
2098 * Makefile.in (mostlyclean): New target.
2099
2100 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2101
2102 * target.h (struct process_stratum_target): Remove.
2103 (class process_target): Rename to ...
2104 (class process_stratum_target): ... this.
2105 * linux-low.h (class linux_process_target): Derive from
2106 'process_stratum_target'.
2107 * linux-low.cc (linux_target_ops): Remove.
2108 (initialize_low): Set the_target to the singleton instance of
2109 linux_process_target.
2110 * lynx-low.h (class lynx_process_target): Derive from
2111 'process_stratum_target'.
2112 * lynx-low.cc (lynx_target_ops): Remove.
2113 (initialize_low): Set the_target to the singleton instance of
2114 lynx_process_target.
2115 * nto-low.h (class nto_process_target): Derive from
2116 'process_stratum_target'.
2117 * nto-low.cc (nto_target_ops): Remove.
2118 (initialize_low): Set the_target to the singleton instance of
2119 nto_process_target.
2120 * win32-low.h (class win32_process_target): Derive from
2121 'process_stratum_target'.
2122 * win32-low.cc (win32_target_ops): Remove.
2123 (initialize_low): Set the_target to the singleton instance of
2124 win32_process_target.
2125
2126 Replace 'the_target->pt' with 'the_target' in the uses below.
2127
2128 * hostio.cc (hostio_error)
2129 (handle_setfs)
2130 (handle_open)
2131 (handle_unlink)
2132 (handle_readlink)
2133 * linux-aarch32-low.cc (arm_breakpoint_at)
2134 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2135 * linux-arm-low.cc (arm_sigreturn_next_pc)
2136 (arm_get_hwcap)
2137 (arm_get_syscall_trapinfo)
2138 * linux-cris-low.cc (cris_breakpoint_at)
2139 * linux-crisv32-low.cc (cris_breakpoint_at)
2140 * linux-low.cc (handle_extended_wait)
2141 (linux_wait_1)
2142 (linux_read_memory)
2143 (linux_process_target::breakpoint_kind_from_pc)
2144 (linux_get_auxv)
2145 * linux-m32r-low.cc (m32r_breakpoint_at)
2146 * linux-mips-low.cc (mips_breakpoint_at)
2147 * linux-nios2-low.cc (nios2_breakpoint_at)
2148 * linux-ppc-low.cc (ppc_breakpoint_at)
2149 * linux-s390-low.cc (s390_get_hwcap)
2150 * linux-sh-low.cc (sh_breakpoint_at)
2151 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2152 (sparc_store_gregset_from_stack)
2153 (sparc_breakpoint_at)
2154 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2155 * linux-tile-low.cc (tile_breakpoint_at)
2156 * linux-x86-low.cc (x86_breakpoint_at)
2157 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2158 * mem-break.cc (bp_size)
2159 (bp_opcode)
2160 (insert_memory_breakpoint)
2161 (set_raw_breakpoint_at)
2162 (delete_raw_breakpoint)
2163 (z_type_supported)
2164 (uninsert_raw_breakpoint)
2165 (reinsert_raw_breakpoint)
2166 (validate_inserted_breakpoint)
2167 * regcache.cc (regcache_read_pc)
2168 (regcache_write_pc)
2169 * remote-utils.cc (putpkt_binary_1)
2170 (input_interrupt)
2171 (getpkt)
2172 (prepare_resume_reply)
2173 * server.cc (handle_general_set)
2174 (handle_detach)
2175 (handle_qxfer_auxv)
2176 (handle_qxfer_exec_file)
2177 (handle_qxfer_libraries_svr4)
2178 (handle_qxfer_osdata)
2179 (handle_qxfer_siginfo)
2180 (handle_qxfer_fdpic)
2181 (handle_query)
2182 (resume)
2183 (handle_v_requests)
2184 (queue_stop_reply_callback)
2185 (captured_main)
2186 * target.cc (prepare_to_access_memory)
2187 (done_accessing_memory)
2188 (read_inferior_memory)
2189 (target_write_memory)
2190 (target_stop_and_wait)
2191 (target_wait)
2192 (target_mourn_inferior)
2193 (target_continue_no_signal)
2194 (target_continue)
2195 (target_supports_multi_process)
2196 (kill_inferior)
2197 * target.h
2198 (target_create_inferior)
2199 (target_post_create_inferior)
2200 (myattach)
2201 (target_supports_fork_events)
2202 (target_supports_vfork_events)
2203 (target_supports_exec_events)
2204 (target_handle_new_gdb_connection)
2205 (detach_inferior)
2206 (mythread_alive)
2207 (fetch_inferior_registers)
2208 (store_inferior_registers)
2209 (join_inferior)
2210 (target_supports_non_stop)
2211 (target_async)
2212 (target_process_qsupported)
2213 (target_supports_catch_syscall)
2214 (target_get_ipa_tdesc_idx)
2215 (target_supports_tracepoints)
2216 (target_supports_fast_tracepoints)
2217 (target_get_min_fast_tracepoint_insn_len)
2218 (target_thread_stopped)
2219 (target_pause_all)
2220 (target_unpause_all)
2221 (target_stabilize_threads)
2222 (target_install_fast_tracepoint_jump_pad)
2223 (target_emit_ops)
2224 (target_supports_disable_randomization)
2225 (target_supports_agent)
2226 (target_enable_btrace)
2227 (target_disable_btrace)
2228 (target_read_btrace)
2229 (target_read_btrace_conf)
2230 (target_supports_range_stepping)
2231 (target_supports_stopped_by_sw_breakpoint)
2232 (target_stopped_by_sw_breakpoint)
2233 (target_supports_stopped_by_hw_breakpoint)
2234 (target_supports_hardware_single_step)
2235 (target_stopped_by_hw_breakpoint)
2236 (target_breakpoint_kind_from_pc)
2237 (target_breakpoint_kind_from_current_state)
2238 (target_supports_software_single_step)
2239 (target_core_of_thread)
2240 (target_thread_name)
2241 (target_thread_handle)
2242 * win32-low.cc (do_initial_child_stuff)
2243
2244 Rename target op default definitions listed below.
2245
2246 * target.cc (process_target::post_create_inferior): Rename as ...
2247 (process_stratum_target::post_create_inferior): ... this.
2248 (process_target::prepare_to_access_memory): Rename as ...
2249 (process_stratum_target::prepare_to_access_memory): ... this.
2250 (process_target::done_accessing_memory): Rename as ...
2251 (process_stratum_target::done_accessing_memory): ... this.
2252 (process_target::look_up_symbols): Rename as ...
2253 (process_stratum_target::look_up_symbols): ... this.
2254 (process_target::supports_read_auxv): Rename as ...
2255 (process_stratum_target::supports_read_auxv): ... this.
2256 (process_target::read_auxv): Rename as ...
2257 (process_stratum_target::read_auxv): ... this.
2258 (process_target::supports_z_point_type): Rename as ...
2259 (process_stratum_target::supports_z_point_type): ... this.
2260 (process_target::insert_point): Rename as ...
2261 (process_stratum_target::insert_point): ... this.
2262 (process_target::remove_point): Rename as ...
2263 (process_stratum_target::remove_point): ... this.
2264 (process_target::stopped_by_sw_breakpoint): Rename as ...
2265 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2266 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2267 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2268 (process_target::stopped_by_hw_breakpoint): Rename as ...
2269 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2270 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2271 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2272 (process_target::supports_hardware_single_step): Rename as ...
2273 (process_stratum_target::supports_hardware_single_step): ... this.
2274 (process_target::stopped_by_watchpoint): Rename as ...
2275 (process_stratum_target::stopped_by_watchpoint): ... this.
2276 (process_target::stopped_data_address): Rename as ...
2277 (process_stratum_target::stopped_data_address): ... this.
2278 (process_target::supports_read_offsets): Rename as ...
2279 (process_stratum_target::supports_read_offsets): ... this.
2280 (process_target::read_offsets): Rename as ...
2281 (process_stratum_target::read_offsets): ... this.
2282 (process_target::supports_get_tls_address): Rename as ...
2283 (process_stratum_target::supports_get_tls_address): ... this.
2284 (process_target::get_tls_address): Rename as ...
2285 (process_stratum_target::get_tls_address): ... this.
2286 (process_target::hostio_last_error): Rename as ...
2287 (process_stratum_target::hostio_last_error): ... this.
2288 (process_target::supports_qxfer_osdata): Rename as ...
2289 (process_stratum_target::supports_qxfer_osdata): ... this.
2290 (process_target::qxfer_osdata): Rename as ...
2291 (process_stratum_target::qxfer_osdata): ... this.
2292 (process_target::supports_qxfer_siginfo): Rename as ...
2293 (process_stratum_target::supports_qxfer_siginfo): ... this.
2294 (process_target::qxfer_siginfo): Rename as ...
2295 (process_stratum_target::qxfer_siginfo): ... this.
2296 (process_target::supports_non_stop): Rename as ...
2297 (process_stratum_target::supports_non_stop): ... this.
2298 (process_target::async): Rename as ...
2299 (process_stratum_target::async): ... this.
2300 (process_target::start_non_stop): Rename as ...
2301 (process_stratum_target::start_non_stop): ... this.
2302 (process_target::supports_multi_process): Rename as ...
2303 (process_stratum_target::supports_multi_process): ... this.
2304 (process_target::supports_fork_events): Rename as ...
2305 (process_stratum_target::supports_fork_events): ... this.
2306 (process_target::supports_vfork_events): Rename as ...
2307 (process_stratum_target::supports_vfork_events): ... this.
2308 (process_target::supports_exec_events): Rename as ...
2309 (process_stratum_target::supports_exec_events): ... this.
2310 (process_target::handle_new_gdb_connection): Rename as ...
2311 (process_stratum_target::handle_new_gdb_connection): ... this.
2312 (process_target::handle_monitor_command): Rename as ...
2313 (process_stratum_target::handle_monitor_command): ... this.
2314 (process_target::core_of_thread): Rename as ...
2315 (process_stratum_target::core_of_thread): ... this.
2316 (process_target::supports_read_loadmap): Rename as ...
2317 (process_stratum_target::supports_read_loadmap): ... this.
2318 (process_target::read_loadmap): Rename as ...
2319 (process_stratum_target::read_loadmap): ... this.
2320 (process_target::process_qsupported): Rename as ...
2321 (process_stratum_target::process_qsupported): ... this.
2322 (process_target::supports_tracepoints): Rename as ...
2323 (process_stratum_target::supports_tracepoints): ... this.
2324 (process_target::read_pc): Rename as ...
2325 (process_stratum_target::read_pc): ... this.
2326 (process_target::write_pc): Rename as ...
2327 (process_stratum_target::write_pc): ... this.
2328 (process_target::supports_thread_stopped): Rename as ...
2329 (process_stratum_target::supports_thread_stopped): ... this.
2330 (process_target::thread_stopped): Rename as ...
2331 (process_stratum_target::thread_stopped): ... this.
2332 (process_target::supports_get_tib_address): Rename as ...
2333 (process_stratum_target::supports_get_tib_address): ... this.
2334 (process_target::get_tib_address): Rename as ...
2335 (process_stratum_target::get_tib_address): ... this.
2336 (process_target::pause_all): Rename as ...
2337 (process_stratum_target::pause_all): ... this.
2338 (process_target::unpause_all): Rename as ...
2339 (process_stratum_target::unpause_all): ... this.
2340 (process_target::stabilize_threads): Rename as ...
2341 (process_stratum_target::stabilize_threads): ... this.
2342 (process_target::supports_fast_tracepoints): Rename as ...
2343 (process_stratum_target::supports_fast_tracepoints): ... this.
2344 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2345 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2346 (process_target::emit_ops): Rename as ...
2347 (process_stratum_target::emit_ops): ... this.
2348 (process_target::supports_disable_randomization): Rename as ...
2349 (process_stratum_target::supports_disable_randomization): ... this.
2350 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2351 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2352 (process_target::qxfer_libraries_svr4): Rename as ...
2353 (process_stratum_target::qxfer_libraries_svr4): ... this.
2354 (process_target::supports_agent): Rename as ...
2355 (process_stratum_target::supports_agent): ... this.
2356 (process_target::enable_btrace): Rename as ...
2357 (process_stratum_target::enable_btrace): ... this.
2358 (process_target::disable_btrace): Rename as ...
2359 (process_stratum_target::disable_btrace): ... this.
2360 (process_target::read_btrace): Rename as ...
2361 (process_stratum_target::read_btrace): ... this.
2362 (process_target::read_btrace_conf): Rename as ...
2363 (process_stratum_target::read_btrace_conf): ... this.
2364 (process_target::supports_range_stepping): Rename as ...
2365 (process_stratum_target::supports_range_stepping): ... this.
2366 (process_target::supports_pid_to_exec_file): Rename as ...
2367 (process_stratum_target::supports_pid_to_exec_file): ... this.
2368 (process_target::pid_to_exec_file): Rename as ...
2369 (process_stratum_target::pid_to_exec_file): ... this.
2370 (process_target::supports_multifs): Rename as ...
2371 (process_stratum_target::supports_multifs): ... this.
2372 (process_target::multifs_open): Rename as ...
2373 (process_stratum_target::multifs_open): ... this.
2374 (process_target::multifs_unlink): Rename as ...
2375 (process_stratum_target::multifs_unlink): ... this.
2376 (process_target::multifs_readlink): Rename as ...
2377 (process_stratum_target::multifs_readlink): ... this.
2378 (process_target::breakpoint_kind_from_pc): Rename as ...
2379 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2380 (process_target::breakpoint_kind_from_current_state): Rename as ...
2381 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2382 (process_target::thread_name): Rename as ...
2383 (process_stratum_target::thread_name): ... this.
2384 (process_target::thread_handle): Rename as ...
2385 (process_stratum_target::thread_handle): ... this.
2386 (process_target::supports_software_single_step): Rename as ...
2387 (process_stratum_target::supports_software_single_step): ... this.
2388 (process_target::supports_catch_syscall): Rename as ...
2389 (process_stratum_target::supports_catch_syscall): ... this.
2390 (process_target::get_ipa_tdesc_idx): Rename as ...
2391 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2392
2393 2020-02-20 Pedro Alves <palves@redhat.com>
2394
2395 * target.cc (set_target_ops): Simply copy the given target pointer
2396 instead of creating a copy of the pointed object.
2397
2398 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2399
2400 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2401 of process_target.
2402
2403 * target.h (struct process_stratum_target): Remove the target op.
2404 (class process_target): Add the target op.
2405 (target_get_ipa_tdesc_idx): Update the macro.
2406 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2407
2408 Update the derived classes and callers below.
2409
2410 * linux-low.cc (linux_target_ops): Update.
2411 (linux_get_ipa_tdesc_idx): Turn into ...
2412 (linux_process_target::get_ipa_tdesc_idx): ... this.
2413 * linux-low.h (class linux_process_target): Update.
2414 * lynx-low.cc (lynx_target_ops): Update.
2415 * nto-low.cc (nto_target_ops): Update.
2416 * win32-low.cc (win32_target_ops): Update.
2417
2418 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2419
2420 Turn process_stratum_target's supports_catch_syscall op into a
2421 method of process_target.
2422
2423 * target.h (struct process_stratum_target): Remove the target op.
2424 (class process_target): Add the target op.
2425 (target_supports_catch_syscall): Update the macro.
2426 * target.cc (process_target::supports_catch_syscall): Define.
2427
2428 Update the derived classes and callers below.
2429
2430 * linux-low.cc (linux_target_ops): Update.
2431 (linux_supports_catch_syscall): Turn into ...
2432 (linux_process_target::supports_catch_syscall): ... this.
2433 * linux-low.h (class linux_process_target): Update.
2434 * lynx-low.cc (lynx_target_ops): Update.
2435 * nto-low.cc (nto_target_ops): Update.
2436 * win32-low.cc (win32_target_ops): Update.
2437
2438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2439
2440 Turn process_stratum_target's supports_software_single_step op
2441 into a method of process_target.
2442
2443 * target.h (struct process_stratum_target): Remove the target op.
2444 (class process_target): Add the target op.
2445 (target_supports_software_single_step): Update the macro.
2446 * target.cc (process_target::supports_software_single_step): Define.
2447
2448 Update the derived classes and callers below.
2449
2450 * linux-low.cc (linux_target_ops): Update.
2451 (linux_supports_software_single_step): Turn into ...
2452 (linux_process_target::supports_software_single_step): ... this.
2453 * linux-low.h (class linux_process_target): Update.
2454 * lynx-low.cc (lynx_target_ops): Update.
2455 * nto-low.cc (nto_target_ops): Update.
2456 * win32-low.cc (win32_target_ops): Update.
2457
2458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2459
2460 Turn process_stratum_target's thread_name and thread_handle ops
2461 into methods of process_target.
2462
2463 * target.h (struct process_stratum_target): Remove the target ops.
2464 (class process_target): Add the target ops.
2465 (target_thread_name): Update the macro.
2466 (target_thread_handle): Update the macro.
2467 * target.cc (process_target::thread_name): Define.
2468 (process_target::thread_handle): Define.
2469
2470 Update the derived classes and callers below.
2471
2472 * linux-low.cc (linux_target_ops): Update.
2473 (linux_process_target::thread_name): Define.
2474 (linux_process_target::thread_handle): Define.
2475 * linux-low.h (class linux_process_target): Update.
2476 * lynx-low.cc (lynx_target_ops): Update.
2477 * nto-low.cc (nto_target_ops): Update.
2478 * win32-low.cc (win32_target_ops): Update.
2479
2480 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2481
2482 Turn process_stratum_target's breakpoint_kind_from_pc,
2483 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2484 ops into methods of process_target.
2485
2486 * target.h (struct process_stratum_target): Remove the target op.
2487 (class process_target): Add the target op.
2488 (target_breakpoint_kind_from_pc): Update the macro.
2489 (target_breakpoint_kind_from_current_state): Update the macro.
2490 (default_breakpoint_kind_from_pc): Remove declaration.
2491 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2492 (process_target::breakpoint_kind_from_pc): ... this.
2493 (process_target::breakpoint_kind_from_current_state): Define.
2494
2495 Update the derived classes and callers below.
2496
2497 * mem-break.cc (bp_size): Update.
2498 (bp_opcode): Update.
2499 * linux-low.cc (linux_target_ops): Update.
2500 (linux_wait_1): Update.
2501 (linux_breakpoint_kind_from_pc): Turn into ...
2502 (linux_process_target::breakpoint_kind_from_pc): ... this.
2503 (linux_sw_breakpoint_from_kind): Turn into ...
2504 (linux_process_target::sw_breakpoint_from_kind): ... this.
2505 (linux_breakpoint_kind_from_current_state): Turn into ...
2506 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2507 * linux-low.h (class linux_process_target): Update.
2508 * lynx-low.cc (lynx_target_ops): Update.
2509 (lynx_process_target::sw_breakpoint_from_kind): Define.
2510 * lynx-low.h (class lynx_process_target): Update.
2511 * nto-low.cc (nto_target_ops): Update.
2512 (nto_sw_breakpoint_from_kind): Turn into ...
2513 (nto_process_target::sw_breakpoint_from_kind): ... this.
2514 * nto-low.h (class nto_process_target): Update.
2515 * win32-low.cc (win32_target_ops): Update.
2516 (win32_sw_breakpoint_from_kind): Turn into ...
2517 (win32_process_target::sw_breakpoint_from_kind): ... this.
2518 * win32-low.h (class win32_process_target): Update.
2519
2520 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2521
2522 Turn process_stratum_target's multifs_open, multifs_readlink,
2523 multifs_unlink ops into methods of process_target.
2524
2525 * target.h (struct process_stratum_target): Remove the target ops.
2526 (class process_target): Add the target ops. Also add
2527 'supports_multifs'.
2528 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2529 "sys/stat.h".
2530 (process_target::supports_multifs): Define.
2531 (process_target::multifs_open): Define.
2532 (process_target::multifs_readlink): Define.
2533 (process_target::multifs_unlink): Define.
2534
2535 Update the derived classes and callers below.
2536
2537 * hostio.cc (handle_setfs): Update.
2538 (handle_open): Update.
2539 (handle_unlink): Update.
2540 (handle_readlink): Update.
2541 * linux-low.cc (linux_target_ops): Update.
2542 (linux_process_target::supports_multifs): Define.
2543 (linux_process_target::multifs_open): Define.
2544 (linux_process_target::multifs_readlink): Define.
2545 (linux_process_target::multifs_unlink): Define.
2546 * linux-low.h (class linux_process_target): Update.
2547 * lynx-low.cc (lynx_target_ops): Update.
2548 * nto-low.cc (nto_target_ops): Update.
2549 * win32-low.cc (win32_target_ops): Update.
2550
2551 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2552
2553 Turn process_stratum_target's pid_to_exec_file op into a method
2554 of process_target.
2555
2556 * target.h (struct process_stratum_target): Remove the target op.
2557 (class process_target): Add the target op. Also add
2558 'supports_pid_to_exec_file'.
2559 * target.cc (process_target::pid_to_exec_file): Define.
2560 (process_target::supports_pid_to_exec_file): Define.
2561
2562 Update the derived classes and callers below.
2563
2564 * server.cc (handle_qxfer_exec_file): Update.
2565 (handle_query): Update.
2566 * linux-low.cc (linux_target_ops): Update.
2567 (linux_process_target::supports_pid_to_exec_file): Define.
2568 (linux_process_target::pid_to_exec_file): Define.
2569 * linux-low.h (class linux_process_target): Update.
2570 * lynx-low.cc (lynx_target_ops): Update.
2571 * nto-low.cc (nto_target_ops): Update.
2572 * win32-low.cc (win32_target_ops): Update.
2573
2574 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2575
2576 Turn process_stratum_target's supports_range_stepping op into a
2577 method of process_target.
2578
2579 * target.h (struct process_stratum_target): Remove the target op.
2580 (class process_target): Add the target op.
2581 (target_supports_range_stepping): Update the macro.
2582 * target.cc (process_target::supports_range_stepping): Define.
2583
2584 Update the derived classes and callers below.
2585
2586 * linux-low.cc (linux_target_ops): Update.
2587 (linux_supports_range_stepping): Turn into ...
2588 (linux_process_target::supports_range_stepping): ... this.
2589 * linux-low.h (class linux_process_target): Update.
2590 * lynx-low.cc (lynx_target_ops): Update.
2591 * nto-low.cc (nto_target_ops): Update.
2592 * win32-low.cc (win32_target_ops): Update.
2593
2594 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2595
2596 Turn process_stratum_target's btrace-related ops (enable_btrace,
2597 disable_btrace, read_btrace, read_btrace_conf) into methods of
2598 process_target.
2599
2600 * target.h (struct process_stratum_target): Remove the target ops.
2601 (class process_target): Add the target ops.
2602 (target_enable_btrace): Update.
2603 (target_disable_btrace): Update.
2604 (target_read_btrace): Update.
2605 (target_read_btrace_conf): Update.
2606 * target.cc (process_target::enable_btrace): Define.
2607 (process_target::disable_btrace): Define.
2608 (process_target::read_btrace): Define.
2609 (process_target::read_btrace_conf): Define.
2610
2611 Update the derived classes and callers below.
2612
2613 * linux-low.cc (linux_target_ops): Update.
2614 (linux_process_target:enable_btrace): Define as a wrapper around
2615 linux_enable_btrace.
2616 (linux_low_disable_btrace): Turn into ...
2617 (linux_process_target::disable_btrace): ... this.
2618 (linux_low_read_btrace): Turn into ...
2619 (linux_process_target::read_btrace): ... this.
2620 (linux_low_btrace_conf): Turn into ...
2621 (linux_process_target::read_btrace_conf): ... this.
2622 * linux-low.h (class linux_process_target): Update.
2623 * lynx-low.cc (lynx_target_ops): Update.
2624 * nto-low.cc (nto_target_ops): Update.
2625 * win32-low.cc (win32_target_ops): Update.
2626
2627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2628
2629 Turn process_stratum_target's supports_agent op into a method of
2630 process_target.
2631
2632 * target.h (struct process_stratum_target): Remove the target op.
2633 (class process_target): Add the target op.
2634 (target_supports_agent): Update the macro.
2635 * target.cc (process_target::supports_agent): Define.
2636
2637 Update the derived classes and callers below.
2638
2639 * linux-low.cc (linux_target_ops): Update.
2640 (linux_supports_agent): Turn into ...
2641 (linux_process_target::supports_agent): ... this.
2642 * linux-low.h (class linux_process_target): Update.
2643 * lynx-low.cc (lynx_target_ops): Update.
2644 * nto-low.cc (nto_target_ops): Update.
2645 * win32-low.cc (win32_target_ops): Update.
2646
2647 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2648
2649 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2650 method of process_target.
2651
2652 * target.h (struct process_stratum_target): Remove the target op.
2653 (class process_target): Add the target op. Also add
2654 'supports_qxfer_libraries_svr4'.
2655 * target.cc (process_target::qxfer_libraries_svr4): Define.
2656 (process_target::supports_qxfer_libraries_svr4): Define.
2657
2658 Update the derived classes and callers below.
2659
2660 * server.cc (handle_qxfer_libraries_svr4): Update.
2661 (handle_query): Update.
2662 * linux-low.cc (linux_target_ops): Update.
2663 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2664 (linux_qxfer_libraries_svr4): Turn into ...
2665 (linux_process_target::qxfer_libraries_svr4): ... this.
2666 * linux-low.h (class linux_process_target): Update.
2667 * lynx-low.cc (lynx_target_ops): Update.
2668 * nto-low.cc (nto_target_ops): Update.
2669 * win32-low.cc (win32_target_ops): Update.
2670
2671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2672
2673 Turn process_stratum_target's supports_disable_randomization op
2674 into a method of process_target.
2675
2676 * target.h (struct process_stratum_target): Remove the target op.
2677 (class process_target): Add the target op.
2678 (target_supports_disable_randomization): Update the macro.
2679 * target.cc (process_target::supports_disable_randomization): Define.
2680
2681 Update the derived classes and callers below.
2682
2683 * linux-low.cc (linux_target_ops): Update.
2684 (linux_supports_disable_randomization): Turn into ...
2685 (linux_process_target::supports_disable_randomization): ... this.
2686 * linux-low.h (class linux_process_target): Update.
2687 * lynx-low.cc (lynx_target_ops): Update.
2688 * nto-low.cc (nto_target_ops): Update.
2689 * win32-low.cc (win32_target_ops): Update.
2690
2691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2692
2693 Turn process_stratum_target's emit_ops op into a method of
2694 process_target.
2695
2696 * target.h (struct process_stratum_target): Remove the target op.
2697 (class process_target): Add the target op.
2698 (target_emit_ops): Update the macro.
2699 * target.cc (process_target::emit_ops): Define.
2700
2701 Update the derived classes and callers below.
2702
2703 * linux-low.cc (linux_target_ops): Update.
2704 (linux_emit_ops): Turn into ...
2705 (linux_process_target::emit_ops): ... this.
2706 * linux-low.h (class linux_process_target): Update.
2707 * lynx-low.cc (lynx_target_ops): Update.
2708 * nto-low.cc (nto_target_ops): Update.
2709 * win32-low.cc (win32_target_ops): Update.
2710
2711 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2712
2713 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2714 and get_min_fast_tracepoint_insn_len ops into methods of
2715 process_target.
2716
2717 * target.h (struct process_stratum_target): Remove the target ops.
2718 (class process_target): Add the target ops. Also add
2719 'supports_fast_tracepoints'.
2720 (target_supports_fast_tracepoints): Update the macro.
2721 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2722 (install_fast_tracepoint_jump_pad): Update and rename the macro
2723 to ...
2724 (target_install_fast_tracepoint_jump_pad): ... this.
2725 * target.cc (process_target::supports_fast_tracepoints): Define.
2726 (process_target::install_fast_tracepoint_jump_pad): Define.
2727 (process_target::get_min_fast_tracepoint_insn_len): Define.
2728
2729 Update the derived classes and callers below.
2730
2731 * tracepoint.cc (install_fast_tracepoint): Update.
2732 * linux-low.cc (linux_target_ops): Update.
2733 (linux_process_target::supports_fast_tracepoints): Define.
2734 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2735 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2736 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2737 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2738 * linux-low.h (class linux_process_target): Update.
2739 * lynx-low.cc (lynx_target_ops): Update.
2740 * nto-low.cc (nto_target_ops): Update.
2741 * win32-low.cc (win32_target_ops): Update.
2742
2743 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2744
2745 Turn process_stratum_target's stabilize_threads op into a
2746 method of process_target.
2747
2748 * target.h (struct process_stratum_target): Remove the target op.
2749 (class process_target): Add the target op.
2750 (target_stabilize_threads): Update the macro.
2751 * target.cc (process_target::stabilize_threads): Define.
2752
2753 Update the derived classes and callers below.
2754
2755 * server.cc (handle_status): Update.
2756 * tracepoint.cc (cmd_qtdp): Update.
2757 (cmd_qtstart): Update.
2758 * linux-low.cc (linux_target_ops): Update.
2759 (linux_stabilize_threads): Turn into ...
2760 (linux_process_target::stabilize_threads): ... this.
2761 (linux_wait_1): Update.
2762 * linux-low.h (class linux_process_target): Update.
2763 * lynx-low.cc (lynx_target_ops): Update.
2764 * nto-low.cc (nto_target_ops): Update.
2765 * win32-low.cc (win32_target_ops): Update.
2766
2767 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2768
2769 Turn process_stratum_target's pause_all and unpause_all ops
2770 into methods of process_target.
2771
2772 * target.h (struct process_stratum_target): Remove the target ops.
2773 (class process_target): Add the target ops.
2774 (pause_all): Update the macro and rename to...
2775 (target_pause_all): ... this.
2776 (unpause_all): Update the macro and rename to...
2777 (target_unpause_all): ... this.
2778 * target.cc (process_target::pause_all): Define.
2779 (process_target::unpause_all): Define.
2780
2781 Update the derived classes and callers below.
2782
2783 * server.cc (handle_status): Update.
2784 * tracepoint.cc (clear_installed_tracepoints): Update.
2785 (cmd_qtdp): Update.
2786 (cmd_qtstart): Update.
2787 (stop_tracing): Update.
2788 (cmd_qtstatus): Update.
2789 (upload_fast_traceframes): Update.
2790 (run_inferior_command): Update.
2791 * linux-low.cc (linux_target_ops): Update.
2792 (linux_pause_all): Turn into ...
2793 (linux_process_target::pause_all): ... this.
2794 (linux_unpause_all): Turn into ...
2795 (linux_process_target::unpause_all): ... this.
2796 (linux_process_target::prepare_to_access_memory): Update.
2797 (linux_process_target::done_accessing_memory): Update.
2798 * linux-low.h (class linux_process_target): Update.
2799 * lynx-low.cc (lynx_target_ops): Update.
2800 * nto-low.cc (nto_target_ops): Update.
2801 * win32-low.cc (win32_target_ops): Update.
2802
2803 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2804
2805 Turn process_stratum_target's get_tib_address op into a method of
2806 process_target.
2807
2808 * target.h (struct process_stratum_target): Remove the target op.
2809 (class process_target): Add the target op. Also add
2810 'supports_get_tib_address'.
2811 * target.cc (process_target::get_tib_address): Define.
2812 (process_target::supports_get_tib_address): Define.
2813
2814 Update the derived classes and callers below.
2815
2816 * server.cc (handle_query): Update.
2817 * linux-low.cc (win32_target_ops): Update.
2818 * lynx-low.cc (lynx_target_ops): Update.
2819 * nto-low.cc (nto_target_ops): Update.
2820 * win32-low.cc (win32_target_ops): Update.
2821 (win32_process_target::supports_get_tib_address): Define.
2822 (win32_get_tib_address): Turn into ...
2823 (win32_process_target::get_tib_address): ... this.
2824 * win32-low.h (class win32_process_target): Update.
2825
2826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2827
2828 Turn process_stratum_target's thread_stopped op into a method of
2829 process_target.
2830
2831 * target.h (struct process_stratum_target): Remove the target op.
2832 (class process_target): Add the target op. Also add
2833 'supports_thread_stopped'.
2834 (target_thread_stopped): Update the macro.
2835 * target.cc (process_target::thread_stopped): Define.
2836 (process_target::supports_thread_stopped): Define.
2837 (prepare_to_access_memory): Update.
2838
2839 Update the derived classes and callers below.
2840
2841 * server.cc (queue_stop_reply_callback): Update.
2842 * linux-low.cc (linux_target_ops): Update.
2843 (linux_process_target::supports_thread_stopped): Define.
2844 (linux_thread_stopped): Turn into ...
2845 (linux_process_target::thread_stopped): ... this.
2846 * linux-low.h (class linux_process_target): Update.
2847 * lynx-low.cc (lynx_target_ops): Update.
2848 * nto-low.cc (nto_target_ops): Update.
2849 * win32-low.cc (win32_target_ops): Update.
2850
2851 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2852
2853 Turn process_stratum_target's read_pc and write_pc ops into
2854 methods of process_target.
2855
2856 * target.h (struct process_stratum_target): Remove the target ops.
2857 (class process_target): Add the target ops.
2858 * target.cc (process_target::read_pc): Define.
2859 (process_target::write_pc): Define.
2860
2861 Update the derived classes and callers below.
2862
2863 * regcache.cc (regcache_read_pc): Update.
2864 (regcache_write_pc): Update.
2865 * linux-low.cc (linux_target_ops): Update.
2866 (linux_read_pc): Turn into ...
2867 (linux_process_target::read_pc): ... this.
2868 (linux_write_pc): Turn into ...
2869 (linux_process_target::write_pc): ... this.
2870 * linux-low.h (class linux_process_target): Update.
2871 * lynx-low.cc (lynx_target_ops): Update.
2872 * nto-low.cc (nto_target_ops): Update.
2873 * win32-low.cc (win32_target_ops): Update.
2874
2875 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2876
2877 Turn process_stratum_target's supports_tracepoints op into a
2878 method of process_target.
2879
2880 * target.h (struct process_stratum_target): Remove the target op.
2881 (class process_target): Add the target op.
2882 (target_supports_tracepoints): Update the macro.
2883 * target.cc (process_target::supports_tracepoints): Define.
2884
2885 Update the derived classes and callers below.
2886
2887 * linux-low.cc (linux_target_ops): Update.
2888 (linux_supports_tracepoints): Turn into ...
2889 (linux_process_target::supports_tracepoints): ... this.
2890 * linux-low.h (class linux_process_target): Update.
2891 * lynx-low.cc (lynx_target_ops): Update.
2892 * nto-low.cc (nto_target_ops): Update.
2893 * win32-low.cc (win32_target_ops): Update.
2894
2895 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2896
2897 Turn process_stratum_target's process_qsupported op into a method
2898 of process_target.
2899
2900 * target.h (struct process_stratum_target): Remove the target op.
2901 (class process_target): Add the target op.
2902 (target_process_qsupported): Update the macro.
2903 * target.cc (process_target::process_qsupported): Define.
2904
2905 Update the derived classes and callers below.
2906
2907 * linux-low.cc (linux_target_ops): Update.
2908 (linux_process_qsupported): Turn into ...
2909 (linux_process_target::process_qsupported): ... this.
2910 * linux-low.h (class linux_process_target): Update.
2911 * lynx-low.cc (lynx_target_ops): Update.
2912 * nto-low.cc (nto_target_ops): Update.
2913 * win32-low.cc (win32_target_ops): Update.
2914
2915 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2916
2917 Turn process_stratum_target's read_loadmap op into a method of
2918 process_target.
2919
2920 * target.h (struct process_stratum_target): Remove the target op.
2921 (class process_target): Add the target op. Also add
2922 'supports_read_loadmap'.
2923 * target.cc (process_target::read_loadmap): Define.
2924 (process_target::supports_read_loadmap): Define.
2925
2926 Update the derived classes and callers below.
2927
2928 * server.cc (handle_qxfer_fdpic): Update.
2929 (handle_query): Update.
2930 * linux-low.cc (linux_target_ops): Update.
2931 (linux_process_target::supports_read_loadmap): Define.
2932 (linux_read_loadmap): Turn into ...
2933 (linux_process_target::read_loadmap): ... this.
2934 * linux-low.h (class linux_process_target): Update.
2935 * lynx-low.cc (lynx_target_ops): Update.
2936 * nto-low.cc (nto_target_ops): Update.
2937 * win32-low.cc (win32_target_ops): Update.
2938
2939 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2940
2941 Turn process_stratum_target's core_of_thread op into a method of
2942 process_target.
2943
2944 * target.h (struct process_stratum_target): Remove the target op.
2945 (class process_target): Add the target op.
2946 (target_core_of_thread): Update the macro.
2947 * target.cc (process_target::core_of_thread): Define.
2948
2949 Update the derived classes and callers below.
2950
2951 * linux-low.cc (linux_target_ops): Update.
2952 (linux_process_target::core_of_thread): Define.
2953 * linux-low.h (class linux_process_target): Update.
2954 * lynx-low.cc (lynx_target_ops): Update.
2955 * nto-low.cc (nto_target_ops): Update.
2956 * win32-low.cc (win32_target_ops): Update.
2957
2958 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2959
2960 Turn process_stratum_target's handle_monitor_command op into a
2961 method of process_target.
2962
2963 * target.h (struct process_stratum_target): Remove the target op.
2964 (class process_target): Add the target op.
2965 (target_handle_monitor_command): Update the macro.
2966 * target.cc (process_target::handle_monitor_command): Define.
2967
2968 Update the derived classes and callers below.
2969
2970 * server.cc (handle_query): Update.
2971 * linux-low.cc (linux_target_ops): Update.
2972 (linux_process_target::handle_monitor_command): Define.
2973 * linux-low.h (class linux_process_target): Update.
2974 * lynx-low.cc (lynx_target_ops): Update.
2975 * nto-low.cc (nto_target_ops): Update.
2976 * win32-low.cc (win32_target_ops): Update.
2977
2978 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2979
2980 Turn process_stratum_target's handle_new_gdb_connection op into a
2981 method of process_target.
2982
2983 * target.h (struct process_stratum_target): Remove the target op.
2984 (class process_target): Add the target op.
2985 (target_handle_new_gdb_connection): Update the macro.
2986 * target.cc (process_target::handle_new_gdb_connection): Define.
2987
2988 Update the derived classes and callers below.
2989
2990 * linux-low.cc (linux_target_ops): Update.
2991 (linux_handle_new_gdb_connection): Turn into ...
2992 (linux_process_target::handle_new_gdb_connection): ... this.
2993 * linux-low.h (class linux_process_target): Update.
2994 * lynx-low.cc (lynx_target_ops): Update.
2995 * nto-low.cc (nto_target_ops): Update.
2996 * win32-low.cc (win32_target_ops): Update.
2997
2998 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2999
3000 Turn process_stratum_target's supports_fork_events,
3001 supports_vfork_events, and supports_exec_events ops into methods
3002 of process_target.
3003
3004 * target.h (struct process_stratum_target): Remove the target ops.
3005 (class process_target): Add the target ops.
3006 (target_supports_fork_events): Update the macro.
3007 (target_supports_vfork_events): Update the macro.
3008 (target_supports_exec_events): Update the macro.
3009 * target.cc (process_target::supports_fork_events): Define.
3010 (process_target::supports_vfork_events): Define.
3011 (process_target::supports_exec_events): Define.
3012
3013 Update the derived classes and callers below.
3014
3015 * linux-low.cc (linux_target_ops): Update.
3016 (linux_supports_fork_events): Turn into ...
3017 (linux_process_target::supports_fork_events): ... this.
3018 (linux_supports_vfork_events): Turn into ...
3019 (linux_process_target::supports_vfork_events): ... this.
3020 (linux_supports_exec_events): Turn into ...
3021 (linux_process_target::supports_exec_events): ... this.
3022 * linux-low.h (class linux_process_target): Update.
3023 * lynx-low.cc (lynx_target_ops): Update.
3024 * nto-low.cc (nto_target_ops): Update.
3025 * win32-low.cc (win32_target_ops): Update.
3026
3027 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3028
3029 Turn process_stratum_target's supports_multi_process op into a
3030 method of process_target.
3031
3032 * target.h (struct process_stratum_target): Remove the target op.
3033 (class process_target): Add the target op.
3034 * target.cc (process_target::supports_multi_process): Define.
3035 (target_supports_multi_process): Update.
3036
3037 Update the derived classes and callers below.
3038
3039 * linux-low.cc (linux_target_ops): Update.
3040 (linux_supports_multi_process): Turn into ...
3041 (linux_process_target::supports_multi_process): ... this.
3042 * linux-low.h (class linux_process_target): Update.
3043 * lynx-low.cc (lynx_target_ops): Update.
3044 * nto-low.cc (nto_target_ops): Update.
3045 * win32-low.cc (win32_target_ops): Update.
3046
3047 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3048
3049 Turn process_stratum_target's supports_non_stop, async, and
3050 start_non_stop ops into methods of process_target.
3051
3052 * target.h (struct process_stratum_target): Remove the target ops.
3053 (class process_target): Add the target ops.
3054 (target_supports_non_stop): Update the macro.
3055 (target_async): Update the macro.
3056 (start_non_stop): Remove declaration.
3057 * target.cc (process_target::supports_non_stop): Define.
3058 (process_target::async): Define.
3059 (process_target::start_non_stop): Define.
3060 (start_non_stop): Remove.
3061
3062 Update the derived classes and callers below.
3063
3064 * server.cc (handle_qxfer_siginfo): Update.
3065 (handle_query): Update.
3066 * linux-low.cc (linux_target_ops): Update.
3067 (linux_supports_non_stop): Turn into ...
3068 (linux_process_target::supports_non_stop): ... this.
3069 (linux_async): Turn into ...
3070 (linux_process_target::async): ... this.
3071 (linux_start_non_stop): Turn into ...
3072 (linux_process_target::start_non_stop): ... this.
3073 * linux-low.h (class linux_process_target): Update.
3074 * lynx-low.cc (lynx_target_ops): Update.
3075 * nto-low.cc (nto_target_ops): Update.
3076 (nto_supports_non_stop): Remove; rely on the default behavior
3077 instead.
3078 * win32-low.cc (win32_target_ops): Update.
3079
3080 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3081
3082 Turn process_stratum_target's qxfer_siginfo op into a method of
3083 process_target.
3084
3085 * target.h (struct process_stratum_target): Remove the target op.
3086 (class process_target): Add the target op. Also add
3087 'supports_qxfer_siginfo'.
3088 * target.cc (process_target::qxfer_siginfo): Define.
3089 (process_target::supports_qxfer_siginfo): Define.
3090
3091 Update the derived classes and callers below.
3092
3093 * server.cc (handle_qxfer_siginfo): Update.
3094 (handle_query): Update.
3095 * linux-low.cc (linux_target_ops): Update.
3096 (linux_process_target::supports_qxfer_siginfo): Define.
3097 (linux_xfer_siginfo): Turn into ...
3098 (linux_process_target::qxfer_siginfo): ... this.
3099 * linux-low.h (class linux_process_target): Update.
3100 * lynx-low.cc (lynx_target_ops): Update.
3101 * nto-low.cc (nto_target_ops): Update.
3102 * win32-low.cc (win32_target_ops): Update.
3103
3104 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3105
3106 Turn process_stratum_target's qxfer_osdata op into a method of
3107 process_target.
3108
3109 * target.h (struct process_stratum_target): Remove the target op.
3110 (class process_target): Add the target op. Also add
3111 'supports_qxfer_osdata'.
3112 * target.cc (process_target::qxfer_osdata): Define.
3113 (process_target::supports_qxfer_osdata): Define.
3114
3115 Update the derived classes and callers below.
3116
3117 * server.cc (handle_qxfer_osdata): Update.
3118 (handle_query): Update.
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_process_target::supports_qxfer_osdata): Define.
3121 (linux_qxfer_osdata): Turn into ...
3122 (linux_process_target::qxfer_osdata): ... this.
3123 * linux-low.h (class linux_process_target): Update.
3124 * lynx-low.cc (lynx_target_ops): Update.
3125 * nto-low.cc (nto_target_ops): Update.
3126 * win32-low.cc (win32_target_ops): Update.
3127
3128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3129
3130 Turn process_stratum_target's hostio_last_error op into a
3131 method of process_target.
3132
3133 * target.h (struct process_stratum_target): Remove the target op.
3134 (class process_target): Add the target op.
3135 * target.cc: Add "hostio.h" to includes.
3136 (process_target::hostio_last_error): Define.
3137
3138 Update the derived classes and callers below.
3139
3140 * hostio.cc (hostio_error): Update.
3141 * linux-low.cc: Remove "hostio.h" from includes.
3142 (linux_target_ops): Update.
3143 * lynx-low.cc (lynx_target_ops): Update.
3144 * nto-low.cc (nto_target_ops): Update.
3145 * win32-low.h (class win32_process_target): Update.
3146 * win32-low.cc (win32_target_ops): Update.
3147 (wince_hostio_last_error): Turn into ...
3148 (win32_process_target::hostio_last_error): ... this.
3149
3150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3151
3152 Turn process_stratum_target's get_tls_address op into a method of
3153 process_target.
3154
3155 * target.h (struct process_stratum_target): Remove the target op.
3156 (class process_target): Add the target op. Also add
3157 'supports_get_tls_address'.
3158 * target.cc (process_target::get_tls_address): Define.
3159 (process_target::supports_get_tls_address): Define.
3160
3161 Update the derived classes and callers below.
3162
3163 * server.cc (handle_query): Update.
3164 * linux-low.cc (linux_target_ops): Update.
3165 (linux_process_target::supports_get_tls_address): Define.
3166 (linux_process_target::get_tls_address): Define.
3167 * linux-low.h (class linux_process_target): Update.
3168 * lynx-low.cc (lynx_target_ops): Update.
3169 * nto-low.cc (nto_target_ops): Update.
3170 * win32-low.cc (win32_target_ops): Update.
3171
3172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3173
3174 Turn process_stratum_target's read_offsets op into a method of
3175 process_target.
3176
3177 * target.h (struct process_stratum_target): Remove the target op.
3178 (class process_target): Add the target op. Also add
3179 'supports_read_offsets'.
3180 * target.cc (process_target::read_offsets): Define.
3181 (process_target::supports_read_offsets): Define.
3182
3183 Update the derived classes and callers below.
3184
3185 * server.cc (handle_query): Update.
3186 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3187 (linux_target_ops): Update.
3188 (linux_process_target::supports_read_offsets): Define.
3189 (linux_read_offsets): Turn into ...
3190 (linux_process_target::read_offsets): ... this.
3191 * linux-low.h (class linux_process_target): Update.
3192 * lynx-low.cc (lynx_target_ops): Update.
3193 * nto-low.cc (nto_target_ops): Update.
3194 * win32-low.cc (win32_target_ops): Update.
3195
3196 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3197
3198 Turn process_stratum_target's stopped_by_watchpoint and
3199 stopped_data_address ops into methods of process_target.
3200
3201 * target.h (struct process_stratum_target): Remove the target ops.
3202 (class process_target): Add the target ops.
3203 * target.cc (process_target::stopped_by_watchpoint): Define.
3204 (process_target::stopped_data_address): Define.
3205
3206 Update the derived classes and callers below.
3207
3208 * remote-utils.cc (prepare_resume_reply): Update.
3209 * linux-low.cc (linux_target_ops): Update.
3210 (linux_stopped_by_watchpoint): Turn into ...
3211 (linux_process_target::stopped_by_watchpoint): ... this.
3212 (linux_stopped_data_address): Turn into ...
3213 (linux_process_target::stopped_data_address): ... this.
3214 * linux-low.h (class linux_process_target): Update.
3215 * lynx-low.cc (lynx_target_ops): Update.
3216 * nto-low.cc (nto_target_ops): Update.
3217 (nto_stopped_by_watchpoint): Turn into ...
3218 (nto_process_target::stopped_by_watchpoint): ... this.
3219 (nto_stopped_data_address): Turn into ...
3220 (nto_process_target::stopped_data_address): ... this.
3221 * nto-low.h (class nto_process_target): Update.
3222 * win32-low.cc (win32_target_ops): Update.
3223 (win32_stopped_by_watchpoint): Turn into ...
3224 (win32_process_target::stopped_by_watchpoint): ... this.
3225 (win32_stopped_data_address): Turn into ...
3226 (win32_process_target::stopped_data_address): ... this.
3227 * win32-low.h (class win32_process_target): Update.
3228
3229 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3230
3231 Turn process_stratum_target's supports_hardware_single_step op into
3232 a method of process_target.
3233
3234 * target.h (struct process_stratum_target): Remove the target op.
3235 (class process_target): Add the target op.
3236 (target_supports_hardware_single_step): Update the macro.
3237 (target_can_do_hardware_single_step): Remove declaration.
3238 * target.cc (process_target::supports_hardware_single_step): Define.
3239 (target_can_do_hardware_single_step): Remove.
3240
3241 Update the derived classes and callers below.
3242
3243 * linux-low.h (class linux_process_target): Update.
3244 * linux-low.cc (linux_target_ops): Update.
3245 (linux_supports_hardware_single_step): Turn into ...
3246 (linux_process_target::supports_hardware_single_step): ... this.
3247 * lynx-low.h (class lynx_process_target): Update.
3248 * lynx-low.cc (lynx_target_ops): Update.
3249 (lynx_process_target::supports_hardware_single_step): Define.
3250 * nto-low.h (class nto_process_target): Update.
3251 * nto-low.cc (nto_target_ops): Update.
3252 (nto_process_target::supports_hardware_single_step): Define.
3253 * win32-low.h (class win32_process_target): Update.
3254 * win32-low.cc (win32_target_ops): Update.
3255 (win32_process_target::supports_hardware_single_step): Define.
3256
3257 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3258
3259 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3260 ops into methods of process_target.
3261
3262 * target.h (struct process_stratum_target): Remove the target ops.
3263 (class process_target): Add the target ops.
3264 (target_stopped_by_hw_breakpoint): Update the macro.
3265 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3266 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3267 (process_target::supports_stopped_by_hw_breakpoint): Define.
3268
3269 Update the derived classes and callers below.
3270
3271 * linux-low.cc (linux_target_ops): Update.
3272 (linux_stopped_by_hw_breakpoint): Turn into ...
3273 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3274 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3275 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3276 * linux-low.h (class linux_process_target): Update.
3277 * lynx-low.cc (lynx_target_ops): Update.
3278 * nto-low.cc (nto_target_ops): Update.
3279 * win32-low.cc (win32_target_ops): Update.
3280
3281 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3282
3283 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3284 ops into methods of process_target.
3285
3286 * target.h (struct process_stratum_target): Remove the target ops.
3287 (class process_target): Add the target ops.
3288 (target_stopped_by_sw_breakpoint): Update the macro.
3289 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3290 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3291 (process_target::supports_stopped_by_sw_breakpoint): Define.
3292
3293 Update the derived classes and callers below.
3294
3295 * linux-low.cc (linux_target_ops): Update.
3296 (linux_stopped_by_sw_breakpoint): Turn into ...
3297 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3298 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3299 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3300 * linux-low.h (class linux_process_target): Update.
3301 * lynx-low.cc (lynx_target_ops): Update.
3302 * nto-low.cc (nto_target_ops): Update.
3303 * win32-low.cc (win32_target_ops): Update.
3304
3305 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3306
3307 Turn process_stratum_target's insert_point and remove_point ops
3308 into methods of process_target.
3309
3310 * target.h (struct process_stratum_target): Remove the target ops.
3311 (class process_target): Add the target ops.
3312 * target.cc (process_target::insert_point): Define.
3313 (process_target::remove_point): Define.
3314
3315 Update the derived classes and callers below.
3316
3317 * mem-break.cc (set_raw_breakpoint_at): Update.
3318 (delete_raw_breakpoint): Update.
3319 (uninsert_raw_breakpoint): Update.
3320 (reinsert_raw_breakpoint): Update.
3321 * linux-low.cc (linux_target_ops): Update.
3322 (linux_insert_point): Turn into ...
3323 (linux_process_target::insert_point): ... this.
3324 (linux_remove_point): Turn into ...
3325 (linux_process_target::remove_point): ... this.
3326 * linux-low.h (class linux_process_target): Update.
3327 * lynx-low.cc (lynx_target_ops): Update.
3328 * nto-low.cc (nto_target_ops): Update.
3329 (nto_insert_point): Turn into ...
3330 (nto_process_target::insert_point): ... this.
3331 (nto_remove_point): Turn into ...
3332 (nto_process_target::remove_point): ... this.
3333 * nto-low.h (class nto_process_target): Update.
3334 * win32-low.cc (win32_target_ops): Update.
3335 (win32_insert_point): Turn into ...
3336 (win32_process_target::insert_point): ... this.
3337 (win32_remove_point): Turn into ...
3338 (win32_process_target::remove_point): ... this.
3339 * win32-low.h (class win32_process_target): Update.
3340
3341 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3342
3343 Turn process_stratum_target's supports_z_point_type op into a
3344 method of process_target.
3345
3346 * target.h (struct process_stratum_target): Remove the target op.
3347 (class process_target): Add the target op.
3348 * target.cc (process_target::supports_z_point_type): Define.
3349
3350 Update the derived classes and callers below.
3351
3352 * mem-break.cc (z_type_supported): Update.
3353 * linux-low.cc (linux_target_ops): Update.
3354 (linux_supports_z_point_type): Turn into ...
3355 (linux_process_target::supports_z_point_type): ... this.
3356 * linux-low.h (class linux_process_target): Update.
3357 * lynx-low.cc (lynx_target_ops): Update.
3358 * nto-low.cc (nto_target_ops): Update.
3359 (nto_supports_z_point_type): Turn into ...
3360 (nto_process_target::supports_z_point_type): ... this.
3361 * nto-low.h (class nto_process_target): Update.
3362 * win32-low.cc (win32_target_ops): Update.
3363 (win32_supports_z_point_type): Turn into ...
3364 (win32_process_target::supports_z_point_type): ... this.
3365 * win32-low.h (class win32_process_target): Update.
3366
3367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3368
3369 Turn process_stratum_target's read_auxv op into a method of
3370 process_target.
3371
3372 * target.h (class process_stratum_target): Remove the target op.
3373 (struct process_target): Add the target op. Also add
3374 'supports_read_auxv'.
3375 * target.cc (process_target::read_auxv): Define.
3376 (process_target::supports_read_auxv): Define.
3377
3378 Update the derived classes and callers below.
3379
3380 * server.cc (handle_qxfer_auxv): Update.
3381 (handle_query): Update.
3382 * linux-low.cc (linux_target_ops): Update.
3383 (linux_process_target::supports_read_auxv): Define.
3384 (linux_read_auxv): Turn into ...
3385 (linux_process_target::read_auxv): ... this.
3386 * linux-low.h (class linux_process_target): Update.
3387 * lynx-low.cc (lynx_target_ops): Update.
3388 * nto-low.cc (nto_target_ops): Update.
3389 (nto_process_target::supports_read_auxv): Define.
3390 (nto_read_auxv): Turn into ...
3391 (nto_process_target::read_auxv): ... this.
3392 * nto-low.h (class nto_process_target): Update.
3393 * win32-low.cc (win32_target_ops): Update.
3394
3395 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3396
3397 Turn process_stratum_target's request_interrupt op into a method of
3398 process_target.
3399
3400 * target.h (struct process_stratum_target): Remove the target op.
3401 (class process_target): Add the target op.
3402
3403 Update the derived classes and callers below.
3404
3405 * remote-utils.cc (putpkt_binary_1): Update.
3406 (input_interrupt): Update.
3407 (getpkt): Update.
3408 * server.cc (handle_v_requests): Update.
3409 * linux-low.cc (linux_target_ops): Update.
3410 (linux_request_interrupt): Turn into ...
3411 (linux_process_target::request_interrupt): ... this.
3412 * linux-low.h (class linux_process_target): Update.
3413 * lynx-low.cc (lynx_target_ops): Update.
3414 (lynx_request_interrupt): Turn into ...
3415 (lynx_process_target::request_interrupt): ... this.
3416 * lynx-low.h (class lynx_process_target): Update.
3417 * nto-low.cc (nto_target_ops): Update.
3418 (nto_request_interrupt): Turn into ...
3419 (nto_process_target::request_interrupt): ... this.
3420 * nto-low.h (class nto_process_target): Update.
3421 * win32-low.cc (win32_target_ops): Update.
3422 (win32_request_interrupt): Turn into ...
3423 (win32_process_target::request_interrupt): ... this.
3424 * win32-low.h (class win32_process_target): Update.
3425
3426 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3427
3428 Turn process_stratum_target's look_up_symbols op into a method of
3429 process_target.
3430
3431 * target.h (struct process_stratum_target): Remove the target op.
3432 (class process_target): Add the target op.
3433 * target.cc (process_target::look_up_symbols): Define.
3434
3435 Update the derived classes and callers below.
3436
3437 * server.cc (handle_query): Update.
3438 * linux-low.cc (linux_target_ops): Update.
3439 (linux_look_up_symbols): Turn into ...
3440 (linux_process_target::look_up_symbols): ... this.
3441 * linux-low.h (class linux_process_target): Update.
3442 * lynx-low.cc (lynx_target_ops): Update.
3443 * nto-low.cc (nto_target_ops): Update.
3444 * win32-low.cc (win32_target_ops): Update.
3445
3446 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3447
3448 Turn process_stratum_target's read_memory and write_memory
3449 ops into methods of process_target.
3450
3451 * target.h (struct process_stratum_target): Remove the target ops.
3452 (class process_target): Add the target ops.
3453
3454 Update the derived classes and callers below.
3455
3456 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3457 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3458 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3459 (arm_get_syscall_trapinfo): Update.
3460 * linux-cris-low.cc (cris_breakpoint_at): Update.
3461 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3462 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3463 * linux-mips-low.cc (mips_breakpoint_at): Update.
3464 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3465 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3466 * linux-sh-low.cc (sh_breakpoint_at): Update.
3467 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3468 (sparc_store_gregset_from_stack): Update.
3469 (sparc_breakpoint_at): Update.
3470 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3471 * linux-tile-low.cc (tile_breakpoint_at): Update.
3472 * linux-x86-low.cc (x86_breakpoint_at): Update.
3473 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3474 * mem-brea.cc (insert_memory_breakpoint): Update.
3475 (validate_inserted_breakpoint): Update.
3476 * target.cc (read_inferior_memory): Update.
3477 (target_write_memory): Update.
3478 * linux-low.cc (linux_target_ops): Update.
3479 (linux_read_memory): Make a wrapper around the read_memory target
3480 op call.
3481 (linux_process_target::read_memory): Rename from linux_read_memory.
3482 (linux_write_memory): Turn into ...
3483 (linux_process_target::write_memory): ... this.
3484 * linux-low.h (class linux_process_target): Update.
3485 * lynx-low.cc (lynx_target_ops): Update.
3486 (lynx_read_memory): Turn into ...
3487 (lynx_process_target::read_memory): ... this.
3488 (lynx_write_memory): Turn into ...
3489 (lynx_process_target::write_memory): ... this.
3490 * lynx-low.h (class lynx_process_target): Update.
3491 * nto-low.cc (nto_target_ops): Update.
3492 (nto_read_memory): Turn into ...
3493 (nto_process_target::read_memory): ... this.
3494 (nto_write_memory): Turn into ...
3495 (nto_process_target::write_memory): ... this.
3496 * nto-low.h (class nto_process_target): Update.
3497 * win32-low.cc (win32_target_ops): Update.
3498 (win32_read_inferior_memory): Turn into ...
3499 (win32_process_target::read_memory): ... this.
3500 (win32_write_inferior_memory): Turn into ...
3501 (win32_process_target::write_memory): ... this.
3502 * win32-low.h (class win32_process_target): Update.
3503
3504 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3505
3506 Turn process_stratum_target's prepare_to_access_memory and
3507 done_accessing_memory ops into methods of process_target.
3508
3509 * target.h (struct process_stratum_target): Remove the target ops.
3510 (class process_target): Add the target ops.
3511 * target.cc (process_target::prepare_to_access_memory): Define.
3512 (process_target::done_accessing_memory): Define.
3513 (prepare_to_access_memory): Update.
3514 (done_accessing_memory): Update.
3515
3516 Update the derived classes and callers below.
3517
3518 * linux-low.cc (linux_target_ops): Update.
3519 (linux_prepare_to_access_memory): Turn into ...
3520 (linux_process_target::prepare_to_access_memory): ... this.
3521 (linux_done_accessing_memory): Turn into ...
3522 (linux_process_target::done_accessing_memory): ... this.
3523 * linux-low.h (class linux_process_target): Update.
3524 * lynx-low.cc (lynx_target_ops): Update.
3525 * nto-low.cc (nto_target_ops): Update.
3526 * win32-low.cc (win32_target_ops): Update.
3527
3528 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3529
3530 Turn process_stratum_target's fetch_registers and store_registers
3531 ops into methods of process_target.
3532
3533 * target.h (struct process_stratum_target): Remove the target ops.
3534 (class process_target): Add the target ops.
3535 (fetch_inferior_registers): Update the macro.
3536 (store_inferior_registers): Update the macro.
3537
3538 Update the derived classes and callers below.
3539
3540 * linux-low.cc (linux_target_ops): Update.
3541 (linux_fetch_registers): Turn into ...
3542 (linux_process_target::fetch_registers): ... this.
3543 (linux_store_registers): Turn into ...
3544 (linux_process_target::store_registers): ... this.
3545 * linux-low.h (class linux_process_target): Update.
3546 * lynx-low.cc (lynx_target_ops): Update.
3547 (lynx_fetch_registers): Turn into ...
3548 (lynx_process_target::fetch_registers): ... this.
3549 (lynx_store_registers): Turn into ...
3550 (lynx_process_target::store_registers): ... this.
3551 * lynx-low.h (class lynx_process_target): Update.
3552 * nto-low.cc (nto_target_ops): Update.
3553 (nto_fetch_registers): Turn into ...
3554 (nto_process_target::fetch_registers): ... this.
3555 (nto_store_registers): Turn into ...
3556 (nto_process_target::store_registers): ... this.
3557 * nto-low.h (class nto_process_target): Update.
3558 * win32-low.cc (win32_target_ops): Update.
3559 (win32_fetch_inferior_registers): Turn into ...
3560 (win32_process_target::fetch_registers): ... this.
3561 (win32_store_inferior_registers): Turn into ...
3562 (win32_process_target::store_registers): ... this.
3563 * win32-low.h (class win32_process_target): Update.
3564
3565 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3566
3567 Turn process_stratum_target's wait op into a method of
3568 process_target.
3569
3570 * target.h (struct process_stratum_target): Remove the target op.
3571 (class process_target): Add the target op.
3572
3573 Update the derived classes and callers below.
3574
3575 * target.cc (target_wait): Update.
3576 * linux-low.cc (linux_target_ops): Update.
3577 (linux_wait): Turn into ...
3578 (linux_process_target::wait): ... this.
3579 * linux-low.h (class linux_process_target): Update.
3580 * lynx-low.cc (lynx_target_ops): Update.
3581 (lynx_wait): Turn into ...
3582 (lynx_process_target::wait): ... this.
3583 * lynx-low.h (class lynx_process_target): Update.
3584 * nto-low.cc (nto_target_ops): Update.
3585 (nto_wait): Turn into ...
3586 (nto_process_target::wait): ... this.
3587 * nto-low.h (class nto_process_target): Update.
3588 * win32-low.cc (win32_target_ops): Update.
3589 (win32_wait): Turn into ...
3590 (win32_process_target::wait): ... this.
3591 (do_initial_child_stuff): Update.
3592 * win32-low.h (class win32_process_target): Update.
3593
3594 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3595
3596 Turn process_stratum_target's resume op into a method of
3597 process_target.
3598
3599 * target.h (struct process_stratum_target): Remove the target op.
3600 (class process_target): Add the target op.
3601
3602 Update the derived classes and callers below.
3603
3604 * server.cc (resume): Update.
3605 * target.cc (target_stop_and_wait): Update.
3606 (target_continue_no_signal): Update.
3607 (target_continue): Update.
3608 * linux-low.cc (linux_target_ops): Update.
3609 (linux_resume): Turn into ...
3610 (linux_process_target::resume): ... this.
3611 * linux-low.h (class linux_process_target): Update.
3612 * lynx-low.cc (lynx_target_ops): Update.
3613 (lynx_resume): Turn into ...
3614 (lynx_process_target::resume): ... this.
3615 * lynx-low.h (class lynx_process_target): Update.
3616 * nto-low.cc (nto_target_ops): Update.
3617 (nto_resume): Turn into ...
3618 (nto_process_target::resume): ... this.
3619 * nto-low.h (class nto_process_target): Update.
3620 * win32-low.cc (win32_target_ops): Update.
3621 (win32_resume): Turn into ...
3622 (win32_process_target::resume): ... this.
3623 (win32_process_target::detach): Update.
3624 (do_initial_child_stuff): Update.
3625 * win32-low.h (class win32_process_target): Update.
3626
3627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3628
3629 Turn process_stratum_target's thread_alive op into a method of
3630 process_target.
3631
3632 * target.h (struct process_stratum_target): Remove the target op.
3633 (class process_target): Add the target op.
3634 (mythread_alive): Update the macro.
3635
3636 Update the derived classes and callers below.
3637
3638 * linux-low.cc (linux_target_ops): Update.
3639 (linux_thread_alive): Turn into ...
3640 (linux_process_target::thread_alive): ... this.
3641 (wait_for_sigstop): Update.
3642 * linux-low.h (class linux_process_target): Update.
3643 * lynx-low.cc (lynx_target_ops): Update.
3644 (lynx_thread_alive): Turn into ...
3645 (lynx_process_target::thread_alive): ... this.
3646 * lynx-low.h (class lynx_process_target): Update.
3647 * nto-low.cc (nto_target_ops): Update.
3648 (nto_thread_alive): Turn into ...
3649 (nto_process_target::thread_alive): ... this.
3650 * nto-low.h (class nto_process_target): Update.
3651 * win32-low.cc (win32_target_ops): Update.
3652 (win32_thread_alive): Turn into ...
3653 (win32_process_target::thread_alive): ... this.
3654 * win32-low.h (class win32_process_target): Update.
3655
3656 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3657
3658 Turn process_stratum_target's join op into a method of
3659 process_target.
3660
3661 * target.h (struct process_stratum_target): Remove the target op.
3662 (class process_target): Add the target op.
3663 (join_inferior): Update the macro.
3664
3665 Update the derived classes and callers below.
3666
3667 * linux-low.cc (linux_target_ops): Update.
3668 (linux_join): Turn into ...
3669 (linux_process_target::join): ... this.
3670 * linux-low.h (class linux_process_target): Update.
3671 * lynx-low.cc (lynx_target_ops): Update.
3672 (lynx_join): Turn into ...
3673 (lynx_process_target::join): ... this.
3674 * lynx-low.h (class lynx_process_target): Update.
3675 * nto-low.cc (nto_target_ops): Update.
3676 (nto_process_target::join): Define.
3677 * nto-low.h (class nto_process_target): Update.
3678 * win32-low.cc (win32_target_ops): Update.
3679 (win32_join): Turn into ...
3680 (win32_process_target::join): ... this.
3681 * win32-low.h (class win32_process_target): Update.
3682
3683 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3684
3685 Turn process_stratum_target's mourn op into a method of
3686 process_target.
3687
3688 * target.h (struct process_stratum_target): Remove the target op.
3689 (class process_target): Add the target op.
3690
3691 Update the derived classes and callers below.
3692
3693 * target.cc (target_mourn_inferior): Update.
3694 * linux-low.cc (linux_target_ops): Update.
3695 (linux_mourn): Turn into ...
3696 (linux_process_target::mourn): ... this.
3697 (handle_extended_wait): Update.
3698 (linux_process_target::kill): Update.
3699 (linux_process_target::detach): Update.
3700 * linux-low.h (class linux_process_target): Update.
3701 * lynx-low.cc (lynx_target_ops): Update.
3702 (lynx_mourn): Turn into ...
3703 (lynx_process_target::mourn): ... this.
3704 * lynx-low.h (class lynx_process_target): Update.
3705 * nto-low.cc (nto_target_ops): Update.
3706 (nto_mourn): Turn into ...
3707 (nto_process_target::mourn): ... this.
3708 * nto-low.h (class nto_process_target): Update.
3709 * win32-low.cc (win32_target_ops): Update.
3710 (win32_mourn): Turn into ...
3711 (win32_process_target::mourn): ... this.
3712 * win32-low.h (class win32_process_target): Update.
3713
3714 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3715
3716 Turn process_stratum_target's detach op into a method of
3717 process_target.
3718
3719 * target.h (struct process_stratum_target): Remove the target op.
3720 (class process_target): Add the target op.
3721 (detach_inferior): Update the macro.
3722
3723 Update the derived classes and callers below.
3724
3725 * linux-low.cc (linux_target_ops): Update.
3726 (linux_detach): Turn into ...
3727 (linux_process_target::detach): ... this.
3728 * linux-low.h (class linux_process_target): Update.
3729 * lynx-low.cc (lynx_target_ops): Update.
3730 (lynx_detach): Turn into ...
3731 (lynx_process_target::detach): ... this.
3732 * lynx-low.h (class lynx_process_target): Update.
3733 * nto-low.cc (nto_target_ops): Update.
3734 (nto_detach): Turn into ...
3735 (nto_process_target::detach): ... this.
3736 * nto-low.h (class nto_process_target): Update.
3737 * win32-low.cc (win32_target_ops): Update.
3738 (win32_detach): Turn into ...
3739 (win32_process_target::detach): ... this.
3740 * win32-low.h (class win32_process_target): Update.
3741
3742 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3743
3744 Turn process_stratum_target's kill op into a method of
3745 process_target.
3746
3747 * target.h (struct process_stratum_target): Remove the target op.
3748 (class process_target): Add the target op.
3749
3750 Update the derived classes and callers below.
3751
3752 * target.cc (kill_inferior): Update.
3753 * linux-low.cc (linux_target_ops): Update.
3754 (linux_kill): Turn into ...
3755 (linux_process_target::kill): ... this.
3756 * linux-low.h (class linux_process_target): Update.
3757 * lynx-low.cc (lynx_target_ops): Update.
3758 (lynx_kill): Turn into ...
3759 (lynx_process_target::kill): ... this.
3760 * lynx-low.h (class lynx_process_target): Update.
3761 * nto-low.cc (nto_target_ops): Update.
3762 (nto_kill): Turn into ...
3763 (nto_process_target::kill): ... this.
3764 * nto-low.h (class nto_process_target): Update.
3765 * win32-low.cc (win32_target_ops): Update.
3766 (win32_kill): Turn into ...
3767 (win32_process_target::kill): ... this.
3768 * win32-low.h (class win32_process_target): Update.
3769
3770 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3771
3772 Turn process_stratum_target's attach op into a method of
3773 process_target.
3774
3775 * target.h (struct process_stratum_target): Remove the target op.
3776 (class process_target): Add the target op.
3777 (myattach): Update the macro.
3778
3779 Update the derived classes and callers below.
3780
3781 * linux-low.cc (linux_target_ops): Update.
3782 (linux_attach): Turn into ...
3783 (linux_process_target::attach): ... this.
3784 * linux-low.h (class linux_process_target): Update.
3785 * lynx-low.cc (lynx_target_ops): Update.
3786 (lynx_attach): Turn into ...
3787 (lynx_process_target::attach): ... this.
3788 * lynx-low.h (class lynx_process_target): Update.
3789 * nto-low.cc (nto_target_ops): Update.
3790 (nto_attach): Turn into ...
3791 (nto_process_target::attach): ... this.
3792 * nto-low.h (class nto_process_target): Update.
3793 * win32-low.cc (win32_target_ops): Update.
3794 (win32_attach): Turn into ...
3795 (win32_process_target::attach): ... this.
3796 * win32-low.h (class win32_process_target): Update.
3797
3798 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3799
3800 Turn process_stratum_target's post_create_inferior op into a method
3801 of process_target.
3802
3803 * target.h (struct process_stratum_target): Remove the target op.
3804 (class process_target): Add the target op.
3805 (target_post_create_inferior): Update the macro.
3806 * target.cc (process_target::post_create_inferior): Define.
3807
3808 Update the derived classes and callers below.
3809
3810 * linux-low.cc (linux_target_ops): Update.
3811 (linux_post_create_inferior): Turn into ...
3812 (linux_process_target::post_create_inferior): ... this.
3813 * linux-low.h (class linux_process_target): Update.
3814 * lynx-low.cc (lynx_target_ops): Update.
3815 * nto-low.cc (nto_target_ops): Update.
3816 * win32-low.cc (win32_target_ops): Update.
3817
3818 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3819
3820 Turn process_stratum_target's create_inferior op into a method of
3821 process_target.
3822
3823 * target.h (struct process_stratum_target): Remove the target op.
3824 (class process_target): Add the target op.
3825 (create_inferior): Rename the macro to ...
3826 (target_create_inferior): ... this.
3827
3828 Update the derived classes and callers below.
3829
3830 * server.cc (handle_v_run): Update.
3831 (captured_main): Update.
3832 (process_serial_event): Update.
3833 * linux-low.cc (linux_target_ops): Update.
3834 (linux_create_inferior): Turn into ...
3835 (linux_process_target::create_inferior): ... this.
3836 * linux-low.h (class linux_process_target): Update.
3837 * lynx-low.cc (lynx_target_ops): Update.
3838 (lynx_create_inferior): Turn into ...
3839 (lynx_process_target::create_inferior): ... this.
3840 * lynx-low.h (class lynx_process_target): Update.
3841 * nto-low.cc (nto_target_ops): Update.
3842 (nto_create_inferior): Turn into ...
3843 (nto_process_target::create_inferior): ... this.
3844 * nto-low.h (class nto_process_target): Update.
3845 * win32-low.cc (win32_target_ops): Update.
3846 (win32_create_inferior): Turn into ...
3847 (win32_process_target::create_inferior): ... this.
3848 * win32-low.h (class win32_process_target): Update.
3849
3850 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3851
3852 * target.h (class process_target): New class definition.
3853 (struct process_stratum_target) <pt>: New field with type
3854 'process_target*'.
3855 * linux-low.h (class linux_process_target): Define as a derived
3856 class of 'process_target'.
3857 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3858 as the 'pt' field.
3859 * lynx-low.h (class lynx_process_target): Define as a derived
3860 class of 'process_target'.
3861 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3862 as the 'pt' field.
3863 * nto-low.h (class nto_process_target): Define as a derived
3864 class of 'process_target'.
3865 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3866 as the 'pt' field.
3867 * win32-low.h (class win32_process_target): Define as a derived
3868 class of 'process_target'.
3869 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3870 as the 'pt' field.
3871
3872 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3873
3874 * configure: Regenerate.
3875
3876 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3877 Andrew Burgess <andrew.burgess@embecosm.com>
3878
3879 * linux-riscv-low.cc: New file.
3880 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3881 and nat/riscv-linux-tdesc.c.
3882 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3883 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3884 Define.
3885
3886 2020-02-14 Tom Tromey <tom@tromey.com>
3887
3888 * acinclude.m4: Don't include acx_configure_dir.m4.
3889 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3890 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3891 (all, install-only, uninstall, clean-info, clean)
3892 (maintainer-clean): Don't recurse.
3893 (subdir_do, all-lib): Remove.
3894 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3895 (GNULIB_H): Remove.
3896 (generated_files): Update.
3897 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3898 * configure: Rebuild.
3899 * configure.ac: Don't configure gnulib or libiberty.
3900 (GNULIB): Update.
3901
3902 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3903
3904 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3905 preparing the command line for CreateProcess.
3906 (win32_create_inferior): Reflect the program name in debugging
3907 output that shows the process and its command line.
3908
3909 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3910
3911 * Makefile.in: Rename source files from .c to .cc.
3912 * %.c: Rename to %.cc.
3913 * configure.ac: Rename server.c to server.cc.
3914 * configure: Re-generate.
3915
3916 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3917
3918 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3919
3920 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3921
3922 * win32-low.c (win32_create_inferior): Set signal_pid.
3923
3924 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3925 Pedro Alves <palves@redhat.com>
3926
3927 Skip building gdbserver in a cross-configuration.
3928 * configure.srv: Set $gdbserver_host depending on whether $target
3929 is $host. Use $gdbserver_host instead of $host.
3930
3931 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3932
3933 * configure: Re-generate.
3934
3935 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3936
3937 * configure: Re-generate.
3938
3939 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3940
3941 * acinclude.m4: Update warning.m4 path.
3942
3943 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3944
3945 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3946 (handle_exception): Set siginfo_er.
3947 (win32_xfer_siginfo): New function.
3948
3949 2020-02-07 Tom Tromey <tom@tromey.com>
3950 Pedro Alves <palves@redhat.com>
3951
3952 * README: Update build documentation.
3953 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3954 host, not target.
3955 * configure.ac: Update paths.
3956 * configure: Rebuild.
3957 * acinclude.m4: Update paths.
3958 * Makefile.in: Update include paths.
3959 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3960 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3961 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3962 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3963 (%-generated.c): Update paths.
3964 * Move entire directory from ../gdb/gdbserver.
3965
3966 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3967
3968 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3969
3970 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3971
3972 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3973 assignment instead of srv_linux_obj.
3974
3975 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3976
3977 * server.c (handle_qxfer_libraries): Write segment-address with
3978 paddress.
3979
3980 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3981
3982 * Makefile.in (install-strip): New target.
3983 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3984 * aclocal.m4: Regenerate.
3985 * configure: Regenerate.
3986 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3987
3988 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3989
3990 * Makefile.in (SFILES): Adjust paths to point to real files.
3991 (OBS): Move waitstatus.o to target/waitstatus.o.
3992 (TAGS): Transform paths appropriately.
3993 (%.o): Rename to...
3994 (nat/%.o): ... this pattern rule.
3995 (%.o): Rename to...
3996 (target/%.o): ... this pattern rule.
3997 * configure.srv: Adjust paths throughout to include nat/ prefix
3998 with the revant files.
3999 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4000 * configure: Regenerate.
4001
4002 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4003
4004 * Makefile.in (TAGS): Remove config files from the recipe.
4005
4006 2020-01-14 Tom Tromey <tom@tromey.com>
4007
4008 * configure: Rebuild.
4009 * configure.ac: Remove any checks that were added to common.m4.
4010 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4011 lib-link.m4.
4012
4013 2020-01-14 Tom Tromey <tom@tromey.com>
4014
4015 * server.h: Include config.h.
4016 * gdbreplay.c: Include config.h.
4017 * configure: Rebuild.
4018 * configure.ac: Don't source common.host.
4019 * acinclude.m4: Update path.
4020 * Makefile.in (INCSUPPORT): New variable.
4021 (INCLUDE_CFLAGS): Add INCSUPPORT.
4022 (SFILES): Update paths.
4023 (version-generated.c): Update path to create-version.sh.
4024 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4025
4026 2020-01-14 Tom Tromey <tom@tromey.com>
4027
4028 * configure.ac (LIBS): Use WIN32APILIBS.
4029 (USE_WIN32API): Don't define.
4030 * configure: Rebuild.
4031
4032 2020-01-14 Tom Tromey <tom@tromey.com>
4033
4034 * configure: Rebuild.
4035
4036 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4037
4038 * Makefile.in (%-generated.c): Remove rule for files from
4039 regformats/i386.
4040
4041 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4042
4043 * configure: Re-generate.
4044
4045 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4046
4047 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4048 Define to static.
4049 * tracepoint.c (stop_tracing, flush_trace_buffer,
4050 about_to_request_buffer_space, get_trace_state_variable_value,
4051 set_trace_state_variable_value, gdb_collect): Add declaration.
4052
4053 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4054
4055 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4056 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4057 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4058 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4059 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4060 static.
4061
4062 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4063
4064 * inferiors.c: Include gdbsupport/common-inferior.h.
4065
4066 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4067
4068 * hostio-errno.c: Include hostio.h.
4069
4070 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4071
4072 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4073 prerequisite.
4074
4075 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4076
4077 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4078 * linux-arm-tdesc.h: Include arch/arm.h.
4079
4080 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4081
4082 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4083
4084 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4085
4086 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4087 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4088
4089 2020-01-10 Pedro Alves <palves@redhat.com>
4090
4091 * fork-child.c (post_fork_inferior): Pass target down to
4092 startup_inferior.
4093 * inferiors.c (switch_to_thread): Add process_stratum_target
4094 parameter.
4095 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4096 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4097 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4098 * remote-utils.c (prepare_resume_reply): Pass the target to
4099 switch_to_thread.
4100 * target.c (the_target): Now a process_stratum_target.
4101 (done_accessing_memory): Pass the target to switch_to_thread.
4102 (set_target_ops): Ajust to use process_stratum_target.
4103 * target.h (struct target_ops): Rename to ...
4104 (struct process_stratum_target): ... this.
4105 (the_target, set_target_ops): Adjust.
4106 (prepare_to_access_memory): Adjust comment.
4107 * win32-low.c (child_xfer_memory): Adjust to use
4108 process_stratum_target.
4109 (win32_target_ops): Now a process_stratum_target.
4110
4111 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4112 Pedro Alves <palves@redhat.com>
4113
4114 * win32-low.c (get_child_debug_event): Extract the fatal exception
4115 from the exit status and convert to the equivalent Posix signal
4116 number.
4117 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4118 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4119
4120 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4121
4122 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4123
4124 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4125
4126 * server.c (gdbserver_version): Change copyright year to 2020.
4127 * gdbreplay.c (gdbreplay_version): Likewise.
4128
4129 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4130
4131 * configure: Regenerate.
4132 * configure.ac: Quote variable arguments of test.
4133
4134 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4135
4136 * Makefile.in: Fix build with GNU Make 3.81
4137
4138 2019-12-16 Tom Tromey <tromey@adacore.com>
4139
4140 * server.c (get_exec_file): Constify result.
4141
4142 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4143
4144 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4145 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4146 * config.in: Regenerate.
4147 * configure: Regenerate.
4148 * configure.ac: Don't check for strerror.
4149 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4150 Call safe_strerror instead of strerror.
4151 * server.h (strerror): Remove this now-unnecessary declaration.
4152 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4153 strerror.
4154 (gdb_agent_helper_thread): Likewise.
4155 * utils.c (perror_with_name): Likewise.
4156
4157 2019-11-26 Tom Tromey <tom@tromey.com>
4158
4159 * configure, config.in: Rebuild.
4160
4161 2019-11-26 Tom Tromey <tom@tromey.com>
4162
4163 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4164 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4165 gdb_sigmask.
4166 * configure, config.in: Rebuild.
4167
4168 2019-11-26 Tom Tromey <tom@tromey.com>
4169
4170 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4171 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4172 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4173 * acinclude.m4: Include ax_pthread.m4.
4174 * config.in, configure: Rebuild.
4175
4176 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4177
4178 * debug.c (debug_set_output): Call safe_strerror instead of
4179 strerror.
4180 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4181 (linux_kill_one_lwp): Likewise.
4182 (linux_detach_one_lwp): Likewise.
4183 (linux_wait_for_event_filtered): Likewise.
4184 (store_register): Likewise.
4185 * lynx-low.c (lynx_attach): Likewise.
4186 * mem-break.c (insert_memory_breakpoint): Likewise.
4187 (remove_memory_breakpoint): Likewise.
4188 (delete_fast_tracepoint_jump): Likewise.
4189 (set_fast_tracepoint_jump): Likewise.
4190 (uninsert_fast_tracepoint_jumps_at): Likewise.
4191 (reinsert_fast_tracepoint_jumps_at): Likewise.
4192 * nto-low.c (nto_xfer_memory): Likewise.
4193 (nto_resume): Likewise.
4194
4195 2019-11-20 Luis Machado <luis.machado@linaro.org>
4196
4197 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4198 instead of register count.
4199 * tdesc.c (tdesc_contains_feature): New function.
4200 * tdesc.h (tdesc_contains_feature): New prototype.
4201
4202 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4203
4204 * Makefile.in: Add safe-strerror.c.
4205 * configure: Regenerate.
4206 * configure.ac: Don't source common.host.
4207
4208 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4209
4210 * config.in: Regenerate.
4211 * configure: Regenerate.
4212
4213 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4214
4215 * ax.c (ax_printf): Handle size_t_arg.
4216
4217 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4218
4219 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4220 * mi/mi-main.c (output_cores): Likewise.
4221 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4222 (linux_xfer_osdata_modules): Likewise.
4223 * remote.c (register_remote_support_xml): Likewise.
4224 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4225 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4226
4227 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4228
4229 * configure: Regenerate.
4230 * configure.ac: Remove check for strerror_r.
4231
4232 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4233
4234 * config.in: Regenerate.
4235 * configure: Regenerate.
4236 * configure.ac: Also check for strerror_r.
4237
4238 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4239
4240 * ax.h (debug_agent): Remove duplicate declaration.
4241
4242 2019-10-26 Tom de Vries <tdevries@suse.de>
4243
4244 * linux-aarch64-low.c: Fix typos in comments.
4245 * linux-arm-low.c: Same.
4246 * linux-low.c: Same.
4247 * linux-ppc-low.c: Same.
4248 * proc-service.c: Same.
4249 * regcache.h: Same.
4250 * server.c: Same.
4251 * tracepoint.c: Same.
4252 * win32-low.c: Same.
4253
4254 2019-10-25 Tom Tromey <tromey@adacore.com>
4255
4256 * utils.c (xstrdup): Remove.
4257
4258 2019-10-23 Tom Tromey <tom@tromey.com>
4259
4260 * configure, config.in: Rebuild.
4261
4262 2019-10-23 Tom Tromey <tom@tromey.com>
4263
4264 * configure: Rebuild.
4265 * acinclude.m4: Use m4_include, not sinclude.
4266
4267 2019-10-17 Tom Tromey <tromey@adacore.com>
4268
4269 * configure: Rebuild.
4270 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4271 in AC_CONFIG_FILES invocation.
4272 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4273 invocation.
4274
4275 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4276
4277 * server.c: Include xml-builtin.h.
4278 (get_xml_features): Don't declare xml_builtins here.
4279
4280 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4281
4282 * Makefile.in: Remove references to vec-ipa.o.
4283
4284 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4285
4286 * Makefile.in: Remove references to vec.c.
4287
4288 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4289
4290 * server.c (server_waiting): Change to bool.
4291 (extended_protocol): Likewise.
4292 (response_needed): Likewise.
4293 (exit_requested): Likewise.
4294 (run_once): Likewise.
4295 (report_no_resumed): Likewise.
4296 (non_stop): Likewise.
4297 (disable_packet_vCont): Likewise.
4298 (disable_packet_Tthread): Likewise.
4299 (disable_packet_qC): Likewise.
4300 (disable_packet_qfThreadInfo): Likewise.
4301 (handle_general_set): Update.
4302 (handle_detach): Update.
4303 (handle_monitor_command): Update.
4304 (handle_query): Update.
4305 (captured_main): Update.
4306 (process_serial_event): Update.
4307 * server.h (server_waiting): Change to bool.
4308 (disable_packet_vCont): Likewise.
4309 (disable_packet_Tthread): Likewise.
4310 (disable_packet_qC): Likewise.
4311 (disable_packet_qfThreadInfo): Likewise.
4312 (run_once): Likewise.
4313 (non_stop): Likewise.
4314 * target.c (target_stop_and_wait): Update.
4315
4316 2019-10-02 Tom Tromey <tromey@adacore.com>
4317
4318 * Makefile.in (SFILES): Add common-inferior.c.
4319 (OBS): Add common-inferior.o.
4320 * server.c (startup_with_shell): Don't define.
4321
4322 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4323
4324 * linux-low.c (linux_low_read_btrace): Update for change to
4325 std::vector.
4326
4327 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4328
4329 * debug.c (debug_threads): Remove comment in favor of the header.
4330 * debug.h (using_threads): Add declaration.
4331 (debug_threads): Add comment.
4332 * linux-aarch64-low.c: Include debug.h and remove declaration of
4333 debug_threads.
4334 * nto-low.c: Likewise.
4335 * remote-utils.c: Likewise.
4336 * thread-db.c: Likewise.
4337
4338 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4339
4340 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4341 and powerpc-cell64l-ipa.o.
4342 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4343 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4344 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4345 (spu*-*-*): Remove.
4346
4347 * spu-low.c: Remove file.
4348
4349 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4350 (parse_spufs_run): Remove.
4351 (ppc_get_pc): Remove Cell/B.E. support.
4352 (ppc_set_pc): Likewise.
4353 (ppc_breakpoint_at): Likewise.
4354 (ppc_arch_setup): Likewise.
4355 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4356 tdesc_powerpc_cell32l.
4357 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4358 or init_registers_powerpc_cell32l.
4359 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4360 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4361 or init_registers_powerpc_cell32l.
4362 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4363 (init_registers_powerpc_cell32l): Remove prototype.
4364 (init_registers_powerpc_cell64l): Likewise.
4365
4366 * target.h (struct target_ops): Remove qxfer_spu member.
4367 * server.c (handle_qxfer_spu): Remove.
4368 (qxfer_packets): Remove entry for "spu".
4369 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4370 * linux-low.c (SPUFS_MAGIC): Remove.
4371 (spu_enumerate_spu_ids): Remove.
4372 (linux_qxfer_spu): Remove.
4373 (linux_target_ops): Remove qxfer_spu member.
4374 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4375 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4376 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4377
4378 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4379
4380 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4381 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4382 * config.in: Regenerate.
4383 * configure: Regenerate.
4384
4385 2019-08-15 Tom Tromey <tromey@adacore.com>
4386
4387 * target.c (target_write_memory): Use gdb::byte_vector.
4388
4389 2019-08-15 Tom Tromey <tromey@adacore.com>
4390
4391 * tracepoint.c (write_inferior_data_pointer)
4392 (write_inferior_integer, write_inferior_int8)
4393 (write_inferior_uinteger, m_tracepoint_action_download)
4394 (r_tracepoint_action_download, x_tracepoint_action_download)
4395 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4396 (download_agent_expr, download_tracepoint_1)
4397 (download_trace_state_variables, upload_fast_traceframes): Update.
4398 * server.c (gdb_write_memory): Update.
4399 * remote-utils.c (relocate_instruction): Update.
4400 * proc-service.c (ps_pdwrite): Update.
4401 * mem-break.c (remove_memory_breakpoint)
4402 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4403 (uninsert_fast_tracepoint_jumps_at)
4404 (reinsert_fast_tracepoint_jumps_at): Update.
4405 * linux-x86-low.c (append_insns)
4406 (i386_install_fast_tracepoint_jump_pad)
4407 (amd64_write_goto_address, i386_write_goto_address): Update.
4408 * linux-s390-low.c (append_insns, s390_write_goto_address):
4409 Update.
4410 * linux-ppc-low.c (ppc_relocate_instruction)
4411 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4412 (ppc_write_goto_address): Update.
4413 * linux-aarch64-low.c (append_insns): Update.
4414 * target.h (struct target_ops): Update.
4415 (write_inferior_memory): Don't declare.
4416 * target.c (target_write_memory): Rename from
4417 write_inferior_memory. Remove old target_write_memory.
4418
4419 2019-08-15 Tom Tromey <tromey@adacore.com>
4420
4421 * target.c (write_inferior_memory): Use std::vector.
4422
4423 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4424
4425 PR build/24886
4426 * configure.ac: Drop enable-libmcheck support.
4427 * configure, config.in: Rebuild.
4428 * acinclude.m4: Don't include it.
4429
4430 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4431
4432 * configure.srv: Remove Arm xml files.
4433
4434 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4435
4436 * configure.srv: Add new files. Remove xml generated files.
4437 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4438 registers.
4439 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4440 * linux-aarch32-tdesc.c: New file.
4441 * linux-aarch32-tdesc.h: New file.
4442 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4443 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4444 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4445 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4446 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4447 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4448 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4449 (arm_read_description): Call arm_linux_read_description.
4450 (initialize_low_arch): Don't init registers.
4451 * linux-arm-tdesc.c: New file.
4452 * linux-arm-tdesc.h: New file.
4453
4454 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4455
4456 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4457 Move counter inside for.
4458 (arm_read_description): Check ptrace earlier.
4459 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4460
4461 2019-07-09 Tom Tromey <tom@tromey.com>
4462
4463 * configure: Rebuild.
4464 * configure.ac: Change common to gdbsupport.
4465 * acinclude.m4: Change common to gdbsupport.
4466 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4467 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4468 common to gdbsupport.
4469 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4470 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4471 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4472 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4473 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4474 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4475 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4476 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4477 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4478 common to gdbsupport.
4479
4480 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4481
4482 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4483 defines.
4484 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4485
4486 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4487
4488 * configure.srv: Remove legacy xml.
4489 * linux-aarch64-low.c (initialize_low_arch): Remove
4490 initialize_low_tdesc call.
4491 * linux-aarch64-tdesc-selftest.c: Remove file.
4492 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4493 * linux-x86-low.c (initialize_low_arch): Remove
4494 initialize_low_tdesc call.
4495 * linux-x86-tdesc-selftest.c: Remove file.
4496 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4497
4498 2019-06-20 Tom de Vries <tdevries@suse.de>
4499
4500 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4501 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4502
4503 2019-06-19 Tom de Vries <tdevries@suse.de>
4504
4505 * debug.h (debug_write): Change return type to ssize_t.
4506 * debug.c (debug_write): Same.
4507
4508 2019-06-14 Tom Tromey <tom@tromey.com>
4509
4510 * configure.ac: Use new path to gnulib.
4511 * configure: Rebuild.
4512 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4513 to gnulib.
4514
4515 2019-06-11 Tom Tromey <tom@tromey.com>
4516
4517 * Makefile.in (SFILES): Add alloc.c.
4518 (OBS): Add alloc.o.
4519 (IPA_OBJS): Add alloc-ipa.o.
4520 (alloc-ipa.o): New target.
4521 (%.o: ../%.c): New pattern rule.
4522
4523 2019-06-10 Tom Tromey <tromey@adacore.com>
4524
4525 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4526 end warning with a newline.
4527 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4528 newline.
4529 * thread-db.c (attach_thread): Don't end warning with a newline.
4530 (thread_db_notice_clone): Likewise.
4531 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4532 newline.
4533 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4534 end warning with a newline.
4535
4536 2019-06-04 Pedro Alves <palves@redhat.com>
4537
4538 * server.c (captured_main): Use make_unique_xstrdup.
4539
4540 2019-06-02 Tom Tromey <tom@tromey.com>
4541
4542 * gdbreplay.c (fromhex): Remove.
4543 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4544
4545 2019-05-29 Tom Tromey <tromey@adacore.com>
4546
4547 * configure: Rebuild.
4548
4549 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4550
4551 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4552 sign extension code on 32-bit builds.
4553
4554 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4555
4556 * remote-utils.c:
4557 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4558
4559 2019-04-19 Tom Tromey <tom@tromey.com>
4560
4561 * server.c (struct vstop_notif): Derive from notif_event.
4562 <base>: Remove.
4563 (queue_stop_reply): Update.
4564 (remove_all_on_match_ptid): Change type. Rewrite.
4565 (discard_queued_stop_replies): Rewrite.
4566 (in_queued_stop_replies_ptid): Change type.
4567 (in_queued_stop_replies): Rewrite.
4568 (notif_stop): Update.
4569 (queue_stop_reply_callback): Update.
4570 (captured_main): Don't call initialize_notif.
4571 (push_stop_notification): Update.
4572 * notif.c (notif_write_event, handle_notif_ack)
4573 (notif_event_enque, notif_push): Update.
4574 (notif_event_xfree, initialize_notif): Remove.
4575 * notif.h (struct notif_event): Include <list>, not
4576 "common/queue.h".
4577 (struct notif_server) <queue>: Now a std::list.
4578 (notif_event_p): Remove typedef.
4579 (initialize_notif): Don't declare.
4580 (struct notif_event): Add virtual destructor.
4581
4582 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4583
4584 * ax.c (ax_vdebug): Call debug_printf.
4585 * debug.c (debug_write): New function.
4586 * debug.h (debug_write): New declaration.
4587 * linux-low.c (sigchld_handler): Call debug_write.
4588
4589 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4590
4591 * debug.c (debug_set_output): New function.
4592 (debug_vprintf): Send output to debug_file.
4593 (debug_flush): Likewise.
4594 * debug.h (debug_set_output): New declaration.
4595 * server.c (handle_monitor_command): Add debug-file option.
4596 (captured_main): Likewise.
4597
4598 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4599
4600 * debug.c (remote_debug): Add definition.
4601 * debug.h (remote_debug): Add declaration.
4602 * hostio.c (remote_debug): Remove declaration.
4603 * remote-utils.c (struct ui_file): Likewise.
4604 (remote_debug): Likewise.
4605 * remote-utils.h (remote_debug): Likewise,
4606 * server.c (remote_debug): Remove definition.
4607
4608 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4609
4610 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4611 when using a 64-bit gdbserver.
4612
4613 2019-04-09 Tom Tromey <tromey@adacore.com>
4614
4615 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4616
4617 2019-04-08 Tom Tromey <tom@tromey.com>
4618
4619 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4620 throw.
4621 (linux_resume_one_lwp): Likewise.
4622
4623 2019-04-08 Tom Tromey <tom@tromey.com>
4624
4625 * gdbreplay.c: Update.
4626 * linux-low.c: Update.
4627 * server.c: Update.
4628
4629 2019-04-08 Tom Tromey <tom@tromey.com>
4630
4631 * server.c: Use C++ exception handling.
4632 * linux-low.c: Use C++ exception handling.
4633 * gdbreplay.c: Use C++ exception handling.
4634
4635 2019-04-08 Tom Tromey <tom@tromey.com>
4636
4637 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4638 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4639 (captured_main, main): Update.
4640 * gdbreplay.c (main): Update.
4641
4642 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4643
4644 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4645 value in argument pointer, return 1 if the entry is found and 0
4646 otherwise. Move comment.
4647 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4648 * linux-low.h (linux_get_auxv): Declare.
4649 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4650
4651 2019-04-05 Tom Tromey <tromey@adacore.com>
4652
4653 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4654 variables.
4655
4656 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4657
4658 * linux-low.c (AT_HWCAP2): Add define if not already included.
4659
4660 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4661
4662 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4663 (aarch64_arch_setup): Call linux_get_hwcap.
4664 * linux-arm-low.c (arm_get_hwcap): Remove function.
4665 (arm_read_description): Call linux_get_hwcap.
4666 * linux-low.c (linux_get_auxv): New function.
4667 (linux_get_hwcap): Likewise.
4668 (linux_get_hwcap2): Likewise.
4669 * linux-low.h (linux_get_hwcap): New declaration.
4670 (linux_get_hwcap2): Likewise.
4671 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4672 (ppc_arch_setup): Call linux_get_hwcap.
4673 * linux-s390-low.c (s390_get_hwcap): Remove function.
4674 (s390_arch_setup): Call linux_get_hwcap.
4675
4676 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4677 Jiong Wang <jiong.wang@arm.com>
4678
4679 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4680 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4681 to fail.
4682 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4683
4684 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4685 Jiong Wang <jiong.wang@arm.com>
4686
4687 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4688 (aarch64_get_hwcap): New function.
4689 (aarch64_arch_setup): Read APIA hwcap.
4690
4691 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4692 Jiong Wang <jiong.wang@arm.com>
4693
4694 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4695 (initialize_low_tracepoint): Likewise.
4696 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4697 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4698 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4699 (aarch64_linux_read_description): Likewise.
4700 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4701
4702 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4703
4704 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4705 i386_create_target_description for 'segments' parameter.
4706 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4707 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4708 * win32-i386-low.c (i386_arch_setup): Likewise.
4709
4710 2019-03-12 Tom Tromey <tromey@adacore.com>
4711
4712 * linux-low.c (iterate_over_lwps): Update.
4713
4714 2019-03-06 Tom Tromey <tom@tromey.com>
4715
4716 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4717 (captured_main): Use SCOPE_EXIT.
4718
4719 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4720
4721 * configure.srv: Use '$enable_unittest' instead of '$development'
4722 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4723 case.
4724
4725 2019-02-27 Tom Tromey <tromey@adacore.com>
4726
4727 * gdbreplay.c (logchar): Handle \r\n.
4728
4729 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4730
4731 * linux-low.c (linux_attach): Add process before lwp.
4732 * server.c (attach_inferior): Check if already attached.
4733
4734 2019-02-07 Tom Tromey <tom@tromey.com>
4735
4736 * x86-tdesc.h: Rename include guard.
4737 * x86-low.h: Add include guard.
4738 * wincecompat.h: Rename include guard.
4739 * win32-low.h: Add include guard.
4740 * utils.h: Rename include guard.
4741 * tracepoint.h: Rename include guard.
4742 * tdesc.h: Rename include guard.
4743 * target.h: Rename include guard.
4744 * server.h: Rename include guard.
4745 * remote-utils.h: Rename include guard.
4746 * regcache.h: Rename include guard.
4747 * nto-low.h: Rename include guard.
4748 * notif.h: Add include guard.
4749 * mem-break.h: Rename include guard.
4750 * lynx-low.h: Add include guard.
4751 * linux-x86-tdesc.h: Add include guard.
4752 * linux-s390-tdesc.h: Add include guard.
4753 * linux-ppc-tdesc-init.h: Add include guard.
4754 * linux-low.h: Add include guard.
4755 * linux-aarch64-tdesc.h: Add include guard.
4756 * linux-aarch32-low.h: Add include guard.
4757 * inferiors.h: Rename include guard.
4758 * i387-fp.h: Rename include guard.
4759 * hostio.h: Rename include guard.
4760 * gdbthread.h: Rename include guard.
4761 * gdb_proc_service.h: Rename include guard.
4762 * event-loop.h: Rename include guard.
4763 * dll.h: Rename include guard.
4764 * debug.h: Rename include guard.
4765 * ax.h: Rename include guard.
4766
4767 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4768
4769 PR gdb/23985
4770 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4771 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4772
4773 2019-01-25 Tom Tromey <tom@tromey.com>
4774
4775 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4776
4777 2019-01-25 Tom Tromey <tom@tromey.com>
4778
4779 * win32-low.c: Fix common/ includes.
4780 * win32-i386-low.c: Fix common/ includes.
4781 * tracepoint.c: Fix common/ includes.
4782 * thread-db.c: Fix common/ includes.
4783 * target.h: Fix common/ includes.
4784 * symbol.c: Fix common/ includes.
4785 * spu-low.c: Fix common/ includes.
4786 * server.h: Fix common/ includes.
4787 * server.c: Fix common/ includes.
4788 * remote-utils.c: Fix common/ includes.
4789 * regcache.h: Fix common/ includes.
4790 * regcache.c: Fix common/ includes.
4791 * nto-x86-low.c: Fix common/ includes.
4792 * notif.h: Fix common/ includes.
4793 * mem-break.h: Fix common/ includes.
4794 * lynx-low.c: Fix common/ includes.
4795 * lynx-i386-low.c: Fix common/ includes.
4796 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4797 * linux-x86-low.c: Fix common/ includes.
4798 * linux-low.c: Fix common/ includes.
4799 * inferiors.h: Fix common/ includes.
4800 * i387-fp.c: Fix common/ includes.
4801 * hostio.c: Fix common/ includes.
4802 * hostio-errno.c: Fix common/ includes.
4803 * gdbthread.h: Fix common/ includes.
4804 * gdbreplay.c: Fix common/ includes.
4805 * fork-child.c: Fix common/ includes.
4806 * event-loop.c: Fix common/ includes.
4807 * ax.c:
4808 (enum gdb_agent_op): Fix common/ includes.
4809
4810 2019-01-21 Tom Tromey <tom@tromey.com>
4811
4812 * tracepoint.c: Fix includes.
4813 * remote-utils.c: Fix includes.
4814 * linux-x86-low.c: Fix includes.
4815
4816 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4817
4818 * gdbreplay.c (gdbreplay_version): Update copyright year in
4819 version message.
4820 * server.c (gdbserver_version): Likewise.
4821
4822 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4823
4824 * linux-low.c (add_lwp): Switch ordering.
4825
4826 2018-11-29 Tom Tromey <tom@tromey.com>
4827
4828 * win32-low.c (win32_join): Take pid, not process.
4829 * target.h (struct target_ops) <join>: Change argument type.
4830 (join_inferior): Change argument name.
4831 * spu-low.c (spu_join): Take pid, not process.
4832 * server.c (handle_detach): Preserve pid before destroying
4833 process.
4834 * lynx-low.c (lynx_join): Take pid, not process.
4835 * linux-low.c (linux_join): Take pid, not process.
4836
4837 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4838
4839 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4840 (aarch64_cannot_fetch_register): Likewise.
4841 (struct linux_target_ops): Update references.
4842
4843 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4844
4845 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4846
4847 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4848
4849 * configure.srv (ipa_ppc_linux_regobj): Add
4850 powerpc-isa207-htm-vsx32l-ipa.o and
4851 powerpc-isa207-htm-vsx64l-ipa.o.
4852 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4853 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4854 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4855 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4856 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4857 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4858 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4859 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4860 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4861 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4862 (init_registers_powerpc_isa207_htm_vsx32l)
4863 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4864 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4865 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4866 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4867 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4868 (ppc_store_tm_ctarregset): New functions.
4869 (ppc_regsets): Add entries for HTM regsets.
4870 (ppc_arch_setup): Set htm in features struct when needed. Set
4871 sizes for the HTM regsets.
4872 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4873 (initialize_low_arch): Call
4874 init_registers_powerpc_isa207_htm_vsx32l and
4875 init_registers_powerpc_isa207_htm_vsx64l.
4876 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4877 PPC_TDESC_ISA207_HTM_VSX.
4878 (initialize_low_tracepoint): Call
4879 init_registers_powerpc_isa207_htm_vsx32l and
4880 init_registers_powerpc_isa207_htm_vsx64l.
4881
4882 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4883
4884 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4885 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4886 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4887 (ppc_store_pmuregset): New functions.
4888 (ppc_regsets): Add entries for ebb and pmu regsets.
4889 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4890 pmu regsets are available. Set sizes for these regsets.
4891
4892 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4893
4894 * configure.srv (ipa_ppc_linux_regobj): Add
4895 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4896 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4897 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4898 rs6000/powerpc-isa207-vsx32l.xml, and
4899 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4900 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4901 <PPC_TDESC_ISA207_VSX>: New enum value.
4902 (init_registers_powerpc_isa207_vsx32l): Declare.
4903 (init_registers_powerpc_isa207_vsx64l): Declare.
4904 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4905 (ppc_store_tarregset): New function.
4906 (ppc_regsets): Add entry for the TAR regset.
4907 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4908 size for the TAR regsets.
4909 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4910 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4911 and init_registers_powerpc_isa207_vsx64l.
4912 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4913 (initialize_low_tracepoint): Call
4914 init_registers_powerpc_isa207_vsx32l and
4915 init_registers_powerpc_isa207_vsx64l.
4916
4917 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4918 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4919
4920 * configure.srv (ipa_ppc_linux_regobj): Add
4921 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4922 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4923 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4924 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4925 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4926 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4927 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4928 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4929 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4930 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4931 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4932 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4933 (ppc_hwcap): Add comment.
4934 (ppc_hwcap2): New global.
4935 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4936 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4937 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4938 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4939 when needed. Set sizes for the the DSCR and PPR regsets.
4940 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4941 (initialize_low_arch): Call
4942 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4943 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4944 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4945 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4946 (initialize_low_tracepoint): Call
4947 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4948 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4949
4950 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4951
4952 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4953
4954 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4955 Simon Marchi <simark@simark.ca>
4956
4957 * acinclude.m4: Include "../selftest.m4".
4958 * configure: Regenerate.
4959 * configure.ac: Use "GDB_AC_SELFTEST".
4960 * configure.srv: Use "$enable_unittests" instead of
4961 "$development" when checking whether unit tests have been
4962 enabled.
4963 * server.c (captured_main): Update message informing that
4964 selftests have been disabled.
4965
4966 2018-10-04 Tom Tromey <tom@tromey.com>
4967
4968 * configure: Rebuild.
4969
4970 2018-10-04 Tom Tromey <tom@tromey.com>
4971
4972 * server.c (handle_status): Rename inner "thread".
4973 (process_serial_event): Declare "res" in 'm' case.
4974 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4975 (iterate_over_lwps): Rename inner "thread".
4976 (linux_qxfer_libraries_svr4): Rename inner "len".
4977 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4978
4979 2018-10-01 Gary Benson <gbenson@redhat.com>
4980
4981 * gdb_proc_service.h: Moved common code to
4982 common/gdb_proc_service.h.
4983
4984 2018-10-01 Gary Benson <gbenson@redhat.com>
4985
4986 * gdb_proc_service.h: Synchronize comments and whitespace with
4987 GDB's version of this file.
4988
4989 2018-09-25 Tom Tromey <tom@tromey.com>
4990
4991 * configure: Rebuild.
4992 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4993
4994 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4995
4996 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4997 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4998 ($(IPA_LIB)): Sort IPA_OBJS.
4999
5000 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5001
5002 * Makefile.in: Remove references to $(ADD_DEPS).
5003
5004 2018-09-16 Tom Tromey <tom@tromey.com>
5005
5006 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5007 variables.
5008 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5009 variables.
5010
5011 2018-09-05 Tom Tromey <tom@tromey.com>
5012
5013 * configure: Rebuild.
5014
5015 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5016
5017 PR build/23399
5018 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5019
5020 2018-08-27 Tom Tromey <tom@tromey.com>
5021
5022 PR build/23087:
5023 * configure: Rebuild.
5024
5025 2018-08-27 Tom Tromey <tom@tromey.com>
5026
5027 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5028 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5029 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5030 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5031 (s390x_emit_stack_adjust): Add casts to unsigned char.
5032
5033 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 PR gdb/23374
5036 PR gdb/23375
5037 * server.h (struct client_state) <disable_randomization>:
5038 Initialize to 1.
5039
5040 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5041
5042 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5043 variable.
5044 (mips_supply_ptrace_register): Likewise.
5045
5046 2018-07-22 Tom Tromey <tom@tromey.com>
5047
5048 * configure: Rebuild.
5049
5050 2018-07-22 Tom Tromey <tom@tromey.com>
5051
5052 * win32-low.c (win32_create_inferior): Remove unused variables.
5053 * gdbreplay.c (remote_open): Remove unused variable.
5054 * remote-utils.c (remote_prepare): Remove unused variable.
5055 * x86-tdesc.h (X86_TDESC_H): Define.
5056 (amd64_expedite_regs): Define conditionally.
5057 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5058 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5059 * remote-utils.c (readchar): Remove unused variable.
5060
5061 2018-07-13 Pedro Alves <palves@redhat.com>
5062
5063 * linux-low.c (linux_kill): Change parameter to process_info
5064 pointer instead of pid. Adjust.
5065 * lynx-low.c (lynx_kill): Likewise.
5066 * nto-low.c (nto_kill): Likewise.
5067 * spu-low.c (spu_kill): Likewise.
5068 * win32-low.c (win32_kill): Likewise.
5069 * server.c (handle_v_kill, kill_inferior_callback)
5070 (detach_or_kill_for_exit): Adjust.
5071 * target.c (kill_inferior): Change parameter to process_info
5072 pointer instead of pid. Adjust.
5073 * target.h (struct target_ops) <kill>: Change parameter to
5074 process_info pointer instead of pid. Adjust all implementations
5075 and callers.
5076 (kill_inferior): Likewise.
5077
5078 2018-07-13 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c (linux_detach, linux_join): Change parameter to
5081 process_info pointer instead of pid. Adjust.
5082 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5083 * nto-low.c (nto_detach): Likewise.
5084 * spu-low.c (spu_detach, spu_join): Likewise.
5085 * win32-low.c (win32_detach, win32_join): Likewise.
5086 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5087 * target.h (struct target_ops) <detach, join>: Change parameter to
5088 process_info pointer instead of pid. Adjust all implementations
5089 and callers.
5090 (detach_inferior, join_inferior): Rename 'pid' parameter to
5091 'proc'.
5092
5093 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5094 Jan Kratochvil <jan.kratochvil@redhat.com>
5095 Paul Fertser <fercerpav@gmail.com>
5096 Tsutomu Seki <sekiriki@gmail.com>
5097
5098 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5099 (OBS): Add 'common/netstuff.o'.
5100 (GDBREPLAY_OBS): Likewise.
5101 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5102 (remote_open): Implement support for IPv6
5103 connections.
5104 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5105 and 'wspiapi.h'.
5106 (handle_accept_event): Accept connections from IPv6 sources.
5107 (remote_prepare): Handle IPv6-style hostnames; implement
5108 support for IPv6 connections.
5109 (remote_open): Implement support for printing connections from
5110 IPv6 sources.
5111
5112 2018-07-11 Pedro Alves <palves@redhat.com>
5113
5114 PR gdb/23377
5115 * mem-break.c (any_persistent_commands): Add process_info
5116 parameter and use it instead of relying on the current process.
5117 Change return type to bool.
5118 * mem-break.h (any_persistent_commands): Add process_info
5119 parameter and change return type to bool.
5120 * server.c (handle_detach): Remove require_running_or_return call.
5121 Look up the process_info for the process we're about to detach.
5122 If not found, return back error to GDB. Adjust
5123 any_persistent_commands call to pass down a process pointer.
5124
5125 2018-07-11 Pedro Alves <palves@redhat.com>
5126
5127 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5128 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5129 instead of collect_register_by_name.
5130 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5131 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5132
5133 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5134 Pedro Alves <palves@redhat.com>
5135
5136 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5137
5138 2018-07-03 Tom Tromey <tom@tromey.com>
5139
5140 * linux-low.c: Update.
5141 * lynx-low.c: Update.
5142 * mem-break.c: Update.
5143 * nto-low.c: Update.
5144 * remote-utils.c: Update.
5145 * server.c: Update.
5146 * spu-low.c: Update.
5147 * target.c: Update.
5148 * win32-low.c: Update.
5149
5150 2018-07-03 Tom Tromey <tom@tromey.com>
5151
5152 * server.c: Update.
5153
5154 2018-07-03 Tom Tromey <tom@tromey.com>
5155
5156 * linux-low.c: Update.
5157
5158 2018-07-03 Tom Tromey <tom@tromey.com>
5159
5160 * target.c: Update.
5161
5162 2018-07-03 Tom Tromey <tom@tromey.com>
5163
5164 * linux-low.c: Update.
5165 * linux-mips-low.c: Update.
5166 * lynx-low.c: Update.
5167 * nto-low.c: Update.
5168 * remote-utils.c: Update.
5169 * server.c: Update.
5170 * spu-low.c: Update.
5171 * target.c: Update.
5172 * thread-db.c: Update.
5173
5174 2018-07-03 Tom Tromey <tom@tromey.com>
5175
5176 * linux-low.c: Update.
5177 * linux-mips-low.c: Update.
5178 * lynx-low.c: Update.
5179 * mem-break.c: Update.
5180 * nto-low.c: Update.
5181 * remote-utils.c: Update.
5182 * server.c: Update.
5183 * spu-low.c: Update.
5184 * target.c: Update.
5185 * tracepoint.c: Update.
5186
5187 2018-07-03 Tom Tromey <tom@tromey.com>
5188
5189 * linux-low.c: Update.
5190 * linux-ppc-low.c: Update.
5191 * linux-x86-low.c: Update.
5192 * proc-service.c: Update.
5193 * server.c: Update.
5194 * spu-low.c: Update.
5195 * thread-db.c: Update.
5196 * win32-low.c: Update.
5197
5198 2018-07-03 Tom Tromey <tom@tromey.com>
5199
5200 * linux-low.c: Update.
5201 * lynx-low.c: Update.
5202 * nto-low.c: Update.
5203 * remote-utils.c: Update.
5204 * spu-low.c: Update.
5205 * thread-db.c: Update.
5206 * win32-low.c: Update.
5207
5208 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5209
5210 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5211 parameter in call to 'amd64_create_target_description'.
5212
5213 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5214
5215 * x86-tdesc.h: Remove executable permission flag.
5216
5217 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5218
5219 * configure.ac: Remove AC_PREREQ, add missing quoting.
5220 * configure: Re-generate.
5221 * config.in: Re-generate.
5222 * aclocal.m4: Re-generate.
5223
5224 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5225
5226 * tracepoint.h (current_traceframe): Remove declaration.
5227
5228 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5229
5230 * linux-aarch64-low.c (is_sve_tdesc): New function.
5231 (aarch64_sve_regs_copy_to_regcache): Likewise.
5232 (aarch64_sve_regs_copy_from_regcache): Likewise.
5233 (aarch64_regs_info): Add SVE checks.
5234 (initialize_low_arch): Initialize SVE.
5235
5236 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5237
5238 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5239
5240 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5241
5242 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5243 (initialize_low_tracepoint): Likewise
5244 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5245 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5246 param.
5247 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5248 checks.
5249 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5250
5251 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5252
5253 * server.h (PBUFSIZ): Increase size
5254
5255 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5256
5257 * regcache.c (regcache::raw_compare): New function.
5258 * regcache.h (regcache::raw_compare): New declaration.
5259
5260 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5261
5262 * regcache.c (new_register_cache): Use new.
5263 (free_register_cache): Use delete.
5264 (register_data): Use const.
5265 (supply_register): Move body inside regcache.
5266 (regcache::raw_supply): New override function.
5267 (collect_register): Move body inside regcache.
5268 (regcache::raw_collect): New override function.
5269 (regcache::get_register_status): New override function.
5270 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5271
5272 2018-06-09 Tom Tromey <tom@tromey.com>
5273
5274 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5275 declare queue.
5276 (event_queue): Use std::queue.
5277 (gdb_event_xfree): Remove.
5278 (initialize_event_loop, process_event, wait_for_event): Update.
5279
5280 2018-06-08 Stan Cox <scox@redhat.com>
5281
5282 * win32-low.c (win32_create_inferior): last_ptid and last_status
5283 moved to client_state.
5284
5285 2018-06-08 Pedro Alves <palves@redhat.com>
5286
5287 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5288 common/common-exceptions.o, common/common-utils.o,
5289 common/errors.o, common/print-utils.o and utils.o.
5290 * gdbreplay.c: Include "common-defs.h" instead of the two
5291 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5292 string.h or alloca.h.
5293 (perror_with_name): Delete.
5294 (remote_open): Use xstrdup instead of strdup.
5295 (main): Rename to ...
5296 (captured_main): ... this.
5297 (main): New.
5298
5299 2018-06-08 Tom Tromey <tom@tromey.com>
5300
5301 * linux-low.c (linux_low_read_btrace): Update.
5302
5303 2018-06-04 Stan Cox <scox@redhat.com>
5304
5305 * server.h (struct client_state): New.
5306 * server.c (cont_thread, general_thread, multi_process)
5307 (report_fork_events, report_vfork_events, report_exec_events)
5308 (report_thread_events, swbreak_feature, hwbreak_feature)
5309 (vCont_supported, disable_randomization, pass_signals)
5310 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5311 Moved to client_state.
5312 * remote-utils.c (remote_debug, noack_mode)
5313 (transport_is_reliable): Moved to client_state.
5314 * tracepoint.c (current_traceframe): Moved to client_state.
5315
5316 Update all callers.
5317 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5318 linux-low.c, remote-utils.h, target.c: Use client_state.
5319
5320 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5321
5322 * configure.srv: Add new c/h file.
5323
5324 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5325
5326 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5327 null VQ.
5328
5329 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5330
5331 * gdb.arch/mips-fpregset-core.exp: New test.
5332 * gdb.arch/mips-fpregset-core.c: New test source.
5333
5334 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5335
5336 PR server/23198
5337 * hostio.c (require_int): Do not report overflow for integers
5338 between 0xfffffff and 0x7fffffff.
5339
5340 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5341
5342 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5343 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5344 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5345 functions.
5346 (the_low_target): Wire them.
5347
5348 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5349
5350 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5351 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5352 mode. Call collect_register_by_name with vscr using
5353 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5354 (ppc_store_vrregset): Add and set vscr_offset variable as in
5355 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5356 vscr_offset.
5357
5358 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5359
5360 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5361 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5362 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5363
5364 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5365
5366 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5367 (ppc_store_vsxregset): Likewise.
5368 (ppc_fill_vrregset): Likewise.
5369 (ppc_store_vrregset): Likewise.
5370 (ppc_fill_evrregset): Likewise.
5371 (ppc_store_evrregset): Likewise.
5372 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5373 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5374 needed.
5375
5376 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5377
5378 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5379 wordsize of the inferior. Call ppc_linux_target_wordsize.
5380
5381 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5382
5383 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5384 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5385 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5386 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5387 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5388 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5389 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5390 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5391 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5392 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5393 (tdesc_powerpc_e500l): Remove.
5394 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5395 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5396 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5397 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5398 linux-ppc-tdesc.h.
5399 (ppc_arch_setup): Remove target description matching code. Fill a
5400 ppc_linux_features struct and call ppc_linux_match_description
5401 with it.
5402
5403 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5404
5405 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5406 width of the requested register exceeds the width of the
5407 `ptrace' data type.
5408 (mips_cannot_store_register): Likewise.
5409
5410 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5411
5412 * linux-mips-low.c (mips_fetch_register): New function. Update
5413 preceding comment.
5414 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5415 (the_low_target): Wire `mips_fetch_register'.
5416
5417 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5418
5419 * lynx-i386-low.c (LYNXOS_178): New macro.
5420 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5421 the layout on LynxOS-178.
5422 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5423 handle floating point registers that are not supported by
5424 LynxOS-178.
5425
5426 2018-05-10 Tom Tromey <tom@tromey.com>
5427
5428 * configure: Rebuild.
5429
5430 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5431
5432 PR server/23158:
5433 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5434 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5435 Use it to set the expedite_regs field in the given tdesc.
5436 * x86-tdesc.h: New file.
5437 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5438 Adjust following the addition of the new expedite_regs parameter
5439 to init_target_desc.
5440 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5441 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5442 (i386_linux_read_description, amd64_linux_read_description):
5443 Adjust following the addition of the new expedite_regs parameter
5444 to init_target_desc.
5445 * lynx-i386-low.c: #include "x86-tdesc.h".
5446 (lynx_i386_arch_setup): Adjust following the addition of the new
5447 expedite_regs parameter to init_target_desc.
5448 * nto-x86-low.c: #include "x86-tdesc.h".
5449 (nto_x86_arch_setup): Adjust following the addition of the new
5450 expedite_regs parameter to init_target_desc.
5451 * win32-i386-low.c: #include "x86-tdesc.h".
5452 (i386_arch_setup): Adjust following the addition of the new
5453 expedite_regs parameter to init_target_desc.
5454
5455 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5456
5457 PR server/23158:
5458 * win32-low.c (win32_create_inferior): Add call to my_wait
5459 setting last_status global.
5460
5461 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5462
5463 PR server/23158:
5464 * win32-low.c (create_process): Only call gdb_tilde_expand if
5465 inferior_cwd is not NULL.
5466
5467 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5468
5469 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5470 registers to the cache if their values have changed.
5471 (i387_xsave_to_cache): Provide default values for x87 control
5472 registers when these features are available, but disabled.
5473 * regcache.c (supply_register_by_name_zeroed): New function.
5474 * regcache.h (supply_register_by_name_zeroed): Declare new
5475 function.
5476
5477 2018-05-07 Tom Tromey <tom@tromey.com>
5478
5479 * configure: Rebuild.
5480
5481 2018-05-04 Tom Tromey <tom@tromey.com>
5482
5483 * configure: Rebuild.
5484
5485 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5486 Pedro Alves <palves@redhat.com>
5487
5488 * linux-aarch64-low.c (aarch64_stopped_data_address):
5489 Likewise.
5490
5491 2018-04-27 Tom Tromey <tom@tromey.com>
5492
5493 * configure: Rebuild.
5494
5495 2018-04-23 Tom Tromey <tom@tromey.com>
5496
5497 * configure: Rebuild.
5498
5499 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5500
5501 * Makefile.in (depcomp): Add "..".
5502 (all_deps_files): New and use it.
5503
5504 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5505
5506 * configure.srv (aarch64*-*-linux*): Don't include xml.
5507 (i[34567]86-*-cygwin*): Likewise.
5508 (i[34567]86-*-linux*): Likewise.
5509 (i[34567]86-*-lynxos*): Likewise.
5510 (i[34567]86-*-mingw32ce*): Likewise.
5511 (i[34567]86-*-mingw*): Likewise.
5512 (i[34567]86-*-nto*): Likewise.
5513 (tic6x-*-uclinux): Likewise.
5514 (x86_64-*-linux*): Likewise.
5515 (x86_64-*-mingw*): Likewise.
5516 (x86_64-*-cygwin*): Likewise.
5517
5518 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5519
5520 * tdesc.c: Remove xml parameter.
5521
5522 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5523
5524 * server.c (get_features_xml): Remove cast.
5525 * tdesc.c (void target_desc::accept): Fill in function.
5526 (tdesc_get_features_xml): Remove old xml creation.
5527 (print_xml_feature::visit_pre): Add xml vistor.
5528 * tdesc.h (struct target_desc): Make xmltarget mutable.
5529 (tdesc_get_features_xml): Remove declaration.
5530
5531 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5532
5533 * tdesc.c (tdesc_architecture_name): Add new function.
5534 (tdesc_osabi_name): Likewise.
5535 (tdesc_get_features_xml): Use new functions.
5536
5537 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5538
5539 * tdesc.c (tdesc_create_flags): Remove.
5540 (tdesc_add_flag): Likewise.
5541 (tdesc_named_type): Likewise.
5542 (tdesc_create_union): Likewise.
5543 (tdesc_create_struct): Likewise.
5544 (tdesc_create_vector): Likewise.
5545 (tdesc_add_bitfield): Likewise.
5546 (tdesc_add_field): Likewise.
5547 (tdesc_set_struct_size): Likewise.
5548
5549 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5550
5551 * tdesc.c (~target_desc): Remove implictly deleted items.
5552 (init_target_desc): Iterate all features.
5553 (tdesc_get_features_xml): Use vector.
5554 (tdesc_create_feature): Create feature.
5555 * tdesc.h (tdesc_feature) Remove
5556 (target_desc): Add features.
5557
5558 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5559
5560 * Makefile.in: Add common/tdesc.c
5561 * tdesc.c (init_target_desc): init all reg_defs from register
5562 vector.
5563 (tdesc_create_reg): Create tdesc_reg.
5564 * tdesc.h (tdesc_feature): Add register vector.
5565
5566 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5567
5568 * tdesc.h (struct target_desc) <features>: Change type to
5569 std::vector<std::string>.
5570 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5571 changes.
5572 (tdesc_get_features_xml): Likewise.
5573 (tdesc_create_feature): Likewise.
5574
5575 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5576
5577 * regcache.c (find_register_by_number): Return a ref.
5578 (find_regno): Use references.
5579 (register_size): Likewise.
5580 (register_data): Likewise.
5581 * tdesc.c (target_desc::~target_desc): Remove free calls.
5582 (target_desc::operator==): Use std::vector compare.
5583 (init_target_desc): Use reference.
5584 (tdesc_create_reg): Use reg constructors.
5585 * tdesc.h (struct target_desc): Replace pointer with object.
5586
5587 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5588
5589 * regcache.c (find_register_by_number): Make static.
5590 (find_regno): Use find_register_by_number
5591 * regcache.h (struct reg): Remove declaration.
5592
5593 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5594
5595 * tdesc.c (target_desc::~target_desc): Move to here.
5596 (target_desc::operator==): Likewise.
5597 * tdesc.h (target_desc::~target_desc): Move from here.
5598 (target_desc::operator==): Likewise.
5599
5600 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5601
5602 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5603
5604 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5605
5606 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5607 S390_TDESC_GS.
5608 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5609 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5610 and init_registers_s390_gs_linux64.
5611
5612 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5613
5614 * linux-s390-low.c (s390_fill_gs): Remove function.
5615 (s390_fill_gsbc): Remove function.
5616 (s390_regsets): Set fill functions for the guarded storage regsets
5617 to NULL.
5618
5619 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5620
5621 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5622 the word size. Add comment.
5623 (s390_get_wordsize): New function.
5624 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5625 pswm with it. Instead, use s390_get_wordsize to determine the
5626 word size first and derive the correct tdesc from that directly.
5627
5628 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5629
5630 * Makefile.in: Include silent-rules.mk.
5631 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5632 (COMPILE): Add ECHO_CXX.
5633 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5634 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5635 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5636 (version-generated.c): Add ECHO_GEN.
5637 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5638 (IPAGENT_COMPILE): Add ECHO_CXX.
5639 (%-generated.c): Add ECHO_REGDAT.
5640
5641 2018-03-14 Tom Tromey <tom@tromey.com>
5642
5643 PR cli/14977:
5644 * ax.c (ax_printf): Special case for NULL.
5645
5646 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5647
5648 * linux-low.c (linux_qxfer_libraries_svr4): Use
5649 xml_escape_text_append.
5650
5651 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5652
5653 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5654
5655 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5656
5657 * server.c (handle_general_set): Remove unnecessary xstrdup.
5658
5659 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5660
5661 * server.c (parse_debug_format_options): Adjust to
5662 delim_string_to_char_ptr_vec changes.
5663 * thread-db.c (thread_db_load_search): Adjust to
5664 dirnames_to_char_ptr_vec changes.
5665
5666 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5667
5668 * target.h (target_enable_btrace, target_disable_btrace)
5669 (target_read_btrace, target_read_btrace_conf): Turn macro into
5670 inline function. Throw error if target method is not defined.
5671 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5672 check for btrace target method. Be prepared to handle exceptions
5673 from btrace target methods.
5674
5675 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5676
5677 * server.c (captured_main): Change order of error message printed
5678 when the current working directory cannot be found.
5679
5680 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5681
5682 * server.c: Include "filenames.h" and "pathstuff.h".
5683 (program_name): Delete variable.
5684 (program_path): New anonymous class.
5685 (get_exec_wrapper): Use "program_path" instead of
5686 "program_name".
5687 (handle_v_run): Likewise.
5688 (captured_main): Likewise.
5689 (process_serial_event): Likewise.
5690
5691 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5692
5693 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5694 (OBJS): Add "pathstuff.o".
5695 * server.c (current_directory): New global variable.
5696 (captured_main): Initialize "current_directory".
5697
5698 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5699
5700 * tdesc.c: Use common/tdesc.h.
5701 * tdesc.h: Likewise.
5702
5703 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5704 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * Makefile.in: Switch order of make rules.
5707
5708 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5709
5710 * Makefile.in: Add common directory in build.
5711 * configure.ac: Add common reference.
5712 * configure: Regenerate.
5713
5714 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5715
5716 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5717 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5718 * spu-low.c (spu_target_ops): Likewise.
5719 * win32-low.c (win32_target_ops): Likewise.
5720 * server.c (supported_btrace_packets): Report packets unconditionally.
5721 * target.h (target_ops) <supports_btrace>: Remove.
5722 (target_supports_btrace): Remove.
5723
5724 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5725
5726 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5727 (handle_btrace_disable): Change return type to void. Use exceptions
5728 to report errors.
5729 (handle_btrace_general_set): Catch exception and copy message to
5730 return message.
5731
5732 2018-02-08 Tom Tromey <tom@tromey.com>
5733
5734 * linux-low.c (install_software_single_step_breakpoints): Use
5735 make_scoped_restore.
5736 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5737 (do_restore_current_thread_cleanup): Remove.
5738 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5739 declare.
5740
5741 2018-02-08 Tom Tromey <tom@tromey.com>
5742
5743 * mem-break.c (set_raw_breakpoint_at): Use
5744 gdb::unique_xmalloc_ptr.
5745
5746 2018-01-30 Pedro Alves <palves@redhat.com>
5747
5748 PR gdb/13211
5749 * target.c (target_terminal::terminal_state): Rename to ...
5750 (target_terminal::m_terminal_state): ... this.
5751
5752 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5753
5754 * linux-low.c (handle_extended_wait): Surround call to
5755 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5756
5757 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5758
5759 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5760 linux_ptrace_attach_fail_reason_string now returning an
5761 std::string.
5762 (linux_attach): Likewise.
5763 * thread-db.c (attach_thread): Likewise.
5764
5765 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5766
5767 PR gdb/21559
5768 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5769 checking for fs_base/gs_base fields in struct user_regs_struct.
5770 * configure: Regenerate.
5771
5772 2018-01-16 Yao Qi <yao.qi@linaro.org>
5773
5774 PR gdb/18749
5775 * linux-low.c (fetch_register): Call supply_register instead of
5776 error.
5777
5778 2018-01-08 Yao Qi <yao.qi@linaro.org>
5779 Simon Marchi <simon.marchi@ericsson.com>
5780
5781 * Makefile.in (OBS): Remove selftest.o.
5782 * configure.ac: Set srv_selftest_objs if $development is true.
5783 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5784 * configure: Re-generated.
5785 * server.c (captured_main): Wrap variable selftest_filter with
5786 GDB_SELF_TEST.
5787
5788 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5789
5790 * server.c (parse_debug_format_options): Return std::string.
5791 (handle_monitor_command, captured_main): Adjust.
5792
5793 2018-01-05 Pedro Alves <palves@redhat.com>
5794
5795 PR gdb/18653
5796 * server.c (captured_main): Pass quiet=false to
5797 save_original_signals_state.
5798
5799 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5800
5801 * gdbreplay.c (gdbreplay_version): Update copyright year in
5802 version message.
5803 * server.c (gdbserver_version): Likewise.
5804
5805 2017-12-08 Tom Tromey <tom@tromey.com>
5806
5807 * ax.c (ax_printf): Update.
5808
5809 2017-12-07 Yao Qi <yao.qi@linaro.org>
5810
5811 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5812 aarch64_linux_read_description.
5813 * linux-amd64-ipa.c (idx2mask): New array.
5814 (get_ipa_tdesc): Move idx2mask out.
5815 (initialize_low_tracepoint): Initialize target descriptions.
5816 * linux-i386-ipa.c (idx2mask): New array.
5817 (get_ipa_tdesc): Move idx2mask out.
5818 (initialize_low_tracepoint): Initialize target descriptions.
5819
5820 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5821
5822 * tdesc.c (struct tdesc_type): Change return type.
5823 (tdesc_add_flag): Change parameter type.
5824 (tdesc_add_bitfield): Likewise.
5825 (tdesc_add_field): Likewise.
5826 (tdesc_set_struct_size): Likewise.
5827
5828 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5829
5830 * regcache.c (registers_to_string): Remove unused variable.
5831
5832 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5833
5834 * inferiors.c (for_each_inferior_with_data): Remove.
5835 * inferiors.h (for_each_inferior_with_data): Remove.
5836 * server.c (handle_qxfer_threads_worker): Change parameter type.
5837 (handle_qxfer_threads_proper): Use for_each_thread.
5838
5839 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5840
5841 * inferiors.c (for_each_inferior): Remove.
5842 (clear_inferiors): Use for_each_thread.
5843 * inferiors.h (for_each_inferior): Remove.
5844 * linux-low.c (linux_wait_for_event_filtered): Use
5845 for_each_thread.
5846 (linux_stabilize_threads): Likewise.
5847 * regcache.c (regcache_release): Likewise.
5848 * server.c (gdb_wants_all_threads_stopped): Likewise.
5849 (clear_pending_status_callback): Remove.
5850 (handle_status): Use for_each_thread.
5851 (captured_main): Likewise.
5852 * win32-low.c (child_init_thread_list): Likewise.
5853 (win32_clear_inferiors): Likewise.
5854 (fake_breakpoint_event): Likewise.
5855
5856 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5857
5858 * inferiors.h (find_inferior): Remove.
5859 * inferiors.c (find_inferior): Remove.
5860
5861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5862
5863 * linux-low.c (resume_status_pending_p): Update comment.
5864 (need_step_over_p): Update comment.
5865
5866 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5867
5868 * linux-low.c (proceed_one_lwp): Return void, change parameter
5869 type.
5870 (unsuspend_and_proceed_one_lwp): Likewise.
5871 (proceed_all_lwps): Use for_each_thread.
5872 (unstop_all_lwps): Likewise.
5873
5874 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5875
5876 * linux-low.c (linux_resume_one_thread): Return void, take
5877 parameter directly.
5878 (linux_resume): Use for_each_thread.
5879
5880 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5881
5882 * linux-low.c (send_sigstop_callback): Return void, change
5883 parameter type. Rename to...
5884 (send_sigstop): ... this.
5885 (suspend_and_send_sigstop_callback): Return void, change parameter
5886 type. Rename to...
5887 (suspend_and_send_sigstop): ... this.
5888 (stop_all_lwps): Use for_each_thread.
5889
5890 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5891
5892 * linux-low.c (lwp_running): Return bool, remove unused
5893 argument.
5894 (linux_stabilize_threads): Use find_thread.
5895
5896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5897
5898 * linux-low.c (select_singlestep_lwp_callback): Remove.
5899 (count_events_callback): Remove.
5900 (select_event_lwp_callback): Remove.
5901 (select_event_lwp): Use find_thread/for_each_thread.
5902
5903 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5904
5905 * linux-low.c (not_stopped_callback): Return bool, take filter
5906 argument directly.
5907 (linux_wait_for_event_filtered): Use find_thread.
5908 (linux_wait_1): Likewise.
5909
5910 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5911
5912 * linux-low.c (same_lwp): Remove.
5913 (find_lwp_pid): Use find_thread.
5914
5915 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5916
5917 * linux-low.c (delete_lwp_callback): Remove.
5918 (linux_mourn): Use for_each_thread.
5919
5920 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5921
5922 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5923 args parameter, don't check for pid.
5924 (linux_detach): Use for_each_thread.
5925
5926 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5927
5928 * linux-low.c (struct counter): Remove.
5929 (second_thread_of_pid_p): Remove.
5930 (last_thread_of_process_p): Use find_thread.
5931
5932 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5933
5934 * inferiors.c (find_inferior_in_random): Remove.
5935 * inferiors.h (find_inferior_in_random): Remove.
5936 * linux-low.c (status_pending_p_callback): Return bool, accept
5937 parameter ptid directly.
5938 (linux_wait_for_event_filtered): Use find_thread_in_random.
5939 (linux_wait_1): Likewise.
5940
5941 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5942
5943 * inferiors.c (find_inferior_id): Remove.
5944 (find_thread_ptid): Move implemention from find_inferior_id to
5945 here.
5946 * inferiors.h (find_inferior_id): Remove.
5947 * server.c (handle_status): Use find_thread_ptid.
5948 (process_serial_event): Likewise.
5949 * thread-db.c (find_one_thread): Likewise.
5950 (thread_db_thread_handle): Likewise.
5951 * win32-low.c (thread_rec): Likewise.
5952 (child_delete_thread): Likewise.
5953 (win32_thread_alive): Likewise.
5954 (get_child_debug_event): Likewise.
5955
5956 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5957
5958 * linux-mips-low.c (update_watch_registers_callback): Return
5959 void, remove pid_p parameter, don't check for pid.
5960 (mips_insert_point, mips_remove_point): Use for_each_thread.
5961
5962 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5963
5964 * lynx.low (lynx_delete_thread_callback): Remove.
5965 (lynx_mourn): Use for_each_thread.
5966
5967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5968
5969 * regcache.c (regcache_invalidate_one): Remove.
5970 (regcache_invalidate_pid): use for_each_thread.
5971
5972 2017-11-26 Tom Tromey <tom@tromey.com>
5973
5974 * linux-low.c (linux_create_inferior): Update.
5975
5976 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5977
5978 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5979
5980 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5981
5982 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5983 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5984 * linux-aarch64-tdesc-selftest.c: New file.
5985 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5986
5987 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5988
5989 * configure.srv: Add new file.
5990 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5991 * linux-aarch64-tdesc-selftest.c: New file.
5992 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5993
5994 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5995
5996 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5997 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5998 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5999
6000 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6001
6002 * configure.srv: Add new files.
6003 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6004 aarch64_linux_read_description.
6005 * linux-aarch64-low.c (aarch64_linux_read_description):
6006 Merge with aarch64_arch_setup.
6007 (aarch64_arch_setup): Call aarch64_linux_read_description.
6008 * linux-aarch64-tdesc.c: New file.
6009 * linux-aarch64-tdesc.h: New file.
6010
6011 2017-11-24 Yao Qi <yao.qi@linaro.org>
6012
6013 * configure.srv: Set $srv_regobj for tic6x-linux.
6014 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6015 (tic6x_read_description): Move some code to tic6x_arch_setup.
6016 (tic6x_tdesc_test): New function.
6017 (initialize_low_arch): Call selftests::register_test.
6018
6019 2017-11-22 Yao Qi <yao.qi@linaro.org>
6020
6021 * remote-utils.c (prepare_resume_reply): Use memcpy.
6022
6023 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6024
6025 * linux-low.c (kill_one_lwp_callback): Return void, take
6026 argument directly, don't filter on pid.
6027 (linux_kill): Use for_each_thread.
6028
6029 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6030
6031 * linux-low.c (need_step_over_p): Return bool, remove dummy
6032 argument.
6033 (linux_resume, proceed_all_lwps): Use find_thread.
6034
6035 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6036
6037 * linux-low.c (resume_status_pending_p): Return bool, remove
6038 flag_p argument.
6039 (linux_resume): Use find_thread.
6040
6041 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6042
6043 * linux-low.c (struct thread_resume_array): Remove.
6044 (linux_set_resume_request): Return void, take arguments
6045 directly.
6046 (linux_resume): Use for_each_thread.
6047
6048 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6049
6050 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6051 return bool, remove data argument.
6052 (linux_stabilize_threads): Use find_thread.
6053
6054 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6055
6056 * linux-low.c (unsuspend_one_lwp): Remove.
6057 (unsuspend_all_lwps): Use for_each_thread, inline code from
6058 unsuspend_one_lwp.
6059
6060 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6063 * linux-low.c (struct iterate_over_lwps_args): Remove.
6064 (iterate_over_lwps_filter): Remove.
6065 (iterate_over_lwps): Use find_thread.
6066
6067 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6068
6069 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6070 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6071 code from reset_lwp_ptrace_options_callback.
6072
6073 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6074
6075 * linux-arm-low.c (struct update_registers_data): Remove.
6076 (update_registers_callback): Return void, take arguments
6077 directly, don't check thread's pid.
6078 (arm_insert_point, arm_remove_point): Use for_each_thread.
6079
6080 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6081
6082 * win32-low.c (continue_one_thread): Return void, take argument
6083 directly.
6084 (child_continue): Use for_each_thread.
6085
6086 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6087
6088 * win32-i386-low.c (update_debug_registers_callback): Rename
6089 to ...
6090 (update_debug_registers): ... this, return void, remove pid_p arg.
6091 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6092
6093 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6094
6095 * inferiors.h (struct process_info): Add constructor, initialize
6096 fields..
6097 <syscalls_to_catch>: Change type to std::vector<int>.
6098 * inferiors.c (add_process): Allocate process_info with new.
6099 (remove_process): Free process_info with delete.
6100 * linux-low.c (handle_extended_wait): Adjust.
6101 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6102 * server.c (handle_general_set): Adjust.
6103
6104 2017-11-16 Pedro Alves <palves@redhat.com>
6105
6106 * remote-utils.c (remote_close): Block SIGIO signals instead of
6107 uninstalling the SIGIO handler.
6108
6109 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6110
6111 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6112
6113 2017-11-16 Yao Qi <yao.qi@linaro.org>
6114
6115 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6116 (tic6x_store_gregset): Likewise.
6117 (tic6x_usrregs_info): Move it up.
6118
6119 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6120
6121 * Makefile.in: Update arch rules.
6122 * configure.srv: Explicitly mark arch/ files.
6123
6124 2017-11-13 Andreas Schwab <schwab@suse.de>
6125
6126 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6127 function.
6128 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6129
6130 2017-11-06 Pedro Alves <palves@redhat.com>
6131
6132 * config.in, configure: Regenerate.
6133
6134 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * target.c (struct thread_search): Remove.
6137 (thread_search_callback): Remove.
6138 (prepare_to_access_memory): Use for_each_thread instead of
6139 find_inferior. Inline code from thread_search_callback.
6140
6141 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6142
6143 * server.c (struct visit_actioned_threads_data): Remove.
6144 (visit_actioned_threads): Change prototype to take arguments
6145 directly.
6146 (resume): Use find_thread instead of find_inferior.
6147
6148 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6149
6150 * server.c (queue_stop_reply_callback): Change prototype, return
6151 void.
6152 (find_status_pending_thread_callback): Remove.
6153 (handle_status): Replace find_inferior with find_thread and
6154 for_each_thread.
6155
6156 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6157
6158 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6159 with REGNO.
6160 (aarch64_store_gregset): Likewise.
6161 (aarch64_fill_fpregset): Likewise.
6162 (aarch64_store_fpregset): Likewise.
6163
6164 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6165
6166 * gdbthread.h (find_thread, for_each_thread): New functions.
6167 * inferiors.c (thread_of_pid): Remove.
6168 (find_any_thread_of_pid): Use find_thread.
6169 * linux-low.c (num_lwps): Use for_each_thread.
6170
6171 2017-10-17 Yao Qi <yao.qi@linaro.org>
6172
6173 * Makefile.in: Remove one rule.
6174 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6175
6176 2017-10-17 Yao Qi <yao.qi@linaro.org>
6177
6178 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6179 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6180
6181 2017-10-17 Yao Qi <yao.qi@linaro.org>
6182
6183 * configure.srv: Rename arm.o with arch/arm.o.
6184
6185 2017-10-17 Yao Qi <yao.qi@linaro.org>
6186
6187 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6188 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6189 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6190 (arch-i386.o, arch-amd64.o): Remove rules.
6191 (arch/%.o): New rule.
6192 Update POSTCOMPILE and COMPILE.pre.
6193 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6194 * configure: Re-generated.
6195 * configure.srv: Replace arch-i386.o with arch/i386.o.
6196 Replace arch-amd64.o with arch/amd64.o.
6197
6198 2017-10-16 Yao Qi <yao.qi@linaro.org>
6199
6200 * configure: Regenerated.
6201
6202 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6203
6204 * inferiors.h: (struct inferior_list): Remove.
6205 (struct inferior_list_entry); Remove.
6206 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6207 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6208 get_first_inferior): Remove.
6209 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6210 find_inferior_id, find_inferior_in_random): Change signature.
6211 * inferiors.c (all_threads): Change type to
6212 std::list<thread_info *>.
6213 (get_thread): Remove macro.
6214 (find_inferior, find_inferior_id): Change signature, implement
6215 using find_thread.
6216 (find_inferior_in_random): Change signature, implement using
6217 find_thread_in_random.
6218 (for_each_inferior, for_each_inferior_with_data): Change
6219 signature, implement using for_each_thread.
6220 (add_inferior_to_list, remove_inferior): Remove.
6221 (add_thread, get_first_thread, thread_of_pid,
6222 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6223 (get_first_inferior, one_inferior_p, clear_inferior_list):
6224 Remove.
6225 (clear_inferiors, get_thread_process): Update.
6226 * gdbthread.h: Include <list>.
6227 (struct thread_info) <entry>: Remove field.
6228 <id>: New field.
6229 (all_threads): Change type to std::list<thread_info *>.
6230 (get_first_inferior): Add doc.
6231 (find_thread, for_each_thread, find_thread_in_random): New
6232 functions.
6233 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6234 * linux-arm-low.c (update_registers_callback): Update.
6235 * linux-low.c (second_thread_of_pid_p): Update.
6236 (kill_one_lwp_callback, linux_detach_lwp_callback,
6237 delete_lwp_callback, status_pending_p_callback, same_lwp,
6238 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6239 iterate_over_lwps, not_stopped_callback,
6240 resume_stopped_resumed_lwps, count_events_callback,
6241 select_singlestep_lwp_callback, select_event_lwp_callback,
6242 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6243 suspend_and_send_sigstop_callback, wait_for_sigstop,
6244 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6245 lwp_running, linux_set_resume_request, resume_status_pending_p,
6246 need_step_over_p, start_step_over, linux_resume_one_thread,
6247 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6248 reset_lwp_ptrace_options_callback): Update.
6249 * linux-mips-low.c (update_watch_registers_callback): Update.
6250 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6251 Update.
6252 (free_register_cache_thread_one): Remove.
6253 (regcache_release): Update.
6254 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6255 handle_qxfer_threads_worker): Update.
6256 (handle_query): Update, use list iterator.
6257 (visit_actioned_threads, handle_pending_status,
6258 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6259 clear_pending_status_callback, set_pending_status_callback,
6260 find_status_pending_thread_callback, handle_status,
6261 process_serial_event): Update.
6262 * target.c (thread_search_callback): Update.
6263 * thread-db.c (thread_db_get_tls_address): Update.
6264 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6265 Update.
6266 * win32-i386-low.c (update_debug_registers_callback): Update.
6267 * win32-low.c (delete_thread_info, child_delete_thread,
6268 continue_one_thread, suspend_one_thread,
6269 get_child_debug_event): Adjust.
6270
6271 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6274 * inferiors.h: Include <list>.
6275 (struct process_info) <entry>: Remove field.
6276 <pid>: New field.
6277 (pid_of): Change macro to function.
6278 (ptid_of, lwpid_of): Remove macro.
6279 (all_processes): Change type to std::list<process_info *>.
6280 (ALL_PROCESSES): Remove macro.
6281 (for_each_process, find_process): New function.
6282 * inferiors.c (all_processes): Change type to
6283 std::list<process_info *>.
6284 (find_thread_process): Adjust.
6285 (add_process): Likewise.
6286 (remove_process): Likewise.
6287 (find_process_pid): Likewise.
6288 (get_first_process): Likewise.
6289 (started_inferior_callback): Remove.
6290 (have_started_inferiors_p): Adjust.
6291 (attached_inferior_callback): Remove.
6292 (have_attached_inferiors_p): Adjust.
6293 * linux-low.c (check_zombie_leaders): Likewise.
6294 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6295 (x86_linux_update_xmltarget): Adjust.
6296 * server.c (handle_query): Likewise.
6297 (gdb_reattached_process): Remove.
6298 (handle_status): Adjust.
6299 (kill_inferior_callback): Likewise.
6300 (detach_or_kill_inferior): Remove.
6301 (print_started_pid): Likewise.
6302 (print_attached_pid): Likewise.
6303 (detach_or_kill_for_exit): Update.
6304 (process_serial_event): Likewise.
6305 * linux-arm-low.c (arm_new_fork): Likewise.
6306
6307 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6308
6309 * dll.h: Include <list>.
6310 (struct dll_info): Add constructor.
6311 <entry>: Remove field.
6312 (all_dlls): Change type to std::list<dll_info>.
6313 * dll.c: Include <algorithm>.
6314 (get_dll): Remove macro.
6315 (all_dlls): Change type to std::list<dll_info *>.
6316 (free_one_dll): Remove.
6317 (match_dll): Likewise.
6318 (loaded_dll): Adjust.
6319 (unloaded_dll): Adjust to all_dlls type change, use
6320 std::find_if. Inline code from match_dll.
6321 (clear_dlls): Adjust to all_dlls type change.
6322 * server.c (emit_dll_description): Remove.
6323 (handle_qxfer_libraries): Adjust to all_dlls type change,
6324 integrate emit_dll_description's functionality.
6325
6326 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6327
6328 * linux-low.h (struct linux_target_ops) <delete_process>: New
6329 field.
6330 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6331 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6332 (struct linux_target_ops): Add delete_process callback.
6333 * linux-arm-low.c (arm_delete_process): New.
6334 (struct linux_target_ops): Add delete_process callback.
6335 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6336 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6337 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6338 * linux-mips-low.c (mips_linux_delete_process): New.
6339 (struct linux_target_ops): Add delete_process callback.
6340 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6341 * linux-s390-low.c (struct linux_target_ops): Likewise.
6342 * linux-sh-low.c (struct linux_target_ops): Likewise.
6343 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6344 * linux-tile-low.c (struct linux_target_ops): Likewise.
6345 * linux-x86-low.c (x86_linux_delete_process): New.
6346 (struct linux_target_ops): Add delete_process callback.
6347 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6348
6349 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6350
6351 * linux-aarch64-low.c (the_low_target): Add thread delete
6352 callback.
6353 * linux-arm-low.c (arm_delete_thread): New function.
6354 (the_low_target): Add thread delete callback.
6355 * linux-bfin-low.c (the_low_target): Likewise.
6356 * linux-crisv32-low.c (the_low_target): Likewise.
6357 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6358 set.
6359 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6360 field.
6361 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6362 * linux-mips-low.c (mips_linux_delete_thread): New function.
6363 (the_low_target): Add thread delete callback.
6364 * linux-ppc-low.c (the_low_target): Likewise.
6365 * linux-s390-low.c (the_low_target): Likewise.
6366 * linux-sh-low.c (the_low_target): Likewise.
6367 * linux-tic6x-low.c (the_low_target): Likewise.
6368 * linux-tile-low.c (the_low_target): Likewise.
6369 * linux-x86-low.c (the_low_target): Likewise.
6370 * linux-xtensa-low.c (the_low_target): Likewise.
6371
6372 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6373
6374 * win32-low.c: Include "common-inferior.h".
6375
6376 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6377
6378 * inferiors.c (set_inferior_cwd): New function.
6379 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6380 (handle_query): Inform that QSetWorkingDir is supported.
6381 * win32-low.c (create_process): Pass the inferior's cwd to
6382 CreateProcess.
6383
6384 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6385
6386 * inferiors.c (current_inferior_cwd): New global variable.
6387 (get_inferior_cwd): New function.
6388 * inferiors.h (struct process_info) <cwd>: New field.
6389
6390 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6391
6392 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6393 (OBS): Add gdb_tilde_expand.o.
6394
6395 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6396
6397 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6398 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6399
6400 2017-09-29 Pedro Alves <palves@redhat.com>
6401
6402 * ax.c (gdb_parse_agent_expr): Constify.
6403 * ax.h (gdb_parse_agent_expr): Constify.
6404 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6405 Constify.
6406 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6407 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6408 * remote-utils.h (read_ptid): Constify.
6409 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6410 (process_point_options, process_serial_event): Constify.
6411 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6412 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6413 (cmd_qtbuffer): Constify.
6414
6415 2017-09-29 Pedro Alves <palves@redhat.com>
6416
6417 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6418 fails.
6419
6420 2017-09-29 Pedro Alves <palves@redhat.com>
6421
6422 * linux-low.c (handle_extended_wait): Pass parent thread instead
6423 of process to thread_db_notice_clone.
6424 * linux-low.h (thread_db_notice_clone): Replace parent process
6425 parameter with parent thread parameter.
6426 * thread-db.c (find_one_thread): Add comment.
6427 (thread_db_notice_clone): Replace parent process parameter with
6428 parent thread parameter. Temporarily switch to the parent thread.
6429
6430 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6431
6432 * gdbthread.h: Include "common-gdbthread.h".
6433 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6434 "if" when validating the ptid.
6435 * remote-utils.c: Include "gdbthread.h".
6436 (prepare_resume_reply): Use "switch_to_thread".
6437 * target.c (done_accessing_memory): Likewise.
6438
6439 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6440
6441 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6442 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6443 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6444 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6445 s390x-gs-linux64-ipa.o to ipa_obj.
6446 * linux-s390-low.c (HWCAP_S390_GS): New define.
6447 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6448 New functions.
6449 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6450 (s390_arch_setup): Check for guarded-storage support and choose
6451 appropriate tdesc.
6452 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6453 init_registers_s390x_gs_linux64.
6454 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6455 enum value.
6456 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6457 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6458
6459 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6460
6461 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6462
6463 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6464
6465 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6466 (thread_db_thread_handle): Declare.
6467 * linux-low.c (linux_target_ops): Initialize thread_handle.
6468 * server.c (handle_qxfer_threads_worker): Add support for
6469 "handle" attribute.
6470 * target.h (struct target_ops): Add new function pointer,
6471 thread_handle.
6472 (target_thread_handle): Define.
6473 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6474 field in lwp.
6475 (thread_db_thread_handle): New function.
6476
6477 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6478
6479 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6480 * linux-low.h (thread_db_notice_clone): Declare.
6481 * thread-db.c (thread_db_notice_clone): New function.
6482
6483 2017-09-21 Pedro Alves <palves@redhat.com>
6484
6485 * server.c (gdb_read_memory, handle_status, process_serial_event)
6486 (handle_serial_event, handle_target_event): Adjust to
6487 set_desired_thread prototype change.
6488 * target.c (set_desired_thread): Remove 'use_general' parameter
6489 and adjust.
6490 * target.h (set_desired_thread): Remove 'use_general' parameter.
6491
6492 2017-09-20 Tom Tromey <tom@tromey.com>
6493
6494 * target.c (target_terminal::terminal_state): Define.
6495 (target_terminal::init): Rename from target_terminal_init.
6496 (target_terminal::inferior): Rename from
6497 target_terminal_inferior.
6498 (target_terminal::ours): Rename from target_terminal_ours.
6499 (target_terminal::ours_for_output, target_terminal::info): New.
6500
6501 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6502
6503 * server.c (accumulate_file_name_length): Remove.
6504 (emit_dll_description): Adjust to std::string change.
6505 (handle_qxfer_libraries): Use std::string to hold document.
6506
6507 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6508
6509 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6510 return type of xml_escape_text.
6511 * server.c (emit_dll_description): Likewise.
6512
6513 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6514
6515 * server.c (captured_main): Accept argument for --selftest.
6516 Update run_tests call.
6517 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6518 when registering selftests.
6519
6520 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6521
6522 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6523 instead of "VEC" for "target_desc.reg_defs".
6524 (regcache_cpy): Likewise.
6525 (registers_to_string): Likewise.
6526 (registers_from_string): Likewise.
6527 (find_regno): Likewise.
6528 (supply_regblock): Likewise.
6529 (regcache_raw_read_unsigned): Likewise.
6530 * tdesc.c (init_target_desc): Likewise.
6531 (tdesc_create_reg): Likewise.
6532 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6533 (struct target_desc) <reg_defs>: Convert to "std::vector".
6534 (target_desc): Do not initialize "reg_defs".
6535 (~target_desc): Update code to use "std::vector" instead of "VEC"
6536 for "target_desc.reg_defs".
6537 (operator==): Likewise.
6538
6539 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6540
6541 * inferiors.h (thread_to_gdb_id): Remove.
6542 * inferiors.c (thread_to_gdb_id): Remove.
6543 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6544 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6545 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6546 Likewise.
6547 * nto-low.c (nto_fetch_registers, nto_store_registers,
6548 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6549
6550 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6551
6552 * inferiors.h (gdb_id_to_thread_id): Remove.
6553 * inferiors.c (gdb_id_to_thread_id): Remove.
6554 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6555 removal. Move pid declaration closer to where it's used.
6556
6557 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6558
6559 * server.c (handle_detach): New function.
6560 (process_serial_event): Move code out, call handle_detach.
6561
6562 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6563
6564 * server.c (require_running): Rename to ...
6565 (require_running_or_return): ... this ...
6566 (require_running_or_break): ... and this.
6567 (handle_query, process_serial_event): Adjust.
6568
6569 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6570
6571 * linux-low.c (linux_set_resume_request): Remove unused
6572 variables.
6573
6574 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6575
6576 * server.c (first_thread_of): Remove.
6577 (process_serial_event): Replace usage of first_thread_of with
6578 find_any_thread_of_pid.
6579 * tracepoint.c (same_process_p): Remove.
6580 (gdb_agent_about_to_close): Replace usage of same_process_p with
6581 find_any_thread_of_pid.
6582 * linux-x86-low.c (same_process_callback): Remove.
6583 (x86_arch_setup_process_callback): Replace usage of
6584 same_process_callback with find_any_thread_of_pid.
6585 * thread-db.c (any_thread_of): Remove.
6586 (switch_to_process): Replace usage of any_thread_of with
6587 find_any_thread_of_pid.
6588 * inferiors.c (thread_pid_matches_callback): Remove.
6589 (find_thread_process): Adjust to use find_any_thread_of_pid.
6590
6591 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6592
6593 * regcache.c (get_thread_regcache): Guard calls to "memset"
6594 with "!VEC_empty".
6595
6596 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6597
6598 * linux-low.c (handle_extended_wait): Use
6599 "allocate_target_description" instead of "XNEW".
6600 * linux-x86-low.c (initialize_low_arch): Likewise.
6601
6602 2017-09-05 Yao Qi <yao.qi@linaro.org>
6603
6604 * configure.srv (srv_i386_regobj): Remove.
6605 (srv_amd64_regobj): Remove.
6606 (srv_regobj): Set it to "" for x86 non-linux targets.
6607 * linux-x86-tdesc.c (i386_linux_read_description):
6608 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6609 (init_registers_i386): Remove the declaration.
6610 (tdesc_i386): Remove the declaration.
6611 (lynx_i386_arch_setup): Call i386_create_target_description.
6612 * nto-x86-low.c: Likewise.
6613 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6614 [!__x86_64__]: include arch/i386.h.
6615 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6616
6617 2017-09-05 Yao Qi <yao.qi@linaro.org>
6618
6619 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6620 i386/amd64-XXX-linux from it.
6621
6622 2017-09-05 Yao Qi <yao.qi@linaro.org>
6623
6624 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6625 false.
6626 (ipa_amd64_linux_regobj): Remove.
6627 (ipa_x32_linux_regobj): Remove.
6628
6629 2017-09-05 Yao Qi <yao.qi@linaro.org>
6630
6631 * Makefile.in (arch-amd64.o): New rule.
6632 * configure.srv: Append arch-amd64.o.
6633 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6634 (get_ipa_tdesc): Call amd64_linux_read_description.
6635 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6636 and init_registers_amd64_XXX.
6637 * linux-x86-low.c (x86_linux_read_description): Call
6638 amd64_linux_read_description.
6639 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6640 (initialize_low_arch): Don't call init_registers_x32_XXX and
6641 init_registers_amd64_XXX.
6642 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6643 and tdesc_amd64_XXX.
6644 [__x86_64__] (amd64_tdesc_test): New function.
6645 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6646 and init_registers_amd64_XXX.
6647 * linux-x86-tdesc.c: Include arch/amd64.h.
6648 (xcr0_to_tdesc_idx): New function.
6649 (i386_linux_read_description): New function.
6650 (amd64_get_ipa_tdesc_idx): New function.
6651 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6652 (amd64_get_ipa_tdesc): Declare.
6653
6654 2017-09-05 Yao Qi <yao.qi@linaro.org>
6655
6656 * configure.srv (srv_i386_linux_xmlfiles): Remove
6657 i386/i386-XXX-linux.xml from it.
6658
6659 2017-09-05 Yao Qi <yao.qi@linaro.org>
6660
6661 * configure.srv: Set srv_i386_linux_regobj empty if $development
6662 is false.
6663 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6664 initialize_low_tdesc.
6665 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6666 with #if initialize_low_tdesc.
6667 * linux-x86-tdesc-selftest.c: New file.
6668 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6669
6670 2017-09-05 Yao Qi <yao.qi@linaro.org>
6671
6672 * Makefile.in (arch-i386.o): New rule.
6673 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6674 (x86_64-*-linux*): Likewise.
6675 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6676 include arch/i386.h.
6677 (i386_linux_read_description): Remove code and call
6678 i386_create_target_description.
6679 * tdesc.c (allocate_target_description): New function.
6680 * tdesc.h (set_tdesc_architecture): Remove declaration.
6681 (set_tdesc_osabi): Likewise.
6682
6683 2017-09-05 Yao Qi <yao.qi@linaro.org>
6684
6685 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6686 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6687 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6688 .xmltarget.
6689 * server.c (get_features_xml): Call tdesc_get_features_xml.
6690 * tdesc.c (set_tdesc_architecture): New function.
6691 (set_tdesc_osabi): New function.
6692 (tdesc_get_features_xml): New function.
6693 (tdesc_create_feature): Add an argument.
6694 * tdesc.h (struct target_desc) <features>: New field.
6695 <arch, osabi>: New field.
6696 (~target_desc): xfree features, arch, and osabi.
6697 (target_desc::oerator==): Don't compare .xmltarget.
6698 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6699 (set_tdesc_osabi): Likewise.
6700 (tdesc_get_features_xml): Likewise.
6701
6702 2017-09-05 Yao Qi <yao.qi@linaro.org>
6703
6704 * linux-x86-tdesc.c: Include selftest.h.
6705 (i386_tdesc_test): New function.
6706 (initialize_low_tdesc): Call selftests::register_test.
6707 * tdesc.h: Include regdef.h.
6708 (target_desc): Override operator == and !=.
6709
6710 2017-09-05 Yao Qi <yao.qi@linaro.org>
6711
6712 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6713 (ipa_obj): Likewise.
6714 * linux-i386-ipa.c: Include common/x86-xstate.h
6715 (get_ipa_tdesc): Call i386_linux_read_description.
6716 (initialize_low_tracepoint): Don't call init_registers_XXX
6717 functions, call initialize_low_tdesc instead.
6718 * linux-x86-low.c (x86_linux_read_description): Call
6719 i386_linux_read_description.
6720 (initialize_low_arch): Don't call init_registers_i386_XXX
6721 functions, call initialize_low_tdesc.
6722 * linux-x86-tdesc.c: New file.
6723 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6724 (i386_get_ipa_tdesc_idx): Declare.
6725 (i386_get_ipa_tdesc): Declare.
6726 (initialize_low_tdesc): Declare.
6727
6728 2017-09-05 Yao Qi <yao.qi@linaro.org>
6729
6730 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6731 instead of 0.
6732
6733 2017-09-05 Yao Qi <yao.qi@linaro.org>
6734
6735 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6736 * regcache.c (get_thread_regcache): Use VEC_length.
6737 (init_register_cache): Likewise.
6738 (regcache_cpy): Likewise.
6739 (registers_to_string): Iterate reg_defs via VEC_iterate.
6740 (find_regno): Likewise.
6741 (find_register_by_number): Use VEC_index.
6742 (register_size): Call find_register_by_number.
6743 (register_data): Call find_register_by_number.
6744 (supply_regblock): Use VEC_length.
6745 (regcache_raw_read_unsigned): Likewise.
6746 * tdesc.c (init_target_desc): Iterate reg_defs via
6747 VEC_iterate.
6748 (default_description): Update initializer.
6749 (copy_target_description): Don't update field num_registers.
6750 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6751 <num_registers>: Remove.
6752
6753 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6754
6755 * Makefile.in (.SECONDARY): Define target.
6756
6757 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6758
6759 * linux-low.c (linux_wait_1): Adjust.
6760 * server.c (queue_stop_reply_callback): Adjust.
6761
6762 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6763
6764 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6765 QEnvironmentUnset and QEnvironmentReset packets.
6766 (handle_query): Inform remote that QEnvironmentHexEncoded,
6767 QEnvironmentUnset and QEnvironmentReset are supported.
6768
6769 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6770
6771 * inferiors.h (inferior_target_data): Rename to ...
6772 (thread_target_data): ... this.
6773 (inferior_regcache_data): Rename to ...
6774 (thread_regcache_data): ... this.
6775 (set_inferior_regcache_data): Rename to ...
6776 (set_thread_regcache_data): ... this.
6777 * inferiors.c (inferior_target_data): Rename to ...
6778 (thread_target_data): ... this.
6779 (inferior_regcache_data): Rename to ...
6780 (thread_regcache_data): ... this.
6781 (set_inferior_regcache_data): Rename to ...
6782 (set_thread_regcache_data): ... this.
6783 (free_one_thread): Update.
6784 * linux-low.h (get_thread_lwp): Update.
6785 * regcache.c (get_thread_regcache): Update.
6786 (regcache_invalidate_thread): Update.
6787 (free_register_cache_thread): Update.
6788 * win32-i386-low.c (update_debug_registers_callback): Update.
6789 (win32_get_current_dr): Update.
6790 * win32-low.c (thread_rec): Update.
6791 (delete_thread_info): Update.
6792 (continue_one_thread): Update.
6793 (suspend_one_thread): Update.
6794
6795 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * inferiors.c (set_inferior_target_data): Remove.
6798 * inferiors.h (set_inferior_target_data): Remove.
6799
6800 2017-08-18 Yao Qi <yao.qi@linaro.org>
6801
6802 * Makefile.in (OBS): Add selftest.o.
6803 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6804 * configure, config.in: Re-generated.
6805 * server.c: Include common/sefltest.h.
6806 (captured_main): Handle option --selftest.
6807
6808 2017-08-09 Yao Qi <yao.qi@linaro.org>
6809
6810 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6811 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6812 i386-avx-mpx.o and i386-mmx.o.
6813 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6814 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6815 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6816 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6817 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6818 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6819 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6820 i386/amd64-avx-mpx.xml.
6821
6822 2017-08-09 Yao Qi <yao.qi@linaro.org>
6823
6824 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6825 and x32-avx-avx512.o.
6826 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6827 i386/x32-avx-avx512.xml.
6828
6829 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6830
6831 * tracepoint.h (enum class fast_tpoint_collect_result): New
6832 enumeration.
6833 (fast_tracepoint_collecting): Change return type to
6834 fast_tpoint_collect_result.
6835 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6836 * linux-low.h: Include tracepoint.h.
6837 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6838 fast_tpoint_collect_result.
6839 * linux-low.c (handle_tracepoints): Adjust.
6840 (linux_fast_tracepoint_collecting): Change return type to
6841 fast_tpoint_collect_result.
6842 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6843 linux_wait_1, stuck_in_jump_pad_callback,
6844 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6845 proceed_one_lwp): Adjust to type change.
6846
6847 2017-07-10 Yao Qi <yao.qi@linaro.org>
6848
6849 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6850
6851 2017-06-29 Yao Qi <yao.qi@linaro.org>
6852
6853 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6854 Remove.
6855 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6856
6857 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6858
6859 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6860
6861 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6862
6863 * linux-low.c (linux_create_inferior): Adjust code to access the
6864 environment information via 'gdb_environ' class.
6865 * lynx-low.c (lynx_create_inferior): Likewise.
6866 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6867 (get_environ): Return a pointer to 'our_environ'.
6868 (captured_main): Initialize 'our_environ'.
6869 * server.h (get_environ): Adjust prototype.
6870 * spu-low.c (spu_create_inferior): Adjust code to access the
6871 environment information via 'gdb_environ' class.
6872
6873 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6874
6875 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6876 usage of "register" keyword.
6877
6878 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6879
6880 * configure: Re-generate.
6881
6882 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6883
6884 * configure: Re-generate.
6885
6886 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6887
6888 * Makefile.in (COMPILE.pre): Add "-x c++".
6889
6890 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6891
6892 * fork-child.c: Conditionally include <signal.h>.
6893
6894 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6895
6896 * server.c (handle_general_set): Handle new packet
6897 "QStartupWithShell".
6898 (handle_query): Add "QStartupWithShell" to the list of supported
6899 packets.
6900 (gdbserver_usage): Add help text explaining the
6901 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6902 options.
6903 (captured_main): Recognize and act upon the presence of the new
6904 CLI options.
6905
6906 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6907 Pedro Alves <palves@redhat.com>
6908
6909 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6910 * configure: Regenerate.
6911 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6912 "fork-inferior.o".
6913 (i[34567]86-*-lynxos*): Likewise.
6914 (spu*-*-*): Likewise.
6915 * fork-child.c: New file.
6916 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6917 and "environ.h".
6918 (linux_ptrace_fun): New function.
6919 (linux_create_inferior): Adjust function prototype to reflect
6920 change on "target.h". Adjust function code to use
6921 "fork_inferior".
6922 (linux_request_interrupt): Delete "signal_pid".
6923 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6924 (lynx_ptrace_fun): New function.
6925 (lynx_create_inferior): Adjust function prototype to reflect
6926 change on "target.h". Adjust function code to use
6927 "fork_inferior".
6928 * nto-low.c (nto_create_inferior): Adjust function prototype and
6929 code to reflect change on "target.h". Update comments.
6930 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6931 "common-terminal.h" and "environ.h".
6932 (terminal_fd): Moved to fork-child.c.
6933 (old_foreground_pgrp): Likewise.
6934 (restore_old_foreground_pgrp): Likewise.
6935 (last_status): Make it global.
6936 (last_ptid): Likewise.
6937 (our_environ): New variable.
6938 (startup_with_shell): Likewise.
6939 (program_name): Likewise.
6940 (program_argv): Rename to...
6941 (program_args): ...this.
6942 (wrapper_argv): New variable.
6943 (start_inferior): Delete function.
6944 (get_exec_wrapper): New function.
6945 (get_exec_file): Likewise.
6946 (get_environ): Likewise.
6947 (prefork_hook): Likewise.
6948 (post_fork_inferior): Likewise.
6949 (postfork_hook): Likewise.
6950 (postfork_child_hook): Likewise.
6951 (handle_v_run): Update code to deal with arguments coming from the
6952 remote host. Update calls from "start_inferior" to
6953 "create_inferior".
6954 (captured_main): Likewise. Initialize environment variable. Call
6955 "have_job_control".
6956 * server.h (post_fork_inferior): New prototype.
6957 (get_environ): Likewise.
6958 (last_status): Declare.
6959 (last_ptid): Likewise.
6960 (signal_pid): Likewise.
6961 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6962 (spu_ptrace_fun): New function.
6963 (spu_create_inferior): Adjust function prototype to reflect change
6964 on "target.h". Adjust function code to use "fork_inferior".
6965 * target.c (target_terminal_init): New function.
6966 (target_terminal_inferior): Likewise.
6967 (target_terminal_ours): Likewise.
6968 * target.h: Include <vector>.
6969 (struct target_ops) <create_inferior>: Update prototype.
6970 (create_inferior): Update macro.
6971 * utils.c (gdb_flush_out_err): New function.
6972 * win32-low.c (win32_create_inferior): Adjust function prototype
6973 and code to reflect change on "target.h".
6974
6975 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6976
6977 * inferiors.c (switch_to_thread): New function.
6978
6979 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6980
6981 * Makefile.in (SFILE): Add "common/job-control.c".
6982 (OBS): Add "job-control.o".
6983
6984 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6985
6986 * Makefile: Remove "@host_makefile_frag@".
6987
6988 2017-05-05 Pedro Alves <palves@redhat.com>
6989
6990 * configure: Regenerate.
6991
6992 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6993
6994 * configure: Regenerate.
6995
6996 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6997
6998 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6999 software_single_step change of return type to
7000 std::vector<CORE_ADDR>.
7001 * linux-low.c (install_software_single_step_breakpoints):
7002 Likewise.
7003 * linux-low.h (install_software_single_step_breakpoints):
7004 Likewise.
7005
7006 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7007
7008 * remote-utils.c: Include "gdb_termios.h" instead of
7009 "terminal.h".
7010 * terminal.h: Delete file.
7011
7012 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7013
7014 * server.c: Include <vector>.
7015 <program_argv, wrapper_argv>: Convert to std::vector.
7016 (start_inferior): Rewrite function to use C++.
7017 (handle_v_run): Likewise. Update code that calculates the argv
7018 based on the vRun packet; use C++.
7019 (captured_main): Likewise.
7020
7021 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7022
7023 * server.c (handle_v_cont): Initialize thread_resume::thread
7024 with null_ptid.
7025
7026 2017-04-05 Pedro Alves <palves@redhat.com>
7027
7028 * configure: Regenerate.
7029
7030 2017-04-05 Pedro Alves <palves@redhat.com>
7031
7032 * gdbreplay.c (sync_error): Constify.
7033 * linux-x86-low.c (push_opcode): Constify.
7034
7035 2017-04-05 Pedro Alves <palves@redhat.com>
7036
7037 * win32-low.c (get_child_debug_event)
7038 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7039 Report TARGET_WAITKIND_SPURIOUS instead.
7040
7041 2017-04-05 Pedro Alves <palves@redhat.com>
7042
7043 * remote-utils.c (remote_prepare, remote_open): Constify.
7044 * remote-utils.h (remote_prepare, remote_open): Constify.
7045 * server.c (captured_main): Constify 'port' handling.
7046
7047 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7048
7049 * Makefile.in (clean): Clear .deps.
7050
7051 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7052
7053 * .gitignore: Remove generated files, replace with wildcard.
7054 * (clean): Replace removal of generated files with wildcard.
7055 (version.c): Replace with...
7056 (version-generated.c): ...this.
7057 (xml-builtin.c): Replace with...
7058 (xml-builtin-generated.c): ...this.
7059 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7060 (%.c: *regformats*): Replace with...
7061 (%-generated.c: *regformats*): ...this.
7062
7063 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7064
7065 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7066 (xtensa_fill_gregset): Call collect_register_by_name for
7067 threadptr register.
7068 (xtensa_store_gregset): Call supply_register_by_name for
7069 threadptr register.
7070
7071 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7072
7073 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7074 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7075 (xtensa_store_gregset): Call supply_register for all registers in
7076 a0_regnum..a0_regnum + C0_NREGS range.
7077
7078 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7079
7080 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7081 (ax-ipa.o: ax.c): Remove.
7082 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7083 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7084 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7085 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7086 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7087
7088 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7089
7090 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7091 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7092 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7093 (errors-ipa.o: ../common/errors.c): Remove.
7094 (format-ipa.o: ../common/format.c): Remove.
7095 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7096
7097 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7098
7099 * Makefile.in (%-ipa.o: %.c): New rule.
7100 (tracepoint-ipa.o: tracepoint.c): Remove.
7101 (utils-ipa.o: utils.c): Remove.
7102 (remote-utils-ipa.o: remote-utils.c): Remove.
7103 (regcache-ipa.o: regcache.c): Remove.
7104 (i386-linux-ipa.o: i386-linux.c): Remove.
7105 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7106 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7107 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7108 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7109 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7110 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7111 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7112 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7113 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7114 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7115 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7116 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7117 (aarch64-ipa.o: aarch64.c): Remove.
7118 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7119 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7120 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7121 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7122 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7123 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7124 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7125 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7126 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7127 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7128 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7129 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7130 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7131 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7132 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7133 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7134 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7135 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7136 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7137 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7138 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7139 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7140 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7141 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7142 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7143 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7144 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7145 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7146 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7147 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7148 (tdesc-ipa.o: tdesc.c): Remove.
7149 (x32-linux-ipa.o: x32-linux.c): Remove.
7150 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7151 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7152
7153 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7154
7155 * Makefile.in (%.o: ../arch/%.c): New rule.
7156 (arm.o: ../arch/arm.c): Remove.
7157 (arm-linux.o: ../arch/arm-linux.c): Remove.
7158 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7159 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7160
7161 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7162
7163 * Makefile.in (%.o: ../nat/%.c): New rule.
7164 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7165 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7166 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7167 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7168 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7169 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7170 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7171 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7172 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7173 (linux-personality.o: ../nat/linux-personality.c): Remove.
7174 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7175 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7176 (x86-linux.o: ../nat/x86-linux.c): Remove.
7177 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7178 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7179
7180 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7181
7182 * Makefile.in (%.o: ../common/%.c): New rule.
7183 (signals.o: ../common/signals.c): Remove.
7184 (print-utils.o: ../common/print-utils.c): Remove.
7185 (rsp-low.o: ../common/rsp-low.c): Remove.
7186 (common-utils.o: ../common/common-utils.c): Remove.
7187 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7188 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7189 (vec.o: ../common/vec.c): Remove.
7190 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7191 (xml-utils.o: ../common/xml-utils.c): Remove.
7192 (ptid.o: ../common/ptid.c): Remove.
7193 (buffer.o: ../common/buffer.c): Remove.
7194 (format.o: ../common/format.c): Remove.
7195 (filestuff.o: ../common/filestuff.c): Remove.
7196 (agent.o: ../common/agent.c): Remove.
7197 (errors.o: ../common/errors.c): Remove.
7198 (environ.o: ../common/environ.c): Remove.
7199 (common-debug.o: ../common/common-debug.c): Remove.
7200 (cleanups.o: ../common/cleanups.c): Remove.
7201 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7202 (fileio.o: ../common/fileio.c): Remove.
7203 (common-regcache.o: ../common/common-regcache.c): Remove.
7204 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7205 (new-op.o: ../common/new-op.c): Remove.
7206 (btrace-common.o: ../common/btrace-common.c): Remove.
7207
7208 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7209
7210 * Makefile.in (%.o: ../target/%.c): New rule.
7211 (waitstatus.o: ../target/waitstatus.c): Remove.
7212
7213 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7214
7215 * Makefile.in
7216 (%.c: ../regformats/%.dat,
7217 (%.c: ../regformats/arm/%.dat,
7218 (%.c: ../regformats/i386/%.dat,
7219 (%.c: ../regformats/rs6000/%.dat): New rules.
7220 (aarch64.c): Remove.
7221 (reg-arm.c): Remove.
7222 (arm-with-iwmmxt.c): Remove.
7223 (arm-with-vfpv2.c): Remove.
7224 (arm-with-vfpv3.c): Remove.
7225 (arm-with-neon.c): Remove.
7226 (reg-bfin.c): Remove.
7227 (reg-cris.c): Remove.
7228 (reg-crisv32.c): Remove.
7229 (i386.c): Remove.
7230 (i386-linux.c): Remove.
7231 (i386-avx.c): Remove.
7232 (i386-avx-linux.c): Remove.
7233 (i386-avx-avx512.c): Remove.
7234 (i386-avx-avx512-linux.c): Remove.
7235 (i386-mpx.c): Remove.
7236 (i386-mpx-linux.c): Remove.
7237 (i386-avx-mpx-avx512-pku.c): Remove.
7238 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7239 (i386-avx-mpx.c): Remove.
7240 (i386-avx-mpx-linux.c): Remove.
7241 (i386-mmx.c): Remove.
7242 (i386-mmx-linux.c): Remove.
7243 (reg-ia64.c): Remove.
7244 (reg-m32r.c): Remove.
7245 (reg-m68k.c): Remove.
7246 (reg-cf.c): Remove.
7247 (mips-linux.c): Remove.
7248 (mips-dsp-linux.c): Remove.
7249 (mips64-linux.c): Remove.
7250 (mips64-dsp-linux.c): Remove.
7251 (nios2-linux.c): Remove.
7252 (powerpc-32.c): Remove.
7253 (powerpc-32l.c): Remove.
7254 (powerpc-altivec32l.c): Remove.
7255 (powerpc-cell32l.c): Remove.
7256 (powerpc-vsx32l.c): Remove.
7257 (powerpc-isa205-32l.c): Remove.
7258 (powerpc-isa205-altivec32l.c): Remove.
7259 (powerpc-isa205-vsx32l.c): Remove.
7260 (powerpc-e500l.c): Remove.
7261 (powerpc-64l.c): Remove.
7262 (powerpc-altivec64l.c): Remove.
7263 (powerpc-cell64l.c): Remove.
7264 (powerpc-vsx64l.c): Remove.
7265 (powerpc-isa205-64l.c): Remove.
7266 (powerpc-isa205-altivec64l.c): Remove.
7267 (powerpc-isa205-vsx64l.c): Remove.
7268 (s390-linux32.c): Remove.
7269 (s390-linux32v1.c): Remove.
7270 (s390-linux32v2.c): Remove.
7271 (s390-linux64.c): Remove.
7272 (s390-linux64v1.c): Remove.
7273 (s390-linux64v2.c): Remove.
7274 (s390-te-linux64.c): Remove.
7275 (s390-vx-linux64.c): Remove.
7276 (s390-tevx-linux64.c): Remove.
7277 (s390x-linux64.c): Remove.
7278 (s390x-linux64v1.c): Remove.
7279 (s390x-linux64v2.c): Remove.
7280 (s390x-te-linux64.c): Remove.
7281 (s390x-vx-linux64.c): Remove.
7282 (s390x-tevx-linux64.c): Remove.
7283 (tic6x-c64xp-linux.c): Remove.
7284 (tic6x-c64x-linux.c): Remove.
7285 (tic6x-c62x-linux.c): Remove.
7286 (reg-sh.c): Remove.
7287 (reg-sparc64.c): Remove.
7288 (reg-spu.c): Remove.
7289 (amd64.c): Remove.
7290 (amd64-linux.c): Remove.
7291 (amd64-avx.c): Remove.
7292 (amd64-avx-linux.c): Remove.
7293 (amd64-avx-avx512.c): Remove.
7294 (amd64-avx-avx512-linux.c): Remove.
7295 (amd64-mpx.c): Remove.
7296 (amd64-mpx-linux.c): Remove.
7297 (amd64-avx-mpx-avx512-pku.c): Remove.
7298 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7299 (amd64-avx-mpx.c): Remove.
7300 (amd64-avx-mpx-linux.c): Remove.
7301 (x32.c): Remove.
7302 (x32-linux.c): Remove.
7303 (x32-avx.c): Remove.
7304 (x32-avx-linux.c): Remove.
7305 (x32-avx-avx512.c): Remove.
7306 (x32-avx-avx512-linux.c): Remove.
7307 (reg-xtensa.c): Remove.
7308 (reg-tilegx.c): Remove.
7309 (reg-tilegx32.c): Remove.
7310
7311 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7312
7313 * Makefile.in (SFILES): Add "common/environ.c".
7314 (OBJS): Add "common/environ.h".
7315
7316 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7317
7318 * configure.ac: Check if the fs_base and gs_base members of
7319 `struct user_regs_struct' exist.
7320 * config.in: Regenerated.
7321 * configure: Likewise.
7322
7323 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7324
7325 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7326 target_read_memory.
7327 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7328 (get_next_pcs_syscall_next_pc): Likewise.
7329
7330 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7331
7332 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7333 * nto-x86-low.c: Likewise.
7334
7335 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7336
7337 * Makefile.in: Include disable-implicit-rules.mk.
7338
7339 2016-11-23 Pedro Alves <palves@redhat.com>
7340
7341 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7342 (debug_vprintf): Use std::chrono::steady_clock instead of
7343 gettimeofday. Use '.' instead of ':'.
7344 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7345 (get_timestamp): Use std::chrono::steady_clock instead of
7346 gettimeofday.
7347
7348 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7349
7350 * Makefile.in: Fix whitespace formatting.
7351
7352 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7353
7354 * Makefile.in (SFILES, OBS): Flatten list and order
7355 alphabetically.
7356
7357 2016-11-23 Pedro Alves <palves@redhat.com>
7358
7359 * event-loop.c (handle_file_event): Use warning.
7360 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7361 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7362 Use warning.
7363
7364 2016-11-23 Pedro Alves <palves@redhat.com>
7365
7366 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7367 output.
7368 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7369 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7370 debug_printf and debug_flush for debug output.
7371 * server.c (handle_general_set): Likewise.
7372 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7373 output.
7374
7375 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7376
7377 * Makefile.in (.c.o): Replace rule with ...
7378 (%.o: %.c): ... this one.
7379
7380 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7381
7382 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7383 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7384 make.
7385 * configure.ac: Remove checks for the make program.
7386 * configure: Re-generate.
7387
7388 2016-10-28 Pedro Alves <palves@redhat.com>
7389
7390 * Makefile.in (CXX_DIALECT): Get from configure.
7391 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7392 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7393 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7394 * config.in: Regenerate.
7395 * configure: Regenerate.
7396
7397 2016-10-27 Yao Qi <yao.qi@linaro.org>
7398
7399 * linux-low.c (linux_supports_range_stepping): Return true if
7400 can_software_single_step return true.
7401
7402 2016-10-27 Yao Qi <yao.qi@linaro.org>
7403
7404 * inferiors.c (find_inferior_in_random): New function.
7405 * inferiors.h (find_inferior_in_random): Declare.
7406 * linux-low.c (linux_wait_for_event_filtered): Call
7407 find_inferior_in_random instead of find_inferior.
7408
7409 2016-10-27 Yao Qi <yao.qi@linaro.org>
7410
7411 * linux-low.c (linux_wait_1): If single-step breakpoints are
7412 inserted, remove them.
7413
7414 2016-10-26 Pedro Alves <palves@redhat.com>
7415
7416 * linux-low.c (handle_extended_wait): Link parent/child fork
7417 threads.
7418 (linux_wait_1): Unlink them.
7419 (linux_set_resume_request): Ignore resume requests for
7420 already-resumed and unhandled fork child threads.
7421 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7422 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7423 New functions.
7424 (handle_v_requests) <vCont>: Don't call require_running.
7425 * server.h (in_queued_stop_replies): New declaration.
7426
7427 2016-10-24 Yao Qi <yao.qi@linaro.org>
7428
7429 PR server/20733
7430 * linux-aarch64-low.c (append_insns): Cast the return value to
7431 'uint32_t *'.
7432
7433 2016-10-10 Yao Qi <yao.qi@linaro.org>
7434
7435 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7436
7437 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7438
7439 * target.c (target_supports_multi_process): New function, moved
7440 from...
7441 * target.h (target_supports_multi_process): ... here. Remove
7442 macro.
7443
7444 2016-10-05 Tom Tromey <tom@tromey.com>
7445
7446 PR remote/20655:
7447 * tracepoint.c (handle_tracepoint_bkpts): Check
7448 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7449
7450 2016-10-05 Yao Qi <yao.qi@linaro.org>
7451
7452 * configure.srv: Update the path of arm-*.xml files.
7453
7454 2016-10-05 Terry Guo <terry.guo@arm.com>
7455 Yao Qi <yao.qi@linaro.org>
7456
7457 * Makefile.in: Adjust the path of rules.
7458 * configure.srv: Update the path of xml files.
7459 * regformats/arm-with-iwmmxt.dat: Regenerated.
7460 * regformats/arm-with-neon.dat: Likewise.
7461 * regformats/arm-with-vfpv2.dat: Likewise.
7462 * regformats/arm-with-vfpv3.dat Likewise.
7463
7464 2016-09-30 Yao Qi <yao.qi@linaro.org>
7465
7466 PR gdbserver/20627
7467 * target.c (target_stop_and_wait): Don't call
7468 target_continue_no_signal, use resume_stop instead.
7469
7470 2016-09-26 Yao Qi <yao.qi@linaro.org>
7471
7472 * linux-low.c (linux_wait_1): Call debug_exit.
7473
7474 2016-09-23 Pedro Alves <palves@redhat.com>
7475
7476 * Makefile.in (SFILES): Add common/new-op.c.
7477 (OBS): Add common/new-op.o.
7478 (new-op.o): New rule.
7479
7480 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7481
7482 * .gitinore: Ignore more files.
7483
7484 2016-09-21 Yao Qi <yao.qi@linaro.org>
7485
7486 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7487 23.
7488
7489 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7490
7491 * server.c (start_inferior): Call target_mourn_inferior instead of
7492 mourn_inferior; pass ptid_t argument to it.
7493 (resume): Likewise.
7494 (handle_target_event): Likewise.
7495 * target.c (target_mourn_inferior): New function.
7496 * target.h (mourn_inferior): Delete macro.
7497
7498 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7499
7500 * linux-low.c (lwp_is_stepping): New function.
7501
7502 2016-09-06 Carl Love <cel@us.ibm.com>
7503
7504 * server.c (start_inferior): Fixed comment, requested comment change
7505 didn't get updated correctly. Removed reference to ptrace () call as
7506 it is only true on Linux systems.
7507
7508 2016-09-06 Carl Love <cel@us.ibm.com>
7509
7510 * server.c (start_inferior): Do not call
7511 function target_post_create_inferior () if the
7512 inferior process has already exited.
7513
7514 2016-09-05 Pedro Alves <palves@redhat.com>
7515
7516 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7517 (COMPILE.pre, CC_LD): Use CXX directly.
7518 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7519 * acinclude.m4: Don't include build-with-cxx.m4.
7520 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7521 * configure: Regenerate.
7522
7523 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7524
7525 PR gdb/19495
7526 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7527 call writing data to own_buf.
7528
7529 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7530
7531 * target.c (mywait): Call target_wait instead of
7532 the_target->wait.
7533 (target_wait): New function.
7534
7535 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7536
7537 * server.c (start_inferior): New variable 'ptid'. Replace calls
7538 to the_target->resume by target_continue{,_no_signal}, depending
7539 on the case.
7540 * target.c (target_stop_and_wait): Call target_continue_no_signal
7541 instead of the_target->resume.
7542 (target_continue): New function.
7543
7544 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7545
7546 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7547
7548 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7549
7550 PR server/20491
7551 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7552 ps_prochandle.
7553 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7554 * linux-arm-low.c (ps_get_thread_area): Likewise.
7555 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7556 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7557 * linux-mips-low.c (ps_get_thread_area): Likewise.
7558 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7559 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7560 * linux-x86-low.c (ps_get_thread_area): Likewise.
7561 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7562
7563 2016-08-19 Pedro Alves <palves@redhat.com>
7564
7565 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7566
7567 2016-08-19 Pedro Alves <palves@redhat.com>
7568
7569 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7570 comment. Use memcpy instead of casting through unsigned long.
7571
7572 2016-08-19 Pedro Alves <palves@redhat.com>
7573
7574 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7575 allocating around 0x80000000.
7576
7577 2016-08-19 Pedro Alves <palves@redhat.com>
7578
7579 PR gdb/20415
7580 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7581 (x32-avx512-linux-ipa.o): New rules.
7582 * configure.ac (x86_64-*-linux*): New x32 check.
7583 * configure.srv (ipa_x32_linux_regobj): New.
7584 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7585 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7586 descriptions.
7587 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7588 descriptions.
7589 * configure: Regenerate.
7590
7591 2016-08-09 Pedro Alves <palves@redhat.com>
7592
7593 PR gdb/18653
7594 * Makefile.in (OBS): Add signals-state-save-restore.o.
7595 (signals-state-save-restore.o): New rule.
7596 * config.in: Regenerate.
7597 * configure: Regenerate.
7598 * linux-low.c: Include "signals-state-save-restore.h".
7599 (linux_create_inferior): Call
7600 restore_original_signals_state.
7601 * server.c: Include "dispositions-save-restore.h".
7602 (captured_main): Call save_original_signals_state.
7603
7604 2016-08-05 Pedro Alves <palves@redhat.com>
7605
7606 * configure: Regenerate.
7607
7608 2016-08-04 Yao Qi <yao.qi@linaro.org>
7609
7610 * linux-low.c (regsets_fetch_inferior_registers): Check
7611 errno is ESRCH or not.
7612
7613 2016-08-02 Yao Qi <yao.qi@linaro.org>
7614
7615 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7616 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7617 (thread_db_load_search): Update.
7618 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7619 td_ta_set_event and td_ta_event_getmsg.
7620
7621 2016-07-26 Pedro Alves <palves@redhat.com>
7622
7623 PR server/20414
7624 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7625 of unsigned long for 64-bit registers and use uint32_t instead of
7626 unsigned int for 32-bit registers.
7627
7628 2016-07-26 Pedro Alves <palves@redhat.com>
7629
7630 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7631 to 'ptrace'.
7632
7633 2016-07-21 Tom Tromey <tom@tromey.com>
7634
7635 * configure: Rebuild.
7636
7637 2016-07-21 Yao Qi <yao.qi@linaro.org>
7638
7639 * mem-break.c (find_gdb_breakpoint): Cast bp to
7640 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7641
7642 2016-07-21 Yao Qi <yao.qi@linaro.org>
7643
7644 * server.c (handle_v_requests): Support s and S actions
7645 if target_supports_software_single_step return true.
7646
7647 2016-07-21 Yao Qi <yao.qi@linaro.org>
7648
7649 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7650 is resume_step, call maybe_hw_step.
7651 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7652 and unstop them.
7653 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7654 breakpoints or not.
7655 (proceed_one_lwp): If resume request is resume_step, install
7656 reinsert breakpoints and call maybe_hw_step.
7657
7658 2016-07-21 Yao Qi <yao.qi@linaro.org>
7659
7660 * linux-low.c (proceed_one_lwp): Declare.
7661 (linux_resume_one_thread): Remove local variable 'step'.
7662 Lift code enqueue signal. Call proceed_one_lwp instead of
7663 linux_resume_one_lwp.
7664
7665 2016-07-21 Yao Qi <yao.qi@linaro.org>
7666
7667 * linux-low.c (linux_resume_one_thread): Call
7668 enqueue_pending_signal.
7669
7670 2016-07-21 Yao Qi <yao.qi@linaro.org>
7671
7672 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7673 * inferiors.c (do_restore_current_thread_cleanup): New function.
7674 (make_cleanup_restore_current_thread): Likewise.
7675 * linux-low.c (install_software_single_step_breakpoints): Call
7676 make_cleanup_restore_current_thread. Switch current_thread to
7677 thread.
7678
7679 2016-07-21 Yao Qi <yao.qi@linaro.org>
7680
7681 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7682 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7683 (clone_one_breakpoint): Likewise.
7684 (delete_reinsert_breakpoints): Change parameter to thread.
7685 Callers updated.
7686 (has_reinsert_breakpoints): Likewise.
7687 (uninsert_reinsert_breakpoints): Likewise.
7688 (reinsert_reinsert_breakpoints): Likewise.
7689 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7690 (delete_reinsert_breakpoints): Likewise.
7691 (reinsert_reinsert_breakpoints): Likewise.
7692 (uninsert_reinsert_breakpoints): Likewise.
7693 (has_reinsert_breakpoints): Likewise.
7694
7695 2016-07-21 Yao Qi <yao.qi@linaro.org>
7696
7697 * inferiors.c (get_thread_process): Make parameter const.
7698 * inferiors.h (get_thread_process): Update declaration.
7699 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7700 Add new parameters child_thread and parent_thread. Callers
7701 updated.
7702 * mem-break.h (clone_all_breakpoints): Update declaration.
7703
7704 2016-07-21 Yao Qi <yao.qi@linaro.org>
7705
7706 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7707 <command_list, handler>: Remove.
7708 (struct gdb_breakpoint): New.
7709 (struct other_breakpoint): New.
7710 (struct reinsert_breakpoint): New.
7711 (is_gdb_breakpoint): New function.
7712 (any_persistent_commands): Update command_list if
7713 is_gdb_breakpoint returns true.
7714 (set_breakpoint): Create breakpoints according to their types.
7715 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7716 (set_gdb_breakpoint_1): Likewise.
7717 (set_gdb_breakpoint): Likewise.
7718 (clear_breakpoint_conditions): Change parameter type to
7719 'struct gdb_breakpoint *'.
7720 (clear_breakpoint_commands): Likewise.
7721 (clear_breakpoint_conditions_and_commands): Likewise.
7722 (add_condition_to_breakpoint): Likewise.
7723 (add_breakpoint_condition): Likewise.
7724 (add_commands_to_breakpoint): Likewise.
7725 (check_breakpoints): Check other_breakpoint.
7726 (clone_one_breakpoint): Clone breakpopint according to its type.
7727 * mem-break.h (struct gdb_breakpoint): Declare.
7728 (set_gdb_breakpoint): Update declaration.
7729 (clear_breakpoint_conditions_and_commands): Likewise.
7730 (add_breakpoint_condition): Likewise.
7731 (add_breakpoint_commands): Likewise.
7732 * server.c (process_point_options): Change parameter type to
7733 'struct gdb_breakpoint *'.
7734
7735 2016-07-21 Yao Qi <yao.qi@linaro.org>
7736
7737 * mem-break.c (set_breakpoint_at): Rename it to ...
7738 (set_breakpoint_type_at): ... it.
7739 (set_breakpoint_at): Call set_breakpoint_type_at.
7740 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7741 * mem-break.h (set_breakpoint_at): Update comments.
7742
7743 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7744
7745 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7746 to buf parameter.
7747 (nios2_store_gregset): Likewise.
7748
7749 2016-07-01 Pedro Alves <palves@redhat.com>
7750 Antoine Tremblay <antoine.tremblay@ericsson.com>
7751
7752 * linux-low.c: Change interface to take the target lwp_info
7753 pointer directly and return void. Handle detaching from a zombie
7754 thread.
7755 (linux_detach_lwp_callback): New function.
7756 (linux_detach): Detach from the leader thread after detaching from
7757 the clone threads.
7758
7759 2016-06-28 Yao Qi <yao.qi@linaro.org>
7760
7761 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7762 for variable new_offset.
7763 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7764 (aarch64_ftrace_insn_reloc_cb): Likewise.
7765 (aarch64_ftrace_insn_reloc_tb): Likewise.
7766 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7767 PRIx64 instead of PRIx32.
7768
7769 2016-06-28 Yao Qi <yao.qi@linaro.org>
7770
7771 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7772 (the_low_target): Install arm_get_syscall_trapinfo.
7773
7774 2016-06-28 Yao Qi <yao.qi@linaro.org>
7775
7776 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7777 function.
7778 (the_low_target): Install aarch64_get_syscall_trapinfo.
7779
7780 2016-06-28 Yao Qi <yao.qi@linaro.org>
7781
7782 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7783 Callers updated.
7784 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7785 Remove parameter sysno.
7786 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7787 sysret.
7788
7789 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7790
7791 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7792 (s390_emit_ne_goto): Likewise.
7793 (s390_emit_lt_goto): Likewise.
7794 (s390_emit_le_goto): Likewise.
7795 (s390_emit_gt_goto): Likewise.
7796 (s390_emit_ge_goto): Likewise.
7797 (s390x_emit_eq_goto): Likewise.
7798 (s390x_emit_ne_goto): Likewise.
7799 (s390x_emit_lt_goto): Likewise.
7800 (s390x_emit_le_goto): Likewise.
7801 (s390x_emit_gt_goto): Likewise.
7802 (s390x_emit_ge_goto): Likewise.
7803 (s390_emit_ops_impl): Mark variable static.
7804 (s390x_emit_ops): Likewise.
7805
7806 2016-06-17 Yao Qi <yao.qi@linaro.org>
7807
7808 * linux-low.c (handle_extended_wait): Call
7809 uninsert_reinsert_breakpoints for the parent process. Remove
7810 reinsert breakpoints from the child process. Reinsert them to
7811 the parent process when vfork is done.
7812 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7813 (reinsert_reinsert_breakpoints): New function.
7814 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7815 (reinsert_reinsert_breakpoints): Declare.
7816
7817 2016-06-17 Yao Qi <yao.qi@linaro.org>
7818
7819 * linux-low.c (handle_extended_wait): If the parent is doing
7820 step-over, remove the reinsert breakpoints from the forked child.
7821
7822 2016-06-17 Yao Qi <yao.qi@linaro.org>
7823
7824 * linux-low.c (unsuspend_all_lwps): Declare.
7825 (linux_low_filter_event): If thread exited, call finish_step_over.
7826 If step-over is finished, unsuspend other threads.
7827
7828 2016-06-17 Yao Qi <yao.qi@linaro.org>
7829
7830 * linux-low.c (linux_resume_one_lwp_throw): Assert
7831 has_reinsert_breakpoints returns false.
7832 * mem-break.c (delete_disabled_breakpoints): Assert
7833 bp type isn't reinsert_breakpoint.
7834
7835 2016-06-17 Yao Qi <yao.qi@linaro.org>
7836
7837 * linux-low.c (maybe_hw_step): New function.
7838 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7839 (finish_step_over): Switch current_thread to lwp temporarily,
7840 and assert has_reinsert_breakpoints returns true.
7841 (proceed_one_lwp): Call maybe_hw_step.
7842 * mem-break.c (has_reinsert_breakpoints): New function.
7843 * mem-break.h (has_reinsert_breakpoints): Declare.
7844
7845 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7846
7847 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7848
7849 2016-05-17 Yao Qi <yao.qi@linaro.org>
7850
7851 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7852 instead of find_inferior.
7853
7854 2016-05-05 Yao Qi <yao.qi@linaro.org>
7855
7856 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7857 Initialize res to zero.
7858
7859 2016-05-05 Yao Qi <yao.qi@linaro.org>
7860
7861 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7862 to uint32_t.
7863
7864 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7865
7866 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7867 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7868 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7869
7870 2016-04-28 Par Olsson <par.olsson@windriver.com>
7871 Simon Marchi <simon.marchi@ericsson.com>
7872
7873 * tracepoint.c (write_inferior_int8): New function.
7874 (cmd_qtenable_disable): Write enable flag using
7875 write_inferior_int8.
7876
7877 2016-04-25 Yao Qi <yao.qi@linaro.org>
7878
7879 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7880 (need_step_over_p): Return zero if the LWP has pending signals
7881 can be delivered on software single step target.
7882
7883 2016-04-25 Yao Qi <yao.qi@linaro.org>
7884
7885 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7886 return instead of error.
7887
7888 2016-04-22 Yao Qi <yao.qi@linaro.org>
7889
7890 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7891 to 23.
7892
7893 2016-04-22 Yao Qi <yao.qi@linaro.org>
7894
7895 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7896 signal when stepping over breakpoint with software single
7897 step.
7898
7899 2016-04-21 Pedro Alves <palves@redhat.com>
7900
7901 * linux-s390-low.c (s390_collect_ptrace_register)
7902 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7903 add casts.
7904 (s390_check_regset): Use void * instead of gdb_byte *.
7905
7906 2016-04-20 Pedro Alves <palves@redhat.com>
7907
7908 * configure: Renegerate.
7909
7910 2016-04-20 Yao Qi <yao.qi@linaro.org>
7911
7912 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7913 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7914 number 16.
7915 (arm_store_gregset): Likewise.
7916
7917 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7918
7919 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7920 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7921 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7922 (amd64-avx-mpx-linux.c): New rules.
7923 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7924 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7925 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7926 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7927 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7928 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7929 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7930 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7931 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7932 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7933 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7934 * linux-x86-low.c (x86_linux_read_description): Add case for
7935 X86_XSTATE_AVX_MPX_MASK.
7936 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7937 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7938 init_registers_i386_avx_mpx_linux.
7939 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7940 (initialize_low_tracepoint): Call
7941 init_registers_i386_avx_mpx_linux.
7942 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7943 (initialize_low_tracepoint): Call
7944 init_registers_amd64_avx_mpx_linux.
7945 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7946 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7947 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7948 declarations.
7949
7950 2016-04-18 Pedro Alves <palves@redhat.com>
7951
7952 * configure: Regenerate.
7953
7954 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7955
7956 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7957 (aarch64_emit_sub): Likewise.
7958
7959 2016-04-12 Pedro Alves <palves@redhat.com>
7960
7961 * utils.c (prepare_to_throw_exception): Delete.
7962
7963 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7964
7965 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7966
7967 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7968
7969 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7970
7971 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7972
7973 * linux-aarch64-ipa.c: Add <elf.h> include.
7974 * linux-ppc-ipa.c: Add <elf.h> include.
7975 * linux-s390-ipa.c: Add <elf.h> include.
7976
7977 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7978
7979 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7980 (get_raw_reg_ptr): Likewise.
7981 (get_trace_state_variable_value_ptr): Likewise.
7982 (set_trace_state_variable_value_ptr): Likewise.
7983 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7984 char *.
7985
7986 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7987 Marcin Kościelnicki <koriakin@0x04.net>
7988
7989 PR/17221
7990 * linux-ppc-low.c (emit_insns): New function.
7991 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7992 (ppc_emit_prologue): New function.
7993 (ppc_emit_epilogue): New function.
7994 (ppc_emit_add): New function.
7995 (ppc_emit_sub): New function.
7996 (ppc_emit_mul): New function.
7997 (ppc_emit_lsh): New function.
7998 (ppc_emit_rsh_signed): New function.
7999 (ppc_emit_rsh_unsigned): New function.
8000 (ppc_emit_ext): New function.
8001 (ppc_emit_zero_ext): New function.
8002 (ppc_emit_log_not): New function.
8003 (ppc_emit_bit_and): New function.
8004 (ppc_emit_bit_or): New function.
8005 (ppc_emit_bit_xor): New function.
8006 (ppc_emit_bit_not): New function.
8007 (ppc_emit_equal): New function.
8008 (ppc_emit_less_signed): New function.
8009 (ppc_emit_less_unsigned): New function.
8010 (ppc_emit_ref): New function.
8011 (ppc_emit_const): New function.
8012 (ppc_emit_reg): New function.
8013 (ppc_emit_pop): New function.
8014 (ppc_emit_stack_flush): New function.
8015 (ppc_emit_swap): New function.
8016 (ppc_emit_stack_adjust): New function.
8017 (ppc_emit_call): New function.
8018 (ppc_emit_int_call_1): New function.
8019 (ppc_emit_void_call_2): New function.
8020 (ppc_emit_if_goto): New function.
8021 (ppc_emit_goto): New function.
8022 (ppc_emit_eq_goto): New function.
8023 (ppc_emit_ne_goto): New function.
8024 (ppc_emit_lt_goto): New function.
8025 (ppc_emit_le_goto): New function.
8026 (ppc_emit_gt_goto): New function.
8027 (ppc_emit_ge_goto): New function.
8028 (ppc_write_goto_address): New function.
8029 (ppc_emit_ops_impl): New static variable.
8030 (ppc64v1_emit_prologue): New function.
8031 (ppc64v2_emit_prologue): New function.
8032 (ppc64_emit_epilogue): New function.
8033 (ppc64_emit_add): New function.
8034 (ppc64_emit_sub): New function.
8035 (ppc64_emit_mul): New function.
8036 (ppc64_emit_lsh): New function.
8037 (ppc64_emit_rsh_signed): New function.
8038 (ppc64_emit_rsh_unsigned): New function.
8039 (ppc64_emit_ext): New function.
8040 (ppc64_emit_zero_ext): New function.
8041 (ppc64_emit_log_not): New function.
8042 (ppc64_emit_bit_and): New function.
8043 (ppc64_emit_bit_or): New function.
8044 (ppc64_emit_bit_xor): New function.
8045 (ppc64_emit_bit_not): New function.
8046 (ppc64_emit_equal): New function.
8047 (ppc64_emit_less_signed): New function.
8048 (ppc64_emit_less_unsigned): New function.
8049 (ppc64_emit_ref): New function.
8050 (ppc64_emit_const): New function.
8051 (ppc64v1_emit_reg): New function.
8052 (ppc64v2_emit_reg): New function.
8053 (ppc64_emit_pop): New function.
8054 (ppc64_emit_stack_flush): New function.
8055 (ppc64_emit_swap): New function.
8056 (ppc64v1_emit_call): New function.
8057 (ppc64v2_emit_call): New function.
8058 (ppc64v1_emit_int_call_1): New function.
8059 (ppc64v2_emit_int_call_1): New function.
8060 (ppc64v1_emit_void_call_2): New function.
8061 (ppc64v2_emit_void_call_2): New function.
8062 (ppc64_emit_if_goto): New function.
8063 (ppc64_emit_eq_goto): New function.
8064 (ppc64_emit_ne_goto): New function.
8065 (ppc64_emit_lt_goto): New function.
8066 (ppc64_emit_le_goto): New function.
8067 (ppc64_emit_gt_goto): New function.
8068 (ppc64_emit_ge_goto): New function.
8069 (ppc64v1_emit_ops_impl): New static variable.
8070 (ppc64v2_emit_ops_impl): New static variable.
8071 (ppc_emit_ops): New function.
8072 (linux_low_target): Wire in ppc_emit_ops.
8073
8074 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8075 Marcin Kościelnicki <koriakin@0x04.net>
8076
8077 PR/17221
8078 * Makefile.in: Add powerpc-*-ipa.o
8079 * configure.srv: Add ipa_obj for powerpc*-linux.
8080 * linux-ppc-ipa.c: New file.
8081 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8082 includes.
8083 (PPC_FIELD): New macro.
8084 (PPC_SEXT): New macro.
8085 (PPC_OP6): New macro.
8086 (PPC_BO): New macro.
8087 (PPC_LI): New macro.
8088 (PPC_BD): New macro.
8089 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8090 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8091 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8092 (ppc_get_thread_area): New function.
8093 (is_elfv2_inferior): New function.
8094 (gen_ds_form): New function.
8095 (GEN_STD): New macro.
8096 (GEN_STDU): New macro.
8097 (GEN_LD): New macro.
8098 (GEN_LDU): New macro.
8099 (gen_d_form): New function.
8100 (GEN_ADDI): New macro.
8101 (GEN_ADDIS): New macro.
8102 (GEN_LI): New macro.
8103 (GEN_LIS): New macro.
8104 (GEN_ORI): New macro.
8105 (GEN_ORIS): New macro.
8106 (GEN_LWZ): New macro.
8107 (GEN_STW): New macro.
8108 (GEN_STWU): New macro.
8109 (gen_xfx_form): New function.
8110 (GEN_MFSPR): New macro.
8111 (GEN_MTSPR): New macro.
8112 (GEN_MFCR): New macro.
8113 (GEN_MTCR): New macro.
8114 (GEN_SYNC): New macro.
8115 (GEN_LWSYNC): New macro.
8116 (gen_x_form): New function.
8117 (GEN_OR): New macro.
8118 (GEN_MR): New macro.
8119 (GEN_LWARX): New macro.
8120 (GEN_STWCX): New macro.
8121 (GEN_CMPW): New macro.
8122 (gen_md_form): New function.
8123 (GEN_RLDICL): New macro.
8124 (GEN_RLDICR): New macro.
8125 (gen_i_form): New function.
8126 (GEN_B): New macro.
8127 (GEN_BL): New macro.
8128 (gen_b_form): New function.
8129 (GEN_BNE): New macro.
8130 (GEN_LOAD): New macro.
8131 (GEN_STORE): New macro.
8132 (gen_limm): New function.
8133 (gen_atomic_xchg): New function.
8134 (gen_call): New function.
8135 (ppc_relocate_instruction): New function.
8136 (ppc_install_fast_tracepoint_jump_pad): New function.
8137 (ppc_get_min_fast_tracepoint_insn_len): New function.
8138 (ppc_get_ipa_tdesc_idx): New function.
8139 (the_low_target): Wire in the new functions.
8140 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8141 tdescs.
8142 * linux-ppc-tdesc.h: New file.
8143
8144 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8145
8146 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8147 (alloc_jump_pad_buffer): New function.
8148 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8149 (alloc_jump_pad_buffer): New function.
8150 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8151 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8152 (alloc_jump_pad_buffer): New function.
8153 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8154 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8155 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8156 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8157
8158 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8159
8160 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8161 * linux-amd64-ipa.c: Likewise.
8162 * linux-i386-ipa.c: Likewise.
8163 * linux-s390-ipa.c: Likewise.
8164 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8165 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8166 set_trace_state_variable_value_ptr.
8167 (struct ipa_sym_addresses): Likewise.
8168 (symbol_list): Likewise.
8169 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8170 accessing gdb_collect directly.
8171 (gdb_collect_ptr_type): New typedef.
8172 (get_raw_reg_ptr_type): New typedef.
8173 (get_trace_state_variable_value_ptr_type): New typedef.
8174 (set_trace_state_variable_value_ptr_type): New typedef.
8175 (gdb_collect_ptr): New global.
8176 (get_raw_reg_ptr): New global.
8177 (get_trace_state_variable_value_ptr): New global.
8178 (set_trace_state_variable_value_ptr): New global.
8179 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8180 accessing get_raw_reg directly.
8181 (get_get_tsv_func_addr): Likewise for
8182 get_trace_state_variable_value_ptr.
8183 (get_set_tsv_func_addr): Likewise for
8184 set_trace_state_variable_value_ptr.
8185 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8186
8187 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8188
8189 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8190
8191 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8192
8193 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8194 packets.
8195 (relocate_instruction): Remove own_buf.
8196 * server.c (own_buf): Make global.
8197 (handle_v_requests): Make global.
8198 * server.h (own_buf): New declaration.
8199 (handle_v_requests): New prototype.
8200
8201 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8202
8203 PR 18377
8204 * linux-s390-low.c (add_insns): New function.
8205 (s390_emit_prologue): New function.
8206 (s390_emit_epilogue): New function.
8207 (s390_emit_add): New function.
8208 (s390_emit_sub): New function.
8209 (s390_emit_mul): New function.
8210 (s390_emit_lsh): New function.
8211 (s390_emit_rsh_signed): New function.
8212 (s390_emit_rsh_unsigned): New function.
8213 (s390_emit_ext): New function.
8214 (s390_emit_log_not): New function.
8215 (s390_emit_bit_and): New function.
8216 (s390_emit_bit_or): New function.
8217 (s390_emit_bit_xor): New function.
8218 (s390_emit_bit_not): New function.
8219 (s390_emit_equal): New function.
8220 (s390_emit_less_signed): New function.
8221 (s390_emit_less_unsigned): New function.
8222 (s390_emit_ref): New function.
8223 (s390_emit_if_goto): New function.
8224 (s390_emit_goto): New function.
8225 (s390_write_goto_address): New function.
8226 (s390_emit_litpool): New function.
8227 (s390_emit_const): New function.
8228 (s390_emit_call): New function.
8229 (s390_emit_reg): New function.
8230 (s390_emit_pop): New function.
8231 (s390_emit_stack_flush): New function.
8232 (s390_emit_zero_ext): New function.
8233 (s390_emit_swap): New function.
8234 (s390_emit_stack_adjust): New function.
8235 (s390_emit_set_r2): New function.
8236 (s390_emit_int_call_1): New function.
8237 (s390_emit_void_call_2): New function.
8238 (s390_emit_eq_goto): New function.
8239 (s390_emit_ne_goto): New function.
8240 (s390_emit_lt_goto): New function.
8241 (s390_emit_le_goto): New function.
8242 (s390_emit_gt_goto): New function.
8243 (s390_emit_ge_goto): New function.
8244 (s390x_emit_prologue): New function.
8245 (s390x_emit_epilogue): New function.
8246 (s390x_emit_add): New function.
8247 (s390x_emit_sub): New function.
8248 (s390x_emit_mul): New function.
8249 (s390x_emit_lsh): New function.
8250 (s390x_emit_rsh_signed): New function.
8251 (s390x_emit_rsh_unsigned): New function.
8252 (s390x_emit_ext): New function.
8253 (s390x_emit_log_not): New function.
8254 (s390x_emit_bit_and): New function.
8255 (s390x_emit_bit_or): New function.
8256 (s390x_emit_bit_xor): New function.
8257 (s390x_emit_bit_not): New function.
8258 (s390x_emit_equal): New function.
8259 (s390x_emit_less_signed): New function.
8260 (s390x_emit_less_unsigned): New function.
8261 (s390x_emit_ref): New function.
8262 (s390x_emit_if_goto): New function.
8263 (s390x_emit_const): New function.
8264 (s390x_emit_call): New function.
8265 (s390x_emit_reg): New function.
8266 (s390x_emit_pop): New function.
8267 (s390x_emit_stack_flush): New function.
8268 (s390x_emit_zero_ext): New function.
8269 (s390x_emit_swap): New function.
8270 (s390x_emit_stack_adjust): New function.
8271 (s390x_emit_int_call_1): New function.
8272 (s390x_emit_void_call_2): New function.
8273 (s390x_emit_eq_goto): New function.
8274 (s390x_emit_ne_goto): New function.
8275 (s390x_emit_lt_goto): New function.
8276 (s390x_emit_le_goto): New function.
8277 (s390x_emit_gt_goto): New function.
8278 (s390x_emit_ge_goto): New function.
8279 (s390_emit_ops): New function.
8280 (struct linux_target_ops): Fill in emit_ops hook.
8281
8282 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8283
8284 PR 18377
8285 * Makefile.in: Add s390 IPA files.
8286 * configure.srv: Build IPA for s390.
8287 * linux-s390-ipa.c: New file.
8288 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8289 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8290 (tdesc_s390_linux32): Likewise.
8291 (init_registers_s390_linux32v1): Likewise.
8292 (tdesc_s390_linux32v1): Likewise.
8293 (init_registers_s390_linux32v2): Likewise.
8294 (tdesc_s390_linux32v2): Likewise.
8295 (init_registers_s390_linux64): Likewise.
8296 (tdesc_s390_linux64): Likewise.
8297 (init_registers_s390_linux64v1): Likewise.
8298 (tdesc_s390_linux64v1): Likewise.
8299 (init_registers_s390_linux64v2): Likewise.
8300 (tdesc_s390_linux64v2): Likewise.
8301 (init_registers_s390_te_linux64): Likewise.
8302 (tdesc_s390_te_linux64): Likewise.
8303 (init_registers_s390_vx_linux64): Likewise.
8304 (tdesc_s390_vx_linux64): Likewise.
8305 (init_registers_s390_tevx_linux64): Likewise.
8306 (tdesc_s390_tevx_linux64): Likewise.
8307 (init_registers_s390x_linux64): Likewise.
8308 (tdesc_s390x_linux64): Likewise.
8309 (init_registers_s390x_linux64v1): Likewise.
8310 (tdesc_s390x_linux64v1): Likewise.
8311 (init_registers_s390x_linux64v2): Likewise.
8312 (tdesc_s390x_linux64v2): Likewise.
8313 (init_registers_s390x_te_linux64): Likewise.
8314 (tdesc_s390x_te_linux64): Likewise.
8315 (init_registers_s390x_vx_linux64): Likewise.
8316 (tdesc_s390x_vx_linux64): Likewise.
8317 (init_registers_s390x_tevx_linux64): Likewise.
8318 (tdesc_s390x_tevx_linux64): Likewise.
8319 (have_hwcap_s390_vx): New static variable.
8320 (s390_arch_setup): Fill have_hwcap_s390_vx.
8321 (s390_get_thread_area): New function.
8322 (s390_ft_entry_gpr_esa): New const.
8323 (s390_ft_entry_gpr_zarch): New const.
8324 (s390_ft_entry_misc): New const.
8325 (s390_ft_entry_fr): New const.
8326 (s390_ft_entry_vr): New const.
8327 (s390_ft_main_31): New const.
8328 (s390_ft_main_64): New const.
8329 (s390_ft_exit_fr): New const.
8330 (s390_ft_exit_vr): New const.
8331 (s390_ft_exit_misc): New const.
8332 (s390_ft_exit_gpr_esa): New const.
8333 (s390_ft_exit_gpr_zarch): New const.
8334 (append_insns): New function.
8335 (s390_relocate_instruction): New function.
8336 (s390_install_fast_tracepoint_jump_pad): New function.
8337 (s390_get_min_fast_tracepoint_insn_len): New function.
8338 (s390_get_ipa_tdesc_idx): New function.
8339 (struct linux_target_ops): Wire in the above functions.
8340 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8341 * linux-s390-tdesc.h: New file.
8342
8343 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8344
8345 * linux-s390-low.c (s390_supports_tracepoints): New function.
8346 (struct linux_target_ops): Fill supports_tracepoints hook.
8347
8348 2016-03-18 Yao Qi <yao.qi@linaro.org>
8349
8350 * linux-low.c (lwp_signal_can_be_delivered): New function.
8351 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8352
8353 2016-03-18 Yao Qi <yao.qi@linaro.org>
8354
8355 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8356 0 if signal is enqueued. Remove 'signal' from one debugging
8357 message. Move one debugging message to some lines below.
8358 Remove code setting 'signal' to 0.
8359
8360 2016-03-18 Yao Qi <yao.qi@linaro.org>
8361
8362 * linux-low.c (linux_low_filter_event): Remove redundant
8363 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8364
8365 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8366
8367 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8368 (struct linux_target_ops): Wire in the above.
8369
8370 2016-03-03 Yao Qi <yao.qi@linaro.org>
8371
8372 * linux-low.c: Update comments to start_step_over.
8373
8374 2016-03-03 Yao Qi <yao.qi@linaro.org>
8375
8376 PR server/19736
8377 * linux-low.c (handle_extended_wait): Set child suspended
8378 if event_lwp->bp_reinsert isn't zero.
8379
8380 2016-03-02 Yao Qi <yao.qi@linaro.org>
8381
8382 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8383 enqueue_pending_signal.
8384
8385 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8386
8387 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8388 is actually loaded.
8389
8390 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8391
8392 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8393 (s390_regmap_3264) [!__s390x__]: New global.
8394 (s390_collect_ptrace_register): Skip map entries containing -1.
8395 (s390_supply_ptrace_register): Ditto.
8396 (s390_fill_gprs_high): New function.
8397 (s390_store_gprs_high): New function.
8398 (s390_regsets): Add NT_S390_HIGH_GPRS.
8399 (s390_get_hwcap): Enable on 31-bit.
8400 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8401 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8402 Detect NT_S390_HIGH_GPRS.
8403 (s390_usrregs_info_3264): Enable on 31-bit.
8404 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8405 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8406
8407 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8408
8409 PR gdb/13808
8410 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8411 * configure.srv: Ditto.
8412 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8413 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8414 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8415 (init_registers_amd64_linux): Remove prototype.
8416 (tdesc_amd64_linux): Remove declaration.
8417 (get_ipa_tdesc): New function.
8418 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8419 initialize remaining tdescs.
8420 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8421 (init_registers_i386_linux): Remove prototype.
8422 (tdesc_i386_linux): Remove declaration.
8423 (get_ipa_tdesc): New function.
8424 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8425 initialize remaining tdescs.
8426 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8427 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8428 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8429 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8430 (x86_get_ipa_tdesc_idx): New function.
8431 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8432 * linux-x86-tdesc.h: New file.
8433 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8434 (target_get_ipa_tdesc_idx): New macro.
8435 * tracepoint.c (ipa_tdesc_idx): New macro.
8436 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8437 (symbol_list): Add ipa_tdesc_idx.
8438 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8439 (ipa_tdesc): Remove.
8440 (ipa_tdesc_idx): New variable.
8441 (get_context_regcache): Use get_ipa_tdesc.
8442 (gdb_collect): Ditto.
8443 (gdb_probe): Ditto.
8444 * tracepoint.h (get_ipa_tdesc): New prototype.
8445 (ipa_tdesc): Remove.
8446
8447 2016-02-24 Pedro Alves <palves@redhat.com>
8448
8449 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8450 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8451 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8452 Factor out common code between the USE_SIGTRAP_SIGINFO and
8453 !USE_SIGTRAP_SIGINFO blocks.
8454 (linux_low_filter_event): Call save_stop_reason instead of
8455 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8456 Update comments.
8457 (linux_wait_1): Update comments.
8458
8459 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8460
8461 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8462 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8463 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8464 ppc_insert_point, ppc_remove_point.
8465
8466 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8467
8468 * linux-s390-low.c (s390_supports_z_point_type): New function.
8469 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8470
8471 2016-02-16 Yao Qi <yao.qi@linaro.org>
8472
8473 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8474 PC. Get pc from regcache_read_pc.
8475
8476 2016-02-12 Yao Qi <yao.qi@linaro.org>
8477
8478 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8479 or linux_get_pc_32bit.
8480 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8481
8482 2016-02-12 Yao Qi <yao.qi@linaro.org>
8483
8484 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8485 arm_linux_get_next_pcs_fixup.
8486
8487 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8488
8489 * tracepoint.c (x_tracepoint_action_download): Change
8490 write_inferior_data_ptr to write_inferior_data_pointer.
8491 (cmd_qtstart): Likewise.
8492 (write_inferior_data_ptr): Remove.
8493 (download_agent_expr): Change write_inferior_data_ptr to
8494 write_inferior_data_pointer.
8495 (download_tracepoint_1): Likewise.
8496 (download_tracepoint): Likewise.
8497 (download_trace_state_variables): Likewise.
8498
8499 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8500 Marcin Kościelnicki <koriakin@0x04.net>
8501
8502 * tracepoint.c (struct tracepoint_action_ops): Remove.
8503 (struct tracepoint_action): Remove ops.
8504 (m_tracepoint_action_download, r_tracepoint_action_download)
8505 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8506 size and offset accordingly.
8507 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8508 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8509 (tracepoint_action_send, tracepoint_action_download): New functions.
8510 Helpers for trace action handlers.
8511 (add_tracepoint_action): Remove setup actions ops.
8512 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8513
8514 2016-02-10 Yao Qi <yao.qi@linaro.org>
8515
8516 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8517
8518 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8519
8520 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8521 to AC_OUTPUT.
8522 * configure: Regenerate.
8523
8524 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8525
8526 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8527 void * to gdb_byte *.
8528 * linux-low.c (siginfo_fixup): Likewise.
8529 (linux_xfer_siginfo): Likewise.
8530 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8531 Likewise.
8532 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8533
8534 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8535
8536 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8537 to srv_tgtobj.
8538 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8539 to srv_tgtobj.
8540 * linux-x86-low.c [__x86_64__]: Include
8541 "nat/amd64-linux-siginfo.h".
8542 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8543 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8544 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8545 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8546 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8547 (cpt_si_fd, si_timerid, si_overrun): Move from
8548 nat/amd64-linux-siginfo.c.
8549 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8550
8551 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8552
8553 * server.c (skip_to_semicolon): Remove.
8554 (process_point_options): Use strchrnul instead of
8555 skip_to_semicolon.
8556
8557 2016-01-26 Yao Qi <yao.qi@linaro.org>
8558
8559 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8560 * linux-low.c (install_software_single_step_breakpoints): Don't
8561 call regcache_read_pc.
8562 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8563 argument pc.
8564
8565 2016-01-26 Yao Qi <yao.qi@linaro.org>
8566
8567 * linux-low.c (install_software_single_step_breakpoints): Call
8568 regcache_read_pc instead of get_pc.
8569
8570 2016-01-26 Yao Qi <yao.qi@linaro.org>
8571
8572 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8573 (unblock_async_io): Rename to ...
8574 (block_unblock_async_io): ... it. New function.
8575 (enable_async_io): Don't install SIGIO handler. Unblock it
8576 instead.
8577 (disable_async_io): Don't ignore SIGIO. Block it instead.
8578 (initialize_async_io): Install SIGIO handler. Don't call
8579 unblock_async_io.
8580
8581 2016-01-26 Yao Qi <yao.qi@linaro.org>
8582
8583 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8584 first character is '\003', call *the_target->request_interrupt.
8585
8586 2016-01-25 Yao Qi <yao.qi@linaro.org>
8587
8588 * remote-utils.c (new_thread_notify): Remove.
8589 (dead_thread_notify): Likewise.
8590 * remote-utils.h (new_thread_notify): Remove declaration.
8591 (dead_thread_notify): Likewise.
8592
8593 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8594
8595 * gdb.trace/pending.exp: Fix expected message on continue.
8596
8597 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8598
8599 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8600 it works properly on big-endian machines where sizeof (CORE_ADDR)
8601 != sizeof (void *).
8602
8603 2016-01-21 Pedro Alves <palves@redhat.com>
8604
8605 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8606 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8607 * configure: Regenerate.
8608
8609 2016-01-21 Yao Qi <yao.qi@linaro.org>
8610
8611 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8612 is_thumb and set it according to CPSR saved on the stack.
8613 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8614 arm_sigreturn_next_pc.
8615
8616 2016-01-18 Yao Qi <yao.qi@linaro.org>
8617
8618 * linux-low.c (linux_set_pc_64bit): New function.
8619 (linux_get_pc_64bit): New function.
8620 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8621 Declare.
8622 * linux-sparc-low.c (debug_threads): Remove declaration.
8623 (sparc_get_pc): Remove.
8624 (the_low_target): Use linux_get_pc_64bit instead of
8625 sparc_get_pc.
8626 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8627 (the_low_target): Use linux_get_pc_64bit and
8628 linux_set_pc_64bit.
8629
8630 2016-01-18 Yao Qi <yao.qi@linaro.org>
8631
8632 * linux-arm-low.c (debug_threads): Remove declaration.
8633 (arm_get_pc, arm_set_pc): Remove.
8634 (the_low_target): Use linux_get_pc_32bit and
8635 linux_set_pc_32bit.
8636 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8637 (the_low_target): Use linux_get_pc_32bit and
8638 linux_set_pc_32bit.
8639 * linux-cris-low.c (debug_threads): Remove declaration.
8640 (cris_get_pc, cris_set_pc,): Remove.
8641 (the_low_target): Use linux_get_pc_32bit and
8642 linux_set_pc_32bit.
8643 * linux-crisv32-low.c (debug_threads): Remove declaration.
8644 (cris_get_pc, cris_set_pc): Remove.
8645 (the_low_target): Use linux_get_pc_32bit and
8646 linux_set_pc_32bit.
8647 * linux-low.c: Include inttypes.h.
8648 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8649 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8650 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8651 (the_low_target): Use linux_get_pc_32bit and
8652 linux_set_pc_32bit.
8653 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8654 (the_low_target): Use linux_get_pc_32bit and
8655 linux_set_pc_32bit.
8656 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8657 (the_low_target): Use linux_get_pc_32bit and
8658 linux_set_pc_32bit.
8659 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8660 (the_low_target): Use linux_get_pc_32bit and
8661 linux_set_pc_32bit.
8662 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8663 (the_low_target): Use linux_get_pc_32bit and
8664 linux_set_pc_32bit.
8665
8666 2016-01-18 Gary Benson <gbenson@redhat.com>
8667
8668 * configure.ac (AC_FUNC_FORK): New check.
8669 * config.in: Regenerate.
8670 * configure: Likewise.
8671
8672 2016-01-14 Yao Qi <yao.qi@linaro.org>
8673
8674 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8675 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8676 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8677 arm_get_next_pcs_ctor.
8678
8679 2016-01-12 Josh Stone <jistone@redhat.com>
8680 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8681
8682 * inferiors.h: Include "gdb_vecs.h".
8683 (struct process_info): Add syscalls_to_catch.
8684 * inferiors.c (remove_process): Free syscalls_to_catch.
8685 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8686 syscall_return stops.
8687 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8688 * server.c (handle_general_set): Handle QCatchSyscalls.
8689 (handle_query): Report support for QCatchSyscalls.
8690 * target.h (struct target_ops): Add supports_catch_syscall.
8691 (target_supports_catch_syscall): New macro.
8692 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8693 (struct lwp_info): Add syscall_state.
8694 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8695 Maintain syscall_state and syscalls_to_catch across exec.
8696 (get_syscall_trapinfo): New function, proxy to the_low_target.
8697 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8698 (linux_low_filter_event): Toggle syscall_state entry/return for
8699 syscall traps, and set it ignored for all others.
8700 (gdb_catching_syscalls_p): New function.
8701 (gdb_catch_this_syscall_p): New function.
8702 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8703 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8704 (linux_supports_catch_syscall): New function.
8705 (linux_target_ops): Install it.
8706 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8707 (the_low_target): Install it.
8708
8709 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8710
8711 * acinclude.m4: Include new ../warning.m4 file.
8712 * configure: Regenerated.
8713 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8714
8715 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8716
8717 * ax.c (is_goto_target): Mark static.
8718 * linux-low.c (register_addr): Likewise.
8719 (linux_fetch_registers, linux_store_registers): Likewise.
8720 * mem-break.c (any_persistent_commands): Fix old prototype.
8721 (add_commands_to_breakpoint): Mark static.
8722 * regcache.c (find_register_by_name): Delete unused func.
8723 * remote-utils.c (hex_or_minus_one): Mark static.
8724 * server.c (monitor_show_help): Mark static.
8725 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8726 handle_v_requests): Likewise.
8727
8728 2016-01-12 Pedro Alves <palves@redhat.com>
8729
8730 Remove use of the registered trademark symbol throughout.
8731
8732 2016-01-08 Yao Qi <yao.qi@linaro.org>
8733
8734 * remote-utils.c (getpkt): If c is '\003', call target hook
8735 request_interrupt.
8736
8737 2016-01-06 Yao Qi <yao.qi@linaro.org>
8738
8739 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8740 linux-aarch32-low.c.
8741 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8742 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8743 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8744 (thumb2_breakpoint): Declare.
8745 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8746 linux-aarch32-low.h.
8747 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8748 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8749 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8750
8751 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8752
8753 * gdbreplay.c (gdbreplay_version): Change copyright year in
8754 version message.
8755 * server.c (gdbserver_version): Likewise.
8756
8757 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8758
8759 * server.c (crc32_table): Delete.
8760 (crc32): Use libiberty's xcrc32 function.
8761
8762 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8763
8764 * lynx-low.c (lynx_delete_thread_callback): New function.
8765 (lynx_mourn): Properly delete our process and all of its
8766 threads. Remove call to clear_inferiors.
8767
8768 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8769
8770 * target.c (thread_search_callback): Add check that
8771 the thread_stopped target callback is not NULL before
8772 calling it.
8773
8774 2015-12-21 Yao Qi <yao.qi@linaro.org>
8775
8776 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8777 arm breakpoint.
8778
8779 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8780
8781 * server.c (handle_query): Call target_supports_software_single_step.
8782
8783 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8784
8785 * linux-low.c (single_step): New function.
8786 (linux_resume_one_lwp_throw): Call single_step.
8787 (start_step_over): Likewise.
8788
8789 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8790
8791 * Makefile.in (SFILES): Append arch/arm-linux.c,
8792 arch/arm-get-next-pcs.c.
8793 (arm-linux.o): New rule.
8794 (arm-get-next-pcs.o): New rule.
8795 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8796 arm-linux.o.
8797 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8798 to linux-aarch32-low.c.
8799 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8800 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8801 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8802 (thumb2_breakpoint_len): Likewise.
8803 (arm_is_thumb_mode): Make non-static.
8804 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8805 from linux-aarch32-low.c.
8806 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8807 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8808 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8809 (thumb2_breakpoint_len): Likewise.
8810 (arm_is_thumb_mode): New declaration.
8811 * linux-arm-low.c: Include arch/arm-linux.h
8812 aarch/arm-get-next-pcs.h, sys/syscall.h.
8813 (get_next_pcs_ops): New struct.
8814 (get_next_pcs_addr_bits_remove): New function.
8815 (get_next_pcs_is_thumb): New function.
8816 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8817 (arm_sigreturn_next_pc): Likewise.
8818 (get_next_pcs_syscall_next_pc): Likewise.
8819 (arm_gdbserver_get_next_pcs): Likewise.
8820 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8821 Initialize.
8822 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8823 * server.h: Include gdb_vecs.h.
8824
8825 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8826
8827 * Makefile.in (SFILES): Append common/common-regcache.c.
8828 (OBS): Append common-regcache.o.
8829 (common-regcache.o): New rule.
8830 * regcache.c (init_register_cache): Initialize cache to
8831 REG_UNAVAILABLE.
8832 (regcache_raw_read_unsigned): New function.
8833 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8834 register_status enum.
8835
8836 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8837
8838 * linux-aarch64-low.c (the_low_targets): Rename
8839 breakpoint_reinsert_addr to get_next_pcs.
8840 * linux-arm-low.c (the_low_targets): Likewise.
8841 * linux-bfin-low.c (the_low_targets): Likewise.
8842 * linux-cris-low.c (the_low_targets): Likewise.
8843 * linux-crisv32-low.c (the_low_targets): Likewise.
8844 * linux-low.c (can_software_single_step): Likewise.
8845 (install_software_single_step_breakpoints): New function.
8846 (start_step_over): Use install_software_single_step_breakpoints.
8847 * linux-low.h: New CORE_ADDR vector.
8848 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8849 get_next_pcs.
8850 * linux-mips-low.c (the_low_targets): Likewise.
8851 * linux-nios2-low.c (the_low_targets): Likewise.
8852 * linux-sparc-low.c (the_low_targets): Likewise.
8853
8854 2015-12-17 Pedro Alves <palves@redhat.com>
8855
8856 * linux-low.c (linux_kill_one_lwp): Remove references to
8857 LinuxThreads.
8858 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8859 to 'kill'.
8860 (linux_init_signals): Delete.
8861 (initialize_low): Adjust.
8862 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8863
8864 2015-12-16 Pedro Alves <palves@redhat.com>
8865
8866 * configure.ac (compiler warning flags): When testing a
8867 -Wno-foo option, check whether -Wfoo works instead.
8868 * configure: Regenerate.
8869
8870 2015-12-11 Don Breazeal <donb@codesourcery.com>
8871
8872 * server.c (process_serial_event): Don't exit from gdbserver
8873 in remote mode if there are still active inferiors.
8874
8875 2015-12-11 Yao Qi <yao.qi@linaro.org>
8876
8877 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8878 arm_breakpoint_at if the process is 32-bit.
8879
8880 2015-12-11 Yao Qi <yao.qi@linaro.org>
8881
8882 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8883 arm breakpoint.
8884
8885 2015-12-07 Yao Qi <yao.qi@linaro.org>
8886
8887 * configure.srv: Append arm.o to srv_tgtobj for
8888 aarch64*-*-linux* target.
8889 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8890 from linux-arm-low.c.
8891 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8892 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8893 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8894 (thumb2_breakpoint_len): Likewise.
8895 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8896 (arm_breakpoint_kinds): Likewise.
8897 (arm_breakpoint_kind_from_pc): Likewise.
8898 (arm_sw_breakpoint_from_kind): Likewise.
8899 (arm_breakpoint_kind_from_current_state): Likewise.
8900 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8901 (arm_sw_breakpoint_from_kind): Declare.
8902 (arm_breakpoint_kind_from_current_state): Declare.
8903 (arm_breakpoint_at): Declare.
8904 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8905 arm_sw_breakpoint_from_kind if process is 32-bit.
8906 (aarch64_breakpoint_kind_from_pc): New function.
8907 (aarch64_breakpoint_kind_from_current_state): New function.
8908 (the_low_target): Initialize fields breakpoint_kind_from_pc
8909 and breakpoint_kind_from_current_state.
8910 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8911 linux-aarch32-low.c.
8912 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8913 (arm_breakpoint, arm_breakpoint_len): Likewise.
8914 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8915 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8916 (arm_is_thumb_mode): Likewise.
8917 (arm_breakpoint_at): Likewise.
8918 (arm_breakpoint_kind_from_pc): Likewise.
8919 (arm_sw_breakpoint_from_kind): Likewise.
8920 (arm_breakpoint_kind_from_current_state): Likewise.
8921
8922 Revert:
8923 2015-08-04 Yao Qi <yao.qi@linaro.org>
8924
8925 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8926 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8927 * server.c (extended_protocol): Remove "static".
8928 * server.h (extended_protocol): Declare it.
8929
8930 2015-12-04 Josh Stone <jistone@redhat.com>
8931
8932 * target.h (struct target_ops) <arch_setup>: Rename to ...
8933 (struct target_ops) <post_create_inferior>: ... this.
8934 (target_arch_setup): Rename to ...
8935 (target_post_create_inferior): ... this, calling post_create_inferior.
8936 * server.c (start_inferior): Update target_arch_setup calls to
8937 target_post_create_inferior.
8938 * linux-low.c (linux_low_ptrace_options): Forward declare.
8939 (linux_arch_setup): Update its comment for general use.
8940 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8941 (struct linux_target_ops): Use linux_post_create_inferior.
8942 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8943 to post_create_inferior.
8944 * nto-low.c (struct nto_target_ops): Likewise.
8945 * spu-low.c (struct spu_target_ops): Likewise.
8946 * win32-low.c (struct win32_target_ops): Likewise.
8947
8948 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8949
8950 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8951
8952 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8953
8954 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8955 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8956 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8957 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8958 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8959 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8960 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8961 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8962 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8963 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8964 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8965 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8966
8967 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8968
8969 * linux-low.c (linux_look_up_symbols): Don't call
8970 linux_supports_traceclone.
8971 * linux-low.h (thread_db_init): Remove use_events argument.
8972 * thread-db.c (thread_db_use_event): Remove global variable.
8973 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8974 (struct thread_db) <td_create_bp>: Remove field.
8975 (thread_db_create_event): Remove function.
8976 (thread_db_enable_reporting): Likewise.
8977 (find_one_thread): Don't check for thread_db_use_events.
8978 (attach_thread): Likewise.
8979 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8980 (try_thread_db_load_1): Don't check for thread_db_use_events.
8981 (thread_db_init): Remove use_events argument and thread events
8982 handling.
8983 (remove_thread_event_breakpoints): Remove function.
8984 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8985
8986 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8987
8988 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8989 New function.
8990 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8991 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8993 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8994 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8995 Initialize.
8996 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8997 New function.
8998 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8999 * linux-low.c (can_hardware_single_step): Use
9000 supports_hardware_single_step.
9001 (can_software_single_step): New function.
9002 (start_step_over): Call can_software_single_step.
9003 (linux_supports_hardware_single_step): New function.
9004 (struct target_ops) <supports_software_single_step>: Initialize.
9005 * linux-low.h (struct linux_target_ops)
9006 <supports_hardware_single_step>: Initialize.
9007 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9008 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9009 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9010 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9011 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9012 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9013 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9015 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9016 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9017 Initialize.
9018 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9019 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9020 Initialize.
9021 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9022 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9023 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9024 New function.
9025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9026 * target.h (struct target_ops): <supports_software_single_step>:
9027 New field.
9028 (target_supports_software_single_step): New macro.
9029
9030 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9031
9032 * linux-low.c (linux_wait_1): Fix pc advance condition.
9033 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9034 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9035
9036 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9037
9038 * linux-arm-low.c (arm_is_thumb_mode): New function.
9039 (arm_breakpoint_at): Use arm_is_thumb_mode.
9040 (arm_breakpoint_kind_from_current_state): New function.
9041 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9042 Initialize.
9043 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9044 (linux_breakpoint_kind_from_current_state): New function.
9045 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9046 * linux-low.h (struct linux_target_ops)
9047 <breakpoint_kind_from_current_state>: New field.
9048 * target.h (struct target_ops): Likewise.
9049 (target_breakpoint_kind_from_current_state): New macro.
9050
9051 2015-11-30 Pedro Alves <palves@redhat.com>
9052
9053 * linux-low.c (linux_resume): Wake up the event loop before
9054 returning.
9055
9056 2015-11-30 Pedro Alves <palves@redhat.com>
9057
9058 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9059 check.
9060 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9061 to -1.
9062 * target.c (struct thread_search): New structure.
9063 (thread_search_callback): New function.
9064 (prev_general_thread): New global.
9065 (prepare_to_access_memory, done_accessing_memory): New functions.
9066 * target.h (prepare_to_access_memory, done_accessing_memory):
9067 Replace macros with function declarations.
9068
9069 2015-11-30 Pedro Alves <palves@redhat.com>
9070
9071 PR 14618
9072 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9073 report TARGET_WAITKIND_NO_RESUMED.
9074 * remote-utils.c (prepare_resume_reply): Handle
9075 TARGET_WAITKIND_NO_RESUMED.
9076 * server.c (report_no_resumed): New global.
9077 (handle_query) <qSupported>: Handle "no-resumed+". Report
9078 "no-resumed+" support.
9079 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9080 return error if the client doesn't support no-resumed events.
9081 (push_stop_notification): New function.
9082 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9083 events if the client supports them.
9084
9085 2015-11-30 Pedro Alves <palves@redhat.com>
9086
9087 * linux-low.c (thread_still_has_status_pending_p): Don't check
9088 vCont;t here.
9089 (lwp_resumed): New function.
9090 (status_pending_p_callback): Return early if the LWP is not
9091 supposed to be resumed.
9092
9093 2015-11-30 Pedro Alves <palves@redhat.com>
9094
9095 * linux-low.c (handle_extended_wait): Assert that the LWP's
9096 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9097 thread create events, leave the new child's status pending.
9098 (linux_low_filter_event): If GDB wants to hear about thread exit
9099 events, leave the LWP marked dead and don't delete it.
9100 (linux_wait_for_event_filtered): Don't check for thread exit.
9101 (filter_exit_event): New function.
9102 (linux_wait_1): Use it, when returning an exit event.
9103 (linux_resume_one_lwp_throw): Assert that the LWP's
9104 waitstatus is TARGET_WAITKIND_IGNORE.
9105 * remote-utils.c (prepare_resume_reply): Handle
9106 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9107 * server.c (report_thread_events): New global.
9108 (handle_general_set): Handle QThreadEvents.
9109 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9110 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9111 TARGET_WAITKIND_THREAD_EXITED.
9112 * server.h (report_thread_events): Declare.
9113
9114 2015-11-30 Pedro Alves <palves@redhat.com>
9115
9116 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9117 the thread's last_resume_kind was resume_stop.
9118
9119 2015-11-30 Pedro Alves <palves@redhat.com>
9120
9121 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9122 before returning.
9123
9124 2015-11-30 Pedro Alves <palves@redhat.com>
9125
9126 * server.c (handle_v_requests): Handle vCtrlC.
9127
9128 2015-11-30 Pedro Alves <palves@redhat.com>
9129
9130 * gdbthread.h (find_any_thread_of_pid): Declare.
9131 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9132 functions.
9133 * server.c (handle_query): If current_thread is NULL, look for
9134 another thread of the selected process.
9135
9136 2015-11-26 Daniel Colascione <dancol@dancol.org>
9137 Simon Marchi <simon.marchi@ericsson.com>
9138
9139 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9140 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9141 name in reply.
9142 * target.h (struct target_ops) <thread_name>: New field.
9143 (target_thread_name): New macro.
9144
9145 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9146
9147 * regcache.h (regcache_invalidate_pid): Add declaration.
9148 * regcache.c (regcache_invalidate_pid): New function, extracted
9149 from regcache_invalidate.
9150 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9151 Add trivial documentation comment.
9152 * lynx-low.c: Use regcache_invalidate_pid instead of
9153 regcache_invalidate.
9154
9155 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9156
9157 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9158 and Elf64_auxv_t if the target is Android.
9159
9160 2015-11-22 Doug Evans <xdje42@gmail.com>
9161
9162 * target.h: #include <sys/types.h>.
9163
9164 2015-11-19 Pedro Alves <palves@redhat.com>
9165
9166 * linux-low.c (linux_process_qsupported): Change prototype.
9167 Adjust.
9168 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9169 Change prototype.
9170 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9171 and adjust to loop over all features.
9172 * server.c (handle_query) <qSupported>: Adjust to call
9173 target_process_qsupported once, passing it a vector of unprocessed
9174 features.
9175 * target.h (struct target_ops) <process_qsupported>: Change
9176 prototype.
9177 (target_process_qsupported): Adjust.
9178
9179 2015-11-19 Pedro Alves <palves@redhat.com>
9180
9181 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9182 mode.
9183 * configure: Regenerate.
9184
9185 2015-11-19 Pedro Alves <palves@redhat.com>
9186
9187 * configure: Regenerate.
9188
9189 2015-11-19 Yao Qi <yao.qi@linaro.org>
9190
9191 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9192 type to uint32_t.
9193
9194 2015-11-19 Yao Qi <yao.qi@linaro.org>
9195
9196 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9197 (struct aarch64_operand): Move enum out.
9198
9199 2015-11-19 Yao Qi <yao.qi@linaro.org>
9200
9201 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9202 struct user_fpsimd_state *.
9203 (aarch64_store_fpregset): Likewise.
9204
9205 2015-11-19 Yao Qi <yao.qi@linaro.org>
9206
9207 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9208 struct user_pt_regs *.
9209 (aarch64_store_gregset): Likewise.
9210
9211 2015-11-18 Pedro Alves <palves@redhat.com>
9212
9213 * Makefile.in (all_object_files): Add $IPA_OBJS.
9214
9215 2015-11-17 Pedro Alves <palves@redhat.com>
9216
9217 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9218 GDB_SIGNAL_0 and gdb_signal_to_string.
9219
9220 2015-11-17 Pedro Alves <palves@redhat.com>
9221
9222 * win32-low.c (handle_output_debug_string): Remove parameter.
9223 (win32_kill): Remove our_status local and adjust call to
9224 handle_output_debug_string.
9225 (get_child_debug_event): Adjust call to
9226 handle_output_debug_string.
9227
9228 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9229
9230 * linux-mips-low.c (mips_fill_gregset): Add cast.
9231 (mips_store_gregset): Likewise.
9232 (mips_fill_fpregset): Likewise.
9233 (mips_store_fpregset): Likewise.
9234
9235 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9236
9237 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9238 priv.
9239
9240 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9241
9242 * linux-mips-low.c (mips_linux_new_thread): Change type of
9243 watch_type to enum target_hw_bp_type.
9244
9245 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9246
9247 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9248 Change return type to arm_hwbp_type.
9249
9250 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9251
9252 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9253 (arm_store_gregset): Likewise.
9254 * linux-arm-low.c (arm_get_hwcap): Likewise.
9255 (arm_read_description): Likewise.
9256
9257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9258
9259 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9260
9261 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9262
9263 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9264 (ppc_fill_vsxregset): Likewise.
9265 (ppc_store_vsxregset): Likewise.
9266 (ppc_fill_vrregset): Likewise.
9267 (ppc_store_vrregset): Likewise.
9268 (ppc_fill_evrregset): Likewise.
9269 (ppc_store_evrregset): Likewise.
9270
9271 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9272
9273 * linux-ppc-low.c (ppc_usrregs_info): Remove
9274 forward-declaration.
9275 (ppc_arch_setup): Move lower in file.
9276
9277 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9278
9279 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9280 (ps_pdwrite): Likewise.
9281
9282 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9283
9284 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9285 to after assert checks.
9286
9287 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9288
9289 * proc-service.c (ps_pdread): Add/adjust casts.
9290 (ps_pdwrite): Add/adjust casts.
9291
9292 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9293
9294 * server.c (handle_search_memory_1): Cast return value of
9295 memmem.
9296
9297 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9298
9299 * server.c (write_qxfer_response): Change type of data to
9300 gdb_byte *.
9301
9302 2015-10-29 Pedro Alves <palves@redhat.com>
9303
9304 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9305
9306 2015-10-29 Pedro Alves <palves@redhat.com>
9307
9308 * tracepoint.c (clear_installed_tracepoints): Add casts.
9309
9310 2015-10-29 Pedro Alves <palves@redhat.com>
9311
9312 * server.c (handle_v_cont, process_serial_event): Add enum
9313 gdb_signal casts to signal parsing code.
9314
9315 2015-10-29 Pedro Alves <palves@redhat.com>
9316
9317 * linux-low.h (NULL_REGSET): Define.
9318 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9319 * linux-arm-low.c (arm_regsets): Likewise.
9320 * linux-crisv32-low.c (cris_regsets): Likewise.
9321 * linux-m68k-low.c (m68k_regsets): Likewise.
9322 * linux-mips-low.c (mips_regsets): Likewise.
9323 * linux-nios2-low.c (nios2_regsets): Likewise.
9324 * linux-ppc-low.c (ppc_regsets): Likewise.
9325 * linux-s390-low.c (s390_regsets): Likewise.
9326 * linux-sh-low.c (sh_regsets): Likewise.
9327 * linux-sparc-low.c (sparc_regsets): Likewise.
9328 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9329 * linux-tile-low.c (tile_regsets): Likewise.
9330 * linux-x86-low.c (x86_regsets): Likewise.
9331 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9332
9333 2015-10-29 Pedro Alves <palves@redhat.com>
9334
9335 * linux-low.h (NULL_REGSET): Define.
9336 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9337 * linux-arm-low.c (arm_regsets): Likewise.
9338 * linux-crisv32-low.c (cris_regsets): Likewise.
9339 * linux-m68k-low.c (m68k_regsets): Likewise.
9340 * linux-mips-low.c (mips_regsets): Likewise.
9341 * linux-nios2-low.c (nios2_regsets): Likewise.
9342 * linux-ppc-low.c (ppc_regsets): Likewise.
9343 * linux-s390-low.c (s390_regsets): Likewise.
9344 * linux-sh-low.c (sh_regsets): Likewise.
9345 * linux-sparc-low.c (sparc_regsets): Likewise.
9346 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9347 * linux-tile-low.c (tile_regsets): Likewise.
9348 * linux-x86-low.c (x86_regsets): Likewise.
9349 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9350
9351 2015-10-26 Doug Evans <dje@google.com>
9352
9353 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9354
9355 2015-10-26 Doug Evans <dje@google.com>
9356
9357 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9358
9359 2015-10-26 Doug Evans <dje@google.com>
9360
9361 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9362 for debug_printf.
9363 (attach_thread, find_new_threads_callback): Ditto.
9364
9365 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9366
9367 * mem-break.h (set_breakpoint_data): Remove.
9368
9369 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9370
9371 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9372 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9373 (initialize_low): Remove set_breakpoint_data call.
9374 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9375 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9376 (initialize_low): Remove set_breakpoint_data call.
9377 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9378 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9379 (initialize_low): Remove set_breakpoint_data call.
9380
9381 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9382
9383 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9384 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9385 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9386 * target.h (target_breakpoint_kind_from_pc): New macro.
9387
9388 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9389
9390 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9391 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9392 the default breakpoint kind.
9393
9394 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9395
9396 * linux-arm-low.c (arm_supports_z_point_type): Add software
9397 breakpoint support.
9398
9399 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9400
9401 * linux-arm-low.c: Refactor breakpoint definitions.
9402 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9403 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9404
9405 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9406
9407 * Makefile.in: Add arm.c/o.
9408 * configure.srv: Likewise.
9409 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9410 (arm_breakpoint_kind_from_pc): New function.
9411 (arm_sw_breakpoint_from_kind): Return proper kind.
9412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9413
9414 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9415
9416 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9417 removal.
9418 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9419 (struct raw_breakpoint) <size>: Remove.
9420 (struct raw_breakpoint) <kind>: Add.
9421 (bp_size): New function.
9422 (bp_opcode): Likewise.
9423 (find_raw_breakpoint_at): Adjust for kind.
9424 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9425 (remove_memory_breakpoint): Adjust for kind call bp_size.
9426 (set_raw_breakpoint_at): Adjust for kind.
9427 (set_breakpoint): Likewise.
9428 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9429 (delete_raw_breakpoint): Adjust for kind.
9430 (delete_breakpoint): Likewise.
9431 (find_gdb_breakpoint): Likewise.
9432 (set_gdb_breakpoint_1): Likewise.
9433 (set_gdb_breakpoint): Likewise.
9434 (delete_gdb_breakpoint_1): Likewise.
9435 (delete_gdb_breakpoint): Likewise.
9436 (uninsert_raw_breakpoint): Likewise.
9437 (reinsert_raw_breakpoint): Likewise.
9438 (set_breakpoint_data): Remove.
9439 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9440 (check_mem_read): Adjust for kind call bp_size.
9441 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9442 (clone_one_breakpoint): Adjust for kind.
9443 * mem-break.h (set_gdb_breakpoint): Likewise.
9444 (delete_gdb_breakpoint): Likewise.
9445 * server.c (process_serial_event): Likewise.
9446
9447 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9448
9449 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9450 (struct linux_target_ops) <breakpoint>: Remove.
9451 (struct linux_target_ops) <breakpoint_len>: Remove.
9452 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9453 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9454 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9455 (arm_sw_breakpoint_from_kind): New function.
9456 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9457 (struct linux_target_ops) <breakpoint>: Remove.
9458 (struct linux_target_ops) <breakpoint_len>: Remove.
9459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9461 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9462 (struct linux_target_ops) <breakpoint>: Remove.
9463 (struct linux_target_ops) <breakpoint_len>: Remove.
9464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9466 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9467 (struct linux_target_ops) <breakpoint>: Remove.
9468 (struct linux_target_ops) <breakpoint_len>: Remove.
9469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9471 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9472 and sw_breakpoint_from_kind to increment the pc.
9473 (linux_breakpoint_kind_from_pc): New function.
9474 (linux_sw_breakpoint_from_kind): New function.
9475 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9476 (initialize_low): Call breakpoint_kind_from_pc and
9477 sw_breakpoint_from_kind to replace breakpoint_data/len.
9478 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9479 New field.
9480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9481 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9482 (struct linux_target_ops) <breakpoint>: Remove.
9483 (struct linux_target_ops) <breakpoint_len>: Remove.
9484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9486 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9487 (struct linux_target_ops) <breakpoint>: Remove.
9488 (struct linux_target_ops) <breakpoint_len>: Remove.
9489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9491 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9492 (struct linux_target_ops) <breakpoint>: Remove.
9493 (struct linux_target_ops) <breakpoint_len>: Remove.
9494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9496 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9497 (struct linux_target_ops) <breakpoint>: Remove.
9498 (struct linux_target_ops) <breakpoint_len>: Remove.
9499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9501 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9502 (struct linux_target_ops) <breakpoint>: Remove.
9503 (struct linux_target_ops) <breakpoint_len>: Remove.
9504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9506 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9507 (struct linux_target_ops) <breakpoint>: Remove.
9508 (struct linux_target_ops) <breakpoint_len>: Remove.
9509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9511 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9512 (struct linux_target_ops) <breakpoint>: Remove.
9513 (struct linux_target_ops) <breakpoint_len>: Remove.
9514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9516 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9517 (struct linux_target_ops) <breakpoint>: Remove.
9518 (struct linux_target_ops) <breakpoint_len>: Remove.
9519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9521 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9522 (struct linux_target_ops) <breakpoint>: Remove.
9523 (struct linux_target_ops) <breakpoint_len>: Remove.
9524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9526 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9527 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9528 (struct linux_target_ops) <breakpoint>: Remove.
9529 (struct linux_target_ops) <breakpoint_len>: Remove.
9530 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9532 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9533 (struct linux_target_ops) <breakpoint>: Remove.
9534 (struct linux_target_ops) <breakpoint_len>: Remove.
9535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9537
9538 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9539
9540 * linux-cris-low.c (cris_get_pc): Remove void arg.
9541
9542 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9543
9544 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9545 variable name.
9546
9547 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9548
9549 * inferiors.c (thread_pid_matches_callback): New function.
9550 (find_thread_process): New function.
9551 (remove_thread): Reset current_thread.
9552 (remove_process): Assert threads have been removed first.
9553
9554 2015-10-15 Yao Qi <yao.qi@linaro.org>
9555
9556 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9557 if it is 3.
9558 (aarch64_remove_point): Likewise.
9559 * regcache.c (regcache_register_size): New function.
9560
9561 2015-10-12 Yao Qi <yao.qi@linaro.org>
9562
9563 * linux-aarch64-low.c: Update all callers as emit_load_store
9564 is renamed to aarch64_emit_load_store.
9565
9566 2015-10-12 Yao Qi <yao.qi@linaro.org>
9567
9568 * linux-aarch64-low.c: Update all callers of function renaming
9569 from emit_insn to aarch64_emit_insn.
9570
9571 2015-10-12 Yao Qi <yao.qi@linaro.org>
9572
9573 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9574 arch/aarch64-insn.h.
9575 (struct aarch64_memory_operand): Likewise.
9576 (ENCODE): Likewise.
9577 (emit_insn): Move to arch/aarch64-insn.c.
9578 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9579 (emit_load_store): Move to arch/aarch64-insn.c.
9580 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9581 (can_encode_int32): Remove.
9582
9583 2015-10-12 Yao Qi <yao.qi@linaro.org>
9584
9585 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9586 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9587 (aarch64_relocate_instruction): Likewise.
9588 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9589 (struct aarch64_insn_visitor): Likewise.
9590
9591 2015-10-12 Yao Qi <yao.qi@linaro.org>
9592
9593 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9594 (struct aarch64_insn_visitor): New.
9595 (struct aarch64_insn_relocation_data): New.
9596 (aarch64_ftrace_insn_reloc_b): New function.
9597 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9598 (aarch64_ftrace_insn_reloc_cb): Likewise.
9599 (aarch64_ftrace_insn_reloc_tb): Likewise.
9600 (aarch64_ftrace_insn_reloc_adr): Likewise.
9601 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9602 (aarch64_ftrace_insn_reloc_others): Likewise.
9603 (visitor): New.
9604 (aarch64_relocate_instruction): Use visitor.
9605
9606 2015-10-12 Yao Qi <yao.qi@linaro.org>
9607
9608 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9609 int. Add argument buf.
9610 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9611 aarch64_relocate_instruction.
9612
9613 2015-10-12 Yao Qi <yao.qi@linaro.org>
9614
9615 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9616 argument insn. Remove local variable insn. Don't call
9617 target_read_uint32.
9618 (aarch64_install_fast_tracepoint_jump_pad): Call
9619 target_read_uint32.
9620
9621 2015-09-30 Yao Qi <yao.qi@linaro.org>
9622
9623 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9624 (emit_load_store_pair): Likewise.
9625
9626 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9627
9628 * dll.c (match_dll): Add cast(s).
9629 (unloaded_dll): Likewise.
9630 * linux-low.c (second_thread_of_pid_p): Likewise.
9631 (delete_lwp_callback): Likewise.
9632 (count_events_callback): Likewise.
9633 (select_event_lwp_callback): Likewise.
9634 (linux_set_resume_request): Likewise.
9635 * server.c (accumulate_file_name_length): Likewise.
9636 (emit_dll_description): Likewise.
9637 (handle_qxfer_threads_worker): Likewise.
9638 (visit_actioned_threads): Likewise.
9639 * thread-db.c (any_thread_of): Likewise.
9640 * tracepoint.c (same_process_p): Likewise.
9641 (match_blocktype): Likewise.
9642 (build_traceframe_info_xml): Likewise.
9643
9644 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9645
9646 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9647 assignment.
9648 (gdb_unparse_agent_expr): Likewise.
9649 * hostio.c (require_data): Likewise.
9650 (handle_pread): Likewise.
9651 * linux-low.c (disable_regset): Likewise.
9652 (fetch_register): Likewise.
9653 (store_register): Likewise.
9654 (get_dynamic): Likewise.
9655 (linux_qxfer_libraries_svr4): Likewise.
9656 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9657 (set_fast_tracepoint_jump): Likewise.
9658 (uninsert_fast_tracepoint_jumps_at): Likewise.
9659 (reinsert_fast_tracepoint_jumps_at): Likewise.
9660 (validate_inserted_breakpoint): Likewise.
9661 (clone_agent_expr): Likewise.
9662 * regcache.c (init_register_cache): Likewise.
9663 * remote-utils.c (putpkt_binary_1): Likewise.
9664 (decode_M_packet): Likewise.
9665 (decode_X_packet): Likewise.
9666 (look_up_one_symbol): Likewise.
9667 (relocate_instruction): Likewise.
9668 (monitor_output): Likewise.
9669 * server.c (handle_search_memory): Likewise.
9670 (handle_qxfer_exec_file): Likewise.
9671 (handle_qxfer_libraries): Likewise.
9672 (handle_qxfer): Likewise.
9673 (handle_query): Likewise.
9674 (handle_v_cont): Likewise.
9675 (handle_v_run): Likewise.
9676 (captured_main): Likewise.
9677 * target.c (write_inferior_memory): Likewise.
9678 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9679 * tracepoint.c (init_trace_buffer): Likewise.
9680 (add_tracepoint_action): Likewise.
9681 (add_traceframe): Likewise.
9682 (add_traceframe_block): Likewise.
9683 (cmd_qtdpsrc): Likewise.
9684 (cmd_qtdv): Likewise.
9685 (cmd_qtstatus): Likewise.
9686 (response_source): Likewise.
9687 (response_tsv): Likewise.
9688 (cmd_qtnotes): Likewise.
9689 (gdb_collect): Likewise.
9690 (initialize_tracepoint): Likewise.
9691
9692 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9693
9694 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9695 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9696 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9697 <NOP>: New.
9698 (enum aarch64_condition_codes): New enum.
9699 (w0): New static global.
9700 (fp): Likewise.
9701 (lr): Likewise.
9702 (struct aarch64_memory_operand) <type>: New
9703 MEMORY_OPERAND_POSTINDEX type.
9704 (postindex_memory_operand): New helper function.
9705 (emit_ret): New function.
9706 (emit_load_store_pair): New function, factored out of emit_stp
9707 with support for MEMORY_OPERAND_POSTINDEX.
9708 (emit_stp): Rewrite using emit_load_store_pair.
9709 (emit_ldp): New function.
9710 (emit_load_store): Likewise.
9711 (emit_ldr): Mention post-index instruction in comment.
9712 (emit_ldrh): New function.
9713 (emit_ldrb): New function.
9714 (emit_ldrsw): Mention post-index instruction in comment.
9715 (emit_str): Likewise.
9716 (emit_subs): New function.
9717 (emit_cmp): Likewise.
9718 (emit_and): Likewise.
9719 (emit_orr): Likewise.
9720 (emit_orn): Likewise.
9721 (emit_eor): Likewise.
9722 (emit_mvn): Likewise.
9723 (emit_lslv): Likewise.
9724 (emit_lsrv): Likewise.
9725 (emit_asrv): Likewise.
9726 (emit_mul): Likewise.
9727 (emit_sbfm): Likewise.
9728 (emit_sbfx): Likewise.
9729 (emit_ubfm): Likewise.
9730 (emit_ubfx): Likewise.
9731 (emit_csinc): Likewise.
9732 (emit_cset): Likewise.
9733 (emit_nop): Likewise.
9734 (emit_ops_insns): New helper function.
9735 (emit_pop): Likewise.
9736 (emit_push): Likewise.
9737 (aarch64_emit_prologue): New function.
9738 (aarch64_emit_epilogue): Likewise.
9739 (aarch64_emit_add): Likewise.
9740 (aarch64_emit_sub): Likewise.
9741 (aarch64_emit_mul): Likewise.
9742 (aarch64_emit_lsh): Likewise.
9743 (aarch64_emit_rsh_signed): Likewise.
9744 (aarch64_emit_rsh_unsigned): Likewise.
9745 (aarch64_emit_ext): Likewise.
9746 (aarch64_emit_log_not): Likewise.
9747 (aarch64_emit_bit_and): Likewise.
9748 (aarch64_emit_bit_or): Likewise.
9749 (aarch64_emit_bit_xor): Likewise.
9750 (aarch64_emit_bit_not): Likewise.
9751 (aarch64_emit_equal): Likewise.
9752 (aarch64_emit_less_signed): Likewise.
9753 (aarch64_emit_less_unsigned): Likewise.
9754 (aarch64_emit_ref): Likewise.
9755 (aarch64_emit_if_goto): Likewise.
9756 (aarch64_emit_goto): Likewise.
9757 (aarch64_write_goto_address): Likewise.
9758 (aarch64_emit_const): Likewise.
9759 (aarch64_emit_call): Likewise.
9760 (aarch64_emit_reg): Likewise.
9761 (aarch64_emit_pop): Likewise.
9762 (aarch64_emit_stack_flush): Likewise.
9763 (aarch64_emit_zero_ext): Likewise.
9764 (aarch64_emit_swap): Likewise.
9765 (aarch64_emit_stack_adjust): Likewise.
9766 (aarch64_emit_int_call_1): Likewise.
9767 (aarch64_emit_void_call_2): Likewise.
9768 (aarch64_emit_eq_goto): Likewise.
9769 (aarch64_emit_ne_goto): Likewise.
9770 (aarch64_emit_lt_goto): Likewise.
9771 (aarch64_emit_le_goto): Likewise.
9772 (aarch64_emit_gt_goto): Likewise.
9773 (aarch64_emit_ge_got): Likewise.
9774 (aarch64_emit_ops_impl): New static global variable.
9775 (aarch64_emit_ops): New target function, return
9776 &aarch64_emit_ops_impl.
9777 (struct linux_target_ops): Install it.
9778
9779 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9780
9781 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9782 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9783 aarch64-ipa.o.
9784 * linux-aarch64-ipa.c: New file.
9785 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9786 and endian.h.
9787 (aarch64_get_thread_area): New target method.
9788 (extract_signed_bitfield): New helper function.
9789 (aarch64_decode_ldr_literal): New function.
9790 (enum aarch64_opcodes): New enum.
9791 (struct aarch64_register): New struct.
9792 (struct aarch64_operand): New struct.
9793 (x0): New static global.
9794 (x1): Likewise.
9795 (x2): Likewise.
9796 (x3): Likewise.
9797 (x4): Likewise.
9798 (w2): Likewise.
9799 (ip0): Likewise.
9800 (sp): Likewise.
9801 (xzr): Likewise.
9802 (aarch64_register): New helper function.
9803 (register_operand): Likewise.
9804 (immediate_operand): Likewise.
9805 (struct aarch64_memory_operand): New struct.
9806 (offset_memory_operand): New helper function.
9807 (preindex_memory_operand): Likewise.
9808 (enum aarch64_system_control_registers): New enum.
9809 (ENCODE): New macro.
9810 (emit_insn): New helper function.
9811 (emit_b): New function.
9812 (emit_bcond): Likewise.
9813 (emit_cb): Likewise.
9814 (emit_tb): Likewise.
9815 (emit_blr): Likewise.
9816 (emit_stp): Likewise.
9817 (emit_ldp_q_offset): Likewise.
9818 (emit_stp_q_offset): Likewise.
9819 (emit_load_store): Likewise.
9820 (emit_ldr): Likewise.
9821 (emit_ldrsw): Likewise.
9822 (emit_str): Likewise.
9823 (emit_ldaxr): Likewise.
9824 (emit_stxr): Likewise.
9825 (emit_stlr): Likewise.
9826 (emit_data_processing_reg): Likewise.
9827 (emit_data_processing): Likewise.
9828 (emit_add): Likewise.
9829 (emit_sub): Likewise.
9830 (emit_mov): Likewise.
9831 (emit_movk): Likewise.
9832 (emit_mov_addr): Likewise.
9833 (emit_mrs): Likewise.
9834 (emit_msr): Likewise.
9835 (emit_sevl): Likewise.
9836 (emit_wfe): Likewise.
9837 (append_insns): Likewise.
9838 (can_encode_int32_in): New helper function.
9839 (aarch64_relocate_instruction): New function.
9840 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9841 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9842 (struct linux_target_ops): Install aarch64_get_thread_area,
9843 aarch64_install_fast_tracepoint_jump_pad and
9844 aarch64_get_min_fast_tracepoint_insn_len.
9845
9846 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9847
9848 * Makefile.in (aarch64-insn.o): New rule.
9849 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9850
9851 2015-09-21 Yao Qi <yao.qi@linaro.org>
9852
9853 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9854
9855 2015-09-21 Yao Qi <yao.qi@linaro.org>
9856
9857 * tracepoint.c (max_jump_pad_size): Remove.
9858
9859 2015-09-18 Yao Qi <yao.qi@linaro.org>
9860
9861 * linux-aarch64-low.c: Don't include sys/uio.h.
9862 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9863
9864 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9865
9866 * tracepoint.c (eval_result_type): Change prototype.
9867 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9868
9869 2015-09-15 Pedro Alves <palves@redhat.com>
9870
9871 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9872 Check whether to report exec events instead of checking whether
9873 multiprocess is enabled.
9874
9875 2015-09-15 Pedro Alves <palves@redhat.com>
9876
9877 PR remote/18965
9878 * remote-utils.c (prepare_resume_reply): Merge
9879 TARGET_WAITKIND_VFORK_DONE switch case with the
9880 TARGET_WAITKIND_FORKED case.
9881
9882 2015-09-15 Yao Qi <yao.qi@linaro.org>
9883
9884 * server.c (handle_query): Check string comparison using
9885 "else if" instead of "if".
9886
9887 2015-09-15 Yao Qi <yao.qi@linaro.org>
9888
9889 * server.c (vCont_supported): New global variable.
9890 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9891 matches. Append ";vContSupported+" to own_buf.
9892 (handle_v_requests): Append ";s;S" to own_buf if target supports
9893 hardware single step or vCont_supported is false.
9894 (capture_main): Set vCont_supported to zero.
9895
9896 2015-09-15 Yao Qi <yao.qi@linaro.org>
9897
9898 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9899 it to ...
9900 (linux_supports_hardware_single_step): ... New function.
9901 (linux_target_ops): Update.
9902 * lynx-low.c (lynx_target_ops): Set field
9903 supports_hardware_single_step to target_can_do_hardware_single_step.
9904 * nto-low.c (nto_target_ops): Likewise.
9905 * spu-low.c (spu_target_ops): Likewise.
9906 * win32-low.c (win32_target_ops): Likewise.
9907 * target.c (target_can_do_hardware_single_step): New function.
9908 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9909 Remove. <supports_hardware_single_step>: New field.
9910 (target_supports_conditional_breakpoints): Remove.
9911 (target_supports_hardware_single_step): New macro.
9912 (target_can_do_hardware_single_step): Declare.
9913 * server.c (handle_query): Use target_supports_hardware_single_step
9914 instead of target_supports_conditional_breakpoints.
9915
9916 2015-09-15 Yao Qi <yao.qi@linaro.org>
9917
9918 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9919 function.
9920 (struct linux_target_ops the_low_target): Install
9921 aarch64_linux_siginfo_fixup.
9922
9923 2015-09-11 Don Breazeal <donb@codesourcery.com>
9924 Luis Machado <lgustavo@codesourcery.com>
9925
9926 * linux-low.c (linux_mourn): Static declaration.
9927 (linux_arch_setup): Move in front of
9928 handle_extended_wait.
9929 (linux_arch_setup_thread): New function.
9930 (handle_extended_wait): Handle exec events. Call
9931 linux_arch_setup_thread. Make event_lwp argument a
9932 pointer-to-a-pointer.
9933 (check_zombie_leaders): Do not check stopped threads.
9934 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9935 (linux_low_filter_event): Add lwp and thread for exec'ing
9936 non-leader thread if leader thread has been deleted.
9937 Refactor code into linux_arch_setup_thread and call it.
9938 Pass child lwp pointer by reference to handle_extended_wait.
9939 (linux_wait_for_event_filtered): Update comment.
9940 (linux_wait_1): Prevent clobbering exec event status.
9941 (linux_supports_exec_events): New function.
9942 (linux_target_ops) <supports_exec_events>: Initialize new member.
9943 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9944 new member.
9945 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9946 * server.c (report_exec_events): New global variable.
9947 (handle_query): Handle qSupported query for exec-events feature.
9948 (captured_main): Initialize report_exec_events.
9949 * server.h (report_exec_events): Declare new global variable.
9950 * target.h (struct target_ops) <supports_exec_events>: New
9951 member.
9952 (target_supports_exec_events): New macro.
9953 * win32-low.c (win32_target_ops) <supports_exec_events>:
9954 Initialize new member.
9955
9956 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9957
9958 * linux-low.c (linux_low_enable_btrace): Remove.
9959 (linux_target_ops): Replace linux_low_enable_btrace with
9960 linux_enable_btrace.
9961
9962 2015-09-03 Yao Qi <yao.qi@linaro.org>
9963
9964 * linux-aarch64-low.c (aarch64_insert_point): Call
9965 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9966 returns true.
9967
9968 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9969
9970 * linux-low.c (check_stopped_by_breakpoint): Use
9971 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9972
9973 2015-08-27 Pedro Alves <palves@redhat.com>
9974
9975 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9976
9977 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9978
9979 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9980 the XNEW-family equivalent.
9981 (compile_bytecodes): Likewise.
9982 * dll.c (loaded_dll): Likewise.
9983 * event-loop.c (append_callback_event): Likewise.
9984 (create_file_handler): Likewise.
9985 (create_file_event): Likewise.
9986 * hostio.c (handle_open): Likewise.
9987 * inferiors.c (add_thread): Likewise.
9988 (add_process): Likewise.
9989 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9990 * linux-arm-low.c (arm_new_process): Likewise.
9991 (arm_new_thread): Likewise.
9992 * linux-low.c (add_to_pid_list): Likewise.
9993 (linux_add_process): Likewise.
9994 (handle_extended_wait): Likewise.
9995 (add_lwp): Likewise.
9996 (enqueue_one_deferred_signal): Likewise.
9997 (enqueue_pending_signal): Likewise.
9998 (linux_resume_one_lwp_throw): Likewise.
9999 (linux_resume_one_thread): Likewise.
10000 (linux_read_memory): Likewise.
10001 (linux_write_memory): Likewise.
10002 * linux-mips-low.c (mips_linux_new_process): Likewise.
10003 (mips_linux_new_thread): Likewise.
10004 (mips_add_watchpoint): Likewise.
10005 * linux-x86-low.c (initialize_low_arch): Likewise.
10006 * lynx-low.c (lynx_add_process): Likewise.
10007 * mem-break.c (set_raw_breakpoint_at): Likewise.
10008 (set_breakpoint): Likewise.
10009 (add_condition_to_breakpoint): Likewise.
10010 (add_commands_to_breakpoint): Likewise.
10011 (clone_agent_expr): Likewise.
10012 (clone_one_breakpoint): Likewise.
10013 * regcache.c (new_register_cache): Likewise.
10014 * remote-utils.c (look_up_one_symbol): Likewise.
10015 * server.c (queue_stop_reply): Likewise.
10016 (start_inferior): Likewise.
10017 (queue_stop_reply_callback): Likewise.
10018 (handle_target_event): Likewise.
10019 * spu-low.c (fetch_ppc_memory): Likewise.
10020 (store_ppc_memory): Likewise.
10021 * target.c (set_target_ops): Likewise.
10022 * thread-db.c (thread_db_load_search): Likewise.
10023 (try_thread_db_load_1): Likewise.
10024 * tracepoint.c (add_tracepoint): Likewise.
10025 (add_tracepoint_action): Likewise.
10026 (create_trace_state_variable): Likewise.
10027 (cmd_qtdpsrc): Likewise.
10028 (cmd_qtro): Likewise.
10029 (add_while_stepping_state): Likewise.
10030 * win32-low.c (child_add_thread): Likewise.
10031 (get_image_name): Likewise.
10032
10033 2015-08-25 Yao Qi <yao.qi@linaro.org>
10034
10035 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10036
10037 2015-08-25 Yao Qi <yao.qi@linaro.org>
10038
10039 * Makefile.in (aarch64-linux.o): New rule.
10040 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10041 srv_tgtobj.
10042 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10043 (aarch64_init_debug_reg_state): Make it extern.
10044 (aarch64_linux_prepare_to_resume): Remove.
10045
10046 2015-08-25 Yao Qi <yao.qi@linaro.org>
10047
10048 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10049 lwp_arch_private_info and ptid_of_lwp.
10050
10051 2015-08-25 Yao Qi <yao.qi@linaro.org>
10052
10053 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10054 Find proc_info by find_process_pid. All callers updated.
10055
10056 2015-08-25 Yao Qi <yao.qi@linaro.org>
10057
10058 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10059 Remove.
10060 (debug_reg_change_callback): Remove.
10061 (aarch64_notify_debug_reg_change): Remove.
10062
10063 2015-08-25 Yao Qi <yao.qi@linaro.org>
10064
10065 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10066 Call current_lwp_ptid.
10067
10068 2015-08-25 Yao Qi <yao.qi@linaro.org>
10069
10070 * linux-aarch64-low.c (debug_reg_change_callback): Use
10071 debug_printf.
10072
10073 2015-08-25 Yao Qi <yao.qi@linaro.org>
10074
10075 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10076
10077 2015-08-25 Yao Qi <yao.qi@linaro.org>
10078
10079 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10080
10081 2015-08-25 Yao Qi <yao.qi@linaro.org>
10082
10083 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10084 the code.
10085
10086 2015-08-25 Yao Qi <yao.qi@linaro.org>
10087
10088 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10089 Remove.
10090 (debug_reg_change_callback): Remove argument entry and add argument
10091 lwp. Remove local variable thread. Don't print thread id in the
10092 debugging output. Don't check whether pid of thread equals to pid.
10093 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10094 iterate_over_lwps instead find_inferior.
10095
10096 2015-08-24 Pedro Alves <palves@redhat.com>
10097
10098 * inferiors.c (get_first_process): New function.
10099 * inferiors.h (get_first_process): New declaration.
10100 * remote-utils.c (read_ptid): Default to the first process in the
10101 list, instead of to the current thread's process.
10102
10103 2015-08-24 Pedro Alves <palves@redhat.com>
10104
10105 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10106 * event-loop.c: Likewise.
10107 * remote-utils.c: Likewise.
10108 * tracepoint.c: Likewise.
10109
10110 2015-08-24 Pedro Alves <palves@redhat.com>
10111
10112 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10113 ptid_get_lwp.
10114
10115 2015-08-21 Pedro Alves <palves@redhat.com>
10116
10117 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10118 instead of literal 1.
10119
10120 2015-08-21 Pedro Alves <palves@redhat.com>
10121
10122 * tdesc.c (default_description): Explicitly zero-initialize.
10123
10124 2015-08-21 Pedro Alves <palves@redhat.com>
10125
10126 PR gdb/18749
10127 * inferiors.c (remove_thread): Discard any pending stop reply for
10128 this thread.
10129 * server.c (remove_all_on_match_pid): Rename to ...
10130 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10131 instead of a pid.
10132 (discard_queued_stop_replies): Change parameter to a ptid. Now
10133 extern.
10134 (handle_v_kill, kill_inferior_callback, captured_main)
10135 (process_serial_event): Adjust.
10136 * server.h (discard_queued_stop_replies): Declare.
10137
10138 2015-08-21 Pedro Alves <palves@redhat.com>
10139
10140 * linux-low.c (wait_for_sigstop): Always switch to no thread
10141 selected if the previously current thread dies.
10142 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10143 process instead of the current thread's.
10144 * remote-utils.c (input_interrupt): Don't check if there's no
10145 current thread.
10146 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10147 current thread to the general thread fails, error out.
10148 (handle_qxfer_auxv, handle_qxfer_libraries)
10149 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10150 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10151 (handle_query): Check if there's a thread selected instead of
10152 checking whether there's any thread in the thread list.
10153 (handle_qxfer_threads, handle_qxfer_btrace)
10154 (handle_qxfer_btrace_conf): Don't error out early if there's no
10155 thread in the thread list.
10156 (handle_v_cont, myresume): Don't set the current thread to the
10157 continue thread.
10158 (process_serial_event) <Hg handling>: Also set thread_id if the
10159 previous general thread is still alive.
10160 (process_serial_event) <g/G handling>: If setting the current
10161 thread to the general thread fails, error out.
10162 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10163 thread's lwp instead of the current thread's.
10164 * target.c (set_desired_thread): If the desired thread was not
10165 found, leave the current thread pointing to NULL. Return an int
10166 (boolean) indicating success.
10167 * target.h (set_desired_thread): Change return type to int.
10168
10169 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10170
10171 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10172 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10173 #includes.
10174 (ps_get_thread_area): New function.
10175
10176 2015-08-19 Gary Benson <gbenson@redhat.com>
10177
10178 * hostio.c (handle_pread): Do not attempt to read more data
10179 than hostio_reply_with_data can fit in a packet.
10180
10181 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10182
10183 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10184
10185 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10186
10187 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10188
10189 2015-08-06 Pedro Alves <palves@redhat.com>
10190
10191 * tracepoint.c (expr_eval_result): Now an int.
10192
10193 2015-08-06 Pedro Alves <palves@redhat.com>
10194
10195 * gdbthread.h (struct regcache): Forward declare.
10196 (struct thread_info) <regcache_data>: Now a struct regcache
10197 pointer.
10198 * inferiors.c (inferior_regcache_data)
10199 (set_inferior_regcache_data): Now work with struct regcache
10200 pointers.
10201 * inferiors.h (struct regcache): Forward declare.
10202 (inferior_regcache_data, set_inferior_regcache_data): Now work
10203 with struct regcache pointers.
10204 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10205 (free_register_cache_thread): Remove struct regcache pointer
10206 casts.
10207
10208 2015-08-06 Pedro Alves <palves@redhat.com>
10209
10210 * server.c (captured_main): On error, print the exception message
10211 to stderr, and if run_once is set, throw a quit.
10212
10213 2015-08-06 Pedro Alves <palves@redhat.com>
10214
10215 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10216 the current thread.
10217
10218 2015-08-06 Pedro Alves <palves@redhat.com>
10219
10220 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10221 reading beyond the passed in buffer length.
10222
10223 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10224
10225 * tracepoint.c (symbol_list) <required>: Remove.
10226
10227 2015-08-06 Pedro Alves <palves@redhat.com>
10228
10229 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10230 count if stopping and suspending threads.
10231 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10232 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10233 (linux_detach): Complete an ongoing step-over.
10234 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10235 throughout.
10236 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10237 (linux_wait_1): If passing a signal to the inferior after
10238 finishing a step-over, unsuspend and re-resume all lwps. If we
10239 see a single-step event but the thread should be continuing, don't
10240 pass the trap to gdb.
10241 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10242 internal_error instead of gdb_assert.
10243 (enqueue_pending_signal): New function.
10244 (check_ptrace_stopped_lwp_gone): Add debug output.
10245 (start_step_over): Use internal_error instead of gdb_assert.
10246 (complete_ongoing_step_over): New function.
10247 (linux_resume_one_thread): Don't resume a suspended thread.
10248 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10249 it stepping.
10250
10251 2015-08-06 Pedro Alves <palves@redhat.com>
10252
10253 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10254 (linux_thread_alive): Use lwp_is_marked_dead.
10255 (extended_event_reported): Delete.
10256 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10257 instead of extended_event_reported.
10258 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10259 as well.
10260 (lwp_is_marked_dead): New function.
10261 (lwp_running): Use lwp_is_marked_dead.
10262 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10263 comment.
10264
10265 2015-08-06 Pedro Alves <palves@redhat.com>
10266
10267 * linux-low.c (linux_wait_1): Move fork event output out of the
10268 !report_to_gdb check. Pass event_child->waitstatus to
10269 target_waitstatus_to_string instead of ourstatus.
10270
10271 2015-08-04 Yao Qi <yao.qi@linaro.org>
10272
10273 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10274 if current_thread is 32 bit.
10275
10276 2015-08-04 Yao Qi <yao.qi@linaro.org>
10277
10278 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10279 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10280 * server.c (extended_protocol): Remove "static".
10281 * server.h (extended_protocol): Declare it.
10282
10283 2015-08-04 Yao Qi <yao.qi@linaro.org>
10284
10285 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10286 both aarch64 and aarch32.
10287 (aarch64_set_pc): Likewise.
10288
10289 2015-08-04 Yao Qi <yao.qi@linaro.org>
10290
10291 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10292 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10293 arm-with-neon.xml to srv_xmlfiles.
10294 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10295 (is_64bit_tdesc): New function.
10296 (aarch64_linux_read_description): New function.
10297 (aarch64_arch_setup): Call aarch64_linux_read_description.
10298 (regs_info): Rename to regs_info_aarch64.
10299 (aarch64_regs_info): Return right regs_info.
10300 (initialize_low_arch): Call initialize_low_arch_aarch32.
10301
10302 2015-08-04 Yao Qi <yao.qi@linaro.org>
10303
10304 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10305 * linux-aarch32-low.c: New file.
10306 * linux-aarch32-low.h: New file.
10307 * linux-arm-low.c (arm_fill_gregset): Move it to
10308 linux-aarch32-low.c.
10309 (arm_store_gregset): Likewise.
10310 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10311 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10312 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10313 (regs_info): Rename to regs_info_arm.
10314 (arm_regs_info): Return regs_info_aarch32 if
10315 have_ptrace_getregset is 1 and target description is
10316 arm_with_neon or arm_with_vfpv3.
10317 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10318 Call initialize_low_arch_aarch32 instead.
10319
10320 2015-08-04 Yao Qi <yao.qi@linaro.org>
10321
10322 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10323 * linux-low.c: ... here.
10324 * linux-low.h (have_ptrace_getregset): Declare it.
10325
10326 2015-08-04 Pedro Alves <palves@redhat.com>
10327
10328 * thread-db.c (struct thread_db): Use new typedefs.
10329 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10330 CHK calls.
10331 (disable_thread_event_reporting): Cast result of dlsym to
10332 destination function pointer type.
10333 (thread_db_mourn): Use td_ta_delete_ftype.
10334
10335 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10336
10337 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10338 arch variant.
10339 (CDX_BREAKPOINT): Define for R2.
10340 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10341 (the_low_target): Add comments.
10342
10343 2015-07-30 Yao Qi <yao.qi@linaro.org>
10344
10345 * linux-arm-low.c (arm_hwcap): Remove it.
10346 (arm_read_description): New local variable arm_hwcap. Don't
10347 set arm_hwcap to zero.
10348
10349 2015-07-30 Yao Qi <yao.qi@linaro.org>
10350
10351 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10352 Use regcache->tdesc instead.
10353 (arm_store_wmmxregset): Likewise.
10354 (arm_fill_vfpregset): Likewise.
10355 (arm_store_vfpregset): Likewise.
10356
10357 2015-07-30 Yao Qi <yao.qi@linaro.org>
10358
10359 * linux-arm-low.c: Include arch/arm.h.
10360 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10361 (arm_store_gregset): Likewise.
10362
10363 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10364
10365 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10366 ptrace's 4th parameter.
10367
10368 2015-07-27 Yao Qi <yao.qi@linaro.org>
10369
10370 * configure.srv (case aarch64*-*-linux*): Don't set
10371 srv_linux_usrregs.
10372
10373 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10374
10375 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10376 sys/ptrace.h.
10377 * linux-arm-low.c: Likewise.
10378 * linux-cris-low.c: Likewise.
10379 * linux-crisv32-low.c: Likewise.
10380 * linux-low.c: Likewise.
10381 * linux-m68k-low.c: Likewise.
10382 * linux-mips-low.c: Likewise.
10383 * linux-nios2-low.c: Likewise.
10384 * linux-s390-low.c: Likewise.
10385 * linux-sparc-low.c: Likewise.
10386 * linux-tic6x-low.c: Likewise.
10387 * linux-tile-low.c: Likewise.
10388 * linux-x86-low.c: Likewise.
10389
10390 2015-07-24 Pedro Alves <palves@redhat.com>
10391
10392 * config.in: Regenerate.
10393 * configure: Regenerate.
10394
10395 2015-07-24 Pedro Alves <palves@redhat.com>
10396
10397 * acinclude.m4: Include ../ptrace.m4.
10398 * configure.ac: Call GDB_AC_PTRACE.
10399 * config.in, configure: Regenerate.
10400
10401 2015-07-24 Yao Qi <yao.qi@linaro.org>
10402
10403 * linux-low.c (linux_create_inferior): Remove setting to
10404 proc->priv->new_inferior.
10405 (linux_attach): Likewise.
10406 (linux_low_filter_event): Likewise.
10407 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10408
10409 2015-07-24 Yao Qi <yao.qi@linaro.org>
10410
10411 * linux-low.c (linux_arch_setup): New function.
10412 (linux_low_filter_event): If proc->tdesc is NULL and
10413 proc->attached is true, call the_low_target.arch_setup.
10414 Otherwise, keep status pending, and return.
10415 (linux_resume_one_lwp_throw): Don't call get_pc if
10416 thread->while_stepping isn't NULL. Don't call
10417 get_thread_regcache if proc->tdesc is NULL.
10418 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10419 (linux_target_ops): Install arch_setup.
10420 * server.c (start_inferior): Call the_target->arch_setup.
10421 * target.h (struct target_ops) <arch_setup>: New field.
10422 (target_arch_setup): New marco.
10423 * lynx-low.c (lynx_target_ops): Update.
10424 * nto-low.c (nto_target_ops): Update.
10425 * spu-low.c (spu_target_ops): Update.
10426 * win32-low.c (win32_target_ops): Update.
10427
10428 2015-07-24 Yao Qi <yao.qi@linaro.org>
10429
10430 * linux-low.c (linux_add_process): Don't set
10431 proc->priv->new_inferior.
10432 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10433 (linux_attach): Likewise.
10434
10435 2015-07-24 Yao Qi <yao.qi@linaro.org>
10436
10437 * server.c (start_inferior): Code refactor.
10438
10439 2015-07-24 Yao Qi <yao.qi@linaro.org>
10440
10441 * server.c (process_serial_event): Set general_thread.
10442
10443 2015-07-21 Yao Qi <yao.qi@linaro.org>
10444
10445 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10446 aarch64_linux_get_debug_reg_capacity.
10447
10448 2015-07-17 Yao Qi <yao.qi@linaro.org>
10449
10450 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10451 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10452 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10453 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10454 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10455 (AARCH64_HWP_ALIGNMENT): Likewise.
10456 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10457 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10458 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10459 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10460 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10461 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10462 (struct aarch64_debug_reg_state): Likewise.
10463 (struct arch_lwp_info): Likewise.
10464 (aarch64_align_watchpoint): Likewise.
10465 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10466 (aarch64_watchpoint_length): Likewise.
10467 (aarch64_point_encode_ctrl_reg): Likewise
10468 (aarch64_point_is_aligned): Likewise.
10469 (aarch64_align_watchpoint): Likewise.
10470 (aarch64_linux_set_debug_regs):
10471 (aarch64_dr_state_insert_one_point): Likewise.
10472 (aarch64_dr_state_remove_one_point): Likewise.
10473 (aarch64_handle_breakpoint): Likewise.
10474 (aarch64_handle_aligned_watchpoint): Likewise.
10475 (aarch64_handle_unaligned_watchpoint): Likewise.
10476 (aarch64_handle_watchpoint): Likewise.
10477
10478 2015-07-17 Yao Qi <yao.qi@linaro.org>
10479
10480 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10481 and don't aarch64_get_debug_reg_state. All callers update.
10482 (aarch64_handle_aligned_watchpoint): Likewise.
10483 (aarch64_handle_unaligned_watchpoint): Likewise.
10484 (aarch64_handle_watchpoint): Likewise.
10485 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10486 (aarch64_remove_point): Likewise.
10487
10488 2015-07-17 Yao Qi <yao.qi@linaro.org>
10489
10490 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10491 debug_printf.
10492 (aarch64_handle_unaligned_watchpoint): Likewise.
10493
10494 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10495
10496 Revert the previous 3 commits:
10497 Move gdb_regex* to common/
10498 Move linux_find_memory_regions_full & co.
10499 gdbserver build-id attribute generator
10500
10501 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10502 Jan Kratochvil <jan.kratochvil@redhat.com>
10503
10504 gdbserver build-id attribute generator.
10505 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10506 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10507 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10508 (find_phdr): New.
10509 (get_dynamic): Use find_pdhr to traverse program headers.
10510 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10511 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10512 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10513 (get_hex_build_id): New.
10514 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10515 to reply XML document.
10516
10517 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10518 Jan Kratochvil <jan.kratochvil@redhat.com>
10519
10520 * target.c: Include target/target-utils.h and fcntl.h.
10521 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10522 (target_fileio_read_stralloc): New functions.
10523
10524 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10525
10526 * Makefile.in (OBS): Add gdb_regex.o.
10527 (gdb_regex.o): New.
10528 * config.in: Rebuilt.
10529 * configure: Rebuilt.
10530
10531 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10532 Jan Kratochvil <jan.kratochvil@redhat.com>
10533
10534 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10535 * Makefile.in (OBS): Add target-utils.o.
10536 (linux-maps.o, target-utils.o): New.
10537 * configure.srv (srv_linux_obj): Add linux-maps.o.
10538
10539 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10540
10541 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10542 function, return 1.
10543 (the_low_target): Install it.
10544
10545 2015-07-14 Pedro Alves <palves@redhat.com>
10546
10547 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10548 Instead, ignore ECHILD, and throw an error for other errnos.
10549
10550 2015-07-10 Pedro Alves <palves@redhat.com>
10551
10552 * event-loop.c (struct callback_event) <data>: Change type to
10553 gdb_client_data instance instead of gdb_client_data pointer.
10554 (append_callback_event): Adjust.
10555
10556 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10557
10558 * linux-aarch64-low.c: Add comments for each linux_target_ops
10559 method. Remove comments already covered in target_ops and
10560 linux_target_ops definitions.
10561 (the_low_target): Add comments for each unimplemented method.
10562
10563 2015-07-09 Yao Qi <yao.qi@linaro.org>
10564
10565 * linux-aarch64-low.c (aarch64_regmap): Remove.
10566 (aarch64_usrregs_info): Remove.
10567 (regs_info): Set field usrregs to NULL.
10568
10569 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10570
10571 * linux-low.c: Include "rsp-low.h"
10572 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10573 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10574 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10575 (handle_btrace_enable_pt): New.
10576 (handle_btrace_general_set): Support "pt".
10577 (handle_btrace_conf_general_set): Support "pt:size".
10578
10579 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10580
10581 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10582 Z_PACKET_SW_BP.
10583
10584 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10585
10586 * linux-aarch64-low.c: Remove comment about endianness.
10587 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10588 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10589 memcmp.
10590
10591 2015-06-24 Gary Benson <gbenson@redhat.com>
10592
10593 * linux-i386-ipa.c (stdint.h): Do not include.
10594 * lynx-i386-low.c (stdint.h): Likewise.
10595 * lynx-ppc-low.c (stdint.h): Likewise.
10596 * mem-break.c (stdint.h): Likewise.
10597 * thread-db.c (stdint.h): Likewise.
10598 * tracepoint.c (stdint.h): Likewise.
10599 * win32-low.c (stdint.h): Likewise.
10600
10601 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10602
10603 * server.c (write_qxfer_response): Update call to
10604 remote_escape_output.
10605
10606 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10607 Jan Kratochvil <jan.kratochvil@redhat.com>
10608
10609 Merge multiple hex conversions.
10610 * gdbreplay.c (tohex): Rename to 'fromhex'.
10611 (logchar): Use fromhex.
10612
10613 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10614
10615 * server.c (handle_qxfer_libraries): Set `version' attribute for
10616 <library-list>.
10617
10618 2015-06-10 Gary Benson <gbenson@redhat.com>
10619
10620 * target.h (struct target_ops) <multifs_open>: New field.
10621 <multifs_unlink>: Likewise.
10622 <multifs_readlink>: Likewise.
10623 * linux-low.c (nat/linux-namespaces.h): New include.
10624 (linux_target_ops): Initialize the_target->multifs_open,
10625 the_target->multifs_unlink and the_target->multifs_readlink.
10626 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10627 * hostio.c (hostio_fs_pid): New static variable.
10628 (hostio_handle_new_gdb_connection): New function.
10629 (handle_setfs): Likewise.
10630 (handle_open): Use the_target->multifs_open as appropriate.
10631 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10632 (handle_readlink): Use the_target->multifs_readlink as
10633 appropriate.
10634 (handle_vFile): Handle vFile:setfs packets.
10635 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10636 after target_handle_new_gdb_connection.
10637
10638 2015-06-10 Gary Benson <gbenson@redhat.com>
10639
10640 * configure.ac (AC_CHECK_FUNCS): Add setns.
10641 * config.in: Regenerate.
10642 * configure: Likewise.
10643 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10644 (linux-namespaces.o): New rule.
10645 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10646
10647 2015-06-09 Gary Benson <gbenson@redhat.com>
10648
10649 * hostio.c (handle_open): Process mode argument with
10650 fileio_to_host_mode.
10651
10652 2015-06-01 Yao Qi <yao.qi@linaro.org>
10653
10654 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10655 * linux-x86-low.c: Likewise.
10656
10657 2015-05-28 Don Breazeal <donb@codesourcery.com>
10658
10659 * linux-low.c (handle_extended_wait): Initialize
10660 thread_info.last_resume_kind for new fork children.
10661
10662 2015-05-15 Pedro Alves <palves@redhat.com>
10663
10664 * target.h (target_handle_new_gdb_connection): Rewrite using if
10665 wrapped in do/while.
10666
10667 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10668
10669 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10670 * configure, config.in: Regenerate.
10671 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10672 Declare typedef.
10673
10674 2015-05-12 Don Breazeal <donb@codesourcery.com>
10675
10676 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10677 PTRACE_EVENT_VFORK_DONE.
10678 (linux_low_ptrace_options, extended_event_reported): Add vfork
10679 events.
10680 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10681 and "vforkdone" for RSP 'T' Stop Reply Packet.
10682 * server.h (report_vfork_events): Declare
10683 global variable.
10684
10685 2015-05-12 Don Breazeal <donb@codesourcery.com>
10686
10687 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10688 (the_low_target) <new_fork>: Initialize new member.
10689 * linux-arm-low.c (arm_new_fork): New function.
10690 (the_low_target) <new_fork>: Initialize new member.
10691 * linux-low.c (handle_extended_wait): Call new target function
10692 new_fork.
10693 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10694 * linux-mips-low.c (mips_add_watchpoint): New function
10695 extracted from mips_insert_point.
10696 (the_low_target) <new_fork>: Initialize new member.
10697 (mips_linux_new_fork): New function.
10698 (mips_insert_point): Call mips_add_watchpoint.
10699 * linux-x86-low.c (x86_linux_new_fork): New function.
10700 (the_low_target) <new_fork>: Initialize new member.
10701
10702 2015-05-12 Don Breazeal <donb@codesourcery.com>
10703
10704 * linux-low.c (handle_extended_wait): Implement return value,
10705 rename argument 'event_child' to 'event_lwp', handle
10706 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10707 (linux_low_ptrace_options): New function.
10708 (linux_low_filter_event): Call linux_low_ptrace_options,
10709 use different argument fo linux_enable_event_reporting,
10710 use return value from handle_extended_wait.
10711 (extended_event_reported): New function.
10712 (linux_wait_1): Call extended_event_reported and set
10713 status to report fork events.
10714 (linux_write_memory): Add pid to debug message.
10715 (reset_lwp_ptrace_options_callback): New function.
10716 (linux_handle_new_gdb_connection): New function.
10717 (linux_target_ops): Initialize new structure member.
10718 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10719 * lynx-low.c: Initialize new structure member.
10720 * remote-utils.c (prepare_resume_reply): Implement stop reason
10721 "fork" for "T" stop message.
10722 * server.c (handle_query): Call handle_new_gdb_connection.
10723 * server.h (report_fork_events): Declare global flag.
10724 * target.h (struct target_ops) <handle_new_gdb_connection>:
10725 New member.
10726 (target_handle_new_gdb_connection): New macro.
10727 * win32-low.c: Initialize new structure member.
10728
10729 2015-05-12 Don Breazeal <donb@codesourcery.com>
10730
10731 * mem-break.c (APPEND_TO_LIST): Define macro.
10732 (clone_agent_expr): New function.
10733 (clone_one_breakpoint): New function.
10734 (clone_all_breakpoints): New function.
10735 * mem-break.h: Declare new functions.
10736
10737 2015-05-12 Don Breazeal <donb@codesourcery.com>
10738
10739 * linux-low.c (linux_supports_fork_events): New function.
10740 (linux_supports_vfork_events): New function.
10741 (linux_target_ops): Initialize new structure members.
10742 (initialize_low): Call linux_check_ptrace_features.
10743 * lynx-low.c (lynx_target_ops): Initialize new structure
10744 members.
10745 * server.c (report_fork_events, report_vfork_events):
10746 New global flags.
10747 (handle_query): Add new features to qSupported packet and
10748 response.
10749 (captured_main): Initialize new global variables.
10750 * target.h (struct target_ops) <supports_fork_events>:
10751 New member.
10752 <supports_vfork_events>: New member.
10753 (target_supports_fork_events): New macro.
10754 (target_supports_vfork_events): New macro.
10755 * win32-low.c (win32_target_ops): Initialize new structure
10756 members.
10757
10758 2015-05-12 Gary Benson <gbenson@redhat.com>
10759
10760 * server.c (handle_qxfer_exec_file): Use current process
10761 if annex is empty.
10762
10763 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10764
10765 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10766 Remove HAVE_PTRACE_GETREGS conditionals.
10767 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10768 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10769
10770 2015-05-08 Yao Qi <yao.qi@linaro.org>
10771
10772 * linux-low.c (linux_supports_conditional_breakpoints): New
10773 function.
10774 (linux_target_ops): Install new target method.
10775 * lynx-low.c (lynx_target_ops): Install NULL hook for
10776 supports_conditional_breakpoints.
10777 * nto-low.c (nto_target_ops): Likewise.
10778 * spu-low.c (spu_target_ops): Likewise.
10779 * win32-low.c (win32_target_ops): Likewise.
10780 * server.c (handle_query): Check
10781 target_supports_conditional_breakpoints.
10782 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10783 New field.
10784 (target_supports_conditional_breakpoints): New macro.
10785
10786 2015-05-06 Pedro Alves <palves@redhat.com>
10787
10788 PR server/18081
10789 * server.c (start_inferior): If the process exits, mourn it.
10790
10791 2015-04-21 Gary Benson <gbenson@redhat.com>
10792
10793 * hostio.c (fileio_open_flags_to_host): Factored out to
10794 fileio_to_host_openflags in common/fileio.c. Single use
10795 updated.
10796
10797 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10798
10799 * linux-xtensa-low.c (xtensa_fill_gregset)
10800 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10801 XCHAL_HAVE_LOOP.
10802
10803 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10804
10805 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10806 (regs_info): Replace usrregs pointer with NULL.
10807
10808 2015-04-17 Gary Benson <gbenson@redhat.com>
10809
10810 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10811 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10812 * server.c (handle_qxfer_exec_file): New function.
10813 (qxfer_packets): Add exec-file entry.
10814 (handle_query): Report qXfer:exec-file:read as supported packet.
10815
10816 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10817
10818 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10819
10820 2015-04-09 Gary Benson <gbenson@redhat.com>
10821
10822 * hostio-errno.c (errno_to_fileio_error): Remove function.
10823 Update caller to use remote_fileio_to_fio_error.
10824
10825 2015-04-09 Yao Qi <yao.qi@linaro.org>
10826
10827 * linux-low.c (linux_insert_point): Call
10828 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10829 (linux_remove_point): Call remove_memory_breakpoint if type is
10830 raw_bkpt_type_sw.
10831 * linux-x86-low.c (x86_insert_point): Don't call
10832 insert_memory_breakpoint.
10833 (x86_remove_point): Don't call remove_memory_breakpoint.
10834
10835 2015-04-01 Pedro Alves <palves@redhat.com>
10836 Cleber Rosa <crosa@redhat.com>
10837
10838 * server.c (gdbserver_usage): Reorganize and extend the usage
10839 message.
10840
10841 2015-03-24 Pedro Alves <palves@redhat.com>
10842
10843 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10844 output. Also dump TRAP_TRACE.
10845 (linux_low_filter_event): In debug output, distinguish a
10846 resume_stop SIGSTOP from a delayed SIGSTOP.
10847
10848 2015-03-24 Gary Benson <gbenson@redhat.com>
10849
10850 * linux-x86-low.c (x86_linux_new_thread): Moved to
10851 nat/x86-linux.c.
10852 (x86_linux_prepare_to_resume): Likewise.
10853
10854 2015-03-24 Gary Benson <gbenson@redhat.com>
10855
10856 * Makefile.in (x86-linux-dregs.o): New rule.
10857 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10858 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10859 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10860 (x86_linux_dr_get): Likewise.
10861 (x86_linux_dr_set): Likewise.
10862 (update_debug_registers_callback): Likewise.
10863 (x86_linux_dr_set_addr): Likewise.
10864 (x86_linux_dr_get_addr): Likewise.
10865 (x86_linux_dr_set_control): Likewise.
10866 (x86_linux_dr_get_control): Likewise.
10867 (x86_linux_dr_get_status): Likewise.
10868 (x86_linux_update_debug_registers): Likewise.
10869
10870 2015-03-24 Gary Benson <gbenson@redhat.com>
10871
10872 * linux-x86-low.c (x86_linux_update_debug_registers):
10873 New function, factored out from...
10874 (x86_linux_prepare_to_resume): ...this.
10875
10876 2015-03-24 Gary Benson <gbenson@redhat.com>
10877
10878 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10879 (x86_linux_dr_set): Likewise.
10880 (update_debug_registers_callback): Likewise.
10881 (x86_linux_dr_set_addr): Likewise.
10882 (x86_linux_dr_get_addr): Likewise.
10883 (x86_linux_dr_set_control): Likewise.
10884 (x86_linux_dr_get_control): Likewise.
10885 (x86_linux_dr_get_status): Likewise.
10886 (x86_linux_prepare_to_resume): Likewise.
10887
10888 2015-03-24 Gary Benson <gbenson@redhat.com>
10889
10890 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10891 Use perror_with_name. Pass string through gettext.
10892 (x86_linux_dr_set): Likewise.
10893
10894 2015-03-24 Gary Benson <gbenson@redhat.com>
10895
10896 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10897 (x86_linux_dr_set_addr): ...this.
10898 (x86_dr_low_get_addr): Rename to...
10899 (x86_linux_dr_get_addr): ...this.
10900 (x86_dr_low_set_control): Rename to...
10901 (x86_linux_dr_set_control): ...this.
10902 (x86_dr_low_get_control): Rename to...
10903 (x86_linux_dr_get_control): ...this.
10904 (x86_dr_low_get_status): Rename to...
10905 (x86_linux_dr_get_status): ...this.
10906 (x86_dr_low): Update with new function names.
10907
10908 2015-03-24 Gary Benson <gbenson@redhat.com>
10909
10910 * Makefile.in (x86-linux.o): New rule.
10911 * configure.srv: Add x86-linux.o to relevant targets.
10912 * linux-low.c (lwp_set_arch_private_info): New function.
10913 (lwp_arch_private_info): Likewise.
10914 * linux-x86-low.c: Include nat/x86-linux.h.
10915 (arch_lwp_info): Removed structure.
10916 (update_debug_registers_callback):
10917 Use lwp_set_debug_registers_changed.
10918 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10919 and lwp_set_debug_registers_changed.
10920 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10921
10922 2015-03-24 Gary Benson <gbenson@redhat.com>
10923
10924 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10925 * linux-arm-low.c (arm_new_thread): Likewise.
10926 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10927 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10928 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10929 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10930
10931 2015-03-24 Gary Benson <gbenson@redhat.com>
10932
10933 * linux-low.c (ptid_of_lwp): New function.
10934 (lwp_is_stopped): Likewise.
10935 (lwp_stop_reason): Likewise.
10936 * linux-x86-low.c (update_debug_registers_callback):
10937 Use lwp_is_stopped.
10938 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10939 lwp_stop_reason.
10940
10941 2015-03-24 Gary Benson <gbenson@redhat.com>
10942
10943 * linux-low.h (linux_stop_lwp): Remove declaration.
10944
10945 2015-03-24 Gary Benson <gbenson@redhat.com>
10946
10947 * linux-low.h: Include nat/linux-nat.h.
10948 * linux-low.c (iterate_over_lwps_args): New structure.
10949 (iterate_over_lwps_filter): New function.
10950 (iterate_over_lwps): Likewise.
10951 * linux-x86-low.c (update_debug_registers_callback):
10952 Update signature to what iterate_over_lwps expects.
10953 Remove PID check that iterate_over_lwps now performs.
10954 (x86_dr_low_set_addr): Use iterate_over_lwps.
10955 (x86_dr_low_set_control): Likewise.
10956
10957 2015-03-24 Gary Benson <gbenson@redhat.com>
10958
10959 * linux-x86-low.c (x86_debug_reg_state): New function.
10960 (x86_linux_prepare_to_resume): Use the above.
10961
10962 2015-03-24 Gary Benson <gbenson@redhat.com>
10963
10964 * linux-low.c (current_lwp_ptid): New function.
10965 * linux-x86-low.c: Include nat/linux-nat.h.
10966 (x86_dr_low_get_addr): Use current_lwp_ptid.
10967 (x86_dr_low_get_control): Likewise.
10968 (x86_dr_low_get_status): Likewise.
10969
10970 2015-03-20 Pedro Alves <palves@redhat.com>
10971
10972 * tracepoint.c (cmd_qtstatus): Make "str" const.
10973
10974 2015-03-20 Pedro Alves <palves@redhat.com>
10975
10976 * server.c (handle_general_set): Make "req_str" const.
10977
10978 2015-03-19 Pedro Alves <palves@redhat.com>
10979
10980 * linux-low.c (linux_resume_one_lwp): Rename to ...
10981 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10982 instead call perror_with_name.
10983 (check_ptrace_stopped_lwp_gone): New function.
10984 (linux_resume_one_lwp): Reimplement as wrapper around
10985 linux_resume_one_lwp_throw that swallows errors if the LWP is
10986 gone.
10987
10988 2015-03-19 Pedro Alves <palves@redhat.com>
10989
10990 * linux-low.c (count_events_callback, select_event_lwp_callback):
10991 No longer check whether the thread has resume_stop as last resume
10992 kind.
10993
10994 2015-03-19 Pedro Alves <palves@redhat.com>
10995
10996 * linux-low.c (count_events_callback, select_event_lwp_callback):
10997 Use the lwp's status_pending_p field, not the thread's.
10998
10999 2015-03-19 Pedro Alves <palves@redhat.com>
11000
11001 * linux-low.c (select_event_lwp_callback): Update comments to
11002 no longer mention SIGTRAP.
11003
11004 2015-03-18 Gary Benson <gbenson@redhat.com>
11005
11006 * server.c (handle_query): Do not report vFile:fstat as supported.
11007
11008 2015-03-11 Gary Benson <gbenson@redhat.com>
11009
11010 * hostio.c (sys/types.h): New include.
11011 (sys/stat.h): Likewise.
11012 (common-remote-fileio.h): Likewise.
11013 (handle_fstat): New function.
11014 (handle_vFile): Handle vFile:fstat packets.
11015
11016 2015-03-11 Gary Benson <gbenson@redhat.com>
11017
11018 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11019 struct stat.st_blocks and struct stat.st_blksize.
11020 * configure: Regenerate.
11021 * config.in: Likewise.
11022 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11023 (OBS): Add common-remote-fileio.o.
11024 (common-remote-fileio.o): New rule.
11025
11026 2015-03-09 Pedro Alves <palves@redhat.com>
11027
11028 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11029 'struct sockaddr' pointer in 'accept' call.
11030
11031 2015-03-09 Pedro Alves <palves@redhat.com>
11032
11033 Revert:
11034 2015-03-07 Pedro Alves <palves@redhat.com>
11035 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11036 or <winsock2.h> here. Instead include "gdb_socket.h".
11037 (remote_open): Use union gdb_sockaddr_u.
11038 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11039 or <winsock2.h> here. Instead include "gdb_socket.h".
11040 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11041 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11042 or <sys/un.h>.
11043 (init_named_socket, gdb_agent_helper_thread): Use union
11044 gdb_sockaddr_u.
11045
11046 2015-03-07 Pedro Alves <palves@redhat.com>
11047
11048 * configure.ac (build_warnings): Move
11049 -Wdeclaration-after-statement to the C-specific set.
11050 * configure: Regenerate.
11051
11052 2015-03-07 Pedro Alves <palves@redhat.com>
11053
11054 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11055 or <winsock2.h> here. Instead include "gdb_socket.h".
11056 (remote_open): Use union gdb_sockaddr_u.
11057 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11058 or <winsock2.h> here. Instead include "gdb_socket.h".
11059 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11060 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11061 or <sys/un.h>.
11062 (init_named_socket, gdb_agent_helper_thread): Use union
11063 gdb_sockaddr_u.
11064
11065 2015-03-07 Pedro Alves <palves@redhat.com>
11066
11067 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11068 instead.
11069
11070 2015-03-06 Yao Qi <yao.qi@linaro.org>
11071
11072 * linux-aarch64-low.c (aarch64_insert_point): Use
11073 show_debug_regs as a boolean.
11074 (aarch64_remove_point): Likewise.
11075
11076 2015-03-05 Pedro Alves <palves@redhat.com>
11077
11078 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11079 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11080 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11081 * nto-low.c (nto_target_ops): Likewise.
11082 * spu-low.c (spu_target_ops): Likewise.
11083 * win32-low.c (win32_target_ops): Likewise.
11084
11085 2015-03-04 Pedro Alves <palves@redhat.com>
11086
11087 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11088 Decide whether a breakpoint triggered based on the SIGTRAP's
11089 siginfo.si_code.
11090 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11091 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11092 (linux_low_filter_event): Check for breakpoints before checking
11093 watchpoints.
11094 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11095 siginfo.si_code.
11096 (linux_stopped_by_sw_breakpoint)
11097 (linux_supports_stopped_by_sw_breakpoint)
11098 (linux_stopped_by_hw_breakpoint)
11099 (linux_supports_stopped_by_hw_breakpoint): New functions.
11100 (linux_target_ops): Install new target methods.
11101
11102 2015-03-04 Pedro Alves <palves@redhat.com>
11103
11104 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11105 * server.c (swbreak_feature, hwbreak_feature): New globals.
11106 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11107 (captured_main): Clear swbreak_feature and hwbreak_feature.
11108 * server.h (swbreak_feature, hwbreak_feature): Declare.
11109 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11110 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11111 supports_stopped_by_hw_breakpoint>: New fields.
11112 (target_supports_stopped_by_sw_breakpoint)
11113 (target_stopped_by_sw_breakpoint)
11114 (target_supports_stopped_by_hw_breakpoint)
11115 (target_stopped_by_hw_breakpoint): Declare.
11116
11117 2015-03-04 Pedro Alves <palves@redhat.com>
11118
11119 enum lwp_stop_reason -> enum target_stop_reason
11120 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11121 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11122 (linux_wait_1, stuck_in_jump_pad_callback)
11123 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11124 (linux_stopped_by_watchpoint):
11125 * linux-low.h (enum lwp_stop_reason): Delete.
11126 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11127 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11128
11129 2015-03-04 Yao Qi <yao.qi@linaro.org>
11130
11131 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11132
11133 2015-03-03 Gary Benson <gbenson@redhat.com>
11134
11135 * hostio.c (handle_vFile): Fix prefix lengths.
11136
11137 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11138
11139 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11140 ptr_bits.
11141
11142 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11143
11144 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11145 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11146 (clean): Add "rm -f" for above C files.
11147 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11148 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11149 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11150 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11151 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11152 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11153 (init_registers_s390x_vx_linux64)
11154 (init_registers_s390x_tevx_linux64)
11155 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11156 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11157 declarations.
11158 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11159 (s390_store_vxrs_high): New functions.
11160 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11161 NT_S390_VXRS_HIGH.
11162 (s390_arch_setup): Add logic for selecting one of the new target
11163 descriptions. Activate the new vector regsets if applicable.
11164 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11165 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11166 and init_registers_s390x_tevx_linux64.
11167
11168 2015-03-01 Pedro Alves <palves@redhat.com>
11169
11170 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11171 parameter.
11172
11173 2015-02-27 Pedro Alves <palves@redhat.com>
11174
11175 * linux-x86-low.c (u_debugreg_offset): New function.
11176 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11177
11178 2015-02-27 Pedro Alves <palves@redhat.com>
11179
11180 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11181 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11182 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11183 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11184 (ps_lsetfpregs, ps_getpid)
11185 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11186 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11187 (ps_lsetxregs, ps_plog): Declare.
11188
11189 2015-02-27 Pedro Alves <palves@redhat.com>
11190
11191 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11192 IP_AGENT_EXPORT_FUNC.
11193 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11194 IP_AGENT_EXPORT_FUNC.
11195 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11196 (IP_AGENT_EXPORT): Delete.
11197 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11198 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11199 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11200 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11201 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11202 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11203 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11204 (traceframe_read_count, traceframe_write_count)
11205 (traceframes_created, trace_state_variables, get_raw_reg)
11206 (get_trace_state_variable_value, set_trace_state_variable_value)
11207 (ust_loaded, helper_thread_id, cmd_buf): Use
11208 IPA_SYM_EXPORTED_NAME.
11209 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11210 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11211 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11212 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11213 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11214 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11215 EXTERN_C_PUSH/EXTERN_C_POP.
11216 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11217 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11218 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11219 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11220 (traceframe_write_count, traceframe_read_count)
11221 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11222 (about_to_request_buffer_space, get_trace_state_variable_value)
11223 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11224 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11225 EXTERN_C_PUSH/EXTERN_C_POP.
11226 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11227 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11228 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11229 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11230 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11231 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11232 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11233 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11234 Define.
11235 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11236 (IP_AGENT_EXPORT_VAR_DECL): Define.
11237 (tracing): Declare.
11238 (gdb_agent_get_raw_reg): Declare.
11239
11240 2015-02-27 Tom Tromey <tromey@redhat.com>
11241 Pedro Alves <palves@redhat.com>
11242
11243 Rename symbols whose names are reserved C++ keywords throughout.
11244
11245 2015-02-27 Pedro Alves <palves@redhat.com>
11246
11247 * Makefile.in (COMPILER): New, get it from autoconf.
11248 (CXX): Get from autoconf instead.
11249 (COMPILE.pre): Use COMPILER.
11250 (CC-LD): Rename to ...
11251 (CC_LD): ... this. Use COMPILER.
11252 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11253 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11254 * acinclude.m4: Include build-with-cxx.m4.
11255 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11256 Disable -Werror by default if building in C++ mode.
11257 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11258 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11259 the C++ compiler. Save/restore CXXFLAGS too.
11260 * configure: Regenerate.
11261
11262 2015-02-27 Pedro Alves <palves@redhat.com>
11263
11264 * acinclude.m4: Include libiberty.m4.
11265 * configure.ac: Call libiberty_INIT.
11266 * config.in, configure: Regenerate.
11267
11268 2015-02-26 Pedro Alves <palves@redhat.com>
11269
11270 * linux-low.c (linux_wait_1): When incrementing the PC past a
11271 program breakpoint always use the_low_target.breakpoint_len as
11272 increment, rather than the maximum between that and
11273 the_low_target.decr_pc_after_break.
11274
11275 2015-02-23 Pedro Alves <palves@redhat.com>
11276
11277 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11278 thread was doing a step-over; always adjust the PC if
11279 we stepped over a permanent breakpoint.
11280 (linux_wait_1): If we stepped over breakpoint that was on top of a
11281 permanent breakpoint, manually advance the PC past it.
11282
11283 2015-02-23 Pedro Alves <palves@redhat.com>
11284
11285 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11286 modes.
11287 (x86_fill_gregset, x86_store_gregset): Use it when handling
11288 $orig_eax.
11289
11290 2015-02-20 Pedro Alves <palves@redhat.com>
11291
11292 * thread-db.c: Include "nat/linux-procfs.h".
11293 (thread_db_init): Skip listing new threads if the kernel supports
11294 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11295
11296 2015-02-20 Pedro Alves <palves@redhat.com>
11297
11298 * linux-low.c (status_pending_p_callback): Use ptid_match.
11299
11300 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11301
11302 PR breakpoints/16812
11303 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11304 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11305 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11306
11307 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11308
11309 PR breakpoints/15956
11310 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11311
11312 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11313
11314 * linux-low.c (linux_low_btrace_conf): Print size.
11315 * server.c (handle_btrace_conf_general_set): New.
11316 (hanle_general_set): Call handle_btrace_conf_general_set.
11317 (handle_query): Report Qbtrace-conf:bts:size as supported.
11318
11319 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11320
11321 * linux-low.c (linux_low_enable_btrace): Update parameters.
11322 (linux_low_btrace_conf): New.
11323 (linux_target_ops)<to_btrace_conf>: Initialize.
11324 * server.c (current_btrace_conf): New.
11325 (handle_btrace_enable): Rename to ...
11326 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11327 to target_enable_btrace. Update comment. Update users.
11328 (handle_qxfer_btrace_conf): New.
11329 (qxfer_packets): Add btrace-conf entry.
11330 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11331 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11332 (target_ops)<read_btrace_conf>: New.
11333 (target_enable_btrace): Update parameters.
11334 (target_read_btrace_conf): New.
11335
11336 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11337
11338 * server.c (handle_btrace_general_set): Remove call to
11339 target_supports_btrace.
11340 (supported_btrace_packets): New.
11341 (handle_query): Call supported_btrace_packets.
11342 * target.h: include btrace-common.h.
11343 (btrace_target_info): Removed.
11344 (supports_btrace, target_supports_btrace): Update parameters.
11345
11346 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11347
11348 * Makefile.in (SFILES): Add common/btrace-common.c.
11349 (OBS): Add common/btrace-common.o.
11350 (btrace-common.o): Add build rules.
11351 * linux-low: Include btrace-common.h.
11352 (linux_low_read_btrace): Use struct btrace_data. Call
11353 btrace_data_init and btrace_data_fini.
11354
11355 2015-02-06 Pedro Alves <palves@redhat.com>
11356
11357 * thread-db.c (find_new_threads_callback): Add debug output.
11358
11359 2015-02-04 Pedro Alves <palves@redhat.com>
11360
11361 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11362 (resume_stopped_resumed_lwps): New function.
11363 (linux_wait_for_event_filtered): Use it.
11364
11365 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11366
11367 * Makefile.in (SFILES): Add linux-personality.c.
11368 (linux-personality.o): New rule.
11369 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11370 list of objects to be built.
11371 * linux-low.c: Include nat/linux-personality.h.
11372 (linux_create_inferior): Remove code to disable address space
11373 randomization (moved to ../nat/linux-personality.c). Create
11374 cleanup to disable address space randomization.
11375
11376 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11377
11378 * Makefile.in (posix-strerror.o): New rule.
11379 (mingw-strerror.o): Likewise.
11380 * configure: Regenerated.
11381 * configure.ac: Source file ../common/common.host. Initialize new
11382 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11383
11384 2015-01-14 Yao Qi <yao@codesourcery.com>
11385
11386 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11387 (ppc-linux.o): New rule.
11388 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11389 * configure.ac: AC_CHECK_FUNCS(getauxval).
11390 * config.in: Re-generated.
11391 * configure: Re-generated.
11392 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11393 ppc64_64bit_inferior_p
11394
11395 2015-01-14 Yao Qi <yao@codesourcery.com>
11396
11397 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11398 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11399 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11400 (PT_ORIG_R3, PT_TRAP): Likewise.
11401 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11402 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11403 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11404
11405 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11406
11407 * i387-fp.c (i387_cache_to_xsave): In look over
11408 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11409 zmmh_low_space field by use of zmmh_high_space.
11410
11411 2015-01-09 Pedro Alves <palves@redhat.com>
11412
11413 * linux-low.c (step_over_bkpt): Move higher up in the file.
11414 (handle_extended_wait): Don't store the stop_pc here.
11415 (get_stop_pc): Adjust comments and rename to ...
11416 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11417 stopped for a software breakpoint or hardware breakpoint.
11418 (thread_still_has_status_pending_p): New function.
11419 (status_pending_p_callback): Use
11420 thread_still_has_status_pending_p. If the event is no longer
11421 interesting, resume the LWP.
11422 (handle_tracepoints): Add assert.
11423 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11424 (wstatus_maybe_breakpoint): New function.
11425 (cancel_breakpoint): Delete function.
11426 (check_stopped_by_watchpoint): New function, factored out from
11427 linux_low_filter_event.
11428 (lp_status_maybe_breakpoint): Delete function.
11429 (linux_low_filter_event): Remove filter_ptid argument.
11430 Leave thread group exits pending here. Store the LWP's stop PC.
11431 Always leave events pending.
11432 (linux_wait_for_event_filtered): Pull all events out of the
11433 kernel, and leave them all pending.
11434 (count_events_callback, select_event_lwp_callback): Consider all
11435 events.
11436 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11437 (select_event_lwp): Only give preference to the stepping LWP in
11438 all-stop mode. Adjust comments.
11439 (ignore_event): New function.
11440 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11441 references to cancel_breakpoints. Adjust to renames. Also give
11442 equal priority to all LWPs that have had events in non-stop mode.
11443 If reporting a software breakpoint event, unadjust the LWP's PC.
11444 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11445 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11446 Adjust.
11447 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11448 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11449 (linux_stopped_by_watchpoint): Adjust.
11450 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11451 * linux-low.h (enum lwp_stop_reason): New.
11452 (struct lwp_info) <stop_pc>: Adjust comment.
11453 <stopped_by_watchpoint>: Delete field.
11454 <stop_reason>: New field.
11455 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11456 * mem-break.c (software_breakpoint_inserted_here)
11457 (hardware_breakpoint_inserted_here): New function.
11458 * mem-break.h (software_breakpoint_inserted_here)
11459 (hardware_breakpoint_inserted_here): Declare.
11460 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11461 (cancel_breakpoints): Delete.
11462 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11463 (upload_fast_traceframes): Remove references to
11464 cancel_breakpoints.
11465
11466 2015-01-09 Pedro Alves <palves@redhat.com>
11467
11468 * thread-db.c (find_new_threads_callback): Ignore thread if the
11469 kernel thread ID is -1.
11470
11471 2015-01-09 Pedro Alves <palves@redhat.com>
11472
11473 * linux-low.c (linux_attach_fail_reason_string): Move to
11474 nat/linux-ptrace.c, and rename.
11475 (linux_attach_lwp): Update comment.
11476 (attach_proc_task_lwp_callback): New function.
11477 (linux_attach): Adjust to rename and use
11478 linux_proc_attach_tgid_threads.
11479 (linux_attach_fail_reason_string): Delete declaration.
11480
11481 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11482
11483 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11484 * server.c (gdbserver_version): Likewise.
11485
11486 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11487
11488 * remote-utils.c: Include ctype.h.
11489 (input_interrupt): Explicitly handle the case when the char
11490 received is the NUL byte. Improve the printing of non-ASCII
11491 characters.
11492
11493 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11494
11495 * linux-low.c (linux_low_filter_event): Update call to
11496 linux_enable_event_reporting following the addition of
11497 a new parameter to that function.
11498
11499 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11500
11501 PR server/17457
11502 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11503 (AARCH64_FPCR_REGNO): Likewise.
11504 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11505 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11506 (aarch64_store_fpregset): Likewise.
11507
11508 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11509
11510 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11511 Remove FIXME comment about assumption about N.
11512
11513 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11514
11515 * configure.ac: If large-file support is disabled in GDBserver,
11516 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11517 * configure: Regenerate.
11518
11519 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11520
11521 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11522 warning upon ENODATA from ptrace.
11523 * linux-s390-low.c (s390_store_tdb): New.
11524 (s390_regsets): Add regset for NT_S390_TDB.
11525
11526 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11527
11528 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11529 without a fill_function.
11530 * linux-s390-low.c (s390_fill_last_break): Remove.
11531 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11532 (s390_arch_setup): Use regset's size instead of fill_function for
11533 loop end condition.
11534
11535 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11536
11537 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11538 the regset's store function when ptrace returned an error.
11539 * regcache.c (get_thread_regcache): Invalidate register cache
11540 before fetching inferior's registers.
11541
11542 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11543
11544 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11545 while-loop as for-loop.
11546 (regsets_store_inferior_registers): Likewise.
11547
11548 2014-11-28 Yao Qi <yao@codesourcery.com>
11549
11550 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11551 * config.in, configure: Re-generate.
11552 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11553 is defined.
11554
11555 2014-11-21 Yao Qi <yao@codesourcery.com>
11556
11557 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11558 (AC_CHECK_HEADERS): Remove malloc.h.
11559 * configure: Re-generated.
11560 * config.in: Re-generated.
11561 * server.h: Don't include alloca.h and malloc.h.
11562 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11563 Don't include malloc.h.
11564
11565 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11566
11567 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11568 corresponding ERRNO check in same block.
11569
11570 2014-11-12 Pedro Alves <palves@redhat.com>
11571
11572 * server.c (cont_thread): Update comment.
11573 (start_inferior, attach_inferior): No longer clear cont_thread.
11574 (handle_v_cont): No longer set cont_thread.
11575 (captured_main): Clear cont_thread each time a GDB connects.
11576
11577 2014-11-12 Pedro Alves <palves@redhat.com>
11578
11579 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11580 thread, and don't resume all threads if the Hc thread has exited.
11581
11582 2014-11-12 Pedro Alves <palves@redhat.com>
11583
11584 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11585 the process group instead of to a specific LWP.
11586
11587 2014-10-15 Pedro Alves <palves@redhat.com>
11588
11589 PR server/17487
11590 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11591 parameter.
11592 (arm_set_thread_context): Delete.
11593 (the_low_target): Adjust.
11594 * win32-i386-low.c (debug_registers_changed)
11595 (debug_registers_used): Delete.
11596 (update_debug_registers_callback): New function.
11597 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11598 needing to update their debug registers.
11599 (win32_get_current_dr): New function.
11600 (x86_dr_low_get_addr, x86_dr_low_get_control)
11601 (x86_dr_low_get_status): Fetch the debug register from the thread
11602 record's context.
11603 (i386_initial_stuff): Adjust.
11604 (i386_get_thread_context): Remove current_event parameter. Don't
11605 clear debug_registers_changed nor copy DR values to
11606 debug_reg_state.
11607 (i386_set_thread_context): Delete.
11608 (i386_prepare_to_resume): New function.
11609 (i386_thread_added): Mark the thread as needing to update irs
11610 debug registers.
11611 (the_low_target): Remove i386_set_thread_context and install
11612 i386_prepare_to_resume.
11613 * win32-low.c (win32_get_thread_context): Adjust.
11614 (win32_set_thread_context): Use SetThreadContext
11615 directly.
11616 (win32_prepare_to_resume): New function.
11617 (win32_require_context): New function, factored out from ...
11618 (thread_rec): ... this.
11619 (continue_one_thread): Call win32_prepare_to_resume on each thread
11620 we're about to continue.
11621 (win32_resume): Call win32_prepare_to_resume on the event thread.
11622 * win32-low.h (struct win32_thread_info)
11623 <debug_registers_changed>: New field.
11624 (struct win32_target_ops): Change prototype of set_thread_context,
11625 delete set_thread_context and add prepare_to_resume.
11626 (win32_require_context): New declaration.
11627
11628 2014-10-08 Gary Benson <gbenson@redhat.com>
11629
11630 * server.h: Do not include common-exceptions.h.
11631
11632 2014-10-08 Gary Benson <gbenson@redhat.com>
11633
11634 * server.h: Do not include cleanups.h.
11635
11636 2014-09-30 James Hogan <james.hogan@imgtec.com>
11637
11638 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11639 mips64-dsp-linux.c.
11640
11641 2014-09-23 Yao Qi <yao@codesourcery.com>
11642
11643 * linux-low.c (lp_status_maybe_breakpoint): New function.
11644 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11645 (count_events_callback): Likewise.
11646 (select_event_lwp_callback): Likewise.
11647 (cancel_breakpoints_callback): Likewise.
11648
11649 2014-09-19 Don Breazeal <donb@codesourcery.com>
11650
11651 * linux-low.c (handle_extended_wait): Call
11652 linux_ptrace_get_extended_event.
11653 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11654 linux_is_extended_waitstatus.
11655
11656 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11657
11658 * Makefile.in (CPPFLAGS): Define.
11659 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11660 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11661
11662 2014-09-16 Gary Benson <gbenson@redhat.com>
11663
11664 * inferiors.h (current_inferior): Renamed as...
11665 (current_thread): New variable. All uses updated.
11666 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11667 (maybe_move_out_of_jump_pad): Likewise.
11668 (cancel_breakpoint): Likewise.
11669 (linux_low_filter_event): Likewise.
11670 (wait_for_sigstop): Likewise.
11671 (linux_resume_one_lwp): Likewise.
11672 (need_step_over_p): Likewise.
11673 (start_step_over): Likewise.
11674 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11675 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11676 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11677 and save_inferior as saved_thread.
11678 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11679 saved_thread.
11680 (regcache_invalidate_thread): Likewise.
11681 * remote-utils.c (prepare_resume_reply): Likewise.
11682 * thread-db.c (thread_db_get_tls_address): Likewise.
11683 (disable_thread_event_reporting): Likewise.
11684 (remove_thread_event_breakpoints): Likewise.
11685 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11686 as saved_thread.
11687 * target.h (set_desired_inferior): Renamed as...
11688 (set_desired_thread): New declaration. All uses updated.
11689 * server.c (myresume): Updated comment to reference thread instead
11690 of inferior.
11691 (handle_serial_event): Likewise.
11692 (handle_target_event): Likewise.
11693
11694 2014-09-12 Tom Tromey <tromey@redhat.com>
11695 Gary Benson <gbenson@redhat.com>
11696
11697 * regcache.h: Include common-regcache.h.
11698 (regcache_read_pc): Don't declare.
11699 * regcache.c (get_thread_regcache_for_ptid): New function.
11700
11701 2014-09-11 Tom Tromey <tromey@redhat.com>
11702 Gary Benson <gbenson@redhat.com>
11703
11704 * symbol.c: New file.
11705 * Makefile.in (SFILES): Add symbol.c.
11706 (OBS): Add symbol.o.
11707
11708 2014-09-11 Gary Benson <gbenson@redhat.com>
11709
11710 * target.c (target_stop_ptid, target_continue_ptid): New
11711 functions.
11712
11713 2014-09-11 Tom Tromey <tromey@redhat.com>
11714 Gary Benson <gbenson@redhat.com>
11715
11716 * target.h: Include target/target.h.
11717 * target.c (target_read_memory, target_read_uint32)
11718 (target_write_memory): New functions.
11719
11720 2014-09-11 Gary Benson <gbenson@redhat.com>
11721
11722 * server.h (debug_hw_points): Don't declare.
11723 * server.c (debug_hw_points): Don't define. Replace all uses
11724 with show_debug_regs.
11725 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11726 all uses with show_debug_regs.
11727
11728 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11729
11730 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11731 endianness into account.
11732 (ppc_supply_ptrace_register): Likewise.
11733
11734 2014-09-03 James Hogan <james.hogan@imgtec.com>
11735
11736 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11737 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11738
11739 2014-09-03 Gary Benson <gbenson@redhat.com>
11740
11741 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11742 ALL_DEBUG_ADDRESS_REGISTERS.
11743
11744 2014-09-02 Gary Benson <gbenson@redhat.com>
11745
11746 * i386-low.h: Renamed as...
11747 * x86-low.h: New file. All type, function and variable name
11748 prefixes changed from "i386_" to "x86_". All references updated.
11749 * i386-low.c: Renamed as...
11750 * x86-low.c: New file. All type, function and variable name
11751 prefixes changed from "i386_" to "x86_". All references updated.
11752
11753 2014-09-02 Gary Benson <gbenson@redhat.com>
11754
11755 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11756 (x86_linux_new_thread): Likewise.
11757
11758 2014-08-29 Gary Benson <gbenson@redhat.com>
11759
11760 * server.h (setjmp.h): Do not include.
11761 (toplevel): Do not declare.
11762 (common-exceptions.h): Include.
11763 (cleanups.h): Likewise.
11764 * server.c (toplevel): Do not define.
11765 (exit_code): New static global.
11766 (detach_or_kill_for_exit_cleanup): New function.
11767 (main): New function. Original main renamed to...
11768 (captured_main): New function.
11769 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11770
11771 2014-08-29 Gary Benson <gbenson@redhat.com>
11772
11773 * Makefile.in (SFILES): Add common/common-exceptions.c.
11774 (OBS): Add common-exceptions.o.
11775 (common-exceptions.o): New rule.
11776 * utils.c (prepare_to_throw_exception): New function.
11777
11778 2014-08-29 Gary Benson <gbenson@redhat.com>
11779
11780 * config.in: Regenerate.
11781 * configure: Likewise.
11782
11783 2014-08-29 Gary Benson <gbenson@redhat.com>
11784
11785 * Makefile.in (SFILES): Add common/cleanups.c.
11786 (OBS): cleanups.o.
11787 (cleanups.o): New rule.
11788
11789 2014-08-29 Gary Benson <gbenson@redhat.com>
11790
11791 * utils.c (internal_vwarning): New function.
11792
11793 2014-08-28 Gary Benson <gbenson@redhat.com>
11794
11795 * utils.h (fatal): Remove declaration.
11796 * utils.c (fatal): Remove function.
11797
11798 2014-08-28 Gary Benson <gbenson@redhat.com>
11799
11800 * tracepoint.c (gdb_agent_init): Replace fatal with
11801 perror_with_name.
11802 (initialize_tracepoint): Likewise.
11803
11804 2014-08-28 Gary Benson <gbenson@redhat.com>
11805
11806 * remote-utils.c (remote_prepare): Replace fatal with error.
11807
11808 2014-08-28 Gary Benson <gbenson@redhat.com>
11809
11810 * linux-low.c (linux_async): Replace fatal with warning.
11811 Tidy up and return.
11812 (linux_start_non_stop): Return -1 if linux_async failed.
11813
11814 2014-08-28 Gary Benson <gbenson@redhat.com>
11815
11816 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11817 gdb_assert.
11818 (i386_dr_low_get_addr): Remove vague comment.
11819 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11820 gdb_assert.
11821
11822 2014-08-28 Gary Benson <gbenson@redhat.com>
11823
11824 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11825 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11826 internal_error.
11827 (linux_resume_one_lwp): Likewise.
11828 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11829 gdb_assert.
11830 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11831 with internal_error.
11832 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11833 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11834 (find_register_by_name): Replace fatal with internal_error.
11835 (find_regno): Likewise.
11836 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11837 * thread-db.c (thread_db_create_event): Likewise.
11838 (thread_db_load_search): Likewise.
11839 (try_thread_db_load_1): Likewise.
11840 * tracepoint.c (get_jump_space_head): Replace fatal with
11841 internal_error.
11842 (claim_trampoline_space): Likewise.
11843 (have_fast_tracepoint_trampoline_buffer): Likewise.
11844 (cmd_qtstart): Likewise.
11845 (stop_tracing): Likewise.
11846 (fast_tracepoint_collecting): Likewise.
11847 (target_malloc): Likewise.
11848 (download_tracepoint): Likewise.
11849 (download_trace_state_variables): Replace check with gdb_assert.
11850 (upload_fast_traceframes): Replace fatal with internal_error.
11851
11852 2014-08-19 Tom Tromey <tromey@redhat.com>
11853 Gary Benson <gbenson@redhat.com>
11854
11855 * Makefile.in (SFILES): Add common/common-debug.c.
11856 (OBS): Add common-debug.o.
11857 (common-debug.o): New rule.
11858 * debug.h (debug_printf): Don't declare.
11859 * debug.c (debug_printf): Renamed and rewritten as...
11860 (debug_vprintf): New function.
11861
11862 2014-08-19 Gary Benson <gbenson@redhat.com>
11863
11864 * utils.h: Do not include print-utils.h.
11865
11866 2014-08-19 Tom Tromey <tromey@redhat.com>
11867 Gary Benson <gbenson@redhat.com>
11868
11869 * server.h: Add static assertion.
11870 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11871
11872 2014-08-19 Tom Tromey <tromey@redhat.com>
11873 Gary Benson <gbenson@redhat.com>
11874
11875 * Makefile.in (SFILES): Add common/errors.c.
11876 (OBS): Add errors.o.
11877 (IPA_OBS): Add errors-ipa.o.
11878 (errors.o): New rule.
11879 (errors-ipa.o): Likewise.
11880 * utils.h (perror_with_name, error, warning): Don't declare.
11881 * utils.c (warning): Renamed and rewritten as...
11882 (vwarning): New function.
11883 (error): Renamed and rewritten as...
11884 (verror): New function.
11885 (internal_error): Renamed and rewritten as...
11886 (internal_verror): New function.
11887
11888 2014-08-07 Gary Benson <gbenson@redhat.com>
11889
11890 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11891 * configure: Regenerate.
11892 * config.in: Likewise.
11893 * server.h: Do not include errno.h.
11894 * event-loop.c: Likewise.
11895 * hostio-errno.c: Likewise.
11896 * linux-low.c: Likewise.
11897 * remote-utils.c: Likewise.
11898 * spu-low.c: Likewise.
11899 * utils.c: Likewise.
11900 * gdbreplay.c: Unconditionally include errno.h.
11901
11902 2014-08-07 Gary Benson <gbenson@redhat.com>
11903
11904 * server.h: Do not include string.h.
11905 * event-loop.c: Likewise.
11906 * linux-low.c: Likewise.
11907 * regcache.c: Likewise.
11908 * remote-utils.c: Likewise.
11909 * spu-low.c: Likewise.
11910 * utils.c: Likewise.
11911
11912 2014-08-07 Gary Benson <gbenson@redhat.com>
11913
11914 * server.h: Do not include gdb_assert.h.
11915
11916 2014-08-07 Gary Benson <gbenson@redhat.com>
11917
11918 * server.h: Do not include common-utils.h.
11919
11920 2014-08-07 Gary Benson <gbenson@redhat.com>
11921
11922 * server.h: Do not include ptid.h.
11923 * notif.h: Likewise.
11924
11925 2014-08-07 Gary Benson <gbenson@redhat.com>
11926
11927 * server.h: Do not include gdb_locale.h.
11928
11929 2014-08-07 Gary Benson <gbenson@redhat.com>
11930
11931 * server.h: Do not include gdb/signals.h.
11932 * win32-low.c: Likewise.
11933
11934 2014-08-07 Gary Benson <gbenson@redhat.com>
11935
11936 * server.h: Do not include pathmax.h.
11937
11938 2014-08-07 Gary Benson <gbenson@redhat.com>
11939
11940 * server.h: Do not include libiberty.h.
11941 * linux-bfin-low.c: Likewise.
11942
11943 2014-08-07 Gary Benson <gbenson@redhat.com>
11944
11945 * server.h: Do not include ansidecl.h.
11946
11947 2014-08-07 Gary Benson <gbenson@redhat.com>
11948
11949 * linux-x86-low.c: Do not include stddef.h.
11950 * lynx-ppc-low.c: Likewise.
11951 * tracepoint.c: Likewise.
11952
11953 2014-08-07 Gary Benson <gbenson@redhat.com>
11954
11955 * server.h: Do not include stdarg.h.
11956 * nto-low.c: Likewise.
11957
11958 2014-08-07 Gary Benson <gbenson@redhat.com>
11959
11960 * server.h: Do not include stdlib.h.
11961 * inferiors.c: Likewise.
11962 * linux-low.c: Likewise.
11963 * regcache.c: Likewise.
11964 * spu-low.c: Likewise.
11965 * tracepoint.c: Likewise.
11966 * utils.c: Likewise.
11967
11968 2014-08-07 Gary Benson <gbenson@redhat.com>
11969
11970 * server.h: Do not include stdio.h.
11971 * linux-low.c: Likewise.
11972 * remote-utils.c: Likewise.
11973 * spu-low.c: Likewise.
11974 * utils.c: Likewise.
11975 * wincecompat.c: Likewise.
11976
11977 2014-08-06 Gary Benson <gbenson@redhat.com>
11978
11979 * regcache.c (init_register_cache): Move conditionals inside if.
11980
11981 2014-08-06 Gary Benson <gbenson@redhat.com>
11982
11983 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11984
11985 2014-07-31 Gary Benson <gbenson@redhat.com>
11986
11987 * ax.h: Do not include server.h.
11988 * gdbthread.h: Likewise.
11989 * lynx-low.h: Likewise.
11990 * notif.h: Likewise.
11991
11992 2014-07-30 Gary Benson <gbenson@redhat.com>
11993
11994 * server.h: Include common-defs.h.
11995 Do not include config.h or build-gnulib-gdbserver/config.h.
11996
11997 2014-07-30 Gary Benson <gbenson@redhat.com>
11998
11999 * hostio-errno.c: Move server.h to top of includes list.
12000 * inferiors.c: Likewise.
12001 * linux-x86-low.c: Likewise.
12002 * notif.c: Include server.h.
12003
12004 2014-07-24 Tom Tromey <tromey@redhat.com>
12005 Gary Benson <gbenson@redhat.com>
12006
12007 * server.h (CORE_ADDR): Now unsigned.
12008
12009 2014-07-16 Pedro Alves <palves@redhat.com>
12010
12011 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12012
12013 2014-07-15 Pedro Alves <palves@redhat.com>
12014
12015 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12016 copy.
12017
12018 2014-07-11 Pedro Alves <palves@redhat.com>
12019
12020 * linux-low.c (kill_wait_lwp): New function, based on
12021 kill_one_lwp_callback, but use my_waitpid directly.
12022 (kill_one_lwp_callback, linux_kill): Use it.
12023
12024 2014-06-23 Pedro Alves <palves@redhat.com>
12025
12026 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12027 before setting DR0..DR3.
12028
12029 2014-06-20 Gary Benson <gbenson@redhat.com>
12030
12031 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12032 * configure: Regenerated.
12033 * config.in: Likewise.
12034
12035 2014-06-20 Gary Benson <gbenson@redhat.com>
12036
12037 * Makefile.in (SFILES): Update locations for files moved
12038 from common to nat.
12039 (object file files): Reordered.
12040
12041 2014-06-20 Gary Benson <gbenson@redhat.com>
12042
12043 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12044 (i386_dr_low_set_addr): Likewise.
12045 (i386_dr_low_get_addr): Likewise.
12046 (i386_dr_low_can_set_control): Likewise.
12047 (i386_dr_low_set_control): Likewise.
12048 (i386_dr_low_get_control): Likewise.
12049 (i386_dr_low_get_status): Likewise.
12050 (i386_get_debug_register_length): Likewise.
12051 * linux-x86-low.c (i386_dr_low_set_addr):
12052 Changed signature. Made static.
12053 (i386_dr_low_get_addr): Likewise.
12054 (i386_dr_low_set_control): Likewise.
12055 (i386_dr_low_get_control): Likewise.
12056 (i386_dr_low_get_status): Likewise.
12057 (i386_dr_low): New global variable.
12058 * win32-i386-low.c (i386_dr_low_set_addr):
12059 Changed signature. Made static.
12060 (i386_dr_low_get_addr): Likewise.
12061 (i386_dr_low_set_control): Likewise.
12062 (i386_dr_low_get_control): Likewise.
12063 (i386_dr_low_get_status): Likewise.
12064 (i386_dr_low): New global variable.
12065
12066 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12067
12068 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12069 * Makefile.in (AR, AR_FLAGS): Define.
12070 * configure: Regenerate.
12071
12072 2014-06-19 Gary Benson <gbenson@redhat.com>
12073
12074 * Makefile.in (i386-dregs.o): New rule.
12075 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12076 * i386-low.c (target.h): Remove include.
12077 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12078 (DR_CONTROL_SHIFT): Likewise.
12079 (DR_CONTROL_SIZE): Likewise.
12080 (DR_RW_EXECUTE): Likewise.
12081 (DR_RW_WRITE): Likewise.
12082 (DR_RW_READ): Likewise.
12083 (DR_RW_IORW): Likewise.
12084 (DR_LEN_1): Likewise.
12085 (DR_LEN_2): Likewise.
12086 (DR_LEN_4): Likewise.
12087 (DR_LEN_8): Likewise.
12088 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12089 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12090 (DR_ENABLE_SIZE): Likewise.
12091 (DR_LOCAL_SLOWDOWN): Likewise.
12092 (DR_GLOBAL_SLOWDOWN): Likewise.
12093 (DR_CONTROL_RESERVED): Likewise.
12094 (I386_DR_CONTROL_MASK): Likewise.
12095 (I386_DR_VACANT): Likewise.
12096 (I386_DR_LOCAL_ENABLE): Likewise.
12097 (I386_DR_GLOBAL_ENABLE): Likewise.
12098 (I386_DR_DISABLE): Likewise.
12099 (I386_DR_SET_RW_LEN): Likewise.
12100 (I386_DR_GET_RW_LEN): Likewise.
12101 (I386_DR_WATCH_HIT): Likewise.
12102 (i386_wp_op_t): Likewise.
12103 (i386_show_dr): Likewise.
12104 (i386_length_and_rw_bits): Likewise.
12105 (i386_insert_aligned_watchpoint): Likewise.
12106 (i386_remove_aligned_watchpoint): Likewise.
12107 (i386_handle_nonaligned_watchpoint): Likewise.
12108 i386_update_inferior_debug_regs(): Likewise.
12109 (i386_dr_insert_watchpoint): Likewise.
12110 (i386_dr_remove_watchpoint): Likewise.
12111 (i386_dr_region_ok_for_watchpoint): Likewise.
12112 (i386_dr_stopped_data_address): Likewise.
12113 (i386_dr_stopped_by_watchpoint): Likewise.
12114
12115 2014-06-19 Gary Benson <gbenson@redhat.com>
12116
12117 * i386-low.c (i386_dr_show): Renamed to
12118 i386_show_dr and made static. All uses updated.
12119 (i386_dr_length_and_rw_bits): Renamed to
12120 i386_length_and_rw_bits and made static.
12121 All uses updated.
12122 (i386_dr_insert_aligned_watchpoint): Renamed to
12123 i386_insert_aligned_watchpoint and made static.
12124 All uses updated.
12125 (i386_dr_remove_aligned_watchpoint): Renamed to
12126 i386_remove_aligned_watchpoint and made static.
12127 All uses updated.
12128 (i386_dr_update_inferior_debug_regs): Renamed to
12129 i386_update_inferior_debug_regs and made static.
12130 All uses updated.
12131
12132 2014-06-18 Gary Benson <gbenson@redhat.com>
12133
12134 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12135 (i386_dr_low_can_set_control): Likewise.
12136 (i386_get_debug_register_length): Likewise.
12137 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12138 (i386_dr_low_can_set_control): Likewise.
12139 (i386_get_debug_register_length): Likewise.
12140
12141 2014-06-17 Gary Benson <gbenson@redhat.com>
12142
12143 * i386-low.h (i386-dregs.h): New include.
12144 (DR_FIRSTADDR): Now in i386-dregs.h.
12145 (DR_LASTADDR): Likewise.
12146 (DR_NADDR): Likewise.
12147 (DR_STATUS): Likewise.
12148 (DR_CONTROL): Likewise.
12149 (i386_debug_reg_state): Likewise.
12150 (i386_dr_insert_watchpoint): Likewise.
12151 (i386_dr_remove_watchpoint): Likewise.
12152 (i386_dr_region_ok_for_watchpoint): Likewise.
12153 (i386_dr_stopped_data_address): Likewise.
12154 (i386_dr_stopped_by_watchpoint): Likewise.
12155 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12156
12157 2014-06-18 Gary Benson <gbenson@redhat.com>
12158
12159 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12160 i386_dr_insert_watchpoint.
12161 (i386_low_remove_watchpoint): Renamed to
12162 i386_dr_remove_watchpoint.
12163 (i386_low_region_ok_for_watchpoint): Renamed to
12164 i386_dr_region_ok_for_watchpoint.
12165 (i386_low_stopped_data_address): Renamed to
12166 i386_dr_stopped_data_address.
12167 (i386_low_stopped_by_watchpoint): Renamed to
12168 i386_dr_stopped_by_watchpoint.
12169 * i386-low.c (i386_show_dr): Renamed to
12170 i386_dr_show and made nonstatic. All uses updated.
12171 (i386_length_and_rw_bits): Renamed to
12172 i386_dr_length_and_rw_bits and made nonstatic.
12173 All uses updated.
12174 (i386_insert_aligned_watchpoint): Renamed to
12175 i386_dr_insert_aligned_watchpoint and made nonstatic.
12176 All uses updated.
12177 (i386_remove_aligned_watchpoint): Renamed to
12178 i386_dr_remove_aligned_watchpoint and made nonstatic.
12179 All uses updated.
12180 (i386_update_inferior_debug_regs): Renamed to
12181 i386_dr_update_inferior_debug_regs and made nonstatic.
12182 All uses updated.
12183 (i386_low_insert_watchpoint): Renamed to
12184 i386_dr_insert_watchpoint. All uses updated.
12185 (i386_low_remove_watchpoint): Renamed to
12186 i386_dr_remove_watchpoint. All uses updated.
12187 (i386_low_region_ok_for_watchpoint): Renamed to
12188 i386_dr_region_ok_for_watchpoint. All uses updated.
12189 (i386_low_stopped_data_address): Renamed to
12190 i386_dr_stopped_data_address. All uses updated.
12191 (i386_low_stopped_by_watchpoint): Renamed to
12192 i386_dr_stopped_by_watchpoint. All uses updated.
12193
12194 2014-06-18 Gary Benson <gbenson@redhat.com>
12195
12196 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12197 (i386_dr_low_can_set_control): Likewise.
12198 (i386_insert_aligned_watchpoint): New check.
12199
12200 2014-06-18 Gary Benson <gbenson@redhat.com>
12201
12202 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12203 Renamed to state.
12204
12205 2014-06-18 Gary Benson <gbenson@redhat.com>
12206
12207 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12208 instead of fatal and error.
12209 (i386_handle_nonaligned_watchpoint): Likewise.
12210
12211 2014-06-18 Gary Benson <gbenson@redhat.com>
12212
12213 * i386-low.c (i386_get_debug_register_length): New macro.
12214 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12215 (i386_show_dr): Use debug_printf instead of fprintf. Use
12216 phex to format values.
12217
12218 2014-06-18 Gary Benson <gbenson@redhat.com>
12219
12220 * i386-low.h: Comment changes.
12221 * i386-low.c: Likewise.
12222
12223 2014-06-18 Gary Benson <gbenson@redhat.com>
12224
12225 * i386-low.c: Whitespace changes.
12226
12227 2014-06-12 Tom Tromey <tromey@redhat.com>
12228
12229 * utils.c (freeargv): Remove.
12230
12231 2014-06-12 Tom Tromey <tromey@redhat.com>
12232
12233 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12234 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12235 (parse_debug_format_options): Likewise.
12236 (gdbserver_usage): Likewise.
12237 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12238 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12239 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12240 against libiberty.
12241 ($(LIBGNU)): Depend on libiberty.
12242 (all-lib): Recurse into all subdirs.
12243 (install-only): Invoke "install" target in subdirs.
12244 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12245 targets.
12246 * configure: Rebuild.
12247 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12248 for vasprintf, vsnprintf, or gettimeofday.
12249 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12250 srv_tgtobj.
12251
12252 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12253
12254 * development.sh: Delete.
12255 * Makefile.in (config.status): Adjust dependency on development.sh.
12256 * configure.ac: Adjust development.sh source call.
12257 * configure: Regenerate.
12258
12259 2014-06-02 Pedro Alves <palves@redhat.com>
12260
12261 * ax.c (gdb_free_agent_expr): New function.
12262 * ax.h (gdb_free_agent_expr): New declaration.
12263 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12264 list.
12265 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12266 static.
12267 (clear_breakpoint_conditions_and_commands): New function.
12268 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12269 (clear_breakpoint_conditions_and_commands): New declaration.
12270
12271 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12272
12273 * linux-aarch64-low.c (asm/ptrace.h): Include.
12274
12275 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12276
12277 Fix TLS access for -static -pthread.
12278 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12279 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12280 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12281
12282 2014-05-20 Pedro Alves <palves@redhat.com>
12283
12284 * linux-aarch64-low.c (aarch64_insert_point)
12285 (aarch64_remove_point): No longer check whether the type is
12286 supported here. Adjust to new interface.
12287 (the_low_target): Install aarch64_supports_z_point_type as
12288 supports_z_point_type method.
12289 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12290 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12291 instead of a Z packet char. Adjust.
12292 (arm_supports_z_point_type): New function.
12293 (arm_insert_point, arm_remove_point): Adjust to new interface.
12294 (the_low_target): Install arm_supports_z_point_type.
12295 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12296 (cris_insert_point, cris_remove_point): Adjust to new interface.
12297 Don't check whether the type is supported here.
12298 (the_low_target): Install cris_supports_z_point_type.
12299 * linux-low.c (linux_supports_z_point_type): New function.
12300 (linux_insert_point, linux_remove_point): Adjust to new interface.
12301 * linux-low.h (struct linux_target_ops) <insert_point,
12302 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12303 raw_breakpoint pointer parameter.
12304 <supports_z_point_type>: New method.
12305 * linux-mips-low.c (mips_supports_z_point_type): New function.
12306 (mips_insert_point, mips_remove_point): Adjust to new interface.
12307 Use mips_supports_z_point_type.
12308 (the_low_target): Install mips_supports_z_point_type.
12309 * linux-ppc-low.c (the_low_target): Install NULL as
12310 supports_z_point_type method.
12311 * linux-s390-low.c (the_low_target): Install NULL as
12312 supports_z_point_type method.
12313 * linux-sparc-low.c (the_low_target): Install NULL as
12314 supports_z_point_type method.
12315 * linux-x86-low.c (x86_supports_z_point_type): New function.
12316 (x86_insert_point): Adjust to new insert_point interface. Use
12317 insert_memory_breakpoint. Adjust to new
12318 i386_low_insert_watchpoint interface.
12319 (x86_remove_point): Adjust to remove_point interface. Use
12320 remove_memory_breakpoint. Adjust to new
12321 i386_low_remove_watchpoint interface.
12322 (the_low_target): Install x86_supports_z_point_type.
12323 * lynx-low.c (lynx_target_ops): Install NULL as
12324 supports_z_point_type callback.
12325 * nto-low.c (nto_supports_z_point_type): New.
12326 (nto_insert_point, nto_remove_point): Adjust to new interface.
12327 (nto_target_ops): Install nto_supports_z_point_type.
12328 * mem-break.c: Adjust intro comment.
12329 (struct raw_breakpoint) <raw_type, size>: New fields.
12330 <inserted>: Update comment.
12331 <shlib_disabled>: Delete field.
12332 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12333 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12334 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12335 (raw_bkpt_type_to_target_hw_bp_type): New function.
12336 (find_enabled_raw_code_breakpoint_at): New function.
12337 (find_raw_breakpoint_at): New type and size parameters. Use them.
12338 (insert_memory_breakpoint): New function, based off
12339 set_raw_breakpoint_at.
12340 (remove_memory_breakpoint): New function.
12341 (set_raw_breakpoint_at): Reimplement.
12342 (set_breakpoint): New, based on set_breakpoint_at.
12343 (set_breakpoint_at): Reimplement.
12344 (delete_raw_breakpoint): Go through the_target->remove_point
12345 instead of assuming memory breakpoints.
12346 (find_gdb_breakpoint_at): Delete.
12347 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12348 (find_gdb_breakpoint): New function.
12349 (set_gdb_breakpoint_at): Delete.
12350 (z_type_supported): New function.
12351 (set_gdb_breakpoint_1): New function, loosely based off
12352 set_gdb_breakpoint_at.
12353 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12354 (delete_gdb_breakpoint_at): Delete.
12355 (delete_gdb_breakpoint_1): New function, loosely based off
12356 delete_gdb_breakpoint_at.
12357 (delete_gdb_breakpoint): New function.
12358 (clear_gdb_breakpoint_conditions): Rename to ...
12359 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12360 breakpoint.
12361 (add_condition_to_breakpoint): Make static.
12362 (add_breakpoint_condition): Take a struct breakpoint pointer
12363 instead of an address. Adjust.
12364 (gdb_condition_true_at_breakpoint): Rename to ...
12365 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12366 z_type parameter.
12367 (gdb_condition_true_at_breakpoint): Reimplement.
12368 (add_breakpoint_commands): Take a struct breakpoint pointer
12369 instead of an address. Adjust.
12370 (gdb_no_commands_at_breakpoint): Rename to ...
12371 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12372 parameter. Return true if no breakpoint was found. Change debug
12373 output.
12374 (gdb_no_commands_at_breakpoint): Reimplement.
12375 (run_breakpoint_commands): Rename to ...
12376 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12377 and change return type to boolean.
12378 (run_breakpoint_commands): New function.
12379 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12380 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12381 breakpoint. Go through the_target->remove_point instead of
12382 assuming memory breakpoint.
12383 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12384 software and hardware breakpoints.
12385 (reinsert_raw_breakpoint): Go through the_target->insert_point
12386 instead of assuming memory breakpoint.
12387 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12388 software and hardware breakpoints.
12389 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12390 Check both software and hardware breakpoints.
12391 (validate_inserted_breakpoint): Assert the breakpoint is a
12392 software breakpoint. Set the inserted flag to -1 instead of
12393 setting shlib_disabled.
12394 (delete_disabled_breakpoints): Adjust.
12395 (validate_breakpoints): Only validate software breakpoints.
12396 Adjust to inserted flag change.
12397 (check_mem_read, check_mem_write): Skip breakpoint types other
12398 than software breakpoints. Adjust to inserted flag change.
12399 * mem-break.h (enum raw_bkpt_type): New enum.
12400 (raw_breakpoint, struct process_info): Forward declare.
12401 (Z_packet_to_target_hw_bp_type): Delete declaration.
12402 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12403 (set_gdb_breakpoint, delete_gdb_breakpoint)
12404 (clear_breakpoint_conditions): New declarations.
12405 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12406 (breakpoint_inserted_here): Update comment.
12407 (add_breakpoint_condition, add_breakpoint_commands): Replace
12408 address parameter with a breakpoint pointer parameter.
12409 (gdb_breakpoint_here): Update comment.
12410 (delete_gdb_breakpoint_at): Delete.
12411 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12412 * server.c (process_point_options): Take a struct breakpoint
12413 pointer instead of an address. Adjust.
12414 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12415 delete_gdb_breakpoint.
12416 * spu-low.c (spu_target_ops): Install NULL as
12417 supports_z_point_type method.
12418 * target.h: Include mem-break.h.
12419 (struct target_ops) <prepare_to_access_memory>: Update comment.
12420 <supports_z_point_type>: New field.
12421 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12422 instead of a char. Also take a raw breakpoint pointer.
12423 * win32-arm-low.c (the_low_target): Install NULL as
12424 supports_z_point_type.
12425 * win32-i386-low.c (i386_supports_z_point_type): New function.
12426 (i386_insert_point, i386_remove_point): Adjust to new interface.
12427 (the_low_target): Install i386_supports_z_point_type.
12428 * win32-low.c (win32_supports_z_point_type): New function.
12429 (win32_insert_point, win32_remove_point): Adjust to new interface.
12430 (win32_target_ops): Install win32_supports_z_point_type.
12431 * win32-low.h (struct win32_target_ops):
12432 <supports_z_point_type>: New method.
12433 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12434 instead of a char. Also take a raw breakpoint pointer.
12435
12436 2014-05-20 Pedro Alves <palves@redhat.com>
12437
12438 * mem-break.h: Include break-common.h.
12439 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12440 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12441 (Z_packet_to_target_hw_bp_type): New declaration.
12442 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12443 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12444 (Z_PACKET_ACCESS_WP): Delete macros.
12445 (Z_packet_to_hw_type): Delete function.
12446 * i386-low.h: Don't include break-common.h here.
12447 (Z_packet_to_hw_type): Delete declaration.
12448 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12449 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12450 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12451 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12452 * linux-aarch64-low.c: Don't include break-common.h here.
12453 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12454 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12455 (Z_packet_to_target_hw_bp_type): Delete function.
12456 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12457 function.
12458 (mips_insert_point, mips_remove_point): Use
12459 Z_packet_to_target_hw_bp_type.
12460
12461 2014-05-20 Pedro Alves <palves@redhat.com>
12462
12463 * linux-aarch64-low.c: Include break-common.h.
12464 (enum target_point_type): Delete.
12465 (Z_packet_to_point_type): Rename to ...
12466 (Z_packet_to_target_hw_bp_type): ... this, and return a
12467 target_hw_bp_type instead.
12468 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12469 instead of an enum target_point_type.
12470 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12471 breakpoint type.
12472 (aarch64_dr_state_insert_one_point)
12473 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12474 (aarch64_handle_aligned_watchpoint)
12475 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12476 Take an enum target_hw_bp_type instead of an enum
12477 target_point_type.
12478 (aarch64_supports_z_point_type): New function.
12479 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12480 use Z_packet_to_target_hw_bp_type.
12481
12482 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12483
12484 * configure.ac: Only use -Werror by default when DEVELOPMENT
12485 is true.
12486 * configure: Regenerate.
12487
12488 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12489
12490 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12491 * linux-x86-low.c (X86_64_USER_REGS): New.
12492 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12493
12494 2014-04-28 Yao Qi <yao@codesourcery.com>
12495
12496 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12497 name.
12498
12499 2014-04-25 Pedro Alves <palves@redhat.com>
12500
12501 PR server/16255
12502 * linux-low.c (linux_attach_fail_reason_string): New function.
12503 (linux_attach_lwp): Delete.
12504 (linux_attach_lwp_1): Rename to ...
12505 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12506 argument. Remove "initial" parameter. Return int instead of
12507 void. Don't error or warn here.
12508 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12509 failure to attach to the tgid. Call warning when failing to
12510 attach to an lwp.
12511 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12512 argument. Remove "initial" parameter. Return int instead of
12513 void. Don't error or warn here.
12514 (linux_attach_fail_reason_string): New declaration.
12515 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12516 interface change. Use linux_attach_fail_reason_string.
12517
12518 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12519 Walfred Tedeschi <walfred.tedeschi@intel.com>
12520
12521 * Makefile.in: Added rules to handle new files
12522 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12523 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12524 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12525 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12526 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12527 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12528 x32-avx512-linux.o.
12529 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12530 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12531 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12532 i386/x32-avx512.xml.
12533 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12534 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12535 i386/x32-avx512-linux.xml.
12536 * i387-fp.c (num_avx512_k_registers): New constant for number
12537 of K registers.
12538 (num_avx512_zmmh_low_registers): New constant for number of
12539 lower ZMM registers (0-15).
12540 (num_avx512_zmmh_high_registers): New constant for number of
12541 higher ZMM registers (16-31).
12542 (num_avx512_ymmh_registers): New contant for number of higher
12543 YMM registers (ymm16-31 added by avx521 on x86_64).
12544 (num_avx512_xmm_registers): New constant for number of higher
12545 XMM registers (xmm16-31 added by AVX512 on x86_64).
12546 (struct i387_xsave): Add space for AVX512 registers.
12547 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12548 Add code to handle AVX512 registers.
12549 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12550 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12551 prototypei from generated file.
12552 (tdesc_amd64_avx512_linux): Likewise.
12553 (init_registers_x32_avx512_linux): Likewise.
12554 (tdesc_x32_avx512_linux): Likewise.
12555 (init_registers_i386_avx512_linux): Likewise.
12556 (tdesc_i386_avx512_linux): Likewise.
12557 (x86_64_regmap): Add AVX512 registers.
12558 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12559 mask.
12560 (initialize_low_arch): Add code to initialize AVX512 registers.
12561
12562 2014-04-23 Pedro Alves <palves@redhat.com>
12563
12564 * mem-break.c (find_gdb_breakpoint_at): Make static.
12565 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12566
12567 2014-04-23 Pedro Alves <palves@redhat.com>
12568
12569 * i386-low.c: Don't include break-common.h here.
12570 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12571 prototype to take target_hw_bp_type as argument instead of a Z
12572 packet char.
12573 * i386-low.h: Include break-common.h here.
12574 (Z_packet_to_hw_type): Declare.
12575 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12576 prototypes.
12577 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12578 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12579 (x86_remove_point): Convert the packet number to a
12580 target_hw_bp_type before calling i386_low_remove_watchpoint.
12581 * win32-i386-low.c (i386_insert_point): Convert the packet number
12582 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12583 (i386_remove_point): Convert the packet number to a
12584 target_hw_bp_type before calling i386_low_remove_watchpoint.
12585
12586 2014-04-23 Pedro Alves <palves@redhat.com>
12587
12588 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12589
12590 2014-04-10 Pedro Alves <palves@redhat.com>
12591
12592 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12593 Check if the condition or command is NULL before checking if the
12594 breakpoint is known. On success, return true.
12595 * mem-break.h (add_breakpoint_condition): Document return.
12596 (add_breakpoint_commands): Add describing comment.
12597 * server.c (skip_to_semicolon): New function.
12598 (process_point_options): Use it.
12599
12600 2014-04-09 Pedro Alves <palves@redhat.com>
12601
12602 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12603 to lwpid_of.
12604
12605 2014-02-27 Pedro Alves <palves@redhat.com>
12606
12607 PR 12702
12608 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12609 macros.
12610 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12611 output.
12612 (last_thread_of_process_p): Take a PID argument instead of a
12613 thread pointer.
12614 (linux_wait_for_lwp): Delete.
12615 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12616 functions.
12617 (linux_low_filter_event): New function, party factored out from
12618 linux_wait_for_event.
12619 (linux_wait_for_event): Rename to ...
12620 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12621 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12622 sigsuspend. Check for zombie leaders.
12623 (linux_wait_for_event): Reimplement as wrapper around
12624 linux_wait_for_event_filtered.
12625 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12626 a normal or signal exit is seen, it's the whole process exiting.
12627 (wait_for_sigstop): No longer a for_each_inferior callback.
12628 Rewrite on top of linux_wait_for_event_filtered.
12629 (stop_all_lwps): Call wait_for_sigstop directly.
12630 * server.c (resume, handle_target_event): Handle
12631 TARGET_WAITKIND_NO_RESUMED.
12632
12633 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12634
12635 * win32-low.c (psapi_get_dll_name,
12636 * win32_CreateToolhelp32Snapshot): Delete.
12637 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12638 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12639 Delete.
12640 (handle_load_dll): Add function description.
12641 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12642
12643 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12644
12645 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12646 Add comment.
12647 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12648 base address when calling win32_add_one_solib.
12649 (handle_load_dll): Delete local variable load_addr.
12650 Remove 0x1000 offset applied to DLL base address when calling
12651 win32_add_one_solib.
12652 (handle_unload_dll): Add comment.
12653
12654 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12655
12656 * win32-low.c (win32_add_all_dlls): Renames
12657 win32_ensure_ntdll_loaded. Rewrite function documentation.
12658 Adjust implementation to always load all DLLs.
12659 Add 0x1000 offset to DLL base address when calling
12660 win32_add_one_solib.
12661 (child_initialization_done): New static global.
12662 (do_initial_child_stuff): Set child_initialization_done to
12663 zero during child initialization, and 1 after. Replace call
12664 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12665 Add comment.
12666 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12667 (handle_unload_dll): Add function documentation.
12668 (get_child_debug_event): Ignore load and unload DLL events
12669 during child initialization.
12670
12671 2014-02-20 Doug Evans <dje@google.com>
12672
12673 Remove global all_lwps.
12674 * inferiors.h (ptid_of): Move here from linux-low.h.
12675 (pid_of, lwpid_of): Ditto.
12676 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12677 parameter is a struct thread_info * now.
12678 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12679 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12680 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12681 directly.
12682 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12683 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12684 * linux-arm-low.c (update_registers_callback): Update, "entry"
12685 parameter is a struct thread_info * now.
12686 Fetch lwpid from current_inferior directly.
12687 (arm_insert_point): Pass &all_threads to find_inferior instead of
12688 &all_lwps.
12689 (arm_remove_point): Ditto.
12690 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12691 (arm_prepare_to_resume): Fetch pid from thread.
12692 (arm_read_description): Fetch lwpid from current_inferior directly.
12693 * linux-low.c (all_lwps): Delete.
12694 (delete_lwp): Delete call to remove_inferior.
12695 (handle_extended_wait): Fetch lwpid from thread.
12696 (add_lwp): Don't set lwp->entry.id. Remove call to
12697 add_inferior_to_list.
12698 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12699 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12700 (kill_one_lwp_callback): Ditto.
12701 (linux_kill): Don't dereference NULL pointer.
12702 Fetch ptid,lwpid from thread.
12703 (get_detach_signal): Fetch ptid from thread.
12704 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12705 Simplify call to regcache_invalidate_thread.
12706 (delete_lwp_callback): Update, "entry" parameter is a
12707 struct thread_info * now. Fetch pid from thread.
12708 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12709 (status_pending_p_callback): Update, "entry" parameter is a
12710 struct thread_info * now. Fetch ptid from thread.
12711 (find_lwp_pid): Update, "entry" parameter is a
12712 struct thread_info * now.
12713 (linux_wait_for_lwp): Fetch pid from thread.
12714 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12715 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12716 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12717 (dequeue_one_deferred_signal): Ditto.
12718 (cancel_breakpoint): Fetch ptid from current_inferior.
12719 (linux_wait_for_event): Pass &all_threads to find_inferior,
12720 not &all_lwps. Fetch ptid, lwpid from thread.
12721 (count_events_callback): Update, "entry" parameter is a
12722 struct thread_info * now.
12723 (select_singlestep_lwp_callback): Ditto.
12724 (select_event_lwp_callback): Ditto.
12725 (cancel_breakpoints_callback): Ditto.
12726 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12727 not &all_lwps.
12728 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12729 (unsuspend_one_lwp): Update, "entry" parameter is a
12730 struct thread_info * now.
12731 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12732 not &all_lwps.
12733 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12734 Fetch lwpid from thread, not lwp.
12735 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12736 Pass &all_threads to find_inferior, not &all_lwps.
12737 (send_sigstop): Fetch lwpid from thread, not lwp.
12738 (send_sigstop_callback): Update, "entry" parameter is a
12739 struct thread_info * now.
12740 (suspend_and_send_sigstop_callback): Ditto.
12741 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12742 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12743 struct thread_info * now.
12744 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12745 from thread, lwp.
12746 (lwp_running): Update, "entry" parameter is a
12747 struct thread_info * now.
12748 (stop_all_lwps): Fetch ptid from thread.
12749 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12750 (linux_resume_one_lwp): Fetch lwpid from thread.
12751 (linux_set_resume_request): Update, "entry" parameter is a
12752 struct thread_info * now. Fetch pid, lwpid from thread.
12753 (resume_status_pending_p): Update, "entry" parameter is a
12754 struct thread_info * now.
12755 (need_step_over_p): Ditto. Fetch lwpid from thread.
12756 (start_step_over): Fetch lwpid from thread.
12757 (linux_resume_one_thread): Update, "entry" parameter is a
12758 struct thread_info * now. Fetch lwpid from thread.
12759 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12760 (proceed_one_lwp): Update, "entry" parameter is a
12761 struct thread_info * now. Fetch lwpid from thread.
12762 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12763 struct thread_info * now.
12764 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12765 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12766 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12767 directly.
12768 (regsets_store_inferior_registers): Ditto.
12769 (fetch_register, store_register): Ditto.
12770 (linux_read_memory, linux_write_memory): Ditto.
12771 (linux_request_interrupt): Ditto.
12772 (linux_read_auxv): Ditto.
12773 (linux_xfer_siginfo): Ditto.
12774 (linux_qxfer_spu): Ditto.
12775 (linux_qxfer_libraries_svr4): Ditto.
12776 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12777 moved to inferiors.h.
12778 (get_lwp): Delete.
12779 (get_thread_lwp): Update.
12780 (struct lwp_info): Delete member "entry". Simplify comment for
12781 member "thread".
12782 (all_lwps): Delete.
12783 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12784 current_inferior directly.
12785 (update_watch_registers_callback): Update, "entry" parameter is a
12786 struct thread_info * now. Fetch pid from thread.
12787 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12788 (mips_insert_point): Fetch lwpid from current_inferior.
12789 Pass &all_threads to find_inferior, not &all_lwps.
12790 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12791 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12792 directly.
12793 (mips_stopped_data_address): Ditto.
12794 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12795 directly.
12796 * linux-tile-low.c (tile_arch_setup): Ditto.
12797 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12798 (update_debug_registers_callback): Update, "entry" parameter is a
12799 struct thread_info * now. Fetch pid from thread.
12800 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12801 Pass &all_threads to find_inferior, not &all_lwps.
12802 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12803 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12804 Pass &all_threads to find_inferior, not &all_lwps.
12805 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12806 (i386_dr_low_get_status): Ditto.
12807 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12808 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12809 (x86_linux_read_description): Ditto.
12810 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12811
12812 2014-02-20 Doug Evans <dje@google.com>
12813
12814 * inferiors.c (get_first_inferior): Fix buglet.
12815
12816 2014-02-19 Doug Evans <dje@google.com>
12817
12818 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12819 * inferiors.c (add_thread): Change result type to struct thread_info *.
12820 All callers updated.
12821 (add_lwp): Call add_thread here instead of in callers.
12822 All callers updated.
12823 * linux-low.h (get_lwp_thread): Rewrite.
12824 (struct lwp_info): New member "thread".
12825
12826 2014-02-19 Doug Evans <dje@google.com>
12827
12828 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12829 All callers updated.
12830
12831 2014-02-19 Doug Evans <dje@google.com>
12832
12833 * inferiors.c (add_thread): Fix whitespace.
12834
12835 2014-02-19 Doug Evans <dje@google.com>
12836
12837 * dll.c (clear_dlls): Replace accessing list implemention details
12838 with API function.
12839 * gdbthread.h (get_first_thread): Declare.
12840 * inferiors.c (for_each_inferior_with_data): New function.
12841 (get_first_thread): New function.
12842 (find_thread_ptid): Simplify.
12843 (get_first_inferior): New function.
12844 (clear_list): Delete.
12845 (one_inferior_p): New function.
12846 (clear_inferior_list): New function.
12847 (clear_inferiors): Update.
12848 * inferiors.h (for_each_inferior_with_data): Declare.
12849 (clear_inferior_list): Declare.
12850 (one_inferior_p): Declare.
12851 (get_first_inferior): Declare.
12852 * linux-low.c (linux_wait_for_event): Replace accessing list
12853 implemention details with API function.
12854 * server.c (target_running): Ditto.
12855 (accumulate_file_name_length): New function.
12856 (emit_dll_description): New function.
12857 (handle_qxfer_libraries): Replace accessing list implemention
12858 details with API function.
12859 (handle_qxfer_threads_worker): New function.
12860 (handle_qxfer_threads_proper): Replace accessing list implemention
12861 details with API function.
12862 (handle_query): Ditto.
12863 (visit_actioned_threads_callback_ftype): New typedef.
12864 (visit_actioned_threads_data): New struct.
12865 (visit_actioned_threads): Rewrite to be find_inferior callback.
12866 (resume): Call find_inferior.
12867 (handle_status): Replace accessing list implemention
12868 details with API function.
12869 (process_serial_event): Replace accessing list implemention details
12870 with API function.
12871 * target.c (set_desired_inferior): Replace accessing list implemention
12872 details with API function.
12873 * tracepoint.c (same_process_p): New function.
12874 (gdb_agent_about_to_close): Replace accessing list implemention
12875 details with API function.
12876 * win32-low.c (child_delete_thread): Replace accessing list
12877 implemention details with API function.
12878 (match_dll_by_basename): New function.
12879 (dll_is_loaded_by_basename): New function.
12880 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12881 details call to dll_is_loaded_by_basename.
12882
12883 2014-02-19 Doug Evans <dje@google.com>
12884
12885 * dll.h (struct dll_info): Add comment.
12886 * gdbthread.h (struct thread_info): Add comment.
12887 (current_ptid): Simplify.
12888 * inferiors.c (add_process): Update.
12889 (remove_process): Update.
12890 * inferiors.h (struct process_info): Rename member "head" to "entry".
12891 * linux-low.c (delete_lwp): Update.
12892 (add_lwp): Update.
12893 (last_thread_of_process_p): Update.
12894 (kill_one_lwp_callback, linux_kill): Update.
12895 (status_pending_p_callback): Update.
12896 (wait_for_sigstop): Update. Simplify read of ptid.
12897 (start_step_over): Update.
12898 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12899 (get_lwp_thread): Update.
12900 (struct lwp_info): Rename member "head" to "entry".
12901 * regcache.h (inferior_list_entry): Delete.
12902 * server.c (kill_inferior_callback): Update.
12903 (detach_or_kill_inferior_callback): Update.
12904 (print_started_pid): Update.
12905 (print_attached_pid): Update.
12906 (process_serial_event): Simplify read of ptid.
12907 * thread-db.c (thread_db_create_event): Update.
12908 (thread_db_get_tls_address): Update.
12909 * win32-low.c (current_inferior_ptid): Simplify.
12910
12911 2014-02-19 Tom Tromey <tromey@redhat.com>
12912
12913 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12914 argument.
12915 (target_supports_btrace): Update.
12916
12917 2014-02-14 Yao Qi <yao@codesourcery.com>
12918
12919 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12920 (rsp-low-ipa.o): New target.
12921
12922 2014-02-12 Tom Tromey <tromey@redhat.com>
12923
12924 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12925 convert_ascii_to_int.
12926 * regcache.c (registers_to_string): Likewise.
12927 * remote-utils.c (decode_M_packet): Likewise.
12928 * server.c (process_serial_event): Likewise.
12929
12930 2014-02-12 Tom Tromey <tromey@redhat.com>
12931
12932 * server.c (handle_query, handle_v_run): Use hex2bin, not
12933 unhexify.
12934 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12935
12936 2014-02-12 Tom Tromey <tromey@redhat.com>
12937
12938 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12939 convert_int_to_ascii.
12940 * regcache.c (registers_to_string, collect_register_as_string):
12941 Likewise.
12942 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12943 Likewise.
12944 * server.c (process_serial_event): Likewise.
12945 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12946 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12947
12948 2014-02-12 Tom Tromey <tromey@redhat.com>
12949
12950 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12951 bin2hex, not hexify.
12952 * tracepoint.c (cmd_qtstatus): Likewise.
12953
12954 2014-02-12 Tom Tromey <tromey@redhat.com>
12955
12956 * remote-utils.c (monitor_output): Pass explicit length to
12957 hexify.
12958
12959 2014-02-12 Tom Tromey <tromey@redhat.com>
12960
12961 * tracepoint.c: Include rsp-low.h.
12962 * server.c: Include rsp-low.h.
12963 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12964 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12965 declare.
12966 * remote-utils.c: Include rsp-low.h.
12967 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12968 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12969 (convert_int_to_ascii, convert_ascii_to_int): Move to
12970 common/rsp-low.c.
12971 * regcache.c: Include rsp-low.h.
12972 * ax.c: Include rsp-low.h.
12973 * Makefile.in (SFILES): Add common/rsp-low.c.
12974 (OBS): Add rsp-low.o.
12975 (rsp-low.o): New target.
12976
12977 2014-02-12 Tom Tromey <tromey@redhat.com>
12978
12979 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12980 Include print-utils.h.
12981 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12982 (plongest, thirty_two, phex_nz): Remove.
12983 * Makefile.in (SFILES): Add common/print-utils.c.
12984 (OBS): Add print-utils.o.
12985 (print-utils-ipa.o): New target.
12986 (print-utils.o): New target.
12987 (IPA_OBJS): Add print-utils-ipa.o.
12988
12989 2014-02-06 Tom Tromey <tromey@redhat.com>
12990
12991 * Makefile.in (SFILES): Fix indentation.
12992
12993 2014-02-05 Doug Evans <dje@google.com>
12994
12995 * linux-low.c (linux_wait_for_event): Improve comment.
12996 (linux_wait_1): Keep current_inferior in sync with event_child.
12997
12998 2014-01-22 Doug Evans <dje@google.com>
12999
13000 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13001
13002 2014-01-22 Doug Evans <dje@google.com>
13003
13004 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13005 * configure: Regenerate.
13006 * config.in: Regenerate.
13007 * Makefile.in (SFILES): Add debug.c.
13008 (OBS): Add debug.o.
13009 * debug.c: New file.
13010 * debug.h: New file.
13011 * linux-aarch64-low.c (*): Update all debugging printfs to use
13012 debug_printf instead of fprintf.
13013 * linux-arm-low.c (*): Ditto.
13014 * linux-cris-low.c (*): Ditto.
13015 * linux-crisv32-low.c (*): Ditto.
13016 * linux-m32r-low.c (*): Ditto.
13017 * linux-sparc-low.c (*): Ditto.
13018 * linux-x86.c (*): Ditto.
13019 * linux-low.c (*): Ditto.
13020 (linux_wait_1): Add calls to debug_enter, debug_exit.
13021 (linux_wait): Remove redundant debugging printf.
13022 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13023 (linux_resume, unstop_all_lwps): Ditto.
13024 * mem-break.c (*): Update all debugging printfs to use
13025 debug_printf instead of fprintf.
13026 * remote-utils.c (*): Ditto.
13027 * thread-db.c (*): Ditto.
13028 * server.c #include <ctype.h>, "gdb_vecs.h".
13029 (debug_threads): Moved to debug.c.
13030 (*): Update all debugging printfs to use debug_printf instead of
13031 fprintf.
13032 (start_inferior): Replace call to fflush with call to debug_flush.
13033 (monitor_show_help): Mention set debug-format.
13034 (parse_debug_format_options): New function.
13035 (handle_monitor_command): Handle "monitor set debug-format".
13036 (gdbserver_usage): Mention --debug-format.
13037 (main): Parse --debug-format.
13038 * server.h (debug_threads): Declaration moved to debug.h.
13039 #include "debug.h".
13040 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13041 trace_debug_1 that uses debug_printf.
13042 (tracepoint_look_up_symbols): Update all debugging printfs to use
13043 debug_printf instead of fprintf.
13044
13045 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13046
13047 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13048 sys/ptrace.h.
13049
13050 2014-01-17 Pedro Alves <palves@redhat.com>
13051
13052 PR build/16445
13053 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13054 defined after including gdb_proc_service.h.
13055
13056 2014-01-16 Doug Evans <dje@google.com>
13057
13058 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13059 (match_dll): Use it.
13060
13061 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13062
13063 * target.h (target_ops) <read_btrace>: Change parameters and
13064 return type to allow error reporting.
13065 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13066 trace reading errors on.
13067 * linux-low.c (linux_low_read_btrace): Pass trace reading
13068 errors on.
13069 (linux_low_disable_btrace): New.
13070
13071 2014-01-15 Doug Evans <dje@google.com>
13072
13073 * inferiors.c (thread_id_to_gdb_id): Delete.
13074 * inferiors.h (thread_id_to_gdb_id): Delete.
13075
13076 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13077
13078 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13079 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13080 versions.
13081
13082 2014-01-08 Pedro Alves <palves@redhat.com>
13083
13084 * server.c (handle_status): Don't discard previous queued stop
13085 replies or thread's pending status here.
13086 (main) <disconnection>: Do it here instead.
13087
13088 2014-01-08 Pedro Alves <palves@redhat.com>
13089
13090 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13091 * server.c (visit_actioned_threads, handle_pending_status): New
13092 function.
13093 (handle_v_cont): Factor out parts to ...
13094 (resume): ... this new function. If in all-stop, and a thread
13095 being resumed has a pending status, report it without actually
13096 resuming.
13097 (myresume): Adjust to use the new 'resume' function.
13098 (clear_pending_status_callback, set_pending_status_callback)
13099 (find_status_pending_thread_callback): New functions.
13100 (handle_status): Handle the case of multiple threads having
13101 interesting statuses to report. Report threads' real last signal
13102 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13103 with an interesting thread to report the status for, instead of
13104 always reporting the status of the first thread.
13105
13106 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13107
13108 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13109 * gdbreplay.c (gdbreplay_version): Likewise.
13110
13111 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13112
13113 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13114 iov.iov_len with the real length in use.
13115
13116 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13117
13118 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13119 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13120 for all targets that use win32-low.c.
13121 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13122 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13123
13124 2013-12-13 Pedro Alves <palves@redhat.com>
13125
13126 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13127 if equal to TARGET_WAITKIND_LOADED.
13128 * win32-low.c (cached_status): New static global.
13129 (win32_wait): Add declaration.
13130 (do_initial_child_stuff): Flush all initial pending debug events
13131 up to the initial breakpoint.
13132 (win32_wait): If CACHED_STATUS was set, return that instead
13133 of doing a real wait. Remove the code resuming the execution
13134 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13135 during the initial phase. Also remove the code changing
13136 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13137 TARGET_WAITKIND_STOPPED.
13138
13139 2013-12-11 Yao Qi <yao@codesourcery.com>
13140
13141 * notif.c (handle_notif_ack): Return 0 if no notification
13142 matches.
13143
13144 2013-11-20 Doug Evans <dje@google.com>
13145
13146 * linux-low.c (linux_set_resume_request): Fix comment.
13147
13148 2013-11-20 Doug Evans <dje@google.com>
13149
13150 * linux-low.c (resume_status_pending_p): Tweak comment.
13151
13152 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13153
13154 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13155 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13156 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13157 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13158 (srv_amd64_regobj): Add amd64-mpx.o.
13159 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13160 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13161 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13162 * i387-fp.c (num_pl_bnd_register) Added constant.
13163 (num_pl_bnd_cfg_registers) Added constant.
13164 (struct i387_xsave) Added reserved area and MPX fields.
13165 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13166 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13167 function.
13168 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13169 (init_registers_amd64_mpx_linux): Declare new function.
13170 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13171 (x86_64_regmap): Add MPX registers.
13172 (x86_linux_read_description): Add MPX case.
13173 (initialize_low_arch): Initialize MPX targets.
13174
13175 2013-11-18 Tom Tromey <tromey@redhat.com>
13176
13177 * configure: Rebuild.
13178 * configure.ac: Don't check for stdlib.h.
13179 * gdbreplay.c: Unconditionally include stdlib.h.
13180
13181 2013-11-18 Tom Tromey <tromey@redhat.com>
13182
13183 * config.in: Rebuild.
13184 * configure: Rebuild.
13185 * configure.ac: Don't use AC_HEADER_DIRENT.
13186
13187 2013-11-18 Tom Tromey <tromey@redhat.com>
13188
13189 * server.h: Don't check HAVE_STRING_H.
13190 * gdbreplay.c: Don't check HAVE_STRING_H.
13191 * configure: Rebuild.
13192
13193 2013-11-18 Tom Tromey <tromey@redhat.com>
13194
13195 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13196 LIBGNU.
13197
13198 2013-11-08 Tom Tromey <tromey@redhat.com>
13199
13200 * configure, config.in: Rebuild.
13201 * configure.ac: Remove unused configury.
13202
13203 2013-11-08 Tom Tromey <tromey@redhat.com>
13204
13205 * acinclude.m4: Include common.m4, codeset.m4.
13206 * configure, config.in: Rebuild.
13207 * configure.ac: Use GDB_AC_COMMON.
13208
13209 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13210
13211 * linux-s390-low.c (HWCAP_S390_TE): New define.
13212 (s390_arch_setup): Consider the TE field in the HWCAP for
13213 determining 'have_regset_tdb'.
13214
13215 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13216
13217 PR gdb/16014
13218 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13219 call to sizeof.
13220
13221 2013-10-02 Pedro Alves <palves@redhat.com>
13222
13223 * server.c (process_serial_event): Don't output "GDBserver
13224 exiting" if GDB is connected through stdio.
13225 * target.c (mywait): Likewise, be silent if GDB is connected
13226 through stdio.
13227
13228 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13229
13230 * lynx-low.c (lynx_add_threads_after_attach): New function.
13231 (lynx_attach): Remove call to add_thread. Add call to
13232 lynx_add_threads_after_attach instead.
13233
13234 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13235
13236 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13237 * config.in, configure: Regenerated.
13238
13239 2013-09-18 Yao Qi <yao@codesourcery.com>
13240
13241 PR server/15959
13242 * server.c (start_inferior): Clear 'resume_info'.
13243
13244 2013-09-16 Jiong Wang <jiwang@tilera.com>
13245
13246 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13247 for each register.
13248
13249 2013-09-16 Jiong Wang <jiwang@tilera.com>
13250
13251 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13252 linux-tile-low.o to srv_tgtobj.
13253
13254 2013-09-16 Will Newton <will.newton@linaro.org>
13255
13256 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13257 out regs.
13258
13259 2013-09-06 Pedro Alves <palves@redhat.com>
13260
13261 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13262 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13263 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13264 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13265 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13266 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13267
13268 2013-09-06 Pedro Alves <palves@redhat.com>
13269
13270 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13271 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13272
13273 2013-09-06 Pedro Alves <palves@redhat.com>
13274
13275 * linux-amd64-ipa.c: Include tracepoint.h.
13276 * linux-i386-ipa.c: Include tracepoint.h.
13277
13278 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13279
13280 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13281 (ps_get_thread_area): New function.
13282
13283 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13284
13285 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13286 (initialize_low_arch): Call init_registers_crisv32 rather than
13287 init_register_crisv32.
13288
13289 2013-09-05 Pedro Alves <palves@redhat.com>
13290
13291 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13292 to ...
13293 * hostio.h: ... this new file.
13294 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13295 win32-low.c: Include hostio.h.
13296
13297 2013-09-05 Pedro Alves <palves@redhat.com>
13298
13299 * server.h (gdb_client_data, handler_func, callback_handler_func)
13300 (delete_file_handler, add_file_handler, append_callback_event)
13301 (delete_callback_event, start_event_loop, initialize_event_loop):
13302 Move to event-loop.h and include it.
13303 * event-loop.h: New file.
13304
13305 2013-09-05 Pedro Alves <palves@redhat.com>
13306
13307 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13308 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13309 (loaded_dll, unloaded_dll): Move to ...
13310 * dll.h: ... this new file.
13311 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13312
13313 2013-09-05 Pedro Alves <palves@redhat.com>
13314
13315 * server.h (current_process, get_thread_process, all_processes)
13316 (add_inferior_to_list, for_each_inferior, current_inferior)
13317 (remove_inferior, add_process, remove_process, find_process_pid)
13318 (have_started_inferiors_p, have_attached_inferiors_p)
13319 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13320 (clear_inferiors, find_inferior, find_inferior_id)
13321 (inferior_target_data, set_inferior_target_data)
13322 (inferior_regcache_data, set_inferior_regcache_data): Move to
13323 inferiors.h, and include it.
13324 * inferiors.h: New file.
13325
13326 2013-09-05 Pedro Alves <palves@redhat.com>
13327
13328 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13329 Move ...
13330 * ax.h: ... here.
13331
13332 2013-09-05 Pedro Alves <palves@redhat.com>
13333
13334 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13335 tracepoint.h.
13336 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13337 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13338 (handle_tracepoint_general_set, handle_tracepoint_query)
13339 (tracepoint_finished_step, tracepoint_was_hit)
13340 (release_while_stepping_state_list, current_traceframe)
13341 (in_readonly_region, traceframe_read_mem)
13342 (fetch_traceframe_registers, traceframe_read_sdata)
13343 (traceframe_read_info, struct fast_tpoint_collect_status)
13344 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13345 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13346 (supply_fast_tracepoint_registers)
13347 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13348 (ipa_tdesc, claim_trampoline_space)
13349 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13350 (agent_mem_read, agent_get_trace_state_variable_value)
13351 (agent_set_trace_state_variable_value, agent_tsv_read)
13352 (agent_mem_read_string, get_raw_reg_func_addr)
13353 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13354 * tracepoint.h: ... this new file.
13355
13356 2013-09-05 Pedro Alves <palves@redhat.com>
13357
13358 * server.h (perror_with_name, error, fatal, warning, paddress)
13359 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13360 include it.
13361 * utils.h: New file.
13362
13363 2013-09-05 Pedro Alves <palves@redhat.com>
13364
13365 * server.h (remote_debug, noack_mode, transport_is_reliable)
13366 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13367 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13368 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13369 (write_enn, initialize_async_io, enable_async_io)
13370 (disable_async_io, check_remote_input_interrupt_request)
13371 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13372 (dead_thread_notify, prepare_resume_reply)
13373 (decode_address_to_semicolon, decode_address, decode_m_packet)
13374 (decode_M_packet, decode_X_packet, decode_xfer_write)
13375 (decode_search_memory_packet, unhexify, hexify)
13376 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13377 (look_up_one_symbol, relocate_instruction)
13378 (monitor_output): Move to remote-utils.h, and include it.
13379 * remote-utils.h: New file.
13380
13381 2013-09-05 Pedro Alves <palves@redhat.com>
13382
13383 * server.h (_): Delete.
13384
13385 2013-09-02 Pedro Alves <palves@redhat.com>
13386
13387 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13388 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13389 allocated.
13390 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13391
13392 2013-09-02 Pierre Muller <muller@sourceware.org>
13393
13394 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13395 or WriteProcessMemory complete successfully and handle
13396 ERROR_PARTIAL_COPY error.
13397
13398 2013-09-02 Pedro Alves <palves@redhat.com>
13399
13400 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13401 error instead of EIO.
13402
13403 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13404
13405 PR server/15604
13406 * linux-low.c: Include filestuff.h.
13407 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13408 * lynx-low.c: Include filestuff.h.
13409 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13410 * server.c: Include filestuff.h.
13411 (main): Call notice_open_fds.
13412 * spu-low.c: Include filestuff.h.
13413 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13414
13415 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13416
13417 * Makefile.in: Explain why ../target and ../nat are not
13418 listed as include file search paths.
13419 (linux-waitpid.o): New object file rule.
13420 * configure.srv (srv_native_linux_obj): New variable.
13421 Replace all occurrences of linux native object files with
13422 $srv_native_linux_obj.
13423 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13424 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13425 (linux_enable_event_reporting): Remove declaration.
13426 (my_waitpid): Moved to common/linux-waitpid.c.
13427 (linux_wait_for_event): Pass ptid when calling
13428 linux_enable_event_reporting.
13429 (linux_supports_tracefork_flag): Remove.
13430 (linux_enable_event_reporting): Likewise.
13431 (linux_tracefork_grandchild): Remove.
13432 (STACK_SIZE): Moved to common/linux-ptrace.c.
13433 (linux_tracefork_child): Remove.
13434 (linux_test_for_tracefork): Remove.
13435 (linux_look_up_symbols): Call linux_supports_traceclone.
13436 (initialize_low): Remove call to linux_test_for_tracefork.
13437 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13438 common/linux-ptrace.h.
13439 (PTRACE_TYPE_ARG4): Likewise.
13440 Include linux-ptrace.h.
13441
13442 2013-08-21 Pedro Alves <palves@redhat.com>
13443
13444 * config.in: Renegerate.
13445
13446 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13447
13448 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13449 (SFILES): Remove $(srcdir)/common/target-common.c and
13450 add $(srcdir)/target/waitstatus.c.
13451 (OBS): Remove target-common.o and add waitstatus.o.
13452 (server_h): Remove $(srcdir)/../common/target-common.h and
13453 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13454 and $(srcdir)/../target/waitstatus.h.
13455 (target-common.o): Remove.
13456 (waitstatus.o): New target object file.
13457 * target.h: Do not include target-common.h and
13458 include target/resume.h, target/wait.h and
13459 target/waitstatus.h.
13460
13461 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13462
13463 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13464 to PTRACE_TYPE_ARG3.
13465 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13466 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13467 PTRACE_TYPE_ARG4.
13468 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13469 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13470
13471 2013-07-27 Jie Zhang <jie@codesourcery.com>
13472 Daniel Jacobowitz <dan@codesourcery.com>
13473 Yao Qi <yao@codesourcery.com>
13474
13475 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13476 (mips-linux-watch.o): New rule.
13477 (mips_linux_watch_h): New variable.
13478 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13479 srv_tgtobj.
13480 * linux-mips-low.c: Include mips-linux-watch.h.
13481 (struct arch_process_info, struct arch_lwp_info): New.
13482 (update_watch_registers_callback): New function.
13483 (mips_linux_new_process, mips_linux_new_thread) New functions.
13484 (mips_linux_prepare_to_resume, mips_insert_point): New
13485 functions.
13486 (mips_remove_point, mips_stopped_by_watchpoint): New
13487 functions.
13488 (rsp_bp_type_to_target_hw_bp_type): New function.
13489 (mips_stopped_data_address): New function.
13490 (the_low_target): Add watchpoint support functions.
13491
13492 2013-07-27 Yao Qi <yao@codesourcery.com>
13493
13494 * i386-low.c: Include break-common.h.
13495 (enum target_hw_bp_type): Remove.
13496
13497 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13498
13499 * Makefile.in (SFILES): /common/target-common.c.
13500 (OBS): Add target-common.o.
13501 (server_h): Add $(srcdir)/../common/target-common.h.
13502 (target-common.o): New target.
13503 * server.c (queue_stop_reply_callback): Free
13504 status string after use.
13505 * target.c (target_waitstatus_to_string): Remove.
13506 * target.h: Include target-common.h.
13507 (resume_kind): Likewise.
13508 (target_waitkind): Likewise.
13509 (target_waitstatus): Likewise.
13510 (TARGET_WNOHANG): Likewise.
13511
13512 2013-07-04 Yao Qi <yao@codesourcery.com>
13513
13514 * Makefile.in (host_alias): Use @host_noncanonical@.
13515 (target_alias): Use @target_noncanonical@.
13516 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13517 ACX_NONCANONICAL_HOST.
13518 * configure: Regenerated.
13519
13520 Revert:
13521 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13522
13523 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13524 * configure: Rebuild.
13525 * Makefile.in (version_host, version_target): Get from configure.
13526 (version.c): Use $(version_host) and $(version_target).
13527
13528 2013-07-03 Pedro Alves <palves@redhat.com>
13529
13530 * Makefile.in (config.status): Depend on development.sh.
13531 * acinclude.m4: Include libmcheck.m4.
13532 * configure: Regenerate.
13533
13534 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13535
13536 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13537 attribute inside the parentheses.
13538 (winapi_DebugSetProcessKillOnExit): Ditto.
13539 (winapi_DebugBreakProcess): Ditto.
13540 (winapi_GenerateConsoleCtrlEvent): Ditto.
13541
13542 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13543
13544 * notif.h (notif_event): Add a dummy member to avoid compiler
13545 errors.
13546
13547 2013-07-01 Pedro Alves <palves@redhat.com>
13548
13549 * hostio.c (HOSTIO_PATH_MAX): Define.
13550 (require_filename, handle_open, handle_unlink, handle_readlink):
13551 Use it.
13552
13553 2013-07-01 Pedro Alves <palves@redhat.com>
13554
13555 * server.h: Include "pathmax.h".
13556 * linux-low.c: Don't include sys/param.h.
13557 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13558 MAXPATHLEN.
13559 * win32-low.c: Don't include sys/param.h.
13560 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13561
13562 2013-07-01 Pedro Alves <palves@redhat.com>
13563
13564 * event-loop.c: Don't check HAVE_UNISTD_H before including
13565 <unistd.h>.
13566 * gdbreplay.c: Likewise.
13567 * remote-utils.c: Likewise.
13568 * server.c: Likewise.
13569 * configure.ac: Don't check for unistd.h.
13570 * configure: Regenerate.
13571
13572 2013-06-28 Tom Tromey <tromey@redhat.com>
13573
13574 * Makefile.in (version.c): Use version.in, not
13575 common/version.in.
13576
13577 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13578
13579 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13580 * configure: Rebuild.
13581 * Makefile.in (version_host, version_target): Get from configure.
13582 (version.c): Use $(version_host) and $(version_target).
13583
13584 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13585
13586 Fix trace-status to output user name without trailing colon.
13587 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13588
13589 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13590
13591 Fix trace-status to output proper start-time and stop-time.
13592 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13593 output start time and stop time in hex as gdb expects.
13594
13595 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13596
13597 * tracepoint.c (build_traceframe_info_xml): Output trace state
13598 variables present in the trace buffer.
13599
13600 2013-06-24 Tom Tromey <tromey@redhat.com>
13601
13602 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13603 create-version.sh.
13604 (version.o): Remove.
13605 * gdbreplay.c: Include version.h.
13606 (version, host_name): Don't declare.
13607 * server.h: Include version.h.
13608 (version, host_name): Don't declare.
13609
13610 2013-06-12 Pedro Alves <palves@redhat.com>
13611
13612 * linux-x86-low.c (linux_is_elf64): Delete global.
13613 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13614 with local linux_pid_exe_is_elf_64_file use.
13615
13616 2013-06-11 Pedro Alves <palves@redhat.com>
13617
13618 * linux-low.c (regset_disabled, disable_regset): New functions.
13619 (regsets_fetch_inferior_registers)
13620 (regsets_store_inferior_registers): Use them.
13621 (initialize_regsets_info); Don't allocate the disabled_regsets
13622 array here.
13623 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13624 comment.
13625
13626 2013-06-11 Pedro Alves <palves@redhat.com>
13627
13628 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13629 xmalloc.
13630
13631 2013-06-11 Pedro Alves <palves@redhat.com>
13632
13633 * linux-x86-low.c (initialize_low_arch): Call
13634 init_registers_x32_avx_linux.
13635
13636 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13637
13638 Fix compatibility with Android Bionic.
13639 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13640 it is not empty.
13641
13642 2013-06-07 Pedro Alves <palves@redhat.com>
13643
13644 PR server/14823
13645 * Makefile.in (OBS): Add tdesc.o.
13646 (IPA_OBJS): Add tdesc-ipa.o.
13647 (tdesc-ipa.o): New rule.
13648 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13649 interface.
13650 * linux-low.c (new_inferior): Delete.
13651 (disabled_regsets, num_regsets): Delete.
13652 (linux_add_process): Adjust to set the new per-process
13653 new_inferior flag.
13654 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13655 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13656 was a stop. When calling arch_setup, switch the current inferior
13657 to the thread that got an event.
13658 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13659 (regsets_fetch_inferior_registers)
13660 (regsets_store_inferior_registers): New regsets_info parameter.
13661 Adjust to use it.
13662 (linux_register_in_regsets): New regs_info parameter. Adjust to
13663 use it.
13664 (register_addr, fetch_register, store_register): New usrregs_info
13665 parameter. Adjust to use it.
13666 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13667 parameter regs_info. Adjust to use it.
13668 (linux_fetch_registers): Get the current inferior's regs_info, and
13669 adjust to use it.
13670 (linux_store_registers): Ditto.
13671 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13672 (initialize_low): Don't initialize the target_regsets here. Call
13673 initialize_low_arch.
13674 * linux-low.h (target_regsets): Delete declaration.
13675 (struct regsets_info): New.
13676 (struct usrregs_info): New.
13677 (struct regs_info): New.
13678 (struct process_info_private) <new_inferior>: New field.
13679 (struct linux_target_ops): Delete the num_regs, regmap, and
13680 regset_bitmap fields. New field regs_info.
13681 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13682 * i387-fp.c (num_xmm_registers): Delete.
13683 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13684 calls to new interface.
13685 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13686 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13687 Infer the number of xmm registers from the regcache's target
13688 description.
13689 * i387-fp.h (num_xmm_registers): Delete.
13690 * inferiors.c (add_thread): Don't install the thread's regcache
13691 here.
13692 * proc-service.c (gregset_info): Fetch the current inferior's
13693 regs_info. Adjust to use it.
13694 * regcache.c: Include tdesc.h.
13695 (register_bytes, reg_defs, num_registers)
13696 (gdbserver_expedite_regs): Delete.
13697 (get_thread_regcache): If the thread doesn't have a regcache yet,
13698 create one, instead of aborting gdbserver.
13699 (regcache_invalidate_one): Rename to ...
13700 (regcache_invalidate_thread): ... this.
13701 (regcache_invalidate_one): New.
13702 (regcache_invalidate): Only invalidate registers of the current
13703 process.
13704 (init_register_cache): Add target_desc parameter, and use it.
13705 (new_register_cache): Ditto. Assert the target description has a
13706 non zero registers_size.
13707 (regcache_cpy): Add assertions. Adjust.
13708 (realloc_register_cache, set_register_cache): Delete.
13709 (registers_to_string, registers_from_string): Adjust.
13710 (find_register_by_name, find_regno, find_register_by_number)
13711 (register_cache_size): Add target_desc parameter, and use it.
13712 (free_register_cache_thread, free_register_cache_thread_one)
13713 (regcache_release, register_cache_size): New.
13714 (register_size): Add target_desc parameter, and use it.
13715 (register_data, supply_register, supply_register_zeroed)
13716 (supply_regblock, supply_register_by_name, collect_register)
13717 (collect_register_as_string, collect_register_by_name): Adjust.
13718 * regcache.h (struct target_desc): Forward declare.
13719 (struct regcache) <tdesc>: New field.
13720 (init_register_cache, new_register_cache): Add target_desc
13721 parameter.
13722 (regcache_invalidate_thread): Declare.
13723 (regcache_invalidate_one): Delete declaration.
13724 (regcache_release): Declare.
13725 (find_register_by_number, register_cache_size, register_size)
13726 (find_regno): Add target_desc parameter.
13727 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13728 declarations.
13729 * remote-utils.c: Include tdesc.h.
13730 (outreg, prepare_resume_reply): Adjust.
13731 * server.c: Include tdesc.h.
13732 (gdbserver_xmltarget): Delete declaration.
13733 (get_features_xml, process_serial_event): Adjust.
13734 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13735 declare.
13736 (struct process_info) <tdesc>: New field.
13737 (ipa_tdesc): Declare.
13738 * tdesc.c: New file.
13739 * tdesc.h: New file.
13740 * tracepoint.c: Include tdesc.h.
13741 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13742 (get_context_regcache): Adjust to pass ipa_tdesc down.
13743 (do_action_at_tracepoint): Adjust to get the register cache size
13744 from the context regcache's description.
13745 (traceframe_walk_blocks): Adjust to get the register cache size
13746 from the current trace frame's description.
13747 (traceframe_get_pc): Adjust to get current trace frame's
13748 description and pass it down.
13749 (gdb_collect): Adjust to get the register cache size from the
13750 IPA's description.
13751 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13752 (gdbserver_xmltarget): Delete.
13753 (initialize_low_tracepoint): Set the ipa's target description.
13754 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13755 (initialize_low_tracepoint): Set the ipa's target description.
13756 * linux-x86-low.c: Include tdesc.h.
13757 [__x86_64__] (is_64bit_tdesc): New.
13758 (ps_get_thread_area, x86_get_thread_area): Use it.
13759 (i386_cannot_store_register): Rename to ...
13760 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13761 (i386_cannot_fetch_register): Rename to ...
13762 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13763 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13764 to new interface.
13765 (target_regsets): Rename to ...
13766 (x86_regsets): ... this.
13767 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13768 interface.
13769 (x86_siginfo_fixup): Use is_64bit_tdesc.
13770 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13771 (tdesc_x32_avx_linux, tdesc_x32_linux)
13772 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13773 Declare.
13774 (x86_linux_update_xmltarget): Delete.
13775 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13776 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13777 (AMD64_LINUX_USER64_CS): New.
13778 (x86_linux_read_description): New, based on
13779 x86_linux_update_xmltarget.
13780 (same_process_callback): New.
13781 (x86_arch_setup_process_callback): New.
13782 (x86_linux_update_xmltarget): New.
13783 (x86_regsets_info): New.
13784 (amd64_linux_regs_info): New.
13785 (i386_linux_usrregs_info): New.
13786 (i386_linux_regs_info): New.
13787 (x86_linux_regs_info): New.
13788 (x86_arch_setup): Reimplement.
13789 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13790 (x86_emit_ops): Ditto.
13791 (the_low_target): Adjust. Install x86_linux_regs_info,
13792 x86_cannot_fetch_register, and x86_cannot_store_register.
13793 (initialize_low_arch): New.
13794 * linux-ia64-low.c (tdesc_ia64): Declare.
13795 (ia64_fetch_register): Adjust.
13796 (ia64_usrregs_info, regs_info): New globals.
13797 (ia64_regs_info): New function.
13798 (the_low_target): Adjust.
13799 (initialize_low_arch): New function.
13800 * linux-sparc-low.c (tdesc_sparc64): Declare.
13801 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13802 Adjust.
13803 (sparc_arch_setup): New function.
13804 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13805 (the_low_target): Adjust.
13806 (initialize_low_arch): New function.
13807 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13808 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13809 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13810 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13811 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13812 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13813 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13814 (tdesc_powerpc_isa205_vsx64l): Declare.
13815 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13816 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13817 (ppc_set_pc, ppc_get_hwcap): Adjust.
13818 (ppc_usrregs_info): Forward declare.
13819 (!__powerpc64__) ppc_regmap_adjusted: New global.
13820 (ppc_arch_setup): Adjust to the current process'es target
13821 description.
13822 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13823 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13824 (ppc_store_evrregset): Adjust.
13825 (target_regsets): Rename to ...
13826 (ppc_regsets): ... this, and make static.
13827 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13828 (ppc_regs_info): New function.
13829 (the_low_target): Adjust.
13830 (initialize_low_arch): New function.
13831 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13832 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13833 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13834 (tdesc_s390x_linux64v2): Declare.
13835 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13836 (s390_fill_gregset, s390_store_last_break): Adjust.
13837 (target_regsets): Rename to ...
13838 (s390_regsets): ... this, and make static.
13839 (s390_get_pc, s390_set_pc): Adjust.
13840 (s390_get_hwcap): New target_desc parameter, and use it.
13841 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13842 (s390_arch_setup): Adjust to set the current process'es target
13843 description. Don't adjust the regmap.
13844 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13845 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13846 (regs_info_3264): New globals.
13847 (s390_regs_info): New function.
13848 (the_low_target): Adjust.
13849 (initialize_low_arch): New function.
13850 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13851 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13852 [__mips64] (init_registers_mips_linux)
13853 (init_registers_mips_dsp_linux): Delete defines.
13854 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13855 (have_dsp): New global.
13856 (mips_read_description): New, based on mips_arch_setup.
13857 (mips_arch_setup): Reimplement.
13858 (get_usrregs_info): New function.
13859 (mips_cannot_fetch_register, mips_cannot_store_register)
13860 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13861 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13862 (target_regsets): Rename to ...
13863 (mips_regsets): ... this, and make static.
13864 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13865 (dsp_regs_info, regs_info): New globals.
13866 (mips_regs_info): New function.
13867 (the_low_target): Adjust.
13868 (initialize_low_arch): New function.
13869 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13870 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13871 Declare.
13872 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13873 (arm_read_description): New, with bits factored from
13874 arm_arch_setup.
13875 (arm_arch_setup): Reimplement.
13876 (target_regsets): Rename to ...
13877 (arm_regsets): ... this, and make static.
13878 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13879 (arm_regs_info): New function.
13880 (the_low_target): Adjust.
13881 (initialize_low_arch): New function.
13882 * linux-m68k-low.c (tdesc_m68k): Declare.
13883 (target_regsets): Rename to ...
13884 (m68k_regsets): ... this, and make static.
13885 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13886 (m68k_regs_info): New function.
13887 (m68k_arch_setup): New function.
13888 (the_low_target): Adjust.
13889 (initialize_low_arch): New function.
13890 * linux-sh-low.c (tdesc_sharch): Declare.
13891 (target_regsets): Rename to ...
13892 (sh_regsets): ... this, and make static.
13893 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13894 (sh_regs_info, sh_arch_setup): New functions.
13895 (the_low_target): Adjust.
13896 (initialize_low_arch): New function.
13897 * linux-bfin-low.c (tdesc_bfin): Declare.
13898 (bfin_arch_setup): New function.
13899 (bfin_usrregs_info, regs_info): New globals.
13900 (bfin_regs_info): New function.
13901 (the_low_target): Adjust.
13902 (initialize_low_arch): New function.
13903 * linux-cris-low.c (tdesc_cris): Declare.
13904 (cris_arch_setup): New function.
13905 (cris_usrregs_info, regs_info): New globals.
13906 (cris_regs_info): New function.
13907 (the_low_target): Adjust.
13908 (initialize_low_arch): New function.
13909 * linux-cris-low.c (tdesc_crisv32): Declare.
13910 (cris_arch_setup): New function.
13911 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13912 (cris_regs_info): New function.
13913 (the_low_target): Adjust.
13914 (initialize_low_arch): New function.
13915 * linux-m32r-low.c (tdesc_m32r): Declare.
13916 (m32r_arch_setup): New function.
13917 (m32r_usrregs_info, regs_info): New globals.
13918 (m32r_regs_info): Adjust.
13919 (initialize_low_arch): New function.
13920 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13921 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13922 (tic6x_usrregs_info): Forward declare.
13923 (tic6x_read_description): New function, based on ...
13924 (tic6x_arch_setup): ... this. Reimplement.
13925 (target_regsets): Rename to ...
13926 (tic6x_regsets): ... this, and make static.
13927 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13928 (tic6x_regs_info): New function.
13929 (the_low_target): Adjust.
13930 (initialize_low_arch): New function.
13931 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13932 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13933 (target_regsets): Rename to ...
13934 (xtensa_regsets): ... this, and make static.
13935 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13936 globals.
13937 (xtensa_arch_setup, xtensa_regs_info): New functions.
13938 (the_low_target): Adjust.
13939 (initialize_low_arch): New function.
13940 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13941 (nios2_arch_setup): Set the current process'es tdesc.
13942 (target_regsets): Rename to ...
13943 (nios2_regsets): ... this.
13944 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13945 (nios2_regs_info): New function.
13946 (the_low_target): Adjust.
13947 (initialize_low_arch): New function.
13948 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13949 (aarch64_arch_setup): Set the current process'es tdesc.
13950 (target_regsets): Rename to ...
13951 (aarch64_regsets): ... this.
13952 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13953 (aarch64_regs_info): New function.
13954 (the_low_target): Adjust.
13955 (initialize_low_arch): New function.
13956 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13957 globals.
13958 (target_regsets): Rename to ...
13959 (tile_regsets): ... this.
13960 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13961 (tile_regs_info): New function.
13962 (tile_arch_setup): Set the current process'es tdesc.
13963 (the_low_target): Adjust.
13964 (initialize_low_arch): New function.
13965 * spu-low.c (tdesc_spu): Declare.
13966 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13967 * win32-arm-low.c (tdesc_arm): Declare.
13968 (arm_arch_setup): New function.
13969 (the_low_target): Install arm_arch_setup instead of
13970 init_registers_arm.
13971 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13972 (init_windows_x86): Rename to ...
13973 (i386_arch_setup): ... this. Set `win32_tdesc'.
13974 (the_low_target): Adjust.
13975 * win32-low.c (win32_tdesc): New global.
13976 (child_add_thread): Don't create the thread cache here.
13977 (do_initial_child_stuff): Set the new process'es tdesc.
13978 * win32-low.h (struct target_desc): Forward declare.
13979 (win32_tdesc): Declare.
13980 * lynx-i386-low.c (tdesc_i386): Declare global.
13981 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13982 * lynx-low.c (lynx_tdesc): New global.
13983 (lynx_add_process): Set the new process'es tdesc.
13984 * lynx-low.h (struct target_desc): Forward declare.
13985 (lynx_tdesc): Declare global.
13986 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13987 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13988 * nto-low.c (nto_tdesc): New global.
13989 (do_attach): Set the new process'es tdesc.
13990 * nto-low.h (struct target_desc): Forward declare.
13991 (nto_tdesc): Declare.
13992 * nto-x86-low.c (tdesc_i386): Declare.
13993 (nto_x86_arch_setup): Set `nto_tdesc'.
13994
13995 2013-06-04 Gary Benson <gbenson@redhat.com>
13996
13997 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13998 to qSupported response when appropriate.
13999 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14000 with nonzero-length annex.
14001 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14002 arguments supplied in annex.
14003
14004 2013-05-31 Doug Evans <dje@google.com>
14005
14006 PR server/15594
14007 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14008 64 bits in 64-cross-32 environment.
14009
14010 2013-05-28 Pedro Alves <palves@redhat.com>
14011
14012 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14013 (aarch64-without-fpu.c): Delete rule.
14014 * configure.srv (aarch64*-*-linux*): Remove references to
14015 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14016 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14017 declaration.
14018
14019 2013-05-24 Pedro Alves <palves@redhat.com>
14020
14021 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14022 instead of strchr/decode_address. Error if the range isn't split
14023 with a ','. Don't assume there's be a ':' in the action.
14024
14025 2013-05-23 Yao Qi <yao@codesourcery.com>
14026 Pedro Alves <palves@redhat.com>
14027
14028 * linux-low.c (lwp_in_step_range): New function.
14029 (linux_wait_1): If the thread was range stepping and stopped
14030 outside the stepping range, report the stop to GDB. Otherwise,
14031 continue stepping. Add range stepping debug output.
14032 (linux_set_resume_request): Copy the step range from the resume
14033 request to the lwp.
14034 (linux_supports_range_stepping): New.
14035 (linux_target_ops) <supports_range_stepping>: Set to
14036 linux_supports_range_stepping.
14037 * linux-low.h (struct linux_target_ops)
14038 <supports_range_stepping>: New field.
14039 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14040 * linux-x86-low.c (x86_supports_range_stepping): New.
14041 (the_low_target) <supports_range_stepping>: Set to
14042 x86_supports_range_stepping.
14043 * server.c (handle_v_cont): Handle 'r' action.
14044 (handle_v_requests): Append ";r" if the target supports range
14045 stepping.
14046 * target.h (struct thread_resume) <step_range_start,
14047 step_range_end>: New fields.
14048 (struct target_ops) <supports_range_stepping>:
14049 New field.
14050 (target_supports_range_stepping): New macro.
14051
14052 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14053
14054 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14055 confusion in comment.
14056
14057 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14058
14059 * lynx-low.c (struct process_info_private): New type.
14060 (lynx_add_process): New function.
14061 (lynx_create_inferior, lynx_attach): Replace calls to
14062 add_process by calls to lynx_add_process.
14063 (lynx_resume): If PTID is null, then try using
14064 current_process()->private->last_wait_event_ptid.
14065 Add comments.
14066 (lynx_clear_inferiors): Delete. The contents of that function
14067 has been inlined in lynx_mourn;
14068 (lynx_wait_1): Save the ptid in the process's private data.
14069 (lynx_mourn): Free the process' private data. Replace call
14070 to lynx_clear_inferiors by call to clear_inferiors.
14071
14072 2013-05-17 Yao Qi <yao@codesourcery.com>
14073
14074 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14075 the right place.
14076
14077 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14078
14079 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14080 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14081 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14082 PT_TEXT_END_ADDR guards. Update comments.
14083 (linux_target_op) <read_offsets>: Conditionally define to
14084 linux_read_offsets if the target is UCLIBC and if it defines
14085 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14086
14087 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14088 Andrew Jenner <andrew@codesourcery.com>
14089
14090 * Makefile.in (SFILES): Add linux-nios2-low.c.
14091 (clean): Add action to delete nios2-linux.c.
14092 (nios2-linux.c): New rule.
14093 * configure.srv: Add nios2*-*-linux*.
14094 * linux-nios2-low.c: New.
14095
14096 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14097
14098 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14099
14100 2013-04-25 Hui Zhu <hui@codesourcery.com>
14101
14102 PR gdb/15186
14103 * ax.c (ax_printf): Add fflush.
14104
14105 2013-04-22 Tom Tromey <tromey@redhat.com>
14106
14107 * Makefile.in (SFILES): Add filestuff.c.
14108 (OBS): Add filestuff.o.
14109 (filestuff.o): New target.
14110 * config.in, configure: Rebuild.
14111 * configure.ac: Check for fdwalk, pipe2.
14112
14113 2013-04-17 Pedro Alves <palves@redhat.com>
14114
14115 * configure.ac (USE_THREAD_DB): Delete variable.
14116 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14117 Don't AC_SUBST USE_THREAD_DB.
14118 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14119 * config.in, configure: Regenerate.
14120
14121 2013-04-16 Pedro Alves <palves@redhat.com>
14122
14123 * linux-low.h (struct lwp_info) <thread_known>: Move under
14124 the USE_THREAD_DB #ifdef.
14125
14126 2013-04-16 Pedro Alves <palves@redhat.com>
14127
14128 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14129 (linux-low.o): Delete rule.
14130 * linux-low.h: Always include "gdb_thread_db.h" instead of
14131 conditionally including thread_db.h.
14132 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14133 HAVE_THREAD_DB_H.
14134
14135 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14136
14137 * Makefile.in (install-only): Fix make install regression.
14138
14139 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14140
14141 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14142 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14143 installation.
14144 * gdbserver.1: Remove.
14145
14146 2013-03-22 Pedro Alves <palves@redhat.com>
14147
14148 * linux-low.c (handle_extended_wait): Don't call
14149 linux_enable_event_reporting.
14150
14151 2013-03-15 Tony Theodore <tonyt@logyst.com>
14152
14153 PR build/9098:
14154 * Makefile.in (SHELL): Use @SHELL@.
14155
14156 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14157
14158 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14159 compiler warning.
14160
14161 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14162
14163 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14164 Remove extraneous NULL element.
14165
14166 2013-03-13 Yao Qi <yao@codesourcery.com>
14167
14168 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14169 'V' block in trace frame.
14170
14171 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14172
14173 * target.h (struct target_ops): Add btrace ops.
14174 (target_supports_btrace): New macro.
14175 (target_enable_btrace): New macro.
14176 (target_disable_btrace): New macro.
14177 (target_read_btrace): New macro.
14178 * gdbthread.h (struct thread_info): Add btrace field.
14179 * server.c: Include btrace-common.h.
14180 (handle_btrace_general_set): New function.
14181 (handle_btrace_enable): New function.
14182 (handle_btrace_disable): New function.
14183 (handle_general_set): Call handle_btrace_general_set.
14184 (handle_qxfer_btrace): New function.
14185 (struct qxfer qxfer_packets[]): Add btrace entry.
14186 * inferiors.c (remove_thread): Disable btrace.
14187 * linux-low: Include linux-btrace.h.
14188 (linux_low_enable_btrace): New function.
14189 (linux_low_read_btrace): New function.
14190 (linux_target_ops): Add btrace ops.
14191 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14192 Add srv_linux_btrace=yes.
14193 (x86_64-*-linux*): Add linux-btrace.o.
14194 Add srv_linux_btrace=yes.
14195 * configure.ac: Define HAVE_LINUX_BTRACE.
14196 * config.in: Regenerated.
14197 * configure: Regenerated.
14198
14199 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14200
14201 * server.c (handle_qxfer): Preserve error message if -3 is
14202 returned.
14203 (qxfer): Document the -3 return value.
14204
14205 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14206
14207 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14208 (linux_btrace_h): New variable.
14209 (linux-btrace.o): New rule.
14210
14211 2013-03-08 Stan Shebs <stan@codesourcery.com>
14212 Hafiz Abid Qadeer <abidh@codesourcery.com>
14213
14214 * tracepoint.c (trace_buffer_size): New global.
14215 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14216 (init_trace_buffer): Change to one-argument function. Allocate
14217 trace buffer memory.
14218 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14219 handle QTBuffer:size packet.
14220 (cmd_bigqtbuffer_size): New function.
14221 (initialize_tracepoint): Call init_trace_buffer with
14222 DEFAULT_TRACE_BUFFER_SIZE.
14223 * server.c (handle_query): Add QTBuffer:size in the
14224 supported packets.
14225
14226 2013-03-07 Yao Qi <yao@codesourcery.com>
14227
14228 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14229 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14230 of -1.
14231 (cmd_qtsp): Adjust condition. Do post increment.
14232 Set cur_action and cur_step_action back to 0.
14233
14234 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14235
14236 PR server/15236
14237 * linux-low.c (linux_write_memory): Return early success if LEN is
14238 zero.
14239
14240 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14241
14242 * configure.srv: Add x86_64-*-cygwin* as target.
14243
14244 2013-02-28 Tom Tromey <tromey@redhat.com>
14245
14246 * configure.ac: Invoke AC_SYS_LARGEFILE.
14247 * configure, config.in: Rebuild.
14248
14249 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14250
14251 * win32-low.c: Throughout, fix format strings and casts of
14252 printf-like functions to avoid type related warnings on all
14253 platforms.
14254 (get_child_debug_event): Print dwDebugEventCode as hex since
14255 that's how it's usually documented.
14256
14257 2013-02-28 Yao Qi <yao@codesourcery.com>
14258
14259 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14260 pulongest.
14261
14262 2013-02-27 Jiong Wang <jiwang@tilera.com>
14263
14264 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14265 (reg-tilegx32.c): New rule.
14266 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14267 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14268 different register info initializer according to elf class.
14269 (init_registers_tilgx32): New function. The tilegx32 register info
14270 initializer.
14271 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14272 (tile_store_gregset): Likewise.
14273
14274 2013-02-27 Yao Qi <yao@codesourcery.com>
14275
14276 * server.c (process_point_options): Print debug message when
14277 debug_threads is true.
14278
14279 2013-02-26 Yao Qi <yao@codesourcery.com>
14280
14281 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14282
14283 2013-02-19 Pedro Alves <palves@redhat.com>
14284 Kai Tietz <ktietz@redhat.com>
14285
14286 PR gdb/15161
14287
14288 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14289 instead of strtoul to extract address from packet.
14290 (process_serial_event) <'z'>: Likewise.
14291
14292 2013-02-18 Yao Qi <yao@codesourcery.com>
14293
14294 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14295
14296 2013-02-14 Pedro Alves <palves@redhat.com>
14297
14298 Plug memory leak.
14299
14300 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14301 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14302
14303 2013-02-14 Pedro Alves <palves@redhat.com>
14304
14305 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14306
14307 2013-02-14 Pedro Alves <palves@redhat.com>
14308
14309 * tracepoint.c (save_string): Delete.
14310 (add_tracepoint_action): Use savestring instead of save_string.
14311
14312 2013-02-12 Pedro Alves <palves@redhat.com>
14313
14314 * linux-xtensa-low.c: Ditto.
14315 * xtensa-xtregs.c: Ditto.
14316
14317 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14318
14319 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14320 thread_db.
14321
14322 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14323
14324 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14325 aarch64_num_wp_regs and aarch64_num_bp_regs to
14326 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14327
14328 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14329
14330 * linux-aarch64-low.c (ps_get_thread_area): Replace
14331 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14332
14333 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14334 Marcus Shawcroft <marcus.shawcroft@arm.com>
14335 Nigel Stephens <nigel.stephens@arm.com>
14336 Yufeng Zhang <yufeng.zhang@arm.com>
14337
14338 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14339 (aarch64.c, aarch64-without-fpu.c): New targets.
14340 * configure.srv (aarch64*-*-linux*): New.
14341 * linux-aarch64-low.c: New file.
14342
14343 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14344
14345 * linux-low.c (handle_extended_wait, linux_create_inferior)
14346 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14347 (dequeue_one_deferred_signal, linux_resume_one_thread)
14348 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14349 (linux_tracefork_grandchild, linux_test_for_tracefork)
14350 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14351 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14352 where the argument is 0.
14353
14354 2013-01-25 Yao Qi <yao@codesourcery.com>
14355
14356 * event-loop.c: Include "queue.h".
14357 (gdb_event_p): New typedef.
14358 (struct gdb_event) <next_event>: Remove.
14359 (event_queue): Change to QUEUE(gdb_event_p).
14360 (async_queue_event): Remove.
14361 (gdb_event_xfree): New.
14362 (initialize_event_loop): New.
14363 (process_event): Use API from QUEUE.
14364 (wait_for_event): Likewise.
14365 * server.c (main): Call initialize_event_loop.
14366 * server.h (initialize_event_loop): Declare.
14367
14368 2013-01-18 Yao Qi <yao@codesourcery.com>
14369
14370 * ax.h (struct eval_agent_expr_context): New.
14371 (gdb_eval_agent_expr): Update declaration.
14372 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14373 TFRAME. Add new argument CTX.
14374 * server.h (struct eval_agent_expr_context): Declare.
14375 (agent_mem_read, agent_tsv_read): Update declaration.
14376 (agent_mem_read_string): Likewise.
14377 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14378 (add_traceframe_block): Add new argument TPOINT.
14379 Increase TPOINT->traceframe_usage.
14380 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14381 eval_tracepoint_agent_expr.
14382 (condition_true_at_tracepoint): Likewise.
14383 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14384 (agent_mem_read_string, agent_tsv_read): Likewise.
14385
14386 2013-01-16 Yao Qi <yao@codesourcery.com>
14387
14388 * linux-low.c (linux_resume_one_lwp): Don't check
14389 'lwp->bp_reinsert != 0'.
14390
14391 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14392 Pedro Alves <palves@redhat.com>
14393
14394 * lynx-low.c (ptrace_request_to_str): Define a temporary
14395 macro and use it to simplify this function's implementation.
14396
14397 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14398
14399 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14400 sets errno.
14401
14402 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14403
14404 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14405
14406 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14407
14408 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14409
14410 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14411
14412 * lynx-low.c (lynx_resume): Use the resume_info parameter
14413 to determine the ptid for the lynx_ptrace call, unless
14414 it is equal to minus_one_ptid, in which case we use the
14415 ptid of the current_inferior.
14416 (lynx_wait_1): After having received a thread create/exit
14417 event, resume the inferior's execution using the signaling
14418 thread's ptid, rather than the old ptid.
14419
14420 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14421
14422 * lynx-low.c (lynx_resume): Delete variable ret.
14423
14424 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14425
14426 * gdbreplay.c (gdbreplay_version): Update copyright year.
14427 * server.c (gdbserver_version): Likewise.
14428
14429 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14430
14431 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14432 new thread.
14433
14434 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14435
14436 * lynx-low.c (ptrace_request_to_str): Add handling for
14437 PTRACE_GETTRACESIG.
14438
14439 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14440
14441 * lynx-low.c (lynx_attach): Delete variable new_process.
14442
14443 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14444
14445 * lynx-low.c (lynx_create_inferior): Delete variable
14446 new_process.
14447
14448 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14449
14450 * lynx-low.c (ptrace_request_to_str): Do not handle
14451 PTRACE_GETTHREADLIST if this macro does not exist.
14452
14453 2012-12-15 Yao Qi <yao@codesourcery.com>
14454
14455 * Makefile.in (OBS): Add notif.o.
14456 * notif.c, notif.h: New.
14457 * server.c: Include "notif.h".
14458 (struct vstop_notif) <next>: Remove.
14459 <base>: New field.
14460 (queue_stop_reply): Update.
14461 (push_event, send_next_stop_reply): Remove.
14462 (discard_queued_stop_replies): Update.
14463 (notif_stop): New variable.
14464 (handle_v_stopped): Remove.
14465 (handle_v_requests): Don't call handle_v_stopped. Call
14466 handle_ack_notif instead.
14467 (queue_stop_reply_callback): Call notif_event_enque instead
14468 of queue_stop_reply.
14469 (handle_status): Don't call send_next_stop_reply, call
14470 notif_write_event instead.
14471 (kill_inferior_callback): Likewise.
14472 (detach_or_kill_inferior_callback): Likewise.
14473 (main): Call initialize_notif.
14474 (process_serial_event): Call QUEUE_is_empty.
14475 (handle_target_event): Call notif_push instead of push event.
14476 * server.h (push_event): Remove declaration.
14477
14478 2012-12-10 Tom Tromey <tromey@redhat.com>
14479
14480 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14481 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14482 macros.
14483 (.c.o): Rewrite.
14484 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14485 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14486 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14487 (amd64-linux-ipa.o, ax.o): Rewrite.
14488 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14489 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14490 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14491 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14492 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14493 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14494 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14495 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14496 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14497 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14498 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14499 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14500 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14501 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14502 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14503 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14504 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14505 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14506 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14507 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14508 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14509 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14510 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14511 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14512 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14513 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14514 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14515 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14516 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14517 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14518 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14519 (reg-tilegx.o): Remove.
14520 (all_object_files): New macro.
14521 Include .deps files.
14522 * aclocal.m4, configure: Rebuild.
14523 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14524 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14525 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14526
14527 2012-12-05 Tom Tromey <tromey@redhat.com>
14528
14529 PR gdb/14917:
14530 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14531
14532 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14533
14534 * configure.ac: Check for linux/perf_event.h.
14535 * config.in: Regenerated.
14536 * configure: Regenerated.
14537
14538 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14539
14540 * hostio.c (handle_readlink): Decrease buffer size
14541 parameter passed to readlink by one byte.
14542
14543 2012-11-26 Yao Qi <yao@codesourcery.com>
14544
14545 * configure.ac (build_warnings): Append '-Wempty-body'.
14546 * configure: Regenerated.
14547 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14548 body.
14549
14550 2012-11-15 Pierre Muller <muller@sourceware.org>
14551
14552 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14553 * config.in: Regenerate.
14554 * configure: Regenerate.
14555 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14556 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14557 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14558 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14559 header.
14560 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14561 instead of <sys/wait.h> header.
14562 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14563
14564 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14565
14566 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14567 (various make rules): Remove -DGDBSERVER
14568
14569 2012-11-09 Yao Qi <yao@codesourcery.com>
14570
14571 * spu-low.c (current_ptid): Move it to ..
14572 * gdbthread.h: ... here. New.
14573 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14574 * server.c (myresume, process_serial_event): Likewise.
14575 * thread-db.c (thread_db_find_new_threads): Likewise.
14576 * tracepoint.c (run_inferior_command): Likewise.
14577
14578 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14579
14580 * server.c (handle_search_memory_1): Include access length in
14581 warning message.
14582
14583 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14584
14585 * linux-crisv32-low.c: Fix compile errors.
14586
14587 2012-09-04 Yao Qi <yao@codesourcery.com>
14588
14589 * tracepoint.c (cmd_qtsv): Adjust debug message.
14590 Don't check CUR_TPOINT.
14591
14592 2012-08-28 Yao Qi <yao@codesourcery.com>
14593
14594 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14595 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14596 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14597 Remove declarations of xmalloc, xreallloc, xstrdup and
14598 freeargv.
14599 * Makefile.in (libiberty_h): New.
14600 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14601 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14602
14603 2012-08-23 Yao Qi <yao@codesourcery.com>
14604
14605 * server.h: Remove declaration of 'xsnprintf'.
14606
14607 2012-08-22 Keith Seitz <keiths@redhat.com>
14608
14609 * server.h: Include build-gnulib-gbserver/config.h.
14610 * gdbreplay.c: Likewise.
14611
14612 2012-08-08 Doug Evans <dje@google.com>
14613
14614 * Makefile.in (SFILES): Add gdb_vecs.c.
14615 (OBS): Add gdb_vecs.o.
14616 (gdb_vecs_h, host_defs_h): New variables.
14617 (thread-db.o): Add $(gdb_vecs_h) dependency.
14618 (gdb_vecs.o): New rule.
14619 * thread-db.c: #include "gdb_vecs.h".
14620 (thread_db_load_search): Use a vector to iterate over path elements.
14621 Handle text appearing after "$pdir".
14622
14623 * configure.ac: Add check for strstr.
14624 * config.in: Regenerate.
14625 * configure: Regenerate.
14626
14627 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14628
14629 * hostio.c (handle_pread): If pread fails, fall back to attempting
14630 lseek/read.
14631 (handle_pwrite): Likewise for pwrite.
14632
14633 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14634
14635 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14636 between unsupported TYPE and unimplementable ADDR/LEN combination.
14637 (arm_insert_point): Act on new return value.
14638
14639 2012-07-31 Pedro Alves <palves@redhat.com>
14640
14641 * server.c (process_point_options): Only skip tokens if we find
14642 one that is unrecognized. Don't treat 'X' specially while
14643 skipping unrecognized tokens.
14644
14645 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14646
14647 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14648 to 4-byte-align HW breakpoint addresses for Thumb.
14649
14650 2012-07-27 Yao Qi <yao@codesourcery.com>
14651
14652 PR remote/14161.
14653
14654 * server.h: Declare gdb_agent_about_to_close.
14655 * target.c (kill_inferior): Include "agent.h".
14656 New. Send command 'kill'.
14657 * target.h (kill_inferior): Removed macro.
14658 * tracepoint.c (gdb_agent_about_to_close): New.
14659 (gdb_agent_helper_thread): Handle command 'close'.
14660 Wait endlessly until the inferior stops.
14661 Install gdb_agent_remove_socket to atexit hook.
14662 (agent_socket_name): New static variable.
14663 (gdb_agent_socket_init): Replace local variable 'name' with
14664 'agent_socket_name'.
14665 (gdb_agent_remove_socket): New.
14666
14667 2012-07-27 Yao Qi <yao@codesourcery.com>
14668
14669 * server.c (process_point_options): Stop at 'X' when parsing.
14670
14671 2012-07-19 Michael Eager <eager@eagercon.com>
14672
14673 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14674 to hw_execute.
14675 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14676 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14677 hardware breakpoint.
14678
14679 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14680
14681 * gdbserver/linux-low.c (initialize_low): Call
14682 linux_ptrace_init_warnings.
14683
14684 2012-07-02 Doug Evans <dje@google.com>
14685
14686 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14687 pointer to int.
14688
14689 2012-07-02 Stan Shebs <stan@codesourcery.com>
14690
14691 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14692 (ax.o): Add it to build rule.
14693 (ax-ipa.o): Ditto.
14694 (OBS): Add format.o.
14695 (IPA_OBS): Add format.o.
14696 * server.c (handle_query): Claim support for breakpoint commands.
14697 (process_point_options): Add command case.
14698 (process_serial_event): Leave running if there are printfs in
14699 effect.
14700 * mem-break.h (any_persistent_commands): Declare.
14701 (add_breakpoint_commands): Declare.
14702 (gdb_no_commands_at_breakpoint): Declare.
14703 (run_breakpoint_commands): Declare.
14704 * mem-break.c (struct point_command_list): New struct.
14705 (struct breakpoint): New field command_list.
14706 (any_persistent_commands): New function.
14707 (add_commands_to_breakpoint): New function.
14708 (add_breakpoint_commands): New function.
14709 (gdb_no_commands_at_breakpoint): New function.
14710 (run_breakpoint_commands): New function.
14711 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14712 locally.
14713 * ax.c: Include format.h.
14714 (ax_printf): New function.
14715 (gdb_eval_agent_expr): Add printf opcode.
14716
14717 2012-06-13 Yao Qi <yao@codesourcery.com>
14718
14719 * server.c (start_inferior): Remove duplicated writes to fields
14720 'last_resume_kind' and 'last_status' of 'current_inferior'.
14721
14722 2012-06-12 Yao Qi <yao@codesourcery.com>
14723 Pedro Alves <palves@redhat.com>
14724
14725 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14726 comment.
14727 * server.c (handle_v_cont): Extend comment.
14728
14729 2012-06-11 Yao Qi <yao@codesourcery.com>
14730
14731 * linux-low.c (linux_attach): Add 'static'.
14732
14733 2012-06-06 Yao Qi <yao@codesourcery.com>
14734
14735 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14736
14737 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14738
14739 Fix gcc -flto compilation warning.
14740 * server.c (main): Make variable multi_mode and attach volatile.
14741
14742 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14743
14744 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14745 if the platform doesn't know about it.
14746
14747 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14748
14749 * Makefile.in (SFILES): Add linux-tile-low.c.
14750 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14751 * configure.srv: Handle tilegx-*-linux*.
14752 * linux-tile-low.c: New file.
14753
14754 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14755
14756 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14757
14758 2012-05-24 Pedro Alves <palves@redhat.com>
14759
14760 PR gdb/7205
14761
14762 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14763
14764 2012-05-24 Pedro Alves <palves@redhat.com>
14765
14766 PR gdb/7205
14767
14768 Replace target_signal with gdb_signal throughout.
14769
14770 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14771
14772 * linux-low.c (linux_store_registers): Avoid the copying sequence
14773 when no data has been retrieved by ptrace.
14774
14775 2012-05-22 Will Deacon <will.deacon@arm.com>
14776
14777 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14778 Include asm/ptrace.h.
14779 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14780 already defined.
14781
14782 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14783
14784 * linux-low.c (linux_store_registers): Don't re-retrieve data
14785 with ptrace that has already been obtained from /proc. Always
14786 copy any data retrieved with ptrace to the buffer supplied.
14787
14788 2012-05-11 Yao Qi <yao@codesourcery.com>
14789 Pedro Alves <palves@redhat.com>
14790
14791 * linux-low.c (enum stopping_threads_kind): New.
14792 (stopping_threads): Change type to `enum stopping_threads_kind'.
14793 (handle_extended_wait): If stopping and suspending threads, leave
14794 the new_lwp suspended too.
14795 (linux_wait_for_event): Adjust.
14796 (stop_all_lwps): Set `stopping_threads' to
14797 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14798 whether we're suspending threads or just stopping them. Assert no
14799 recursion happens.
14800
14801 2012-04-29 Yao Qi <yao@codesourcery.com>
14802
14803 * server.h: Move some code to ...
14804 * gdbthread.h: ... here. New.
14805 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14806 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14807 (nto-low.o, win32-low.o): Likewise.
14808 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14809 * regcache.c, remote-utils.c, server.c: Likewise.
14810 * target.c, tracepoint.c, win32-low.c: Likewise.
14811
14812 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14813
14814 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14815 (PTRACE_ARG4_TYPE): Likewise.
14816 (PTRACE_XFER_TYPE): Likewise.
14817 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14818 ptrace to PTRACE_ARG3_TYPE.
14819 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14820 (PTRACE_ARG4_TYPE): Likewise.
14821 (PTRACE_XFER_TYPE): Likewise.
14822 (linux_detach_one_lwp): Cast fourth argument of
14823 ptrace to long then PTRACE_ARG4_TYPE.
14824 (regsets_fetch_inferior_registers): Cast third argument of
14825 ptrace to long then PTRACE_ARG3_TYPE.
14826 (regsets_store_inferior_registers): Likewise.
14827
14828 2012-04-20 Pedro Alves <palves@redhat.com>
14829
14830 * configure: Regenerate.
14831
14832 2012-04-19 Pedro Alves <palves@redhat.com>
14833
14834 * Makefile.in (GNULIB_BUILDDIR): New.
14835 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14836 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14837 (all, install-only, uninstall, clean-info, all-lib, clean): No
14838 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14839 (maintainer-clean realclean distclean): Use subdir_do.
14840 (subdir_do): New.
14841 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14842 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14843 * acinclude.m4: Include acx_configure_dir.m4.
14844 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14845 calls. Call AC_PROG_RANLIB. Configure gnulib using
14846 ACX_CONFIGURE_DIR.
14847 (GNULIB): New.
14848 (GNULIB_STDINT_H): Adjust.
14849 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14850 * gdbreplay.c: Include build-gnulib/config.h.
14851 * server.h: Likewise.
14852 * aclocal.m4: Regenerate.
14853 * config.in: Regenerate.
14854 * configure: Regenerate.
14855
14856 2012-04-19 Pedro Alves <palves@redhat.com>
14857
14858 * Makefile.in (LIBGNU, INCGNU): Adjust.
14859 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14860 (all, install-only, uninstall, clean-info, all-lib, clean)
14861 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14862 * configure.ac: Adjust AC_OUTPUT output.
14863 * aclocal.m4: Regenerate.
14864 * configure: Regenerate.
14865
14866 2012-04-19 Pedro Alves <palves@redhat.com>
14867
14868 * Makefile.in (generated_files): New.
14869 (server_h): Remove the explicit dependency on config.h, and depend
14870 on $generated_files.
14871
14872 2012-04-19 Pedro Alves <palves@redhat.com>
14873
14874 * Makefile.in (INCGNU): Add -Ignulib.
14875
14876 2012-04-19 Pedro Alves <palves@redhat.com>
14877
14878 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14879 (INCGNU): ... this, and spell out -I here.
14880 (GNULIB_LIB): Rename to ...
14881 (LIBGNU): ... this.
14882 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14883
14884 2012-04-19 Pedro Alves <palves@redhat.com>
14885
14886 * config.in: Regenerate.
14887
14888 2012-04-19 Pedro Alves <palves@redhat.com>
14889
14890 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14891 * server.h (memmem): Remove declaration.
14892 * config.in: Regenerate.
14893 * configure: Regenerate.
14894
14895 2012-04-19 Yao Qi <yao@codesourcery.com>
14896
14897 * Makefile.in (SFILES): Add common/vec.c.
14898 (OBS): Add vec.o.
14899 (vec.o): New rule.
14900
14901 2012-04-19 Yao Qi <yao@codesourcery.com>
14902
14903 * remote-utils.c (prepare_resume_reply): Replace with macro
14904 target_core_of_thread.
14905 * server.c (handle_qxfer_threads_proper): Likewise.
14906 * target.h (traget_core_of_thread): New macro.
14907
14908 2012-04-18 Pedro Alves <palves@redhat.com>
14909
14910 * aclocal.m4: Regenerate.
14911 * configure: Regenerate.
14912
14913 2012-04-16 Yao Qi <yao@codesourcery.com>
14914
14915 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14916 duplicated on address.
14917
14918 2012-04-16 Yao Qi <yao@codesourcery.com>
14919
14920 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14921 (struct tracepoint_action_ops) <send>: New field.
14922 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14923 (agent_expr_send, x_tracepoint_action_send): New.
14924 (l_tracepoint_action_send): New.
14925 (cmd_qtdp): Download and install tracepoint
14926 according to `use_agent'.
14927 (run_inferior_command): Add one more parameter `len'.
14928 Update callers.
14929 (tracepoint_send_agent): New.
14930 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14931
14932 2012-04-16 Yao Qi <yao@codesourcery.com>
14933
14934 * tracepoint.c (download_tracepoints): Moved to ...
14935 (cmd_qtstart): ... here.
14936
14937 2012-04-14 Yao Qi <yao@codesourcery.com>
14938
14939 * tracepoint.c: Include inttypes.h.
14940 (struct collect_memory_action): Use sized types.
14941 (struct tracepoint): Likewise.
14942 (cmd_qtdp, stop_tracing): Update print specifiers.
14943 (cmd_qtp, response_tracepoint): Likewise.
14944 (collect_data_at_tracepoint): Likewise.
14945 (collect_data_at_step): Likewise.
14946
14947 2012-04-14 Yao Qi <yao@codesourcery.com>
14948
14949 Import gnulib module inttypes.
14950 * aclocal.m4, config.in, configure: Regenerated.
14951
14952 2012-04-14 Yao Qi <yao@codesourcery.com>
14953
14954 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14955 Makefile and config.status at last.
14956
14957 2012-04-13 Yao Qi <yao@codesourcery.com>
14958
14959 * tracepoint.c: Include stdint.h unconditionally.
14960
14961 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14962
14963 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14964 on BFD_HAVE_SYS_PROCFS_TYPE.
14965 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14966 * configure: Regenerate.
14967 * config.in: Likewise.
14968
14969 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14970
14971 * Makefile.in (clean): Also remove x32.c x32-linux.c
14972 x32-avx.c x32-avx-linux.c.
14973 (x32.o): New target.
14974 (x32.c): Likewise.
14975 (x32-linux.o): Likewise.
14976 (x32-linux.c): Likewise.
14977 (x32-avx.o): Likewise.
14978 (x32-avx.c): Likewise.
14979 (x32-avx-linux.o): Likewise.
14980 (x32-avx-linux.c): Likewise.
14981
14982 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14983 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14984 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14985 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14986 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14987 i386/x32-avx-linux.xml.
14988
14989 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14990 (init_registers_x32_avx_linux): Likwise.
14991 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14992 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14993
14994 2012-04-13 Pedro Alves <palves@redhat.com>
14995
14996 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14997 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14998 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14999 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15000 the sub-make.
15001
15002 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15003
15004 * linux-x86-low.c (compat_x32_clock_t): New.
15005 (compat_x32_siginfo_t): Likewise.
15006 (compat_x32_siginfo_from_siginfo): Likewise.
15007 (siginfo_from_compat_x32_siginfo): Likewise.
15008 (linux_is_elf64): Likewise.
15009 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15010 and siginfo_from_compat_x32_siginfo for x32.
15011 (x86_arch_setup): Set linux_is_elf64.
15012
15013 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15014
15015 PR gdb/13969
15016 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15017 e_machine field.
15018 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15019 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15020 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15021 compatible with process.
15022
15023 2012-04-12 Yao Qi <yao@codesourcery.com>
15024
15025 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15026 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15027 (install-only, install-info, clean): Handle sub dir gnulib.
15028 (all-lib, am--refresh): New targets.
15029 (memmem.o): Remove target.
15030 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15031 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15032 (AC_REPLACE_FUNCS): Remove memmem.
15033 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15034 (AC_OUTPUT): Generate Makefile in gnulib/.
15035 * aclocal.m4, config.in, configure: Regenerated.
15036
15037 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15038
15039 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15040
15041 2012-04-05 Pedro Alves <palves@redhat.com>
15042
15043 -Werror=strict-aliasing
15044
15045 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15046 pointer.
15047
15048 2012-04-04 Pedro Alves <palves@redhat.com>
15049
15050 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15051 (sparc_store_gregset_from_stack, sparc_store_gregset)
15052 (sparc_breakpoint_at): Fix formatting.
15053
15054 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15055
15056 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15057 are available.
15058 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15059 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15060 * config.in: Regenerate.
15061 * configure: Likewise.
15062
15063 2012-03-29 Pedro Alves <palves@redhat.com>
15064
15065 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15066 Correct ptrace arguments.
15067
15068 2012-03-28 Pedro Alves <palves@redhat.com>
15069
15070 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15071 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15072 (IA64_FR1_REGNUM): New defines.
15073 (ia64_fetch_register): New.
15074 (the_low_target): Install it.
15075 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15076 field.
15077 * linux-low.c (linux_fetch_registers): Try the
15078 the_low_target.fetch_register hook first.
15079
15080 * linux-arm-low.c (the_low_target): Adjust.
15081 * linux-bfin-low.c (the_low_target): Adjust.
15082 * linux-cris-low.c (the_low_target): Adjust.
15083 * linux-crisv32-low.c (the_low_target): Adjust.
15084 * linux-m32r-low.c (the_low_target): Adjust.
15085 * linux-m68k-low.c (the_low_target): Adjust.
15086 * linux-mips-low.c (the_low_target): Adjust.
15087 * linux-ppc-low.c (the_low_target): Adjust.
15088 * linux-s390-low.c (the_low_target): Adjust.
15089 * linux-sh-low.c (the_low_target): Adjust.
15090 * linux-sparc-low.c (the_low_target): Adjust.
15091 * linux-tic6x-low.c (the_low_target): Adjust.
15092 * linux-x86-low.c (the_low_target): Adjust.
15093 * linux-xtensa-low.c (the_low_target): Adjust.
15094
15095 2012-03-26 Pedro Alves <palves@redhat.com>
15096
15097 * server.c (handle_qxfer_libraries): Don't bail early if
15098 the_target->qxfer_libraries_svr4 is not NULL.
15099
15100 2012-03-26 Pedro Alves <palves@redhat.com>
15101
15102 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15103
15104 2012-03-23 Pedro Alves <palves@redhat.com>
15105
15106 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15107 "library-list-svr4" element's start tag when the the DSO list is
15108 empty.
15109
15110 2012-03-23 Pedro Alves <palves@redhat.com>
15111
15112 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15113 a variable whose type size is the same as the inferior's pointer
15114 size.
15115
15116 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15117
15118 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15119 struct siginfo.
15120 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15121 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15122 * linux-low.h: Include <signal.h>.
15123 (struct siginfo): Remove forward declaration.
15124 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15125 struct siginfo.
15126
15127 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15128
15129 * .gitignore: Ignore more files.
15130
15131 2012-03-19 Pedro Alves <palves@redhat.com>
15132 Jan Kratochvil <jan.kratochvil@redhat.com>
15133
15134 * server.c (cont_thread, general_thread): Add describing comments.
15135 (start_inferior): Clear `cont_thread'.
15136 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15137 of a process.
15138
15139 2012-03-15 Yao Qi <yao@codesourcery.com>
15140
15141 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15142 handling to ...
15143 (cmd_qtdp): ... here.
15144
15145 2012-03-15 Yao Qi <yao@codesourcery.com>
15146
15147 * tracepoint.c (struct tracepoint_action_ops): New.
15148 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15149 (m_tracepoint_action_download): New.
15150 (r_tracepoint_action_download): New.
15151 (x_tracepoint_action_download): New.
15152 (l_tracepoint_action_download): New.
15153 (add_tracepoint_action): Install `action->ops' according type.
15154 (download_tracepoint_1): Move code `download' function pointer
15155 of various tracepoint_action_ops.
15156
15157 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15158
15159 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15160 linux_ptrace_attach_warnings.
15161
15162 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15163
15164 * Makefile.in (linux-ptrace.o): New.
15165 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15166 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15167 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15168 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15169 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15170 of these targets.
15171 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15172
15173 2012-03-08 Yao Qi <yao@codesourcery.com>
15174 Pedro Alves <palves@redhat.com>
15175
15176 Fix PR server/13392.
15177 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15178 offset of JMP insn.
15179 * tracepoint.c (remove_tracepoint): New.
15180 (cmd_qtdp): Call remove_tracepoint when failed to install.
15181
15182 2012-03-07 Pedro Alves <palves@redhat.com>
15183
15184 * linux-low.c (get_detach_signal): New.
15185 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15186 Pass on pending signals to PTRACE_DETACH. Check the result of the
15187 ptrace call.
15188 * server.c (program_signals, program_signals_p): New.
15189 (handle_general_set): Handle QProgramSignals.
15190 * server.h (program_signals, program_signals_p): Declare.
15191
15192 2012-03-05 Pedro Alves <palves@redhat.com>
15193 Jan Kratochvil <jan.kratochvil@redhat.com>
15194
15195 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15196 New comment why.
15197
15198 2012-03-03 Yao Qi <yao@codesourcery.com>
15199
15200 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15201 agent_look_up_symbols.
15202
15203 2012-03-03 Yao Qi <yao@codesourcery.com>
15204
15205 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15206 (linux-x86-low.o): Likewise.
15207 * server.h: Remove in_process_agent_loaded.
15208 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15209 common/agent.c.
15210 Update callers.
15211
15212 2012-03-03 Yao Qi <yao@codesourcery.com>
15213
15214 * tracepoint.c (gdb_agent_capability): New global.
15215 (in_process_agent_loaded_ust): Renamed to
15216 `in_process_agent_supports_ust'.
15217 Update callers.
15218 (in_process_agent_supports_ust): Call agent_capability_check.
15219 (clear_installed_tracepoints): Assert that agent supports
15220 agent.
15221
15222 2012-03-03 Yao Qi <yao@codesourcery.com>
15223
15224 * linux-low.c (linux_supports_agent): New.
15225 (linux_target_ops): Initialize field `supports_agent' with
15226 linux_supports_agent.
15227 * target.h (struct target_ops) <supports_agent>: New.
15228 (target_supports_agent): New macro.
15229 * server.c (handle_general_set): Handle packet 'QAgent'.
15230 (handle_query): Send `QAgent+'.
15231 * Makefile.in (server.o): Depends on agent.h.
15232
15233 2012-03-03 Yao Qi <yao@codesourcery.com>
15234
15235 * Makefile.in (OBS): Add agent.o.
15236 Add new rule for agent.o.
15237 Track dependence of tracepoint.c on agent.h.
15238 * tracepoint.c (run_inferior_command_1):
15239 (run_inferior_command): Call agent_run_command.
15240 (gdb_ust_connect_sync_socket): Deleted. Move it to
15241 common/agent.c.
15242 (resume_thread, stop_thread): Likewise.
15243 (gdb_ust_socket_init): Renamed to ...
15244 (gdb_agent_socket_init): ... New.
15245 (gdb_ust_thread): Renamed to ...
15246 (gdb_agent_helper_thread): ... New.
15247 (gdb_ust_init): Move some code to ...
15248 (gdb_agent_init): ... here. New.
15249 [HAVE_UST]: Call gdb_ust_init.
15250 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15251 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15252 * config.in, configure: Regenerated.
15253
15254 2012-03-02 Pedro Alves <palves@redhat.com>
15255
15256 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15257 * linux-low.c (struct simple_pid_list): New.
15258 (stopped_pids): New a struct simple_pid_list pointer.
15259 (add_to_pid_list, pull_pid_from_list): New.
15260 (handle_extended_wait): Don't assume the first signal new children
15261 report is SIGSTOP. Adjust call to pull_pid_from_list.
15262 (linux_wait_for_lwp): Adjust.
15263
15264 2012-03-02 Yao Qi <yao@codesourcery.com>
15265
15266 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15267 debug log.
15268
15269 2012-03-02 Yao Qi <yao@codesourcery.com>
15270
15271 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15272 `stop_pc' and `tpoint'. Update caller.
15273
15274 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15275
15276 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15277 * linux-low.c (use_linux_regsets): New macro.
15278 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15279 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15280 (linux_register_in_regsets): New function.
15281 (usr_fetch_inferior_registers): Skip registers covered by
15282 regsets.
15283 (usr_store_inferior_registers): Likewise.
15284 (usr_fetch_inferior_registers): New macro.
15285 (usr_store_inferior_registers): Likewise.
15286 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15287 (linux_store_registers): Likewise.
15288 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15289 prototype.
15290 (init_registers_mips64_dsp_linux): Likewise.
15291 (init_registers_mips_linux): New macro.
15292 (init_registers_mips_dsp_linux): Likewise.
15293 (mips_dsp_num_regs): Likewise.
15294 (DSP_BASE, DSP_CONTROL): New fallback macros.
15295 (mips_base_regs): New macro.
15296 (mips_regmap): Use it. Fix the size.
15297 (mips_dsp_regmap): New variable.
15298 (mips_dsp_regset_bitmap): Likewise.
15299 (mips_arch_setup): New function.
15300 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15301 than mips_regmap.
15302 (mips_cannot_store_register): Likewise.
15303 (the_low_target): Update .arch_setup, .num_regs and .regmap
15304 initializers. Add .regset_bitmap initializer.
15305 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15306 initializer.
15307 * linux-bfin-low.c (the_low_target): Likewise.
15308 * linux-cris-low.c (the_low_target): Likewise.
15309 * linux-crisv32-low.c (the_low_target): Likewise.
15310 * linux-ia64-low.c (the_low_target): Likewise.
15311 * linux-m32r-low.c (the_low_target): Likewise.
15312 * linux-m68k-low.c (the_low_target): Likewise.
15313 * linux-ppc-low.c (the_low_target): Likewise.
15314 * linux-s390-low.c (the_low_target): Likewise.
15315 * linux-sh-low.c (the_low_target): Likewise.
15316 * linux-sparc-low.c (the_low_target): Likewise.
15317 * linux-tic6x-low.c (the_low_target): Likewise.
15318 * linux-x86-low.c (the_low_target): Likewise.
15319 * linux-xtensa-low.c (the_low_target): Likewise.
15320 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15321 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15322 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15323 srv_xmlfiles.
15324 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15325 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15326
15327 2012-02-29 Yao Qi <yao@codesourcery.com>
15328 Pedro Alves <palves@redhat.com>
15329
15330 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15331 `step_over_finished' is true.
15332
15333 2012-02-27 Pedro Alves <palves@redhat.com>
15334
15335 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15336 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15337
15338 2012-02-27 Pedro Alves <palves@redhat.com>
15339
15340 PR server/9684
15341 * linux-low.c (pid_is_stopped): New.
15342 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15343
15344 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15345
15346 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15347 of conditions.
15348
15349 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15350
15351 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15352
15353 2012-02-24 Luis Machado <lgustavo@codesourcery>
15354
15355 * server.c (handle_query): Advertise support for target-side
15356 breakpoint condition evaluation.
15357 (process_point_options): New function.
15358 (process_serial_event): When inserting a breakpoint, check for
15359 a target-side condition that should be evaluated.
15360
15361 * mem-break.c: Include regcache.h and ax.h.
15362 (point_cond_list_t): New data structure.
15363 (breakpoint) <cond_list>: New field.
15364 (find_gdb_breakpoint_at): Make non-static.
15365 (delete_gdb_breakpoint_at): Clear any target-side
15366 conditions.
15367 (clear_gdb_breakpoint_conditions): New function.
15368 (add_condition_to_breakpoint): Likewise.
15369 (add_breakpoint_condition): Likewise.
15370 (gdb_condition_true_at_breakpoint): Likewise.
15371 (gdb_breakpoint_here): Return result directly instead
15372 of going through a local variable.
15373
15374 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15375 (clear_gdb_breakpoint_conditions): Likewise.
15376 (add_breakpoint_condition): Likewise.
15377 (gdb_condition_true_at_breakpoint): Likewise.
15378
15379 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15380 (need_step_over_p): Take target-side breakpoint condition into
15381 consideration.
15382
15383 2012-02-24 Luis Machado <lgustavo@codesourcery>
15384
15385 * server.h: Include tracepoint.h.
15386 (agent_mem_read, agent_get_trace_state_variable_value,
15387 agent_set_trace_state_variable_value,
15388 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15389 get_set_tsv_func_addr): New prototypes.
15390
15391 * ax.h: New include file.
15392 * ax.c: New source file.
15393
15394 * tracepoint.c: Include ax.h.
15395 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15396 agent_expr, eval_result_type): Move to ax.h.
15397 (parse_agent_expr): Rename to ...
15398 (gdb_parse_agent_expr): ... this, make it non-static and move
15399 to ax.h.
15400 (unparse_agent_expr) Rename to ...
15401 (gdb_unparse_agent_expr): ... this, make it non-static and move
15402 to ax.h.
15403 (eval_agent_expr): Rename to ...
15404 (eval_tracepoint_agent_expr): ... this.
15405 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15406 forward declarations.
15407 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15408 (agent_get_trace_state_variable_value): New function.
15409 (agent_set_trace_state_variable_value): New function.
15410 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15411 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15412 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15413 (condition_true_at_tracepoint): Likewise.
15414 (parse_agent_expr): Rename to ...
15415 (gdb_parse_agent_expr): ... this and move to ax.c.
15416 (unparse_agent_expr): Rename to ...
15417 (gdb_unparse_agent_expr): ... this and move to ax.c.
15418 (gdb_agent_op_name): Move to ax.c.
15419 (eval_agent_expr): Rename to ...
15420 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15421 and move to ax.c.
15422 (eval_tracepoint_agent_expr): New function.
15423 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15424 non-static.
15425 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15426 ax.c.
15427 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15428 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15429 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15430 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15431 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15432 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15433 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15434 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15435 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15436 (compile_bytecodes): Remove forward declaration.
15437 (is_goto_target): Move to ax.c.
15438 (compile_bytecodes): Move to ax.c and call
15439 agent_get_trace_state_variable_value (...) and
15440 agent_set_trace_state_variable_value (...).
15441
15442 * Makefile.in: Update ax.c and IPA dependencies.
15443
15444 2012-02-24 Pedro Alves <palves@redhat.com>
15445
15446 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15447 (cmd_bigqtbuffer_circular): ... this. Only handle
15448 'QTBuffer:circular:'.
15449 (handle_tracepoint_general_set): Adjust.
15450
15451 2012-02-16 Yao Qi <yao@codesourcery.com>
15452
15453 * inferiors.c: Move code to ...
15454 * dll.c: .... here. New.
15455 * server.h: Declare clear_dlls.
15456 * Makefile.in (SFILES): Add dll.c.
15457 (OBS): Add dll.o
15458 (dll.o): New rule.
15459
15460 2012-02-11 Yao Qi <yao@codesourcery.com>
15461
15462 * server.c: (handle_monitor_command): Add a new parameter
15463 `own_buf'.
15464 (handle_query): Update caller.
15465
15466 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15467
15468 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15469 * configure, config.in: Regenerate.
15470 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15471 is not defined.
15472
15473 2012-02-02 Pedro Alves <palves@redhat.com>
15474
15475 Try SIGKILL first, then PTRACE_KILL.
15476 * linux-low.c (linux_kill_one_lwp): New.
15477 (linux_kill_one_lwp): Rename to ...
15478 (kill_one_lwp_callback): ... this. Use the new
15479 linux_kill_one_lwp.
15480
15481 2012-02-02 Pedro Alves <palves@redhat.com>
15482
15483 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15484 inferior.
15485
15486 2012-01-27 Pedro Alves <palves@redhat.com>
15487
15488 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15489 (elf_64_file_p): Make static.
15490 (linux_pid_exe_is_elf_64_file): New.
15491 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15492 Delete declarations.
15493 (linux_pid_exe_is_elf_64_file): Declare.
15494 * linux-x86-low.c (x86_arch_setup): Use
15495 linux_pid_exe_is_elf_64_file.
15496
15497 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15498
15499 * linux-low.c (linux_wait_for_event_1): Rename to ...
15500 (linux_wait_for_event): ... here and merge it with former
15501 linux_wait_for_event - new variable wait_ptid, use it.
15502 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15503
15504 2012-01-23 Pedro Alves <palves@redhat.com>
15505
15506 * server.c (main): Avoid yet another case of infinite loop while
15507 detaching/killing after a longjmp.
15508
15509 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15510
15511 Code cleanup.
15512 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15513
15514 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15515
15516 * hostio.c (handle_readlink): New function.
15517 (handle_vFile): Call it to handle "vFile:readlink" packets.
15518
15519 2012-01-20 Pedro Alves <palves@redhat.com>
15520 Ulrich Weigand <ulrich.weigand@linaro.org>
15521
15522 * server.c (handle_v_requests): Only support vAttach and vRun to
15523 start multiple processes when in extended protocol mode.
15524
15525 2012-01-17 Pedro Alves <palves@redhat.com>
15526
15527 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15528 memalign plus mprotect to allocate the scratch buffer.
15529
15530 2012-01-13 Pedro Alves <palves@redhat.com>
15531
15532 * server.c (attach_inferior): Clear `cont_thread'.
15533
15534 2012-01-13 Pedro Alves <palves@redhat.com>
15535
15536 * server.c (main): Avoid infinite loop while detaching/killing
15537 after a longjmp.
15538
15539 2012-01-09 Doug Evans <dje@google.com>
15540
15541 * server.c (start_inferior): Set last_ptid in --wrapper case.
15542
15543 2012-01-06 Yao Qi <yao@codesourcery.com>
15544
15545 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15546 defined.
15547 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15548
15549 2012-01-04 Yao Qi <yao@codesourcery.com>
15550
15551 * tracepoint.c (cmd_qtdp): Print debug message
15552 for static tracepoint.
15553
15554 2012-01-04 Yao Qi <yao@codesourcery.com>
15555
15556 * tracepoint.c (trace_vdebug): Differentiate debug message
15557 between gdbserver and IPA.
15558
15559 2012-01-03 Yao Qi <yao@codesourcery.com>
15560
15561 * tracepoint.c (tracepoint_was_hit): Don't collect for
15562 static tracepoint.
15563
15564 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15565
15566 * terminal.h: Reformat copyright header.
15567
15568 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15569
15570 * server.c (gdbserver_version): Update copyright year.
15571 * gdbreplay.c (gdbreplay_version): Likewise.
15572
15573 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15574
15575 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15576
15577 Revert:
15578 2011-12-18 Hui Zhu <teawater@gmail.com>
15579 * linux-low.c (linux_create_inferior): Save return value to ret.
15580
15581 2011-12-18 Hui Zhu <teawater@gmail.com>
15582
15583 * linux-low.c (linux_create_inferior): Save return value to ret.
15584
15585 2011-12-16 Doug Evans <dje@google.com>
15586
15587 * linux-low.c (linux_create_inferior): If stdio connection,
15588 redirect stdin from /dev/null, stdout to stderr.
15589 * remote-utils.c (remote_is_stdio): New static global.
15590 (remote_connection_is_stdio): New function.
15591 (remote_prepare): Handle stdio connection.
15592 (remote_open): Ditto.
15593 (remote_close): Don't close stdin for stdio connections.
15594 (read_prim,write_prim): New functions. Replace all calls to
15595 read/write to these.
15596 * server.c (main): Watch for "-" argument. Move call to
15597 remote_prepare before start_inferior.
15598 * server.h (STDIO_CONNECTION_NAME): New macro.
15599 (remote_connection_is_stdio): Declare.
15600
15601 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15602 in debugging output.
15603
15604 2011-12-15 Yao Qi <yao@codesourcery.com>
15605
15606 * tracepoint.c: Include sys/syscall.h.
15607 (gdb_ust_thread): Remove preprocessor conditional.
15608
15609 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15610
15611 * linux-low.c (linux_detach_one_lwp): Call
15612 the_low_target.prepare_to_resume before detaching.
15613
15614 2011-12-14 Yao Qi <yao@codesourcery.com>
15615
15616 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15617 of write.
15618
15619 2011-12-14 Yao Qi <yao@codesourcery.com>
15620
15621 * i386-low.c (i386_low_stopped_data_address): Initialize local
15622 variable `control'.
15623
15624 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15625
15626 PR remote/13492
15627
15628 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15629 DR_CONTROL unless necessary. Extend comments.
15630 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15631 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15632
15633 2011-12-13 Yao Qi <yao@codesourcery.com>
15634
15635 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15636 macros.
15637 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15638
15639 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15640
15641 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15642 Print new debug message for such case.
15643
15644 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15645
15646 Fix overlapping memcpy.
15647 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15648 the read_inferior_memory transfer.
15649 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15650 write_inferior_memory transfer.
15651 (set_fast_tracepoint_jump): New variable buf. Use it for the
15652 read_inferior_memory and write_inferior_memory transfers.
15653 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15654 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15655 Use it for the write_inferior_memory transfer.
15656 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15657 buffers.
15658
15659 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15660
15661 * linux-low.c (fetch_register, store_register): Make code
15662 consistent, fix formatting.
15663
15664 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15665
15666 * linux-low.c (usr_store_inferior_registers): Factor out code
15667 to handle individual registers into...
15668 (store_register): ... this new function.
15669
15670 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15671
15672 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15673 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15674 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15675 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15676 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15677 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15678 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15679 (srv_xmlfiles): Add new XML files.
15680
15681 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15682 and <sys/uio.h>.
15683 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15684 (init_registers_s390_linux32v1): Add prototype.
15685 (init_registers_s390_linux32v2): Likewise.
15686 (init_registers_s390_linux64v1): Likewise.
15687 (init_registers_s390_linux64v2): Likewise.
15688 (init_registers_s390x_linux64v1): Likewise.
15689 (init_registers_s390x_linux64v2): Likewise.
15690 (s390_num_regs): Increment to 52.
15691 (s390_regmap): Add orig_r2 register.
15692 (s390_num_regs_3264): Increment to 68.
15693 (s390_regmap_3264): Add orig_r2 register.
15694 (s390_collect_ptrace_register): Handle orig_r2 register.
15695 (s390_supply_ptrace_register): Likewise.
15696 (s390_fill_last_break): New function.
15697 (s390_store_last_break): Likewise.
15698 (s390_fill_system_call): New function.
15699 (s390_store_system_call): Likewise.
15700 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15701 register sets.
15702 (s390_check_regset): New function.
15703 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15704 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15705 Update target_regsets for available register sets.
15706
15707 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15708 Jan Kratochvil <jan.kratochvil@redhat.com>
15709
15710 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15711 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15712 New.
15713 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15714 * linux-low.h (struct process_info_private): New member r_debug.
15715 * server.c (handle_qxfer_libraries): Call
15716 the_target->qxfer_libraries_svr4.
15717 (handle_qxfer_libraries_svr4): New function.
15718 (qxfer_packets): New entry "libraries-svr4".
15719 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15720 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15721 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15722 PACKET_qXfer_libraries_svr4.
15723
15724 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15725
15726 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15727 PSW address/mask between 8-byte and 16-byte formats.
15728 (s390_supply_ptrace_register): Likewise.
15729 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15730 basic addressing mode bit.
15731
15732 2011-11-24 Stan Shebs <stan@codesourcery.com>
15733
15734 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15735
15736 2011-11-17 Stan Shebs <stan@codesourcery.com>
15737
15738 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15739 (tracing_start_time): New global.
15740 (tracing_stop_time): New global.
15741 (tracing_user_name): New global.
15742 (tracing_notes): New global.
15743 (tracing_stop_note): New global.
15744 (cmd_qtstart): Set traceframe_usage, start_time.
15745 (stop_tracing): Set stop_time.
15746 (cmd_qtstatus): Report additional status.
15747 (cmd_qtp): New function.
15748 (handle_tracepoint_query): Call it.
15749 (cmd_qtnotes): New function.
15750 (handle_tracepoint_general_set): Call it.
15751 (get_timestamp): Rename from tsv_get_timestamp.
15752
15753 2011-11-14 Stan Shebs <stan@codesourcery.com>
15754 Kwok Cheung Yeung <kcy@codesourcery.com>
15755
15756 * linux-x86-low.c (small_jump_insn): New.
15757 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15758 trampoline and error message, build a trampoline and issue a small
15759 jump instruction to it.
15760 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15761 trampoline and error message.
15762 (x86_get_min_fast_tracepoint_insn_len): New.
15763 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15764 * linux-low.h (struct linux_target_ops): Add arguments to
15765 install_fast_tracepoint_jump_pad operation, add new operation.
15766 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15767 arguments.
15768 (linux_get_min_fast_tracepoint_insn_len): New function.
15769 (linux_target_op): Add new operation.
15770 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15771 (gdb_trampoline_buffer_end): Ditto.
15772 (gdb_trampoline_buffer_error): Ditto.
15773 (struct ipa_sym_addresses): Add fields for new IPA variables.
15774 (symbol_list): Add entries for new IPA variables.
15775 (struct tracepoint): Add fields to hold the address range of the
15776 trampoline used by the tracepoint.
15777 (trampoline_buffer_head): New static variable.
15778 (trampoline_buffer_tail): Ditto.
15779 (claim_trampoline_space): New function.
15780 (have_fast_tracepoint_trampoline_buffer): New function.
15781 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15782 structure.
15783 (install_fast_tracepoint): Ditto, also add error buffer argument.
15784 (cmd_qtminftpilen): New function.
15785 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15786 (fast_tracepoint_from_trampoline_address): New function.
15787 (fast_tracepoint_collecting): Handle trampoline as part of jump
15788 pad space.
15789 (set_trampoline_buffer_space): New function.
15790 (initialize_tracepoint): Initialize new IPA variables.
15791 * target.h (struct target_ops): Add arguments to
15792 install_fast_tracepoint_jump_pad operation, add new
15793 get_min_fast_tracepoint_insn_len operation.
15794 (target_get_min_fast_tracepoint_insn_len): New.
15795 (install_fast_tracepoint_jump_pad): Add arguments.
15796 * server.h (IPA_BUFSIZ): Define.
15797 * linux-i386-ipa.c: Include extra header files.
15798 (initialize_fast_tracepoint_trampoline_buffer): New function.
15799 (initialize_low_tracepoint): Call it.
15800 * server.h (set_trampoline_buffer_space): Declare.
15801 (claim_trampoline_space): Ditto.
15802 (have_fast_tracepoint_trampoline_buffer): Ditto.
15803
15804 2011-11-14 Yao Qi <yao@codesourcery.com>
15805
15806 * server.c (handle_query): Handle InstallInTrace for qSupported.
15807 * tracepoint.c (add_tracepoint): Sort list.
15808 (install_tracepoint, download_tracepoint): New.
15809 (cmd_qtdp): Call them to install and download tracepoints.
15810 (sort_tracepoints): Removed.
15811 (cmd_qtstart): Update.
15812
15813 2011-11-14 Yao Qi <yao@codesourcery.com>
15814
15815 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15816 * mem-break.h: Declare.
15817 * tracepoint.c (cmd_qtstart): Move some code to ...
15818 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15819 New.
15820 (download_tracepoints): Move some code to ...
15821 (download_tracepoint_1): ... here. New.
15822
15823 2011-11-08 Yao Qi <yao@codesourcery.com>
15824
15825 * remote-utils.c (relocate_instruction): A comment fix.
15826
15827 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15828
15829 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15830 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15831 dr_status_mirror and dr_control_mirror from debug_reg_state.
15832 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15833 (i386_initial_stuff): Remove use of deleted globals.
15834 (i386_get_thread_context, i386_set_thread_context,
15835 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15836 from debug_reg_state.
15837
15838 2011-11-05 Yao Qi <yao@codesourcery.com>
15839
15840 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15841 address as TPOINT's.
15842
15843 2011-11-02 Stan Shebs <stan@codesourcery.com>
15844
15845 * tracepoint.c (agent_mem_read_string): New function.
15846 (eval_agent_expr): Call it for tracenz.
15847 * server.c (handle_query): Report support for tracenz.
15848
15849 2011-11-02 Yao Qi <yao@codesourcery.com>
15850
15851 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15852
15853 2011-11-02 Yao Qi <yao@codesourcery.com>
15854
15855 * target.h: Fix a typo in comment.
15856
15857 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15858
15859 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15860 clobber the breakpoints' shadows with fast tracepoint jumps.
15861 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15862 * target.c (write_inferior_memory): Also pass MYADDR down to
15863 check_mem_write.
15864
15865 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15866
15867 * configure.ac: Check support for personality routine.
15868 * configure: Regenerate.
15869 * config.in: Likewise.
15870 * linux-low.c: Include <sys/personality.h>.
15871 Define ADDR_NO_RANDOMIZE if necessary.
15872 (linux_create_inferior): Disable address space randomization when
15873 forking inferior, if requested.
15874 (linux_supports_disable_randomization): New function.
15875 (linux_target_ops): Install it.
15876 * server.h (disable_randomization): Declare.
15877 * server.c (disable_randomization): New global variable.
15878 (handle_general_set): Handle QDisableRandomization.
15879 (handle_query): Likewise for qSupported.
15880 (main): Support --disable-randomization and --no-disable-randomization
15881 command line arguments.
15882 * target.h (struct target_ops): Add supports_disable_randomization.
15883 (target_supports_disable_randomization): New macro.
15884
15885 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15886
15887 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15888 ifdef check.
15889 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15890 [!PT_GETDSBT] (target_loadmap): New definition.
15891 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15892 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15893 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15894 and PT_GETDSBT to LINUX_LOADMAP.
15895 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15896 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15897
15898 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15899
15900 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15901 (arm_linux_hwbp_cap): New static variable.
15902 (arm_linux_get_hwbp_cap): Replace by ...
15903 (arm_linux_init_hwbp_cap): ... this new function.
15904 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15905 (arm_linux_get_hw_watchpoint_count): Likewise.
15906 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15907 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15908 (arm_prepare_to_resume): Use perror_with_name instead of error.
15909
15910 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15911
15912 * linux-arm-low.c: Include <signal.h>.
15913 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15914 (struct arm_linux_hwbp_cap): New data type.
15915 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15916 (struct arm_linux_hw_breakpoint): New data type.
15917 (MAX_BPTS, MAX_WPTS): Define.
15918 (struct arch_process_info, struct arch_lwp_info): New data types.
15919 (arm_linux_get_hwbp_cap): New function.
15920 (arm_linux_get_hw_breakpoint_count): Likewise.
15921 (arm_linux_get_hw_watchpoint_count): Likewise.
15922 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15923 (arm_hwbp_control_initialize): Likewise.
15924 (arm_hwbp_control_is_enabled): Likewise.
15925 (arm_hwbp_control_is_initialized): Likewise.
15926 (arm_hwbp_control_disable): Likewise.
15927 (arm_linux_hw_breakpoint_equal): Likewise.
15928 (arm_linux_hw_point_initialize): Likewise.
15929 (struct update_registers_data): New data structure.
15930 (update_registers_callback: New function.
15931 (arm_insert_point): Likewise.
15932 (arm_remove_point): Likewise.
15933 (arm_stopped_by_watchpoint): Likewise.
15934 (arm_stopped_data_address): Likewise.
15935 (arm_new_process): Likewise.
15936 (arm_new_thread): Likewise.
15937 (arm_prepare_to_resume): Likewise.
15938 (the_low_target): Register arm_insert_point, arm_remove_point,
15939 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15940 arm_new_thread, and arm_prepare_to_resume.
15941
15942 2011-09-15 Stan Shebs <stan@codesourcery.com>
15943
15944 * server.h (struct emit_ops): Add compare-goto fields.
15945 * tracepoint.c (gdb_agent_op_sizes): New table.
15946 (emit_eq_goto): New function.
15947 (emit_ne_goto): New function.
15948 (emit_lt_goto): New function.
15949 (emit_le_goto): New function.
15950 (emit_gt_goto): New function.
15951 (emit_ge_goto): New function.
15952 (is_goto_target): New function.
15953 (compile_bytecodes): Recognize special cases of compare-goto
15954 combinations and call specialized emitters for them.
15955 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15956 (amd64_emit_ne_goto): New function.
15957 (amd64_emit_lt_goto): New function.
15958 (amd64_emit_le_goto): New function.
15959 (amd64_emit_gt_goto): New function.
15960 (amd64_emit_ge_goto): New function.
15961 (amd64_emit_ops): Add the new functions.
15962 (i386_emit_eq_goto): New function.
15963 (i386_emit_ne_goto): New function.
15964 (i386_emit_lt_goto): New function.
15965 (i386_emit_le_goto): New function.
15966 (i386_emit_gt_goto): New function.
15967 (i386_emit_ge_goto): New function.
15968 (i386_emit_ops): Add the new functions.
15969
15970 2011-09-08 Stan Shebs <stan@codesourcery.com>
15971
15972 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15973 (i386_emit_epilogue): Restore %ebx.
15974
15975 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15976
15977 * server.c (step_thread): Remove definition.
15978 (process_serial_event): Don't handle Hs.
15979 * server.h (step_thread): Remove declaration.
15980 * target.c (set_desired_inferior): Remove use of step_thread.
15981
15982 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15983
15984 * linux-low.c: Include linux-procfs.h.
15985 (linux_attach_lwp_1): Update comments.
15986 (linux_attach): Scan for existing threads when attaching to a
15987 process that is the tgid.
15988 * Makefile.in: Update dependencies.
15989
15990 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15991
15992 * configure.srv: Add linux-procfs.o dependencies.
15993
15994 2011-08-14 Yao Qi <yao@codesourcery.com>
15995
15996 * target.h (struct target_ops): Fix indent.
15997 * win32-low.c (win32_target_ops): Fix comment.
15998
15999 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16000 Yao Qi <yao@codesourcery.com>
16001
16002 * Makefile.in (clean): Remove tic6x-*.c files.
16003 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16004 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16005 (tic6x-c64xp-linux.c): Likewise.
16006 * configure.srv: Add support for tic6x-*-uclinux.
16007 * linux-tic6x-low.c: New.
16008 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16009
16010 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16011 Yao Qi <yao@codesourcery.com>
16012
16013 * target.h (struct target_ops): Add read_loadmap.
16014 * linux-low.c (struct target_loadseg): New type.
16015 (struct target_loadmap): New type.
16016 (linux_read_loadmap): New function.
16017 (linux_target_ops): Add linux_read_loadmap.
16018 * server.c (handle_query): Support qXfer:fdpic:read packet.
16019 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16020 to NULL.
16021
16022 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16023
16024 * win32-low.c: Include <stdint.h>.
16025
16026 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16027
16028 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16029 to the inferior here.
16030 (i386_remove_aligned_watchpoint): Ditto.
16031 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16032 fit part of the watchpoint in the debug registers.
16033 (i386_update_inferior_debug_regs): New.
16034 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16035 registers, and only update the inferior on success.
16036 (i386_low_remove_watchpoint): Ditto.
16037
16038 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16039
16040 * linux-low.c (compare_ints, unique, list_threads, show_process,
16041 linux_core_of_thread): Delete.
16042 (linux_target_ops): Change linux_core_of_thread to
16043 linux_common_core_of_thread.
16044 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16045 * utils.c (malloc_failure): Change type of argument.
16046 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16047 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16048 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16049 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16050 (IPA_OBJS): Add common-utils-ipa.o.
16051 (ptid_h, linux_osdata_h): New macros.
16052 (server_h): Add common/common-utils.h, common/xml-utils.h,
16053 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16054 common/ptid.h.
16055 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16056 ptid.o, buffer.o): New rules.
16057 (linux-low.o): Add common/linux-osdata.h as a dependency.
16058 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16059 * configure.ac: Add AC_HEADER_DIRENT check.
16060 * config.in: Regenerate.
16061 * configure: Regenerate.
16062 * remote-utils.c (xml_escape_text): Delete.
16063 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16064 buffer_xml_printf): Move to common/buffer.c.
16065 * server.c (main): Remove call to initialize_inferiors.
16066 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16067 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16068 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16069 internal_error, gdb_assert, gdb_assert_fail): Delete.
16070 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16071 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16072 common/buffer.h.
16073 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16074 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16075 initialize_inferiors): Delete.
16076
16077 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16078
16079 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16080 symbol error.
16081
16082 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16083
16084 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16085 assertion.
16086 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16087
16088 2011-05-26 Yao Qi <yao@codesourcery.com>
16089
16090 * Makefile.in (thread-db.o): Track dependence to
16091 common/gdb_thread_db.h.
16092 * thread-db.c: include gdb_thread_db.h from right place.
16093
16094 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16095
16096 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16097 __FILE__ and __LINE__ to internal_error.
16098
16099 2011-05-13 Doug Evans <dje@google.com>
16100
16101 * thread-db.c (try_thread_db_load_from_sdir): New function.
16102 (try_thread_db_load_from_dir): New function.
16103 (thread_db_load_search): Handle $sdir, ignore $pdir.
16104 Remove trying of system directories if search of
16105 libthread-db-search-path fails, that is now done via $sdir.
16106
16107 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16108
16109 * server.c (handle_query): Add EnableDisableTracepoints to the list
16110 of supported features.
16111 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16112 tracepoints.
16113 (cmd_qtenable_disable): New.
16114 (cmd_qtstart): Install tracepoints even if disabled.
16115 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16116 receiving a QTEnable or QTDisable packet.
16117 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16118 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16119 tracepoints.
16120 (gdb_probe): Skip data collection if static tracepoint is disabled.
16121
16122 2011-05-10 Doug Evans <dje@google.com>
16123
16124 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16125
16126 2011-05-04 Doug Evans <dje@google.com>
16127
16128 * linux-low.c (linux_join): Skip process lookup.
16129 * spu-low.c (spu_join): Ditto.
16130 * server.c (join_inferiors_callback): Delete.
16131 (process_serial_event): For 'D' packet (detach) call join_inferior
16132 directly.
16133
16134 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16135
16136 * README: Don't mention xscale*-*-linux*.
16137 * configure.srv (xscale*-*-linux*): Don't handle target.
16138
16139 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16140
16141 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16142 casting pointers.
16143 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16144 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16145 (i386_emit_void_call_2): Likewise.
16146
16147 2011-04-26 Yao Qi <yao@codesourcery.com>
16148
16149 * linux-low.c: Move common macros to linux-ptrace.h.
16150 Include linux-ptrace.h.
16151 * Makefile.in (linux_ptrace_h): New.
16152 (linux-low.o): Depends on linux-ptrace.h.
16153
16154 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16155
16156 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16157 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16158 (remote_prepare): New function with most of the TCP code from ...
16159 (remote_open): ... here. Detect PORT here unconditionally. Move also
16160 setting transport_is_reliable.
16161 * server.c (run_once): New variable.
16162 (gdbserver_usage): Document it.
16163 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16164 the first run if RUN_ONCE.
16165 * server.h (run_once, remote_prepare): New declarations.
16166
16167 2011-04-19 Tom Tromey <tromey@redhat.com>
16168
16169 * win32-low.c (handle_load_dll): Remove duplicate "the".
16170
16171 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16172
16173 Remove support for old Cygwin 1.5 versions.
16174 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16175 function to avoid warning.
16176 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16177 warning.
16178
16179 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16180
16181 * gdbserver/server.h (Macro _): Define it if not available.
16182
16183 2011-03-14 Michael Snyder <msnyder@vmware.com>
16184
16185 * hostio.c (handle_close): Remove unnecessary null test.
16186
16187 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16188
16189 * Makefile.in (maintainer-clean realclean distclean): Remove
16190 "make ... subdir_do" command.
16191
16192 2011-03-10 Michael Snyder <msnyder@vmware.com>
16193
16194 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16195
16196 * server.c (handle_v_run): Free alloced buffer on early return.
16197
16198 2011-03-09 Yao Qi <yao@codesourcery.com>
16199
16200 Revert:
16201 2011-03-04 Yao Qi <yao@codesourcery.com>
16202
16203 * Makefile.in: Remove GNU make feature --directory.
16204
16205 2011-03-05 Yao Qi <yao@codesourcery.com>
16206
16207 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16208 (subdir_do): New make target. Copied from gdb/Makefile.
16209 (maintainer-clean, realclean, distclean, clean): Call corresponding
16210 make targets in common/Makefile.
16211
16212 2011-02-11 Yao Qi <yao@codesourcery.com>
16213
16214 * configure.ac: Call AC_PROG_RANLIB.
16215 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16216 * configure: Regenerate.
16217
16218 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16219
16220 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16221
16222 2011-03-06 Yao Qi <yao@codesourcery.com>
16223
16224 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16225
16226 2011-03-05 Yao Qi <yao@codesourcery.com>
16227
16228 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16229 (subdir_do): New make target. Copied from gdb/Makefile.
16230 (maintainer-clean, realclean, distclean, clean): Call corresponding
16231 make targets in common/Makefile.
16232
16233 2011-03-04 Yao Qi <yao@codesourcery.com>
16234
16235 * Makefile.in: Remove GNU make feature --directory.
16236
16237 2011-03-04 Michael Snyder <msnyder@vmware.com>
16238
16239 * server.c (queue_stop_reply): Call xmalloc not malloc.
16240
16241 2011-03-02 Michael Snyder <msnyder@vmware.com>
16242
16243 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16244
16245 2011-02-28 Michael Snyder <msnyder@vmware.com>
16246
16247 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16248 (cmd_qtframe): Ditto.
16249 (cmd_qtbuffer): Ditto.
16250 (cmd_bigqtbuffer): Ditto.
16251
16252 * utils.c (decimal2str): Initialize 'width' to nine, then
16253 don't mess with it.
16254
16255 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16256
16257 * hostio.c (require_data): Free *data, not data.
16258
16259 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16260
16261 * hostio.c (require_data): Use free, not xfree.
16262
16263 2011-02-27 Michael Snyder <msnyder@vmware.com>
16264
16265 * server.c (handle_query): Discard unused value.
16266
16267 * hostio.c (require_data): Free malloc memory before returning
16268 error.
16269
16270 2011-02-26 Michael Snyder <msnyder@vmware.com>
16271
16272 * linux-low.c (list_threads): Call closedir for dirent.
16273
16274 2011-02-27 Michael Snyder <msnyder@vmware.com>
16275
16276 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16277 a case statement falls through.
16278
16279 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16280
16281 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16282 in comparison.
16283
16284 2011-02-26 Michael Snyder <msnyder@vmware.com>
16285
16286 * utils.c (decimal2str): Eliminate dead code and dead param.
16287 (pulongest): Drop dead param from call to decimal2str.
16288 (plongest): Ditto.
16289
16290 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16291
16292 Revert the following patch (not approved yet):
16293 2011-02-21 Hui Zhu <teawater@gmail.com>
16294 * tracepoint.c (tp_printf): New function.
16295 (eval_agent_expr): Handle gdb_agent_op_printf.
16296
16297 2011-02-21 Hui Zhu <teawater@gmail.com>
16298
16299 * tracepoint.c (tp_printf): New function.
16300 (eval_agent_expr): Handle gdb_agent_op_printf.
16301
16302 2011-02-18 Tom Tromey <tromey@redhat.com>
16303
16304 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16305 (tracepoint.o): Likewise.
16306 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16307 (gdb_agent_op_names): Likewise.
16308
16309 2011-02-18 Tom Tromey <tromey@redhat.com>
16310
16311 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16312 gdb_agent_op_rot>: New constants.
16313 (gdb_agent_op_names): Add pick and roll.
16314 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16315 cases.
16316
16317 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16318
16319 * aclocal.m4: Regenerated with aclocal-1.11.1.
16320
16321 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16322
16323 * server.c (handle_qxfer_traceframe_info): New.
16324 (qxfer_packets): Register "traceframe-info".
16325 (handle_query): Report support for qXfer:traceframe-info:read+.
16326 * tracepoint.c (match_blocktype): New.
16327 (traceframe_find_block_type): Rename to ...
16328 (traceframe_walk_blocks): ... this. Add callback filter argument,
16329 and use it.
16330 (traceframe_find_block_type): New, reimplemented on top of
16331 traceframe_walk_blocks.
16332 (build_traceframe_info_xml): New.
16333 (traceframe_read_info): New.
16334 * server.h (traceframe_read_info): Declare.
16335
16336 2011-02-11 Yao Qi <yao@codesourcery.com>
16337
16338 * configure.ac: Call AC_PROG_RANLIB.
16339 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16340 * configure: Regenerate.
16341
16342 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16343
16344 * server.c (gdb_read_memory): Change return semantics to allow
16345 partial transfers.
16346 (handle_search_memory_1): Adjust.
16347 (process_serial_event) <'m' packet>: Handle partial transfers.
16348 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16349
16350 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16351
16352 * regcache.c (init_register_cache): Initialize
16353 regcache->register_status.
16354 (free_register_cache): Release regcache->register_status.
16355 (regcache_cpy): Copy register_status.
16356 (registers_to_string): Print 'x's for unavailable registers.
16357 (supply_register): Mark the register's status valid or
16358 unavailable, depending on whether a buffer was passed in or not.
16359 (supply_register_zeroed): New.
16360 (supply_regblock): Mark the registers' status valid or
16361 unavailable, depending on whether a buffer was passed in or not.
16362 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16363 (struct regcache): New `register_status' field.
16364 (supply_register_zeroed): Declare.
16365 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16366 supply_register_zeroed, rather than passing a NULL buffer to
16367 supply_register.
16368 * tracepoint.c (fetch_traceframe_registers): Update comment.
16369
16370 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16371
16372 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16373 buffer explicit.
16374
16375 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16376
16377 * server.h (decode_xfer_write): Change prototype.
16378 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16379 and don't extract the annex here.
16380 * server.c (decode_xfer_read): Remove `annex' parameter,
16381 and don't extract the annex here.
16382 (decode_xfer): New.
16383 (struct qxfer): New.
16384 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16385 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16386 (handle_qxfer_statictrace): New functions, abstracted out from
16387 handle_query, and made to use the struct qxfer interface.
16388 (handle_threads_qxfer_proper): Rename to ...
16389 (handle_qxfer_threads_proper): ... this.
16390 (handle_threads_qxfer): Rename to ...
16391 (handle_qxfer_threads): ... this. Adjust.
16392 (qxfer_packets): New array.
16393 (handle_qxfer): New function.
16394 (handle_query): Use handle_qxfer.
16395
16396 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16397
16398 * gdbreplay.c: Shorten lines of >= 80 columns.
16399 * linux-low.c: Ditto.
16400 * linux-ppc-low.c: Ditto.
16401 * linux-s390-low.c: Ditto.
16402 * linux-sparc-low.c: Ditto.
16403 * linux-x86-low.c: Ditto.
16404 * linux-xtensa-low.c: Ditto.
16405 * mem-break.c: Ditto.
16406 * nto-low.c: Ditto.
16407 * regcache.h: Ditto.
16408 * remote-utils.c: Ditto.
16409 * server.c: Ditto.
16410 * server.h: Ditto.
16411 * thread-db.c: Ditto.
16412 * tracepoint.c: Ditto.
16413 * utils.c: Ditto.
16414 * win32-low.h: Ditto.
16415
16416 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16417
16418 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16419 update.
16420
16421 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16422
16423 * server.c (gdbserver_version): Update copyright year in version
16424 output.
16425 * gdbreplay.c (gdbreplay_version): Ditto.
16426
16427 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16428
16429 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16430 * linux-bfin-low.c: New file.
16431 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16432 PT_DATA_ADDR for BFIN targets.
16433 * Makefile.in (SFILES): Add linux-bfin-low.c.
16434 (clean): Remove reg-bfin.c.
16435 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16436 * README: Mention supported Blackfin targets.
16437
16438 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16439
16440 * .gitignore: New file.
16441
16442 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16443
16444 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16445
16446 2010-10-22 Jie Zhang <jie@codesourcery.com>
16447
16448 * Makefile.in: Add FLAGS_TO_PASS variable.
16449 (install): Remove dependency of install-only and recursively
16450 invoke make for install-only.
16451
16452 2010-10-04 Doug Evans <dje@google.com>
16453
16454 * Makefile.in (uninstall): Use $(DESTDIR).
16455
16456 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16457
16458 PR gdb/11842
16459
16460 * linux-x86-low.c (compat_siginfo_from_siginfo)
16461 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16462 si_code is < 0. Check for si_code == SI_TIMER before checking for
16463 si_code < 0.
16464
16465 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16466
16467 * lynx-i386-low.c: New file.
16468 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16469
16470 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16471
16472 * lynx-low.c (ptrace_request_to_str): Remove handling for
16473 request values that have been removed in LynxOS 5.x.
16474
16475 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16476
16477 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16478 <ptrace.h>
16479
16480 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16481
16482 * configure.ac: Add --enable-inprocess-agent option.
16483 * configure: Rebuilt.
16484
16485 2010-09-06 Yao Qi <yao@codesourcery.com>
16486
16487 * linux-low.c (linux_kill): Remove unused variable.
16488 (linux_stabilize_threads): Likewise.
16489 * server.c (start_inferior): Likewise.
16490 (queue_stop_reply_callback): Likewise.
16491 * tracepoint.c (do_action_at_tracepoint): Likewise.
16492
16493 2010-09-06 Yao Qi <yao@codesourcery.com>
16494
16495 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16496 on return.
16497
16498 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16499
16500 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16501
16502 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16503
16504 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16505 "$(IPA_DEPFILES)".
16506
16507 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16508
16509 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16510 gdbserver/lynx-ppc-low.c: New files.
16511 * Makefile.in (lynx_low_h): New variable.
16512 (lynx-low.o, lynx-ppc-low.o): New rules.
16513 * configure.ac: On LynxOS, link with -lnetinet.
16514 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16515 * configure: regenerate.
16516
16517 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16518
16519 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16520 * configure.ac: Add check for vasprintf and vsnprintf.
16521 * configure, config.in: Regenerate.
16522 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16523
16524 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16525
16526 * gdbreplay.c: Move include of alloca.h up, next to include of
16527 malloc.h.
16528 * server.h: Add include of malloc.h.
16529 * mem-break.c: Remove include of malloc.h.
16530 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16531
16532 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16533
16534 * Makefile.in (memmem.o): Build with -Wno-error.
16535
16536 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16537
16538 * utils.c (xsnprintf): Make non-static.
16539 * server.h: Add xsnprintf declaration.
16540 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16541 replace calls to snprintf by calls to xsnprintf throughout.
16542
16543 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16544
16545 * configure.ac: Add configure check for alloca.
16546 * configure, config.in: Regenerate.
16547 * server.h: Include alloca.h if it exists.
16548 * gdbreplay.c: Include alloca.h if it exists.
16549
16550 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16551
16552 * linux-low.c (__SIGRTMIN): Define if not already defined.
16553 (linux_create_inferior): Check for __ANDROID__ rather than
16554 __SIGRTMIN.
16555 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16556 are already deferred.
16557 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16558 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16559 stopped and already has a pending signal to report.
16560 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16561 a pending signal to report or is moving out of a jump pad.
16562 (linux_init_signals): Check for __ANDROID__ rather than
16563 __SIGRTMIN.
16564
16565 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16566
16567 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16568 debug_threads check. Avoid a linear search when not doing debug
16569 output.
16570
16571 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16572
16573 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16574 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16575 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16576 (process_event): Change local fd's type to gdb_fildes_t.
16577 (create_file_handler): Adjust prototype.
16578 (delete_file_handler): Adjust prototype.
16579 (handle_file_event): Adjust prototype. Use pfildes.
16580 (create_file_event): Adjsut prototype.
16581 * remote-utils.c (remote_desc, listen_desc): Change type to
16582 gdb_fildes_t.
16583 * server.h: New gdb_fildes_t typedef.
16584 [USE_WIN32API]: Include winsock2.h.
16585 (delete_file_handler, add_file_handler): Adjust prototypes.
16586 (pfildes): Declare.
16587 * utils.c (pfildes): New.
16588
16589 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16590
16591 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16592 * configure: Regenerate.
16593
16594 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16595
16596 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16597 (linux_done_accessing_memory): ... this.
16598 (linux_target_ops): Adjust.
16599 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16600 * nto-low.c (nto_target_ops): Adjust comment.
16601 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16602 * spu-low.c (spu_target_ops): Adjust comment.
16603 * target.h (target_ops): Rename unprepare_to_access_memory field
16604 to done_accessing_memory.
16605 (unprepare_to_access_memory): Rename to ...
16606 (done_accessing_memory): ... this.
16607
16608 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16609
16610 * linux-low.c (linux_prepare_to_access_memory): New.
16611 (linux_unprepare_to_access_memory): New.
16612 (linux_target_ops): Install them.
16613 * server.c (read_memory): Rename to ...
16614 (gdb_read_memory): ... this. Use
16615 prepare_to_access_memory/prepare_to_access_memory.
16616 (write_memory): Rename to ...
16617 (gdb_write_memory): ... this. Use
16618 prepare_to_access_memory/prepare_to_access_memory.
16619 (handle_search_memory_1): Adjust.
16620 (process_serial_event): Adjust.
16621 * target.h (struct target_ops): New fields
16622 prepare_to_access_memory and unprepare_to_access_memory.
16623 (prepare_to_access_memory, unprepare_to_access_memory): New.
16624 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16625 prepare_to_access_memory/prepare_to_access_memory.
16626 * nto-low.c (nto_target_ops): Adjust.
16627 * spu-low.c (spu_target_ops): Adjust.
16628 * win32-low.c (win32_target_ops): Adjust.
16629
16630 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16631
16632 * Makefile.in (WARN_CFLAGS): Get it from configure.
16633 (WERROR_CFLAGS): New.
16634 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16635 * configure.ac: Introduce --enable-werror, which adds -Werror to
16636 the compiler command line. Enabled by default. Disable with
16637 --disable-werror. Add -Wdeclaration-after-statement
16638 Wpointer-arith and -Wformat-nonliteral to warning flags.
16639 * configure: Regenerate.
16640
16641 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16642
16643 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16644
16645 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16646
16647 * gdbreplay.c (remote_error): New.
16648 (gdbchar): New.
16649 (expect): Use gdbchar. Check for error reading from GDB.
16650 Clarify sync error output.
16651 (play): Check for errors writing to GDB.
16652 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16653 * remote-utils.c (getpkt): Check for errors writing to the remote
16654 descriptor.
16655
16656 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16657
16658 * linux-low.c (linux_wait_1): Move non-debugging code out of
16659 `debug_threads' control.
16660
16661 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16662
16663 * linux-low.c (linux_wait_1): Don't set last_status here.
16664 * server.c (push_event, queue_stop_reply_callback): Assert we're
16665 not pushing a TARGET_WAITKIND_IGNORE event.
16666 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16667 (myresume, handle_target_event): Set the thread's last_resume_kind
16668 and last_status from the target returned status.
16669
16670 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16671
16672 PR threads/10729
16673
16674 * linux-x86-low.c (update_debug_registers_callback): New.
16675 (i386_dr_low_set_addr): Use it.
16676 (i386_dr_low_get_addr): New.
16677 (i386_dr_low_set_control): Use update_debug_registers_callback.
16678 (i386_dr_low_get_control): New.
16679 (i386_dr_low_get_status): Adjust.
16680 * linux-low.c (linux_stop_lwp): New.
16681 * linux-low.h (linux_stop_lwp): Declare.
16682
16683 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16684 argument instead of a i386_debug_reg_state.
16685 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16686 a i386_debug_reg_state.
16687 (i386_insert_aligned_watchpoint): Adjust.
16688 (i386_remove_aligned_watchpoint): Adjust.
16689 (i386_low_stopped_data_address): Read the debug registers from the
16690 inferior instead of from the mirrors.
16691 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16692 (i386_dr_low_get_addr): Declare.
16693 (i386_dr_low_get_control): Declare.
16694 (i386_dr_low_get_status): Change prototype.
16695
16696 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16697 (i386_dr_low_get_addr): New.
16698 (i386_dr_low_get_control): New.
16699 (i386_dr_low_get_status): Adjust prototype. Return
16700 dr_status_mirror.
16701 (i386_initial_stuff): Clear dr_status_mirror and
16702 dr_control_mirror.
16703 (i386_get_thread_context): Adjust.
16704 (i386_set_thread_context): Adjust.
16705 (i386_thread_added): Adjust.
16706
16707 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16708
16709 * linux-low.h (linux_thread_area): Delete declaration.
16710
16711 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16712
16713 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16714 after its termination.
16715
16716 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16717
16718 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16719 (gdb_wants_all_stopped): Delete.
16720 (linux_wait_1): Don't call them.
16721 * server.c (handle_v_cont): Tag all threads as want-stopped.
16722 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16723 stopped as "client-wants-stopped".
16724
16725 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16726
16727 * Makefile.in (signals_h): New.
16728 (server_h): Depend on it.
16729 (server.o): Don't depend on $(signals_def).
16730 (signals.o): Depend on $(signals_def).
16731
16732 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16733
16734 * Makefile.in (signals_def): New.
16735 (server_h): Append include/gdb/signals.h and signals_def.
16736 (server.o): Append signals_def.
16737
16738 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16739
16740 * server.c (handle_target_event): Use target_signal_to_host for
16741 resume_info.sig initialization.
16742 * target.h (struct thread_resume) <sig>: New comment.
16743
16744 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16745
16746 * server.c (handle_query): strcpy() the returned string from paddress()
16747 instead of sprintf().
16748 * utils.c (paddress): Return phex_nz().
16749
16750 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16751
16752 * server.c (handle_v_cont): Call mourn_inferior if process
16753 just exited.
16754 (myresume): Likewise.
16755
16756 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16757
16758 Static tracepoints, and integration with UST.
16759
16760 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16761 * mem-break.c (uninsert_all_breakpoints)
16762 (reinsert_all_breakpoints): New.
16763 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16764 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16765 (gdb_agent_ust_loaded, helper_thread_id)
16766 (gdb_agent_helper_thread_id): New macros.
16767 (struct ipa_sym_addresses): Add addr_ust_loaded,
16768 addr_helper_thread_id, addr_cmd_buf.
16769 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16770 (in_process_agent_loaded_ust): New.
16771 (write_e_ust_not_loaded): New.
16772 (maybe_write_ipa_ust_not_loaded): New.
16773 (struct collect_static_trace_data_action): New.
16774 (enum tracepoint_type) <static_tracepoint>: New.
16775 (struct tracepoint) <handle>: Mention static tracepoints.
16776 (struct static_tracepoint_ctx): New.
16777 (CMD_BUF_SIZE): New.
16778 (add_tracepoint_action): Handle static tracepoint actions.
16779 (unprobe_marker_at): New.
16780 (clear_installed_tracepoints): Handle static tracepoints.
16781 (cmd_qtdp): Handle static tracepoints.
16782 (probe_marker_at): New.
16783 (cmd_qtstart): Handle static tracepoints.
16784 (response_tracepoint): Handle static tracepoints.
16785 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16786 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16787 (get_context_regcache): Handle static tracepoints.
16788 (do_action_at_tracepoint): Handle static tracepoint actions.
16789 (traceframe_find_block_type): Handle static trace data blocks.
16790 (traceframe_read_sdata): New.
16791 (download_tracepoints): Download static tracepoint actions.
16792 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16793 (GDB_PROBE_NAME): New.
16794 (ust_ops): New.
16795 (GET_UST_SYM): New.
16796 (USTF): New.
16797 (dlsym_ust): New.
16798 (ust_marker_to_static_tracepoint): New.
16799 (gdb_probe): New.
16800 (collect_ust_data_at_tracepoint): New.
16801 (gdb_ust_probe): New.
16802 (UNIX_PATH_MAX, SOCK_DIR): New.
16803 (gdb_ust_connect_sync_socket): New.
16804 (resume_thread, stop_thread): New.
16805 (run_inferior_command): New.
16806 (init_named_socket): New.
16807 (gdb_ust_socket_init): New.
16808 (cstr_to_hexstr): New.
16809 (next_st): New.
16810 (first_marker, next_marker): New.
16811 (response_ust_marker): New.
16812 (cmd_qtfstm, cmd_qtsstm): New.
16813 (unprobe_marker_at, probe_marker_at): New.
16814 (cmd_qtstmat, gdb_ust_thread): New.
16815 (gdb_ust_init): New.
16816 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16817 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16818 (ST_REGENTRY): New.
16819 (x86_64_st_collect_regmap): New.
16820 (X86_64_NUM_ST_COLLECT_GREGS): New.
16821 (AMD64_RIP_REGNUM): New.
16822 (supply_static_tracepoint_registers): New.
16823 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16824 (ST_REGENTRY): New.
16825 (i386_st_collect_regmap): New.
16826 (i386_NUM_ST_COLLECT_GREGS): New.
16827 (supply_static_tracepoint_registers): New.
16828 * server.c (handle_query): Handle qXfer:statictrace:read.
16829 <qSupported>: Report support for StaticTracepoints, and
16830 qXfer:statictrace:read features.
16831 * server.h (traceframe_read_sdata)
16832 (supply_static_tracepoint_registers): Declare.
16833 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16834 (unpack_varlen_hex): Include in IPA build.
16835 * Makefile.in (ustlibs, ustinc): New.
16836 (IPA_OBJS): Add remote-utils-ipa.o.
16837 ($(IPA_LIB)): Link -ldl and -lpthread.
16838 (UST_CFLAGS): New.
16839 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16840 * config.in, configure: Regenerate.
16841
16842 2010-06-20 Ian Lance Taylor <iant@google.com>
16843 Pedro Alves <pedro@codesourcery.com>
16844
16845 * linux-x86-low.c (always_true): Delete.
16846 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16847 trying to fool the compiler with always_true.
16848
16849 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16850
16851 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16852 conditions in gdbserver.
16853
16854 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16855
16856 * spu-low.c (spu_read_memory): Wrap around local store limit.
16857 (spu_write_memory): Likewise.
16858
16859 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16860
16861 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16862 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16863 LONGEST uses.
16864 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16865 uses.
16866 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16867 uses with LONGEST uses.
16868
16869 2010-06-14 Stan Shebs <stan@codesourcery.com>
16870 Pedro Alves <pedro@codesourcery.com>
16871
16872 Bytecode compiler.
16873
16874 * linux-x86-low.c: Include limits.h.
16875 (add_insns): New.
16876 (always_true): New.
16877 (EMIT_ASM): New.
16878 (EMIT_ASM32): New.
16879 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16880 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16881 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16882 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16883 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16884 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16885 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16886 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16887 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16888 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16889 (amd64_emit_void_call_2): New.
16890 (amd64_emit_ops): New.
16891 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16892 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16893 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16894 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16895 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16896 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16897 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16898 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16899 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16900 (i386_emit_stack_adjust, i386_emit_int_call_1)
16901 (i386_emit_void_call_2): New.
16902 (i386_emit_ops): New.
16903 (x86_emit_ops): New.
16904 (the_low_target): Install x86_emit_ops.
16905 * server.h (struct emit_ops): New.
16906 (get_raw_reg_func_addr): Declare.
16907 (current_insn_ptr, emit_error): Declare.
16908 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16909 (set_trace_state_variable_value): New defines.
16910 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16911 addr_get_trace_state_variable_value and
16912 addr_set_trace_state_variable_value.
16913 (symbol_list): New fields for get_raw_reg,
16914 get_trace_state_variable_value and set_trace_state_variable_value.
16915 (condfn): New typedef.
16916 (struct tracepoint): New field `compiled_cond'.
16917 (do_action_at_tracepoint): Clear compiled_cond.
16918 (get_trace_state_variable_value, set_trace_state_variable_value):
16919 Export in the IPA.
16920 (condition_true_at_tracepoint): If there's a compiled condition,
16921 run that.
16922 (current_insn_ptr, emit_error): New globals.
16923 (struct bytecode_address): New.
16924 (get_raw_reg_func_addr): New.
16925 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16926 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16927 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16928 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16929 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16930 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16931 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16932 (compile_tracepoint_condition, compile_bytecodes): New.
16933 * target.h (emit_ops): Forward declare.
16934 (struct target_ops): New field emit_ops.
16935 (target_emit_ops): New.
16936 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16937 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16938 * linux-low.c (linux_emit_ops): New.
16939 (linux_target_ops): Install it.
16940 * linux-low.h (struct linux_target_ops): New field emit_ops.
16941
16942 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16943
16944 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16945 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16946
16947 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16948 Stan Shebs <stan@codesourcery.com>
16949
16950 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16951 (all): Depend on $(extra_libraries).
16952 (install-only): Install the IPA.
16953 (IPA_OBJS, IPA_LIB): New.
16954 (clean): Remove the IPA lib.
16955 (IPAGENT_CFLAGS): New.
16956 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16957 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16958 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16959 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16960 * configure.ac: Check for atomic builtins support in the compiler.
16961 (IPA_DEPFILES, extra_libraries): Define.
16962 * configure.srv (ipa_obj): Add description.
16963 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16964 (i[34567]86-*-linux*): Set ipa_obj.
16965 (x86_64-*-linux*): Set ipa_obj.
16966 * linux-low.c (stabilizing_threads): New.
16967 (supports_fast_tracepoints): New.
16968 (linux_detach): Stabilize threads before detaching.
16969 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16970 the lwp is either not stabilizing, or is moving out of a jump pad.
16971 (linux_fast_tracepoint_collecting): New.
16972 (maybe_move_out_of_jump_pad): New.
16973 (enqueue_one_deferred_signal): New.
16974 (dequeue_one_deferred_signal): New.
16975 (linux_wait_for_event_1): If moving out of a jump pad, defer
16976 pending signals to later.
16977 (linux_stabilize_threads): New.
16978 (linux_wait_1): Check if threads need moving out of jump pads, and
16979 do it if so.
16980 (stuck_in_jump_pad_callback): New.
16981 (move_out_of_jump_pad_callback): New.
16982 (lwp_running): New.
16983 (linux_resume_one_lwp): Handle moving out of jump pads.
16984 (linux_set_resume_request): Dequeue deferred signals.
16985 (need_step_over_p): Also step over fast tracepoint jumps.
16986 (start_step_over): Also uninsert fast tracepoint jumps.
16987 (finish_step_over): Also reinsert fast tracepoint jumps.
16988 (linux_install_fast_tracepoint_jump): New.
16989 (linux_target_ops): Install linux_stabilize_threads and
16990 linux_install_fast_tracepoint_jump_pad.
16991 * linux-low.h (linux_target_ops) <get_thread_area,
16992 install_fast_tracepoint_jump_pad>: New fields.
16993 (struct lwp_info) <collecting_fast_tracepoint,
16994 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16995 (linux_get_thread_area): Declare.
16996 * linux-x86-low.c (jump_insn): New.
16997 (x86_get_thread_area): New.
16998 (append_insns): New.
16999 (push_opcode): New.
17000 (amd64_install_fast_tracepoint_jump_pad): New.
17001 (i386_install_fast_tracepoint_jump_pad): New.
17002 (x86_install_fast_tracepoint_jump_pad): New.
17003 (the_low_target): Install x86_get_thread_area and
17004 x86_install_fast_tracepoint_jump_pad.
17005 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17006 (struct fast_tracepoint_jump): New.
17007 (fast_tracepoint_jump_insn): New.
17008 (fast_tracepoint_jump_shadow): New.
17009 (find_fast_tracepoint_jump_at): New.
17010 (fast_tracepoint_jump_here): New.
17011 (delete_fast_tracepoint_jump): New.
17012 (set_fast_tracepoint_jump): New.
17013 (uninsert_fast_tracepoint_jumps_at): New.
17014 (reinsert_fast_tracepoint_jumps_at): New.
17015 (set_breakpoint_at): Use write_inferior_memory.
17016 (uninsert_raw_breakpoint): Use write_inferior_memory.
17017 (check_mem_read): Mask out fast tracepoint jumps.
17018 (check_mem_write): Mask out fast tracepoint jumps.
17019 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17020 (set_fast_tracepoint_jump): Declare.
17021 (delete_fast_tracepoint_jump)
17022 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17023 (reinsert_fast_tracepoint_jumps_at): Declare.
17024 * regcache.c: Don't compile many functions when building the
17025 in-process agent library.
17026 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17027 the register buffer in the heap.
17028 (free_register_cache): If the register buffer isn't owned by the
17029 regcache, don't free it.
17030 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17031 pre-existing register caches.
17032 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17033 type.
17034 (convert_ascii_to_int): : Constify `from' parameter type.
17035 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17036 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17037 the needed buffer in-place.
17038 (relocate_instruction): New.
17039 * server.c (handle_query) <qSymbols>: If the target supports
17040 tracepoints, give it a chance of looking up symbols. Report
17041 support for fast tracepoints.
17042 (handle_status): Stabilize threads.
17043 (process_serial_event): Adjust.
17044 * server.h (struct fast_tracepoint_jump): Forward declare.
17045 (struct process_info) <fast_tracepoint_jumps>: New field.
17046 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17047 (decode_X_packet, decode_M_packet): Adjust.
17048 (relocate_instruction): Declare.
17049 (in_process_agent_loaded): Declare.
17050 (tracepoint_look_up_symbols): Declare.
17051 (struct fast_tpoint_collect_status): Declare.
17052 (fast_tracepoint_collecting): Declare.
17053 (force_unlock_trace_buffer): Declare.
17054 (handle_tracepoint_bkpts): Declare.
17055 (initialize_low_tracepoint)
17056 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17057 * target.h (struct target_ops) <stabilize_threads,
17058 install_fast_tracepoint_jump_pad>: New fields.
17059 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17060 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17061 [HAVE_STDINT_H]: Include stdint.h.
17062 (trace_debug_1): Rename to ...
17063 (trace_vdebug): ... this.
17064 (trace_debug): Rename to ...
17065 (trace_debug_1): ... this. Add `level' parameter.
17066 (trace_debug): New.
17067 (ATTR_USED, ATTR_NOINLINE): New.
17068 (IP_AGENT_EXPORT): New.
17069 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17070 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17071 (about_to_request_buffer_space, trace_buffer_is_full)
17072 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17073 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17074 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17075 (traceframe_write_count, traceframes_created)
17076 (trace_state_variables)
17077 New renaming defines.
17078 (struct ipa_sym_addresses): New.
17079 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17080 (symbol_list): New.
17081 (ipa_sym_addrs): New.
17082 (all_tracepoint_symbols_looked_up): New.
17083 (in_process_agent_loaded): New.
17084 (write_e_ipa_not_loaded): New.
17085 (maybe_write_ipa_not_loaded): New.
17086 (tracepoint_look_up_symbols): New.
17087 (debug_threads) [IN_PROCESS_AGENT]: New.
17088 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17089 (UNKNOWN_SIDE_EFFECTS): New.
17090 (stop_tracing): New.
17091 (flush_trace_buffer): New.
17092 (stop_tracing_bkpt): New.
17093 (flush_trace_buffer_bkpt): New.
17094 (read_inferior_integer): New.
17095 (read_inferior_uinteger): New.
17096 (read_inferior_data_pointer): New.
17097 (write_inferior_data_pointer): New.
17098 (write_inferior_integer): New.
17099 (write_inferior_uinteger): New.
17100 (struct collect_static_trace_data_action): Delete.
17101 (enum tracepoint_type): New.
17102 (struct tracepoint) <type>: New field `type'.
17103 <actions_str, step_actions, step_actions_str>: Only include in
17104 GDBserver.
17105 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17106 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17107 (tracepoints): Use IP_AGENT_EXPORT.
17108 (last_tracepoint): Don't include in the IPA.
17109 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17110 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17111 (alloced_trace_state_variables): New.
17112 (trace_state_variables): Use IP_AGENT_EXPORT.
17113 (traceframe_t): Delete unused variable.
17114 (circular_trace_buffer): Don't include in the IPA.
17115 (trace_buffer_start): Delete.
17116 (struct trace_buffer_control): New.
17117 (trace_buffer_free): Delete.
17118 (struct ipa_trace_buffer_control): New.
17119 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17120 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17121 New.
17122 (trace_buffer_ctrl): New.
17123 (TRACE_BUFFER_CTRL_CURR): New.
17124 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17125 Reimplement as macros.
17126 (trace_buffer_wrap): Delete.
17127 (traceframe_write_count, traceframe_read_count)
17128 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17129 (struct tracepoint_hit_ctx) <type>: New field.
17130 (struct fast_tracepoint_ctx): New.
17131 (memory_barrier): New.
17132 (cmpxchg): New.
17133 (record_tracepoint_error): Update atomically in the IPA.
17134 (clear_inferior_trace_buffer): New.
17135 (about_to_request_buffer_space): New.
17136 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17137 updating the same buffer.
17138 (add_tracepoint): Default the tracepoint's type to trap
17139 tracepoint, and orig_size to -1.
17140 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17141 internal variables.
17142 (create_trace_state_variable): New parameter `gdb'. Handle it.
17143 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17144 (cmd_qtdp): Handle fast tracepoints.
17145 (cmd_qtdv): Adjust.
17146 (max_jump_pad_size): New.
17147 (gdb_jump_pad_head): New.
17148 (get_jump_space_head): New.
17149 (claim_jump_space): New.
17150 (sort_tracepoints): New.
17151 (MAX_JUMP_SIZE): New.
17152 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17153 IPA.
17154 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17155 support. Upload fast traceframes, and delete internal IPA
17156 breakpoints.
17157 (stop_tracing_handler): New.
17158 (flush_trace_buffer_handler): New.
17159 (cmd_qtstop): Upload fast tracepoints.
17160 (response_tracepoint): Handle fast tracepoints.
17161 (tracepoint_finished_step): Upload fast traceframes. Set the
17162 tracepoint hit context's tracepoint type.
17163 (handle_tracepoint_bkpts): New.
17164 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17165 type. Add comment about fast tracepoints.
17166 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17167 non-existing action_str field.
17168 (get_context_regcache): Handle fast tracepoints.
17169 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17170 to the regcache.
17171 (fast_tracepoint_from_jump_pad_address): New.
17172 (fast_tracepoint_from_ipa_tpoint_address): New.
17173 (collecting_t): New.
17174 (force_unlock_trace_buffer): New.
17175 (fast_tracepoint_collecting): New.
17176 (collecting): New.
17177 (gdb_collect): New.
17178 (write_inferior_data_ptr): New.
17179 (target_tp_heap): New.
17180 (target_malloc): New.
17181 (download_agent_expr): New.
17182 (UALIGN): New.
17183 (download_tracepoints): New.
17184 (download_trace_state_variables): New.
17185 (upload_fast_traceframes): New.
17186 (IPA_FIRST_TRACEFRAME): New.
17187 (IPA_NEXT_TRACEFRAME_1): New.
17188 (IPA_NEXT_TRACEFRAME): New.
17189 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17190 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17191 (gdb_jump_pad_buffer_end): New.
17192 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17193 (initialize_tracepoint): Adjust.
17194 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17195 buffer. Initialize the low module.
17196 * utils.c (PREFIX, TOOLNAME): New.
17197 (malloc_failure): Use PREFIX.
17198 (error): In the IPA, an error causes an exit.
17199 (fatal, warning): Use PREFIX.
17200 (internal_error): Use TOOLNAME.
17201 (NUMCELLS): Increase to 10.
17202 * configure, config.in: Regenerate.
17203
17204 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17205
17206 * server.c (handle_query) <qSupported>: Do two passes over the
17207 qSupported string to avoid nesting strtok.
17208
17209 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17210
17211 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17212 (CDEPS): New.
17213 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17214 -Wl,--dynamic-list.
17215 * configure: Regenerate.
17216 * proc-service.list: New.
17217
17218 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17219
17220 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17221 New comment.
17222
17223 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17224
17225 * gdbreplay.c (remote_open): Check error return from socket() call by
17226 its equality to -1 not by it being negative.
17227 * remote-utils.c (remote_open): Likewise.
17228
17229 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17230
17231 * config.h: Regenerate.
17232
17233 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17234
17235 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17236 doesn't provide PTRACE_GET_THREAD_AREA.
17237
17238 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17239
17240 * linux-m68k-low.c: Include <asm/ptrace.h>
17241 (ps_get_thread_area): Implement.
17242
17243 2010-05-03 Doug Evans <dje@google.com>
17244
17245 * event-loop.c (struct callback_event): New struct.
17246 (callback_list): New global.
17247 (append_callback_event, delete_callback_event): New functions.
17248 (process_callback): New function.
17249 (start_event_loop): Call it.
17250 * remote-utils.c (NOT_SCHEDULED): Define.
17251 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17252 moved out of readchar.
17253 (readchar): Rewrite. Call reschedule before returning.
17254 (reset_readchar): New function.
17255 (remote_close): Call it.
17256 (process_remaining, reschedule): New functions.
17257 * server.h (callback_handler_func): New typedef.
17258 (append_callback_event, delete_callback_event): Declare.
17259
17260 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17261
17262 * proc-service.c (ps_pglobal_lookup): Use
17263 thread_db_look_up_one_symbol.
17264 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17265 parameter. Use it instead of all_symbols_looked_up.
17266 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17267 field.
17268 (all_symbols_looked_up): Don't declare.
17269 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17270 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17271 field.
17272 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17273 Set all_symbols_looked_up here.
17274 (thread_db_look_up_one_symbol): New.
17275 (thread_db_get_tls_address): Adjust.
17276 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17277 thread_db object on the heap, and tentatively set it in the
17278 process structure.
17279 (thread_db_init): Don't set all_symbols_looked_up here.
17280 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17281
17282 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17283
17284 * linux-low.c (linux_kill, linux_detach): Adjust.
17285 (status_pending_p_callback): Remove redundant statement. Check
17286 for !TARGET_WAITIKIND_IGNORE, instead of
17287 TARGET_WAITKIND_STOPPED.
17288 (handle_tracepoints): Make sure LWP is locked. Adjust.
17289 (linux_wait_for_event_1): Adjust.
17290 (linux_cancel_breakpoints): New.
17291 (unsuspend_one_lwp): New.
17292 (unsuspend_all_lwps): New.
17293 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17294 (send_sigstop_callback): Change return type to int, add new
17295 `except' parameter and handle it.
17296 (suspend_and_send_sigstop_callback): New.
17297 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17298 pass them down. If SUSPEND, also increment the lwp's suspend
17299 count.
17300 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17301 (need_step_over_p): Don't consider suspended LWPs.
17302 (start_step_over): Adjust.
17303 (proceed_one_lwp): Change return type to int, add new `except'
17304 parameter and handle it.
17305 (unsuspend_and_proceed_one_lwp): New.
17306 (proceed_all_lwps): Use find_inferior instead of
17307 for_each_inferior.
17308 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17309 also decrement the suspend count of LWPs. Pass `except' down,
17310 instead of hacking its suspend count.
17311 (linux_pause_all): Add `freeze' parameter. Adjust.
17312 (linux_unpause_all): New.
17313 (linux_target_ops): Install linux_unpause_all.
17314 * server.c (handle_status): Adjust.
17315 * target.h (struct target_ops): New fields `unpause_all' and
17316 `cancel_breakpoints'. Add new parameter to `pause_all'.
17317 (pause_all): Add new `freeze' parameter.
17318 (unpause_all): New.
17319 (cancel_breakpoints): New.
17320 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17321 cancel breakpoints.
17322 (cmd_qtstart): Pause threads.
17323 (stop_tracing): Pause threads, and cancel breakpoints.
17324 * win32-low.c (win32_target_ops): Adjust.
17325
17326 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17327
17328 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17329 the inferior right away from here...
17330 (linux_wait_1): ... to here, and adjust to check the thread's
17331 last_resume_kind instead of the lwp's step or stop_expected flags.
17332
17333 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17334
17335 * README: Use consistent `GDB' and `GDBserver' spellings.
17336
17337 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17338
17339 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17340 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17341 (linux_detach_one_lwp): Assume the lwp is stopped.
17342 (any_thread_of): Delete.
17343 (linux_detach): Stop all lwps here. Don't blindly delete all
17344 breakpoints.
17345 (delete_lwp_callback): New.
17346 (linux_mourn): Delete all lwps of the process that is gone.
17347 (linux_wait_1): Don't delete the last lwp of the process here.
17348 * mem-break.h (mark_breakpoints_out): Declare.
17349 * mem-break.c (mark_breakpoints_out): New.
17350 (free_all_breakpoints): Use it.
17351 * server.c (handle_target_event): If the process is gone, mark
17352 breakpoints out.
17353 * thread-db.c (struct thread_db) <create_bp>: New field.
17354 (thread_db_enable_reporting): Fix prototype. Store a thread event
17355 breakpoint reference in the thread_db struct.
17356 (thread_db_load_search): Clear the thread_db object.
17357 (try_thread_db_load_1): Ditto.
17358 (switch_to_process): New.
17359 (disable_thread_event_reporting): Use it.
17360 (remove_thread_event_breakpoints): New.
17361 (thread_db_detach, thread_db_mourn): Use it.
17362
17363 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17364
17365 * linux-low.c (linux_enable_event_reporting): New.
17366 (linux_wait_for_event_1, handle_extended_wait): Use it.
17367
17368 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17369
17370 * linux-low.c (linux_kill_one_lwp, linux_kill)
17371 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17372 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17373 SIGSTOP even if the LWP is stopped.
17374 (send_sigstop_callback): New.
17375 (stop_all_lwps): Use send_sigstop_callback instead.
17376 (linux_resume_one_thread): Adjust.
17377 (proceed_one_lwp): Still proceed an LWP that the client has
17378 requested to stop, if we haven't reported it as stopped yet. Make
17379 sure that LWPs the client want stopped, have a pending SIGSTOP.
17380
17381 2010-04-26 Doug Evans <dje@google.com>
17382
17383 * server.c (handle_general_set): Make static.
17384
17385 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17386 Print received char after testing for error/eof instead of before.
17387 (input_interrupt): Tweak comment.
17388
17389 2010-04-23 Doug Evans <dje@google.com>
17390
17391 * server.c (start_inferior): Print inferior argv if --debug.
17392
17393 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17394
17395 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17396 * nto-x86-low.c: Include server.h
17397
17398 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17399
17400 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17401 be consistent with other sources of this directory.
17402 (init_registers_amd64): Correct name of source file of this function
17403 in the comment.
17404
17405 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17406
17407 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17408 64-bit executables.
17409
17410 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17411
17412 * win32-i386-low.c: Add 64-bit support.
17413 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17414 (init_registers_amd64): Declare.
17415 (mappings): Add 64-bit version of array.
17416 (init_windows_x86): New function.
17417 (the_low_target): Change init_arch field to init_windows_x86.
17418
17419 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17420
17421 * win32-low.c: Adapt to support also 64-bit architecture.
17422 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17423 (get_image_name): Use SIZE_T type for local variable `done'.
17424 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17425 (toolhelp_get_dll_name): Idem.
17426 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17427 Use uintptr_t typecast to avoid warning.
17428 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17429 (handle_exception): Use phex_nz to avoid warning.
17430 (win32_wait): Remove unused local variable `process'.
17431
17432 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17433
17434 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17435 `amd64-avx.o'.
17436
17437 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17438
17439 * configure.ac: Use `ws2_32' library for srv_mingw.
17440 * configure: Regenerate.
17441 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17442 * remote-utils.c: Likewise.
17443
17444 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17445
17446 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17447 if __x86_64__ is defined.
17448
17449 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17450
17451 * configure: Regenerate.
17452
17453 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17454
17455 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17456 * target.h (target_ops): New get_tib_address field.
17457 * win32-low.h (win32_thread_info): Add thread_local_base field.
17458 * win32-low.c (child_add_thread): Add tlb argument.
17459 Set thread_local_base field to TLB.
17460 (get_child_debug_event): Adapt to child_add_thread change.
17461 (win32_get_tib_address): New function.
17462 (win32_target_ops): Set get_tib_address field to
17463 win32_get_tib_address.
17464 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17465
17466 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17467
17468 * linux-low.c (linux_mourn): Also remove the process.
17469 * server.c (handle_target_event): Don't remove the process here.
17470 * nto-low.c (nto_mourn): New.
17471 (nto_target_ops): Install it.
17472 * spu-low.c (spu_mourn): New.
17473 (spu_target_ops): Install it.
17474 * win32-low.c (win32_mourn): New.
17475 (win32_target_ops): Install it.
17476
17477 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17478
17479 * server.h (buffer_xml_printf): Remove redundant `;'.
17480
17481 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17482
17483 * regcache.c (set_register_cache): Invalidate regcaches before
17484 changing the register cache layout.
17485 (regcache_invalidate_one): Allow a NULL regcache.
17486 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17487 regcaches before changing the register cache layout or the target
17488 regsets.
17489
17490 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17491
17492 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17493 variable warning on Linux/x86-64.
17494
17495 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17496
17497 GDBserver disconnected tracing support.
17498
17499 * linux-low.c (linux_remove_process): Delete.
17500 (add_lwp): Don't set last_resume_kind here.
17501 (linux_kill): Use `mourn'.
17502 (linux_detach): Use `thread_db_detach', and `mourn'.
17503 (linux_mourn): New.
17504 (linux_attach_lwp_1): Adjust comment.
17505 (linux_attach): last_resume_kind moved the thread_info; adjust.
17506 (status_pending_p_callback): Adjust.
17507 (linux_wait_for_event_1): Adjust.
17508 (count_events_callback, select_singlestep_lwp_callback)
17509 (select_event_lwp_callback, cancel_breakpoints_callback)
17510 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17511 (proceed_one_lwp): Adjust.
17512 (linux_async): Add debug output.
17513 (linux_thread_stopped): New.
17514 (linux_pause_all): New.
17515 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17516 linux_pause_all.
17517 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17518 (thread_db_free): Delete declaration.
17519 (thread_db_detach, thread_db_mourn): Declare.
17520 * thread-db.c (thread_db_init): Use thread_db_mourn.
17521 (thread_db_free): Delete, split in two.
17522 (disable_thread_event_reporting): New.
17523 (thread_db_detach): New.
17524 (thread_db_mourn): New.
17525
17526 * server.h (struct thread_info) <last_resume_kind>: New field.
17527 <attached>: Add comment.
17528 <gdb_detached>: New field.
17529 (handler_func): Change return type to int.
17530 (handle_serial_event, handle_target_event): Ditto.
17531 (gdb_connected): Declare.
17532 (tracing): Delete.
17533 (disconnected_tracing): Declare.
17534 (stop_tracing): Declare.
17535
17536 * server.c (handle_query) <qSupported>: Report support for
17537 disconnected tracing.
17538 (queue_stop_reply_callback): Account for running threads.
17539 (gdb_wants_thread_stopped): New.
17540 (gdb_wants_all_threads_stopped): New.
17541 (gdb_reattached_process): New.
17542 (handle_status): Clear the `gdb_detached' flag of all processes.
17543 In all-stop, stop all threads.
17544 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17545 (process_serial_event): If the remote connection breaks, or if an
17546 exit was forced with "monitor exit", force an event loop exit.
17547 Handle disconnected tracing on detach.
17548 (handle_serial_event): Adjust.
17549 (handle_target_event): If GDB isn't connected, forward events back
17550 to the inferior, unless the last process exited, in which case,
17551 exit gdbserver. Adjust interface.
17552
17553 * remote-utils.c (remote_open): Don't block in accept. Instead
17554 register an event loop source on the listen socket file
17555 descriptor. Refactor bits into ...
17556 (listen_desc): ... this new global.
17557 (gdb_connected): ... this new function.
17558 (enable_async_notification): ... this new function.
17559 (handle_accept_event): ... this new function.
17560 (remote_close): Clear remote_desc.
17561
17562 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17563
17564 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17565 New fields.
17566 (mourn_inferior): Define.
17567 (target_process_qsupported): Avoid the dangling else problem.
17568 (thread_stopped): Define.
17569 (pause_all): Define.
17570 (target_waitstatus_to_string): Declare.
17571 * target.c (target_waitstatus_to_string): New.
17572
17573 * tracepoint.c (tracing): Make extern.
17574 (disconnected_tracing): New.
17575 (stop_tracing): Make extern. Handle tracing stops due to GDB
17576 disconnecting.
17577 (cmd_qtdisconnected): New.
17578 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17579 (handle_tracepoint_general_set): Handle QTDisconnected.
17580
17581 * event-loop.c (event_handler_func): Change return type to int.
17582 (process_event): Bail out if the event handler wants the event
17583 loop to stop.
17584 (handle_file_event): Ditto.
17585 (start_event_loop): Bail out if the event handler wants the event
17586 loop to stop.
17587
17588 * nto-low.c (nto_target_ops): Adjust.
17589 * spu-low.c (spu_wait): Don't remove the process here.
17590 (spu_target_ops): Adjust.
17591 * win32-low.c (win32_wait): Don't remove the process here.
17592 (win32_target_ops): Adjust.
17593
17594 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17595
17596 * regcache.c (realloc_register_cache): Invalidate inferior's
17597 regcache before recreating it.
17598
17599 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17600
17601 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17602
17603 2010-04-09 Stan Shebs <stan@codesourcery.com>
17604 Pedro Alves <pedro@codesourcery.com>
17605
17606 * server.h (LONGEST): New.
17607 (struct thread_info) <while_stepping>: New field.
17608 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17609 Declare.
17610 (initialize_tracepoint, handle_tracepoint_general_set)
17611 (handle_tracepoint_query, tracepoint_finished_step)
17612 (tracepoint_was_hit, release_while_stepping_state_list):
17613 (current_traceframe): Declare.
17614 * server.c (handle_general_set): Handle tracepoint packets.
17615 (read_memory): New.
17616 (write_memory): New.
17617 (handle_search_memory_1): Use read_memory.
17618 (handle_query): Report support for conditional tracepoints, trace
17619 state variables, and tracepoint sources. Handle tracepoint
17620 queries.
17621 (main): Initialize the tracepoints module.
17622 (process_serial_event): Handle traceframe reads/writes.
17623
17624 * linux-low.c (handle_tracepoints): New.
17625 (linux_wait_1): Call it.
17626 (linux_resume_one_lwp): Handle while-stepping.
17627 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17628 (linux_target_ops): Install them.
17629 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17630 New field.
17631 * linux-x86-low.c (x86_supports_tracepoints): New.
17632 (the_low_target). Install it.
17633
17634 * mem-break.h (delete_breakpoint): Declare.
17635 * mem-break.c (delete_breakpoint): Make external.
17636
17637 * target.h (struct target_ops): Add `supports_tracepoints',
17638 `read_pc', and `write_pc' fields.
17639 (target_supports_tracepoints): Define.
17640 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17641 (phex_nz): New.
17642
17643 * regcache.h (struct regcache) <registers_owned>: New field.
17644 (init_register_cache, regcache_cpy): Declare.
17645 (regcache_read_pc, regcache_write_pc): Declare.
17646 (register_cache_size): Declare.
17647 (supply_regblock): Declare.
17648 * regcache.c (init_register_cache): New.
17649 (new_register_cache): Use it.
17650 (regcache_cpy): New.
17651 (register_cache_size): New.
17652 (supply_regblock): New.
17653 (regcache_read_pc, regcache_write_pc): New.
17654
17655 * tracepoint.c: New.
17656
17657 * Makefile.in (OBS): Add tracepoint.o.
17658 (tracepoint.o): New rule.
17659
17660 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17661
17662 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17663 (i386-mmx.o): New.
17664 (i386-mmx.c): Likewise.
17665 (i386-mmx-linux.o): Likewise.
17666 (i386-mmx-linux.c): Likewise.
17667
17668 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17669 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17670 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17671 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17672
17673 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17674 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17675 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17676
17677 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17678
17679 * Makefile.in (clean): Updated.
17680 (i386-avx.o): New.
17681 (i386-avx.c): Likewise.
17682 (i386-avx-linux.o): Likewise.
17683 (i386-avx-linux.c): Likewise.
17684 (amd64-avx.o): Likewise.
17685 (amd64-avx.c): Likewise.
17686 (amd64-avx-linux.o): Likewise.
17687 (amd64-avx-linux.c): Likewise.
17688
17689 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17690 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17691 (srv_amd64_regobj): Add amd64-avx.o.
17692 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17693 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17694 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17695 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17696 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17697 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17698 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17699
17700 * i387-fp.c: Include "i386-xstate.h".
17701 (i387_xsave): New.
17702 (i387_cache_to_xsave): Likewise.
17703 (i387_xsave_to_cache): Likewise.
17704 (x86_xcr0): Likewise.
17705
17706 * i387-fp.h (i387_cache_to_xsave): Likewise.
17707 (i387_xsave_to_cache): Likewise.
17708 (x86_xcr0): Likewise.
17709
17710 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17711 * linux-crisv32-low.c (target_regsets): Likewise.
17712 * linux-m68k-low.c (target_regsets): Likewise.
17713 * linux-mips-low.c (target_regsets): Likewise.
17714 * linux-ppc-low.c (target_regsets): Likewise.
17715 * linux-s390-low.c (target_regsets): Likewise.
17716 * linux-sh-low.c (target_regsets): Likewise.
17717 * linux-sparc-low.c (target_regsets): Likewise.
17718 * linux-xtensa-low.c (target_regsets): Likewise.
17719
17720 * linux-low.c: Include <sys/uio.h>.
17721 (regsets_fetch_inferior_registers): Support nt_type.
17722 (regsets_store_inferior_registers): Likewise.
17723 (linux_process_qsupported): New.
17724 (linux_target_ops): Add linux_process_qsupported.
17725
17726 * linux-low.h (regset_info): Add nt_type.
17727 (linux_target_ops): Add process_qsupported.
17728
17729 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17730 and <sys/uio.h>.
17731 (init_registers_i386_avx_linux): New.
17732 (init_registers_amd64_avx_linux): Likewise.
17733 (xmltarget_i386_linux_no_xml): Likewise.
17734 (xmltarget_amd64_linux_no_xml): Likewise.
17735 (PTRACE_GETREGSET): Likewise.
17736 (PTRACE_SETREGSET): Likewise.
17737 (x86_fill_xstateregset): Likewise.
17738 (x86_store_xstateregset): Likewise.
17739 (use_xml): Likewise.
17740 (x86_linux_update_xmltarget): Likewise.
17741 (x86_linux_process_qsupported): Likewise.
17742 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17743 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17744 init_registers_i386_linux here. Call
17745 x86_linux_update_xmltarget.
17746 (the_low_target): Add x86_linux_process_qsupported.
17747
17748 * server.c (handle_query): Call target_process_qsupported.
17749
17750 * target.h (target_ops): Add process_qsupported.
17751 (target_process_qsupported): New.
17752
17753 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17754
17755 * inferiors.c (add_thread): Set last_status kind to
17756 TARGET_WAITKIND_IGNORE.
17757 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17758 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17759 (linux_wait_1): Move `thread' local definition to block that uses
17760 it. Don't NULL initialize `event_child'.
17761 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17762 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17763 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17764
17765 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17766
17767 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17768 an extended waitstatus, or by a watchpoint.
17769 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17770 thread was stepping or has been stopped by a watchpoint.
17771
17772 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17773
17774 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17775 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17776 of another, then delete the previous, and validate all
17777 breakpoints.
17778 (validate_inserted_breakpoint): New.
17779 (delete_disabled_breakpoints): New.
17780 (validate_breakpoints): New.
17781 (check_mem_read): Validate breakpoints before trusting their
17782 shadow. Delete disabled breakpoints.
17783 (check_mem_write): Validate breakpoints before trusting they
17784 should be inserted. Delete disabled breakpoints.
17785 * mem-break.h (validate_breakpoints):
17786 * server.c (handle_query): Validate breakpoints when we see a
17787 qSymbol query.
17788
17789 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17790
17791 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17792 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17793 if we could tell there's a GDB breakpoint at stop_pc.
17794 (need_step_over_p): Don't do a step over if we find a GDB
17795 breakpoint at the resume PC.
17796
17797 * mem-break.c (struct raw_breakpoint): New.
17798 (enum bkpt_type): New type `gdb_breakpoint'.
17799 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17800 fields. New field `raw'.
17801 (find_raw_breakpoint_at): New.
17802 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17803 breakpoint instead.
17804 (set_breakpoint_at): Adjust.
17805 (delete_raw_breakpoint): New.
17806 (release_breakpoint): New.
17807 (delete_breakpoint): Rename to...
17808 (delete_breakpoint_1): ... this. Add proc parameter. Use
17809 release_breakpoint. Return ENOENT.
17810 (delete_breakpoint): Reimplement.
17811 (find_breakpoint_at): Delete.
17812 (find_gdb_breakpoint_at): New.
17813 (delete_breakpoint_at): Delete.
17814 (set_gdb_breakpoint_at): New.
17815 (delete_gdb_breakpoint_at): New.
17816 (gdb_breakpoint_here): New.
17817 (set_reinsert_breakpoint): Use release_breakpoint.
17818 (uninsert_breakpoint): Rename to ...
17819 (uninsert_raw_breakpoint): ... this.
17820 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17821 (reinsert_raw_breakpoint): Change parameter type to
17822 raw_breakpoint.
17823 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17824 instead.
17825 (check_breakpoints): Adjust. Use release_breakpoint.
17826 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17827 (breakpoint_inserted_here): Ditto.
17828 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17829 Don't trust the breakpoint's shadow if it is not inserted.
17830 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17831 (delete_all_breakpoints): Adjust.
17832 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17833 use delete_breakpoint_1.
17834
17835 * mem-break.h (breakpoints_supported): Delete declaration.
17836 (set_gdb_breakpoint_at): Declare.
17837 (gdb_breakpoint_here): Declare.
17838 (delete_breakpoint_at): Delete.
17839 (delete_gdb_breakpoint_at): Declare.
17840
17841 * server.h (struct raw_breakpoint): Forward declare.
17842 (struct process_info): New field `raw_breakpoints'.
17843
17844 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17845 breakpoints.
17846
17847 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17848
17849 * linux-low.c (status_pending_p_callback): Fix comment.
17850 (linux_wait_for_event_1): Move most of the internal breakpoint
17851 handling from here...
17852 (linux_wait_1): ... to here.
17853 (count_events_callback): New.
17854 (select_singlestep_lwp_callback): New.
17855 (select_event_lwp_callback): New.
17856 (cancel_breakpoints_callback): New.
17857 (select_event_lwp): New.
17858 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17859 priority to all LWPs that have had events that should be reported
17860 to the client. Cancel breakpoints when about to reporting the
17861 event to the client, not while stopping lwps. No longer cancel
17862 finished single-steps here.
17863 (cancel_finished_single_step): Delete.
17864 (cancel_finished_single_steps): Delete.
17865
17866 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17867
17868 * mem-break.c (enum bkpt_type): New.
17869 (struct breakpoint): New field `type'.
17870 (set_breakpoint_at): Change return type to struct breakpoint
17871 pointer. Set type to `other_breakpoint' by default.
17872 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17873 in the breakpoint list.
17874 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17875 (reinsert_breakpoint): Rename to ...
17876 (reinsert_raw_breakpoint): ... this.
17877 (reinsert_breakpoints_at): Adjust.
17878 * mem-break.h (struct breakpoint): Declare.
17879 (set_breakpoint_at): Change return type to struct breakpoint
17880 pointer.
17881
17882 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17883
17884 * server.c (handle_query): Assign, not compare.
17885
17886 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17887
17888 Teach linux gdbserver to step-over-breakpoints.
17889
17890 * linux-low.c (can_hardware_single_step): New.
17891 (supports_breakpoints): New.
17892 (handle_extended_wait): If stopping threads, read the stop pc of
17893 the new cloned LWP.
17894 (get_pc): New.
17895 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17896 low target doesn't support retrieving the PC.
17897 (add_lwp): Set last_resume_kind to resume_continue.
17898 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17899 (linux_attach): Don't clear stop_expected. Set the lwp's
17900 last_resume_kind to resume_stop.
17901 (linux_detach_one_lwp): Don't check for removed breakpoints.
17902 (check_removed_breakpoint): Delete.
17903 (status_pending_p): Rename to ...
17904 (status_pending_p_callback): ... this. Don't check for removed
17905 breakpoints. Don't consider threads that are stopped from GDB's
17906 perspective.
17907 (linux_wait_for_lwp): Always read the stop_pc here.
17908 (cancel_breakpoint): New.
17909 (step_over_bkpt): New global.
17910 (linux_wait_for_event_1): Implement stepping over breakpoints.
17911 (gdb_wants_lwp_stopped): New.
17912 (gdb_wants_all_stopped): New.
17913 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17914 single-step traps here. Store the thread's last reported target
17915 wait status.
17916 (send_sigstop): Don't clear stop_expected. Always set it,
17917 instead.
17918 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17919 (cancel_finished_single_step): New.
17920 (cancel_finished_single_steps): New.
17921 (wait_for_sigstop): Don't cancel finished single-step traps here.
17922 (linux_resume_one_lwp): Don't check for removed breakpoints.
17923 Don't set `step' on non-hardware step archs.
17924 (linux_set_resume_request): Ignore resume_stop requests if already
17925 stopping or stopped. Set the lwp's last_resume_kind.
17926 (resume_status_pending_p): Don't check for removed breakpoints.
17927 (need_step_over_p): New.
17928 (start_step_over): New.
17929 (finish_step_over): New.
17930 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17931 requests. Clear the thread's last reported target waitstatus.
17932 Don't use the `suspended' flag. Don't consider pending breakpoints.
17933 (linux_resume): Start a step-over if necessary.
17934 (proceed_one_lwp): New.
17935 (proceed_all_lwps): New.
17936 (unstop_all_lwps): New.
17937 * linux-low.h (struct lwp_info): Rewrite comment for the
17938 `suspended' flag. Add the `stop_pc' field. Delete the
17939 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17940 Add `'last_resume_kind' and `need_step_over' fields.
17941 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17942 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17943 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17944 (set_raw_breakpoint_at): New.
17945 (set_breakpoint_at): Rewrite to use it.
17946 (reinsert_breakpoint_handler): Delete.
17947 (set_reinsert_breakpoint): New.
17948 (reinsert_breakpoint_by_bp): Delete.
17949 (delete_reinsert_breakpoints): New.
17950 (uninsert_breakpoint): Rewrite.
17951 (uninsert_breakpoints_at): New.
17952 (reinsert_breakpoint): Rewrite.
17953 (reinsert_breakpoints_at): New.
17954 (check_breakpoints): Rewrite.
17955 (breakpoint_here): New.
17956 (breakpoint_inserted_here): New.
17957 (check_mem_read): Adjust.
17958 * mem-break.h (breakpoints_supported, breakpoint_here)
17959 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17960 (reinsert_breakpoint_by_bp): Delete declaration.
17961 (delete_reinsert_breakpoints): Declare.
17962 (reinsert_breakpoint): Delete declaration.
17963 (reinsert_breakpoints_at): Declare.
17964 (uninsert_breakpoint): Delete declaration.
17965 (uninsert_breakpoints_at): Declare.
17966 (check_breakpoints): Adjust prototype.
17967 * server.h: Adjust include order.
17968 (struct thread_info): Declare here. Add a `last_status' field.
17969
17970 2010-03-23 Michael Snyder <msnyder@vmware.com>
17971
17972 * server.c (crc32): New function.
17973 (handle_query): Add handling for 'qCRC:' request.
17974
17975 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17976
17977 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17978 lwp had been stopped by a watchpoint.
17979
17980 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17981
17982 * server.h (internal_error): Declare.
17983 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17984 * utils.c (internal_error): New function.
17985
17986 2010-03-15 Andreas Schwab <schwab@redhat.com>
17987
17988 * configure.srv: Fix typo setting srv_regobj.
17989
17990 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17991
17992 * linux-low.c (fetch_register): Avoid passing a non string literal
17993 format to `error'.
17994 (usr_store_inferior_registers): Ditto.
17995
17996 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17997
17998 * linux-low.c (linux_write_memory): Bail out early if peeking
17999 memory failed.
18000
18001 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18002
18003 * linux-low.h (struct lwp_info): New fields
18004 `stopped_by_watchpoint' and `stopped_data_address'.
18005 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18006 here, and cache them in the lwp object.
18007 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18008 directly.
18009 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18010 field.
18011 (linux_stopped_by_watchpoint): Rewrite.
18012 (linux_stopped_data_address): Rewrite.
18013
18014 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18015
18016 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18017 switching the current inferior, not before.
18018
18019 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18020
18021 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18022 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18023 i386-linux.c and amd64-linux.c.
18024 (reg-i386.o): Removed.
18025 (reg-i386.c): Likewise.
18026 (reg-i386-linux.o): Likewise.
18027 (reg-i386-linux.c): Likewise.
18028 (reg-x86-64.o): Likewise.
18029 (reg-x86-64.c): Likewise.
18030 (reg-x86-64-linux.o): Likewise.
18031 (reg-x86-64-linux.c): Likewise.
18032 (i386.o): New.
18033 (i386.c): Likewise.
18034 (i386-linux.o): Likewise.
18035 (i386-linux.c): Likewise.
18036 (amd64.o): Likewise.
18037 (amd64.c): Likewise.
18038 (amd64-linux.o): Likewise.
18039 (amd64-linux.c): Likewise.
18040
18041 * configure.srv (srv_i386_regobj): New.
18042 (srv_i386_linux_regobj): Likewise.
18043 (srv_amd64_regobj): Likewise.
18044 (srv_amd64_linux_regobj): Likewise.
18045 (srv_i386_32bit_xmlfiles): Likewise.
18046 (srv_i386_64bit_xmlfiles): Likewise.
18047 (srv_i386_xmlfiles): Likewise.
18048 (srv_amd64_xmlfiles): Likewise.
18049 (srv_i386_linux_xmlfiles): Likewise.
18050 (srv_amd64_linux_xmlfiles): Likewise.
18051 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18052 srv_xmlfiles to $srv_i386_xmlfiles.
18053 (i[34567]86-*-mingw32ce*): Likewise.
18054 (i[34567]86-*-mingw*): Likewise.
18055 (i[34567]86-*-nto*): Likewise.
18056 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18057 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18058 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18059 (x86_64-*-linux*): Likewise.
18060
18061 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18062 (init_registers_amd64_linux): New.
18063 (x86_arch_setup): Replace init_registers_x86_64_linux with
18064 init_registers_amd64_linux.
18065
18066 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18067
18068 * configure.ac: Check for libdl. If it is not available link against
18069 static libthread_db.
18070 * configure: Regenerate.
18071
18072 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18073
18074 PR9605
18075
18076 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18077 handing a read watchpoint.
18078 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18079
18080 2010-02-12 Doug Evans <dje@google.com>
18081
18082 * linux-low.c (linux_supports_tracefork_flag): Document.
18083 (linux_look_up_symbols): Add comment.
18084
18085 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18086
18087 * regcache.c (supply_register): Clear regcache if buf is NULL.
18088
18089 2010-02-02 Nicolas Roche <roche@sourceware.org>
18090 Joel Brobecker <brobecker@adacore.com>
18091
18092 * inferiors.c (find_inferior): Add function documentation.
18093 (unloaded_dll): Handle the case where the unloaded dll has not
18094 been previously registered in the dll list.
18095
18096 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18097
18098 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18099 (thumb2_breakpoint): New.
18100 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18101
18102 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18103
18104 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18105 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18106 breakpoints.
18107
18108 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18109
18110 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18111
18112 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18113
18114 * linux-s390-low.c (s390_collect_ptrace_register)
18115 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18116
18117 2010-01-21 Doug Evans <dje@google.com>
18118
18119 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18120 (PTRACE_ARG4_TYPE): New macro.
18121 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18122 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18123 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18124 (usr_store_inferior_registers): Ditto.
18125 (linux_read_memory, linux_write_memory): Ditto.
18126 (linux_test_for_tracefork): Ditto.
18127
18128 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18129 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18130
18131 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18132
18133 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18134 target.
18135
18136 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18137
18138 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18139 prototype to take a regcache. Adjust.
18140
18141 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18142
18143 * regcache.h (struct thread_info): Forward declare.
18144 (struct regcache): New.
18145 (new_register_cache): Adjust prototype.
18146 (get_thread_regcache): Declare.
18147 (free_register_cache): Adjust prototype.
18148 (registers_to_string, registers_from_string): Ditto.
18149 (supply_register, supply_register_by_name, collect_register)
18150 (collect_register_as_string, collect_register_by_name): Ditto.
18151 * regcache.c (struct inferior_regcache_data): Delete.
18152 (get_regcache): Rename to ...
18153 (get_thread_regcache): ... this. Adjust. Switch inferior before
18154 fetching registers.
18155 (regcache_invalidate_one): Adjust.
18156 (regcache_invalidate): Fix prototype.
18157 (new_register_cache): Return the new register cache.
18158 (free_register_cache): Change prototype.
18159 (realloc_register_cache): Adjust.
18160 (registers_to_string): Change prototype to take a regcache. Adjust.
18161 (registers_from_string): Ditto.
18162 (register_data): Ditto.
18163 (supply_register): Ditto.
18164 (supply_register_by_name): Ditto.
18165 (collect_register): Ditto.
18166 (collect_register_as_string): Ditto.
18167 (collect_register_by_name): Ditto.
18168 * server.c (process_serial_event): Adjust.
18169 * linux-low.h (regset_fill_func, regset_store_func): Change
18170 prototype.
18171 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18172 Change prototype.
18173 * linux-low.c (get_stop_pc): Adjust.
18174 (check_removed_breakpoint): Adjust.
18175 (linux_wait_for_event): Adjust.
18176 (linux_resume_one_lwp): Adjust.
18177 (fetch_register): Add regcache parameter. Adjust.
18178 (usr_store_inferior_registers): Ditto.
18179 (regsets_fetch_inferior_registers): Ditto.
18180 (regsets_store_inferior_registers): Ditto.
18181 (linux_fetch_registers, linux_store_registers): Ditto.
18182 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18183 regcache. Adjust.
18184 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18185 Ditto.
18186 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18187 prototype to take a regcache.
18188 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18189 * remote-utils.c (convert_ascii_to_int, outreg)
18190 (prepare_resume_reply): Change prototype to take a regcache.
18191 Adjust.
18192 * target.h (struct target_ops) <fetch_registers, store_registers>:
18193 Change prototype to take a regcache.
18194 (fetch_inferior_registers, store_inferior_registers): Change
18195 prototype to take a regcache. Adjust.
18196 * proc-service.c (ps_lgetregs): Adjust.
18197 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18198 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18199 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18200 take a regcache. Adjust.
18201 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18202 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18203 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18204 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18205 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18206 (cris_cannot_fetch_register):
18207 (cris_breakpoint_at): Change prototype to take a regcache.
18208 Adjust.
18209 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18210 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18211 to take a regcache. Adjust.
18212 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18213 Adjust.
18214 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18215 take a regcache. Adjust.
18216 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18217 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18218 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18219 * linux-mips-low.c (mips_get_pc):
18220 (mips_set_pc): Change prototype to take a regcache. Adjust.
18221 (mips_reinsert_addr): Adjust.
18222 (mips_collect_register): Change prototype to take a regcache.
18223 Adjust.
18224 (mips_supply_register):
18225 (mips_collect_register_32bit, mips_supply_register_32bit)
18226 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18227 (mips_store_fpregset): Ditto.
18228 * linux-ppc-low.c (ppc_supply_ptrace_register)
18229 (ppc_supply_ptrace_register): Ditto.
18230 (parse_spufs_run): Adjust.
18231 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18232 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18233 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18234 take a regcache. Adjust.
18235 * linux-s390-low.c (s390_collect_ptrace_register)
18236 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18237 (s390_set_pc): Change prototype to take a regcache. Adjust.
18238 (s390_arch_setup): Adjust.
18239 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18240 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18241 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18242 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18243 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18244 regcache. Adjust.
18245 (sparc_breakpoint_at): Adjust.
18246 * linux-xtensa-low.c (xtensa_fill_gregset):
18247 (xtensa_store_gregset):
18248 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18249 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18250 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18251 prototype to take a regcache. Adjust.
18252 * win32-arm-low.c (arm_fetch_inferior_register)
18253 (arm_store_inferior_register): Change prototype to take a
18254 regcache. Adjust.
18255 * win32-i386-low.c (i386_fetch_inferior_register)
18256 (i386_store_inferior_register): Change prototype to take a
18257 regcache. Adjust.
18258 * win32-low.c (child_fetch_inferior_registers)
18259 (child_store_inferior_registers): Change prototype to take a
18260 regcache. Adjust.
18261 (win32_wait): Adjust.
18262 (win32_fetch_inferior_registers): Change prototype to take a
18263 regcache. Adjust.
18264 (win32_store_inferior_registers): Adjust.
18265 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18266 store_inferior_register>: Change prototype to take a regcache.
18267
18268 2010-01-20 Doug Evans <dje@google.com>
18269
18270 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18271 #ifdef.
18272 (linux_wait_for_event1, linux_init_signals): Ditto.
18273 (W_STOPCODE): Provide definition if missing.
18274
18275 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18276
18277 * linux-low.c (linux_core_of_thread): New.
18278 (compare_ints, show_process, list_threads): New.
18279 (linux_qxfer_osdata): Report threads and cores.
18280 (linux_target_op): Register linux_core_of_thread.
18281 * remote-utils.c (prepare_resume_reply): Report the core.
18282 (buffer_xml_printf): Support %d specifier.
18283 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18284 New.
18285 (handle_query): Handle qXfer:threads. Announce availability
18286 thereof.
18287 * target.h (struct target_ops): New field core_of_thread.
18288
18289 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18290
18291 * Makefile.in (clean): Remove new generated files.
18292 (reg-s390.o, reg-s390.c): Remove rules.
18293 (reg-s390x.o, reg-s390x.c): Likewise.
18294 (s390-linux32.o, s390-linux32.c): Add rules.
18295 (s390-linux64.o, s390-linux64.c): Likewise.
18296 (s390x-linux64.o, s390x-linux64.c): Likewise.
18297 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18298 * linux-s390-low.c: Include <elf.h>.
18299 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18300 (init_registers_s390): Remove prototype.
18301 (init_registers_s390x): Likewise.
18302 (init_registers_s390_linux32): Add prototype.
18303 (init_registers_s390_linux64): Likewise.
18304 (init_registers_s390x_linux64): Likewise.
18305 (s390_num_regs_3264): New define.
18306 (s390_regmap_3264): New global variable.
18307 (s390_cannot_fetch_register): Remove obsolete check.
18308 (s390_cannot_store_register): Likewise.
18309 (s390_collect_ptrace_register): Handle upper/lower register halves.
18310 (s390_supply_ptrace_register): Likewise.
18311 (s390_fill_gregset): Update to register number changes.
18312 (s390_get_hwcap): New routine.
18313 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18314 Install appropriate regmap and register set.
18315
18316 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18317
18318 * server.c (gdbserver_version): Update copyright year to 2010.
18319 * gdbreplay.c (gdbreplay_version): Likewise.
18320
18321 2009-12-28 Doug Evans <dje@google.com>
18322
18323 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18324 elf/external.h. Include <elf.h> instead but only if necessary.
18325
18326 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18327
18328 * linux-low.c (linux_remove_process): Remove `detaching'
18329 parameter. Don't release/detach from thread_db here.
18330 (linux_kill): Release/detach from thread_db here, ...
18331 (linux_detach): ... and here, before actually detaching.
18332 (linux_wait_1): ... and here, when a process exits.
18333 * thread-db.c (any_thread_of): New.
18334 (thread_db_free): Switch the current inferior to a thread of the
18335 passed in process.
18336
18337 2009-12-21 Doug Evans <dje@google.com>
18338
18339 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18340
18341 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18342 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18343 warning ifndef __NR_tkill. Move setting of errno there too.
18344 Delete unnecessary resetting of errno after syscall.
18345 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18346
18347 * configure.ac: Check for dladdr.
18348 * config.in: Regenerate.
18349 * configure: Regenerate.
18350 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18351 (try_thread_db_load): Update.
18352
18353 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18354
18355 2009-12-18 Doug Evans <dje@google.com>
18356
18357 * event-loop.c: Include unistd.h if it exists.
18358
18359 * linux-low.c (my_waitpid): Move definition away from being in
18360 between linux_tracefork_child/linux_test_for_tracefork.
18361
18362 * gdb_proc_service.h (psaddr_t): Fix type.
18363 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18364 signature to match glibc.
18365
18366 2009-12-16 Doug Evans <dje@google.com>
18367
18368 * linux-low.c (linux_read_memory): Fix argument to read.
18369
18370 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18371
18372 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18373 events, don't leave current_inferior pointing at null.
18374
18375 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18376
18377 * win32-low.c (LOG): Delete.
18378 (OUTMSG): Output to stderr.
18379 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18380 on compile time LOG macro.
18381 (win32_wait): Fix debug output.
18382
18383 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18384
18385 * win32-low.c (win32_add_one_solib): If the dll name is
18386 "ntdll.dll", prepend the system directory to the dll path.
18387
18388 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18389
18390 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18391
18392 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18393 Vladimir Prus <vladimir@codesourcery.com>
18394
18395 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18396 * configure.ac: Check for __mcoldfire__ and set
18397 gdb_cv_m68k_is_coldfire.
18398 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18399 reg-cf.o and reg-m68k.o.
18400 * configure: Regenerated.
18401
18402 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18403
18404 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18405 Pass it to thread_db_free.
18406 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18407 proper `detaching' argument to linux_remove_process.
18408 * linux-low.h (thread_db_free): Add `detaching' parameter.
18409 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18410 to thread_db_free.
18411 (thread_db_free): Add `detaching' parameter. Only
18412 call td_ta_clear_event if detaching from process.
18413
18414 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18415
18416 * thread-db.c (thread_db_free): Fix typo.
18417
18418 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18419
18420 PR gdb/10838
18421 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18422
18423 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18424
18425 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18426 with an i686 compiler.
18427 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18428 needed.
18429 * configure: Rebuilt.
18430
18431 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18432
18433 PR gdb/10783
18434
18435 * server.c (handle_search_memory_1): Correct read_addr initialization
18436 in loop for searching subsequent chunks.
18437
18438 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18439
18440 * configure.ac: New --with-libthread-db option.
18441 * thread-db.c: Allow direct dependence on libthread_db.
18442 (thread_db_free): Adjust.
18443 * config.in: Regenerate.
18444 * configure: Likewise.
18445
18446 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18447
18448 PR gdb/10757
18449 * thread-db.c (attach_thread): New function.
18450 (maybe_attach_thread): Return success/failure.
18451 (find_new_threads_callback): Adjust.
18452 (thread_db_find_new_threads): Loop until no new threads.
18453
18454 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18455
18456 * proc-service.c (ps_lgetregs): Formatting.
18457
18458 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18459
18460 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18461 * configure.ac: Adjust.
18462 * linux-low.h (struct process_info_private): Move members to struct
18463 thread_db.
18464 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18465 * linux-low.c (linux_remove_process): Adjust.
18466 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18467 * server.c (handle_query): Move code ...
18468 (handle_monitor_command): ... here. New function.
18469 * target.h (struct target_ops): New member.
18470 * thread-db.c (struct thread_db): New.
18471 (libthread_db_search_path): New variable.
18472 (thread_db_create_event, thread_db_enable_reporting)
18473 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18474 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18475 (try_thread_db_load_1, dladdr_to_soname): New functions.
18476 (try_thread_db_load, thread_db_load_search): New functions.
18477 (thread_db_init): Search for libthread_db.
18478 (thread_db_free): New function.
18479 (thread_db_handle_monitor_command): Likewise.
18480 * config.in: Regenerate.
18481 * configure: Regenerate.
18482
18483 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18484
18485 * spu-low.c (spu_kill): Wait for inferior to terminate.
18486 Call clear_inferiors.
18487 (spu_detach): Call clear_inferiors.
18488
18489 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18490
18491 * aclocal.m4: Regenerate.
18492 * config.in: Likewise.
18493 * configure: Likewise.
18494
18495 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18496
18497 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18498 (parse_spufs_run): New function.
18499 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18500 (ppc_breakpoint_at): Handle SPU breakpoints.
18501
18502 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18503
18504 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18505 (SPUFS_MAGIC): Define.
18506 (spu_enumerate_spu_ids): New function.
18507 (linux_qxfer_spu): New function.
18508 (linux_target_ops): Install linux_qxfer_spu.
18509
18510 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18511
18512 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18513 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18514 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18515 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18516 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18517 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18518 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18519 (init_registers_powerpc_cell32l): Add prototype.
18520 (init_registers_powerpc_cell64l): Likewise.
18521 (ppc_arch_setup): Detect Cell/B.E. architecture.
18522
18523 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18524
18525 * Makefile.in (datarootdir): New variable.
18526
18527 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18528
18529 * linux-low.c (linux_write_memory): Update debugging output.
18530 * Makefile.in (clean): Add new descriptions.
18531 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18532 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18533 * configure.srv: Add new files for arm*-*-linux*.
18534 * linux-arm-low.c: Add new declarations.
18535 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18536 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18537 (HWCAP_VFPv3D16): New.
18538 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18539 instead of __IWMMXT__.
18540 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18541 (arm_arch_setup): New.
18542 (target_regsets): Remove #ifdef. Add VFP regset.
18543 (the_low_target): Use arm_arch_setup.
18544
18545 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18546
18547 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18548 the main thread again.
18549
18550 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18551
18552 Adding Neutrino gdbserver.
18553 * configure: Regenerated.
18554 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18555 * configure.srv (i[34567]86-*-nto*): New target.
18556 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18557 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18558 (nto_comctrl) [__QNX__]: New function.
18559 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18560
18561 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18562
18563 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18564 srv_tgtobj.
18565
18566 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18567 Pedro Alves <pedro@codesourcery.com>
18568
18569 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18570 don't support CONTEXT_EXTENDED_REGISTERS.
18571 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18572 (the_low_target): Install them.
18573 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18574 failing with ERROR_PIPE_NOT_CONNECTED.
18575
18576 2009-06-30 Doug Evans <dje@google.com>
18577 Pierre Muller <muller@ics.u-strasbg.fr>
18578
18579 Add h/w watchpoint support to x86-linux, win32-i386.
18580 * Makefile.in (SFILES): Add i386-low.c
18581 (i386_low_h): Define.
18582 (i386-low.o): Add dependencies.
18583 (linux-x86-low.o): Add i386-low.h dependency.
18584 (win32-i386-low.o): Ditto.
18585 * i386-low.c: New file.
18586 * i386-low.h: New file.
18587 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18588 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18589 * linux-low.c (linux_add_process): Initialize arch_private.
18590 (linux_remove_process): Free arch_private.
18591 (add_lwp): Initialize arch_private.
18592 (delete_lwp): Free arch_private.
18593 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18594 provided.
18595 * linux-low.h (process_info_private): New member arch_private.
18596 (lwp_info): New member arch_private.
18597 (linux_target_ops): New members new_process, new_thread,
18598 prepare_to_resume.
18599 (ptid_of): New macro.
18600 * linux-x86-low.c: Include stddef.h, i386-low.h.
18601 (arch_process_info): New struct.
18602 (arch_lwp_info): New struct.
18603 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18604 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18605 (i386_dr_low_get_status): New function.
18606 (x86_insert_point, x86_remove_point): New functions.
18607 (x86_stopped_by_watchpoint): New function.
18608 (x86_stopped_data_address): New function.
18609 (x86_linux_new_process, x86_linux_new_thread): New functions.
18610 (x86_linux_prepare_to_resume): New function.
18611 (the_low_target): Add entries for insert_point, remove_point,
18612 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18613 prepare_to_resume.
18614 * server.c (debug_hw_points): New global.
18615 (monitor_show_help): Document set debug-hw-points.
18616 (handle_query): Process "set debug-hw-points".
18617 * server.h (debug_hw_points): Declare.
18618 (paddress): Declare.
18619 * utils.c (NUMCELLS, CELLSIZE): New macros.
18620 (get_sell, xsnprintf, paddress): New functions.
18621 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18622 remove_point, stopped_by_watchpoint, stopped_data_address.
18623 * win32-i386-low.c: Include i386-low.h.
18624 (debug_reg_state): Replaces dr.
18625 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18626 (i386_dr_low_get_status): New function.
18627 (i386_insert_point, i386_remove_point): New functions.
18628 (i386_stopped_by_watchpoint): New function.
18629 (i386_stopped_data_address): New function.
18630 (i386_initial_stuff): Update.
18631 (get_thread_context,set_thread_context,i386_thread_added): Update.
18632 (the_low_target): Add entries for insert_point,
18633 remove_point, stopped_by_watchpoint, stopped_data_address.
18634 * win32-low.c (win32_insert_watchpoint): New function.
18635 (win32_remove_watchpoint): New function.
18636 (win32_stopped_by_watchpoint): New function.
18637 (win32_stopped_data_address): New function.
18638 (win32_target_ops): Add entries for insert_watchpoint,
18639 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18640 * win32-low.h (win32_target_ops): New members insert_point,
18641 remove_point, stopped_by_watchpoint, stopped_data_address.
18642
18643 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18644
18645 * server.c (process_serial_event): Re-return unsupported, not
18646 error, if the type isn't recognized. Re-allow supporting only
18647 insert or remove packets. Also call require_running for
18648 breakpoints. Add missing break statement to default case. Tidy.
18649 * target.h (struct target_ops): Rename insert_watchpoint to
18650 insert_point, and remove_watchpoint to remove_point.
18651
18652 * linux-low.h (struct linux_target_ops): Likewise.
18653 * linux-low.c (linux_insert_watchpoint): Rename to ...
18654 (linux_insert_point): ... this. Adjust.
18655 (linux_remove_watchpoint): Rename to ...
18656 (linux_remove_point): ... this. Adjust.
18657 (linux_target_ops): Adjust.
18658 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18659 (cris_insert_point): ... this.
18660 (cris_remove_watchpoint): Rename to ...
18661 (cris_remove_point): ... this.
18662 (the_low_target): Adjust.
18663
18664 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18665
18666 * server.c (handle_v_kill): Pass signal_pid to
18667 kill_inferior if multi_process is zero.
18668
18669 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18670
18671 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18672 * target.h (target_ops): Comment for *_watchpoint to make it clear
18673 the functions can get types '0' and '1'.
18674
18675 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18676
18677 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18678 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18679 * regcache.c (get_regcache): Likewise.
18680 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18681 * win32-low.c (child_fetch_inferior_registers): Remove check for
18682 regno 0.
18683
18684 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18685 Pedro Alves <pedro@codesourcery.com>
18686
18687 * target.h (struct target_ops) <supports_multi_process>: New
18688 callback.
18689 (target_supports_multi_process): New.
18690 * server.c (handle_query): Even if GDB reports support, only
18691 enable multi-process if the target also supports it. Report
18692 multi-process support only if the target backend supports it.
18693 * linux-low.c (linux_supports_multi_process): New function.
18694 (linux_target_ops): Install it as target_supports_multi_process
18695 callback.
18696
18697 2009-05-24 Doug Evans <dje@google.com>
18698
18699 Global renaming of find_thread_pid to find_thread_ptid.
18700 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18701 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18702 All callers updated.
18703
18704 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18705 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18706 directly.
18707
18708 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18709 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18710 (linux_resume_one_lwp): Ditto.
18711
18712 2009-05-23 Doug Evans <dje@google.com>
18713
18714 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18715 from struct inferior_list_entry * to struct lwp_info *.
18716 All callers updated.
18717
18718 2009-05-13 Doug Evans <dje@google.com>
18719
18720 * linux-x86-low.c: Don't include assert.h.
18721 (x86_siginfo_fixup): Use fatal, not assert.
18722 (x86_arch_setup): Fix comment.
18723
18724 2009-05-12 Doug Evans <dje@google.com>
18725
18726 Biarch support for i386/amd64 gdbserver.
18727 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18728 Add linux-x86-low.c.
18729 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18730 (linux-x86-low.o): Add.
18731 * linux-x86-64-low.c: Delete.
18732 * linux-i386-low.c: Delete.
18733 * linux-x86-low.c: New file.
18734 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18735 linux-x86-low.o.
18736 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18737 linux-x86-low.o.
18738 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18739 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18740 (linux_child_pid_to_exec_file): New function.
18741 (elf_64_header_p, elf_64_file_p): New functions.
18742 (siginfo_fixup): New function.
18743 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18744 give target a chance to convert layout.
18745 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18746 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18747
18748 2009-05-07 Doug Evans <dje@google.com>
18749
18750 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18751 (regsets_store_inferior_registers): Ditto.
18752
18753 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18754
18755 PR server/10048
18756
18757 * linux-low.c (must_set_ptrace_flags): Delete.
18758 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18759 of the global.
18760 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18761 `lwp->must_set_ptrace_flags' instead.
18762 (linux_wait_for_event_1): Set ptrace options here.
18763 (linux_wait_1): ... not here.
18764
18765 2009-04-30 Doug Evans <dje@google.com>
18766
18767 * inferiors.c (started_inferior_callback): New function.
18768 (attached_inferior_callback): New function.
18769 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18770 * server.c (print_started_pid, print_attached_pid): New functions.
18771 (detach_or_kill_for_exit): New function.
18772 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18773 * server.h (have_started_inferiors_p): Declare.
18774 (have_attached_inferiors_p): Declare.
18775
18776 * inferiors.c (remove_process): Fix memory leak, free process.
18777 * linux-low.c (linux_remove_process): New function.
18778 (linux_kill): Call it instead of remove_process.
18779 (linux_detach, linux_wait_1): Ditto.
18780
18781 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18782
18783 * configure.srv: Add x86 Windows CE target.
18784
18785 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18786
18787 * inferiors.c (get_thread_process): Make global.
18788 * server.h (get_thread_process): Add prototype.
18789 * thread-db.c (find_one_thread): Use get_thread_process
18790 instead of current_process.
18791 (thread_db_get_tls_address): Do not crash if called when
18792 thread layer is not yet initialized.
18793
18794 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18795
18796 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18797 * spu-low.c (current_tid): Rename to ...
18798 (current_ptid): ... this.
18799 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18800 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18801 ptid_get_lwp (current_ptid) instead of current_tid.
18802 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18803 instead of current_tid. Use find_process_pid to verify pid
18804 argument is valid. Pass proper argument to remove_process.
18805 (spu_thread_alive): Compare current_ptid instead of current_tid.
18806 (spu_resume): Likewise.
18807
18808 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18809
18810 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18811 variable.
18812
18813 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18814
18815 Implement the multiprocess extensions, and add linux multiprocess
18816 support.
18817
18818 * server.h (ULONGEST): Declare.
18819 (struct ptid, ptid_t): New.
18820 (minus_one_ptid, null_ptid): Declare.
18821 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18822 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18823 (struct inferior_list_entry): Change `id' type from unsigned from
18824 to ptid_t.
18825 (struct sym_cache, struct breakpoint, struct
18826 process_info_private): Forward declare.
18827 (struct process_info): Declare.
18828 (current_process): Declare.
18829 (all_processes): Declare.
18830 (initialize_inferiors): Declare.
18831 (add_thread): Adjust to use ptid_t.
18832 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18833 (add_process, remove_process, find_thread_pid): Declare.
18834 (find_inferior_id): Adjust to use ptid_t.
18835 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18836 (multi_process): Declare.
18837 (push_event): Adjust to use ptid_t.
18838 (read_ptid, write_ptid): Declare.
18839 (prepare_resume_reply): Adjust to use ptid_t.
18840 (clear_symbol_cache): Declare.
18841 * inferiors.c (all_processes): New.
18842 (null_ptid, minus_one_ptid): New.
18843 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18844 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18845 (add_thread): Change unsigned long to ptid. Remove gdb_id
18846 parameter. Adjust.
18847 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18848 (gdb_id_to_thread): Rename to ...
18849 (find_thread_pid): ... this. Change unsigned long to ptid.
18850 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18851 (loaded_dll, pull_pid_from_list): Adjust.
18852 (add_process, remove_process, find_process_pid)
18853 (get_thread_process, current_process, initialize_inferiors): New.
18854 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18855 (struct target_waitstatus) <related_pid>: Ditto.
18856 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18857 return type to int.
18858 (struct target_ops) <join>: Add `pid' argument.
18859 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18860 (struct target_ops) <wait>: Add `ptid' field. Change return type
18861 to ptid.
18862 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18863 (mywait): Add `ptid' argument. Change return type to ptid_t.
18864 (target_pid_to_str): Declare.
18865 * target.c (set_desired_inferior): Adjust to use ptids.
18866 (mywait): Add new `ptid' argument. Adjust.
18867 (target_pid_to_str): New.
18868 * mem-break.h (free_all_breakpoints): Declare.
18869 * mem-break.c (breakpoints): Delelete.
18870 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18871 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18872 to use per-process breakpoint list.
18873 (free_all_breakpoints): New.
18874 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18875 (symbol_cache, all_symbols_looked_up): Delete.
18876 (hexchars): New.
18877 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18878 read_ptid): New.
18879 (prepare_resume_reply): Change ptid argument's type from unsigned
18880 long to ptid_t. Adjust. Implement W;process and X;process.
18881 (free_sym_cache, clear_symbol_cache): New.
18882 (look_up_one_symbol): Adjust to per-process symbol cache. *
18883 * server.c (cont_thread, general_thread, step_thread): Change type
18884 to ptid_t.
18885 (attached): Delete.
18886 (multi_process): New.
18887 (last_ptid): Change type to ptid_t.
18888 (struct vstop_notif) <ptid>: Change type to ptid_t.
18889 (queue_stop_reply, push_event): Change `ptid' argument's type to
18890 ptid_t.
18891 (discard_queued_stop_replies): Add `pid' argument.
18892 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18893 changes. Don't reference the `attached' global.
18894 (attach_inferior): Adjust to mywait interface changes.
18895 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18896 features. Handle and report "multiprocess+". Handle
18897 "qAttached:PID".
18898 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18899 changes.
18900 (handle_v_kill): New.
18901 (handle_v_stopped): Adjust to use target_pid_to_str.
18902 (handle_v_requests): Allow multiple attaches and runs when
18903 multiprocess extensions are in effect. Handle "vKill".
18904 (myresume): Adjust to use ptids.
18905 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18906 (handle_status): Adjust to discard_queued_stop_replies interface
18907 change.
18908 (first_thread_of, kill_inferior_callback)
18909 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18910 (main): Call initialize_inferiors. Adjust to use ptids, killing
18911 and detaching from all inferiors. Handle multiprocess packet
18912 variants.
18913 * linux-low.h: Include gdb_proc_service.h.
18914 (struct process_info_private): New.
18915 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18916 <lwpid_of>: Use ptid_get_lwp.
18917 (get_lwp_thread): Adjust.
18918 (struct lwp_info): Add `dead' member.
18919 (find_lwp_pid): Declare.
18920 * linux-low.c (thread_db_active): Delete.
18921 (new_inferior): Adjust comment.
18922 (inferior_pid): Delete.
18923 (linux_add_process): New.
18924 (handle_extended_wait): Adjust.
18925 (add_lwp): Change unsigned long to ptid.
18926 (linux_create_inferior): Add process to processes table. Adjust
18927 to use ptids. Don't set new_inferior here.
18928 (linux_attach_lwp): Rename to ...
18929 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18930 it. Adjust to use ptids.
18931 (linux_attach_lwp): New.
18932 (linux_attach): Add process to processes table. Don't set
18933 new_inferior here.
18934 (struct counter): New.
18935 (second_thread_of_pid_p, last_thread_of_process_p): New.
18936 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18937 multiple processes.
18938 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18939 processes. Remove process from process table.
18940 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18941 to multiple processes.
18942 (any_thread_of): New.
18943 (linux_detach): Add `pid' argument, and handle it. Remove process
18944 from processes table.
18945 (linux_join): Add `pid' argument. Handle it.
18946 (linux_thread_alive): Change unsighed long argument to ptid_t.
18947 Consider dead lwps as not being alive.
18948 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18949 threads we're not interested in.
18950 (same_lwp, find_lwp_pid): New.
18951 (linux_wait_for_lwp): Change `pid' argument's type from int to
18952 ptid_t. Adjust.
18953 (linux_wait_for_event): Rename to ...
18954 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18955 from int to ptid_t. Adjust.
18956 (linux_wait_for_event): New.
18957 (linux_wait_1): Add `ptid' argument. Change return type to
18958 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18959 that exit from the process table.
18960 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18961 Adjust.
18962 (mark_lwp_dead): New.
18963 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18964 stopping all threads, mark its main lwp as dead.
18965 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18966 ptids.
18967 (fetch_register, usr_store_inferior_registers)
18968 (regsets_fetch_inferior_registers)
18969 (regsets_store_inferior_registers, linux_read_memory)
18970 (linux_write_memory): Inline `inferior_pid'.
18971 (linux_look_up_symbols): Adjust to use per-process
18972 `thread_db_active'.
18973 (linux_request_interrupt): Adjust to use ptids.
18974 (linux_read_auxv): Inline `inferior_pid'.
18975 (initialize_low): Don't reference thread_db_active.
18976 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18977 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18978 (ps_getpid): Return the pid of the current inferior.
18979 * thread-db.c (proc_handle, thread_agent): Delete.
18980 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18981 per-process data.
18982 (find_one_thread): Change argument type to ptid_t. Adjust to
18983 per-process data.
18984 (maybe_attach_thread): Adjust to per-process data and ptids.
18985 (thread_db_find_new_threads): Ditto.
18986 (thread_db_init): Ditto.
18987 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18988 processes table. Adjust to use ptids.
18989 (spu_kill, spu_detach): Adjust interface. Remove process from
18990 processes table.
18991 (spu_join, spu_thread_alive): Adjust interface.
18992 (spu_wait): Adjust interface. Remove process from processes
18993 table. Adjust to use ptids.
18994 * win32-low.c (current_inferior_tid): Delete.
18995 (current_inferior_ptid): New.
18996 (debug_event_ptid): New.
18997 (thread_rec): Take a ptid. Adjust.
18998 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18999 (child_delete_thread): Ditto.
19000 (do_initial_child_stuff): Add `attached' argument. Add process to
19001 processes table.
19002 (child_fetch_inferior_registers, child_store_inferior_registers):
19003 Adjust.
19004 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19005 (win32_attach): Pass 1 to do_initial_child_stuff.
19006 (win32_kill): Adjust interface. Remove process from processes
19007 table.
19008 (win32_detach): Ditto.
19009 (win32_join): Adjust interface.
19010 (win32_thread_alive): Take a ptid.
19011 (win32_resume): Adjust to use ptids.
19012 (get_child_debug_event): Ditto.
19013 (win32_wait): Adjust interface. Remove exiting process from
19014 processes table.
19015
19016 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19017
19018 Non-stop mode support.
19019
19020 * server.h (non_stop): Declare.
19021 (gdb_client_data, handler_func): Declare.
19022 (delete_file_handler, add_file_handler, start_event_loop):
19023 Declare.
19024 (handle_serial_event, handle_target_event, push_event)
19025 (putpkt_notif): Declare.
19026 * target.h (enum resume_kind): New.
19027 (struct thread_resume): Replace `step' field by `kind' field.
19028 (TARGET_WNOHANG): Define.
19029 (struct target_ops) <wait>: Add `options' argument.
19030 <supports_non_stop, async, start_non_stop>: New fields.
19031 (target_supports_non_stop, target_async): New.
19032 (start_non_stop): Declare.
19033 (mywait): Add `options' argument.
19034 * target.c (mywait): Add `options' argument. Print child exit
19035 notifications here.
19036 (start_non_stop): New.
19037 * server.c (non_stop, own_buf, mem_buf): New globals.
19038 (struct vstop_notif): New.
19039 (notif_queue): New global.
19040 (queue_stop_reply, push_event, discard_queued_stop_replies)
19041 (send_next_stop_reply): New.
19042 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19043 interface changes.
19044 (attach_inferior): In non-stop mode, don't wait for the target
19045 here.
19046 (handle_general_set): Handle QNonStop.
19047 (handle_query): When handling qC, return the current general
19048 thread, instead of the first thread of the list.
19049 (handle_query): If the backend supports non-stop mode, include
19050 QNonStop+ in the qSupported query response.
19051 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19052 and non-stop mode.
19053 (handle_v_attach, handle_v_run): Handle non-stop mode.
19054 (handle_v_stopped): New.
19055 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19056 (myresume): Adjust to use resume_kind. Handle non-stop.
19057 (queue_stop_reply_callback): New.
19058 (handle_status): Handle non-stop mode.
19059 (main): Clear non_stop flag on reconnection. Use the event-loop.
19060 Refactor serial protocol handling from here ...
19061 (process_serial_event): ... to this new function. When GDB
19062 selects any thread, select one here. In non-stop mode, wait until
19063 GDB acks all pending events before exiting.
19064 (handle_serial_event, handle_target_event): New.
19065 * remote-utils.c (remote_open): Install remote_desc in the event
19066 loop.
19067 (remote_close): Remove remote_desc from the event loop.
19068 (putpkt_binary): Rename to...
19069 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19070 (putpkt_binary): New as wrapper around putpkt_binary_1.
19071 (putpkt_notif): New.
19072 (prepare_resume_reply): In non-stop mode, don't change the
19073 general_thread.
19074 * event-loop.c: New.
19075 * Makefile.in (OBJ): Add event-loop.o.
19076 (event-loop.o): New rule.
19077
19078 * linux-low.h (pid_of): Moved here.
19079 (lwpid_of): New.
19080 (get_lwp_thread): Use lwpid_of.
19081 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19082 * linux-low.c (pid_of): Delete.
19083 (inferior_pid): Use lwpid_of.
19084 (linux_event_pipe): New.
19085 (target_is_async_p): New.
19086 (delete_lwp): New.
19087 (handle_extended_wait): Use lwpid_of.
19088 (add_lwp): Don't set lwpid field.
19089 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19090 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19091 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19092 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19093 first. Adjust to linux_wait_for_event interface changes. Use
19094 lwpid_of.
19095 (linux_detach): Don't delete the main lwp here.
19096 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19097 (status_pending_p): Don't consider explicitly suspended lwps.
19098 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19099 pointer. Add OPTIONS argument. Change return type to int. Use
19100 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19101 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19102 pointer. Add status pointer argument. Return a pid instead of a
19103 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19104 changes. In non-stop mode, don't switch to a random thread.
19105 (linux_wait): Rename to...
19106 (linux_wait_1): ... this. Add target_options argument, and handle
19107 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19108 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19109 clean exit and signal exit code. Don't stop all threads in
19110 non-stop mode. In all-stop mode, only stop all threads when
19111 reporting a stop to GDB. Handle explicit thread stop requests.
19112 (async_file_flush, async_file_mark): New.
19113 (linux_wait): New.
19114 (send_sigstop): Use lwpid_of.
19115 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19116 interface changes. In non-stop mode, don't switch to a random
19117 thread.
19118 (linux_resume_one_lwp): Use lwpid_of.
19119 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19120 (linux_resume_one_thread): ... this. Handle resume_stop. In
19121 non-stop mode, don't look for pending flag in all threads.
19122 (resume_status_pending_p): Don't consider explicitly suspended
19123 threads.
19124 (my_waitpid): Reimplement. Emulate __WALL.
19125 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19126 Use lwpid_of.
19127 (sigchld_handler, linux_supports_non_stop, linux_async)
19128 (linux_start_non_stop): New.
19129 (linux_target_ops): Register linux_supports_non_stop, linux_async
19130 and linux_start_non_stop.
19131 (initialize_low): Install SIGCHLD handler.
19132 * thread-db.c (thread_db_create_event, find_one_thread)
19133 (thread_db_get_tls_address): Use lwpid_of.
19134 * win32-low.c (win32_detach): Adjust to use resume_kind.
19135 (win32_wait): Add `options' argument.
19136 * spu-low.c (spu_resume): Adjust to use resume_kind.
19137 (spu_wait): Add `options' argument.
19138
19139 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19140
19141 Decouple target code from remote protocol.
19142
19143 * target.h (enum target_waitkind): New.
19144 (struct target_waitstatus): New.
19145 (struct target_ops) <wait>: Return an unsigned long. Take a
19146 target_waitstatus pointer instead of a char pointer.
19147 (mywait): Likewise.
19148 * target.c (mywait): Change prototype to return an unsigned long.
19149 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19150 * server.h (thread_from_wait, old_thread_from_wait): Delete
19151 declarations.
19152 (prepare_resume_reply): Change prototype to take a
19153 target_waitstatus.
19154 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19155 (last_status, last_ptid): New.
19156 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19157 pid instead of a signal.
19158 (attach_inferior): Remove "status" and "signal" parameters.
19159 Adjust.
19160 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19161 not as an address.
19162 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19163 (handle_v_requests, myresume): Remove "status" and "signal"
19164 parameters. Adjust.
19165 (handle_status): New.
19166 (main): Delete local `status'. Adjust.
19167 * remote-utils.c: Include target.h.
19168 (prepare_resume_reply): Change prototype to take a
19169 target_waitstatus. Adjust.
19170
19171 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19172 interface.
19173 * spu-low.c (spu_wait): Adjust.
19174 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19175 Delete.
19176 (win32_wait): Adjust.
19177
19178 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19179
19180 * target.h (struct thread_resume): Delete leave_stopped member.
19181 (struct target_ops): Add a `n' argument to the `resume' callback.
19182 * server.c (start_inferior): Adjust.
19183 (handle_v_cont, myresume): Adjust.
19184 * linux-low.c (check_removed_breakpoint): Adjust to resume
19185 interface change, and to removed leave_stopped field.
19186 (resume_ptr): Delete.
19187 (struct thread_resume_array): New.
19188 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19189 resume interface change.
19190 (linux_continue_one_thread, linux_queue_one_thread)
19191 (resume_status_pending_p): Check if the resume field is NULL
19192 instead of checking the leave_stopped member.
19193 (linux_resume): Adjust to the target resume interface change.
19194 * spu-low.c (spu_resume): Adjust to the target resume interface
19195 change.
19196 * win32-low.c (win32_detach, win32_resume): Ditto.
19197
19198 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19199
19200 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19201 flag.
19202 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19203 pending.
19204 (linux_continue_one_thread): Only preserve the stepping flag if
19205 there's a pending breakpoint.
19206
19207 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19208
19209 * server.c (main): After the inferior having exited, call
19210 remote_close before exiting gdbserver.
19211
19212 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19213
19214 Fix size of FPSCR in Power 7 processors.
19215 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19216 (PPC_FEATURE_HAS_DFP): New #define.
19217 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19218 size of the FPSCR.
19219
19220 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19221
19222 * server.c (handle_query) Whitespace and formatting.
19223
19224 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19225
19226 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19227 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19228 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19229 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19230 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19231 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19232 Makefile.in, configure.ac: Fix whitespace throughout.
19233 * configure: Regenerate.
19234
19235 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19236
19237 * inferiors.c (find_inferior): Make it safe for the callback
19238 function to delete the currently iterated inferior.
19239
19240 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19241
19242 * Makefile.in (linuw_low_h): Move higher.
19243 (thread-db.o): Depend on $(linux_low_h).
19244
19245 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19246
19247 Rename "process" to "lwp" throughout.
19248
19249 * linux-low.c (all_processes): Rename to...
19250 (all_lwps): ... this.
19251 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19252 (add_process): Rename to ...
19253 (add_lwp): ... this. Adjust.
19254 (linux_create_inferior): Adjust.
19255 (linux_attach_lwp): Adjust.
19256 (linux_attach): Adjust.
19257 (linux_kill_one_process): Rename to ...
19258 (linux_kill_one_lwp): ... this. Adjust.
19259 (linux_kill): Adjust.
19260 (linux_detach_one_process): Rename to ...
19261 (linux_detach_one_lwp): ... this. Adjust.
19262 (linux_detach): Adjust.
19263 (check_removed_breakpoint): Adjust.
19264 (status_pending_p): Adjust.
19265 (linux_wait_for_process): Rename to ...
19266 (linux_wait_for_lwp): ... this. Adjust.
19267 (linux_wait_for_event): Adjust.
19268 (send_sigstop): Adjust.
19269 (wait_for_sigstop): Adjust.
19270 (stop_all_processes): Rename to ...
19271 (stop_all_lwps): ... this.
19272 (linux_resume_one_process): Rename to ...
19273 (linux_resume_one_lwp): ... this. Adjust.
19274 (linux_set_resume_request, linux_continue_one_thread)
19275 (linux_queue_one_thread, resume_status_pending_p)
19276 (usr_store_inferior_registers, regsets_store_inferior_registers)
19277 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19278 Adjust.
19279 * linux-low.h (get_process): Rename to ...
19280 (get_lwp): ... this. Adjust.
19281 (get_thread_process): Rename to ...
19282 (get_thread_lwp): ... this. Adjust.
19283 (get_process_thread): Rename to ...
19284 (get_lwp_thread): ... this. Adjust.
19285 (struct process_info): Rename to ...
19286 (struct lwp_info): ... this.
19287 (all_processes): Rename to ...
19288 (all_lwps): ... this.
19289 * proc-service.c (ps_lgetregs): Adjust.
19290 * thread-db.c (thread_db_create_event, find_one_thread)
19291 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19292
19293 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19294
19295 * server.c (handle_query): Handle "qAttached".
19296
19297 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19298
19299 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19300 GPLv3, update license URL.
19301
19302 2009-03-01 Doug Evans <dje@google.com>
19303
19304 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19305 (server_h): Add gdb_signals.h.
19306 (signals.o): Update.
19307 * server.h (target_signal_from_host,target_signal_to_host_p)
19308 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19309
19310 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19311
19312 * remote-utils.c (getpkt): Also generate remote-debug
19313 information if noack_mode is set.
19314
19315 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19316
19317 * server.c (handle_query): Report qXfer:siginfo:read and
19318 qXfer:siginfo:write as supported and handle them.
19319 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19320 * linux-low.c (linux_xfer_siginfo): New.
19321 (linux_target_ops): Set it.
19322
19323 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19324
19325 * server.c (gdbserver_usage): Mention --remote-debug.
19326 (main): Accept '--remote-debug' switch.
19327
19328 2009-01-18 Doug Evans <dje@google.com>
19329
19330 * regcache.c (new_register_cache): No need to check result of xcalloc.
19331 * server.c (handle_search_memory): Back out calls to xmalloc,
19332 result is checked and error is returned to user upon failure.
19333 (handle_query): Ditto. Add more checks for result of malloc.
19334 (handle_v_cont): Check result of malloc, report error back to
19335 user upon failure.
19336 (handle_v_run): Ditto. Call freeargv.
19337 * server.h (freeargv): Declare.
19338 * utils.c (freeargv): New fn.
19339
19340 2009-01-15 Doug Evans <dje@google.com>
19341
19342 * gdbreplay.c (perror_with_name): Make arg const char *.
19343 * server.h (target_signal_to_name): Make return type const char *.
19344 * thread-db.c (thread_db_err_str): Make return type const char *.
19345 * utils.c (perror_with_name): Make arg const char *.
19346
19347 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19348
19349 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19350 when handling a EXIT_PROCESS_DEBUG_EVENT.
19351
19352 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19353
19354 * gdbreplay.c (gdbreplay_version): Update copyright year.
19355 * server.c (gdbserver_version): Likewise.
19356
19357 2009-01-05 Doug Evans <dje@google.com>
19358
19359 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19360 (handle_extended_wait): Improve comment.
19361
19362 2008-12-13 Doug Evans <dje@google.com>
19363
19364 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19365 * server.h (ATTR_MALLOC): New macro.
19366 (xmalloc,xcalloc,xstrdup): Declare.
19367 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19368 * inferiors.c: Ditto.
19369 * linux-low.c: Ditto.
19370 * mem-break.c: Ditto.
19371 * regcache.c: Ditto.
19372 * remote-utils.c: Ditto.
19373 * server.c: Ditto.
19374 * target.c: Ditto.
19375 * win32-low.c: Ditto.
19376
19377 2008-12-12 Doug Evans <dje@google.com>
19378
19379 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19380 in debugging printf.
19381
19382 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19383
19384 2008-12-09 Doug Evans <dje@google.com>
19385
19386 * linux-low.h (struct process_info): Delete member tid, unused.
19387 * thread-db.c (find_one_thread): Update.
19388 (maybe_attach_thread): Update.
19389
19390 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19391
19392 * target.h (struct target_ops): Add qxfer_osdata member.
19393 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19394 and dirent.h.
19395 (linux_qxfer_osdata): New functions.
19396 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19397 callback.
19398 * server.c (handle_query): Handle "qXfer:osdata:read:".
19399 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19400 (buffer_xml_printf): New functions.
19401 * server.h (struct buffer): New.
19402 (buffer_grow_str, buffer_grow_str0): New macros.
19403 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19404 (buffer_xml_printf): Declare.
19405
19406 2008-11-24 Doug Evans <dje@google.com>
19407
19408 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19409
19410 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19411
19412 * server.c (handle_v_run): Always use the supplied argument list.
19413
19414 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19415
19416 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19417 (xtensa_regmap_table): Add entry for scompare1.
19418
19419 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19420
19421 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19422 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19423 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19424 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19425 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19426 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19427 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19428 XML target descriptions.
19429 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19430 when inferior is running on an ISA 2.05 or later processor. Add
19431 special case to return offset for full 64-bit slot of FPSCR when
19432 in 32-bits.
19433
19434 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19435
19436 * Makefile.in (SFILES, clean): Added sparc64 files.
19437 (reg-sparc64.o, reg-sparc64.c): New.
19438 * configure.srv (sparc*-*-linux*): New configuration.
19439 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19440 syscall arguments for SPARC.
19441 (regsets_store_inferior_registers): Likewise.
19442 * linux-sparc-low.c: New file.
19443
19444 2008-10-21 Doug Evans <dje@google.com>
19445
19446 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19447 (READLINE_DIR,READLINE_DEP): Delete.
19448 (INTERNAL_CFLAGS): Update.
19449 (LINTFLAGS): Update.
19450
19451 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19452
19453 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19454 whole argv from the last run, not just argv[0].
19455
19456 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19457
19458 * regcache.c (new_register_cache): Return NULL if the register
19459 cache size isn't known yet.
19460 (free_register_cache): Avoid dereferencing a NULL regcache.
19461
19462 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19463
19464 * configure.srv: Merge MIPS and MIPS64.
19465
19466 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19467
19468 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19469
19470 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19471
19472 * Makefile.in: Add required vsx dependencies.
19473
19474 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19475 Declare init_registers_powerpc_vsx32l.
19476 Declare init_registers_powerpc_vsx64l.
19477 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19478 (ppc_arch_setup): Check for VSX in hwcap.
19479 (ppc_fill_vsxregset): New function.
19480 (ppc_store_vsxregset): New function.
19481 Add new VSX entry in regset_info target_regsets.
19482
19483 * configure.srv: Add new VSX dependencies.
19484
19485 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19486
19487 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19488 (remote_open): Set or clear transport_is_reliable.
19489 (putpkt_binary): Don't expect acks in noack mode.
19490 (getpkt): Don't send ack/nac in noack mode.
19491 * server.c (handle_general_set): Handle QStartNoAckMode.
19492 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19493 qSupported.
19494 (main): Reset noack_mode on every connection.
19495 * server.h (noack_mode): Declare.
19496
19497 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19498
19499 * Makefile.in (GDBREPLAY_OBS): New variable.
19500 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19501
19502 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19503 Daniel Jacobowitz <dan@codesourcery.com>
19504
19505 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19506 (usr_store_inferior_registers): Likewise.
19507 (regsets_store_inferior_registers): Likewise.
19508
19509 2008-07-31 Rolf Jansen <rj@surtec.com>
19510 Pedro Alves <pedro@codesourcery.com>
19511
19512 * configure.ac: Check for memmem declaration.
19513 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19514 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19515 (disable_packet_qfThreadInfo): Unconditionally compile.
19516 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19517 * configure, config.in: Regenerate.
19518
19519 2008-07-28 Doug Kwan <dougkwan@google.com>
19520
19521 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19522 (linux_write_memory): Remove declaration of errno.
19523
19524 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19525
19526 * linux-low.c (handle_extended_wait): Do not use "status"
19527 variable uninitialized.
19528
19529 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19530
19531 * server.c (handle_v_attach): Inhibit reporting dll changes.
19532
19533 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19534
19535 * remote-utils.c (prepare_resume_reply): If requested, don't
19536 output "thread:TID" in the T stop reply.
19537
19538 * server.c (disable_packet_vCont, disable_packet_Tthread)
19539 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19540 (handle_query): If requested, disable support for qC, qfThreadInfo
19541 and qsThreadInfo.
19542 (handle_v_requests): If requested, disable support for vCont.
19543 (gdbserver_show_disableable): New.
19544 (main): Handle --disable-packet and --disable-packet=LIST.
19545
19546 * server.h (disable_packet_vCont, disable_packet_Tthread)
19547 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19548
19549 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19550
19551 * server.c (gdbserver_usage): Mention --version.
19552
19553 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19554
19555 * Makefile.in (gdbreplay.o): New rule.
19556
19557 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19558
19559 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19560 message, not gdbserver.
19561
19562 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19563 Nathan Sidwell <nathan@codesourcery.com>
19564 Joseph Myers <joseph@codesourcery.com>
19565
19566 * acinclude.m4: Include ../../config/acx.m4.
19567 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19568 * configure, config.in: Regenerate.
19569 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19570 * server.c (gdbserver_version): Print PKGVERSION.
19571 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19572 (main): Adjust gdbserver_usage calls.
19573 * gdbreplay.c (version, host_name): Add declarations.
19574 (gdbreplay_version, gdbreplay_usage): New.
19575 (main): Accept --version and --help options.
19576
19577 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19578
19579 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19580 (arm_breakpoint_at): Handle Thumb.
19581 (the_low_target): Add comment.
19582
19583 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19584
19585 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19586
19587 2008-05-09 Doug Evans <dje@google.com>
19588
19589 * server.h (decode_search_memory_packet): Declare.
19590 * remote-utils.c (decode_search_memory_packet): New fn.
19591 * server.c (handle_search_memory_1): New fn.
19592 (handle_search_memory): New fn.
19593 (handle_query): Process qSearch:memory packets.
19594
19595 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19596
19597 * regcache.c (registers_length): Remove.
19598 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19599 full register packet.
19600 * regcache.h (registers_length): Remove prototype.
19601 * server.h (PBUFSIZ): Define to 16384.
19602
19603 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19604
19605 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19606 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19607 powerpc-64l.o, and powerpc-altivec64l.o.
19608 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19609 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19610 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19611 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19612 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19613 to srv_xmlfiles.
19614
19615 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19616 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19617 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19618 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19619 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19620 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19621 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19622 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19623 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19624 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19625 (clean): Update.
19626
19627 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19628 (init_registers_powerpc_32l): ... this new prototype.
19629 (init_registers_powerpc_32): Remove, replace by ...
19630 (init_registers_powerpc_altivec32l): ... this new prototype.
19631 (init_registers_powerpc_e500): Remove, replace by ...
19632 (init_registers_powerpc_e500l): ... this new prototype.
19633 (init_registers_ppc64): Remove, replace by ...
19634 (init_registers_powerpc_64l): ... this new prototype.
19635 (init_registers_powerpc_64): Remove, replace by ...
19636 (init_registers_powerpc_altivec64l): ... this new prototype.
19637 (ppc_num_regs): Set to 73.
19638 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19639 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19640 (ppc_cannot_store_register): Handle orig_r3 and trap.
19641 (ppc_arch_setup): Update init_registers_... calls.
19642 (ppc_fill_gregset): Handle orig_r3 and trap.
19643
19644 * inferiors.c (clear_inferiors): Reset current_inferior.
19645
19646 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19647
19648 * acinclude.m4: Add override.m4.
19649 * configure: Regenerate.
19650
19651 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19652
19653 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19654 initial call to init_register_ppc64.
19655
19656 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19657
19658 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19659 single powerpc*-*-linux* case.
19660 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19661
19662 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19663
19664 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19665 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19666 from reg_xmlfiles.
19667 * linux-ppc-low.c: Include <elf.h>.
19668 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19669 (ppc_hwcap): New global variable.
19670 (ppc_regmap): Remove __SPE__ #ifdef sections.
19671 (ppc_regmap_e500): New global variable.
19672 (ppc_cannot_store_register): Update __SPE__ special case.
19673 (ppc_get_hwcap): New function.
19674 (ppc_arch_setup): Use it to determine whether inferior supports
19675 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19676 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19677 Do not access registers if target does not support AltiVec.
19678 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19679 Do not access registers if target does not support SPE.
19680 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19681
19682 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19683
19684 * linux-low.c (disabled_regsets, num_regsets): New.
19685 (use_regsets_p): Delete.
19686 (linux_wait_for_process): Clear disabled_regsets.
19687 (regsets_fetch_inferior_registers): Check and set it.
19688 (regsets_store_inferior_registers): Likewise.
19689 (linux_fetch_registers, linux_store_registers): Do not use
19690 use_regsets_p.
19691 (initialize_low): Allocate disabled_regsets.
19692
19693 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19694
19695 * Makefile.in (LIBOBJS): New.
19696 (OBS): Use LIBOBJS.
19697 (memmem.o): New rule.
19698 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19699 * configure: Regenerated.
19700
19701 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19702
19703 * server.c (handle_query): Never return "unsupported" for
19704 qXfer:features:read queries.
19705
19706 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19707
19708 * server.c (get_features_xml): Fix inverted condition.
19709 (handle_query): Always support qXfer:feature:read.
19710
19711 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19712
19713 * server.c (wrapper_argv): New.
19714 (start_inferior): Handle wrapper_argv. If set, expect an extra
19715 trap.
19716 (gdbserver_usage): Document --wrapper.
19717 (main): Parse --wrapper.
19718
19719 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19720
19721 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19722 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19723 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19724 (ppc_set_pc): Likewise.
19725 (ppc_arch_setup): New function.
19726 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19727 of collect_register.
19728 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19729
19730 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19731
19732 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19733 instead of linux-ppc64-low.o.
19734 * linux-ppc64-low.c: Remove file.
19735 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19736 (linux-ppc64-low.o): Remove rule.
19737
19738 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19739 (init_registers_powerpc_64): Likewise.
19740 (ppc_regmap): Conditionally define depending on __powerpc64__.
19741 (ppc_cannot_store_register): Do not special-case "fpscr" when
19742 compiled on __powerpc64__.
19743 (ppc_collect_ptrace_register): New function.
19744 (ppc_supply_ptrace_register): New function.
19745 (ppc_breakpoint): Change type to "unsigned int".
19746 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19747 (the_low_target): Conditionally provide initializers for the
19748 arch_setup member depending on __powerpc64__. Install
19749 collect_ptrace_register and supply_ptrace_register members.
19750
19751 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19752
19753 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19754 * server.c (gdbserver_xmltarget): Define.
19755 (get_features_xml): Use it to replace "target.xml" and arch_string.
19756
19757 * configure.srv: Remove srv_xmltarget. Add XML files that were
19758 mentioned there to srv_xmlfiles instead. Remove conditional tests
19759 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19760 srv_xmlfiles and srv_regobj to include all possible choices.
19761 * configure.ac (srv_xmltarget): Remove.
19762 (srv_xmlfiles): Do not add "target.xml".
19763 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19764 checks for supplementary target information.
19765 * configure: Regenerate.
19766 * Makefile.in (XML_TARGET): Remove.
19767 (target.xml): Remove rule.
19768 (clean): Do not clean up target.xml.
19769 (.PRECIOUS): Do not mention target.xml.
19770
19771 * target.h (struct target_ops): Remove arch_string member.
19772 * linux-low.c (linux_arch_string): Remove.
19773 (linux_target_ops): Remove arch_string initializer.
19774 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19775 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19776 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19777 * spu-low.c (spu_arch_string): Remove.
19778 (spu_target_ops): Remove arch_string initializer.
19779 * win32-low.c (win32_arch_string): Remove.
19780 (win32_target_ops): Remove arch_string initializer.
19781 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19782 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19783 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19784
19785 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19786
19787 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19788 by collect_ptrace_register and supply_ptrace_register hooks.
19789 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19790 instead of checking for the_low_target.left_pad_xfer.
19791 (usr_store_inferior_registers): Use collect_ptrace_register callback
19792 instead of checking for the_low_target.left_pad_xfer.
19793
19794 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19795 (s390_supply_ptrace_register): Likewise.
19796 (s390_fill_gregset): Call s390_collect_ptrace_register.
19797 (the_low_target): Update.
19798
19799 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19800 (ppc_supply_ptrace_register): Likewise.
19801 (the_low_target): Update.
19802
19803 * linux-i386-low.c (the_low_target): Update.
19804 * linux-x86-64-low.c (the_low_target): Update.
19805
19806 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19807
19808 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19809 reg-s390.o and reg-s390x.o.
19810
19811 * linux-low.c (new_inferior): New global variable.
19812 (linux_create_inferior, linux_attach): Set it.
19813 (linux_wait_for_process): Call the_low_target.arch_setup after the
19814 target has stopped for the first time.
19815 (initialize_low): Do not call the_low_target.arch_setup.
19816
19817 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19818 (s390_set_pc): Likewise.
19819 (s390_arch_setup): New function.
19820 (the_low_target): Use s390_arch_setup as arch_setup routine.
19821
19822 * regcache.c (realloc_register_cache): New function.
19823 (set_register_cache): Call it for each existing regcache.
19824
19825 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19826
19827 * server.h (init_registers): Remove prototype.
19828
19829 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19830 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19831 instead of init_registers ().
19832 * linux-arm-low.c (init_registers_arm): Add prototype.
19833 (init_registers_arm_with_iwmmxt): Likewise.
19834 (the_low_target): Add initializer for arch_setup field.
19835 * linux-cris-low.c (init_registers_cris): Add prototype.
19836 (the_low_target): Add initializer for arch_setup field.
19837 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19838 (the_low_target): Add initializer for arch_setup field.
19839 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19840 (the_low_target): Add initializer for arch_setup field.
19841 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19842 (the_low_target): Add initializer for arch_setup field.
19843 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19844 (the_low_target): Add initializer for arch_setup field.
19845 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19846 (the_low_target): Add initializer for arch_setup field.
19847 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19848 (init_registers_mips64_linux): Likewise.
19849 (the_low_target): Add initializer for arch_setup field.
19850 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19851 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19852 (the_low_target): Add initializer for arch_setup field.
19853 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19854 (init_registers_powerpc_64): Likewise.
19855 (the_low_target): Add initializer for arch_setup field.
19856 * linux-s390-low.c (init_registers_s390): Add prototype.
19857 (init_registers_s390x): Likewise.
19858 (the_low_target): Add initializer for arch_setup field.
19859 * linux-sh-low.c (init_registers_sh): Add prototype.
19860 (the_low_target): Add initializer for arch_setup field.
19861 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19862 (the_low_target): Add initializer for arch_setup field.
19863 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19864 (the_low_target): Add initializer for arch_setup field.
19865
19866 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19867 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19868 instead of init_registers ().
19869 * win32-arm-low.c (init_registers_arm): Add prototype.
19870 (the_low_target): Add initializer for arch_setup field.
19871 * win32-i386-low.c (init_registers_i386): Add prototype.
19872 (the_low_target): Add initializer for arch_setup field.
19873
19874 * spu-low.c (init_registers_spu): Add prototype.
19875 (initialize_low): Call initialie_registers_spu () instead of
19876 initialize_registers ().
19877
19878 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19879
19880 * server.c (handle_v_requests): When handling the vRun and vAttach
19881 packets, if already debugging a process, don't kill it. Return an
19882 error instead.
19883
19884 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19885
19886 * server.c (handle_query): Correct length check.
19887
19888 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19889
19890 * win32-low.c (do_initial_child_stuff): Add process handle
19891 parameter. Set current_process_handle and current_process_id from the
19892 parameters. Clear globals.
19893 (win32_create_inferior): Don't set current_process_handle and
19894 current_process_id here. Instead pass them on the call to
19895 do_initial_child_stuff.
19896 (win32_attach): Likewise.
19897 (win32_clear_inferiors): New.
19898 (win32_kill): Don't close the current process handle or the
19899 current thread handle here. Instead call win32_clear_inferiors.
19900 (win32_detach): Don't open a new handle to the process. Call
19901 win32_clear_inferiors.
19902 (win32_join): Don't rely on current_process_handle; open a new
19903 handle using the process id.
19904 (win32_wait): Call win32_clear_inferiors when the inferior process
19905 has exited.
19906
19907 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19908
19909 * server.c (monitor_show_help): Add "exit".
19910
19911 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19912
19913 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19914 (clean): Add reg-xtensa.c.
19915 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19916 * configure.srv (xtensa*-*-linux*) New target.
19917 * linux-xtensa-low.c: New.
19918 * xtensa-xtregs.c: New.
19919
19920 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19921
19922 * hostio.c: Don't include errno.h.
19923 (errno_to_fileio_errno): Move to hostio-errno.
19924 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19925 error number outputting to the target->hostio_last_error callback.
19926 (hostio_packet_error): Use FILEIO_EINVAL directly.
19927 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19928 calls to hostio_error.
19929 * hostio-errno.c: New.
19930 * server.h (hostio_last_error_from_errno): Declare.
19931 * target.h (target_ops): Add hostio_last_error member.
19932 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19933 as hostio_last_error handler.
19934 * spu-low.c (spu_target_ops): Likewise.
19935 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19936 (wince_hostio_last_error): New functions.
19937 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19938 as hostio_last_error handler.
19939 (win32_target_ops) [!_WIN32_WCE]: Register
19940 hostio_last_error_from_errno as hostio_last_error handler.
19941 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19942 (hostio-errno.o): New rule.
19943 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19944 * configure.srv (srv_hostio_err_objs): New variable. Default to
19945 hostio-errno.o.
19946 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19947 * configure: Regenerate.
19948
19949 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19950
19951 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19952 (linux_kill, linux_detach): Clean up the process list.
19953 * remote-utils.c (remote_open): Improve port number parsing.
19954 (putpkt_binary, input_interrupt): Only send interrupts if the target
19955 is running.
19956 * server.c (extended_protocol): Make static.
19957 (attached): Define earlier.
19958 (exit_requested, response_needed, program_argv): New variables.
19959 (target_running): New.
19960 (start_inferior): Clear attached here.
19961 (attach_inferior): Set attached here.
19962 (require_running): Define.
19963 (handle_query): Use require_running and target_running. Implement
19964 "monitor exit".
19965 (handle_v_attach, handle_v_run): New.
19966 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19967 (gdbserver_usage): Update.
19968 (main): Redo argument parsing. Handle --debug and --multi. Handle
19969 --attach along with other options or after the port. Save
19970 program_argv. Support no initial program. Resynchronize
19971 communication with GDB after an error. Handle "monitor exit".
19972 Use require_running and target_running. Always allow the extended
19973 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19974 restart in extended mode.
19975 * README: Refer to the GDB manual. Update --attach usage.
19976
19977 2007-12-20 Andreas Schwab <schwab@suse.de>
19978
19979 * linux-low.c (STACK_SIZE): Define.
19980 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19981 (linux_test_for_tracefork): Likewise.
19982
19983 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19984
19985 * linux-low.c (linux_wait_for_event): Update messages. Do not
19986 reinsert auto-delete breakpoints.
19987 * mem-break.c (struct breakpoint): Change return type of handler to
19988 int.
19989 (set_breakpoint_at): Update handler type.
19990 (reinsert_breakpoint_handler): Return 1 instead of calling
19991 delete_breakpoint.
19992 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19993 setting a new one.
19994 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19995 * mem-break.h (set_breakpoint_at): Update handler type.
19996 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19997 * win32-low.c (auto_delete_breakpoint): New.
19998 (get_child_debug_event): Use it.
19999
20000 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20001
20002 * configure.ac: Check for pread and pwrite.
20003 * hostio.c (handle_pread): Fall back to lseek and read.
20004 (handle_pwrite): Fall back to lseek and write.
20005 * config.in, configure: Regenerated.
20006
20007 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20008
20009 * server.c (myresume): Add own_buf argument.
20010 (main): Update calls.
20011
20012 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20013
20014 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20015 * remote-utils.c (remote_open): Do not call disable_async_io.
20016 (block_async_io): Delete.
20017 (unblock_async_io): Make static.
20018 (initialize_async_io): New.
20019 * server.c (handle_v_cont): Handle async I/O here.
20020 (myresume): Likewise. Move other common resume tasks here...
20021 (main): ... from here. Call initialize_async_io. Disable async
20022 I/O before the main loop.
20023 * server.h (initialize_async_io): Declare.
20024 (block_async_io, unblock_async_io): Delete prototypes.
20025 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20026
20027 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20028
20029 * remote-utils.c (readchar): Allow binary data in received messages.
20030
20031 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20032
20033 * win32-low.c (attaching): New global.
20034 (win32_create_inferior): Clear the `attaching' global.
20035 (win32_attach): Set the `attaching' global.
20036 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20037 attaching. Only set a breakpoint at the entry point if not
20038 attaching.
20039
20040 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20041
20042 * server.c (main): Don't report dll events on the initial
20043 connection on attaches.
20044
20045 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20046
20047 * server.c (main): Relax numerical bases supported for the pid of
20048 the --attach command line argument.
20049
20050 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20051
20052 * win32-low.c (win32_attach): Call OpenProcess before
20053 DebugActiveProcess, not after. Add last error output to error
20054 call.
20055
20056 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20057
20058 * win32-low.c (win32_get_thread_context)
20059 (win32_set_thread_context): New functions.
20060 (thread_rec): Use win32_get_thread_context.
20061 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20062 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20063 field.
20064
20065 2007-12-03 Leo Zayas
20066 Pedro Alves <pedro_alves@portugalmail.pt>
20067
20068 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20069 global variables.
20070 (child_add_thread): Minor cleanup.
20071 (child_continue): Resume artificially suspended threads before
20072 calling ContinueDebugEvent.
20073 (suspend_one_thread): New.
20074 (fake_breakpoint_event): New.
20075 (get_child_debug_event): Change return type to int. Check here if
20076 gdb sent an interrupt request. If a soft interrupt was requested,
20077 fake a breakpoint event. Return 0 if there is no event to handle,
20078 and 1 otherwise.
20079 (win32_wait): Don't check here if gdb sent an interrupt request.
20080 Ensure there is a valid event to handle.
20081 (win32_request_interrupt): Add soft interruption method as last
20082 resort.
20083
20084 2007-12-03 Leo Zayas
20085 Pedro Alves <pedro_alves@portugalmail.pt>
20086
20087 * win32-low.h (win32_thread_info): Add descriptions to the
20088 structure members. Replace `suspend_count' counter by a
20089 `suspended' flag.
20090 * win32-low.c (thread_rec): Update condition of when to get the
20091 context from the inferior. Rely on ContextFlags being set if it
20092 has already been retrieved. Only suspend the inferior thread if
20093 we haven't already. Warn if that fails.
20094 (continue_one_thread): s/suspend_count/suspended/. Only call
20095 ResumeThread once. Warn if that fails.
20096
20097 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20098
20099 * win32-low.c (win32_wait): Don't read from the inferior when it
20100 has already exited.
20101
20102 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20103
20104 * Makefile.in (win32_low_h): New variable.
20105 (win32-low.o): Add dependency on $(win32_low_h).
20106 (win32-arm-low.o, win32-i386-low.o): New rules.
20107
20108 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20109
20110 * hostio.c: Correct copyright year.
20111
20112 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20113
20114 * Makefile.in (OBS): Add hostio.o.
20115 (hostio.o): New rule.
20116 * server.h (handle_vFile): Declare.
20117 * hostio.c: New file.
20118 * server.c (handle_v_requests): Take packet_len and new_packet_len
20119 for binary packets. Call handle_vFile.
20120 (main): Update call to handle_v_requests.
20121
20122 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20123
20124 * linux-low.c: Include <sched.h>.
20125
20126 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20127
20128 * linux-low.c (linux_tracefork_grandchild): New.
20129 (linux_tracefork_child): Use clone.
20130 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20131
20132 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20133
20134 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20135
20136 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20137
20138 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20139
20140 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20141
20142 * inferiors.c (change_inferior_id): Delete.
20143 (add_pid_to_list, pull_pid_from_list): New.
20144 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20145 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20146 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20147 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20148 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20149 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20150 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20151 (using_threads): Always set to 1.
20152 (handle_extended_wait): New.
20153 (add_process): Do not set TID.
20154 (linux_create_inferior): Set must_set_ptrace_flags.
20155 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20156 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20157 (linux_thread_alive): Rename TID argument to LWPID.
20158 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20159 (linux_wait_for_event): Do not use TID or check using_threads. Update
20160 call to dead_thread_notify. Call handle_extended_wait.
20161 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20162 (send_sigstop): Delete sigstop_sent.
20163 (wait_for_sigstop): Avoid TID.
20164 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20165 (linux_test_for_tracefork): New.
20166 (linux_lookup_signals): Use thread_db_active and
20167 linux_supports_tracefork_flag.
20168 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20169 * linux-low.h (get_process_thread): Avoid TID.
20170 (struct process_ifo): Move thread_known and tid to the end. Remove
20171 sigstop_sent.
20172 (linux_attach_lwp, thread_db_init): Update prototypes.
20173 * server.h (change_inferior_id): Delete prototype.
20174 (add_pid_to_list, pull_pid_from_list): New prototypes.
20175 * thread-db.c (thread_db_use_events): New.
20176 (find_first_thread): Rename to...
20177 (find_one_thread): ...this. Update callers and messages. Do not
20178 call fatal. Check thread_db_use_events. Do not call
20179 change_inferior_id or new_thread_notify.
20180 (maybe_attach_thread): Update. Do not call new_thread_notify.
20181 (thread_db_init): Set thread_db_use_events. Check use_events.
20182 * utils.c (fatal, warning): Correct message prefix.
20183
20184 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20185
20186 * Makefile.in (clean): Remove new files.
20187 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20188 (powerpc-64.o, powerpc-64.c): New rules.
20189 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20190 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20191 with SPE.
20192 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20193 SPE targets.
20194 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20195 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20196 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20197 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20198 (target_regsets): Add AltiVec and SPE register sets.
20199 * configure.ac: Check for AltiVec and SPE.
20200 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20201 (ppc_fill_vrregset, ppc_store_vrregset): New.
20202 (target_regsets): Add AltiVec register set.
20203 * configure: Regenerated.
20204
20205 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20206
20207 * linux-low.c (O_LARGEFILE): Define.
20208 (linux_read_memory): Use /proc/PID/mem.
20209 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20210 * configure, config.in: Regenerated.
20211
20212 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20213
20214 * linux-low.c (linux_wait_for_event): Do not pass signals while
20215 single-stepping.
20216
20217 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20218
20219 * win32-low.c (create_process): New.
20220 (win32_create_inferior): Use create_process instead of
20221 CreateProcess. If create_process failed retry appending an ".exe"
20222 suffix. Store the GetLastError result immediatelly after
20223 create_process calls and use it on the call to error.
20224
20225 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20226
20227 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20228
20229 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20230
20231 * configure.ac: Switch license to GPLv3.
20232
20233 2007-08-01 Michael Snyder <msnyder@access-company.com>
20234
20235 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20236
20237 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20238
20239 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20240 typedef.
20241 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20242 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20243 CloseToolhelp32Snapshot.
20244 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20245 CloseToolhelp32Snapshot.
20246
20247 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20248
20249 * server.c (main): Check for inferior exit before main loop.
20250
20251 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20252
20253 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20254 instead of on tmp_desc.
20255
20256 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20257 Daniel Jacobowitz <dan@codesourcery.com>
20258
20259 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20260 (add_thread): Minor cleanups.
20261 (clear_inferiors): Move lower in the file. Clear the DLL
20262 list.
20263 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20264 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20265 (xml_escape_text): New.
20266 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20267 for qSupported.
20268 (handle_v_cont): Report errors.
20269 (gdbserver_version): Update.
20270 (main): Correct size of own_buf. Do not report initial DLL events.
20271 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20272 (unloaded_dll, xml_escape_text): New.
20273 * win32-low.c (enum target_waitkind): Update comments.
20274 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20275 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20276 (win32_EnumProcessModules, win32_GetModuleInformation)
20277 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20278 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20279 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20280 (win32_Module32First, win32_Module32Next, load_toolhelp)
20281 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20282 (get_child_debug_event): Handle DLL events.
20283 (win32_wait): Likewise.
20284
20285 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20286
20287 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20288 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20289
20290 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20291
20292 * win32-low.c (handle_output_debug_string): Ignore event if not
20293 waiting.
20294
20295 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20296
20297 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20298
20299 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20300
20301 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20302
20303 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20304
20305 * inferiors.c (change_inferior_id): Add comment.
20306 * linux-low.c (check_removed_breakpoint): Add an early
20307 prototype. Improve debug output.
20308 (linux_attach): Doc update.
20309 (linux_detach_one_process, linux_detach): Clean up before releasing
20310 each process.
20311 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20312 * linux-low.h (struct process_info): Doc improvement.
20313 * mem-break.c (delete_all_breakpoints): New.
20314 * mem-break.h (delete_all_breakpoints): New prototype.
20315 * thread-db.c (find_first_thread): New.
20316 (thread_db_create_event): Call it instead of
20317 thread_db_find_new_threads. Clean up unused variables.
20318 (maybe_attach_thread): Remove first thread handling.
20319 (thread_db_find_new_threads): Use find_first_thread.
20320 (thread_db_get_tls_address): Likewise.
20321
20322 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20323
20324 * thread-db.c (thread_db_find_new_threads): Add prototype.
20325 (thread_db_create_event): Check for the main thread before adding
20326 a new thread.
20327 (maybe_attach_thread): Only enable event reporting if TID == 0.
20328 (thread_db_get_tls_address): Check for new threads.
20329
20330 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20331
20332 * linux-low.c (linux_create_inferior): Try execv before execvp.
20333 * spu-low.c (spu_create_inferior): Likewise.
20334
20335 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20336
20337 * linux-low.c (linux_create_inferior): Change execv to execvp.
20338 * spu-low.c (spu_create_inferior): Likewies.
20339
20340 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20341
20342 * Makefile.in (clean): Clean new files instead of deleted ones.
20343 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20344 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20345 rules.
20346 * configure.srv: Specify XML files and new regformats for MIPS and
20347 MIPS64 GNU/Linux.
20348 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20349 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20350 an entry for the restart register.
20351 (mips_cannot_fetch_register, mips_cannot_store_register)
20352 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20353 register names to match the XML descriptions.
20354 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20355 restart register instead of $0.
20356
20357 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20358 Markus Deuling <deuling@de.ibm.com>
20359
20360 * remote-utils.c (decode_xfer_write): New function.
20361 * server.h (decode_xfer_write): Add prototype.
20362 * server.c (handle_query): Add PACKET_LEN argument. Support
20363 qXfer:spu:read and qXfer:spu:write packets.
20364 (main): Pass packet_len to handle_query.
20365 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20366 * target.h (target_ops): Add qxfer_spu.
20367
20368 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20369
20370 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20371 accessing non-seekable spufs files.
20372
20373 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20374
20375 * server.c (handle_query): Add reply for qC packet.
20376
20377 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20378 Leo Zayas <lerele@champenstudios@com>
20379
20380 * server.h (check_remote_input_interrupt_request): New function.
20381 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20382 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20383 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20384 (check_remote_input_interrupt_request): New function.
20385 * server.h (check_remote_input_interrupt_request): Declare.
20386 * win32-low.c (winapi_DebugBreakProcess,
20387 winapi_GenerateConsoleCtrlEvent): New typedefs.
20388 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20389 to 250 ms.
20390 (win32_wait): Check for remote interrupt request
20391 with check_remote_input_interrupt_request.
20392 (win32_request_interrupt): New function.
20393 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20394
20395 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20396
20397 * win32-low.c (debug_registers_changed,
20398 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20399 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20400 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20401 (thread_rec): Get context using the low target.
20402 (child_add_thread): Call thread_added on the low target,
20403 which does the same thing.
20404 (regptr): Delete.
20405 (do_initial_child_stuff): Remove debug registers references.
20406 Set context using the low target. Resume threads after
20407 setting the contexts.
20408 (child_continue): Remove dead variable. Remove debug
20409 registers references.
20410 (child_fetch_inferior_registers): Go through the low target.
20411 (do_child_store_inferior_registers): Remove.
20412 (child_store_inferior_registers): Go through the low target.
20413 (win32_resume): Remove debug registers references.
20414 Set context using the low target.
20415 (handle_exception): Change return type to void. Don't record
20416 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20417 first chance exception.
20418 (get_child_debug_event): Change return type to void. Remove
20419 goto loop. Always return after waiting for debug event.
20420 (win32_wait): Convert to switch statement. Handle spurious
20421 events.
20422
20423 * win32-i386-low.c (debug_registers_changed,
20424 debug_registers_used): New.
20425 (initial_stuff): Rename to ...
20426 (i386_initial_stuff): ... this. Clear debug registers
20427 state variables.
20428 (store_debug_registers): Delete.
20429 (i386_get_thread_context): New.
20430 (load_debug_registers): Delete.
20431 (i386_set_thread_context): New.
20432 (i386_thread_added): New.
20433 (single_step): Rename to ...
20434 (i386_single_step): ... this.
20435 (do_fetch_inferior_registers): Rename to ...
20436 (i386_fetch_inferior_register): ... this.
20437 (i386_store_inferior_register): New.
20438 (the_low_target): Adapt to new interface.
20439
20440 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20441 (arm_get_thread_context): New.
20442 (arm_set_thread_context): New.
20443 (regptr): New.
20444 (do_fetch_inferior_registers): Rename to ...
20445 (arm_fetch_inferior_register): ... this.
20446 (arm_store_inferior_register): New.
20447 (arm_wince_breakpoint): Reimplement as unsigned long.
20448 (arm_wince_breakpoint_len): Define.
20449 (the_low_target): Adapt to new interface.
20450
20451 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20452 load_debug_registers. Add get_thread_context, set_thread_context,
20453 thread_added and store_inferior_register. Rename
20454 fetch_inferior_registers to fetch_inferior_register.
20455 (regptr): Remove declaration.
20456
20457 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20458
20459 * linux-low.c (linux_detach): Change return type to int. Return 0.
20460 * spu-low.c (spu_detach): Likewise.
20461
20462 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20463
20464 * target.h (target_ops): Change return type of detach to int.
20465 Add join.
20466 (join_inferior): New.
20467 * server.c (main): Don't skip detach support on mingw32.
20468 If the inferior doesn't support detaching return error.
20469 Call join_inferior instead of using waitpid.
20470 * linux-low.c (linux_join): New.
20471 (linux_target_op): Add linux_join.
20472 * spu-low.c (spu_join): New.
20473 (spu_target_ops): Add spu_join.
20474 * win32-low.c (win32_detach): Adapt to new interface.
20475 Reopen current_process_handle before detaching. Issue a child
20476 resume before detaching.
20477 (win32_join): New.
20478 (win32_target_op): Add win32_join.
20479
20480 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20481
20482 * win32-low.c (win32-attach): Fix return value.
20483 * target.h (target_ops): Describe ATTACH return values.
20484
20485 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20486
20487 * win32-low.c (GETPROCADDRESS): Define.
20488 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20489 (winapi_DebugSetProcessKillOnExit): Likewise.
20490 (win32_create_inferior): Force usage of ansi CreateProcessA.
20491 (win32_attach): Use GETPROCADDRESS.
20492 (win32_detach): Likewise.
20493
20494 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20495
20496 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20497
20498 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20499
20500 * win32-low.c: Commit leftover changes from 2007-03-29.
20501
20502 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20503
20504 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20505 fields short instead of int. Add explicit padding.
20506 (i387_cache_to_fsave): Remove unnecessary casts.
20507 (i387_fsave_to_cache): Doc fix.
20508 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20509
20510 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20511
20512 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20513 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20514
20515 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20516
20517 * configure.srv (arm*-*-mingw32ce*): Move near the other
20518 arm targets.
20519
20520 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20521
20522 * configure.ac: Add errno checking.
20523 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20524 sys/file.h and malloc.h.
20525 (AC_CHECK_DECLS): Add perror.
20526 (srv_mingwce): Handle.
20527 * configure.srv (i[34567]86-*-cygwin*): Add
20528 win32-i386-low.o to srv_tgtobj.
20529 (i[34567]86-*-mingw*): Likewise.
20530 (arm*-*-mingw32ce*): Add case.
20531 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20532 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20533 [__MINGW32CE__] (strerror): New function.
20534 [__MINGW32CE__] (errno): Define to GetLastError.
20535 [__MINGW32CE__] (COUNTOF): New macro.
20536 (remote_open): Remove extra close call.
20537 * mem-break.c (delete_breakpoint_at): New function.
20538 * mem-break.h (delete_breakpoint_at): Declare.
20539 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20540 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20541 [USE_WIN32API] (read, write): Add char* casts.
20542 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20543 * server.h: Include wincecompat.h on Windows CE.
20544 [HAVE_ERRNO_H]: Check.
20545 (perror): Declare if not declared.
20546 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20547 (perror_with_name): Remove errno declaration.
20548 * wincecompat.h: New.
20549 * wincecompat.c: New.
20550 * win32-low.h: New.
20551 * win32-arm-low.c: New.
20552 * win32-i386-low.c: New.
20553 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20554 (OUTMSG2): Make it safe.
20555 (_T): New macro.
20556 (COUNTOF): New macro.
20557 (NUM_REGS): Get it from the low target.
20558 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20559 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20560 (thread_rec): Let low target handle debug registers.
20561 (child_add_thread): Likewise.
20562 (child_init_thread_list): Likewise.
20563 (continue_one_thread): Likewise.
20564 (regptr): New.
20565 (do_child_fetch_inferior_registers): Move to ...
20566 * win32-i386-low.c: ... here, and rename to ...
20567 (do_fetch_inferior_registers): ... this.
20568 * win32-low.c (child_fetch_inferior_registers):
20569 Go through the low target.
20570 (do_child_store_inferior_registers): Use regptr.
20571 (strwinerror): New function.
20572 (win32_create_inferior): Handle Windows CE.
20573 Use strwinerror instead of strerror on Windows error
20574 codes. Add program to the error output.
20575 Don't close the main thread handle on Windows CE.
20576 (win32_attach): Use coredll.dll on Windows CE.
20577 (win32_kill): Close current process and current
20578 thread handles.
20579 (win32_detach): Use coredll.dll on Windows CE.
20580 (win32_resume): Let low target handle debug registers, and
20581 step request.
20582 (handle_exception): Add/Remove initial breakpoint. Avoid
20583 non-existant WSTOPSIG on Windows CE.
20584 (win32_read_inferior_memory): Cast to remove warning.
20585 (win32_arch_string): Go through the low target.
20586 (initialize_low): Call set_breakpoint_data with the low
20587 target's breakpoint.
20588 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20589 FOP_REGNUM, mappings): Move to ...
20590 * win32-i386-low.c: ... here.
20591 * win32-low.c (win32_thread_info): Move to ...
20592 * win32-low.h: ... here.
20593 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20594 win32-arm-low.c and wincecompat.c.
20595 (all:): Add $EXEEXT.
20596 (install-only:): Likewise.
20597 (gdbserver:): Likewise.
20598 (gdbreplay:): Likewise.
20599 * config.in: Regenerate.
20600 * configure: Regenerate.
20601
20602 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20603
20604 * win32-low.c: Rename typedef thread_info to
20605 win32_thread_info throughout.
20606
20607 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20608
20609 * win32-i386-low.c: Rename to ...
20610 * win32-low.c: ... this.
20611 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20612 * Makefile.in: Likewise.
20613
20614 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20615
20616 * remote-utils.c (monitor_output): Constify msg parameter.
20617 * server.h (monitor_output): Likewise.
20618 * win32-i386-low.c (handle_output_debug_string): New.
20619 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20620 handle_output_debug_string.
20621 (get_child_debug_event): Likewise.
20622
20623 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20624
20625 * server.c (main): Correct strtoul check.
20626
20627 2007-03-27 Jon Ringle <jon@ringle.org>
20628
20629 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20630
20631 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20632
20633 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20634
20635 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20636
20637 * terminal.h: Check HAVE_SGTTY_H.
20638
20639 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20640
20641 * remote-utils.c (remote_open): Print out the assigned port number.
20642
20643 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20644
20645 * remote-utils.c (monitor_output): New function.
20646 * server.c (debug_threads): Define here.
20647 (monitor_show_help): New function.
20648 (handle_query): Handle qRcmd.
20649 (main): Do not handle 'd' packet.
20650 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20651 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20652 of debug_threads.
20653
20654 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20655
20656 * Makefile.in (EXEEXT): New.
20657 (clean): Use $(EXEEXT).
20658
20659 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20660
20661 * target.h (target_ops): Rename send_signal to request_interrupt,
20662 and remove enum target_signal parameter.
20663 * linux-low.c (linux_request_interrupt): Rename from
20664 linux_send_signal, and always send SIGINT.
20665 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20666 and always send SIGINT.
20667 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20668 of send_signal.
20669 (input_interrupt): Likewise.
20670
20671 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20672
20673 * server.c (get_features_xml): Check if target implemented
20674 arch_string.
20675 * win32-i386-low.c (win32_arch_string): New.
20676 (win32_target_ops): Add win32_arch_string as arch_string member.
20677
20678 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20679
20680 * spu-low.c (spu_arch_string): New.
20681 (spu_target_ops): Add spu_arch_string.
20682
20683 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20684
20685 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20686 * configure.ac: Do not check for terminal.h.
20687 * configure, config.in: Regenerated.
20688
20689 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20690
20691 * Makefile.in (OBS): Add $(XML_BUILTIN).
20692 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20693 (clean): Update.
20694 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20695 (arm-with-iwmmxt.c): New.
20696 * config.in, configure: Regenerate.
20697 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20698 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20699 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20700 (arm*-*-linux*): Add iWMMXt and regset support.
20701 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20702 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20703 (arm_store_wmmxregset, target_regsets): New.
20704 * server.c (get_features_xml): Take annex argument. Check builtin
20705 XML documents.
20706 (handle_query): Handle multiple annexes.
20707
20708 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20709
20710 * remote-utils.c [USE_WIN32API] (read, write): Define.
20711 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20712 write.
20713
20714 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20715
20716 * linux-i386-low.c (the_low_target): Set arch_string.
20717 * linux-x86-64-low.c (the_low_target): Likewise.
20718 * linux-low.c (linux_arch_string): New.
20719 (linux_target_ops): Add it.
20720 * linux-low.h (struct linux_target_ops): Add arch_string.
20721 * server.c (write_qxfer_response): Use const void * for DATA.
20722 (get_features_xml): New.
20723 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20724 * target.h (struct target_ops): Add arch_string method.
20725
20726 2007-01-03 Denis Pilat <denis.pilat@st.com>
20727 Daniel Jacobowitz <dan@codesourcery.com>
20728
20729 * linux-low.c (linux_kill): Handle being called with no threads.
20730 * win32-i386-low.c (win32_kill): Likewise.
20731 (get_child_debug_event): Clear current_process_handle.
20732
20733 2006-12-30 Denis PILAT <denis.pilat@st.com>
20734 Daniel Jacobowitz <dan@codesourcery.com>
20735
20736 * remote-utils.c (remote_open): Check the type of specified
20737 serial port devices before opening them.
20738 * server.c (main): Kill the inferior if an error occurs during
20739 the first remote_open.
20740
20741 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20742
20743 * README: Update supported targets.
20744
20745 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20746
20747 * Makefile.in (clean): Remove reg-mips64.c.
20748 (reg-mips64.c, reg-mips64.o): New rules.
20749 * configure.srv: Handle mips64. Include regset support for mips.
20750 * linux-mips-low.c (union mips_register): New.
20751 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20752 (mips_breakpoint, mips_breakpoint_at): Use int.
20753 (mips_collect_register, mips_supply_register)
20754 (mips_collect_register_32bit, mips_supply_register_32bit)
20755 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20756 (mips_store_fpregset, target_regsets): New.
20757 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20758
20759 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20760
20761 * configure.srv: Add target "spu*-*-*".
20762 * Makefile.in (clean): Remove reg-spu.c.
20763 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20764 * spu-low.c: New file.
20765
20766 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20767
20768 * configure.ac: Correct td_thr_tls_get_addr test.
20769 * configure: Regenerated.
20770
20771 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20772
20773 * linux-low.c (linux_wait_for_event): Reformat. Use the
20774 pass_signals array.
20775 * remote-utils.c (decode_address_to_semicolon): New.
20776 * server.c (pass_signals, handle_general_set): New.
20777 (handle_query): Mention QPassSignals for qSupported.
20778 (main): Call handle_general_set.
20779 * server.h (pass_signals, decode_address_to_semicolon): New.
20780
20781 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20782
20783 * server.c (handle_query): Correct error handling for read_auxv.
20784
20785 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20786
20787 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20788 and srv_linux_thread_db to yes.
20789 * linux-s390-low.c (s390_fill_gregset): New function.
20790 (target_regsets): Define data structure.
20791
20792 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20793
20794 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20795 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20796 * config.in, configure: Regenerated.
20797 * inferiors.c (gdb_id_to_thread): New function.
20798 (gdb_id_to_thread_id): Use it.
20799 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20800 * linux-low.h (struct process_info): Add th member.
20801 (thread_db_get_tls_address): New prototype.
20802 * remote-utils.c (decode_address): Make non-static.
20803 * server.c (handle_query): Handle qGetTLSAddr.
20804 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20805 * target.h (struct target_ops): Add get_tls_address.
20806 * thread-db.c (maybe_attach_thread): Save the thread handle.
20807 (thread_db_get_tls_address): New.
20808
20809 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20810
20811 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20812 (linux_resume_one_process): Take a siginfo_t *. Update all
20813 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20814 (struct pending_signals): Add a siginfo_t.
20815 (linux_wait_for_process): Always set last_status.
20816 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20817 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20818 * linux-low.h (struct process_info): Add last_status.
20819
20820 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20821
20822 * remote-utils.c (try_rle): New function.
20823 (putpkt_binary): Use it.
20824
20825 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20826
20827 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20828 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20829 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20830 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20831 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20832 point registers.
20833
20834 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20835
20836 * server.c (terminal_fd): New variable.
20837 (old_foreground_pgrp): Likewise.
20838 (restore_old_foreground_pgrp): New function.
20839 (start_inferior): Record the terminal file descriptor in terminal_fd
20840 and its original foreground group in old_foreground_pgrp. Register
20841 restore_old_foreground_pgrp with atexit().
20842
20843 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20844
20845 * server.c (handle_query): Correct qPart to qXfer.
20846
20847 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20848
20849 * configure.ac: Check for more headers which are missing on
20850 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20851 * configure.srv: Add Cygwin and mingw32.
20852 * remote-utils.c: Don't include headers unconditionally which
20853 are missing on mingw32. Include <winsock.h> for mingw32.
20854 (remote_open): Adjust for mingw32 support. Flush
20855 standard error after writing to it.
20856 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20857 (unblock_async_io, enable_async_io, disable_async_io)
20858 (readchar, getpkt): Update for Winsock support.
20859 (prepare_resume_reply): Expect a protocol signal number.
20860 * server.c: Disable <sys/wait.h> on mingw32.
20861 (start_inferior): Adjust for mingw32 support. Flush
20862 standard error after writing to it.
20863 (attach_inferior): Likewise. Use protocol signal
20864 numbers.
20865 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20866 and names.
20867 * win32-i386-low.c: New file.
20868 * Makefile.in (XM_CLIBS): Set.
20869 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20870 (win32-i386-low.o): New dependency rule.
20871 * linux-low.c (linux_wait): Use target signal numbers.
20872 * target.h (struct target_ops): Doc fix.
20873 * server.h (target_signal_to_name): New prototype.
20874 * gdbreplay.c: Don't include headers unconditionally which
20875 are missing on mingw32. Include <winsock.h> for mingw32.
20876 (remote_close, remote_open): Adjust for Winsock support.
20877 * configure, config.in: Regenerated.
20878
20879 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20880
20881 * server.c (decode_xfer_read, write_qxfer_response): New.
20882 (handle_query): Take a packet length argument. Handle
20883 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20884 the qSupported response.
20885 (main): Update call to handle_query.
20886
20887 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20888
20889 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20890 (putpkt_binary): Renamed from putpkt and adjusted for binary
20891 data.
20892 (putpkt): New wrapper for putpkt_binary.
20893 (readchar): Don't mask off the high bit.
20894 (decode_X_packet): New function.
20895 * server.c (main): Call putpkt_binary if a handler sets the packet
20896 length. Save the length of the incoming packet. Handle 'X'.
20897 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20898
20899 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20900
20901 * server.c (handle_query): Handle qSupported.
20902
20903 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20904
20905 * remote-utils.c (all_symbols_looked_up): New variable.
20906 (look_up_one_symbol): Check it.
20907 * server.h (look_up_one_symbol): New declaration.
20908 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20909
20910 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20911
20912 * Makefile.in (linux-arm-low.o): Update dependencies.
20913 * linux-arm-low.c: Include "gdb_proc_service.h".
20914 (PTRACE_GET_THREAD_AREA): Define.
20915 (ps_get_thread_area): New function.
20916
20917 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20918
20919 * configure.srv (m68k*-*-uclinux*): New target.
20920 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20921 (linux_resume_one_process): Remove extraneous cast.
20922 (linux_read_offsets): New.
20923 (linux_target_op): Add linux_read_offsets on mmuless systems.
20924 * server.c (handle_query): Add qOffsets logic.
20925 * target.h (struct target_ops): Add read_offsets.
20926
20927 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20928
20929 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20930 (PTRACE_GET_THREAD_AREA): Define.
20931 (ps_get_thread_area): New function.
20932 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20933 (linux-x86-64-low.o): Update.
20934
20935 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20936
20937 * configure.ac: Remove checks for prfpregset_t.
20938 * gdb_proc_service.h: New file.
20939 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20940 new "gdb_proc_service.h".
20941 * proc-service.c: Likewise.
20942 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20943 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20944 * Makefile.in (gdb_proc_service_h): Updated.
20945 * configure, config.in: Regenerated.
20946
20947 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20948
20949 * remote-utils.c (prepare_resume_reply): Move declaration
20950 of gdb_id_from_wait to the top of the block.
20951
20952 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20953
20954 * linux-low.c (regsets_store_inferior_registers): Read the regset
20955 from the target before filling it.
20956
20957 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20958
20959 * server.c (attach_inferior): Return SIGTRAP for a successful
20960 attach.
20961
20962 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20963
20964 * Makefile.in (OBS): Add version.o.
20965 (STAGESTUFF): Delete.
20966 (version.o): Add dependencies.
20967 (version.c): Replace rule.
20968 (clean): Remove version.c.
20969 * server.c (gdbserver_version): New.
20970 (gdbserver_usage): Use printf.
20971 (main): Handle --version and --help.
20972 * server.h (version, host_name): Add declarations.
20973
20974 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20975
20976 * linux-arm-low.c:
20977 * linux-arm-low.c:
20978 * inferiors.c:
20979 * i387-fp.h:
20980 * i387-fp.c:
20981 * gdbreplay.c:
20982 * regcache.c:
20983 * proc-service.c:
20984 * mem-break.h:
20985 * mem-break.c:
20986 * linux-x86-64-low.c:
20987 * linux-sh-low.c:
20988 * linux-s390-low.c:
20989 * linux-ppc64-low.c:
20990 * linux-ppc-low.c:
20991 * linux-mips-low.c:
20992 * linux-m68k-low.c:
20993 * linux-m32r-low.c:
20994 * linux-low.h:
20995 * linux-low.c:
20996 * linux-ia64-low.c:
20997 * linux-i386-low.c:
20998 * linux-crisv32-low.c:
20999 * thread-db.c:
21000 * terminal.h:
21001 * target.h:
21002 * target.c:
21003 * server.h:
21004 * server.c:
21005 * remote-utils.c:
21006 * regcache.h:
21007 * utils.c:
21008 * Makefile.in:
21009 * configure.ac:
21010 * gdbserver.1: Add (C) after Copyright. Update the FSF
21011 address.
21012
21013 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21014
21015 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21016 (arm_breakpoint_at): Recognize both breakpoints.
21017 (the_low_target): Use the correct breakpoint instruction.
21018
21019 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21020
21021 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21022 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21023 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21024 (the_low_target): Update.
21025
21026 2005-10-25 Andreas Schwab <schwab@suse.de>
21027
21028 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21029
21030 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21031 (ia64_num_regs): Reduce to 462.
21032
21033 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21034
21035 * acinclude.m4: Correct quoting.
21036 * aclocal.m4: Regenerated.
21037
21038 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21039 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21040 (thread_db_init): Call thread_db_err_str.
21041 * configure.ac: Check for TD_VERSION.
21042 * config.in, configure: Regenerated.
21043
21044 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21045
21046 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21047
21048 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21049
21050 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21051 is not available. Define HAVE_PTRACE_GETREGS if it is.
21052 * config.in, configure: Regenerated.
21053 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21054 * linux-i386-low.c, linux-m68k-low.c: Update to use
21055 HAVE_PTRACE_GETREGS.
21056 * linux-low.c (regsets_fetch_inferior_registers)
21057 (regsets_store_inferior_registers): Only return 0 if we processed
21058 GENERAL_REGS.
21059 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21060 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21061
21062 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21063
21064 * inferiors.c (struct thread_info): Add gdb_id.
21065 (add_thread): Add gdb_id argument.
21066 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21067 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21068 calls to add_thread.
21069 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21070 * server.c (handle_query): Use thread_to_gdb_id.
21071 (handle_v_cont, main): Use gdb_id_to_thread_id.
21072 * server.h (add_thread): Update prototype.
21073 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21074 prototypes.
21075
21076 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21077
21078 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21079 left-padded registers.
21080 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21081 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21082
21083 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21084
21085 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21086 * configure: Regenerate.
21087 * config.in: Regenerate.
21088 * server.h (NEED_DECLARATION_STRERROR):
21089 Replace with !HAVE_DECL_STRERROR.
21090
21091 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21092
21093 * linux-low.c (linux_wait, linux_send_signal): Don't test
21094 an unsigned long variable for > 0 if it could be MAX_ULONG.
21095 * server.c (myresume): Likewise.
21096 * target.c (set_desired_inferior): Likewise.
21097
21098 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21099
21100 * configure.ac: Simplify and improve check for socklen_t.
21101 * configure, config.in: Regenerate.
21102
21103 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21104
21105 * acconfig.h: Remove.
21106 * configure.ac: Add a test for socklen_t. Use three-argument
21107 AC_DEFINE throughout.
21108 * config.in: Regenerated using autoheader 2.59.
21109 * configure: Regenerated.
21110
21111 * gdbreplay.c (socklen_t): Provide a default.
21112 (remote_open): Use socklen_t.
21113 * remote-utils.c (socklen_t): Provide a default.
21114 (remote_open): Use socklen_t.
21115 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21116 unsigned char.
21117
21118 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21119 char for buffers.
21120 * linux-low.c (linux_read_memory, linux_write_memory)
21121 (linux_read_auxv): Likewise.
21122 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21123 (check_mem_write): Likewise.
21124 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21125 Likewise.
21126 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21127 (registers_from_string, register_data): Likewise.
21128 * server.c (handle_query, main): Likewise.
21129 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21130 (decode_M_packet): Likewise.
21131 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21132 * target.h (struct target_ops): Update read_memory, write_memory,
21133 and read_auxv.
21134 (read_inferior_memory, write_inferior_memory): Update.
21135 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21136 to unsigned char *.
21137 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21138 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21139 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21140 linux-s390-low.c, linux-sh-low.c: Update for changes in
21141 read_inferior_memory and the_low_target->breakpoint.
21142
21143 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21144
21145 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21146 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21147 * configure.srv: Add powerpc64-*-linux*.
21148 * linux-ppc64-low.c: New file.
21149
21150 2005-05-23 Orjan Friberg <orjanf@axis.com>
21151
21152 * linux-cris-low.c: New file with support for CRIS.
21153 * linux-crisv32-low.c: Ditto for CRISv32.
21154 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21155 (clean): Add reg-cris.c and reg-crisv32.c.
21156 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21157 reg-crisv32.o, and reg-crisv32.c to make rules.
21158 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21159 recognized targets.
21160
21161 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21162
21163 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21164 of sizeof (PTRACE_XFER_TYPE).
21165 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21166
21167 2005-05-12 Orjan Friberg <orjanf@axis.com>
21168
21169 * target.h (struct target_ops): Add insert_watchpoint,
21170 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21171 pointers for hardware watchpoint support.
21172 * linux-low.h (struct linux_target_ops): Ditto.
21173 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21174 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21175 to linux_target_ops.
21176 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21177 reply packet.
21178 * server.c (main): Recognize 'Z' and 'z' packets.
21179
21180 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21181
21182 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21183 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21184 (the_low_target): Add new members.
21185
21186 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21187
21188 * proc-service.c (ps_lgetregs): Search all_processes instead of
21189 all_threads.
21190
21191 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21192
21193 * server.c (start_inferior): Change return type to int.
21194 (attach_inferior): Change sigptr to int *.
21195 (handle_v_cont, handle_v_requests): Change signal to int *.
21196 (main): Change signal to int.
21197
21198 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21199
21200 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21201 * configure.srv: Add m32r*-*-linux*.
21202 * linux-m32r-low.c: New file.
21203
21204 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21205
21206 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21207
21208 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21209
21210 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21211 Take unsigned long arguments for PIDs.
21212 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21213 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21214 (wait_for_sigstop, linux_resume_one_process)
21215 (regsets_fetch_inferior_registers, linux_send_signal)
21216 (linux_read_auxv): Likewise. Update the types of variables holding
21217 PIDs. Update format string specifiers.
21218 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21219 * remote-utils.c (prepare_resume_reply): Likewise.
21220 * server.c (cont_thread, general_thread, step_thread)
21221 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21222 unsigned long.
21223 (handle_query): Update format specifiers.
21224 (handle_v_cont, main): Use strtoul for thread IDs.
21225 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21226 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21227 (general_thread, step_thread, thread_from_wait)
21228 (old_thread_from_wait): Update.
21229 * target.h (struct thread_resume): Use unsigned long for THREAD.
21230 (struct target_ops): Use unsigned long for arguments to attach and
21231 thread_alive.
21232
21233 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21234
21235 * acinclude.m4: Include bfd/bfd.m4 directly.
21236 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21237 <agriffis@toolchain.org>.
21238 * aclocal.m4, configure: Regenerated.
21239
21240 2005-01-07 Andrew Cagney <cagney@gnu.org>
21241
21242 * configure.ac: Rename configure.in, require autoconf 2.59.
21243 * configure: Re-generate.
21244
21245 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21246
21247 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21248 LIBS when finished.
21249 * aclocal.m4: Regenerated.
21250 * configure: Regenerated.
21251
21252 2004-11-21 Andreas Schwab <schwab@suse.de>
21253
21254 * linux-m68k-low.c (m68k_num_gregs): Define.
21255 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21256 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21257 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21258 (m68k_breakpoint_at): New. Add to the_low_target.
21259
21260 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21261 srv_linux_thread_db to yes.
21262
21263 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21264
21265 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21266 (ARCH_SET_FS): Likewise.
21267 (ARCH_GET_FS): Likewise.
21268 (ARCH_GET_GS): Likewise.
21269
21270 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21271
21272 * linux-i386-low.c (ps_get_thread_area): New.
21273 * linux-x86-64-low.c (ps_get_thread_area): New.
21274 * linux-low.c: Include <sys/syscall.h>.
21275 (linux_kill_one_process): Don't kill the first thread here.
21276 (linux_kill): Kill the first thread here.
21277 (kill_lwp): New function.
21278 (send_sigstop, linux_send_signal): Use it.
21279 * proc-service.c: Clean up #ifdefs.
21280 (fpregset_info): Delete.
21281 (ps_lgetregs): Update and enable implementation.
21282 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21283 implementations.
21284 * remote-utils.c (struct sym_cache, symbol_cache): New.
21285 (input_interrupt): Print a clearer message.
21286 (async_io_enabled): New variable.
21287 (enable_async_io, disable_async_io): Use it. Update comments.
21288 (look_up_one_symbol): Use the symbol cache.
21289 * thread-db.c (thread_db_look_up_symbols): New function.
21290 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21291
21292 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21293
21294 * configure.in: Test for -rdynamic.
21295 * configure: Regenerated.
21296 * Makefile (INTERNAL_LDFLAGS): New.
21297 (gdbserver, gdbreplay): Use it.
21298
21299 2004-09-02 Andrew Cagney <cagney@gnu.org>
21300
21301 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21302
21303 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21304
21305 * linux-low.c (linux_wait): Clear all_processes list also.
21306
21307 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21308
21309 * linux-low.c: Include <errno.h>. Remove extern declaration of
21310 errno.
21311
21312 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21313
21314 * gdbreplay.c, server.h, utils.c: Update copyright years.
21315
21316 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21317
21318 * server.c (main): Print child status or termination signal from
21319 variable 'signal', not 'sig'.
21320
21321 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21322
21323 * linux-low.c (linux_read_memory): Change return type to
21324 int. Check for and return error from ptrace().
21325 * target.c (read_inferior_memory): Change return type to int. Pass
21326 back return status from the_target->read_memory().
21327 * target.h (struct target_ops): Adapt *read_memory() prototype.
21328 Update comment.
21329 (read_inferior_memory): Adapt prototype.
21330 * server.c (main): Return an error packet if
21331 read_inferior_memory() returns an error.
21332
21333 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21334
21335 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21336 Unify with other clean targets.
21337
21338 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21339
21340 * server.c (handle_v_cont): Call set_desired_inferior.
21341
21342 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21343
21344 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21345
21346 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21347
21348 * linux-low.c (linux_wait): Unblock async I/O.
21349 (linux_resume): Block and enable async I/O.
21350 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21351 * server.h (block_async_io, unblock_async_io): Add prototypes.
21352
21353 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21354
21355 * remote-utils.c (remote_open): Print a status notice after
21356 opening a TCP port.
21357 * server.c (attach_inferior): Print a status notice after
21358 attaching.
21359
21360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21361
21362 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21363
21364 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21365
21366 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21367 error packet.
21368 * server.c, target.h: Update copyright years.
21369
21370 2004-02-25 Roland McGrath <roland@redhat.com>
21371
21372 * target.h (struct target_ops): New member `read_auxv'.
21373 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21374 * linux-low.c (linux_read_auxv): New function.
21375 (linux_target_ops): Initialize `read_auxv' member to that.
21376
21377 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21378
21379 Committed by Jim Blandy <jimb@redhat.com>.
21380
21381 * linux-s390-low.c (s390_num_regs): Update.
21382 (s390_regmap): Remove control registers. Use __s390x__ predefine
21383 instead of GPR_SIZE to distiguish s390 and s390x targets.
21384
21385 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21386
21387 * linux-low.c: Update copyright year.
21388 (check_removed_breakpoint): Clear pending_is_breakpoint.
21389 (linux_set_resume_request, linux_queue_one_thread)
21390 (resume_status_pending_p): New functions.
21391 (linux_continue_one_thread): Use process->resume.
21392 (linux_resume): Only resume threads if there are no pending events.
21393 * linux-low.h (struct process_info): Add resume request
21394 pointer.
21395
21396 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21397
21398 * regcache.c (new_register_cache): Clear the allocated register
21399 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21400
21401 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21402
21403 * linux-low.c (linux_resume): Take a struct thread_resume *
21404 argument.
21405 (linux_wait): Update call.
21406 (resume_ptr): New static variable.
21407 (linux_continue_one_thread): Renamed from
21408 linux_continue_one_process. Use resume_ptr.
21409 (linux_resume): Use linux_continue_one_thread.
21410 * server.c (handle_v_cont, handle_v_requests): New functions.
21411 (myresume): New function.
21412 (main): Handle 'v' case.
21413 * target.h (struct thread_resume): New type.
21414 (struct target_ops): Change argument of "resume" to struct
21415 thread_resume *.
21416 (myresume): Delete macro.
21417
21418 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21419
21420 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21421 (uninstall): Support DESTDIR.
21422
21423 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21424
21425 * configure.srv: Add xscale*linux copy of arm*linux entry.
21426
21427 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21428
21429 * linux-arm-low.c (arm_reinsert_addr): New function.
21430 (the_low_target): Add arm_reinsert_addr.
21431
21432 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21433
21434 * mem-break.c: Remove whitespace at end of file.
21435
21436 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21437
21438 * configure.in: Check whether we need to prototype strerror.
21439 * server.h: Optionally prototype strerror.
21440 * gdbreplay.c (perror_with_name): Use strerror.
21441 * linux-low.c (linux_attach_lwp): Use strerror.
21442 * utils.c (perror_with_name): Use strerror.
21443 * config.in, configure: Regenerated.
21444
21445 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21446
21447 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21448 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21449
21450 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21451
21452 * Makefile.in (SFILES): Update.
21453 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21454 low-sun3.c: Remove files.
21455
21456 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21457
21458 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21459 (linux_detach_one_process, linux_detach): New functions.
21460 (linux_target_ops): Add linux_detach.
21461 * server.c (main): Handle 'D' packet.
21462 * target.h (struct target_ops): Add "detach" member.
21463 (detach_inferior): Define.
21464
21465 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21466
21467 From Kelley Cook <kelleycook@wideopenwest.com>:
21468 * configure.srv: Accept i[34567]86 variants.
21469
21470 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21471
21472 * linux-low.c (linux_wait_for_event): Correct comment typos.
21473 (linux_resume_one_process): Call check_removed_breakpoint.
21474 (linux_send_signal): New function.
21475 (linux_target_ops): Add linux_send_signal.
21476 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21477 of kill.
21478 * target.h (struct target_ops): Add send_signal.
21479
21480 2003-05-29 Jim Blandy <jimb@redhat.com>
21481
21482 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21483 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21484 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21485 away part of the register's value.
21486
21487 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21488
21489 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21490 (linux_wait_for_event, linux_init_signals): Likewise.
21491
21492 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21493
21494 * configure.in: Check for stdlib.h.
21495 * configure: Regenerated.
21496 * config.in: Regenerated.
21497
21498 2003-01-04 Andreas Schwab <schwab@suse.de>
21499
21500 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21501
21502 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21503
21504 * Makefile.in: Remove obsolete code.
21505
21506 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21507
21508 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21509 defined(PT_FPR0_HI).
21510
21511 2002-11-17 Stuart Hughes <seh@zee2.com>
21512
21513 * linux-arm-low.c (arm_num_regs): Increase.
21514 (arm_regmap): Include status register.
21515
21516 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21517
21518 * linux-low.c (register_addr): Remove incorrect -1 check.
21519
21520 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21521
21522 * linux-low.c (linux_create_inferior): Call setpgid. Return
21523 the new PID.
21524 (unstopped_p, linux_signal_pid): Remove.
21525 (linux_target_ops): Remove linux_signal_pid.
21526 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21527 global instead of target method.
21528 * target.h (struct target_ops): Remove signal_pid. Update comment
21529 for create_inferior.
21530 * server.c (signal_pid): New variable.
21531 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21532 gdbserver. Set the child to be the foreground process group.
21533 (attach_inferior): Set signal_pid.
21534
21535 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21536
21537 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21538
21539 2002-08-20 Jim Blandy <jimb@redhat.com>
21540
21541 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21542 default for this.
21543
21544 2002-08-01 Andrew Cagney <cagney@redhat.com>
21545
21546 * Makefile.in: Make chill references obsolete.
21547
21548 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21549
21550 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21551 * configure: Regenerate.
21552 * config.in: Regenerate.
21553
21554 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21555
21556 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21557 (perror_with_name, remote_close, remote_open, expect, play): Static.
21558
21559 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21560
21561 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21562 byte offsets instead of an array of indexes.
21563 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21564
21565 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21566
21567 * regcache.c: Add comment.
21568
21569 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21570
21571 * thread-db.c: New file.
21572 * proc-service.c: New file.
21573 * acinclude.m4: New file.
21574 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21575 proc-service.o, and thread-db.o.
21576 (linux-low.o): Add USE_THREAD_DB.
21577 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21578 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21579 * aclocal.m4: Regenerated.
21580 * config.in: Regenerated.
21581 * configure: Regenerated.
21582 * configure.in: Check for proc_service.h, sys/procfs.h,
21583 thread_db.h, and linux/elf.h headrs.
21584 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21585 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21586 Check for -lthread_db and thread support.
21587 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21588 PowerPC, and SuperH.
21589 * i387-fp.c: Constify arguments.
21590 * i387-fp.h: Likewise.
21591 * inferiors.c: (struct thread_info): Renamed from
21592 `struct inferior_info'. Remove PID member. Use generic inferior
21593 list header. All uses updated.
21594 (inferiors, signal_pid): Removed.
21595 (all_threads): New variable.
21596 (get_thread): Define.
21597 (add_inferior_to_list): New function.
21598 (for_each_inferior): New function.
21599 (change_inferior_id): New function.
21600 (add_inferior): Removed.
21601 (remove_inferior): New function.
21602 (add_thread): New function.
21603 (free_one_thread): New function.
21604 (remove_thread): New function.
21605 (clear_inferiors): Use for_each_inferior and free_one_thread.
21606 (find_inferior): New function.
21607 (find_inferior_id): New function.
21608 (inferior_target_data): Update argument type.
21609 (set_inferior_target_data): Likewise.
21610 (inferior_regcache_data): Likewise.
21611 (set_inferior_regcache_data): Likewise.
21612 * linux-low.c (linux_bp_reinsert): Remove.
21613 (all_processes, stopping_threads, using_thrads)
21614 (struct pending_signals, debug_threads, pid_of): New.
21615 (inferior_pid): Replace with macro.
21616 (struct inferior_linux_data): Remove.
21617 (get_stop_pc, add_process): New functions.
21618 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21619 Use add_process and add_thread.
21620 (linux_attach_lwp): New function, based on old linux_attach. Use
21621 add_process and add_thread. Set stop_expected for new threads.
21622 (linux_attach): New function.
21623 (linux_kill_one_process): New function.
21624 (linux_kill): Kill all LWPs.
21625 (linux_thread_alive): Use find_inferior_id.
21626 (check_removed_breakpoints, status_pending_p): New functions.
21627 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21628 Update. Use WNOHANG. Wait for cloned processes also. Update process
21629 struct for the found process.
21630 (linux_wait_for_event): New function.
21631 (linux_wait): Use it. Support LWPs.
21632 (send_sigstop, wait_for_sigstop, stop_all_processes)
21633 (linux_resume_one_process, linux_continue_one_process): New functions.
21634 (linux_resume): Support LWPs.
21635 (REGISTER_RAW_SIZE): Remove.
21636 (fetch_register): Use register_size instead. Call supply_register.
21637 (usr_store_inferior_registers): Likewise. Call collect_register.
21638 Fix recursive case.
21639 (regsets_fetch_inferior_registers): Improve error message.
21640 (regsets_store_inferior_registers): Add debugging.
21641 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21642 (unstopped_p, linux_signal_pid): New functions.
21643 (linux_target_ops): Add linux_signal_pid.
21644 (linux_init_signals): New function.
21645 (initialize_low): Call it. Initialize using_threads.
21646 * regcache.c (inferior_regcache_data): Add valid
21647 flag.
21648 (get_regcache): Fetch registers lazily. Add fetch argument
21649 and update all callers.
21650 (regcache_invalidate_one, regcache_invalidate): New
21651 functions.
21652 (new_register_cache): Renamed from create_register_cache.
21653 Return the new regcache.
21654 (free_register_cache): Change argument to a void *.
21655 (registers_to_string, registers_from_string): Call get_regcache
21656 with fetch flag set.
21657 (register_data): Make static. Pass fetch flag to get_regcache.
21658 (supply_register): Call get_regcache with fetch flag clear.
21659 (collect_register): Call get_regcache with fetch flag set.
21660 (collect_register_as_string): New function.
21661 * regcache.h: Update.
21662 * remote-utils.c (putpkt): Flush after debug output and use
21663 stderr.
21664 Handle input interrupts while waiting for an ACK.
21665 (input_interrupt): Use signal_pid method.
21666 (getpkt): Flush after debug output and use stderr.
21667 (outreg): Use collect_register_as_string.
21668 (new_thread_notify, dead_thread_notify): New functions.
21669 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21670 and general_thread.
21671 (look_up_one_symbol): Flush after debug output.
21672 * server.c (step_thread, server_waiting): New variables.
21673 (start_inferior): Don't use signal_pid. Update call to mywait.
21674 (attach_inferior): Update call to mywait.
21675 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21676 (main): Don't fetch/store registers explicitly. Use
21677 set_desired_inferior. Support proposed ``Hs'' packet. Update
21678 calls to mywait.
21679 * server.h: Update.
21680 (struct inferior_list, struct_inferior_list_entry): New.
21681 * target.c (set_desired_inferior): New.
21682 (write_inferior_memory): Constify.
21683 (mywait): New function.
21684 * target.h: Update.
21685 (struct target_ops): New signal_pid method.
21686 (mywait): Removed macro, added prototype.
21687
21688 * linux-low.h (regset_func): Removed.
21689 (regset_fill_func, regset_store_func): New.
21690 (enum regset_type): New.
21691 (struct regset_info): Add type field. Use new operation types.
21692 (struct linux_target_ops): stop_pc renamed to get_pc.
21693 Add decr_pc_after_break and breakpoint_at.
21694 (get_process, get_thread_proess, get_process_thread)
21695 (strut process_info, all_processes, linux_attach_lwp)
21696 (thread_db_init): New.
21697
21698 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21699 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21700 (the_low_target): Add new members.
21701 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21702 (i386_store_fpxregset): Constify.
21703 (target_regsets): Add new kind identifier.
21704 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21705 (i386_set_pc): Add debugging.
21706 (i386_breakpoint_at): New function.
21707 (the_low_target): Add new members.
21708 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21709 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21710 (mips_breakpoint_at): New.
21711 (the_low_target): Add new members.
21712 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21713 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21714 (the_low_target): Add new members.
21715 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21716 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21717 (the_low_target): Add new members.
21718 * linux-x86-64-low.c (target_regsets): Add new kind
21719 identifier.
21720
21721 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21722
21723 From Martin Pool <mbp@samba.org>:
21724 * server.c (gdbserver_usage): New function.
21725 (main): Call it.
21726
21727 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21728
21729 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21730 stop_at -> stop_pc.
21731
21732 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21733
21734 * Makefile.in: Remove obsolete code.
21735
21736 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21737
21738 * linux-low.c (regsets_fetch_inferior_registers),
21739 (regsets_store_inferior_registers): Removed cast to int from
21740 ptrace() calls.
21741 * regcache.h: Added declaration of struct inferior_info.
21742
21743 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21744
21745 * inferiors.c (struct inferior_info): Add regcache_data.
21746 (add_inferior): Call create_register_cache.
21747 (clear_inferiors): Call free_register_cache.
21748 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21749 * regcache.c (struct inferior_regcache_data): New.
21750 (registers): Remove.
21751 (get_regcache): New function.
21752 (create_register_cache, free_register_cache): New functions.
21753 (set_register_cache): Don't initialize the register cache here.
21754 (registers_to_string, registers_from_string, register_data): Call
21755 get_regcache.
21756 * regcache.h: Add prototypes.
21757 * server.h: Likewise.
21758
21759 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21760
21761 * mem-break.c: New file.
21762 * mem-break.h: New file.
21763 * Makefile.in: Add mem-break.o rule; update server.h
21764 dependencies.
21765 * inferiors.c (struct inferior_info): Add target_data
21766 member.
21767 (clear_inferiors): Free target_data member if set.
21768 (inferior_target_data, set_inferior_target_data): New functions.
21769 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21770 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21771 * linux-low.c (linux_bp_reinsert): New variable.
21772 (struct inferior_linux_data): New.
21773 (linux_create_inferior): Use set_inferior_target_data.
21774 (linux_attach): Likewise. Call add_inferior.
21775 (linux_wait_for_one_inferior): New function.
21776 (linux_wait): Call it.
21777 (linux_write_memory): Add const.
21778 (initialize_low): Call set_breakpoint_data.
21779 * linux-low.h (struct linux_target_ops): Add breakpoint
21780 handling members.
21781 * server.c (attach_inferior): Remove extra add_inferior
21782 call.
21783 * server.h: Include mem-break.h. Update inferior.c
21784 prototypes.
21785 * target.c (read_inferior_memory)
21786 (write_inferior_memory): New functions.
21787 * target.h (read_inferior_memory)
21788 (write_inferior_memory): Change macros to prototypes.
21789 (struct target_ops): Update comments. Add const to write_memory
21790 definition.
21791
21792 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21793
21794 * linux-low.c (usr_store_inferior_registers): Support
21795 registers which are allowed to fail to store.
21796 * linux-low.h (linux_target_ops): Likewise.
21797 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21798 (ppc_cannot_store_register): FPSCR may not be storable.
21799
21800 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21801
21802 * server.h: Include <string.h> if HAVE_STRING_H.
21803 * ChangeLog: Correct paths in last ChangeLog entry.
21804
21805 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21806
21807 * linux-low.h: Remove obsolete prototypes.
21808 (struct linux_target_ops): New.
21809 (extern the_low_target): New.
21810 * linux-low.c (num_regs, regmap): Remove declarations.
21811 (register_addr): Use the_low_target explicitly.
21812 (fetch_register): Likewise.
21813 (usr_fetch_inferior_registers): Likewise.
21814 (usr_store_inferior_registers): Likewise.
21815 * linux-arm-low.c (num_regs): Remove.
21816 (arm_num_regs): Define.
21817 (arm_regmap): Renamed from regmap, made static.
21818 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21819 made static.
21820 (arm_cannot_store_register): Renamed from cannot_store_register,
21821 made static.
21822 (the_low_target): New.
21823 * linux-i386-low.c (num_regs): Remove.
21824 (i386_num_regs): Define.
21825 (i386_regmap): Renamed from regmap, made static.
21826 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21827 made static.
21828 (i386_cannot_store_register): Renamed from cannot_store_register,
21829 made static.
21830 (the_low_target): New.
21831 * linux-ia64-low.c (num_regs): Remove.
21832 (ia64_num_regs): Define.
21833 (ia64_regmap): Renamed from regmap, made static.
21834 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21835 made static.
21836 (ia64_cannot_store_register): Renamed from cannot_store_register,
21837 made static.
21838 (the_low_target): New.
21839 * linux-m68k-low.c (num_regs): Remove.
21840 (m68k_num_regs): Define.
21841 (m68k_regmap): Renamed from regmap, made static.
21842 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21843 made static.
21844 (m68k_cannot_store_register): Renamed from cannot_store_register,
21845 made static.
21846 (the_low_target): New.
21847 * linux-mips-low.c (num_regs): Remove.
21848 (mips_num_regs): Define.
21849 (mips_regmap): Renamed from regmap, made static.
21850 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21851 made static.
21852 (mips_cannot_store_register): Renamed from cannot_store_register,
21853 made static.
21854 (the_low_target): New.
21855 * linux-ppc-low.c (num_regs): Remove.
21856 (ppc_num_regs): Define.
21857 (ppc_regmap): Renamed from regmap, made static.
21858 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21859 made static.
21860 (ppc_cannot_store_register): Renamed from cannot_store_register,
21861 made static.
21862 (the_low_target): New.
21863 * linux-s390-low.c (num_regs): Remove.
21864 (s390_num_regs): Define.
21865 (s390_regmap): Renamed from regmap, made static.
21866 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21867 made static.
21868 (s390_cannot_store_register): Renamed from cannot_store_register,
21869 made static.
21870 (the_low_target): New.
21871 * linux-sh-low.c (num_regs): Remove.
21872 (sh_num_regs): Define.
21873 (sh_regmap): Renamed from regmap, made static.
21874 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21875 made static.
21876 (sh_cannot_store_register): Renamed from cannot_store_register,
21877 made static.
21878 (the_low_target): New.
21879 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21880 (the_low_target): New.
21881
21882 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21883
21884 * Makefile.in: Add stamp-h target.
21885 * configure.in: Create stamp-h.
21886 * configure: Regenerated.
21887
21888 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21889
21890 * inferiors.c: New file.
21891 * target.c: New file.
21892 * target.h: New file.
21893 * Makefile.in: Add target.o and inferiors.o. Update
21894 dependencies.
21895 * linux-low.c (inferior_pid): New static variable,
21896 moved from server.c.
21897 (linux_create_inferior): Renamed from create_inferior.
21898 Call add_inferior. Return 0 on success instead of a PID.
21899 (linux_attach): Renamed from myattach.
21900 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21901 (linux_thread_alive): Renamed from mythread_alive.
21902 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21903 child dies.
21904 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21905 (regsets_store_inferior_registers): Correct error message.
21906 Add missing ``return 0''.
21907 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21908 (linux_store_registers): Renamed from store_inferior_registers.
21909 (linux_read_memory): Renamed from read_inferior_memory.
21910 (linux_write_memory): Renamed from write_inferior_memory.
21911 (linux_target_ops): New structure.
21912 (initialize_low): Call set_target_ops ().
21913 * remote-utils.c (unhexify): New function.
21914 (hexify): New function.
21915 (input_interrupt): Send signals to ``signal_pid''.
21916 * server.c (inferior_pid): Remove.
21917 (start_inferior): Update create_inferior call.
21918 (attach_inferior): Call add_inferior.
21919 (handle_query): New function.
21920 (main): Call handle_query for `q' packets.
21921 * server.h: Include "target.h". Remove obsolete prototypes.
21922 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21923
21924 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21925
21926 * Makefile.in: Add WARN_CFLAGS. Update configury
21927 dependencies.
21928 * configure.in: Check for <string.h>
21929 * configure: Regenerate.
21930 * config.in: Regenerate.
21931 * gdbreplay.c: Include needed system headers.
21932 (remote_open): Remove strchr prototype.
21933 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21934 * regcache.c (supply_register): Change buf argument to const void *.
21935 (supply_register_by_name): Likewise.
21936 (collect_register): Change buf argument to void *.
21937 (collect_register_by_name): Likewise.
21938 * regcache.h: Add missing prototypes.
21939 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21940 * server.c (handle_query): New function.
21941 (attached): New static variable, moved out of main.
21942 (main): Quiet longjmp clobber warnings.
21943 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21944 * utils.c (error): Remove NORETURN.
21945 (fatal): Likewise.
This page took 0.498626 seconds and 5 git commands to generate.