]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Use enqueue_pending_signal in linux_resume_one_thread
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4281b351
YQ
12016-07-21 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (linux_resume_one_thread): Call
4 enqueue_pending_signal.
5
984a2c04
YQ
62016-07-21 Yao Qi <yao.qi@linaro.org>
7
8 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
9 * inferiors.c (do_restore_current_thread_cleanup): New function.
10 (make_cleanup_restore_current_thread): Likewise.
11 * linux-low.c (install_software_single_step_breakpoints): Call
12 make_cleanup_restore_current_thread. Switch current_thread to
13 thread.
14
bec903c9
YQ
152016-07-21 Yao Qi <yao.qi@linaro.org>
16
17 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
18 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
19 (clone_one_breakpoint): Likewise.
20 (delete_reinsert_breakpoints): Change parameter to thread.
21 Callers updated.
22 (has_reinsert_breakpoints): Likewise.
23 (uninsert_reinsert_breakpoints): Likewise.
24 (reinsert_reinsert_breakpoints): Likewise.
25 * mem-break.h (set_reinsert_breakpoint): Update declaration.
26 (delete_reinsert_breakpoints): Likewise.
27 (reinsert_reinsert_breakpoints): Likewise.
28 (uninsert_reinsert_breakpoints): Likewise.
29 (has_reinsert_breakpoints): Likewise.
30
63c40ec7
YQ
312016-07-21 Yao Qi <yao.qi@linaro.org>
32
33 * inferiors.c (get_thread_process): Make parameter const.
34 * inferiors.h (get_thread_process): Update declaration.
35 * mem-break.c (clone_all_breakpoints): Remove all parameters.
36 Add new parameters child_thread and parent_thread. Callers
37 updated.
38 * mem-break.h (clone_all_breakpoints): Update declaration.
39
9aa76cd0
YQ
402016-07-21 Yao Qi <yao.qi@linaro.org>
41
42 * mem-break.c (struct breakpoint) <cond_list>: Remove.
43 <command_list, handler>: Remove.
44 (struct gdb_breakpoint): New.
45 (struct other_breakpoint): New.
46 (struct reinsert_breakpoint): New.
47 (is_gdb_breakpoint): New function.
48 (any_persistent_commands): Update command_list if
49 is_gdb_breakpoint returns true.
50 (set_breakpoint): Create breakpoints according to their types.
51 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
52 (set_gdb_breakpoint_1): Likewise.
53 (set_gdb_breakpoint): Likewise.
54 (clear_breakpoint_conditions): Change parameter type to
55 'struct gdb_breakpoint *'.
56 (clear_breakpoint_commands): Likewise.
57 (clear_breakpoint_conditions_and_commands): Likewise.
58 (add_condition_to_breakpoint): Likewise.
59 (add_breakpoint_condition): Likewise.
60 (add_commands_to_breakpoint): Likewise.
61 (check_breakpoints): Check other_breakpoint.
62 (clone_one_breakpoint): Clone breakpopint according to its type.
63 * mem-break.h (struct gdb_breakpoint): Declare.
64 (set_gdb_breakpoint): Update declaration.
65 (clear_breakpoint_conditions_and_commands): Likewise.
66 (add_breakpoint_condition): Likewise.
67 (add_breakpoint_commands): Likewise.
68 * server.c (process_point_options): Change parameter type to
69 'struct gdb_breakpoint *'.
70
811f8301
YQ
712016-07-21 Yao Qi <yao.qi@linaro.org>
72
73 * mem-break.c (set_breakpoint_at): Rename it to ...
74 (set_breakpoint_type_at): ... it.
75 (set_breakpoint_at): Call set_breakpoint_type_at.
76 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
77 * mem-break.h (set_breakpoint_at): Update comments.
78
b1c51e36
CLT
792016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
80
81 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
82 to buf parameter.
83 (nios2_store_gregset): Likewise.
84
ced2dffb
PA
852016-07-01 Pedro Alves <palves@redhat.com>
86 Antoine Tremblay <antoine.tremblay@ericsson.com>
87
88 * linux-low.c: Change interface to take the target lwp_info
89 pointer directly and return void. Handle detaching from a zombie
90 thread.
91 (linux_detach_lwp_callback): New function.
92 (linux_detach): Detach from the leader thread after detaching from
93 the clone threads.
94
2ac09a5b
YQ
952016-06-28 Yao Qi <yao.qi@linaro.org>
96
97 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
98 for variable new_offset.
99 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
100 (aarch64_ftrace_insn_reloc_cb): Likewise.
101 (aarch64_ftrace_insn_reloc_tb): Likewise.
102 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
103 PRIx64 instead of PRIx32.
104
79e7fd4f
YQ
1052016-06-28 Yao Qi <yao.qi@linaro.org>
106
107 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
108 (the_low_target): Install arm_get_syscall_trapinfo.
109
061fc021
YQ
1102016-06-28 Yao Qi <yao.qi@linaro.org>
111
112 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
113 function.
114 (the_low_target): Install aarch64_get_syscall_trapinfo.
115
4cc32bec
YQ
1162016-06-28 Yao Qi <yao.qi@linaro.org>
117
118 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
119 Callers updated.
120 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
121 Remove parameter sysno.
122 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
123 sysret.
124
782c1122
AA
1252016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
126
127 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
128 (s390_emit_ne_goto): Likewise.
129 (s390_emit_lt_goto): Likewise.
130 (s390_emit_le_goto): Likewise.
131 (s390_emit_gt_goto): Likewise.
132 (s390_emit_ge_goto): Likewise.
133 (s390x_emit_eq_goto): Likewise.
134 (s390x_emit_ne_goto): Likewise.
135 (s390x_emit_lt_goto): Likewise.
136 (s390x_emit_le_goto): Likewise.
137 (s390x_emit_gt_goto): Likewise.
138 (s390x_emit_ge_goto): Likewise.
139 (s390_emit_ops_impl): Mark variable static.
140 (s390x_emit_ops): Likewise.
141
2e7b624b
YQ
1422016-06-17 Yao Qi <yao.qi@linaro.org>
143
144 * linux-low.c (handle_extended_wait): Call
145 uninsert_reinsert_breakpoints for the parent process. Remove
146 reinsert breakpoints from the child process. Reinsert them to
147 the parent process when vfork is done.
148 * mem-break.c (uninsert_reinsert_breakpoints): New function.
149 (reinsert_reinsert_breakpoints): New function.
150 * mem-break.h (uninsert_reinsert_breakpoints): Declare
151 (reinsert_reinsert_breakpoints): Declare.
152
8a81c5d7
YQ
1532016-06-17 Yao Qi <yao.qi@linaro.org>
154
155 * linux-low.c (handle_extended_wait): If the parent is doing
156 step-over, remove the reinsert breakpoints from the forked child.
157
f50bf8e5
YQ
1582016-06-17 Yao Qi <yao.qi@linaro.org>
159
160 * linux-low.c (unsuspend_all_lwps): Declare.
161 (linux_low_filter_event): If thread exited, call finish_step_over.
162 If step-over is finished, unsuspend other threads.
163
8376a3cb
YQ
1642016-06-17 Yao Qi <yao.qi@linaro.org>
165
166 * linux-low.c (linux_resume_one_lwp_throw): Assert
167 has_reinsert_breakpoints returns false.
168 * mem-break.c (delete_disabled_breakpoints): Assert
169 bp type isn't reinsert_breakpoint.
170
f79b145d
YQ
1712016-06-17 Yao Qi <yao.qi@linaro.org>
172
173 * linux-low.c (maybe_hw_step): New function.
174 (linux_resume_one_lwp_throw): Call maybe_hw_step.
175 (finish_step_over): Switch current_thread to lwp temporarily,
176 and assert has_reinsert_breakpoints returns true.
177 (proceed_one_lwp): Call maybe_hw_step.
178 * mem-break.c (has_reinsert_breakpoints): New function.
179 * mem-break.h (has_reinsert_breakpoints): Declare.
180
0ae534d2
JT
1812016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
182
183 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
184
fcdad592
YQ
1852016-05-17 Yao Qi <yao.qi@linaro.org>
186
187 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
188 instead of find_inferior.
189
9e784964
YQ
1902016-05-05 Yao Qi <yao.qi@linaro.org>
191
192 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
193 Initialize res to zero.
194
cf2ebb6e
YQ
1952016-05-05 Yao Qi <yao.qi@linaro.org>
196
197 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
198 to uint32_t.
199
c1aebf87
UW
2002016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
201
202 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
203 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
204 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
205
35fd2deb 2062016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 207 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
208
209 * tracepoint.c (write_inferior_int8): New function.
210 (cmd_qtenable_disable): Write enable flag using
211 write_inferior_int8.
212
484b3c32
YQ
2132016-04-25 Yao Qi <yao.qi@linaro.org>
214
215 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
216 (need_step_over_p): Return zero if the LWP has pending signals
217 can be delivered on software single step target.
218
85ba7d86
YQ
2192016-04-25 Yao Qi <yao.qi@linaro.org>
220
221 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
222 return instead of error.
223
3539aa13
YQ
2242016-04-22 Yao Qi <yao.qi@linaro.org>
225
226 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
227 to 23.
228
5b061e98
YQ
2292016-04-22 Yao Qi <yao.qi@linaro.org>
230
231 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
232 signal when stepping over breakpoint with software single
233 step.
234
3451269c
PA
2352016-04-21 Pedro Alves <palves@redhat.com>
236
237 * linux-s390-low.c (s390_collect_ptrace_register)
238 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
239 add casts.
240 (s390_check_regset): Use void * instead of gdb_byte *.
241
a2358508
PA
2422016-04-20 Pedro Alves <palves@redhat.com>
243
244 * configure: Renegerate.
245
6885166d
YQ
2462016-04-20 Yao Qi <yao.qi@linaro.org>
247
248 * linux-aarch32-low.c: Include "arch/arm-linux.h".
249 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
250 number 16.
251 (arm_store_gregset): Likewise.
252
2b863f51
WT
2532016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
254
255 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
256 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
257 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
258 (amd64-avx-mpx-linux.c): New rules.
259 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
260 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
261 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
262 (srv_amd64_regobj): Add amd64-avx-mpx.o.
263 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
264 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
265 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
266 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
267 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
268 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
269 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
270 * linux-x86-low.c (x86_linux_read_description): Add case for
271 X86_XSTATE_AVX_MPX_MASK.
272 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
273 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
274 init_registers_i386_avx_mpx_linux.
275 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
276 (initialize_low_tracepoint): Call
277 init_registers_i386_avx_mpx_linux.
278 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
279 (initialize_low_tracepoint): Call
280 init_registers_amd64_avx_mpx_linux.
281 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
282 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
283 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
284 declarations.
285
9b30624b
PA
2862016-04-18 Pedro Alves <palves@redhat.com>
287
288 * configure: Regenerate.
289
45e3745e
AT
2902016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
291
292 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
293 (aarch64_emit_sub): Likewise.
294
2afc13ff
PA
2952016-04-12 Pedro Alves <palves@redhat.com>
296
297 * utils.c (prepare_to_throw_exception): Delete.
298
6e774b13
SM
2992016-04-05 Simon Marchi <simon.marchi@ericsson.com>
300
301 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
302
4dca19f8
MK
3032016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
304
305 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
306
d0a9981f
MK
3072016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
308
309 * linux-aarch64-ipa.c: Add <elf.h> include.
310 * linux-ppc-ipa.c: Add <elf.h> include.
311 * linux-s390-ipa.c: Add <elf.h> include.
312
252db07e
MK
3132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
314
315 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
316 (get_raw_reg_ptr): Likewise.
317 (get_trace_state_variable_value_ptr): Likewise.
318 (set_trace_state_variable_value_ptr): Likewise.
319 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
320 char *.
321
14e2b6d9
MK
3222016-03-31 Wei-cheng Wang <cole945@gmail.com>
323 Marcin Kościelnicki <koriakin@0x04.net>
324
325 PR/17221
326 * linux-ppc-low.c (emit_insns): New function.
327 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
328 (ppc_emit_prologue): New function.
329 (ppc_emit_epilogue): New function.
330 (ppc_emit_add): New function.
331 (ppc_emit_sub): New function.
332 (ppc_emit_mul): New function.
333 (ppc_emit_lsh): New function.
334 (ppc_emit_rsh_signed): New function.
335 (ppc_emit_rsh_unsigned): New function.
336 (ppc_emit_ext): New function.
337 (ppc_emit_zero_ext): New function.
338 (ppc_emit_log_not): New function.
339 (ppc_emit_bit_and): New function.
340 (ppc_emit_bit_or): New function.
341 (ppc_emit_bit_xor): New function.
342 (ppc_emit_bit_not): New function.
343 (ppc_emit_equal): New function.
344 (ppc_emit_less_signed): New function.
345 (ppc_emit_less_unsigned): New function.
346 (ppc_emit_ref): New function.
347 (ppc_emit_const): New function.
348 (ppc_emit_reg): New function.
349 (ppc_emit_pop): New function.
350 (ppc_emit_stack_flush): New function.
351 (ppc_emit_swap): New function.
352 (ppc_emit_stack_adjust): New function.
353 (ppc_emit_call): New function.
354 (ppc_emit_int_call_1): New function.
355 (ppc_emit_void_call_2): New function.
356 (ppc_emit_if_goto): New function.
357 (ppc_emit_goto): New function.
358 (ppc_emit_eq_goto): New function.
359 (ppc_emit_ne_goto): New function.
360 (ppc_emit_lt_goto): New function.
361 (ppc_emit_le_goto): New function.
362 (ppc_emit_gt_goto): New function.
363 (ppc_emit_ge_goto): New function.
364 (ppc_write_goto_address): New function.
365 (ppc_emit_ops_impl): New static variable.
366 (ppc64v1_emit_prologue): New function.
367 (ppc64v2_emit_prologue): New function.
368 (ppc64_emit_epilogue): New function.
369 (ppc64_emit_add): New function.
370 (ppc64_emit_sub): New function.
371 (ppc64_emit_mul): New function.
372 (ppc64_emit_lsh): New function.
373 (ppc64_emit_rsh_signed): New function.
374 (ppc64_emit_rsh_unsigned): New function.
375 (ppc64_emit_ext): New function.
376 (ppc64_emit_zero_ext): New function.
377 (ppc64_emit_log_not): New function.
378 (ppc64_emit_bit_and): New function.
379 (ppc64_emit_bit_or): New function.
380 (ppc64_emit_bit_xor): New function.
381 (ppc64_emit_bit_not): New function.
382 (ppc64_emit_equal): New function.
383 (ppc64_emit_less_signed): New function.
384 (ppc64_emit_less_unsigned): New function.
385 (ppc64_emit_ref): New function.
386 (ppc64_emit_const): New function.
387 (ppc64v1_emit_reg): New function.
388 (ppc64v2_emit_reg): New function.
389 (ppc64_emit_pop): New function.
390 (ppc64_emit_stack_flush): New function.
391 (ppc64_emit_swap): New function.
392 (ppc64v1_emit_call): New function.
393 (ppc64v2_emit_call): New function.
394 (ppc64v1_emit_int_call_1): New function.
395 (ppc64v2_emit_int_call_1): New function.
396 (ppc64v1_emit_void_call_2): New function.
397 (ppc64v2_emit_void_call_2): New function.
398 (ppc64_emit_if_goto): New function.
399 (ppc64_emit_eq_goto): New function.
400 (ppc64_emit_ne_goto): New function.
401 (ppc64_emit_lt_goto): New function.
402 (ppc64_emit_le_goto): New function.
403 (ppc64_emit_gt_goto): New function.
404 (ppc64_emit_ge_goto): New function.
405 (ppc64v1_emit_ops_impl): New static variable.
406 (ppc64v2_emit_ops_impl): New static variable.
407 (ppc_emit_ops): New function.
408 (linux_low_target): Wire in ppc_emit_ops.
409
a2174ba4
MK
4102016-03-31 Wei-cheng Wang <cole945@gmail.com>
411 Marcin Kościelnicki <koriakin@0x04.net>
412
413 PR/17221
414 * Makefile.in: Add powerpc-*-ipa.o
415 * configure.srv: Add ipa_obj for powerpc*-linux.
416 * linux-ppc-ipa.c: New file.
417 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
418 includes.
419 (PPC_FIELD): New macro.
420 (PPC_SEXT): New macro.
421 (PPC_OP6): New macro.
422 (PPC_BO): New macro.
423 (PPC_LI): New macro.
424 (PPC_BD): New macro.
425 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
426 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
427 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
428 (ppc_get_thread_area): New function.
429 (is_elfv2_inferior): New function.
430 (gen_ds_form): New function.
431 (GEN_STD): New macro.
432 (GEN_STDU): New macro.
433 (GEN_LD): New macro.
434 (GEN_LDU): New macro.
435 (gen_d_form): New function.
436 (GEN_ADDI): New macro.
437 (GEN_ADDIS): New macro.
438 (GEN_LI): New macro.
439 (GEN_LIS): New macro.
440 (GEN_ORI): New macro.
441 (GEN_ORIS): New macro.
442 (GEN_LWZ): New macro.
443 (GEN_STW): New macro.
444 (GEN_STWU): New macro.
445 (gen_xfx_form): New function.
446 (GEN_MFSPR): New macro.
447 (GEN_MTSPR): New macro.
448 (GEN_MFCR): New macro.
449 (GEN_MTCR): New macro.
450 (GEN_SYNC): New macro.
451 (GEN_LWSYNC): New macro.
452 (gen_x_form): New function.
453 (GEN_OR): New macro.
454 (GEN_MR): New macro.
455 (GEN_LWARX): New macro.
456 (GEN_STWCX): New macro.
457 (GEN_CMPW): New macro.
458 (gen_md_form): New function.
459 (GEN_RLDICL): New macro.
460 (GEN_RLDICR): New macro.
461 (gen_i_form): New function.
462 (GEN_B): New macro.
463 (GEN_BL): New macro.
464 (gen_b_form): New function.
465 (GEN_BNE): New macro.
466 (GEN_LOAD): New macro.
467 (GEN_STORE): New macro.
468 (gen_limm): New function.
469 (gen_atomic_xchg): New function.
470 (gen_call): New function.
471 (ppc_relocate_instruction): New function.
472 (ppc_install_fast_tracepoint_jump_pad): New function.
473 (ppc_get_min_fast_tracepoint_insn_len): New function.
474 (ppc_get_ipa_tdesc_idx): New function.
475 (the_low_target): Wire in the new functions.
476 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
477 tdescs.
478 * linux-ppc-tdesc.h: New file.
479
a13c4696
MK
4802016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
481
482 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
483 (alloc_jump_pad_buffer): New function.
484 * linux-amd64-ipa.c: Add <sys/mman.h> include.
485 (alloc_jump_pad_buffer): New function.
486 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
487 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
488 (alloc_jump_pad_buffer): New function.
489 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
490 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
491 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
492 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
493
1cda1512
MK
4942016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
495
496 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
497 * linux-amd64-ipa.c: Likewise.
498 * linux-i386-ipa.c: Likewise.
499 * linux-s390-ipa.c: Likewise.
500 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
501 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
502 set_trace_state_variable_value_ptr.
503 (struct ipa_sym_addresses): Likewise.
504 (symbol_list): Likewise.
505 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
506 accessing gdb_collect directly.
507 (gdb_collect_ptr_type): New typedef.
508 (get_raw_reg_ptr_type): New typedef.
509 (get_trace_state_variable_value_ptr_type): New typedef.
510 (set_trace_state_variable_value_ptr_type): New typedef.
511 (gdb_collect_ptr): New global.
512 (get_raw_reg_ptr): New global.
513 (get_trace_state_variable_value_ptr): New global.
514 (set_trace_state_variable_value_ptr): New global.
515 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
516 accessing get_raw_reg directly.
517 (get_get_tsv_func_addr): Likewise for
518 get_trace_state_variable_value_ptr.
519 (get_set_tsv_func_addr): Likewise for
520 set_trace_state_variable_value_ptr.
521 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
522
72fb5488
SM
5232016-03-30 Simon Marchi <simon.marchi@ericsson.com>
524
525 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
526
28170b88
MK
5272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
528
529 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
530 packets.
531 (relocate_instruction): Remove own_buf.
532 * server.c (own_buf): Make global.
533 (handle_v_requests): Make global.
534 * server.h (own_buf): New declaration.
535 (handle_v_requests): New prototype.
536
f39e8743
MK
5372016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
538
539 PR 18377
540 * linux-s390-low.c (add_insns): New function.
541 (s390_emit_prologue): New function.
542 (s390_emit_epilogue): New function.
543 (s390_emit_add): New function.
544 (s390_emit_sub): New function.
545 (s390_emit_mul): New function.
546 (s390_emit_lsh): New function.
547 (s390_emit_rsh_signed): New function.
548 (s390_emit_rsh_unsigned): New function.
549 (s390_emit_ext): New function.
550 (s390_emit_log_not): New function.
551 (s390_emit_bit_and): New function.
552 (s390_emit_bit_or): New function.
553 (s390_emit_bit_xor): New function.
554 (s390_emit_bit_not): New function.
555 (s390_emit_equal): New function.
556 (s390_emit_less_signed): New function.
557 (s390_emit_less_unsigned): New function.
558 (s390_emit_ref): New function.
559 (s390_emit_if_goto): New function.
560 (s390_emit_goto): New function.
561 (s390_write_goto_address): New function.
562 (s390_emit_litpool): New function.
563 (s390_emit_const): New function.
564 (s390_emit_call): New function.
565 (s390_emit_reg): New function.
566 (s390_emit_pop): New function.
567 (s390_emit_stack_flush): New function.
568 (s390_emit_zero_ext): New function.
569 (s390_emit_swap): New function.
570 (s390_emit_stack_adjust): New function.
571 (s390_emit_set_r2): New function.
572 (s390_emit_int_call_1): New function.
573 (s390_emit_void_call_2): New function.
574 (s390_emit_eq_goto): New function.
575 (s390_emit_ne_goto): New function.
576 (s390_emit_lt_goto): New function.
577 (s390_emit_le_goto): New function.
578 (s390_emit_gt_goto): New function.
579 (s390_emit_ge_goto): New function.
580 (s390x_emit_prologue): New function.
581 (s390x_emit_epilogue): New function.
582 (s390x_emit_add): New function.
583 (s390x_emit_sub): New function.
584 (s390x_emit_mul): New function.
585 (s390x_emit_lsh): New function.
586 (s390x_emit_rsh_signed): New function.
587 (s390x_emit_rsh_unsigned): New function.
588 (s390x_emit_ext): New function.
589 (s390x_emit_log_not): New function.
590 (s390x_emit_bit_and): New function.
591 (s390x_emit_bit_or): New function.
592 (s390x_emit_bit_xor): New function.
593 (s390x_emit_bit_not): New function.
594 (s390x_emit_equal): New function.
595 (s390x_emit_less_signed): New function.
596 (s390x_emit_less_unsigned): New function.
597 (s390x_emit_ref): New function.
598 (s390x_emit_if_goto): New function.
599 (s390x_emit_const): New function.
600 (s390x_emit_call): New function.
601 (s390x_emit_reg): New function.
602 (s390x_emit_pop): New function.
603 (s390x_emit_stack_flush): New function.
604 (s390x_emit_zero_ext): New function.
605 (s390x_emit_swap): New function.
606 (s390x_emit_stack_adjust): New function.
607 (s390x_emit_int_call_1): New function.
608 (s390x_emit_void_call_2): New function.
609 (s390x_emit_eq_goto): New function.
610 (s390x_emit_ne_goto): New function.
611 (s390x_emit_lt_goto): New function.
612 (s390x_emit_le_goto): New function.
613 (s390x_emit_gt_goto): New function.
614 (s390x_emit_ge_goto): New function.
615 (s390_emit_ops): New function.
616 (struct linux_target_ops): Fill in emit_ops hook.
617
abd9baf9
MK
6182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
619
620 PR 18377
621 * Makefile.in: Add s390 IPA files.
622 * configure.srv: Build IPA for s390.
623 * linux-s390-ipa.c: New file.
624 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
625 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
626 (tdesc_s390_linux32): Likewise.
627 (init_registers_s390_linux32v1): Likewise.
628 (tdesc_s390_linux32v1): Likewise.
629 (init_registers_s390_linux32v2): Likewise.
630 (tdesc_s390_linux32v2): Likewise.
631 (init_registers_s390_linux64): Likewise.
632 (tdesc_s390_linux64): Likewise.
633 (init_registers_s390_linux64v1): Likewise.
634 (tdesc_s390_linux64v1): Likewise.
635 (init_registers_s390_linux64v2): Likewise.
636 (tdesc_s390_linux64v2): Likewise.
637 (init_registers_s390_te_linux64): Likewise.
638 (tdesc_s390_te_linux64): Likewise.
639 (init_registers_s390_vx_linux64): Likewise.
640 (tdesc_s390_vx_linux64): Likewise.
641 (init_registers_s390_tevx_linux64): Likewise.
642 (tdesc_s390_tevx_linux64): Likewise.
643 (init_registers_s390x_linux64): Likewise.
644 (tdesc_s390x_linux64): Likewise.
645 (init_registers_s390x_linux64v1): Likewise.
646 (tdesc_s390x_linux64v1): Likewise.
647 (init_registers_s390x_linux64v2): Likewise.
648 (tdesc_s390x_linux64v2): Likewise.
649 (init_registers_s390x_te_linux64): Likewise.
650 (tdesc_s390x_te_linux64): Likewise.
651 (init_registers_s390x_vx_linux64): Likewise.
652 (tdesc_s390x_vx_linux64): Likewise.
653 (init_registers_s390x_tevx_linux64): Likewise.
654 (tdesc_s390x_tevx_linux64): Likewise.
655 (have_hwcap_s390_vx): New static variable.
656 (s390_arch_setup): Fill have_hwcap_s390_vx.
657 (s390_get_thread_area): New function.
658 (s390_ft_entry_gpr_esa): New const.
659 (s390_ft_entry_gpr_zarch): New const.
660 (s390_ft_entry_misc): New const.
661 (s390_ft_entry_fr): New const.
662 (s390_ft_entry_vr): New const.
663 (s390_ft_main_31): New const.
664 (s390_ft_main_64): New const.
665 (s390_ft_exit_fr): New const.
666 (s390_ft_exit_vr): New const.
667 (s390_ft_exit_misc): New const.
668 (s390_ft_exit_gpr_esa): New const.
669 (s390_ft_exit_gpr_zarch): New const.
670 (append_insns): New function.
671 (s390_relocate_instruction): New function.
672 (s390_install_fast_tracepoint_jump_pad): New function.
673 (s390_get_min_fast_tracepoint_insn_len): New function.
674 (s390_get_ipa_tdesc_idx): New function.
675 (struct linux_target_ops): Wire in the above functions.
676 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
677 * linux-s390-tdesc.h: New file.
678
a4105d04
MK
6792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
680
681 * linux-s390-low.c (s390_supports_tracepoints): New function.
682 (struct linux_target_ops): Fill supports_tracepoints hook.
683
35ac8b3e
YQ
6842016-03-18 Yao Qi <yao.qi@linaro.org>
685
686 * linux-low.c (lwp_signal_can_be_delivered): New function.
687 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
688
94610ec4
YQ
6892016-03-18 Yao Qi <yao.qi@linaro.org>
690
691 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
692 0 if signal is enqueued. Remove 'signal' from one debugging
693 message. Move one debugging message to some lines below.
694 Remove code setting 'signal' to 0.
695
80aea927
YQ
6962016-03-18 Yao Qi <yao.qi@linaro.org>
697
698 * linux-low.c (linux_low_filter_event): Remove redundant
699 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
700
b04fd3be
MK
7012016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
702
703 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
704 (struct linux_target_ops): Wire in the above.
705
c40c8d4b
YQ
7062016-03-03 Yao Qi <yao.qi@linaro.org>
707
708 * linux-low.c: Update comments to start_step_over.
709
0f8288ae
YQ
7102016-03-03 Yao Qi <yao.qi@linaro.org>
711
712 PR server/19736
713 * linux-low.c (handle_extended_wait): Set child suspended
714 if event_lwp->bp_reinsert isn't zero.
715
fdbd04a8
YQ
7162016-03-02 Yao Qi <yao.qi@linaro.org>
717
718 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
719 enqueue_pending_signal.
720
6896a8fa
MK
7212016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
722
723 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
724 is actually loaded.
725
ab503087
MK
7262016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
727
728 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
729 (s390_regmap_3264) [!__s390x__]: New global.
730 (s390_collect_ptrace_register): Skip map entries containing -1.
731 (s390_supply_ptrace_register): Ditto.
732 (s390_fill_gprs_high): New function.
733 (s390_store_gprs_high): New function.
734 (s390_regsets): Add NT_S390_HIGH_GPRS.
735 (s390_get_hwcap): Enable on 31-bit.
736 (have_hwcap_s390_high_gprs): Enable on 31-bit.
737 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
738 Detect NT_S390_HIGH_GPRS.
739 (s390_usrregs_info_3264): Enable on 31-bit.
740 (s390_regs_info): Enable regs_info_3264 on 31-bit.
741 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
742
ae91f625
MK
7432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
744
745 PR gdb/13808
746 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
747 * configure.srv: Ditto.
748 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
749 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
750 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
751 (init_registers_amd64_linux): Remove prototype.
752 (tdesc_amd64_linux): Remove declaration.
753 (get_ipa_tdesc): New function.
754 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
755 initialize remaining tdescs.
756 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
757 (init_registers_i386_linux): Remove prototype.
758 (tdesc_i386_linux): Remove declaration.
759 (get_ipa_tdesc): New function.
760 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
761 initialize remaining tdescs.
762 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
763 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
764 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
765 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
766 (x86_get_ipa_tdesc_idx): New function.
767 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
768 * linux-x86-tdesc.h: New file.
769 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
770 (target_get_ipa_tdesc_idx): New macro.
771 * tracepoint.c (ipa_tdesc_idx): New macro.
772 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
773 (symbol_list): Add ipa_tdesc_idx.
774 (cmd_qtstart): Write ipa_tdesc_idx in the target.
775 (ipa_tdesc): Remove.
776 (ipa_tdesc_idx): New variable.
777 (get_context_regcache): Use get_ipa_tdesc.
778 (gdb_collect): Ditto.
779 (gdb_probe): Ditto.
780 * tracepoint.h (get_ipa_tdesc): New prototype.
781 (ipa_tdesc): Remove.
782
e7ad2f14
PA
7832016-02-24 Pedro Alves <palves@redhat.com>
784
785 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
786 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
787 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
788 Factor out common code between the USE_SIGTRAP_SIGINFO and
789 !USE_SIGTRAP_SIGINFO blocks.
790 (linux_low_filter_event): Call save_stop_reason instead of
791 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
792 Update comments.
793 (linux_wait_1): Update comments.
794
657f9cde
WW
7952016-02-24 Wei-cheng Wang <cole945@gmail.com>
796
797 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
798 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
799 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
800 ppc_insert_point, ppc_remove_point.
801
b00b61e1
MK
8022016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
803
804 * linux-s390-low.c (s390_supports_z_point_type): New function.
805 (struct linux_target_ops): Wire s390_supports_z_point_type in.
806
553cb527
YQ
8072016-02-16 Yao Qi <yao.qi@linaro.org>
808
809 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
810 PC. Get pc from regcache_read_pc.
811
a5652c21
YQ
8122016-02-12 Yao Qi <yao.qi@linaro.org>
813
814 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
815 or linux_get_pc_32bit.
816 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
817
ed443b61
YQ
8182016-02-12 Yao Qi <yao.qi@linaro.org>
819
820 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
821 arm_linux_get_next_pcs_fixup.
822
020ecd38
MK
8232016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
824
825 * tracepoint.c (x_tracepoint_action_download): Change
826 write_inferior_data_ptr to write_inferior_data_pointer.
827 (cmd_qtstart): Likewise.
828 (write_inferior_data_ptr): Remove.
829 (download_agent_expr): Change write_inferior_data_ptr to
830 write_inferior_data_pointer.
831 (download_tracepoint_1): Likewise.
832 (download_tracepoint): Likewise.
833 (download_trace_state_variables): Likewise.
834
7cae9051
WW
8352016-02-11 Wei-cheng Wang <cole945@gmail.com>
836 Marcin Kościelnicki <koriakin@0x04.net>
837
838 * tracepoint.c (struct tracepoint_action_ops): Remove.
839 (struct tracepoint_action): Remove ops.
840 (m_tracepoint_action_download, r_tracepoint_action_download)
841 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
842 size and offset accordingly.
843 (m_tracepoint_action_ops, r_tracepoint_action_ops)
844 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
845 (tracepoint_action_send, tracepoint_action_download): New functions.
846 Helpers for trace action handlers.
847 (add_tracepoint_action): Remove setup actions ops.
848 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
849
9f6a71b4
YQ
8502016-02-10 Yao Qi <yao.qi@linaro.org>
851
852 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
853
1e94266c
SM
8542016-02-09 Simon Marchi <simon.marchi@ericsson.com>
855
856 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
857 to AC_OUTPUT.
858 * configure: Regenerate.
859
8adce034
SM
8602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
861
862 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
863 void * to gdb_byte *.
864 * linux-low.c (siginfo_fixup): Likewise.
865 (linux_xfer_siginfo): Likewise.
866 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
867 Likewise.
868 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
869
93813b37
WT
8702016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
871
872 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
873 to srv_tgtobj.
874 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
875 to srv_tgtobj.
876 * linux-x86-low.c [__x86_64__]: Include
877 "nat/amd64-linux-siginfo.h".
878 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
879 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
880 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
881 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
882 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
883 (cpt_si_fd, si_timerid, si_overrun): Move from
884 nat/amd64-linux-siginfo.c.
885 * Makefile.in (amd64-linux-siginfo.o:): New rule.
886
8424cc97
SM
8872016-01-28 Simon Marchi <simon.marchi@ericsson.com>
888
889 * server.c (skip_to_semicolon): Remove.
890 (process_point_options): Use strchrnul instead of
891 skip_to_semicolon.
892
4d18591b
YQ
8932016-01-26 Yao Qi <yao.qi@linaro.org>
894
895 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
896 * linux-low.c (install_software_single_step_breakpoints): Don't
897 call regcache_read_pc.
898 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
899 argument pc.
900
d8020970
YQ
9012016-01-26 Yao Qi <yao.qi@linaro.org>
902
903 * linux-low.c (install_software_single_step_breakpoints): Call
904 regcache_read_pc instead of get_pc.
905
8b207339
YQ
9062016-01-26 Yao Qi <yao.qi@linaro.org>
907
908 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
909 (unblock_async_io): Rename to ...
910 (block_unblock_async_io): ... it. New function.
911 (enable_async_io): Don't install SIGIO handler. Unblock it
912 instead.
913 (disable_async_io): Don't ignore SIGIO. Block it instead.
914 (initialize_async_io): Install SIGIO handler. Don't call
915 unblock_async_io.
916
18879fef
YQ
9172016-01-26 Yao Qi <yao.qi@linaro.org>
918
919 * remote-utils.c (getpkt): If the buffer isn't empty, and the
920 first character is '\003', call *the_target->request_interrupt.
921
a0f8e08a
YQ
9222016-01-25 Yao Qi <yao.qi@linaro.org>
923
924 * remote-utils.c (new_thread_notify): Remove.
925 (dead_thread_notify): Likewise.
926 * remote-utils.h (new_thread_notify): Remove declaration.
927 (dead_thread_notify): Likewise.
928
cc5fd9ab
MK
9292016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
930
931 * gdb.trace/pending.exp: Fix expected message on continue.
932
99e8eb11
MK
9332016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
934
935 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
936 it works properly on big-endian machines where sizeof (CORE_ADDR)
937 != sizeof (void *).
938
a994041d
PA
9392016-01-21 Pedro Alves <palves@redhat.com>
940
941 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
942 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
943 * configure: Regenerate.
944
f7a6a40d
YQ
9452016-01-21 Yao Qi <yao.qi@linaro.org>
946
947 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
948 is_thumb and set it according to CPSR saved on the stack.
949 (get_next_pcs_syscall_next_pc): Pass is_thumb to
950 arm_sigreturn_next_pc.
951
6f69e520
YQ
9522016-01-18 Yao Qi <yao.qi@linaro.org>
953
954 * linux-low.c (linux_set_pc_64bit): New function.
955 (linux_get_pc_64bit): New function.
956 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
957 Declare.
958 * linux-sparc-low.c (debug_threads): Remove declaration.
959 (sparc_get_pc): Remove.
960 (the_low_target): Use linux_get_pc_64bit instead of
961 sparc_get_pc.
962 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
963 (the_low_target): Use linux_get_pc_64bit and
964 linux_set_pc_64bit.
965
276d4552
YQ
9662016-01-18 Yao Qi <yao.qi@linaro.org>
967
968 * linux-arm-low.c (debug_threads): Remove declaration.
969 (arm_get_pc, arm_set_pc): Remove.
970 (the_low_target): Use linux_get_pc_32bit and
971 linux_set_pc_32bit.
972 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
973 (the_low_target): Use linux_get_pc_32bit and
974 linux_set_pc_32bit.
975 * linux-cris-low.c (debug_threads): Remove declaration.
976 (cris_get_pc, cris_set_pc,): Remove.
977 (the_low_target): Use linux_get_pc_32bit and
978 linux_set_pc_32bit.
979 * linux-crisv32-low.c (debug_threads): Remove declaration.
980 (cris_get_pc, cris_set_pc): Remove.
981 (the_low_target): Use linux_get_pc_32bit and
982 linux_set_pc_32bit.
983 * linux-low.c: Include inttypes.h.
984 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
985 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
986 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
987 (the_low_target): Use linux_get_pc_32bit and
988 linux_set_pc_32bit.
989 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
990 (the_low_target): Use linux_get_pc_32bit and
991 linux_set_pc_32bit.
992 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
993 (the_low_target): Use linux_get_pc_32bit and
994 linux_set_pc_32bit.
995 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
996 (the_low_target): Use linux_get_pc_32bit and
997 linux_set_pc_32bit.
998 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
999 (the_low_target): Use linux_get_pc_32bit and
1000 linux_set_pc_32bit.
1001
eb0edac8
GB
10022016-01-18 Gary Benson <gbenson@redhat.com>
1003
1004 * configure.ac (AC_FUNC_FORK): New check.
1005 * config.in: Regenerate.
1006 * configure: Likewise.
1007
1b451dda
YQ
10082016-01-14 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1011 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1012 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1013 arm_get_next_pcs_ctor.
1014
82075af2
JS
10152016-01-12 Josh Stone <jistone@redhat.com>
1016 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1017
1018 * inferiors.h: Include "gdb_vecs.h".
1019 (struct process_info): Add syscalls_to_catch.
1020 * inferiors.c (remove_process): Free syscalls_to_catch.
1021 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1022 syscall_return stops.
1023 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1024 * server.c (handle_general_set): Handle QCatchSyscalls.
1025 (handle_query): Report support for QCatchSyscalls.
1026 * target.h (struct target_ops): Add supports_catch_syscall.
1027 (target_supports_catch_syscall): New macro.
1028 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1029 (struct lwp_info): Add syscall_state.
1030 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1031 Maintain syscall_state and syscalls_to_catch across exec.
1032 (get_syscall_trapinfo): New function, proxy to the_low_target.
1033 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1034 (linux_low_filter_event): Toggle syscall_state entry/return for
1035 syscall traps, and set it ignored for all others.
1036 (gdb_catching_syscalls_p): New function.
1037 (gdb_catch_this_syscall_p): New function.
1038 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1039 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1040 (linux_supports_catch_syscall): New function.
1041 (linux_target_ops): Install it.
1042 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1043 (the_low_target): Install it.
1044
8f13a3ce
MF
10452016-01-12 Mike Frysinger <vapier@gentoo.org>
1046
1047 * acinclude.m4: Include new ../warning.m4 file.
1048 * configure: Regenerated.
1049 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1050
5b3da067
MF
10512016-01-12 Mike Frysinger <vapier@gentoo.org>
1052
1053 * ax.c (is_goto_target): Mark static.
1054 * linux-low.c (register_addr): Likewise.
1055 (linux_fetch_registers, linux_store_registers): Likewise.
1056 * mem-break.c (any_persistent_commands): Fix old prototype.
1057 (add_commands_to_breakpoint): Mark static.
1058 * regcache.c (find_register_by_name): Delete unused func.
1059 * remote-utils.c (hex_or_minus_one): Mark static.
1060 * server.c (monitor_show_help): Mark static.
1061 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1062 handle_v_requests): Likewise.
1063
bc504a31
PA
10642016-01-12 Pedro Alves <palves@redhat.com>
1065
1066 Remove use of the registered trademark symbol throughout.
1067
5a0dd67a
YQ
10682016-01-08 Yao Qi <yao.qi@linaro.org>
1069
1070 * remote-utils.c (getpkt): If c is '\003', call target hook
1071 request_interrupt.
1072
b2ca446f
YQ
10732016-01-06 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1076 linux-aarch32-low.c.
1077 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1078 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1079 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1080 (thumb2_breakpoint): Declare.
1081 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1082 linux-aarch32-low.h.
1083 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1084 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1085 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1086
edd88788
JB
10872016-01-01 Joel Brobecker <brobecker@adacore.com>
1088
1089 * gdbreplay.c (gdbreplay_version): Change copyright year in
1090 version message.
1091 * server.c (gdbserver_version): Likewise.
1092
65da7f14
PP
10932015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1094
1095 * server.c (crc32_table): Delete.
1096 (crc32): Use libiberty's xcrc32 function.
1097
4abd5ed2
JB
10982015-12-22 Joel Brobecker <brobecker@adacore.com>
1099
1100 * lynx-low.c (lynx_delete_thread_callback): New function.
1101 (lynx_mourn): Properly delete our process and all of its
1102 threads. Remove call to clear_inferiors.
1103
0e50fe5c
JB
11042015-12-22 Joel Brobecker <brobecker@adacore.com>
1105
1106 * target.c (thread_search_callback): Add check that
1107 the thread_stopped target callback is not NULL before
1108 calling it.
1109
35adc03f
YQ
11102015-12-21 Yao Qi <yao.qi@linaro.org>
1111
1112 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1113 arm breakpoint.
1114
bd2b2909
AT
11152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1116
1117 * server.c (handle_query): Call target_supports_software_single_step.
1118
7fe5e27e
AT
11192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1120
1121 * linux-low.c (single_step): New function.
1122 (linux_resume_one_lwp_throw): Call single_step.
1123 (start_step_over): Likewise.
1124
d9311bfa
AT
11252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1126
1127 * Makefile.in (SFILES): Append arch/arm-linux.c,
1128 arch/arm-get-next-pcs.c.
1129 (arm-linux.o): New rule.
1130 (arm-get-next-pcs.o): New rule.
1131 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1132 arm-linux.o.
1133 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1134 to linux-aarch32-low.c.
1135 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1136 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1137 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1138 (thumb2_breakpoint_len): Likewise.
1139 (arm_is_thumb_mode): Make non-static.
1140 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1141 from linux-aarch32-low.c.
1142 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1143 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1144 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1145 (thumb2_breakpoint_len): Likewise.
1146 (arm_is_thumb_mode): New declaration.
1147 * linux-arm-low.c: Include arch/arm-linux.h
1148 aarch/arm-get-next-pcs.h, sys/syscall.h.
1149 (get_next_pcs_ops): New struct.
1150 (get_next_pcs_addr_bits_remove): New function.
1151 (get_next_pcs_is_thumb): New function.
1152 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1153 (arm_sigreturn_next_pc): Likewise.
1154 (get_next_pcs_syscall_next_pc): Likewise.
1155 (arm_gdbserver_get_next_pcs): Likewise.
1156 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1157 Initialize.
1158 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1159 * server.h: Include gdb_vecs.h.
1160
68ce2059
AT
11612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1162
1163 * Makefile.in (SFILES): Append common/common-regcache.c.
1164 (OBS): Append common-regcache.o.
1165 (common-regcache.o): New rule.
1166 * regcache.c (init_register_cache): Initialize cache to
1167 REG_UNAVAILABLE.
1168 (regcache_raw_read_unsigned): New function.
1169 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1170 register_status enum.
1171
fa5308bd
AT
11722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1173
1174 * linux-aarch64-low.c (the_low_targets): Rename
1175 breakpoint_reinsert_addr to get_next_pcs.
1176 * linux-arm-low.c (the_low_targets): Likewise.
1177 * linux-bfin-low.c (the_low_targets): Likewise.
1178 * linux-cris-low.c (the_low_targets): Likewise.
1179 * linux-crisv32-low.c (the_low_targets): Likewise.
1180 * linux-low.c (can_software_single_step): Likewise.
1181 (install_software_single_step_breakpoints): New function.
1182 (start_step_over): Use install_software_single_step_breakpoints.
1183 * linux-low.h: New CORE_ADDR vector.
1184 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1185 get_next_pcs.
1186 * linux-mips-low.c (the_low_targets): Likewise.
1187 * linux-nios2-low.c (the_low_targets): Likewise.
1188 * linux-sparc-low.c (the_low_targets): Likewise.
1189
4a6ed09b
PA
11902015-12-17 Pedro Alves <palves@redhat.com>
1191
1192 * linux-low.c (linux_kill_one_lwp): Remove references to
1193 LinuxThreads.
1194 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1195 to 'kill'.
1196 (linux_init_signals): Delete.
1197 (initialize_low): Adjust.
1198 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1199
7544db95
PA
12002015-12-16 Pedro Alves <palves@redhat.com>
1201
1202 * configure.ac (compiler warning flags): When testing a
1203 -Wno-foo option, check whether -Wfoo works instead.
1204 * configure: Regenerate.
1205
8020350c
DB
12062015-12-11 Don Breazeal <donb@codesourcery.com>
1207
1208 * server.c (process_serial_event): Don't exit from gdbserver
1209 in remote mode if there are still active inferiors.
1210
db91f502
YQ
12112015-12-11 Yao Qi <yao.qi@linaro.org>
1212
1213 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1214 arm_breakpoint_at if the process is 32-bit.
1215
b37a6290
YQ
12162015-12-11 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1219 arm breakpoint.
1220
17b1509a
YQ
12212015-12-07 Yao Qi <yao.qi@linaro.org>
1222
1223 * configure.srv: Append arm.o to srv_tgtobj for
1224 aarch64*-*-linux* target.
1225 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1226 from linux-arm-low.c.
1227 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1228 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1229 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1230 (thumb2_breakpoint_len): Likewise.
1231 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1232 (arm_breakpoint_kinds): Likewise.
1233 (arm_breakpoint_kind_from_pc): Likewise.
1234 (arm_sw_breakpoint_from_kind): Likewise.
1235 (arm_breakpoint_kind_from_current_state): Likewise.
1236 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1237 (arm_sw_breakpoint_from_kind): Declare.
1238 (arm_breakpoint_kind_from_current_state): Declare.
1239 (arm_breakpoint_at): Declare.
1240 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1241 arm_sw_breakpoint_from_kind if process is 32-bit.
1242 (aarch64_breakpoint_kind_from_pc): New function.
1243 (aarch64_breakpoint_kind_from_current_state): New function.
1244 (the_low_target): Initialize fields breakpoint_kind_from_pc
1245 and breakpoint_kind_from_current_state.
1246 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1247 linux-aarch32-low.c.
1248 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1249 (arm_breakpoint, arm_breakpoint_len): Likewise.
1250 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1251 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1252 (arm_is_thumb_mode): Likewise.
1253 (arm_breakpoint_at): Likewise.
1254 (arm_breakpoint_kind_from_pc): Likewise.
1255 (arm_sw_breakpoint_from_kind): Likewise.
1256 (arm_breakpoint_kind_from_current_state): Likewise.
1257
1258 Revert:
1259 2015-08-04 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1262 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1263 * server.c (extended_protocol): Remove "static".
1264 * server.h (extended_protocol): Declare it.
1265
ece66d65
JS
12662015-12-04 Josh Stone <jistone@redhat.com>
1267
1268 * target.h (struct target_ops) <arch_setup>: Rename to ...
1269 (struct target_ops) <post_create_inferior>: ... this.
1270 (target_arch_setup): Rename to ...
1271 (target_post_create_inferior): ... this, calling post_create_inferior.
1272 * server.c (start_inferior): Update target_arch_setup calls to
1273 target_post_create_inferior.
1274 * linux-low.c (linux_low_ptrace_options): Forward declare.
1275 (linux_arch_setup): Update its comment for general use.
1276 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1277 (struct linux_target_ops): Use linux_post_create_inferior.
1278 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1279 to post_create_inferior.
1280 * nto-low.c (struct nto_target_ops): Likewise.
1281 * spu-low.c (struct spu_target_ops): Likewise.
1282 * win32-low.c (struct win32_target_ops): Likewise.
1283
e58c48b4
AT
12842015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1285
1286 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1287
fbec8956
AT
12882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1289
1290 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1291 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1292 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1293 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1294 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1295 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1296 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1297 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1298 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1299 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1300 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1301 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1302
9b4c5f87
AT
13032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1304
1305 * linux-low.c (linux_look_up_symbols): Don't call
1306 linux_supports_traceclone.
1307 * linux-low.h (thread_db_init): Remove use_events argument.
1308 * thread-db.c (thread_db_use_event): Remove global variable.
1309 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1310 (struct thread_db) <td_create_bp>: Remove field.
1311 (thread_db_create_event): Remove function.
1312 (thread_db_enable_reporting): Likewise.
1313 (find_one_thread): Don't check for thread_db_use_events.
1314 (attach_thread): Likewise.
1315 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1316 (try_thread_db_load_1): Don't check for thread_db_use_events.
1317 (thread_db_init): Remove use_events argument and thread events
1318 handling.
1319 (remove_thread_event_breakpoints): Remove function.
1320 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1321
7d00775e
AT
13222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1323
1324 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1325 New function.
1326 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1327 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1328 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1329 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1330 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1331 Initialize.
1332 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1333 New function.
1334 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1335 * linux-low.c (can_hardware_single_step): Use
1336 supports_hardware_single_step.
1337 (can_software_single_step): New function.
1338 (start_step_over): Call can_software_single_step.
1339 (linux_supports_hardware_single_step): New function.
1340 (struct target_ops) <supports_software_single_step>: Initialize.
1341 * linux-low.h (struct linux_target_ops)
1342 <supports_hardware_single_step>: Initialize.
1343 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1344 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1345 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1346 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1347 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1348 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1349 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1350 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1351 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1352 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1353 Initialize.
1354 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1355 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1356 Initialize.
1357 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1358 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1359 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1360 New function.
1361 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1362 * target.h (struct target_ops): <supports_software_single_step>:
1363 New field.
1364 (target_supports_software_single_step): New macro.
1365
2d97cd35
AT
13662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1367
1368 * linux-low.c (linux_wait_1): Fix pc advance condition.
1369 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1370 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1371
769ef81f
AT
13722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1373
1374 * linux-arm-low.c (arm_is_thumb_mode): New function.
1375 (arm_breakpoint_at): Use arm_is_thumb_mode.
1376 (arm_breakpoint_kind_from_current_state): New function.
1377 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1378 Initialize.
1379 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1380 (linux_breakpoint_kind_from_current_state): New function.
1381 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1382 * linux-low.h (struct linux_target_ops)
1383 <breakpoint_kind_from_current_state>: New field.
1384 * target.h (struct target_ops): Likewise.
1385 (target_breakpoint_kind_from_current_state): New macro.
1386
1bebeeca
PA
13872015-11-30 Pedro Alves <palves@redhat.com>
1388
1389 * linux-low.c (linux_resume): Wake up the event loop before
1390 returning.
1391
a67a9fae
PA
13922015-11-30 Pedro Alves <palves@redhat.com>
1393
1394 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1395 check.
1396 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1397 to -1.
1398 * target.c (struct thread_search): New structure.
1399 (thread_search_callback): New function.
1400 (prev_general_thread): New global.
1401 (prepare_to_access_memory, done_accessing_memory): New functions.
1402 * target.h (prepare_to_access_memory, done_accessing_memory):
1403 Replace macros with function declarations.
1404
f2faf941
PA
14052015-11-30 Pedro Alves <palves@redhat.com>
1406
1407 PR 14618
1408 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1409 report TARGET_WAITKIND_NO_RESUMED.
1410 * remote-utils.c (prepare_resume_reply): Handle
1411 TARGET_WAITKIND_NO_RESUMED.
1412 * server.c (report_no_resumed): New global.
1413 (handle_query) <qSupported>: Handle "no-resumed+". Report
1414 "no-resumed+" support.
1415 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1416 return error if the client doesn't support no-resumed events.
1417 (push_stop_notification): New function.
1418 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1419 events if the client supports them.
1420
a681f9c9
PA
14212015-11-30 Pedro Alves <palves@redhat.com>
1422
1423 * linux-low.c (thread_still_has_status_pending_p): Don't check
1424 vCont;t here.
1425 (lwp_resumed): New function.
1426 (status_pending_p_callback): Return early if the LWP is not
1427 supposed to be resumed.
1428
65706a29
PA
14292015-11-30 Pedro Alves <palves@redhat.com>
1430
1431 * linux-low.c (handle_extended_wait): Assert that the LWP's
1432 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1433 thread create events, leave the new child's status pending.
1434 (linux_low_filter_event): If GDB wants to hear about thread exit
1435 events, leave the LWP marked dead and don't delete it.
1436 (linux_wait_for_event_filtered): Don't check for thread exit.
1437 (filter_exit_event): New function.
1438 (linux_wait_1): Use it, when returning an exit event.
1439 (linux_resume_one_lwp_throw): Assert that the LWP's
1440 waitstatus is TARGET_WAITKIND_IGNORE.
1441 * remote-utils.c (prepare_resume_reply): Handle
1442 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1443 * server.c (report_thread_events): New global.
1444 (handle_general_set): Handle QThreadEvents.
1445 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1446 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1447 TARGET_WAITKIND_THREAD_EXITED.
1448 * server.h (report_thread_events): Declare.
1449
56cf4bed
PA
14502015-11-30 Pedro Alves <palves@redhat.com>
1451
1452 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1453 the thread's last_resume_kind was resume_stop.
1454
500c1d85
PA
14552015-11-30 Pedro Alves <palves@redhat.com>
1456
1457 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1458 before returning.
1459
de979965
PA
14602015-11-30 Pedro Alves <palves@redhat.com>
1461
1462 * server.c (handle_v_requests): Handle vCtrlC.
1463
34c65914
PA
14642015-11-30 Pedro Alves <palves@redhat.com>
1465
1466 * gdbthread.h (find_any_thread_of_pid): Declare.
1467 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1468 functions.
1469 * server.c (handle_query): If current_thread is NULL, look for
1470 another thread of the selected process.
1471
79efa585 14722015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1473 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1474
1475 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1476 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1477 name in reply.
1478 * target.h (struct target_ops) <thread_name>: New field.
1479 (target_thread_name): New macro.
1480
80d82c19
JB
14812015-11-23 Joel Brobecker <brobecker@adacore.com>
1482
1483 * regcache.h (regcache_invalidate_pid): Add declaration.
1484 * regcache.c (regcache_invalidate_pid): New function, extracted
1485 from regcache_invalidate.
1486 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1487 Add trivial documentation comment.
1488 * lynx-low.c: Use regcache_invalidate_pid instead of
1489 regcache_invalidate.
1490
64da5dd5
JB
14912015-11-23 Joel Brobecker <brobecker@adacore.com>
1492
1493 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1494 and Elf64_auxv_t if the target is Android.
1495
37ce4055
DE
14962015-11-22 Doug Evans <xdje42@gmail.com>
1497
1498 * target.h: #include <sys/types.h>.
1499
06e03fff
PA
15002015-11-19 Pedro Alves <palves@redhat.com>
1501
1502 * linux-low.c (linux_process_qsupported): Change prototype.
1503 Adjust.
1504 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1505 Change prototype.
1506 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1507 and adjust to loop over all features.
1508 * server.c (handle_query) <qSupported>: Adjust to call
1509 target_process_qsupported once, passing it a vector of unprocessed
1510 features.
1511 * target.h (struct target_ops) <process_qsupported>: Change
1512 prototype.
1513 (target_process_qsupported): Adjust.
1514
9a084706
PA
15152015-11-19 Pedro Alves <palves@redhat.com>
1516
1517 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1518 mode.
1519 * configure: Regenerate.
1520
dad44a1f
PA
15212015-11-19 Pedro Alves <palves@redhat.com>
1522
1523 * configure: Regenerate.
1524
231c0592
YQ
15252015-11-19 Yao Qi <yao.qi@linaro.org>
1526
1527 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1528 type to uint32_t.
1529
6c1c9a8b
YQ
15302015-11-19 Yao Qi <yao.qi@linaro.org>
1531
1532 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1533 (struct aarch64_operand): Move enum out.
1534
9caa3311
YQ
15352015-11-19 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1538 struct user_fpsimd_state *.
1539 (aarch64_store_fpregset): Likewise.
1540
6a69a054
YQ
15412015-11-19 Yao Qi <yao.qi@linaro.org>
1542
1543 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1544 struct user_pt_regs *.
1545 (aarch64_store_gregset): Likewise.
1546
1798301e
PA
15472015-11-18 Pedro Alves <palves@redhat.com>
1548
1549 * Makefile.in (all_object_files): Add $IPA_OBJS.
1550
ce7715e2
PA
15512015-11-17 Pedro Alves <palves@redhat.com>
1552
1553 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1554 GDB_SIGNAL_0 and gdb_signal_to_string.
1555
c0879059
PA
15562015-11-17 Pedro Alves <palves@redhat.com>
1557
1558 * win32-low.c (handle_output_debug_string): Remove parameter.
1559 (win32_kill): Remove our_status local and adjust call to
1560 handle_output_debug_string.
1561 (get_child_debug_event): Adjust call to
1562 handle_output_debug_string.
1563
1996e237
SM
15642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1565
1566 * linux-mips-low.c (mips_fill_gregset): Add cast.
1567 (mips_store_gregset): Likewise.
1568 (mips_fill_fpregset): Likewise.
1569 (mips_store_fpregset): Likewise.
1570
cbec665b
SM
15712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1574 priv.
1575
eb3e3c67
SM
15762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * linux-mips-low.c (mips_linux_new_thread): Change type of
1579 watch_type to enum target_hw_bp_type.
1580
171de4b8
SM
15812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1584 Change return type to arm_hwbp_type.
1585
04248ead
SM
15862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1587
1588 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1589 (arm_store_gregset): Likewise.
1590 * linux-arm-low.c (arm_get_hwcap): Likewise.
1591 (arm_read_description): Likewise.
1592
04b3479c
SM
15932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1594
1595 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1596
2bc84e8a
SM
15972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1600 (ppc_fill_vsxregset): Likewise.
1601 (ppc_store_vsxregset): Likewise.
1602 (ppc_fill_vrregset): Likewise.
1603 (ppc_store_vrregset): Likewise.
1604 (ppc_fill_evrregset): Likewise.
1605 (ppc_store_evrregset): Likewise.
1606
e6c5bb05
SM
16072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1608
1609 * linux-ppc-low.c (ppc_usrregs_info): Remove
1610 forward-declaration.
1611 (ppc_arch_setup): Move lower in file.
1612
7ea45d72
SM
16132015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1616 (ps_pdwrite): Likewise.
1617
69291610
HW
16182015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1619
1620 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1621 to after assert checks.
1622
b42945fd
SM
16232015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * proc-service.c (ps_pdread): Add/adjust casts.
1626 (ps_pdwrite): Add/adjust casts.
1627
d6f85c84
SM
16282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 * server.c (handle_search_memory_1): Cast return value of
1631 memmem.
1632
f98cd059
SM
16332015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * server.c (write_qxfer_response): Change type of data to
1636 gdb_byte *.
1637
d2412fa5
PA
16382015-10-29 Pedro Alves <palves@redhat.com>
1639
1640 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1641
c17414a2
PA
16422015-10-29 Pedro Alves <palves@redhat.com>
1643
1644 * tracepoint.c (clear_installed_tracepoints): Add casts.
1645
e053fbc4
PA
16462015-10-29 Pedro Alves <palves@redhat.com>
1647
1648 * server.c (handle_v_cont, process_serial_event): Add enum
1649 gdb_signal casts to signal parsing code.
1650
add67df8
PA
16512015-10-29 Pedro Alves <palves@redhat.com>
1652
1653 * linux-low.h (NULL_REGSET): Define.
1654 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1655 * linux-arm-low.c (arm_regsets): Likewise.
1656 * linux-crisv32-low.c (cris_regsets): Likewise.
1657 * linux-m68k-low.c (m68k_regsets): Likewise.
1658 * linux-mips-low.c (mips_regsets): Likewise.
1659 * linux-nios2-low.c (nios2_regsets): Likewise.
1660 * linux-ppc-low.c (ppc_regsets): Likewise.
1661 * linux-s390-low.c (s390_regsets): Likewise.
1662 * linux-sh-low.c (sh_regsets): Likewise.
1663 * linux-sparc-low.c (sparc_regsets): Likewise.
1664 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1665 * linux-tile-low.c (tile_regsets): Likewise.
1666 * linux-x86-low.c (x86_regsets): Likewise.
1667 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1668
50bc912a
PA
16692015-10-29 Pedro Alves <palves@redhat.com>
1670
1671 * linux-low.h (NULL_REGSET): Define.
1672 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1673 * linux-arm-low.c (arm_regsets): Likewise.
1674 * linux-crisv32-low.c (cris_regsets): Likewise.
1675 * linux-m68k-low.c (m68k_regsets): Likewise.
1676 * linux-mips-low.c (mips_regsets): Likewise.
1677 * linux-nios2-low.c (nios2_regsets): Likewise.
1678 * linux-ppc-low.c (ppc_regsets): Likewise.
1679 * linux-s390-low.c (s390_regsets): Likewise.
1680 * linux-sh-low.c (sh_regsets): Likewise.
1681 * linux-sparc-low.c (sparc_regsets): Likewise.
1682 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1683 * linux-tile-low.c (tile_regsets): Likewise.
1684 * linux-x86-low.c (x86_regsets): Likewise.
1685 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1686
682b2546
DE
16872015-10-26 Doug Evans <dje@google.com>
1688
1689 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1690
963843d4
DE
16912015-10-26 Doug Evans <dje@google.com>
1692
1693 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1694
d41401ac
DE
16952015-10-26 Doug Evans <dje@google.com>
1696
1697 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1698 for debug_printf.
1699 (attach_thread, find_new_threads_callback): Ditto.
1700
3db28855
AT
17012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1702
1703 * mem-break.h (set_breakpoint_data): Remove.
1704
fb78e89c
AT
17052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1706
1707 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1708 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1709 (initialize_low): Remove set_breakpoint_data call.
1710 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1711 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1712 (initialize_low): Remove set_breakpoint_data call.
1713 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1714 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1715 (initialize_low): Remove set_breakpoint_data call.
1716
2e6ee069
AT
17172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1718
1719 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1720 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1721 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1722 * target.h (target_breakpoint_kind_from_pc): New macro.
1723
1652a986
AT
17242015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1725
1726 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1727 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1728 the default breakpoint kind.
1729
abeead09
AT
17302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1731
1732 * linux-arm-low.c (arm_supports_z_point_type): Add software
1733 breakpoint support.
1734
b0b4b501
AT
17352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1736
1737 * linux-arm-low.c: Refactor breakpoint definitions.
1738 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1739 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1740
8689682c
AT
17412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1742
1743 * Makefile.in: Add arm.c/o.
1744 * configure.srv: Likewise.
1745 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1746 (arm_breakpoint_kind_from_pc): New function.
1747 (arm_sw_breakpoint_from_kind): Return proper kind.
1748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1749
27165294
AT
17502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1751
1752 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1753 removal.
1754 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1755 (struct raw_breakpoint) <size>: Remove.
1756 (struct raw_breakpoint) <kind>: Add.
1757 (bp_size): New function.
1758 (bp_opcode): Likewise.
1759 (find_raw_breakpoint_at): Adjust for kind.
1760 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1761 (remove_memory_breakpoint): Adjust for kind call bp_size.
1762 (set_raw_breakpoint_at): Adjust for kind.
1763 (set_breakpoint): Likewise.
1764 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1765 (delete_raw_breakpoint): Adjust for kind.
1766 (delete_breakpoint): Likewise.
1767 (find_gdb_breakpoint): Likewise.
1768 (set_gdb_breakpoint_1): Likewise.
1769 (set_gdb_breakpoint): Likewise.
1770 (delete_gdb_breakpoint_1): Likewise.
1771 (delete_gdb_breakpoint): Likewise.
1772 (uninsert_raw_breakpoint): Likewise.
1773 (reinsert_raw_breakpoint): Likewise.
1774 (set_breakpoint_data): Remove.
1775 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1776 (check_mem_read): Adjust for kind call bp_size.
1777 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1778 (clone_one_breakpoint): Adjust for kind.
1779 * mem-break.h (set_gdb_breakpoint): Likewise.
1780 (delete_gdb_breakpoint): Likewise.
1781 * server.c (process_serial_event): Likewise.
1782
dd373349
AT
17832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1784
1785 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1786 (struct linux_target_ops) <breakpoint>: Remove.
1787 (struct linux_target_ops) <breakpoint_len>: Remove.
1788 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1789 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1790 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1791 (arm_sw_breakpoint_from_kind): New function.
1792 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1793 (struct linux_target_ops) <breakpoint>: Remove.
1794 (struct linux_target_ops) <breakpoint_len>: Remove.
1795 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1796 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1797 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1798 (struct linux_target_ops) <breakpoint>: Remove.
1799 (struct linux_target_ops) <breakpoint_len>: Remove.
1800 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1801 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1802 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1803 (struct linux_target_ops) <breakpoint>: Remove.
1804 (struct linux_target_ops) <breakpoint_len>: Remove.
1805 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1806 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1807 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1808 and sw_breakpoint_from_kind to increment the pc.
1809 (linux_breakpoint_kind_from_pc): New function.
1810 (linux_sw_breakpoint_from_kind): New function.
1811 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1812 (initialize_low): Call breakpoint_kind_from_pc and
1813 sw_breakpoint_from_kind to replace breakpoint_data/len.
1814 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1815 New field.
1816 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1817 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1818 (struct linux_target_ops) <breakpoint>: Remove.
1819 (struct linux_target_ops) <breakpoint_len>: Remove.
1820 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1821 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1822 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1823 (struct linux_target_ops) <breakpoint>: Remove.
1824 (struct linux_target_ops) <breakpoint_len>: Remove.
1825 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1826 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1827 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1828 (struct linux_target_ops) <breakpoint>: Remove.
1829 (struct linux_target_ops) <breakpoint_len>: Remove.
1830 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1831 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1832 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1833 (struct linux_target_ops) <breakpoint>: Remove.
1834 (struct linux_target_ops) <breakpoint_len>: Remove.
1835 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1836 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1837 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1838 (struct linux_target_ops) <breakpoint>: Remove.
1839 (struct linux_target_ops) <breakpoint_len>: Remove.
1840 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1841 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1842 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1843 (struct linux_target_ops) <breakpoint>: Remove.
1844 (struct linux_target_ops) <breakpoint_len>: Remove.
1845 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1846 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1847 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1848 (struct linux_target_ops) <breakpoint>: Remove.
1849 (struct linux_target_ops) <breakpoint_len>: Remove.
1850 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1851 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1852 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1853 (struct linux_target_ops) <breakpoint>: Remove.
1854 (struct linux_target_ops) <breakpoint_len>: Remove.
1855 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1856 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1857 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1858 (struct linux_target_ops) <breakpoint>: Remove.
1859 (struct linux_target_ops) <breakpoint_len>: Remove.
1860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1862 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1863 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1864 (struct linux_target_ops) <breakpoint>: Remove.
1865 (struct linux_target_ops) <breakpoint_len>: Remove.
1866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1868 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1869 (struct linux_target_ops) <breakpoint>: Remove.
1870 (struct linux_target_ops) <breakpoint_len>: Remove.
1871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1873
4cd98a19
AT
18742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1875
1876 * linux-cris-low.c (cris_get_pc): Remove void arg.
1877
774ee6d2
AR
18782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1879
1880 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1881 variable name.
1882
833dcd29
AR
18832015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1884
1885 * inferiors.c (thread_pid_matches_callback): New function.
1886 (find_thread_process): New function.
1887 (remove_thread): Reset current_thread.
1888 (remove_process): Assert threads have been removed first.
1889
8d689ee5
YQ
18902015-10-15 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1893 if it is 3.
1894 (aarch64_remove_point): Likewise.
1895 * regcache.c (regcache_register_size): New function.
1896
1c2e1515
YQ
18972015-10-12 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-aarch64-low.c: Update all callers as emit_load_store
1900 is renamed to aarch64_emit_load_store.
1901
e1c587c3
YQ
19022015-10-12 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-aarch64-low.c: Update all callers of function renaming
1905 from emit_insn to aarch64_emit_insn.
1906
b6542f81
YQ
19072015-10-12 Yao Qi <yao.qi@linaro.org>
1908
1909 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1910 arch/aarch64-insn.h.
1911 (struct aarch64_memory_operand): Likewise.
1912 (ENCODE): Likewise.
1913 (emit_insn): Move to arch/aarch64-insn.c.
1914 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1915 (emit_load_store): Move to arch/aarch64-insn.c.
1916 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1917 (can_encode_int32): Remove.
1918
246994ce
YQ
19192015-10-12 Yao Qi <yao.qi@linaro.org>
1920
1921 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1922 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1923 (aarch64_relocate_instruction): Likewise.
1924 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1925 (struct aarch64_insn_visitor): Likewise.
1926
0badd99f
YQ
19272015-10-12 Yao Qi <yao.qi@linaro.org>
1928
1929 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1930 (struct aarch64_insn_visitor): New.
1931 (struct aarch64_insn_relocation_data): New.
1932 (aarch64_ftrace_insn_reloc_b): New function.
1933 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1934 (aarch64_ftrace_insn_reloc_cb): Likewise.
1935 (aarch64_ftrace_insn_reloc_tb): Likewise.
1936 (aarch64_ftrace_insn_reloc_adr): Likewise.
1937 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1938 (aarch64_ftrace_insn_reloc_others): Likewise.
1939 (visitor): New.
1940 (aarch64_relocate_instruction): Use visitor.
1941
dfaffe9d
YQ
19422015-10-12 Yao Qi <yao.qi@linaro.org>
1943
1944 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1945 int. Add argument buf.
1946 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1947 aarch64_relocate_instruction.
1948
70b439f0
YQ
19492015-10-12 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1952 argument insn. Remove local variable insn. Don't call
1953 target_read_uint32.
1954 (aarch64_install_fast_tracepoint_jump_pad): Call
1955 target_read_uint32.
1956
7781c06f
YQ
19572015-09-30 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1960 (emit_load_store_pair): Likewise.
1961
9a3c8263
SM
19622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * dll.c (match_dll): Add cast(s).
1965 (unloaded_dll): Likewise.
1966 * linux-low.c (second_thread_of_pid_p): Likewise.
1967 (delete_lwp_callback): Likewise.
1968 (count_events_callback): Likewise.
1969 (select_event_lwp_callback): Likewise.
1970 (linux_set_resume_request): Likewise.
1971 * server.c (accumulate_file_name_length): Likewise.
1972 (emit_dll_description): Likewise.
1973 (handle_qxfer_threads_worker): Likewise.
1974 (visit_actioned_threads): Likewise.
1975 * thread-db.c (any_thread_of): Likewise.
1976 * tracepoint.c (same_process_p): Likewise.
1977 (match_blocktype): Likewise.
1978 (build_traceframe_info_xml): Likewise.
1979
224c3ddb
SM
19802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1983 assignment.
1984 (gdb_unparse_agent_expr): Likewise.
1985 * hostio.c (require_data): Likewise.
1986 (handle_pread): Likewise.
1987 * linux-low.c (disable_regset): Likewise.
1988 (fetch_register): Likewise.
1989 (store_register): Likewise.
1990 (get_dynamic): Likewise.
1991 (linux_qxfer_libraries_svr4): Likewise.
1992 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1993 (set_fast_tracepoint_jump): Likewise.
1994 (uninsert_fast_tracepoint_jumps_at): Likewise.
1995 (reinsert_fast_tracepoint_jumps_at): Likewise.
1996 (validate_inserted_breakpoint): Likewise.
1997 (clone_agent_expr): Likewise.
1998 * regcache.c (init_register_cache): Likewise.
1999 * remote-utils.c (putpkt_binary_1): Likewise.
2000 (decode_M_packet): Likewise.
2001 (decode_X_packet): Likewise.
2002 (look_up_one_symbol): Likewise.
2003 (relocate_instruction): Likewise.
2004 (monitor_output): Likewise.
2005 * server.c (handle_search_memory): Likewise.
2006 (handle_qxfer_exec_file): Likewise.
2007 (handle_qxfer_libraries): Likewise.
2008 (handle_qxfer): Likewise.
2009 (handle_query): Likewise.
2010 (handle_v_cont): Likewise.
2011 (handle_v_run): Likewise.
2012 (captured_main): Likewise.
2013 * target.c (write_inferior_memory): Likewise.
2014 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2015 * tracepoint.c (init_trace_buffer): Likewise.
2016 (add_tracepoint_action): Likewise.
2017 (add_traceframe): Likewise.
2018 (add_traceframe_block): Likewise.
2019 (cmd_qtdpsrc): Likewise.
2020 (cmd_qtdv): Likewise.
2021 (cmd_qtstatus): Likewise.
2022 (response_source): Likewise.
2023 (response_tsv): Likewise.
2024 (cmd_qtnotes): Likewise.
2025 (gdb_collect): Likewise.
2026 (initialize_tracepoint): Likewise.
2027
afbe19f8
PL
20282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2029
2030 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2031 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2032 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2033 <NOP>: New.
2034 (enum aarch64_condition_codes): New enum.
2035 (w0): New static global.
2036 (fp): Likewise.
2037 (lr): Likewise.
2038 (struct aarch64_memory_operand) <type>: New
2039 MEMORY_OPERAND_POSTINDEX type.
2040 (postindex_memory_operand): New helper function.
2041 (emit_ret): New function.
2042 (emit_load_store_pair): New function, factored out of emit_stp
2043 with support for MEMORY_OPERAND_POSTINDEX.
2044 (emit_stp): Rewrite using emit_load_store_pair.
2045 (emit_ldp): New function.
2046 (emit_load_store): Likewise.
2047 (emit_ldr): Mention post-index instruction in comment.
2048 (emit_ldrh): New function.
2049 (emit_ldrb): New function.
2050 (emit_ldrsw): Mention post-index instruction in comment.
2051 (emit_str): Likewise.
2052 (emit_subs): New function.
2053 (emit_cmp): Likewise.
2054 (emit_and): Likewise.
2055 (emit_orr): Likewise.
2056 (emit_orn): Likewise.
2057 (emit_eor): Likewise.
2058 (emit_mvn): Likewise.
2059 (emit_lslv): Likewise.
2060 (emit_lsrv): Likewise.
2061 (emit_asrv): Likewise.
2062 (emit_mul): Likewise.
2063 (emit_sbfm): Likewise.
2064 (emit_sbfx): Likewise.
2065 (emit_ubfm): Likewise.
2066 (emit_ubfx): Likewise.
2067 (emit_csinc): Likewise.
2068 (emit_cset): Likewise.
2069 (emit_nop): Likewise.
2070 (emit_ops_insns): New helper function.
2071 (emit_pop): Likewise.
2072 (emit_push): Likewise.
2073 (aarch64_emit_prologue): New function.
2074 (aarch64_emit_epilogue): Likewise.
2075 (aarch64_emit_add): Likewise.
2076 (aarch64_emit_sub): Likewise.
2077 (aarch64_emit_mul): Likewise.
2078 (aarch64_emit_lsh): Likewise.
2079 (aarch64_emit_rsh_signed): Likewise.
2080 (aarch64_emit_rsh_unsigned): Likewise.
2081 (aarch64_emit_ext): Likewise.
2082 (aarch64_emit_log_not): Likewise.
2083 (aarch64_emit_bit_and): Likewise.
2084 (aarch64_emit_bit_or): Likewise.
2085 (aarch64_emit_bit_xor): Likewise.
2086 (aarch64_emit_bit_not): Likewise.
2087 (aarch64_emit_equal): Likewise.
2088 (aarch64_emit_less_signed): Likewise.
2089 (aarch64_emit_less_unsigned): Likewise.
2090 (aarch64_emit_ref): Likewise.
2091 (aarch64_emit_if_goto): Likewise.
2092 (aarch64_emit_goto): Likewise.
2093 (aarch64_write_goto_address): Likewise.
2094 (aarch64_emit_const): Likewise.
2095 (aarch64_emit_call): Likewise.
2096 (aarch64_emit_reg): Likewise.
2097 (aarch64_emit_pop): Likewise.
2098 (aarch64_emit_stack_flush): Likewise.
2099 (aarch64_emit_zero_ext): Likewise.
2100 (aarch64_emit_swap): Likewise.
2101 (aarch64_emit_stack_adjust): Likewise.
2102 (aarch64_emit_int_call_1): Likewise.
2103 (aarch64_emit_void_call_2): Likewise.
2104 (aarch64_emit_eq_goto): Likewise.
2105 (aarch64_emit_ne_goto): Likewise.
2106 (aarch64_emit_lt_goto): Likewise.
2107 (aarch64_emit_le_goto): Likewise.
2108 (aarch64_emit_gt_goto): Likewise.
2109 (aarch64_emit_ge_got): Likewise.
2110 (aarch64_emit_ops_impl): New static global variable.
2111 (aarch64_emit_ops): New target function, return
2112 &aarch64_emit_ops_impl.
2113 (struct linux_target_ops): Install it.
2114
bb903df0
PL
21152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2116
2117 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2118 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2119 aarch64-ipa.o.
2120 * linux-aarch64-ipa.c: New file.
2121 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2122 and endian.h.
2123 (aarch64_get_thread_area): New target method.
2124 (extract_signed_bitfield): New helper function.
2125 (aarch64_decode_ldr_literal): New function.
2126 (enum aarch64_opcodes): New enum.
2127 (struct aarch64_register): New struct.
2128 (struct aarch64_operand): New struct.
2129 (x0): New static global.
2130 (x1): Likewise.
2131 (x2): Likewise.
2132 (x3): Likewise.
2133 (x4): Likewise.
2134 (w2): Likewise.
2135 (ip0): Likewise.
2136 (sp): Likewise.
2137 (xzr): Likewise.
2138 (aarch64_register): New helper function.
2139 (register_operand): Likewise.
2140 (immediate_operand): Likewise.
2141 (struct aarch64_memory_operand): New struct.
2142 (offset_memory_operand): New helper function.
2143 (preindex_memory_operand): Likewise.
2144 (enum aarch64_system_control_registers): New enum.
2145 (ENCODE): New macro.
2146 (emit_insn): New helper function.
2147 (emit_b): New function.
2148 (emit_bcond): Likewise.
2149 (emit_cb): Likewise.
2150 (emit_tb): Likewise.
2151 (emit_blr): Likewise.
2152 (emit_stp): Likewise.
2153 (emit_ldp_q_offset): Likewise.
2154 (emit_stp_q_offset): Likewise.
2155 (emit_load_store): Likewise.
2156 (emit_ldr): Likewise.
2157 (emit_ldrsw): Likewise.
2158 (emit_str): Likewise.
2159 (emit_ldaxr): Likewise.
2160 (emit_stxr): Likewise.
2161 (emit_stlr): Likewise.
2162 (emit_data_processing_reg): Likewise.
2163 (emit_data_processing): Likewise.
2164 (emit_add): Likewise.
2165 (emit_sub): Likewise.
2166 (emit_mov): Likewise.
2167 (emit_movk): Likewise.
2168 (emit_mov_addr): Likewise.
2169 (emit_mrs): Likewise.
2170 (emit_msr): Likewise.
2171 (emit_sevl): Likewise.
2172 (emit_wfe): Likewise.
2173 (append_insns): Likewise.
2174 (can_encode_int32_in): New helper function.
2175 (aarch64_relocate_instruction): New function.
2176 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2177 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2178 (struct linux_target_ops): Install aarch64_get_thread_area,
2179 aarch64_install_fast_tracepoint_jump_pad and
2180 aarch64_get_min_fast_tracepoint_insn_len.
2181
787749ea
PL
21822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2183
2184 * Makefile.in (aarch64-insn.o): New rule.
2185 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2186
9812b2e6
YQ
21872015-09-21 Yao Qi <yao.qi@linaro.org>
2188
2189 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2190
18fe412b
YQ
21912015-09-21 Yao Qi <yao.qi@linaro.org>
2192
2193 * tracepoint.c (max_jump_pad_size): Remove.
2194
a0cc84cd
YQ
21952015-09-18 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-aarch64-low.c: Don't include sys/uio.h.
2198 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2199
d78908cf
WW
22002015-09-16 Wei-cheng Wang <cole945@gmail.com>
2201
2202 * tracepoint.c (eval_result_type): Change prototype.
2203 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2204
d57e0d50
PA
22052015-09-15 Pedro Alves <palves@redhat.com>
2206
2207 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2208 Check whether to report exec events instead of checking whether
2209 multiprocess is enabled.
2210
5a676acc
PA
22112015-09-15 Pedro Alves <palves@redhat.com>
2212
2213 PR remote/18965
2214 * remote-utils.c (prepare_resume_reply): Merge
2215 TARGET_WAITKIND_VFORK_DONE switch case with the
2216 TARGET_WAITKIND_FORKED case.
2217
7c5d0fad
YQ
22182015-09-15 Yao Qi <yao.qi@linaro.org>
2219
2220 * server.c (handle_query): Check string comparison using
2221 "else if" instead of "if".
2222
750ce8d1
YQ
22232015-09-15 Yao Qi <yao.qi@linaro.org>
2224
2225 * server.c (vCont_supported): New global variable.
2226 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2227 matches. Append ";vContSupported+" to own_buf.
2228 (handle_v_requests): Append ";s;S" to own_buf if target supports
2229 hardware single step or vCont_supported is false.
2230 (capture_main): Set vCont_supported to zero.
2231
70b90b91
YQ
22322015-09-15 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2235 it to ...
2236 (linux_supports_hardware_single_step): ... New function.
2237 (linux_target_ops): Update.
2238 * lynx-low.c (lynx_target_ops): Set field
2239 supports_hardware_single_step to target_can_do_hardware_single_step.
2240 * nto-low.c (nto_target_ops): Likewise.
2241 * spu-low.c (spu_target_ops): Likewise.
2242 * win32-low.c (win32_target_ops): Likewise.
2243 * target.c (target_can_do_hardware_single_step): New function.
2244 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2245 Remove. <supports_hardware_single_step>: New field.
2246 (target_supports_conditional_breakpoints): Remove.
2247 (target_supports_hardware_single_step): New macro.
2248 (target_can_do_hardware_single_step): Declare.
2249 * server.c (handle_query): Use target_supports_hardware_single_step
2250 instead of target_supports_conditional_breakpoints.
2251
ade90bde
YQ
22522015-09-15 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2255 function.
2256 (struct linux_target_ops the_low_target): Install
2257 aarch64_linux_siginfo_fixup.
2258
94585166
DB
22592015-09-11 Don Breazeal <donb@codesourcery.com>
2260 Luis Machado <lgustavo@codesourcery.com>
2261
2262 * linux-low.c (linux_mourn): Static declaration.
2263 (linux_arch_setup): Move in front of
2264 handle_extended_wait.
2265 (linux_arch_setup_thread): New function.
2266 (handle_extended_wait): Handle exec events. Call
2267 linux_arch_setup_thread. Make event_lwp argument a
2268 pointer-to-a-pointer.
2269 (check_zombie_leaders): Do not check stopped threads.
2270 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2271 (linux_low_filter_event): Add lwp and thread for exec'ing
2272 non-leader thread if leader thread has been deleted.
2273 Refactor code into linux_arch_setup_thread and call it.
2274 Pass child lwp pointer by reference to handle_extended_wait.
2275 (linux_wait_for_event_filtered): Update comment.
2276 (linux_wait_1): Prevent clobbering exec event status.
2277 (linux_supports_exec_events): New function.
2278 (linux_target_ops) <supports_exec_events>: Initialize new member.
2279 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2280 new member.
2281 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2282 * server.c (report_exec_events): New global variable.
2283 (handle_query): Handle qSupported query for exec-events feature.
2284 (captured_main): Initialize report_exec_events.
2285 * server.h (report_exec_events): Declare new global variable.
2286 * target.h (struct target_ops) <supports_exec_events>: New
2287 member.
2288 (target_supports_exec_events): New macro.
2289 * win32-low.c (win32_target_ops) <supports_exec_events>:
2290 Initialize new member.
2291
0568462b
MM
22922015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2293
2294 * linux-low.c (linux_low_enable_btrace): Remove.
2295 (linux_target_ops): Replace linux_low_enable_btrace with
2296 linux_enable_btrace.
2297
39edd165
YQ
22982015-09-03 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch64-low.c (aarch64_insert_point): Call
2301 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2302 returns true.
2303
1db33b5a
UW
23042015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2305
2306 * linux-low.c (check_stopped_by_breakpoint): Use
2307 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2308
ab290430
PA
23092015-08-27 Pedro Alves <palves@redhat.com>
2310
2311 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2312
8d749320
SM
23132015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2314
6711b7f8
SM
2315 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2316 the XNEW-family equivalent.
8d749320
SM
2317 (compile_bytecodes): Likewise.
2318 * dll.c (loaded_dll): Likewise.
2319 * event-loop.c (append_callback_event): Likewise.
2320 (create_file_handler): Likewise.
2321 (create_file_event): Likewise.
2322 * hostio.c (handle_open): Likewise.
2323 * inferiors.c (add_thread): Likewise.
2324 (add_process): Likewise.
2325 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2326 * linux-arm-low.c (arm_new_process): Likewise.
2327 (arm_new_thread): Likewise.
2328 * linux-low.c (add_to_pid_list): Likewise.
2329 (linux_add_process): Likewise.
2330 (handle_extended_wait): Likewise.
2331 (add_lwp): Likewise.
2332 (enqueue_one_deferred_signal): Likewise.
2333 (enqueue_pending_signal): Likewise.
2334 (linux_resume_one_lwp_throw): Likewise.
2335 (linux_resume_one_thread): Likewise.
2336 (linux_read_memory): Likewise.
2337 (linux_write_memory): Likewise.
2338 * linux-mips-low.c (mips_linux_new_process): Likewise.
2339 (mips_linux_new_thread): Likewise.
2340 (mips_add_watchpoint): Likewise.
2341 * linux-x86-low.c (initialize_low_arch): Likewise.
2342 * lynx-low.c (lynx_add_process): Likewise.
2343 * mem-break.c (set_raw_breakpoint_at): Likewise.
2344 (set_breakpoint): Likewise.
2345 (add_condition_to_breakpoint): Likewise.
2346 (add_commands_to_breakpoint): Likewise.
2347 (clone_agent_expr): Likewise.
2348 (clone_one_breakpoint): Likewise.
2349 * regcache.c (new_register_cache): Likewise.
2350 * remote-utils.c (look_up_one_symbol): Likewise.
2351 * server.c (queue_stop_reply): Likewise.
2352 (start_inferior): Likewise.
2353 (queue_stop_reply_callback): Likewise.
2354 (handle_target_event): Likewise.
2355 * spu-low.c (fetch_ppc_memory): Likewise.
2356 (store_ppc_memory): Likewise.
2357 * target.c (set_target_ops): Likewise.
2358 * thread-db.c (thread_db_load_search): Likewise.
2359 (try_thread_db_load_1): Likewise.
2360 * tracepoint.c (add_tracepoint): Likewise.
2361 (add_tracepoint_action): Likewise.
2362 (create_trace_state_variable): Likewise.
2363 (cmd_qtdpsrc): Likewise.
2364 (cmd_qtro): Likewise.
2365 (add_while_stepping_state): Likewise.
2366 * win32-low.c (child_add_thread): Likewise.
2367 (get_image_name): Likewise.
2368
ed8b7b42
YQ
23692015-08-25 Yao Qi <yao.qi@linaro.org>
2370
2371 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2372
db3cb7cb
YQ
23732015-08-25 Yao Qi <yao.qi@linaro.org>
2374
2375 * Makefile.in (aarch64-linux.o): New rule.
2376 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2377 srv_tgtobj.
2378 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2379 (aarch64_init_debug_reg_state): Make it extern.
2380 (aarch64_linux_prepare_to_resume): Remove.
2381
f6011a1c
YQ
23822015-08-25 Yao Qi <yao.qi@linaro.org>
2383
2384 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2385 lwp_arch_private_info and ptid_of_lwp.
2386
88e2cf7e
YQ
23872015-08-25 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2390 Find proc_info by find_process_pid. All callers updated.
2391
5e35436e
YQ
23922015-08-25 Yao Qi <yao.qi@linaro.org>
2393
2394 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2395 Remove.
2396 (debug_reg_change_callback): Remove.
2397 (aarch64_notify_debug_reg_change): Remove.
2398
4a8a7965
YQ
23992015-08-25 Yao Qi <yao.qi@linaro.org>
2400
2401 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2402 Call current_lwp_ptid.
2403
32a271ee
YQ
24042015-08-25 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-aarch64-low.c (debug_reg_change_callback): Use
2407 debug_printf.
2408
0d51c8d7
YQ
24092015-08-25 Yao Qi <yao.qi@linaro.org>
2410
2411 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2412
31a43dd5
YQ
24132015-08-25 Yao Qi <yao.qi@linaro.org>
2414
2415 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2416
8ee52567
YQ
24172015-08-25 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2420 the code.
2421
ff3f0f45
YQ
24222015-08-25 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2425 Remove.
2426 (debug_reg_change_callback): Remove argument entry and add argument
2427 lwp. Remove local variable thread. Don't print thread id in the
2428 debugging output. Don't check whether pid of thread equals to pid.
2429 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2430 iterate_over_lwps instead find_inferior.
2431
3d40fbb5
PA
24322015-08-24 Pedro Alves <palves@redhat.com>
2433
2434 * inferiors.c (get_first_process): New function.
2435 * inferiors.h (get_first_process): New declaration.
2436 * remote-utils.c (read_ptid): Default to the first process in the
2437 list, instead of to the current thread's process.
2438
438e1e42
PA
24392015-08-24 Pedro Alves <palves@redhat.com>
2440
2441 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2442 * event-loop.c: Likewise.
2443 * remote-utils.c: Likewise.
2444 * tracepoint.c: Likewise.
2445
a8c6d4fc
PA
24462015-08-24 Pedro Alves <palves@redhat.com>
2447
2448 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2449 ptid_get_lwp.
2450
99b0bb12
PA
24512015-08-21 Pedro Alves <palves@redhat.com>
2452
2453 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2454 instead of literal 1.
2455
f8904751
PA
24562015-08-21 Pedro Alves <palves@redhat.com>
2457
2458 * tdesc.c (default_description): Explicitly zero-initialize.
2459
465a859e
PA
24602015-08-21 Pedro Alves <palves@redhat.com>
2461
2462 PR gdb/18749
2463 * inferiors.c (remove_thread): Discard any pending stop reply for
2464 this thread.
2465 * server.c (remove_all_on_match_pid): Rename to ...
2466 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2467 instead of a pid.
2468 (discard_queued_stop_replies): Change parameter to a ptid. Now
2469 extern.
2470 (handle_v_kill, kill_inferior_callback, captured_main)
2471 (process_serial_event): Adjust.
2472 * server.h (discard_queued_stop_replies): Declare.
2473
f0db101d
PA
24742015-08-21 Pedro Alves <palves@redhat.com>
2475
2476 * linux-low.c (wait_for_sigstop): Always switch to no thread
2477 selected if the previously current thread dies.
2478 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2479 process instead of the current thread's.
2480 * remote-utils.c (input_interrupt): Don't check if there's no
2481 current thread.
2482 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2483 current thread to the general thread fails, error out.
2484 (handle_qxfer_auxv, handle_qxfer_libraries)
2485 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2486 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2487 (handle_query): Check if there's a thread selected instead of
2488 checking whether there's any thread in the thread list.
2489 (handle_qxfer_threads, handle_qxfer_btrace)
2490 (handle_qxfer_btrace_conf): Don't error out early if there's no
2491 thread in the thread list.
2492 (handle_v_cont, myresume): Don't set the current thread to the
2493 continue thread.
2494 (process_serial_event) <Hg handling>: Also set thread_id if the
2495 previous general thread is still alive.
2496 (process_serial_event) <g/G handling>: If setting the current
2497 thread to the general thread fails, error out.
2498 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2499 thread's lwp instead of the current thread's.
2500 * target.c (set_desired_thread): If the desired thread was not
2501 found, leave the current thread pointing to NULL. Return an int
2502 (boolean) indicating success.
2503 * target.h (set_desired_thread): Change return type to int.
2504
40045d91
MF
25052015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2506
2507 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2508 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2509 #includes.
2510 (ps_get_thread_area): New function.
2511
45face3b
GB
25122015-08-19 Gary Benson <gbenson@redhat.com>
2513
2514 * hostio.c (handle_pread): Do not attempt to read more data
2515 than hostio_reply_with_data can fit in a packet.
2516
16d5f642
JB
25172015-08-18 Joel Brobecker <brobecker@adacore.com>
2518
2519 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2520
a738da3a
MF
25212015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2522
2523 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2524
33ebda9d
PA
25252015-08-06 Pedro Alves <palves@redhat.com>
2526
2527 * tracepoint.c (expr_eval_result): Now an int.
2528
a44892be
PA
25292015-08-06 Pedro Alves <palves@redhat.com>
2530
2531 * gdbthread.h (struct regcache): Forward declare.
2532 (struct thread_info) <regcache_data>: Now a struct regcache
2533 pointer.
2534 * inferiors.c (inferior_regcache_data)
2535 (set_inferior_regcache_data): Now work with struct regcache
2536 pointers.
2537 * inferiors.h (struct regcache): Forward declare.
2538 (inferior_regcache_data, set_inferior_regcache_data): Now work
2539 with struct regcache pointers.
2540 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2541 (free_register_cache_thread): Remove struct regcache pointer
2542 casts.
2543
608a1e46
PA
25442015-08-06 Pedro Alves <palves@redhat.com>
2545
2546 * server.c (captured_main): On error, print the exception message
2547 to stderr, and if run_once is set, throw a quit.
2548
f0ce0d3a
PA
25492015-08-06 Pedro Alves <palves@redhat.com>
2550
2551 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2552 the current thread.
2553
bf47e248
PA
25542015-08-06 Pedro Alves <palves@redhat.com>
2555
2556 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2557 reading beyond the passed in buffer length.
2558
b6b9ffcc
PL
25592015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2560
2561 * tracepoint.c (symbol_list) <required>: Remove.
2562
863d01bd
PA
25632015-08-06 Pedro Alves <palves@redhat.com>
2564
2565 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2566 count if stopping and suspending threads.
2567 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2568 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2569 (linux_detach): Complete an ongoing step-over.
2570 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2571 throughout.
2572 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2573 (linux_wait_1): If passing a signal to the inferior after
2574 finishing a step-over, unsuspend and re-resume all lwps. If we
2575 see a single-step event but the thread should be continuing, don't
2576 pass the trap to gdb.
2577 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2578 internal_error instead of gdb_assert.
2579 (enqueue_pending_signal): New function.
2580 (check_ptrace_stopped_lwp_gone): Add debug output.
2581 (start_step_over): Use internal_error instead of gdb_assert.
2582 (complete_ongoing_step_over): New function.
2583 (linux_resume_one_thread): Don't resume a suspended thread.
2584 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2585 it stepping.
2586
00db26fa
PA
25872015-08-06 Pedro Alves <palves@redhat.com>
2588
2589 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2590 (linux_thread_alive): Use lwp_is_marked_dead.
2591 (extended_event_reported): Delete.
2592 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2593 instead of extended_event_reported.
2594 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2595 as well.
2596 (lwp_is_marked_dead): New function.
2597 (lwp_running): Use lwp_is_marked_dead.
2598 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2599 comment.
2600
ad071a30
PA
26012015-08-06 Pedro Alves <palves@redhat.com>
2602
2603 * linux-low.c (linux_wait_1): Move fork event output out of the
2604 !report_to_gdb check. Pass event_child->waitstatus to
2605 target_waitstatus_to_string instead of ourstatus.
2606
524b57e6
YQ
26072015-08-04 Yao Qi <yao.qi@linaro.org>
2608
2609 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2610 if current_thread is 32 bit.
2611
6085d6f6
YQ
26122015-08-04 Yao Qi <yao.qi@linaro.org>
2613
2614 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2615 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2616 * server.c (extended_protocol): Remove "static".
2617 * server.h (extended_protocol): Declare it.
2618
8a7e4587
YQ
26192015-08-04 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2622 both aarch64 and aarch32.
2623 (aarch64_set_pc): Likewise.
2624
3b53ae99
YQ
26252015-08-04 Yao Qi <yao.qi@linaro.org>
2626
2627 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2628 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2629 arm-with-neon.xml to srv_xmlfiles.
2630 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2631 (is_64bit_tdesc): New function.
2632 (aarch64_linux_read_description): New function.
2633 (aarch64_arch_setup): Call aarch64_linux_read_description.
2634 (regs_info): Rename to regs_info_aarch64.
2635 (aarch64_regs_info): Return right regs_info.
2636 (initialize_low_arch): Call initialize_low_arch_aarch32.
2637
bd9e6534
YQ
26382015-08-04 Yao Qi <yao.qi@linaro.org>
2639
2640 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2641 * linux-aarch32-low.c: New file.
2642 * linux-aarch32-low.h: New file.
2643 * linux-arm-low.c (arm_fill_gregset): Move it to
2644 linux-aarch32-low.c.
2645 (arm_store_gregset): Likewise.
2646 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2647 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2648 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2649 (regs_info): Rename to regs_info_arm.
2650 (arm_regs_info): Return regs_info_aarch32 if
2651 have_ptrace_getregset is 1 and target description is
2652 arm_with_neon or arm_with_vfpv3.
2653 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2654 Call initialize_low_arch_aarch32 instead.
2655
ded48a5e
YQ
26562015-08-04 Yao Qi <yao.qi@linaro.org>
2657
2658 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2659 * linux-low.c: ... here.
2660 * linux-low.h (have_ptrace_getregset): Declare it.
2661
96e9210f
PA
26622015-08-04 Pedro Alves <palves@redhat.com>
2663
2664 * thread-db.c (struct thread_db): Use new typedefs.
2665 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2666 CHK calls.
2667 (disable_thread_event_reporting): Cast result of dlsym to
2668 destination function pointer type.
2669 (thread_db_mourn): Use td_ta_delete_ftype.
2670
af60a1ef
SL
26712015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2672
2673 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2674 arch variant.
2675 (CDX_BREAKPOINT): Define for R2.
2676 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2677 (the_low_target): Add comments.
2678
e8b41681
YQ
26792015-07-30 Yao Qi <yao.qi@linaro.org>
2680
2681 * linux-arm-low.c (arm_hwcap): Remove it.
2682 (arm_read_description): New local variable arm_hwcap. Don't
2683 set arm_hwcap to zero.
2684
89abb039
YQ
26852015-07-30 Yao Qi <yao.qi@linaro.org>
2686
2687 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2688 Use regcache->tdesc instead.
2689 (arm_store_wmmxregset): Likewise.
2690 (arm_fill_vfpregset): Likewise.
2691 (arm_store_vfpregset): Likewise.
2692
deca266c
YQ
26932015-07-30 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-arm-low.c: Include arch/arm.h.
2696 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2697 (arm_store_gregset): Likewise.
2698
aa58a496
SM
26992015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2702 ptrace's 4th parameter.
2703
50904b25
YQ
27042015-07-27 Yao Qi <yao.qi@linaro.org>
2705
2706 * configure.srv (case aarch64*-*-linux*): Don't set
2707 srv_linux_usrregs.
2708
5826e159
PA
27092015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2710
2711 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2712 sys/ptrace.h.
2713 * linux-arm-low.c: Likewise.
2714 * linux-cris-low.c: Likewise.
2715 * linux-crisv32-low.c: Likewise.
2716 * linux-low.c: Likewise.
2717 * linux-m68k-low.c: Likewise.
2718 * linux-mips-low.c: Likewise.
2719 * linux-nios2-low.c: Likewise.
2720 * linux-s390-low.c: Likewise.
2721 * linux-sparc-low.c: Likewise.
2722 * linux-tic6x-low.c: Likewise.
2723 * linux-tile-low.c: Likewise.
2724 * linux-x86-low.c: Likewise.
2725
54019719
PA
27262015-07-24 Pedro Alves <palves@redhat.com>
2727
2728 * config.in: Regenerate.
2729 * configure: Regenerate.
2730
eb7aa561
PA
27312015-07-24 Pedro Alves <palves@redhat.com>
2732
2733 * acinclude.m4: Include ../ptrace.m4.
2734 * configure.ac: Call GDB_AC_PTRACE.
2735 * config.in, configure: Regenerate.
2736
55d7b841
YQ
27372015-07-24 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-low.c (linux_create_inferior): Remove setting to
2740 proc->priv->new_inferior.
2741 (linux_attach): Likewise.
2742 (linux_low_filter_event): Likewise.
2743 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2744
c06cbd92
YQ
27452015-07-24 Yao Qi <yao.qi@linaro.org>
2746
2747 * linux-low.c (linux_arch_setup): New function.
2748 (linux_low_filter_event): If proc->tdesc is NULL and
2749 proc->attached is true, call the_low_target.arch_setup.
2750 Otherwise, keep status pending, and return.
2751 (linux_resume_one_lwp_throw): Don't call get_pc if
2752 thread->while_stepping isn't NULL. Don't call
2753 get_thread_regcache if proc->tdesc is NULL.
2754 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2755 (linux_target_ops): Install arch_setup.
2756 * server.c (start_inferior): Call the_target->arch_setup.
2757 * target.h (struct target_ops) <arch_setup>: New field.
2758 (target_arch_setup): New marco.
2759 * lynx-low.c (lynx_target_ops): Update.
2760 * nto-low.c (nto_target_ops): Update.
2761 * spu-low.c (spu_target_ops): Update.
2762 * win32-low.c (win32_target_ops): Update.
2763
5ae3ebba
YQ
27642015-07-24 Yao Qi <yao.qi@linaro.org>
2765
2766 * linux-low.c (linux_add_process): Don't set
2767 proc->priv->new_inferior.
2768 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2769 (linux_attach): Likewise.
2770
eb97750b
YQ
27712015-07-24 Yao Qi <yao.qi@linaro.org>
2772
2773 * server.c (start_inferior): Code refactor.
2774
51aee833
YQ
27752015-07-24 Yao Qi <yao.qi@linaro.org>
2776
2777 * server.c (process_serial_event): Set general_thread.
2778
af1b22f3
YQ
27792015-07-21 Yao Qi <yao.qi@linaro.org>
2780
2781 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2782 aarch64_linux_get_debug_reg_capacity.
2783
554717a3
YQ
27842015-07-17 Yao Qi <yao.qi@linaro.org>
2785
2786 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2787 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2788 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2789 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2790 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2791 (AARCH64_HWP_ALIGNMENT): Likewise.
2792 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2793 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2794 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2795 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2796 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2797 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2798 (struct aarch64_debug_reg_state): Likewise.
2799 (struct arch_lwp_info): Likewise.
2800 (aarch64_align_watchpoint): Likewise.
2801 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2802 (aarch64_watchpoint_length): Likewise.
2803 (aarch64_point_encode_ctrl_reg): Likewise
2804 (aarch64_point_is_aligned): Likewise.
2805 (aarch64_align_watchpoint): Likewise.
2806 (aarch64_linux_set_debug_regs):
2807 (aarch64_dr_state_insert_one_point): Likewise.
2808 (aarch64_dr_state_remove_one_point): Likewise.
2809 (aarch64_handle_breakpoint): Likewise.
2810 (aarch64_handle_aligned_watchpoint): Likewise.
2811 (aarch64_handle_unaligned_watchpoint): Likewise.
2812 (aarch64_handle_watchpoint): Likewise.
2813
c67ca4de
YQ
28142015-07-17 Yao Qi <yao.qi@linaro.org>
2815
2816 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2817 and don't aarch64_get_debug_reg_state. All callers update.
2818 (aarch64_handle_aligned_watchpoint): Likewise.
2819 (aarch64_handle_unaligned_watchpoint): Likewise.
2820 (aarch64_handle_watchpoint): Likewise.
2821 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2822 (aarch64_remove_point): Likewise.
2823
25abf979
YQ
28242015-07-17 Yao Qi <yao.qi@linaro.org>
2825
2826 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2827 debug_printf.
2828 (aarch64_handle_unaligned_watchpoint): Likewise.
2829
db1ff28b
JK
28302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2831
2832 Revert the previous 3 commits:
2833 Move gdb_regex* to common/
2834 Move linux_find_memory_regions_full & co.
2835 gdbserver build-id attribute generator
2836
700ca40f
JK
28372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2838 Jan Kratochvil <jan.kratochvil@redhat.com>
2839
2840 gdbserver build-id attribute generator.
2841 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2842 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2843 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2844 (find_phdr): New.
2845 (get_dynamic): Use find_pdhr to traverse program headers.
2846 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2847 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2848 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2849 (get_hex_build_id): New.
2850 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2851 to reply XML document.
2852
9904185c
JK
28532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2854 Jan Kratochvil <jan.kratochvil@redhat.com>
2855
2856 * target.c: Include target/target-utils.h and fcntl.h.
2857 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2858 (target_fileio_read_stralloc): New functions.
2859
6e5b4429
JK
28602015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2861
2862 * Makefile.in (OBS): Add gdb_regex.o.
2863 (gdb_regex.o): New.
2864 * config.in: Rebuilt.
2865 * configure: Rebuilt.
2866
ddc98fbf
JK
28672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2868 Jan Kratochvil <jan.kratochvil@redhat.com>
2869
2870 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2871 * Makefile.in (OBS): Add target-utils.o.
2872 (linux-maps.o, target-utils.o): New.
2873 * configure.srv (srv_linux_obj): Add linux-maps.o.
2874
e57bb7a0
PL
28752015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2876
2877 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2878 function, return 1.
2879 (the_low_target): Install it.
2880
586b02a9
PA
28812015-07-14 Pedro Alves <palves@redhat.com>
2882
2883 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2884 Instead, ignore ECHILD, and throw an error for other errnos.
2885
58c1b36c
PA
28862015-07-10 Pedro Alves <palves@redhat.com>
2887
2888 * event-loop.c (struct callback_event) <data>: Change type to
2889 gdb_client_data instance instead of gdb_client_data pointer.
2890 (append_callback_event): Adjust.
2891
421530db
PL
28922015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2893
2894 * linux-aarch64-low.c: Add comments for each linux_target_ops
2895 method. Remove comments already covered in target_ops and
2896 linux_target_ops definitions.
2897 (the_low_target): Add comments for each unimplemented method.
2898
c2d65f38
YQ
28992015-07-09 Yao Qi <yao.qi@linaro.org>
2900
2901 * linux-aarch64-low.c (aarch64_regmap): Remove.
2902 (aarch64_usrregs_info): Remove.
2903 (regs_info): Set field usrregs to NULL.
2904
b20a6524
MM
29052015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2906
2907 * linux-low.c: Include "rsp-low.h"
2908 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2909 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2910 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2911 (handle_btrace_enable_pt): New.
2912 (handle_btrace_general_set): Support "pt".
2913 (handle_btrace_conf_general_set): Support "pt:size".
2914
96c97461
PL
29152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2916
2917 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2918 Z_PACKET_SW_BP.
2919
37d66942
PL
29202015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2921
2922 * linux-aarch64-low.c: Remove comment about endianness.
2923 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2924 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2925 memcmp.
2926
dc06243f
GB
29272015-06-24 Gary Benson <gbenson@redhat.com>
2928
2929 * linux-i386-ipa.c (stdint.h): Do not include.
2930 * lynx-i386-low.c (stdint.h): Likewise.
2931 * lynx-ppc-low.c (stdint.h): Likewise.
2932 * mem-break.c (stdint.h): Likewise.
2933 * thread-db.c (stdint.h): Likewise.
2934 * tracepoint.c (stdint.h): Likewise.
2935 * win32-low.c (stdint.h): Likewise.
2936
124e13d9
SM
29372015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * server.c (write_qxfer_response): Update call to
2940 remote_escape_output.
2941
909c2cda
JK
29422015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2943 Jan Kratochvil <jan.kratochvil@redhat.com>
2944
2945 Merge multiple hex conversions.
2946 * gdbreplay.c (tohex): Rename to 'fromhex'.
2947 (logchar): Use fromhex.
2948
24c05f46
JK
29492015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2950
2951 * server.c (handle_qxfer_libraries): Set `version' attribute for
2952 <library-list>.
2953
14d2069a
GB
29542015-06-10 Gary Benson <gbenson@redhat.com>
2955
2956 * target.h (struct target_ops) <multifs_open>: New field.
2957 <multifs_unlink>: Likewise.
2958 <multifs_readlink>: Likewise.
2959 * linux-low.c (nat/linux-namespaces.h): New include.
2960 (linux_target_ops): Initialize the_target->multifs_open,
2961 the_target->multifs_unlink and the_target->multifs_readlink.
2962 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2963 * hostio.c (hostio_fs_pid): New static variable.
2964 (hostio_handle_new_gdb_connection): New function.
2965 (handle_setfs): Likewise.
2966 (handle_open): Use the_target->multifs_open as appropriate.
2967 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2968 (handle_readlink): Use the_target->multifs_readlink as
2969 appropriate.
2970 (handle_vFile): Handle vFile:setfs packets.
2971 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2972 after target_handle_new_gdb_connection.
2973
4b8b5e72
GB
29742015-06-10 Gary Benson <gbenson@redhat.com>
2975
2976 * configure.ac (AC_CHECK_FUNCS): Add setns.
2977 * config.in: Regenerate.
2978 * configure: Likewise.
2979 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2980 (linux-namespaces.o): New rule.
2981 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2982
3ac2e371
GB
29832015-06-09 Gary Benson <gbenson@redhat.com>
2984
2985 * hostio.c (handle_open): Process mode argument with
2986 fileio_to_host_mode.
2987
ca9b78ce
YQ
29882015-06-01 Yao Qi <yao.qi@linaro.org>
2989
2990 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2991 * linux-x86-low.c: Likewise.
2992
bfacd19d
DB
29932015-05-28 Don Breazeal <donb@codesourcery.com>
2994
2995 * linux-low.c (handle_extended_wait): Initialize
2996 thread_info.last_resume_kind for new fork children.
2997
452003ef
PA
29982015-05-15 Pedro Alves <palves@redhat.com>
2999
3000 * target.h (target_handle_new_gdb_connection): Rewrite using if
3001 wrapped in do/while.
3002
1041a03c
JB
30032015-05-14 Joel Brobecker <brobecker@adacore.com>
3004
3005 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3006 * configure, config.in: Regenerate.
3007 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3008 Declare typedef.
3009
c269dbdb
DB
30102015-05-12 Don Breazeal <donb@codesourcery.com>
3011
3012 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3013 PTRACE_EVENT_VFORK_DONE.
3014 (linux_low_ptrace_options, extended_event_reported): Add vfork
3015 events.
3016 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3017 and "vforkdone" for RSP 'T' Stop Reply Packet.
3018 * server.h (report_vfork_events): Declare
3019 global variable.
3020
3a8a0396
DB
30212015-05-12 Don Breazeal <donb@codesourcery.com>
3022
3023 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3024 (the_low_target) <new_fork>: Initialize new member.
3025 * linux-arm-low.c (arm_new_fork): New function.
3026 (the_low_target) <new_fork>: Initialize new member.
3027 * linux-low.c (handle_extended_wait): Call new target function
3028 new_fork.
3029 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3030 * linux-mips-low.c (mips_add_watchpoint): New function
3031 extracted from mips_insert_point.
3032 (the_low_target) <new_fork>: Initialize new member.
3033 (mips_linux_new_fork): New function.
3034 (mips_insert_point): Call mips_add_watchpoint.
3035 * linux-x86-low.c (x86_linux_new_fork): New function.
3036 (the_low_target) <new_fork>: Initialize new member.
3037
de0d863e
DB
30382015-05-12 Don Breazeal <donb@codesourcery.com>
3039
3040 * linux-low.c (handle_extended_wait): Implement return value,
3041 rename argument 'event_child' to 'event_lwp', handle
3042 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3043 (linux_low_ptrace_options): New function.
3044 (linux_low_filter_event): Call linux_low_ptrace_options,
3045 use different argument fo linux_enable_event_reporting,
3046 use return value from handle_extended_wait.
3047 (extended_event_reported): New function.
3048 (linux_wait_1): Call extended_event_reported and set
3049 status to report fork events.
3050 (linux_write_memory): Add pid to debug message.
3051 (reset_lwp_ptrace_options_callback): New function.
3052 (linux_handle_new_gdb_connection): New function.
3053 (linux_target_ops): Initialize new structure member.
3054 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3055 * lynx-low.c: Initialize new structure member.
3056 * remote-utils.c (prepare_resume_reply): Implement stop reason
3057 "fork" for "T" stop message.
3058 * server.c (handle_query): Call handle_new_gdb_connection.
3059 * server.h (report_fork_events): Declare global flag.
3060 * target.h (struct target_ops) <handle_new_gdb_connection>:
3061 New member.
3062 (target_handle_new_gdb_connection): New macro.
3063 * win32-low.c: Initialize new structure member.
3064
ddcbc397
DB
30652015-05-12 Don Breazeal <donb@codesourcery.com>
3066
3067 * mem-break.c (APPEND_TO_LIST): Define macro.
3068 (clone_agent_expr): New function.
3069 (clone_one_breakpoint): New function.
3070 (clone_all_breakpoints): New function.
3071 * mem-break.h: Declare new functions.
3072
89245bc0
DB
30732015-05-12 Don Breazeal <donb@codesourcery.com>
3074
3075 * linux-low.c (linux_supports_fork_events): New function.
3076 (linux_supports_vfork_events): New function.
3077 (linux_target_ops): Initialize new structure members.
3078 (initialize_low): Call linux_check_ptrace_features.
3079 * lynx-low.c (lynx_target_ops): Initialize new structure
3080 members.
3081 * server.c (report_fork_events, report_vfork_events):
3082 New global flags.
3083 (handle_query): Add new features to qSupported packet and
3084 response.
3085 (captured_main): Initialize new global variables.
3086 * target.h (struct target_ops) <supports_fork_events>:
3087 New member.
3088 <supports_vfork_events>: New member.
3089 (target_supports_fork_events): New macro.
3090 (target_supports_vfork_events): New macro.
3091 * win32-low.c (win32_target_ops): Initialize new structure
3092 members.
3093
835205d0
GB
30942015-05-12 Gary Benson <gbenson@redhat.com>
3095
3096 * server.c (handle_qxfer_exec_file): Use current process
3097 if annex is empty.
3098
21e94bd9
SL
30992015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3100
3101 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3102 Remove HAVE_PTRACE_GETREGS conditionals.
3103 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3104 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3105
45614f15
YQ
31062015-05-08 Yao Qi <yao.qi@linaro.org>
3107
3108 * linux-low.c (linux_supports_conditional_breakpoints): New
3109 function.
3110 (linux_target_ops): Install new target method.
3111 * lynx-low.c (lynx_target_ops): Install NULL hook for
3112 supports_conditional_breakpoints.
3113 * nto-low.c (nto_target_ops): Likewise.
3114 * spu-low.c (spu_target_ops): Likewise.
3115 * win32-low.c (win32_target_ops): Likewise.
3116 * server.c (handle_query): Check
3117 target_supports_conditional_breakpoints.
3118 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3119 New field.
3120 (target_supports_conditional_breakpoints): New macro.
3121
80ad801e
PA
31222015-05-06 Pedro Alves <palves@redhat.com>
3123
3124 PR server/18081
3125 * server.c (start_inferior): If the process exits, mourn it.
3126
819843c7
GB
31272015-04-21 Gary Benson <gbenson@redhat.com>
3128
3129 * hostio.c (fileio_open_flags_to_host): Factored out to
3130 fileio_to_host_openflags in common/fileio.c. Single use
3131 updated.
3132
a2d5a9d7
MF
31332015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3134
3135 * linux-xtensa-low.c (xtensa_fill_gregset)
3136 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3137 XCHAL_HAVE_LOOP.
3138
deb44829
MF
31392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3140
3141 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3142 (regs_info): Replace usrregs pointer with NULL.
3143
e57f1de3
GB
31442015-04-17 Gary Benson <gbenson@redhat.com>
3145
3146 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3147 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3148 * server.c (handle_qxfer_exec_file): New function.
3149 (qxfer_packets): Add exec-file entry.
3150 (handle_query): Report qXfer:exec-file:read as supported packet.
3151
62828379
RN
31522015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3153
3154 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3155
b88bb450
GB
31562015-04-09 Gary Benson <gbenson@redhat.com>
3157
3158 * hostio-errno.c (errno_to_fileio_error): Remove function.
3159 Update caller to use remote_fileio_to_fio_error.
3160
c8f4bfdd
YQ
31612015-04-09 Yao Qi <yao.qi@linaro.org>
3162
3163 * linux-low.c (linux_insert_point): Call
3164 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3165 (linux_remove_point): Call remove_memory_breakpoint if type is
3166 raw_bkpt_type_sw.
3167 * linux-x86-low.c (x86_insert_point): Don't call
3168 insert_memory_breakpoint.
3169 (x86_remove_point): Don't call remove_memory_breakpoint.
3170
41f98f02
PA
31712015-04-01 Pedro Alves <palves@redhat.com>
3172 Cleber Rosa <crosa@redhat.com>
3173
3174 * server.c (gdbserver_usage): Reorganize and extend the usage
3175 message.
3176
2bf6fb9d
PA
31772015-03-24 Pedro Alves <palves@redhat.com>
3178
3179 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3180 output. Also dump TRAP_TRACE.
3181 (linux_low_filter_event): In debug output, distinguish a
3182 resume_stop SIGSTOP from a delayed SIGSTOP.
3183
369f6daa
GB
31842015-03-24 Gary Benson <gbenson@redhat.com>
3185
3186 * linux-x86-low.c (x86_linux_new_thread): Moved to
3187 nat/x86-linux.c.
3188 (x86_linux_prepare_to_resume): Likewise.
3189
8e5d4070
GB
31902015-03-24 Gary Benson <gbenson@redhat.com>
3191
3192 * Makefile.in (x86-linux-dregs.o): New rule.
3193 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3194 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3195 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3196 (x86_linux_dr_get): Likewise.
3197 (x86_linux_dr_set): Likewise.
3198 (update_debug_registers_callback): Likewise.
3199 (x86_linux_dr_set_addr): Likewise.
3200 (x86_linux_dr_get_addr): Likewise.
3201 (x86_linux_dr_set_control): Likewise.
3202 (x86_linux_dr_get_control): Likewise.
3203 (x86_linux_dr_get_status): Likewise.
3204 (x86_linux_update_debug_registers): Likewise.
3205
2b95d440
GB
32062015-03-24 Gary Benson <gbenson@redhat.com>
3207
3208 * linux-x86-low.c (x86_linux_update_debug_registers):
3209 New function, factored out from...
3210 (x86_linux_prepare_to_resume): ...this.
3211
14b0bc68
GB
32122015-03-24 Gary Benson <gbenson@redhat.com>
3213
3214 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3215 (x86_linux_dr_set): Likewise.
3216 (update_debug_registers_callback): Likewise.
3217 (x86_linux_dr_set_addr): Likewise.
3218 (x86_linux_dr_get_addr): Likewise.
3219 (x86_linux_dr_set_control): Likewise.
3220 (x86_linux_dr_get_control): Likewise.
3221 (x86_linux_dr_get_status): Likewise.
3222 (x86_linux_prepare_to_resume): Likewise.
3223
5dfe6ca8
GB
32242015-03-24 Gary Benson <gbenson@redhat.com>
3225
3226 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3227 Use perror_with_name. Pass string through gettext.
3228 (x86_linux_dr_set): Likewise.
3229
d33472ad
GB
32302015-03-24 Gary Benson <gbenson@redhat.com>
3231
3232 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3233 (x86_linux_dr_set_addr): ...this.
3234 (x86_dr_low_get_addr): Rename to...
3235 (x86_linux_dr_get_addr): ...this.
3236 (x86_dr_low_set_control): Rename to...
3237 (x86_linux_dr_set_control): ...this.
3238 (x86_dr_low_get_control): Rename to...
3239 (x86_linux_dr_get_control): ...this.
3240 (x86_dr_low_get_status): Rename to...
3241 (x86_linux_dr_get_status): ...this.
3242 (x86_dr_low): Update with new function names.
3243
4b134ca1
GB
32442015-03-24 Gary Benson <gbenson@redhat.com>
3245
3246 * Makefile.in (x86-linux.o): New rule.
3247 * configure.srv: Add x86-linux.o to relevant targets.
3248 * linux-low.c (lwp_set_arch_private_info): New function.
3249 (lwp_arch_private_info): Likewise.
3250 * linux-x86-low.c: Include nat/x86-linux.h.
3251 (arch_lwp_info): Removed structure.
3252 (update_debug_registers_callback):
3253 Use lwp_set_debug_registers_changed.
3254 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3255 and lwp_set_debug_registers_changed.
3256 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3257
34c703da
GB
32582015-03-24 Gary Benson <gbenson@redhat.com>
3259
3260 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3261 * linux-arm-low.c (arm_new_thread): Likewise.
3262 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3263 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3264 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3265 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3266
cff068da
GB
32672015-03-24 Gary Benson <gbenson@redhat.com>
3268
3269 * linux-low.c (ptid_of_lwp): New function.
3270 (lwp_is_stopped): Likewise.
3271 (lwp_stop_reason): Likewise.
3272 * linux-x86-low.c (update_debug_registers_callback):
3273 Use lwp_is_stopped.
3274 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3275 lwp_stop_reason.
3276
b2f7c7e8
GB
32772015-03-24 Gary Benson <gbenson@redhat.com>
3278
3279 * linux-low.h (linux_stop_lwp): Remove declaration.
3280
6d4ee8c6
GB
32812015-03-24 Gary Benson <gbenson@redhat.com>
3282
3283 * linux-low.h: Include nat/linux-nat.h.
3284 * linux-low.c (iterate_over_lwps_args): New structure.
3285 (iterate_over_lwps_filter): New function.
3286 (iterate_over_lwps): Likewise.
3287 * linux-x86-low.c (update_debug_registers_callback):
3288 Update signature to what iterate_over_lwps expects.
3289 Remove PID check that iterate_over_lwps now performs.
3290 (x86_dr_low_set_addr): Use iterate_over_lwps.
3291 (x86_dr_low_set_control): Likewise.
3292
70a0bb6b
GB
32932015-03-24 Gary Benson <gbenson@redhat.com>
3294
3295 * linux-x86-low.c (x86_debug_reg_state): New function.
3296 (x86_linux_prepare_to_resume): Use the above.
3297
7b669087
GB
32982015-03-24 Gary Benson <gbenson@redhat.com>
3299
3300 * linux-low.c (current_lwp_ptid): New function.
3301 * linux-x86-low.c: Include nat/linux-nat.h.
3302 (x86_dr_low_get_addr): Use current_lwp_ptid.
3303 (x86_dr_low_get_control): Likewise.
3304 (x86_dr_low_get_status): Likewise.
3305
eef49a3d
PA
33062015-03-20 Pedro Alves <palves@redhat.com>
3307
3308 * tracepoint.c (cmd_qtstatus): Make "str" const.
3309
b2333d22
PA
33102015-03-20 Pedro Alves <palves@redhat.com>
3311
3312 * server.c (handle_general_set): Make "req_str" const.
3313
23f238d3
PA
33142015-03-19 Pedro Alves <palves@redhat.com>
3315
3316 * linux-low.c (linux_resume_one_lwp): Rename to ...
3317 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3318 instead call perror_with_name.
3319 (check_ptrace_stopped_lwp_gone): New function.
3320 (linux_resume_one_lwp): Reimplement as wrapper around
3321 linux_resume_one_lwp_throw that swallows errors if the LWP is
3322 gone.
3323
91baf43f
PA
33242015-03-19 Pedro Alves <palves@redhat.com>
3325
3326 * linux-low.c (count_events_callback, select_event_lwp_callback):
3327 No longer check whether the thread has resume_stop as last resume
3328 kind.
3329
8bf3b159
PA
33302015-03-19 Pedro Alves <palves@redhat.com>
3331
3332 * linux-low.c (count_events_callback, select_event_lwp_callback):
3333 Use the lwp's status_pending_p field, not the thread's.
3334
b90fc188
PA
33352015-03-19 Pedro Alves <palves@redhat.com>
3336
3337 * linux-low.c (select_event_lwp_callback): Update comments to
3338 no longer mention SIGTRAP.
3339
464b0089
GB
33402015-03-18 Gary Benson <gbenson@redhat.com>
3341
3342 * server.c (handle_query): Do not report vFile:fstat as supported.
3343
aa9e327f
GB
33442015-03-11 Gary Benson <gbenson@redhat.com>
3345
3346 * hostio.c (sys/types.h): New include.
3347 (sys/stat.h): Likewise.
3348 (common-remote-fileio.h): Likewise.
3349 (handle_fstat): New function.
3350 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3351
791c0056
GB
33522015-03-11 Gary Benson <gbenson@redhat.com>
3353
3354 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3355 struct stat.st_blocks and struct stat.st_blksize.
3356 * configure: Regenerate.
3357 * config.in: Likewise.
3358 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3359 (OBS): Add common-remote-fileio.o.
3360 (common-remote-fileio.o): New rule.
3361
9a9df970
PA
33622015-03-09 Pedro Alves <palves@redhat.com>
3363
3364 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3365 'struct sockaddr' pointer in 'accept' call.
3366
9eb1356e
PA
33672015-03-09 Pedro Alves <palves@redhat.com>
3368
3369 Revert:
3370 2015-03-07 Pedro Alves <palves@redhat.com>
3371 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3372 or <winsock2.h> here. Instead include "gdb_socket.h".
3373 (remote_open): Use union gdb_sockaddr_u.
3374 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3375 or <winsock2.h> here. Instead include "gdb_socket.h".
3376 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3377 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3378 or <sys/un.h>.
3379 (init_named_socket, gdb_agent_helper_thread): Use union
3380 gdb_sockaddr_u.
3381
aac331e4
PA
33822015-03-07 Pedro Alves <palves@redhat.com>
3383
3384 * configure.ac (build_warnings): Move
3385 -Wdeclaration-after-statement to the C-specific set.
3386 * configure: Regenerate.
3387
366c75fc
PA
33882015-03-07 Pedro Alves <palves@redhat.com>
3389
3390 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3391 or <winsock2.h> here. Instead include "gdb_socket.h".
3392 (remote_open): Use union gdb_sockaddr_u.
3393 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3394 or <winsock2.h> here. Instead include "gdb_socket.h".
3395 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3396 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3397 or <sys/un.h>.
3398 (init_named_socket, gdb_agent_helper_thread): Use union
3399 gdb_sockaddr_u.
3400
492d29ea
PA
34012015-03-07 Pedro Alves <palves@redhat.com>
3402
3403 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3404 instead.
3405
60a191ed
YQ
34062015-03-06 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-aarch64-low.c (aarch64_insert_point): Use
3409 show_debug_regs as a boolean.
3410 (aarch64_remove_point): Likewise.
3411
f5771b1d
PA
34122015-03-05 Pedro Alves <palves@redhat.com>
3413
3414 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3415 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3416 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3417 * nto-low.c (nto_target_ops): Likewise.
3418 * spu-low.c (spu_target_ops): Likewise.
3419 * win32-low.c (win32_target_ops): Likewise.
3420
3e572f71
PA
34212015-03-04 Pedro Alves <palves@redhat.com>
3422
72f4393d 3423 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3424 Decide whether a breakpoint triggered based on the SIGTRAP's
3425 siginfo.si_code.
72f4393d
L
3426 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3427 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3428 (linux_low_filter_event): Check for breakpoints before checking
3429 watchpoints.
3430 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3431 siginfo.si_code.
72f4393d
L
3432 (linux_stopped_by_sw_breakpoint)
3433 (linux_supports_stopped_by_sw_breakpoint)
3434 (linux_stopped_by_hw_breakpoint)
3435 (linux_supports_stopped_by_hw_breakpoint): New functions.
3436 (linux_target_ops): Install new target methods.
3e572f71 3437
1ec68e26
PA
34382015-03-04 Pedro Alves <palves@redhat.com>
3439
3440 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3441 * server.c (swbreak_feature, hwbreak_feature): New globals.
3442 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3443 (captured_main): Clear swbreak_feature and hwbreak_feature.
3444 * server.h (swbreak_feature, hwbreak_feature): Declare.
3445 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3446 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3447 supports_stopped_by_hw_breakpoint>: New fields.
3448 (target_supports_stopped_by_sw_breakpoint)
3449 (target_stopped_by_sw_breakpoint)
3450 (target_supports_stopped_by_hw_breakpoint)
3451 (target_stopped_by_hw_breakpoint): Declare.
3452
15c66dd6
PA
34532015-03-04 Pedro Alves <palves@redhat.com>
3454
3455 enum lwp_stop_reason -> enum target_stop_reason
3456 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3457 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3458 (linux_wait_1, stuck_in_jump_pad_callback)
3459 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3460 (linux_stopped_by_watchpoint):
3461 * linux-low.h (enum lwp_stop_reason): Delete.
3462 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3463 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3464
98fc70d6
YQ
34652015-03-04 Yao Qi <yao.qi@linaro.org>
3466
3467 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3468
dd2ac174
GB
34692015-03-03 Gary Benson <gbenson@redhat.com>
3470
3471 * hostio.c (handle_vFile): Fix prefix lengths.
3472
d68e53f4
MM
34732015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3474
3475 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3476 ptr_bits.
3477
bf2d68ab
AA
34782015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3479
3480 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3481 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3482 (clean): Add "rm -f" for above C files.
3483 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3484 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3485 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3486 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3487 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3488 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3489 (init_registers_s390x_vx_linux64)
3490 (init_registers_s390x_tevx_linux64)
3491 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3492 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3493 declarations.
3494 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3495 (s390_store_vxrs_high): New functions.
3496 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3497 NT_S390_VXRS_HIGH.
3498 (s390_arch_setup): Add logic for selecting one of the new target
3499 descriptions. Activate the new vector regsets if applicable.
3500 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3501 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3502 and init_registers_s390x_tevx_linux64.
3503
c966a859
PA
35042015-03-01 Pedro Alves <palves@redhat.com>
3505
3506 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3507 parameter.
3508
4180215b
PA
35092015-02-27 Pedro Alves <palves@redhat.com>
3510
3511 * linux-x86-low.c (u_debugreg_offset): New function.
3512 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3513
749bab01
PA
35142015-02-27 Pedro Alves <palves@redhat.com>
3515
3516 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3517 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3518 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3519 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3520 (ps_lsetfpregs, ps_getpid)
3521 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3522 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3523 (ps_lsetxregs, ps_plog): Declare.
3524
3c14e5a3
PA
35252015-02-27 Pedro Alves <palves@redhat.com>
3526
3527 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3528 IP_AGENT_EXPORT_FUNC.
3529 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3530 IP_AGENT_EXPORT_FUNC.
3531 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3532 (IP_AGENT_EXPORT): Delete.
3533 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3534 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3535 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3536 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3537 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3538 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3539 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3540 (traceframe_read_count, traceframe_write_count)
3541 (traceframes_created, trace_state_variables, get_raw_reg)
3542 (get_trace_state_variable_value, set_trace_state_variable_value)
3543 (ust_loaded, helper_thread_id, cmd_buf): Use
3544 IPA_SYM_EXPORTED_NAME.
3545 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3546 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3547 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3548 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3549 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3550 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3551 EXTERN_C_PUSH/EXTERN_C_POP.
3552 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3553 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3554 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3555 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3556 (traceframe_write_count, traceframe_read_count)
3557 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3558 (about_to_request_buffer_space, get_trace_state_variable_value)
3559 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3560 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3561 EXTERN_C_PUSH/EXTERN_C_POP.
3562 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3563 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3564 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3565 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3566 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3567 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3568 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3569 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3570 Define.
3571 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3572 (IP_AGENT_EXPORT_VAR_DECL): Define.
3573 (tracing): Declare.
3574 (gdb_agent_get_raw_reg): Declare.
3575
fe978cb0
PA
35762015-02-27 Tom Tromey <tromey@redhat.com>
3577 Pedro Alves <palves@redhat.com>
3578
3579 Rename symbols whose names are reserved C++ keywords throughout.
3580
3bc3d82a
PA
35812015-02-27 Pedro Alves <palves@redhat.com>
3582
3583 * Makefile.in (COMPILER): New, get it from autoconf.
3584 (CXX): Get from autoconf instead.
3585 (COMPILE.pre): Use COMPILER.
3586 (CC-LD): Rename to ...
3587 (CC_LD): ... this. Use COMPILER.
3588 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3589 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3590 * acinclude.m4: Include build-with-cxx.m4.
3591 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3592 Disable -Werror by default if building in C++ mode.
3593 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3594 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3595 the C++ compiler. Save/restore CXXFLAGS too.
3596 * configure: Regenerate.
3597
07697489
PA
35982015-02-27 Pedro Alves <palves@redhat.com>
3599
3600 * acinclude.m4: Include libiberty.m4.
3601 * configure.ac: Call libiberty_INIT.
3602 * config.in, configure: Regenerate.
3603
9beb7c4e
PA
36042015-02-26 Pedro Alves <palves@redhat.com>
3605
3606 * linux-low.c (linux_wait_1): When incrementing the PC past a
3607 program breakpoint always use the_low_target.breakpoint_len as
3608 increment, rather than the maximum between that and
3609 the_low_target.decr_pc_after_break.
3610
8090aef2
PA
36112015-02-23 Pedro Alves <palves@redhat.com>
3612
3613 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3614 thread was doing a step-over; always adjust the PC if
3615 we stepped over a permanent breakpoint.
3616 (linux_wait_1): If we stepped over breakpoint that was on top of a
3617 permanent breakpoint, manually advance the PC past it.
3618
bc9540e8
PA
36192015-02-23 Pedro Alves <palves@redhat.com>
3620
3621 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3622 modes.
3623 (x86_fill_gregset, x86_store_gregset): Use it when handling
3624 $orig_eax.
3625
2db9a427
PA
36262015-02-20 Pedro Alves <palves@redhat.com>
3627
3628 * thread-db.c: Include "nat/linux-procfs.h".
3629 (thread_db_init): Skip listing new threads if the kernel supports
3630 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3631
afa8d396
PA
36322015-02-20 Pedro Alves <palves@redhat.com>
3633
3634 * linux-low.c (status_pending_p_callback): Use ptid_match.
3635
c9587f88
AT
36362015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3637
3638 PR breakpoints/16812
3639 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3640 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3641 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3642
b05ec7a5
AT
36432015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3644
3645 PR breakpoints/15956
3646 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3647
d33501a5
MM
36482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3649
3650 * linux-low.c (linux_low_btrace_conf): Print size.
3651 * server.c (handle_btrace_conf_general_set): New.
3652 (hanle_general_set): Call handle_btrace_conf_general_set.
3653 (handle_query): Report Qbtrace-conf:bts:size as supported.
3654
f4abbc16
MM
36552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3656
3657 * linux-low.c (linux_low_enable_btrace): Update parameters.
3658 (linux_low_btrace_conf): New.
3659 (linux_target_ops)<to_btrace_conf>: Initialize.
3660 * server.c (current_btrace_conf): New.
3661 (handle_btrace_enable): Rename to ...
3662 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3663 to target_enable_btrace. Update comment. Update users.
3664 (handle_qxfer_btrace_conf): New.
3665 (qxfer_packets): Add btrace-conf entry.
3666 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3667 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3668 (target_ops)<read_btrace_conf>: New.
3669 (target_enable_btrace): Update parameters.
3670 (target_read_btrace_conf): New.
3671
043c3577
MM
36722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3673
3674 * server.c (handle_btrace_general_set): Remove call to
3675 target_supports_btrace.
3676 (supported_btrace_packets): New.
3677 (handle_query): Call supported_btrace_packets.
3678 * target.h: include btrace-common.h.
3679 (btrace_target_info): Removed.
3680 (supports_btrace, target_supports_btrace): Update parameters.
3681
734b0e4b
MM
36822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3683
3684 * Makefile.in (SFILES): Add common/btrace-common.c.
3685 (OBS): Add common/btrace-common.o.
3686 (btrace-common.o): Add build rules.
3687 * linux-low: Include btrace-common.h.
3688 (linux_low_read_btrace): Use struct btrace_data. Call
3689 btrace_data_init and btrace_data_fini.
3690
d6c146e9
PA
36912015-02-06 Pedro Alves <palves@redhat.com>
3692
3693 * thread-db.c (find_new_threads_callback): Add debug output.
3694
20ba1ce6
PA
36952015-02-04 Pedro Alves <palves@redhat.com>
3696
3697 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3698 (resume_stopped_resumed_lwps): New function.
3699 (linux_wait_for_event_filtered): Use it.
3700
8cc73a39
SDJ
37012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3702
3703 * Makefile.in (SFILES): Add linux-personality.c.
3704 (linux-personality.o): New rule.
3705 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3706 list of objects to be built.
3707 * linux-low.c: Include nat/linux-personality.h.
3708 (linux_create_inferior): Remove code to disable address space
3709 randomization (moved to ../nat/linux-personality.c). Create
3710 cleanup to disable address space randomization.
3711
fb23d554
SDJ
37122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3713
3714 * Makefile.in (posix-strerror.o): New rule.
3715 (mingw-strerror.o): Likewise.
3716 * configure: Regenerated.
3717 * configure.ac: Source file ../common/common.host. Initialize new
3718 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3719
cdf43629
YQ
37202015-01-14 Yao Qi <yao@codesourcery.com>
3721
3722 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3723 (ppc-linux.o): New rule.
3724 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3725 * configure.ac: AC_CHECK_FUNCS(getauxval).
3726 * config.in: Re-generated.
3727 * configure: Re-generated.
3728 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3729 ppc64_64bit_inferior_p
3730
514c5338
YQ
37312015-01-14 Yao Qi <yao@codesourcery.com>
3732
3733 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3734 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3735 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3736 (PT_ORIG_R3, PT_TRAP): Likewise.
3737 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3738 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3739 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3740
3368c1e5
JB
37412015-01-10 Joel Brobecker <brobecker@adacore.com>
3742
3743 * i387-fp.c (i387_cache_to_xsave): In look over
3744 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3745 zmmh_low_space field by use of zmmh_high_space.
3746
582511be
PA
37472015-01-09 Pedro Alves <palves@redhat.com>
3748
3749 * linux-low.c (step_over_bkpt): Move higher up in the file.
3750 (handle_extended_wait): Don't store the stop_pc here.
3751 (get_stop_pc): Adjust comments and rename to ...
3752 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3753 stopped for a software breakpoint or hardware breakpoint.
3754 (thread_still_has_status_pending_p): New function.
3755 (status_pending_p_callback): Use
3756 thread_still_has_status_pending_p. If the event is no longer
3757 interesting, resume the LWP.
3758 (handle_tracepoints): Add assert.
3759 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3760 (wstatus_maybe_breakpoint): New function.
3761 (cancel_breakpoint): Delete function.
3762 (check_stopped_by_watchpoint): New function, factored out from
3763 linux_low_filter_event.
3764 (lp_status_maybe_breakpoint): Delete function.
3765 (linux_low_filter_event): Remove filter_ptid argument.
3766 Leave thread group exits pending here. Store the LWP's stop PC.
3767 Always leave events pending.
3768 (linux_wait_for_event_filtered): Pull all events out of the
3769 kernel, and leave them all pending.
3770 (count_events_callback, select_event_lwp_callback): Consider all
3771 events.
3772 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3773 (select_event_lwp): Only give preference to the stepping LWP in
3774 all-stop mode. Adjust comments.
3775 (ignore_event): New function.
3776 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3777 references to cancel_breakpoints. Adjust to renames. Also give
3778 equal priority to all LWPs that have had events in non-stop mode.
3779 If reporting a software breakpoint event, unadjust the LWP's PC.
3780 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3781 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3782 Adjust.
3783 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3784 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3785 (linux_stopped_by_watchpoint): Adjust.
3786 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3787 * linux-low.h (enum lwp_stop_reason): New.
3788 (struct lwp_info) <stop_pc>: Adjust comment.
3789 <stopped_by_watchpoint>: Delete field.
3790 <stop_reason>: New field.
3791 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3792 * mem-break.c (software_breakpoint_inserted_here)
3793 (hardware_breakpoint_inserted_here): New function.
3794 * mem-break.h (software_breakpoint_inserted_here)
3795 (hardware_breakpoint_inserted_here): Declare.
3796 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3797 (cancel_breakpoints): Delete.
3798 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3799 (upload_fast_traceframes): Remove references to
3800 cancel_breakpoints.
3801
a33e3959
PA
38022015-01-09 Pedro Alves <palves@redhat.com>
3803
3804 * thread-db.c (find_new_threads_callback): Ignore thread if the
3805 kernel thread ID is -1.
3806
8784d563
PA
38072015-01-09 Pedro Alves <palves@redhat.com>
3808
3809 * linux-low.c (linux_attach_fail_reason_string): Move to
3810 nat/linux-ptrace.c, and rename.
3811 (linux_attach_lwp): Update comment.
3812 (attach_proc_task_lwp_callback): New function.
3813 (linux_attach): Adjust to rename and use
3814 linux_proc_attach_tgid_threads.
3815 (linux_attach_fail_reason_string): Delete declaration.
3816
76f2b779
JB
38172015-01-01 Joel Brobecker <brobecker@adacore.com>
3818
3819 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3820 * server.c (gdbserver_version): Likewise.
3821
fafcc06a
SDJ
38222014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3823
3824 * remote-utils.c: Include ctype.h.
3825 (input_interrupt): Explicitly handle the case when the char
3826 received is the NUL byte. Improve the printing of non-ASCII
3827 characters.
3828
beed38b8
JB
38292014-12-16 Joel Brobecker <brobecker@adacore.com>
3830
3831 * linux-low.c (linux_low_filter_event): Update call to
3832 linux_enable_event_reporting following the addition of
3833 a new parameter to that function.
3834
bf330350
CU
38352014-12-16 Catalin Udma <catalin.udma@freescale.com>
3836
3837 PR server/17457
3838 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3839 (AARCH64_FPCR_REGNO): Likewise.
3840 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3841 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3842 (aarch64_store_fpregset): Likewise.
3843
5227d625
JB
38442014-12-15 Joel Brobecker <brobecker@adacore.com>
3845
3846 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3847 Remove FIXME comment about assumption about N.
3848
f93b65a0
JB
38492014-12-13 Joel Brobecker <brobecker@adacore.com>
3850
3851 * configure.ac: If large-file support is disabled in GDBserver,
3852 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3853 * configure: Regenerate.
3854
e5a9158d
AA
38552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3856
3857 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3858 warning upon ENODATA from ptrace.
3859 * linux-s390-low.c (s390_store_tdb): New.
3860 (s390_regsets): Add regset for NT_S390_TDB.
3861
feea5f36
AA
38622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3863
3864 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3865 without a fill_function.
3866 * linux-s390-low.c (s390_fill_last_break): Remove.
3867 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3868 (s390_arch_setup): Use regset's size instead of fill_function for
3869 loop end condition.
3870
098dbe61
AA
38712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3872
3873 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3874 the regset's store function when ptrace returned an error.
3875 * regcache.c (get_thread_regcache): Invalidate register cache
3876 before fetching inferior's registers.
3877
28eef672
AA
38782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3879
3880 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3881 while-loop as for-loop.
3882 (regsets_store_inferior_registers): Likewise.
3883
bdca27a2
YQ
38842014-11-28 Yao Qi <yao@codesourcery.com>
3885
3886 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3887 * config.in, configure: Re-generate.
3888 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3889 is defined.
3890
9c232dda
YQ
38912014-11-21 Yao Qi <yao@codesourcery.com>
3892
3893 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3894 (AC_CHECK_HEADERS): Remove malloc.h.
3895 * configure: Re-generated.
3896 * config.in: Re-generated.
3897 * server.h: Don't include alloca.h and malloc.h.
3898 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3899 Don't include malloc.h.
3900
43968415
JB
39012014-11-17 Joel Brobecker <brobecker@adacore.com>
3902
3903 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3904 corresponding ERRNO check in same block.
3905
40e91bc7
PA
39062014-11-12 Pedro Alves <palves@redhat.com>
3907
3908 * server.c (cont_thread): Update comment.
3909 (start_inferior, attach_inferior): No longer clear cont_thread.
3910 (handle_v_cont): No longer set cont_thread.
3911 (captured_main): Clear cont_thread each time a GDB connects.
3912
c2c118cf
PA
39132014-11-12 Pedro Alves <palves@redhat.com>
3914
3915 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3916 thread, and don't resume all threads if the Hc thread has exited.
3917
78708b7c
PA
39182014-11-12 Pedro Alves <palves@redhat.com>
3919
3920 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3921 the process group instead of to a specific LWP.
3922
a2abc7de
PA
39232014-10-15 Pedro Alves <palves@redhat.com>
3924
3925 PR server/17487
3926 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3927 parameter.
3928 (arm_set_thread_context): Delete.
3929 (the_low_target): Adjust.
3930 * win32-i386-low.c (debug_registers_changed)
3931 (debug_registers_used): Delete.
3932 (update_debug_registers_callback): New function.
3933 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3934 needing to update their debug registers.
3935 (win32_get_current_dr): New function.
3936 (x86_dr_low_get_addr, x86_dr_low_get_control)
3937 (x86_dr_low_get_status): Fetch the debug register from the thread
3938 record's context.
3939 (i386_initial_stuff): Adjust.
3940 (i386_get_thread_context): Remove current_event parameter. Don't
3941 clear debug_registers_changed nor copy DR values to
3942 debug_reg_state.
3943 (i386_set_thread_context): Delete.
3944 (i386_prepare_to_resume): New function.
3945 (i386_thread_added): Mark the thread as needing to update irs
3946 debug registers.
3947 (the_low_target): Remove i386_set_thread_context and install
3948 i386_prepare_to_resume.
3949 * win32-low.c (win32_get_thread_context): Adjust.
3950 (win32_set_thread_context): Use SetThreadContext
3951 directly.
3952 (win32_prepare_to_resume): New function.
3953 (win32_require_context): New function, factored out from ...
3954 (thread_rec): ... this.
3955 (continue_one_thread): Call win32_prepare_to_resume on each thread
3956 we're about to continue.
3957 (win32_resume): Call win32_prepare_to_resume on the event thread.
3958 * win32-low.h (struct win32_thread_info)
3959 <debug_registers_changed>: New field.
3960 (struct win32_target_ops): Change prototype of set_thread_context,
3961 delete set_thread_context and add prepare_to_resume.
3962 (win32_require_context): New declaration.
3963
a442d071
GB
39642014-10-08 Gary Benson <gbenson@redhat.com>
3965
3966 * server.h: Do not include common-exceptions.h.
3967
6f1947e8
GB
39682014-10-08 Gary Benson <gbenson@redhat.com>
3969
3970 * server.h: Do not include cleanups.h.
3971
63b434a4
JH
39722014-09-30 James Hogan <james.hogan@imgtec.com>
3973
3974 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3975 mips64-dsp-linux.c.
3976
c4d9ceb6
YQ
39772014-09-23 Yao Qi <yao@codesourcery.com>
3978
3979 * linux-low.c (lp_status_maybe_breakpoint): New function.
3980 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3981 (count_events_callback): Likewise.
3982 (select_event_lwp_callback): Likewise.
3983 (cancel_breakpoints_callback): Likewise.
3984
89a5711c
DB
39852014-09-19 Don Breazeal <donb@codesourcery.com>
3986
3987 * linux-low.c (handle_extended_wait): Call
3988 linux_ptrace_get_extended_event.
3989 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3990 linux_is_extended_waitstatus.
3991
bffc0964
JB
39922014-09-16 Joel Brobecker <brobecker@adacore.com>
3993
3994 * Makefile.in (CPPFLAGS): Define.
3995 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3996 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3997
0bfdf32f
GB
39982014-09-16 Gary Benson <gbenson@redhat.com>
3999
4000 * inferiors.h (current_inferior): Renamed as...
4001 (current_thread): New variable. All uses updated.
4002 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4003 (maybe_move_out_of_jump_pad): Likewise.
4004 (cancel_breakpoint): Likewise.
4005 (linux_low_filter_event): Likewise.
4006 (wait_for_sigstop): Likewise.
4007 (linux_resume_one_lwp): Likewise.
4008 (need_step_over_p): Likewise.
4009 (start_step_over): Likewise.
4010 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4011 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4012 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4013 and save_inferior as saved_thread.
4014 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4015 saved_thread.
4016 (regcache_invalidate_thread): Likewise.
4017 * remote-utils.c (prepare_resume_reply): Likewise.
4018 * thread-db.c (thread_db_get_tls_address): Likewise.
4019 (disable_thread_event_reporting): Likewise.
4020 (remove_thread_event_breakpoints): Likewise.
4021 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4022 as saved_thread.
4023 * target.h (set_desired_inferior): Renamed as...
4024 (set_desired_thread): New declaration. All uses updated.
4025 * server.c (myresume): Updated comment to reference thread instead
4026 of inferior.
4027 (handle_serial_event): Likewise.
4028 (handle_target_event): Likewise.
4029
361c8ade
GB
40302014-09-12 Tom Tromey <tromey@redhat.com>
4031 Gary Benson <gbenson@redhat.com>
4032
4033 * regcache.h: Include common-regcache.h.
4034 (regcache_read_pc): Don't declare.
4035 * regcache.c (get_thread_regcache_for_ptid): New function.
4036
bd9269f7
GB
40372014-09-11 Tom Tromey <tromey@redhat.com>
4038 Gary Benson <gbenson@redhat.com>
4039
4040 * symbol.c: New file.
4041 * Makefile.in (SFILES): Add symbol.c.
4042 (OBS): Add symbol.o.
4043
f8c1d06b
GB
40442014-09-11 Gary Benson <gbenson@redhat.com>
4045
4046 * target.c (target_stop_ptid, target_continue_ptid): New
4047 functions.
4048
721ec300
GB
40492014-09-11 Tom Tromey <tromey@redhat.com>
4050 Gary Benson <gbenson@redhat.com>
4051
4052 * target.h: Include target/target.h.
4053 * target.c (target_read_memory, target_read_uint32)
4054 (target_write_memory): New functions.
4055
c5e92cca
GB
40562014-09-11 Gary Benson <gbenson@redhat.com>
4057
4058 * server.h (debug_hw_points): Don't declare.
4059 * server.c (debug_hw_points): Don't define. Replace all uses
4060 with show_debug_regs.
4061 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4062 all uses with show_debug_regs.
4063
2e4bb98a
EBM
40642014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4065
4066 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4067 endianness into account.
4068 (ppc_supply_ptrace_register): Likewise.
4069
ac740bc7
JH
40702014-09-03 James Hogan <james.hogan@imgtec.com>
4071
4072 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4073 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4074
97ea6506
GB
40752014-09-03 Gary Benson <gbenson@redhat.com>
4076
4077 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4078 ALL_DEBUG_ADDRESS_REGISTERS.
4079
df7e5265
GB
40802014-09-02 Gary Benson <gbenson@redhat.com>
4081
4082 * i386-low.h: Renamed as...
4083 * x86-low.h: New file. All type, function and variable name
4084 prefixes changed from "i386_" to "x86_". All references updated.
4085 * i386-low.c: Renamed as...
4086 * x86-low.c: New file. All type, function and variable name
4087 prefixes changed from "i386_" to "x86_". All references updated.
4088
ed859da7
GB
40892014-09-02 Gary Benson <gbenson@redhat.com>
4090
4091 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4092 (x86_linux_new_thread): Likewise.
4093
860789c7
GB
40942014-08-29 Gary Benson <gbenson@redhat.com>
4095
4096 * server.h (setjmp.h): Do not include.
4097 (toplevel): Do not declare.
4098 (common-exceptions.h): Include.
4099 (cleanups.h): Likewise.
4100 * server.c (toplevel): Do not define.
4101 (exit_code): New static global.
4102 (detach_or_kill_for_exit_cleanup): New function.
4103 (main): New function. Original main renamed to...
4104 (captured_main): New function.
4105 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4106
ff55e1b5
GB
41072014-08-29 Gary Benson <gbenson@redhat.com>
4108
4109 * Makefile.in (SFILES): Add common/common-exceptions.c.
4110 (OBS): Add common-exceptions.o.
4111 (common-exceptions.o): New rule.
4112 * utils.c (prepare_to_throw_exception): New function.
4113
e9bcb658
GB
41142014-08-29 Gary Benson <gbenson@redhat.com>
4115
4116 * config.in: Regenerate.
4117 * configure: Likewise.
4118
e3180625
GB
41192014-08-29 Gary Benson <gbenson@redhat.com>
4120
4121 * Makefile.in (SFILES): Add common/cleanups.c.
4122 (OBS): cleanups.o.
4123 (cleanups.o): New rule.
4124
e3d6ba5d
GB
41252014-08-29 Gary Benson <gbenson@redhat.com>
4126
4127 * utils.c (internal_vwarning): New function.
4128
7096e886
GB
41292014-08-28 Gary Benson <gbenson@redhat.com>
4130
4131 * utils.h (fatal): Remove declaration.
4132 * utils.c (fatal): Remove function.
4133
14ce3192
GB
41342014-08-28 Gary Benson <gbenson@redhat.com>
4135
4136 * tracepoint.c (gdb_agent_init): Replace fatal with
4137 perror_with_name.
4138 (initialize_tracepoint): Likewise.
4139
50278d59
GB
41402014-08-28 Gary Benson <gbenson@redhat.com>
4141
4142 * remote-utils.c (remote_prepare): Replace fatal with error.
4143
aa96c426
GB
41442014-08-28 Gary Benson <gbenson@redhat.com>
4145
4146 * linux-low.c (linux_async): Replace fatal with warning.
4147 Tidy up and return.
4148 (linux_start_non_stop): Return -1 if linux_async failed.
4149
f7160e97
GB
41502014-08-28 Gary Benson <gbenson@redhat.com>
4151
4152 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4153 gdb_assert.
4154 (i386_dr_low_get_addr): Remove vague comment.
4155 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4156 gdb_assert.
4157
38e08fca
GB
41582014-08-28 Gary Benson <gbenson@redhat.com>
4159
4160 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4161 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4162 internal_error.
4163 (linux_resume_one_lwp): Likewise.
4164 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4165 gdb_assert.
4166 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4167 with internal_error.
4168 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4169 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4170 (find_register_by_name): Replace fatal with internal_error.
4171 (find_regno): Likewise.
4172 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4173 * thread-db.c (thread_db_create_event): Likewise.
4174 (thread_db_load_search): Likewise.
4175 (try_thread_db_load_1): Likewise.
4176 * tracepoint.c (get_jump_space_head): Replace fatal with
4177 internal_error.
4178 (claim_trampoline_space): Likewise.
4179 (have_fast_tracepoint_trampoline_buffer): Likewise.
4180 (cmd_qtstart): Likewise.
4181 (stop_tracing): Likewise.
4182 (fast_tracepoint_collecting): Likewise.
4183 (target_malloc): Likewise.
4184 (download_tracepoint): Likewise.
4185 (download_trace_state_variables): Replace check with gdb_assert.
4186 (upload_fast_traceframes): Replace fatal with internal_error.
4187
34abf635
GB
41882014-08-19 Tom Tromey <tromey@redhat.com>
4189 Gary Benson <gbenson@redhat.com>
4190
4191 * Makefile.in (SFILES): Add common/common-debug.c.
4192 (OBS): Add common-debug.o.
4193 (common-debug.o): New rule.
4194 * debug.h (debug_printf): Don't declare.
4195 * debug.c (debug_printf): Renamed and rewritten as...
4196 (debug_vprintf): New function.
4197
f6e94d78
GB
41982014-08-19 Gary Benson <gbenson@redhat.com>
4199
4200 * utils.h: Do not include print-utils.h.
4201
9239eeab
GB
42022014-08-19 Tom Tromey <tromey@redhat.com>
4203 Gary Benson <gbenson@redhat.com>
4204
4205 * server.h: Add static assertion.
4206 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4207
ef87c8bb
GB
42082014-08-19 Tom Tromey <tromey@redhat.com>
4209 Gary Benson <gbenson@redhat.com>
4210
4211 * Makefile.in (SFILES): Add common/errors.c.
4212 (OBS): Add errors.o.
4213 (IPA_OBS): Add errors-ipa.o.
4214 (errors.o): New rule.
4215 (errors-ipa.o): Likewise.
4216 * utils.h (perror_with_name, error, warning): Don't declare.
4217 * utils.c (warning): Renamed and rewritten as...
4218 (vwarning): New function.
4219 (error): Renamed and rewritten as...
4220 (verror): New function.
4221 (internal_error): Renamed and rewritten as...
4222 (internal_verror): New function.
4223
bb974a24
GB
42242014-08-07 Gary Benson <gbenson@redhat.com>
4225
4226 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4227 * configure: Regenerate.
4228 * config.in: Likewise.
4229 * server.h: Do not include errno.h.
4230 * event-loop.c: Likewise.
4231 * hostio-errno.c: Likewise.
4232 * linux-low.c: Likewise.
4233 * remote-utils.c: Likewise.
4234 * spu-low.c: Likewise.
4235 * utils.c: Likewise.
4236 * gdbreplay.c: Unconditionally include errno.h.
4237
6d3d12eb
GB
42382014-08-07 Gary Benson <gbenson@redhat.com>
4239
4240 * server.h: Do not include string.h.
4241 * event-loop.c: Likewise.
4242 * linux-low.c: Likewise.
4243 * regcache.c: Likewise.
4244 * remote-utils.c: Likewise.
4245 * spu-low.c: Likewise.
4246 * utils.c: Likewise.
4247
dccbb609
GB
42482014-08-07 Gary Benson <gbenson@redhat.com>
4249
4250 * server.h: Do not include gdb_assert.h.
4251
e76df0d0
GB
42522014-08-07 Gary Benson <gbenson@redhat.com>
4253
4254 * server.h: Do not include common-utils.h.
4255
4cb9c816
GB
42562014-08-07 Gary Benson <gbenson@redhat.com>
4257
4258 * server.h: Do not include ptid.h.
4259 * notif.h: Likewise.
4260
3995eeee
GB
42612014-08-07 Gary Benson <gbenson@redhat.com>
4262
4263 * server.h: Do not include gdb_locale.h.
4264
cb9f1a9b
GB
42652014-08-07 Gary Benson <gbenson@redhat.com>
4266
4267 * server.h: Do not include gdb/signals.h.
4268 * win32-low.c: Likewise.
4269
a5fceff8
GB
42702014-08-07 Gary Benson <gbenson@redhat.com>
4271
4272 * server.h: Do not include pathmax.h.
4273
b9391142
GB
42742014-08-07 Gary Benson <gbenson@redhat.com>
4275
4276 * server.h: Do not include libiberty.h.
4277 * linux-bfin-low.c: Likewise.
4278
0e443c87
GB
42792014-08-07 Gary Benson <gbenson@redhat.com>
4280
4281 * server.h: Do not include ansidecl.h.
4282
8ebb3f56
GB
42832014-08-07 Gary Benson <gbenson@redhat.com>
4284
4285 * linux-x86-low.c: Do not include stddef.h.
4286 * lynx-ppc-low.c: Likewise.
4287 * tracepoint.c: Likewise.
4288
8980bdf6
GB
42892014-08-07 Gary Benson <gbenson@redhat.com>
4290
4291 * server.h: Do not include stdarg.h.
4292 * nto-low.c: Likewise.
4293
d7096f71
GB
42942014-08-07 Gary Benson <gbenson@redhat.com>
4295
4296 * server.h: Do not include stdlib.h.
4297 * inferiors.c: Likewise.
4298 * linux-low.c: Likewise.
4299 * regcache.c: Likewise.
4300 * spu-low.c: Likewise.
4301 * tracepoint.c: Likewise.
4302 * utils.c: Likewise.
4303
d02f550d
GB
43042014-08-07 Gary Benson <gbenson@redhat.com>
4305
4306 * server.h: Do not include stdio.h.
4307 * linux-low.c: Likewise.
4308 * remote-utils.c: Likewise.
4309 * spu-low.c: Likewise.
4310 * utils.c: Likewise.
4311 * wincecompat.c: Likewise.
4312
87f6c4e3
GB
43132014-08-06 Gary Benson <gbenson@redhat.com>
4314
4315 * regcache.c (init_register_cache): Move conditionals inside if.
4316
7089dca4
GB
43172014-08-06 Gary Benson <gbenson@redhat.com>
4318
4319 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4320
462f517e
GB
43212014-07-31 Gary Benson <gbenson@redhat.com>
4322
4323 * ax.h: Do not include server.h.
4324 * gdbthread.h: Likewise.
4325 * lynx-low.h: Likewise.
4326 * notif.h: Likewise.
4327
976411d6
GB
43282014-07-30 Gary Benson <gbenson@redhat.com>
4329
4330 * server.h: Include common-defs.h.
4331 Do not include config.h or build-gnulib-gdbserver/config.h.
4332
d41f6d8e
GB
43332014-07-30 Gary Benson <gbenson@redhat.com>
4334
4335 * hostio-errno.c: Move server.h to top of includes list.
4336 * inferiors.c: Likewise.
4337 * linux-x86-low.c: Likewise.
4338 * notif.c: Include server.h.
4339
314c6a35
TT
43402014-07-24 Tom Tromey <tromey@redhat.com>
4341 Gary Benson <gbenson@redhat.com>
4342
4343 * server.h (CORE_ADDR): Now unsigned.
4344
69ff6be5
PA
43452014-07-16 Pedro Alves <palves@redhat.com>
4346
4347 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4348
ce9e3fe7
PA
43492014-07-15 Pedro Alves <palves@redhat.com>
4350
4351 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4352 copy.
4353
e76126e8
PA
43542014-07-11 Pedro Alves <palves@redhat.com>
4355
4356 * linux-low.c (kill_wait_lwp): New function, based on
4357 kill_one_lwp_callback, but use my_waitpid directly.
4358 (kill_one_lwp_callback, linux_kill): Use it.
4359
8e9db26e
PA
43602014-06-23 Pedro Alves <palves@redhat.com>
4361
4362 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4363 before setting DR0..DR3.
4364
698b3e08
GB
43652014-06-20 Gary Benson <gbenson@redhat.com>
4366
4367 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4368 * configure: Regenerated.
4369 * config.in: Likewise.
4370
125f8a3d
GB
43712014-06-20 Gary Benson <gbenson@redhat.com>
4372
4373 * Makefile.in (SFILES): Update locations for files moved
4374 from common to nat.
4375 (object file files): Reordered.
4376
42995dbd
GB
43772014-06-20 Gary Benson <gbenson@redhat.com>
4378
4379 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4380 (i386_dr_low_set_addr): Likewise.
4381 (i386_dr_low_get_addr): Likewise.
4382 (i386_dr_low_can_set_control): Likewise.
4383 (i386_dr_low_set_control): Likewise.
4384 (i386_dr_low_get_control): Likewise.
4385 (i386_dr_low_get_status): Likewise.
4386 (i386_get_debug_register_length): Likewise.
4387 * linux-x86-low.c (i386_dr_low_set_addr):
4388 Changed signature. Made static.
4389 (i386_dr_low_get_addr): Likewise.
4390 (i386_dr_low_set_control): Likewise.
4391 (i386_dr_low_get_control): Likewise.
4392 (i386_dr_low_get_status): Likewise.
4393 (i386_dr_low): New global variable.
4394 * win32-i386-low.c (i386_dr_low_set_addr):
4395 Changed signature. Made static.
4396 (i386_dr_low_get_addr): Likewise.
4397 (i386_dr_low_set_control): Likewise.
4398 (i386_dr_low_get_control): Likewise.
4399 (i386_dr_low_get_status): Likewise.
4400 (i386_dr_low): New global variable.
4401
e1d2394b
MS
44022014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4403
4404 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4405 * Makefile.in (AR, AR_FLAGS): Define.
4406 * configure: Regenerate.
4407
3a8ee006
GB
44082014-06-19 Gary Benson <gbenson@redhat.com>
4409
4410 * Makefile.in (i386-dregs.o): New rule.
4411 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4412 * i386-low.c (target.h): Remove include.
4413 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4414 (DR_CONTROL_SHIFT): Likewise.
4415 (DR_CONTROL_SIZE): Likewise.
4416 (DR_RW_EXECUTE): Likewise.
4417 (DR_RW_WRITE): Likewise.
4418 (DR_RW_READ): Likewise.
4419 (DR_RW_IORW): Likewise.
4420 (DR_LEN_1): Likewise.
4421 (DR_LEN_2): Likewise.
4422 (DR_LEN_4): Likewise.
4423 (DR_LEN_8): Likewise.
4424 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4425 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4426 (DR_ENABLE_SIZE): Likewise.
4427 (DR_LOCAL_SLOWDOWN): Likewise.
4428 (DR_GLOBAL_SLOWDOWN): Likewise.
4429 (DR_CONTROL_RESERVED): Likewise.
4430 (I386_DR_CONTROL_MASK): Likewise.
4431 (I386_DR_VACANT): Likewise.
4432 (I386_DR_LOCAL_ENABLE): Likewise.
4433 (I386_DR_GLOBAL_ENABLE): Likewise.
4434 (I386_DR_DISABLE): Likewise.
4435 (I386_DR_SET_RW_LEN): Likewise.
4436 (I386_DR_GET_RW_LEN): Likewise.
4437 (I386_DR_WATCH_HIT): Likewise.
4438 (i386_wp_op_t): Likewise.
4439 (i386_show_dr): Likewise.
4440 (i386_length_and_rw_bits): Likewise.
4441 (i386_insert_aligned_watchpoint): Likewise.
4442 (i386_remove_aligned_watchpoint): Likewise.
4443 (i386_handle_nonaligned_watchpoint): Likewise.
4444 i386_update_inferior_debug_regs(): Likewise.
4445 (i386_dr_insert_watchpoint): Likewise.
4446 (i386_dr_remove_watchpoint): Likewise.
4447 (i386_dr_region_ok_for_watchpoint): Likewise.
4448 (i386_dr_stopped_data_address): Likewise.
4449 (i386_dr_stopped_by_watchpoint): Likewise.
4450
8f26655c
GB
44512014-06-19 Gary Benson <gbenson@redhat.com>
4452
4453 * i386-low.c (i386_dr_show): Renamed to
4454 i386_show_dr and made static. All uses updated.
4455 (i386_dr_length_and_rw_bits): Renamed to
4456 i386_length_and_rw_bits and made static.
4457 All uses updated.
4458 (i386_dr_insert_aligned_watchpoint): Renamed to
4459 i386_insert_aligned_watchpoint and made static.
4460 All uses updated.
4461 (i386_dr_remove_aligned_watchpoint): Renamed to
4462 i386_remove_aligned_watchpoint and made static.
4463 All uses updated.
4464 (i386_dr_update_inferior_debug_regs): Renamed to
4465 i386_update_inferior_debug_regs and made static.
4466 All uses updated.
4467
b9228891
GB
44682014-06-18 Gary Benson <gbenson@redhat.com>
4469
5171def3
GB
4470 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4471 (i386_dr_low_can_set_control): Likewise.
4472 (i386_get_debug_register_length): Likewise.
4473 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4474 (i386_dr_low_can_set_control): Likewise.
4475 (i386_get_debug_register_length): Likewise.
4476
44772014-06-17 Gary Benson <gbenson@redhat.com>
4478
b9228891
GB
4479 * i386-low.h (i386-dregs.h): New include.
4480 (DR_FIRSTADDR): Now in i386-dregs.h.
4481 (DR_LASTADDR): Likewise.
4482 (DR_NADDR): Likewise.
4483 (DR_STATUS): Likewise.
4484 (DR_CONTROL): Likewise.
4485 (i386_debug_reg_state): Likewise.
4486 (i386_dr_insert_watchpoint): Likewise.
4487 (i386_dr_remove_watchpoint): Likewise.
4488 (i386_dr_region_ok_for_watchpoint): Likewise.
4489 (i386_dr_stopped_data_address): Likewise.
4490 (i386_dr_stopped_by_watchpoint): Likewise.
4491 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4492
4be83cc2
GB
44932014-06-18 Gary Benson <gbenson@redhat.com>
4494
4495 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4496 i386_dr_insert_watchpoint.
4497 (i386_low_remove_watchpoint): Renamed to
4498 i386_dr_remove_watchpoint.
4499 (i386_low_region_ok_for_watchpoint): Renamed to
4500 i386_dr_region_ok_for_watchpoint.
4501 (i386_low_stopped_data_address): Renamed to
4502 i386_dr_stopped_data_address.
4503 (i386_low_stopped_by_watchpoint): Renamed to
4504 i386_dr_stopped_by_watchpoint.
4505 * i386-low.c (i386_show_dr): Renamed to
4506 i386_dr_show and made nonstatic. All uses updated.
4507 (i386_length_and_rw_bits): Renamed to
4508 i386_dr_length_and_rw_bits and made nonstatic.
4509 All uses updated.
4510 (i386_insert_aligned_watchpoint): Renamed to
4511 i386_dr_insert_aligned_watchpoint and made nonstatic.
4512 All uses updated.
4513 (i386_remove_aligned_watchpoint): Renamed to
4514 i386_dr_remove_aligned_watchpoint and made nonstatic.
4515 All uses updated.
4516 (i386_update_inferior_debug_regs): Renamed to
4517 i386_dr_update_inferior_debug_regs and made nonstatic.
4518 All uses updated.
4519 (i386_low_insert_watchpoint): Renamed to
4520 i386_dr_insert_watchpoint. All uses updated.
4521 (i386_low_remove_watchpoint): Renamed to
4522 i386_dr_remove_watchpoint. All uses updated.
4523 (i386_low_region_ok_for_watchpoint): Renamed to
4524 i386_dr_region_ok_for_watchpoint. All uses updated.
4525 (i386_low_stopped_data_address): Renamed to
4526 i386_dr_stopped_data_address. All uses updated.
4527 (i386_low_stopped_by_watchpoint): Renamed to
4528 i386_dr_stopped_by_watchpoint. All uses updated.
4529
131aa0d4
GB
45302014-06-18 Gary Benson <gbenson@redhat.com>
4531
4532 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4533 (i386_dr_low_can_set_control): Likewise.
4534 (i386_insert_aligned_watchpoint): New check.
4535
d9305f7f
GB
45362014-06-18 Gary Benson <gbenson@redhat.com>
4537
4538 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4539 Renamed to state.
4540
e927c9fc
GB
45412014-06-18 Gary Benson <gbenson@redhat.com>
4542
4543 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4544 instead of fatal and error.
4545 (i386_handle_nonaligned_watchpoint): Likewise.
4546
1b6d4134
GB
45472014-06-18 Gary Benson <gbenson@redhat.com>
4548
4549 * i386-low.c (i386_get_debug_register_length): New macro.
4550 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4551 (i386_show_dr): Use debug_printf instead of fprintf. Use
4552 phex to format values.
4553
6e62758f
GB
45542014-06-18 Gary Benson <gbenson@redhat.com>
4555
4556 * i386-low.h: Comment changes.
4557 * i386-low.c: Likewise.
4558
fc6e2f03
GB
45592014-06-18 Gary Benson <gbenson@redhat.com>
4560
4561 * i386-low.c: Whitespace changes.
4562
f9d1eeed
TT
45632014-06-12 Tom Tromey <tromey@redhat.com>
4564
4565 * utils.c (freeargv): Remove.
4566
0b04e523
TT
45672014-06-12 Tom Tromey <tromey@redhat.com>
4568
4569 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4570 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4571 (parse_debug_format_options): Likewise.
4572 (gdbserver_usage): Likewise.
4573 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4574 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4575 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4576 against libiberty.
4577 ($(LIBGNU)): Depend on libiberty.
4578 (all-lib): Recurse into all subdirs.
4579 (install-only): Invoke "install" target in subdirs.
4580 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4581 targets.
4582 * configure: Rebuild.
4583 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4584 for vasprintf, vsnprintf, or gettimeofday.
4585 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4586 srv_tgtobj.
4587
270c9937
JB
45882014-06-05 Joel Brobecker <brobecker@adacore.com>
4589
4590 * development.sh: Delete.
4591 * Makefile.in (config.status): Adjust dependency on development.sh.
4592 * configure.ac: Adjust development.sh source call.
4593 * configure: Regenerate.
4594
0a261ed8
PA
45952014-06-02 Pedro Alves <palves@redhat.com>
4596
4597 * ax.c (gdb_free_agent_expr): New function.
4598 * ax.h (gdb_free_agent_expr): New declaration.
4599 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4600 list.
4601 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4602 static.
4603 (clear_breakpoint_conditions_and_commands): New function.
4604 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4605 (clear_breakpoint_conditions_and_commands): New declaration.
4606
e9dae05e
RR
46072014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4608
4609 * linux-aarch64-low.c (asm/ptrace.h): Include.
4610
5876f503
JK
46112014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4612
4613 Fix TLS access for -static -pthread.
4614 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4615 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4616 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4617
802e8e6d
PA
46182014-05-20 Pedro Alves <palves@redhat.com>
4619
4620 * linux-aarch64-low.c (aarch64_insert_point)
4621 (aarch64_remove_point): No longer check whether the type is
4622 supported here. Adjust to new interface.
4623 (the_low_target): Install aarch64_supports_z_point_type as
4624 supports_z_point_type method.
4625 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4626 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4627 instead of a Z packet char. Adjust.
4628 (arm_supports_z_point_type): New function.
4629 (arm_insert_point, arm_remove_point): Adjust to new interface.
4630 (the_low_target): Install arm_supports_z_point_type.
4631 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4632 (cris_insert_point, cris_remove_point): Adjust to new interface.
4633 Don't check whether the type is supported here.
4634 (the_low_target): Install cris_supports_z_point_type.
4635 * linux-low.c (linux_supports_z_point_type): New function.
4636 (linux_insert_point, linux_remove_point): Adjust to new interface.
4637 * linux-low.h (struct linux_target_ops) <insert_point,
4638 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4639 raw_breakpoint pointer parameter.
4640 <supports_z_point_type>: New method.
4641 * linux-mips-low.c (mips_supports_z_point_type): New function.
4642 (mips_insert_point, mips_remove_point): Adjust to new interface.
4643 Use mips_supports_z_point_type.
4644 (the_low_target): Install mips_supports_z_point_type.
4645 * linux-ppc-low.c (the_low_target): Install NULL as
4646 supports_z_point_type method.
4647 * linux-s390-low.c (the_low_target): Install NULL as
4648 supports_z_point_type method.
4649 * linux-sparc-low.c (the_low_target): Install NULL as
4650 supports_z_point_type method.
4651 * linux-x86-low.c (x86_supports_z_point_type): New function.
4652 (x86_insert_point): Adjust to new insert_point interface. Use
4653 insert_memory_breakpoint. Adjust to new
4654 i386_low_insert_watchpoint interface.
4655 (x86_remove_point): Adjust to remove_point interface. Use
4656 remove_memory_breakpoint. Adjust to new
4657 i386_low_remove_watchpoint interface.
4658 (the_low_target): Install x86_supports_z_point_type.
4659 * lynx-low.c (lynx_target_ops): Install NULL as
4660 supports_z_point_type callback.
4661 * nto-low.c (nto_supports_z_point_type): New.
4662 (nto_insert_point, nto_remove_point): Adjust to new interface.
4663 (nto_target_ops): Install nto_supports_z_point_type.
4664 * mem-break.c: Adjust intro comment.
4665 (struct raw_breakpoint) <raw_type, size>: New fields.
4666 <inserted>: Update comment.
4667 <shlib_disabled>: Delete field.
4668 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4669 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4670 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4671 (raw_bkpt_type_to_target_hw_bp_type): New function.
4672 (find_enabled_raw_code_breakpoint_at): New function.
4673 (find_raw_breakpoint_at): New type and size parameters. Use them.
4674 (insert_memory_breakpoint): New function, based off
4675 set_raw_breakpoint_at.
4676 (remove_memory_breakpoint): New function.
4677 (set_raw_breakpoint_at): Reimplement.
4678 (set_breakpoint): New, based on set_breakpoint_at.
4679 (set_breakpoint_at): Reimplement.
4680 (delete_raw_breakpoint): Go through the_target->remove_point
4681 instead of assuming memory breakpoints.
4682 (find_gdb_breakpoint_at): Delete.
4683 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4684 (find_gdb_breakpoint): New function.
4685 (set_gdb_breakpoint_at): Delete.
4686 (z_type_supported): New function.
4687 (set_gdb_breakpoint_1): New function, loosely based off
4688 set_gdb_breakpoint_at.
4689 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4690 (delete_gdb_breakpoint_at): Delete.
4691 (delete_gdb_breakpoint_1): New function, loosely based off
4692 delete_gdb_breakpoint_at.
4693 (delete_gdb_breakpoint): New function.
4694 (clear_gdb_breakpoint_conditions): Rename to ...
4695 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4696 breakpoint.
4697 (add_condition_to_breakpoint): Make static.
4698 (add_breakpoint_condition): Take a struct breakpoint pointer
4699 instead of an address. Adjust.
4700 (gdb_condition_true_at_breakpoint): Rename to ...
4701 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4702 z_type parameter.
4703 (gdb_condition_true_at_breakpoint): Reimplement.
4704 (add_breakpoint_commands): Take a struct breakpoint pointer
4705 instead of an address. Adjust.
4706 (gdb_no_commands_at_breakpoint): Rename to ...
4707 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4708 parameter. Return true if no breakpoint was found. Change debug
4709 output.
4710 (gdb_no_commands_at_breakpoint): Reimplement.
4711 (run_breakpoint_commands): Rename to ...
4712 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4713 and change return type to boolean.
4714 (run_breakpoint_commands): New function.
4715 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4716 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4717 breakpoint. Go through the_target->remove_point instead of
4718 assuming memory breakpoint.
4719 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4720 software and hardware breakpoints.
4721 (reinsert_raw_breakpoint): Go through the_target->insert_point
4722 instead of assuming memory breakpoint.
4723 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4724 software and hardware breakpoints.
4725 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4726 Check both software and hardware breakpoints.
4727 (validate_inserted_breakpoint): Assert the breakpoint is a
4728 software breakpoint. Set the inserted flag to -1 instead of
4729 setting shlib_disabled.
4730 (delete_disabled_breakpoints): Adjust.
4731 (validate_breakpoints): Only validate software breakpoints.
4732 Adjust to inserted flag change.
4733 (check_mem_read, check_mem_write): Skip breakpoint types other
4734 than software breakpoints. Adjust to inserted flag change.
4735 * mem-break.h (enum raw_bkpt_type): New enum.
4736 (raw_breakpoint, struct process_info): Forward declare.
4737 (Z_packet_to_target_hw_bp_type): Delete declaration.
4738 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4739 (set_gdb_breakpoint, delete_gdb_breakpoint)
4740 (clear_breakpoint_conditions): New declarations.
4741 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4742 (breakpoint_inserted_here): Update comment.
4743 (add_breakpoint_condition, add_breakpoint_commands): Replace
4744 address parameter with a breakpoint pointer parameter.
4745 (gdb_breakpoint_here): Update comment.
4746 (delete_gdb_breakpoint_at): Delete.
4747 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4748 * server.c (process_point_options): Take a struct breakpoint
4749 pointer instead of an address. Adjust.
4750 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4751 delete_gdb_breakpoint.
4752 * spu-low.c (spu_target_ops): Install NULL as
4753 supports_z_point_type method.
4754 * target.h: Include mem-break.h.
4755 (struct target_ops) <prepare_to_access_memory>: Update comment.
4756 <supports_z_point_type>: New field.
4757 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4758 instead of a char. Also take a raw breakpoint pointer.
4759 * win32-arm-low.c (the_low_target): Install NULL as
4760 supports_z_point_type.
4761 * win32-i386-low.c (i386_supports_z_point_type): New function.
4762 (i386_insert_point, i386_remove_point): Adjust to new interface.
4763 (the_low_target): Install i386_supports_z_point_type.
4764 * win32-low.c (win32_supports_z_point_type): New function.
4765 (win32_insert_point, win32_remove_point): Adjust to new interface.
4766 (win32_target_ops): Install win32_supports_z_point_type.
4767 * win32-low.h (struct win32_target_ops):
4768 <supports_z_point_type>: New method.
4769 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4770 instead of a char. Also take a raw breakpoint pointer.
4771
932539e3
PA
47722014-05-20 Pedro Alves <palves@redhat.com>
4773
4774 * mem-break.h: Include break-common.h.
4775 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4776 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4777 (Z_packet_to_target_hw_bp_type): New declaration.
4778 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4779 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4780 (Z_PACKET_ACCESS_WP): Delete macros.
4781 (Z_packet_to_hw_type): Delete function.
4782 * i386-low.h: Don't include break-common.h here.
4783 (Z_packet_to_hw_type): Delete declaration.
4784 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4785 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4786 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4787 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4788 * linux-aarch64-low.c: Don't include break-common.h here.
4789 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4790 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4791 (Z_packet_to_target_hw_bp_type): Delete function.
4792 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4793 function.
4794 (mips_insert_point, mips_remove_point): Use
4795 Z_packet_to_target_hw_bp_type.
4796
4ff0d3d8
PA
47972014-05-20 Pedro Alves <palves@redhat.com>
4798
4799 * linux-aarch64-low.c: Include break-common.h.
4800 (enum target_point_type): Delete.
4801 (Z_packet_to_point_type): Rename to ...
4802 (Z_packet_to_target_hw_bp_type): ... this, and return a
4803 target_hw_bp_type instead.
4804 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4805 instead of an enum target_point_type.
4806 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4807 breakpoint type.
4808 (aarch64_dr_state_insert_one_point)
4809 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4810 (aarch64_handle_aligned_watchpoint)
4811 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4812 Take an enum target_hw_bp_type instead of an enum
4813 target_point_type.
4814 (aarch64_supports_z_point_type): New function.
4815 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4816 use Z_packet_to_target_hw_bp_type.
4817
786dc519
JB
48182014-05-20 Joel Brobecker <brobecker@adacore.com>
4819
4820 * configure.ac: Only use -Werror by default when DEVELOPMENT
4821 is true.
4822 * configure: Regenerate.
4823
9e0aa64f
JK
48242014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4825
4826 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4827 * linux-x86-low.c (X86_64_USER_REGS): New.
4828 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4829
2b577b92
YQ
48302014-04-28 Yao Qi <yao@codesourcery.com>
4831
4832 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4833 name.
4834
94611da2
PA
48352014-04-25 Pedro Alves <palves@redhat.com>
4836
4837 PR server/16255
4838 * linux-low.c (linux_attach_fail_reason_string): New function.
4839 (linux_attach_lwp): Delete.
4840 (linux_attach_lwp_1): Rename to ...
4841 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4842 argument. Remove "initial" parameter. Return int instead of
4843 void. Don't error or warn here.
4844 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4845 failure to attach to the tgid. Call warning when failing to
4846 attach to an lwp.
4847 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4848 argument. Remove "initial" parameter. Return int instead of
4849 void. Don't error or warn here.
4850 (linux_attach_fail_reason_string): New declaration.
4851 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4852 interface change. Use linux_attach_fail_reason_string.
4853
01f9f808
MS
48542014-04-24 Michael Sturm <michael.sturm@mintel.com>
4855 Walfred Tedeschi <walfred.tedeschi@intel.com>
4856
4857 * Makefile.in: Added rules to handle new files
4858 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4859 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4860 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4861 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4862 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4863 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4864 x32-avx512-linux.o.
4865 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4866 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4867 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4868 i386/x32-avx512.xml.
4869 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4870 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4871 i386/x32-avx512-linux.xml.
4872 * i387-fp.c (num_avx512_k_registers): New constant for number
4873 of K registers.
4874 (num_avx512_zmmh_low_registers): New constant for number of
4875 lower ZMM registers (0-15).
4876 (num_avx512_zmmh_high_registers): New constant for number of
4877 higher ZMM registers (16-31).
4878 (num_avx512_ymmh_registers): New contant for number of higher
4879 YMM registers (ymm16-31 added by avx521 on x86_64).
4880 (num_avx512_xmm_registers): New constant for number of higher
4881 XMM registers (xmm16-31 added by AVX512 on x86_64).
4882 (struct i387_xsave): Add space for AVX512 registers.
4883 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4884 Add code to handle AVX512 registers.
4885 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4886 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4887 prototypei from generated file.
4888 (tdesc_amd64_avx512_linux): Likewise.
4889 (init_registers_x32_avx512_linux): Likewise.
4890 (tdesc_x32_avx512_linux): Likewise.
4891 (init_registers_i386_avx512_linux): Likewise.
4892 (tdesc_i386_avx512_linux): Likewise.
4893 (x86_64_regmap): Add AVX512 registers.
4894 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4895 mask.
4896 (initialize_low_arch): Add code to initialize AVX512 registers.
4897
51aa91f9
PA
48982014-04-23 Pedro Alves <palves@redhat.com>
4899
4900 * mem-break.c (find_gdb_breakpoint_at): Make static.
4901 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4902
a4165e94
PA
49032014-04-23 Pedro Alves <palves@redhat.com>
4904
4905 * i386-low.c: Don't include break-common.h here.
4906 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4907 prototype to take target_hw_bp_type as argument instead of a Z
4908 packet char.
4909 * i386-low.h: Include break-common.h here.
4910 (Z_packet_to_hw_type): Declare.
4911 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4912 prototypes.
4913 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4914 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4915 (x86_remove_point): Convert the packet number to a
4916 target_hw_bp_type before calling i386_low_remove_watchpoint.
4917 * win32-i386-low.c (i386_insert_point): Convert the packet number
4918 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4919 (i386_remove_point): Convert the packet number to a
4920 target_hw_bp_type before calling i386_low_remove_watchpoint.
4921
b8acf843
PA
49222014-04-23 Pedro Alves <palves@redhat.com>
4923
4924 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4925
d708bcd1
PA
49262014-04-10 Pedro Alves <palves@redhat.com>
4927
4928 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4929 Check if the condition or command is NULL before checking if the
4930 breakpoint is known. On success, return true.
4931 * mem-break.h (add_breakpoint_condition): Document return.
4932 (add_breakpoint_commands): Add describing comment.
4933 * server.c (skip_to_semicolon): New function.
4934 (process_point_options): Use it.
4935
2eec7d5b
PA
49362014-04-09 Pedro Alves <palves@redhat.com>
4937
4938 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4939 to lwpid_of.
4940
fa96cb38
PA
49412014-02-27 Pedro Alves <palves@redhat.com>
4942
4943 PR 12702
4944 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4945 macros.
4946 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4947 output.
4948 (last_thread_of_process_p): Take a PID argument instead of a
4949 thread pointer.
4950 (linux_wait_for_lwp): Delete.
4951 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4952 functions.
4953 (linux_low_filter_event): New function, party factored out from
4954 linux_wait_for_event.
4955 (linux_wait_for_event): Rename to ...
4956 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4957 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4958 sigsuspend. Check for zombie leaders.
4959 (linux_wait_for_event): Reimplement as wrapper around
4960 linux_wait_for_event_filtered.
4961 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4962 a normal or signal exit is seen, it's the whole process exiting.
4963 (wait_for_sigstop): No longer a for_each_inferior callback.
4964 Rewrite on top of linux_wait_for_event_filtered.
4965 (stop_all_lwps): Call wait_for_sigstop directly.
4966 * server.c (resume, handle_target_event): Handle
4967 TARGET_WAITKIND_NO_RESUMED.
4968
d763de10
JB
49692014-02-26 Joel Brobecker <brobecker@adacore.com>
4970
4971 * win32-low.c (psapi_get_dll_name,
4972 * win32_CreateToolhelp32Snapshot): Delete.
4973 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4974 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4975 Delete.
4976 (handle_load_dll): Add function description.
4977 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4978
850a0f76
JB
49792014-02-26 Joel Brobecker <brobecker@adacore.com>
4980
4981 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4982 Add comment.
4983 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4984 base address when calling win32_add_one_solib.
4985 (handle_load_dll): Delete local variable load_addr.
4986 Remove 0x1000 offset applied to DLL base address when calling
4987 win32_add_one_solib.
4988 (handle_unload_dll): Add comment.
4989
f25b3fc3
JB
49902014-02-26 Joel Brobecker <brobecker@adacore.com>
4991
4992 * win32-low.c (win32_add_all_dlls): Renames
4993 win32_ensure_ntdll_loaded. Rewrite function documentation.
4994 Adjust implementation to always load all DLLs.
4995 Add 0x1000 offset to DLL base address when calling
4996 win32_add_one_solib.
4997 (child_initialization_done): New static global.
4998 (do_initial_child_stuff): Set child_initialization_done to
4999 zero during child initialization, and 1 after. Replace call
5000 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5001 Add comment.
5002 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5003 (handle_unload_dll): Add function documentation.
5004 (get_child_debug_event): Ignore load and unload DLL events
5005 during child initialization.
5006
d86d4aaf
DE
50072014-02-20 Doug Evans <dje@google.com>
5008
3bc32da3 5009 Remove global all_lwps.
d86d4aaf
DE
5010 * inferiors.h (ptid_of): Move here from linux-low.h.
5011 (pid_of, lwpid_of): Ditto.
5012 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5013 parameter is a struct thread_info * now.
5014 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5015 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5016 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5017 directly.
5018 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5019 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5020 * linux-arm-low.c (update_registers_callback): Update, "entry"
5021 parameter is a struct thread_info * now.
5022 Fetch lwpid from current_inferior directly.
5023 (arm_insert_point): Pass &all_threads to find_inferior instead of
5024 &all_lwps.
5025 (arm_remove_point): Ditto.
5026 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5027 (arm_prepare_to_resume): Fetch pid from thread.
5028 (arm_read_description): Fetch lwpid from current_inferior directly.
5029 * linux-low.c (all_lwps): Delete.
5030 (delete_lwp): Delete call to remove_inferior.
5031 (handle_extended_wait): Fetch lwpid from thread.
5032 (add_lwp): Don't set lwp->entry.id. Remove call to
5033 add_inferior_to_list.
5034 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5035 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5036 (kill_one_lwp_callback): Ditto.
5037 (linux_kill): Don't dereference NULL pointer.
5038 Fetch ptid,lwpid from thread.
5039 (get_detach_signal): Fetch ptid from thread.
5040 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5041 Simplify call to regcache_invalidate_thread.
5042 (delete_lwp_callback): Update, "entry" parameter is a
5043 struct thread_info * now. Fetch pid from thread.
5044 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5045 (status_pending_p_callback): Update, "entry" parameter is a
5046 struct thread_info * now. Fetch ptid from thread.
5047 (find_lwp_pid): Update, "entry" parameter is a
5048 struct thread_info * now.
5049 (linux_wait_for_lwp): Fetch pid from thread.
5050 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5051 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5052 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5053 (dequeue_one_deferred_signal): Ditto.
5054 (cancel_breakpoint): Fetch ptid from current_inferior.
5055 (linux_wait_for_event): Pass &all_threads to find_inferior,
5056 not &all_lwps. Fetch ptid, lwpid from thread.
5057 (count_events_callback): Update, "entry" parameter is a
5058 struct thread_info * now.
5059 (select_singlestep_lwp_callback): Ditto.
5060 (select_event_lwp_callback): Ditto.
5061 (cancel_breakpoints_callback): Ditto.
5062 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5063 not &all_lwps.
5064 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5065 (unsuspend_one_lwp): Update, "entry" parameter is a
5066 struct thread_info * now.
5067 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5068 not &all_lwps.
5069 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5070 Fetch lwpid from thread, not lwp.
5071 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5072 Pass &all_threads to find_inferior, not &all_lwps.
5073 (send_sigstop): Fetch lwpid from thread, not lwp.
5074 (send_sigstop_callback): Update, "entry" parameter is a
5075 struct thread_info * now.
5076 (suspend_and_send_sigstop_callback): Ditto.
5077 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5078 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5079 struct thread_info * now.
5080 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5081 from thread, lwp.
5082 (lwp_running): Update, "entry" parameter is a
5083 struct thread_info * now.
5084 (stop_all_lwps): Fetch ptid from thread.
5085 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5086 (linux_resume_one_lwp): Fetch lwpid from thread.
5087 (linux_set_resume_request): Update, "entry" parameter is a
5088 struct thread_info * now. Fetch pid, lwpid from thread.
5089 (resume_status_pending_p): Update, "entry" parameter is a
5090 struct thread_info * now.
5091 (need_step_over_p): Ditto. Fetch lwpid from thread.
5092 (start_step_over): Fetch lwpid from thread.
5093 (linux_resume_one_thread): Update, "entry" parameter is a
5094 struct thread_info * now. Fetch lwpid from thread.
5095 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5096 (proceed_one_lwp): Update, "entry" parameter is a
5097 struct thread_info * now. Fetch lwpid from thread.
5098 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5099 struct thread_info * now.
5100 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5101 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5102 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5103 directly.
5104 (regsets_store_inferior_registers): Ditto.
5105 (fetch_register, store_register): Ditto.
5106 (linux_read_memory, linux_write_memory): Ditto.
5107 (linux_request_interrupt): Ditto.
5108 (linux_read_auxv): Ditto.
5109 (linux_xfer_siginfo): Ditto.
5110 (linux_qxfer_spu): Ditto.
5111 (linux_qxfer_libraries_svr4): Ditto.
5112 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5113 moved to inferiors.h.
5114 (get_lwp): Delete.
5115 (get_thread_lwp): Update.
5116 (struct lwp_info): Delete member "entry". Simplify comment for
5117 member "thread".
5118 (all_lwps): Delete.
5119 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5120 current_inferior directly.
5121 (update_watch_registers_callback): Update, "entry" parameter is a
5122 struct thread_info * now. Fetch pid from thread.
5123 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5124 (mips_insert_point): Fetch lwpid from current_inferior.
5125 Pass &all_threads to find_inferior, not &all_lwps.
5126 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5127 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5128 directly.
5129 (mips_stopped_data_address): Ditto.
5130 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5131 directly.
5132 * linux-tile-low.c (tile_arch_setup): Ditto.
5133 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5134 (update_debug_registers_callback): Update, "entry" parameter is a
5135 struct thread_info * now. Fetch pid from thread.
5136 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5137 Pass &all_threads to find_inferior, not &all_lwps.
5138 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5139 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5140 Pass &all_threads to find_inferior, not &all_lwps.
5141 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5142 (i386_dr_low_get_status): Ditto.
5143 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5144 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5145 (x86_linux_read_description): Ditto.
5146 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5147
3b8361aa
DE
51482014-02-20 Doug Evans <dje@google.com>
5149
5150 * inferiors.c (get_first_inferior): Fix buglet.
5151
f7667f0d
DE
51522014-02-19 Doug Evans <dje@google.com>
5153
5154 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5155 * inferiors.c (add_thread): Change result type to struct thread_info *.
5156 All callers updated.
5157 (add_lwp): Call add_thread here instead of in callers.
5158 All callers updated.
5159 * linux-low.h (get_lwp_thread): Rewrite.
5160 (struct lwp_info): New member "thread".
5161
b3312d80
DE
51622014-02-19 Doug Evans <dje@google.com>
5163
5164 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5165 All callers updated.
5166
ecc6f45c
DE
51672014-02-19 Doug Evans <dje@google.com>
5168
5169 * inferiors.c (add_thread): Fix whitespace.
5170
649ebbca
DE
51712014-02-19 Doug Evans <dje@google.com>
5172
5173 * dll.c (clear_dlls): Replace accessing list implemention details
5174 with API function.
5175 * gdbthread.h (get_first_thread): Declare.
5176 * inferiors.c (for_each_inferior_with_data): New function.
5177 (get_first_thread): New function.
5178 (find_thread_ptid): Simplify.
5179 (get_first_inferior): New function.
5180 (clear_list): Delete.
5181 (one_inferior_p): New function.
5182 (clear_inferior_list): New function.
5183 (clear_inferiors): Update.
5184 * inferiors.h (for_each_inferior_with_data): Declare.
5185 (clear_inferior_list): Declare.
5186 (one_inferior_p): Declare.
5187 (get_first_inferior): Declare.
5188 * linux-low.c (linux_wait_for_event): Replace accessing list
5189 implemention details with API function.
5190 * server.c (target_running): Ditto.
5191 (accumulate_file_name_length): New function.
5192 (emit_dll_description): New function.
5193 (handle_qxfer_libraries): Replace accessing list implemention
5194 details with API function.
5195 (handle_qxfer_threads_worker): New function.
5196 (handle_qxfer_threads_proper): Replace accessing list implemention
5197 details with API function.
5198 (handle_query): Ditto.
5199 (visit_actioned_threads_callback_ftype): New typedef.
5200 (visit_actioned_threads_data): New struct.
5201 (visit_actioned_threads): Rewrite to be find_inferior callback.
5202 (resume): Call find_inferior.
5203 (handle_status): Replace accessing list implemention
5204 details with API function.
5205 (process_serial_event): Replace accessing list implemention details
5206 with API function.
5207 * target.c (set_desired_inferior): Replace accessing list implemention
5208 details with API function.
5209 * tracepoint.c (same_process_p): New function.
5210 (gdb_agent_about_to_close): Replace accessing list implemention
5211 details with API function.
5212 * win32-low.c (child_delete_thread): Replace accessing list
5213 implemention details with API function.
5214 (match_dll_by_basename): New function.
5215 (dll_is_loaded_by_basename): New function.
5216 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5217 details call to dll_is_loaded_by_basename.
5218
80894984
DE
52192014-02-19 Doug Evans <dje@google.com>
5220
5221 * dll.h (struct dll_info): Add comment.
5222 * gdbthread.h (struct thread_info): Add comment.
5223 (current_ptid): Simplify.
5224 * inferiors.c (add_process): Update.
5225 (remove_process): Update.
5226 * inferiors.h (struct process_info): Rename member "head" to "entry".
5227 * linux-low.c (delete_lwp): Update.
5228 (add_lwp): Update.
5229 (last_thread_of_process_p): Update.
5230 (kill_one_lwp_callback, linux_kill): Update.
5231 (status_pending_p_callback): Update.
5232 (wait_for_sigstop): Update. Simplify read of ptid.
5233 (start_step_over): Update.
5234 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5235 (get_lwp_thread): Update.
5236 (struct lwp_info): Rename member "head" to "entry".
5237 * regcache.h (inferior_list_entry): Delete.
5238 * server.c (kill_inferior_callback): Update.
5239 (detach_or_kill_inferior_callback): Update.
5240 (print_started_pid): Update.
5241 (print_attached_pid): Update.
5242 (process_serial_event): Simplify read of ptid.
5243 * thread-db.c (thread_db_create_event): Update.
5244 (thread_db_get_tls_address): Update.
5245 * win32-low.c (current_inferior_ptid): Simplify.
5246
46917d26
TT
52472014-02-19 Tom Tromey <tromey@redhat.com>
5248
5249 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5250 argument.
5251 (target_supports_btrace): Update.
5252
0759a81e
YQ
52532014-02-14 Yao Qi <yao@codesourcery.com>
5254
5255 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5256 (rsp-low-ipa.o): New target.
5257
a7191e8b
TT
52582014-02-12 Tom Tromey <tromey@redhat.com>
5259
5260 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5261 convert_ascii_to_int.
5262 * regcache.c (registers_to_string): Likewise.
5263 * remote-utils.c (decode_M_packet): Likewise.
5264 * server.c (process_serial_event): Likewise.
5265
ff0e980e
TT
52662014-02-12 Tom Tromey <tromey@redhat.com>
5267
5268 * server.c (handle_query, handle_v_run): Use hex2bin, not
5269 unhexify.
5270 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5271
e9371aff
TT
52722014-02-12 Tom Tromey <tromey@redhat.com>
5273
5274 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5275 convert_int_to_ascii.
5276 * regcache.c (registers_to_string, collect_register_as_string):
5277 Likewise.
5278 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5279 Likewise.
5280 * server.c (process_serial_event): Likewise.
5281 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5282 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5283
971dc0b8
TT
52842014-02-12 Tom Tromey <tromey@redhat.com>
5285
5286 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5287 bin2hex, not hexify.
5288 * tracepoint.c (cmd_qtstatus): Likewise.
5289
0a822afb
TT
52902014-02-12 Tom Tromey <tromey@redhat.com>
5291
5292 * remote-utils.c (monitor_output): Pass explicit length to
5293 hexify.
5294
9c3d6531
TT
52952014-02-12 Tom Tromey <tromey@redhat.com>
5296
5297 * tracepoint.c: Include rsp-low.h.
5298 * server.c: Include rsp-low.h.
5299 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5300 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5301 declare.
5302 * remote-utils.c: Include rsp-low.h.
5303 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5304 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5305 (convert_int_to_ascii, convert_ascii_to_int): Move to
5306 common/rsp-low.c.
5307 * regcache.c: Include rsp-low.h.
5308 * ax.c: Include rsp-low.h.
5309 * Makefile.in (SFILES): Add common/rsp-low.c.
5310 (OBS): Add rsp-low.o.
5311 (rsp-low.o): New target.
5312
01fd3ea5
TT
53132014-02-12 Tom Tromey <tromey@redhat.com>
5314
5315 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5316 Include print-utils.h.
5317 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5318 (plongest, thirty_two, phex_nz): Remove.
5319 * Makefile.in (SFILES): Add common/print-utils.c.
5320 (OBS): Add print-utils.o.
5321 (print-utils-ipa.o): New target.
5322 (print-utils.o): New target.
5323 (IPA_OBJS): Add print-utils-ipa.o.
5324
e99dc820
TT
53252014-02-06 Tom Tromey <tromey@redhat.com>
5326
5327 * Makefile.in (SFILES): Fix indentation.
5328
ee1e2d4f
DE
53292014-02-05 Doug Evans <dje@google.com>
5330
5331 * linux-low.c (linux_wait_for_event): Improve comment.
5332 (linux_wait_1): Keep current_inferior in sync with event_child.
5333
f5a02773
DE
53342014-01-22 Doug Evans <dje@google.com>
5335
5336 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5337
87ce2a04
DE
53382014-01-22 Doug Evans <dje@google.com>
5339
5340 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5341 * configure: Regenerate.
5342 * config.in: Regenerate.
5343 * Makefile.in (SFILES): Add debug.c.
5344 (OBS): Add debug.o.
5345 * debug.c: New file.
5346 * debug.h: New file.
5347 * linux-aarch64-low.c (*): Update all debugging printfs to use
5348 debug_printf instead of fprintf.
5349 * linux-arm-low.c (*): Ditto.
5350 * linux-cris-low.c (*): Ditto.
5351 * linux-crisv32-low.c (*): Ditto.
5352 * linux-m32r-low.c (*): Ditto.
5353 * linux-sparc-low.c (*): Ditto.
5354 * linux-x86.c (*): Ditto.
5355 * linux-low.c (*): Ditto.
5356 (linux_wait_1): Add calls to debug_enter, debug_exit.
5357 (linux_wait): Remove redundant debugging printf.
5358 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5359 (linux_resume, unstop_all_lwps): Ditto.
5360 * mem-break.c (*): Update all debugging printfs to use
5361 debug_printf instead of fprintf.
5362 * remote-utils.c (*): Ditto.
5363 * thread-db.c (*): Ditto.
5364 * server.c #include <ctype.h>, "gdb_vecs.h".
5365 (debug_threads): Moved to debug.c.
5366 (*): Update all debugging printfs to use debug_printf instead of
5367 fprintf.
5368 (start_inferior): Replace call to fflush with call to debug_flush.
5369 (monitor_show_help): Mention set debug-format.
5370 (parse_debug_format_options): New function.
5371 (handle_monitor_command): Handle "monitor set debug-format".
5372 (gdbserver_usage): Mention --debug-format.
5373 (main): Parse --debug-format.
5374 * server.h (debug_threads): Declaration moved to debug.h.
5375 #include "debug.h".
5376 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5377 trace_debug_1 that uses debug_printf.
5378 (tracepoint_look_up_symbols): Update all debugging printfs to use
5379 debug_printf instead of fprintf.
5380
e671835b
BS
53812014-01-20 Baruch Siach <baruch@tkos.co.il>
5382
5383 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5384 sys/ptrace.h.
5385
b5737fa9
PA
53862014-01-17 Pedro Alves <palves@redhat.com>
5387
ea38d2a9 5388 PR build/16445
c7faa97a
PA
5389 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5390 defined after including gdb_proc_service.h.
b5737fa9 5391
40ed484e
DE
53922014-01-16 Doug Evans <dje@google.com>
5393
5394 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5395 (match_dll): Use it.
5396
969c39fb
MM
53972014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5398
5399 * target.h (target_ops) <read_btrace>: Change parameters and
5400 return type to allow error reporting.
5401 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5402 trace reading errors on.
5403 * linux-low.c (linux_low_read_btrace): Pass trace reading
5404 errors on.
5405 (linux_low_disable_btrace): New.
5406
ab7f45ba
DE
54072014-01-15 Doug Evans <dje@google.com>
5408
5409 * inferiors.c (thread_id_to_gdb_id): Delete.
5410 * inferiors.h (thread_id_to_gdb_id): Delete.
5411
66af0f44
EZ
54122014-01-13 Eli Zaretskii <eliz@gnu.org>
5413
5414 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5415 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5416 versions.
5417
9939e131
PA
54182014-01-08 Pedro Alves <palves@redhat.com>
5419
5420 * server.c (handle_status): Don't discard previous queued stop
5421 replies or thread's pending status here.
5422 (main) <disconnection>: Do it here instead.
5423
b7ea362b
PA
54242014-01-08 Pedro Alves <palves@redhat.com>
5425
5426 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5427 * server.c (visit_actioned_threads, handle_pending_status): New
5428 function.
5429 (handle_v_cont): Factor out parts to ...
5430 (resume): ... this new function. If in all-stop, and a thread
5431 being resumed has a pending status, report it without actually
5432 resuming.
5433 (myresume): Adjust to use the new 'resume' function.
5434 (clear_pending_status_callback, set_pending_status_callback)
5435 (find_status_pending_thread_callback): New functions.
5436 (handle_status): Handle the case of multiple threads having
5437 interesting statuses to report. Report threads' real last signal
5438 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5439 with an interesting thread to report the status for, instead of
5440 always reporting the status of the first thread.
5441
28498c42
JB
54422014-01-01 Joel Brobecker <brobecker@adacore.com>
5443
5444 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5445 * gdbreplay.c (gdbreplay_version): Likewise.
5446
f45c82da
YZ
54472013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5448
5449 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5450 iov.iov_len with the real length in use.
5451
379a5e2d
JB
54522013-12-13 Joel Brobecker <brobecker@adacore.com>
5453
5454 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5455 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5456 for all targets that use win32-low.c.
5457 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5458 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5459
4210d83e
PA
54602013-12-13 Pedro Alves <palves@redhat.com>
5461
5462 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5463 if equal to TARGET_WAITKIND_LOADED.
5464 * win32-low.c (cached_status): New static global.
5465 (win32_wait): Add declaration.
5466 (do_initial_child_stuff): Flush all initial pending debug events
5467 up to the initial breakpoint.
5468 (win32_wait): If CACHED_STATUS was set, return that instead
5469 of doing a real wait. Remove the code resuming the execution
5470 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5471 during the initial phase. Also remove the code changing
5472 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5473 TARGET_WAITKIND_STOPPED.
5474
e7f0d979
YQ
54752013-12-11 Yao Qi <yao@codesourcery.com>
5476
5477 * notif.c (handle_notif_ack): Return 0 if no notification
5478 matches.
5479
ebcf782c
DE
54802013-11-20 Doug Evans <dje@google.com>
5481
5482 * linux-low.c (linux_set_resume_request): Fix comment.
5483
20ad9378
DE
54842013-11-20 Doug Evans <dje@google.com>
5485
5486 * linux-low.c (resume_status_pending_p): Tweak comment.
5487
a196ebeb
WT
54882013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5489
5490 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5491 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5492 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5493 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5494 (srv_amd64_regobj): Add amd64-mpx.o.
5495 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5496 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5497 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5498 * i387-fp.c (num_pl_bnd_register) Added constant.
5499 (num_pl_bnd_cfg_registers) Added constant.
5500 (struct i387_xsave) Added reserved area and MPX fields.
5501 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5502 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5503 function.
5504 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5505 (init_registers_amd64_mpx_linux): Declare new function.
5506 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5507 (x86_64_regmap): Add MPX registers.
5508 (x86_linux_read_description): Add MPX case.
5509 (initialize_low_arch): Initialize MPX targets.
5510
0080a2f6
TT
55112013-11-18 Tom Tromey <tromey@redhat.com>
5512
5513 * configure: Rebuild.
5514 * configure.ac: Don't check for stdlib.h.
5515 * gdbreplay.c: Unconditionally include stdlib.h.
5516
2978b111
TT
55172013-11-18 Tom Tromey <tromey@redhat.com>
5518
5519 * config.in: Rebuild.
5520 * configure: Rebuild.
5521 * configure.ac: Don't use AC_HEADER_DIRENT.
5522
a3d08894
TT
55232013-11-18 Tom Tromey <tromey@redhat.com>
5524
5525 * server.h: Don't check HAVE_STRING_H.
5526 * gdbreplay.c: Don't check HAVE_STRING_H.
5527 * configure: Rebuild.
5528
0a5dd17d
TT
55292013-11-18 Tom Tromey <tromey@redhat.com>
5530
5531 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5532 LIBGNU.
5533
1bd2f0ba
TT
55342013-11-08 Tom Tromey <tromey@redhat.com>
5535
5536 * configure, config.in: Rebuild.
5537 * configure.ac: Remove unused configury.
5538
3266f10b
TT
55392013-11-08 Tom Tromey <tromey@redhat.com>
5540
5541 * acinclude.m4: Include common.m4, codeset.m4.
5542 * configure, config.in: Rebuild.
5543 * configure.ac: Use GDB_AC_COMMON.
5544
6682d959
AA
55452013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5546
5547 * linux-s390-low.c (HWCAP_S390_TE): New define.
5548 (s390_arch_setup): Consider the TE field in the HWCAP for
5549 determining 'have_regset_tdb'.
5550
fd0a4d76
SDJ
55512013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5552
5553 PR gdb/16014
5554 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5555 call to sizeof.
5556
1a3d890b
PA
55572013-10-02 Pedro Alves <palves@redhat.com>
5558
5559 * server.c (process_serial_event): Don't output "GDBserver
5560 exiting" if GDB is connected through stdio.
5561 * target.c (mywait): Likewise, be silent if GDB is connected
5562 through stdio.
5563
97ad4581
JB
55642013-10-01 Joel Brobecker <brobecker@adacore.com>
5565
5566 * lynx-low.c (lynx_add_threads_after_attach): New function.
5567 (lynx_attach): Remove call to add_thread. Add call to
5568 lynx_add_threads_after_attach instead.
5569
5b4e221c
MF
55702013-09-28 Mike Frysinger <vapier@gentoo.org>
5571
5572 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5573 * config.in, configure: Regenerated.
5574
ee47b2f8
YQ
55752013-09-18 Yao Qi <yao@codesourcery.com>
5576
5577 PR server/15959
5578 * server.c (start_inferior): Clear 'resume_info'.
5579
d6707650 55802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5581
d6707650
JW
5582 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5583 for each register.
5584
9243dd0e 55852013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5586
9243dd0e
JW
5587 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5588 linux-tile-low.o to srv_tgtobj.
5589
c623a6ef
WN
55902013-09-16 Will Newton <will.newton@linaro.org>
5591
5592 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5593 out regs.
5594
fb71d39e
PA
55952013-09-06 Pedro Alves <palves@redhat.com>
5596
5597 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5598 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5599 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5600 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5601 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5602 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5603
8e7e9910
PA
56042013-09-06 Pedro Alves <palves@redhat.com>
5605
5606 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5607 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5608
7c3a12ca
PA
56092013-09-06 Pedro Alves <palves@redhat.com>
5610
5611 * linux-amd64-ipa.c: Include tracepoint.h.
5612 * linux-i386-ipa.c: Include tracepoint.h.
5613
8eb3d7b6
RW
56142013-09-06 Ricard Wanderlof <ricardw@axis.com>
5615
5616 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5617 (ps_get_thread_area): New function.
5618
eddddb9d
RW
56192013-09-06 Ricard Wanderlof <ricardw@axis.com>
5620
5621 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5622 (initialize_low_arch): Call init_registers_crisv32 rather than
5623 init_register_crisv32.
5624
533b0600
PA
56252013-09-05 Pedro Alves <palves@redhat.com>
5626
5627 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5628 to ...
5629 * hostio.h: ... this new file.
5630 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5631 win32-low.c: Include hostio.h.
5632
0ce3d3b5
PA
56332013-09-05 Pedro Alves <palves@redhat.com>
5634
5635 * server.h (gdb_client_data, handler_func, callback_handler_func)
5636 (delete_file_handler, add_file_handler, append_callback_event)
5637 (delete_callback_event, start_event_loop, initialize_event_loop):
5638 Move to event-loop.h and include it.
5639 * event-loop.h: New file.
5640
799cdc37
PA
56412013-09-05 Pedro Alves <palves@redhat.com>
5642
5643 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5644 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5645 (loaded_dll, unloaded_dll): Move to ...
5646 * dll.h: ... this new file.
5647 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5648
6a6bbd9d
PA
56492013-09-05 Pedro Alves <palves@redhat.com>
5650
5651 * server.h (current_process, get_thread_process, all_processes)
5652 (add_inferior_to_list, for_each_inferior, current_inferior)
5653 (remove_inferior, add_process, remove_process, find_process_pid)
5654 (have_started_inferiors_p, have_attached_inferiors_p)
5655 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5656 (clear_inferiors, find_inferior, find_inferior_id)
5657 (inferior_target_data, set_inferior_target_data)
5658 (inferior_regcache_data, set_inferior_regcache_data): Move to
5659 inferiors.h, and include it.
5660 * inferiors.h: New file.
5661
f699aaba
PA
56622013-09-05 Pedro Alves <palves@redhat.com>
5663
5664 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5665 Move ...
72f4393d 5666 * ax.h: ... here.
f699aaba 5667
c144c7a0
PA
56682013-09-05 Pedro Alves <palves@redhat.com>
5669
5670 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5671 tracepoint.h.
5672 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5673 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5674 (handle_tracepoint_general_set, handle_tracepoint_query)
5675 (tracepoint_finished_step, tracepoint_was_hit)
5676 (release_while_stepping_state_list, current_traceframe)
5677 (in_readonly_region, traceframe_read_mem)
5678 (fetch_traceframe_registers, traceframe_read_sdata)
5679 (traceframe_read_info, struct fast_tpoint_collect_status)
5680 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5681 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5682 (supply_fast_tracepoint_registers)
5683 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5684 (ipa_tdesc, claim_trampoline_space)
5685 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5686 (agent_mem_read, agent_get_trace_state_variable_value)
5687 (agent_set_trace_state_variable_value, agent_tsv_read)
5688 (agent_mem_read_string, get_raw_reg_func_addr)
5689 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5690 * tracepoint.h: ... this new file.
5691
ff42e6ab
PA
56922013-09-05 Pedro Alves <palves@redhat.com>
5693
5694 * server.h (perror_with_name, error, fatal, warning, paddress)
5695 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5696 include it.
5697 * utils.h: New file.
5698
541af0f4
PA
56992013-09-05 Pedro Alves <palves@redhat.com>
5700
5701 * server.h (remote_debug, noack_mode, transport_is_reliable)
5702 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5703 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5704 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5705 (write_enn, initialize_async_io, enable_async_io)
5706 (disable_async_io, check_remote_input_interrupt_request)
5707 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5708 (dead_thread_notify, prepare_resume_reply)
5709 (decode_address_to_semicolon, decode_address, decode_m_packet)
5710 (decode_M_packet, decode_X_packet, decode_xfer_write)
5711 (decode_search_memory_packet, unhexify, hexify)
5712 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5713 (look_up_one_symbol, relocate_instruction)
5714 (monitor_output): Move to remote-utils.h, and include it.
5715 * remote-utils.h: New file.
5716
eebdf26b
PA
57172013-09-05 Pedro Alves <palves@redhat.com>
5718
5719 * server.h (_): Delete.
5720
3aafd2ff
PA
57212013-09-02 Pedro Alves <palves@redhat.com>
5722
5723 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5724 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5725 allocated.
5726 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5727
cee83bcb
PM
57282013-09-02 Pierre Muller <muller@sourceware.org>
5729
5730 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5731 or WriteProcessMemory complete successfully and handle
5732 ERROR_PARTIAL_COPY error.
5733
9a13b2fa
PA
57342013-09-02 Pedro Alves <palves@redhat.com>
5735
5736 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5737 error instead of EIO.
5738
602e3198
JK
57392013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5740
5741 PR server/15604
5742 * linux-low.c: Include filestuff.h.
5743 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5744 * lynx-low.c: Include filestuff.h.
5745 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5746 * server.c: Include filestuff.h.
5747 (main): Call notice_open_fds.
5748 * spu-low.c: Include filestuff.h.
5749 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5750
96d7229d
LM
57512013-08-22 Luis Machado <lgustavo@codesourcery.com>
5752
5753 * Makefile.in: Explain why ../target and ../nat are not
5754 listed as include file search paths.
5755 (linux-waitpid.o): New object file rule.
5756 * configure.srv (srv_native_linux_obj): New variable.
5757 Replace all occurrences of linux native object files with
5758 $srv_native_linux_obj.
5759 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5760 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5761 (linux_enable_event_reporting): Remove declaration.
5762 (my_waitpid): Moved to common/linux-waitpid.c.
5763 (linux_wait_for_event): Pass ptid when calling
5764 linux_enable_event_reporting.
5765 (linux_supports_tracefork_flag): Remove.
5766 (linux_enable_event_reporting): Likewise.
5767 (linux_tracefork_grandchild): Remove.
5768 (STACK_SIZE): Moved to common/linux-ptrace.c.
5769 (linux_tracefork_child): Remove.
5770 (linux_test_for_tracefork): Remove.
5771 (linux_look_up_symbols): Call linux_supports_traceclone.
5772 (initialize_low): Remove call to linux_test_for_tracefork.
5773 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5774 common/linux-ptrace.h.
5775 (PTRACE_TYPE_ARG4): Likewise.
5776 Include linux-ptrace.h.
5777
32940073
PA
57782013-08-21 Pedro Alves <palves@redhat.com>
5779
5780 * config.in: Renegerate.
5781
33b60d58 57822013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5783
33b60d58
LM
5784 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5785 (SFILES): Remove $(srcdir)/common/target-common.c and
5786 add $(srcdir)/target/waitstatus.c.
5787 (OBS): Remove target-common.o and add waitstatus.o.
5788 (server_h): Remove $(srcdir)/../common/target-common.h and
5789 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5790 and $(srcdir)/../target/waitstatus.h.
5791 (target-common.o): Remove.
5792 (waitstatus.o): New target object file.
5793 * target.h: Do not include target-common.h and
5794 include target/resume.h, target/wait.h and
5795 target/waitstatus.h.
5796
b8e1b30e
LM
57972013-08-13 Luis Machado <lgustavo@codesourcery.com>
5798
5799 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5800 to PTRACE_TYPE_ARG3.
5801 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5802 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5803 PTRACE_TYPE_ARG4.
5804 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5805 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5806
7a60ad40
YQ
58072013-07-27 Jie Zhang <jie@codesourcery.com>
5808 Daniel Jacobowitz <dan@codesourcery.com>
5809 Yao Qi <yao@codesourcery.com>
5810
5811 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5812 (mips-linux-watch.o): New rule.
5813 (mips_linux_watch_h): New variable.
5814 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5815 srv_tgtobj.
5816 * linux-mips-low.c: Include mips-linux-watch.h.
5817 (struct arch_process_info, struct arch_lwp_info): New.
5818 (update_watch_registers_callback): New function.
5819 (mips_linux_new_process, mips_linux_new_thread) New functions.
5820 (mips_linux_prepare_to_resume, mips_insert_point): New
5821 functions.
5822 (mips_remove_point, mips_stopped_by_watchpoint): New
5823 functions.
5824 (rsp_bp_type_to_target_hw_bp_type): New function.
5825 (mips_stopped_data_address): New function.
5826 (the_low_target): Add watchpoint support functions.
5827
de6f69ad
YQ
58282013-07-27 Yao Qi <yao@codesourcery.com>
5829
5830 * i386-low.c: Include break-common.h.
5831 (enum target_hw_bp_type): Remove.
5832
3360c0bf
LM
58332013-07-24 Luis Machado <lgustavo@codesourcery.com>
5834
5835 * Makefile.in (SFILES): /common/target-common.c.
5836 (OBS): Add target-common.o.
5837 (server_h): Add $(srcdir)/../common/target-common.h.
5838 (target-common.o): New target.
5839 * server.c (queue_stop_reply_callback): Free
5840 status string after use.
5841 * target.c (target_waitstatus_to_string): Remove.
5842 * target.h: Include target-common.h.
5843 (resume_kind): Likewise.
5844 (target_waitkind): Likewise.
5845 (target_waitstatus): Likewise.
5846 (TARGET_WNOHANG): Likewise.
5847
bd885420
YQ
58482013-07-04 Yao Qi <yao@codesourcery.com>
5849
5850 * Makefile.in (host_alias): Use @host_noncanonical@.
5851 (target_alias): Use @target_noncanonical@.
5852 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5853 ACX_NONCANONICAL_HOST.
5854 * configure: Regenerated.
5855
5856 Revert:
5857 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5858
5859 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5860 * configure: Rebuild.
5861 * Makefile.in (version_host, version_target): Get from configure.
5862 (version.c): Use $(version_host) and $(version_target).
5863
17ef446e
PA
58642013-07-03 Pedro Alves <palves@redhat.com>
5865
5866 * Makefile.in (config.status): Depend on development.sh.
5867 * acinclude.m4: Include libmcheck.m4.
5868 * configure: Regenerate.
5869
7a9a7487
MG
58702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5871
5872 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5873 attribute inside the parentheses.
5874 (winapi_DebugSetProcessKillOnExit): Ditto.
5875 (winapi_DebugBreakProcess): Ditto.
5876 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5877
49b64de6
MG
58782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5879
5880 * notif.h (notif_event): Add a dummy member to avoid compiler
5881 errors.
5882
d5749ee7
PA
58832013-07-01 Pedro Alves <palves@redhat.com>
5884
5885 * hostio.c (HOSTIO_PATH_MAX): Define.
5886 (require_filename, handle_open, handle_unlink, handle_readlink):
5887 Use it.
5888
d8d2a3ee
PA
58892013-07-01 Pedro Alves <palves@redhat.com>
5890
5891 * server.h: Include "pathmax.h".
5892 * linux-low.c: Don't include sys/param.h.
5893 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5894 MAXPATHLEN.
5895 * win32-low.c: Don't include sys/param.h.
5896 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5897
bc7dea8d
PA
58982013-07-01 Pedro Alves <palves@redhat.com>
5899
5900 * event-loop.c: Don't check HAVE_UNISTD_H before including
5901 <unistd.h>.
5902 * gdbreplay.c: Likewise.
5903 * remote-utils.c: Likewise.
5904 * server.c: Likewise.
5905 * configure.ac: Don't check for unistd.h.
5906 * configure: Regenerate.
5907
d6c2da54
TT
59082013-06-28 Tom Tromey <tromey@redhat.com>
5909
5910 * Makefile.in (version.c): Use version.in, not
5911 common/version.in.
5912
257b6bec
MG
59132013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5914
5915 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5916 * configure: Rebuild.
5917 * Makefile.in (version_host, version_target): Get from configure.
5918 (version.c): Use $(version_host) and $(version_target).
5919
86ebe149
DK
59202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5921
5922 Fix trace-status to output user name without trailing colon.
5923 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5924
f30aa5af
DK
59252013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5926
5927 Fix trace-status to output proper start-time and stop-time.
5928 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5929 output start time and stop time in hex as gdb expects.
5930
28a93511
YQ
59312013-06-26 Pedro Alves <pedro@codesourcery.com>
5932
5933 * tracepoint.c (build_traceframe_info_xml): Output trace state
5934 variables present in the trace buffer.
5935
01208463
TT
59362013-06-24 Tom Tromey <tromey@redhat.com>
5937
5938 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5939 create-version.sh.
5940 (version.o): Remove.
5941 * gdbreplay.c: Include version.h.
5942 (version, host_name): Don't declare.
5943 * server.h: Include version.h.
5944 (version, host_name): Don't declare.
5945
760256f9
PA
59462013-06-12 Pedro Alves <palves@redhat.com>
5947
5948 * linux-x86-low.c (linux_is_elf64): Delete global.
5949 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5950 with local linux_pid_exe_is_elf_64_file use.
5951
030031ee
PA
59522013-06-11 Pedro Alves <palves@redhat.com>
5953
5954 * linux-low.c (regset_disabled, disable_regset): New functions.
5955 (regsets_fetch_inferior_registers)
5956 (regsets_store_inferior_registers): Use them.
5957 (initialize_regsets_info); Don't allocate the disabled_regsets
5958 array here.
5959 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5960 comment.
5961
5da6eb0a
PA
59622013-06-11 Pedro Alves <palves@redhat.com>
5963
5964 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5965 xmalloc.
5966
7e5aaa09
PA
59672013-06-11 Pedro Alves <palves@redhat.com>
5968
5969 * linux-x86-low.c (initialize_low_arch): Call
5970 init_registers_x32_avx_linux.
5971
d878444c
JK
59722013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5973
5974 Fix compatibility with Android Bionic.
5975 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5976 it is not empty.
5977
3aee8918
PA
59782013-06-07 Pedro Alves <palves@redhat.com>
5979
5f2b57b5 5980 PR server/14823
3aee8918
PA
5981 * Makefile.in (OBS): Add tdesc.o.
5982 (IPA_OBJS): Add tdesc-ipa.o.
5983 (tdesc-ipa.o): New rule.
5984 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5985 interface.
5986 * linux-low.c (new_inferior): Delete.
5987 (disabled_regsets, num_regsets): Delete.
5988 (linux_add_process): Adjust to set the new per-process
5989 new_inferior flag.
5990 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5991 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5992 was a stop. When calling arch_setup, switch the current inferior
5993 to the thread that got an event.
5994 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5995 (regsets_fetch_inferior_registers)
5996 (regsets_store_inferior_registers): New regsets_info parameter.
5997 Adjust to use it.
5998 (linux_register_in_regsets): New regs_info parameter. Adjust to
5999 use it.
6000 (register_addr, fetch_register, store_register): New usrregs_info
6001 parameter. Adjust to use it.
6002 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6003 parameter regs_info. Adjust to use it.
6004 (linux_fetch_registers): Get the current inferior's regs_info, and
6005 adjust to use it.
6006 (linux_store_registers): Ditto.
6007 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6008 (initialize_low): Don't initialize the target_regsets here. Call
6009 initialize_low_arch.
6010 * linux-low.h (target_regsets): Delete declaration.
6011 (struct regsets_info): New.
6012 (struct usrregs_info): New.
6013 (struct regs_info): New.
6014 (struct process_info_private) <new_inferior>: New field.
6015 (struct linux_target_ops): Delete the num_regs, regmap, and
6016 regset_bitmap fields. New field regs_info.
6017 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6018 * i387-fp.c (num_xmm_registers): Delete.
6019 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6020 calls to new interface.
6021 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6022 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6023 Infer the number of xmm registers from the regcache's target
6024 description.
6025 * i387-fp.h (num_xmm_registers): Delete.
6026 * inferiors.c (add_thread): Don't install the thread's regcache
6027 here.
6028 * proc-service.c (gregset_info): Fetch the current inferior's
6029 regs_info. Adjust to use it.
6030 * regcache.c: Include tdesc.h.
6031 (register_bytes, reg_defs, num_registers)
6032 (gdbserver_expedite_regs): Delete.
6033 (get_thread_regcache): If the thread doesn't have a regcache yet,
6034 create one, instead of aborting gdbserver.
6035 (regcache_invalidate_one): Rename to ...
6036 (regcache_invalidate_thread): ... this.
6037 (regcache_invalidate_one): New.
6038 (regcache_invalidate): Only invalidate registers of the current
6039 process.
6040 (init_register_cache): Add target_desc parameter, and use it.
6041 (new_register_cache): Ditto. Assert the target description has a
6042 non zero registers_size.
6043 (regcache_cpy): Add assertions. Adjust.
6044 (realloc_register_cache, set_register_cache): Delete.
6045 (registers_to_string, registers_from_string): Adjust.
6046 (find_register_by_name, find_regno, find_register_by_number)
6047 (register_cache_size): Add target_desc parameter, and use it.
6048 (free_register_cache_thread, free_register_cache_thread_one)
6049 (regcache_release, register_cache_size): New.
6050 (register_size): Add target_desc parameter, and use it.
6051 (register_data, supply_register, supply_register_zeroed)
6052 (supply_regblock, supply_register_by_name, collect_register)
6053 (collect_register_as_string, collect_register_by_name): Adjust.
6054 * regcache.h (struct target_desc): Forward declare.
6055 (struct regcache) <tdesc>: New field.
6056 (init_register_cache, new_register_cache): Add target_desc
6057 parameter.
6058 (regcache_invalidate_thread): Declare.
6059 (regcache_invalidate_one): Delete declaration.
6060 (regcache_release): Declare.
6061 (find_register_by_number, register_cache_size, register_size)
6062 (find_regno): Add target_desc parameter.
6063 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6064 declarations.
6065 * remote-utils.c: Include tdesc.h.
6066 (outreg, prepare_resume_reply): Adjust.
6067 * server.c: Include tdesc.h.
6068 (gdbserver_xmltarget): Delete declaration.
6069 (get_features_xml, process_serial_event): Adjust.
6070 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6071 declare.
6072 (struct process_info) <tdesc>: New field.
6073 (ipa_tdesc): Declare.
6074 * tdesc.c: New file.
6075 * tdesc.h: New file.
6076 * tracepoint.c: Include tdesc.h.
6077 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6078 (get_context_regcache): Adjust to pass ipa_tdesc down.
6079 (do_action_at_tracepoint): Adjust to get the register cache size
6080 from the context regcache's description.
6081 (traceframe_walk_blocks): Adjust to get the register cache size
6082 from the current trace frame's description.
6083 (traceframe_get_pc): Adjust to get current trace frame's
6084 description and pass it down.
6085 (gdb_collect): Adjust to get the register cache size from the
6086 IPA's description.
6087 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6088 (gdbserver_xmltarget): Delete.
6089 (initialize_low_tracepoint): Set the ipa's target description.
6090 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6091 (initialize_low_tracepoint): Set the ipa's target description.
6092 * linux-x86-low.c: Include tdesc.h.
6093 [__x86_64__] (is_64bit_tdesc): New.
6094 (ps_get_thread_area, x86_get_thread_area): Use it.
6095 (i386_cannot_store_register): Rename to ...
6096 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6097 (i386_cannot_fetch_register): Rename to ...
6098 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6099 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6100 to new interface.
6101 (target_regsets): Rename to ...
6102 (x86_regsets): ... this.
6103 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6104 interface.
6105 (x86_siginfo_fixup): Use is_64bit_tdesc.
6106 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6107 (tdesc_x32_avx_linux, tdesc_x32_linux)
6108 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6109 Declare.
6110 (x86_linux_update_xmltarget): Delete.
6111 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6112 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6113 (AMD64_LINUX_USER64_CS): New.
6114 (x86_linux_read_description): New, based on
6115 x86_linux_update_xmltarget.
6116 (same_process_callback): New.
6117 (x86_arch_setup_process_callback): New.
6118 (x86_linux_update_xmltarget): New.
6119 (x86_regsets_info): New.
6120 (amd64_linux_regs_info): New.
6121 (i386_linux_usrregs_info): New.
6122 (i386_linux_regs_info): New.
6123 (x86_linux_regs_info): New.
6124 (x86_arch_setup): Reimplement.
6125 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6126 (x86_emit_ops): Ditto.
6127 (the_low_target): Adjust. Install x86_linux_regs_info,
6128 x86_cannot_fetch_register, and x86_cannot_store_register.
6129 (initialize_low_arch): New.
6130 * linux-ia64-low.c (tdesc_ia64): Declare.
6131 (ia64_fetch_register): Adjust.
6132 (ia64_usrregs_info, regs_info): New globals.
6133 (ia64_regs_info): New function.
6134 (the_low_target): Adjust.
6135 (initialize_low_arch): New function.
6136 * linux-sparc-low.c (tdesc_sparc64): Declare.
6137 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6138 Adjust.
6139 (sparc_arch_setup): New function.
6140 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6141 (the_low_target): Adjust.
6142 (initialize_low_arch): New function.
6143 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6144 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6145 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6146 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6147 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6148 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6149 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6150 (tdesc_powerpc_isa205_vsx64l): Declare.
6151 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6152 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6153 (ppc_set_pc, ppc_get_hwcap): Adjust.
6154 (ppc_usrregs_info): Forward declare.
6155 (!__powerpc64__) ppc_regmap_adjusted: New global.
6156 (ppc_arch_setup): Adjust to the current process'es target
6157 description.
6158 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6159 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6160 (ppc_store_evrregset): Adjust.
6161 (target_regsets): Rename to ...
6162 (ppc_regsets): ... this, and make static.
6163 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6164 (ppc_regs_info): New function.
6165 (the_low_target): Adjust.
6166 (initialize_low_arch): New function.
6167 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6168 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6169 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6170 (tdesc_s390x_linux64v2): Declare.
6171 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6172 (s390_fill_gregset, s390_store_last_break): Adjust.
6173 (target_regsets): Rename to ...
6174 (s390_regsets): ... this, and make static.
6175 (s390_get_pc, s390_set_pc): Adjust.
6176 (s390_get_hwcap): New target_desc parameter, and use it.
6177 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6178 (s390_arch_setup): Adjust to set the current process'es target
6179 description. Don't adjust the regmap.
6180 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6181 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6182 (regs_info_3264): New globals.
6183 (s390_regs_info): New function.
6184 (the_low_target): Adjust.
6185 (initialize_low_arch): New function.
6186 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6187 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6188 [__mips64] (init_registers_mips_linux)
6189 (init_registers_mips_dsp_linux): Delete defines.
6190 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6191 (have_dsp): New global.
6192 (mips_read_description): New, based on mips_arch_setup.
6193 (mips_arch_setup): Reimplement.
6194 (get_usrregs_info): New function.
6195 (mips_cannot_fetch_register, mips_cannot_store_register)
6196 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6197 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6198 (target_regsets): Rename to ...
6199 (mips_regsets): ... this, and make static.
6200 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6201 (dsp_regs_info, regs_info): New globals.
6202 (mips_regs_info): New function.
6203 (the_low_target): Adjust.
6204 (initialize_low_arch): New function.
6205 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6206 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6207 Declare.
6208 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6209 (arm_read_description): New, with bits factored from
6210 arm_arch_setup.
6211 (arm_arch_setup): Reimplement.
6212 (target_regsets): Rename to ...
6213 (arm_regsets): ... this, and make static.
6214 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6215 (arm_regs_info): New function.
6216 (the_low_target): Adjust.
6217 (initialize_low_arch): New function.
6218 * linux-m68k-low.c (tdesc_m68k): Declare.
6219 (target_regsets): Rename to ...
6220 (m68k_regsets): ... this, and make static.
6221 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6222 (m68k_regs_info): New function.
6223 (m68k_arch_setup): New function.
6224 (the_low_target): Adjust.
6225 (initialize_low_arch): New function.
6226 * linux-sh-low.c (tdesc_sharch): Declare.
6227 (target_regsets): Rename to ...
6228 (sh_regsets): ... this, and make static.
6229 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6230 (sh_regs_info, sh_arch_setup): New functions.
6231 (the_low_target): Adjust.
6232 (initialize_low_arch): New function.
6233 * linux-bfin-low.c (tdesc_bfin): Declare.
6234 (bfin_arch_setup): New function.
6235 (bfin_usrregs_info, regs_info): New globals.
6236 (bfin_regs_info): New function.
6237 (the_low_target): Adjust.
6238 (initialize_low_arch): New function.
6239 * linux-cris-low.c (tdesc_cris): Declare.
6240 (cris_arch_setup): New function.
6241 (cris_usrregs_info, regs_info): New globals.
6242 (cris_regs_info): New function.
6243 (the_low_target): Adjust.
6244 (initialize_low_arch): New function.
6245 * linux-cris-low.c (tdesc_crisv32): Declare.
6246 (cris_arch_setup): New function.
6247 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6248 (cris_regs_info): New function.
6249 (the_low_target): Adjust.
6250 (initialize_low_arch): New function.
6251 * linux-m32r-low.c (tdesc_m32r): Declare.
6252 (m32r_arch_setup): New function.
6253 (m32r_usrregs_info, regs_info): New globals.
6254 (m32r_regs_info): Adjust.
6255 (initialize_low_arch): New function.
6256 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6257 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6258 (tic6x_usrregs_info): Forward declare.
6259 (tic6x_read_description): New function, based on ...
6260 (tic6x_arch_setup): ... this. Reimplement.
6261 (target_regsets): Rename to ...
6262 (tic6x_regsets): ... this, and make static.
6263 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6264 (tic6x_regs_info): New function.
6265 (the_low_target): Adjust.
6266 (initialize_low_arch): New function.
6267 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6268 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6269 (target_regsets): Rename to ...
6270 (xtensa_regsets): ... this, and make static.
6271 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6272 globals.
6273 (xtensa_arch_setup, xtensa_regs_info): New functions.
6274 (the_low_target): Adjust.
6275 (initialize_low_arch): New function.
6276 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6277 (nios2_arch_setup): Set the current process'es tdesc.
6278 (target_regsets): Rename to ...
6279 (nios2_regsets): ... this.
6280 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6281 (nios2_regs_info): New function.
6282 (the_low_target): Adjust.
6283 (initialize_low_arch): New function.
a261b8f5
PA
6284 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6285 (aarch64_arch_setup): Set the current process'es tdesc.
6286 (target_regsets): Rename to ...
6287 (aarch64_regsets): ... this.
6288 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6289 (aarch64_regs_info): New function.
6290 (the_low_target): Adjust.
6291 (initialize_low_arch): New function.
3aee8918
PA
6292 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6293 globals.
6294 (target_regsets): Rename to ...
6295 (tile_regsets): ... this.
6296 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6297 (tile_regs_info): New function.
6298 (tile_arch_setup): Set the current process'es tdesc.
6299 (the_low_target): Adjust.
6300 (initialize_low_arch): New function.
6301 * spu-low.c (tdesc_spu): Declare.
6302 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6303 * win32-arm-low.c (tdesc_arm): Declare.
6304 (arm_arch_setup): New function.
6305 (the_low_target): Install arm_arch_setup instead of
6306 init_registers_arm.
6307 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6308 (init_windows_x86): Rename to ...
6309 (i386_arch_setup): ... this. Set `win32_tdesc'.
6310 (the_low_target): Adjust.
6311 * win32-low.c (win32_tdesc): New global.
6312 (child_add_thread): Don't create the thread cache here.
6313 (do_initial_child_stuff): Set the new process'es tdesc.
6314 * win32-low.h (struct target_desc): Forward declare.
6315 (win32_tdesc): Declare.
6316 * lynx-i386-low.c (tdesc_i386): Declare global.
6317 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6318 * lynx-low.c (lynx_tdesc): New global.
6319 (lynx_add_process): Set the new process'es tdesc.
6320 * lynx-low.h (struct target_desc): Forward declare.
6321 (lynx_tdesc): Declare global.
6322 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6323 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6324 * nto-low.c (nto_tdesc): New global.
6325 (do_attach): Set the new process'es tdesc.
6326 * nto-low.h (struct target_desc): Forward declare.
6327 (nto_tdesc): Declare.
6328 * nto-x86-low.c (tdesc_i386): Declare.
6329 (nto_x86_arch_setup): Set `nto_tdesc'.
6330
b1fbec62
GB
63312013-06-04 Gary Benson <gbenson@redhat.com>
6332
6333 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6334 to qSupported response when appropriate.
6335 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6336 with nonzero-length annex.
6337 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6338 arguments supplied in annex.
6339
d1ec4ce7
DE
63402013-05-31 Doug Evans <dje@google.com>
6341
ac44adcb 6342 PR server/15594
d1ec4ce7
DE
6343 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6344 64 bits in 64-cross-32 environment.
6345
9b25f2d3
PA
63462013-05-28 Pedro Alves <palves@redhat.com>
6347
6348 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6349 (aarch64-without-fpu.c): Delete rule.
6350 * configure.srv (aarch64*-*-linux*): Remove references to
6351 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6352 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6353 declaration.
6354
6740dc9c
PA
63552013-05-24 Pedro Alves <palves@redhat.com>
6356
6357 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6358 instead of strchr/decode_address. Error if the range isn't split
6359 with a ','. Don't assume there's be a ':' in the action.
6360
c2d6af84
PA
63612013-05-23 Yao Qi <yao@codesourcery.com>
6362 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c (lwp_in_step_range): New function.
6365 (linux_wait_1): If the thread was range stepping and stopped
6366 outside the stepping range, report the stop to GDB. Otherwise,
6367 continue stepping. Add range stepping debug output.
6368 (linux_set_resume_request): Copy the step range from the resume
6369 request to the lwp.
6370 (linux_supports_range_stepping): New.
6371 (linux_target_ops) <supports_range_stepping>: Set to
6372 linux_supports_range_stepping.
6373 * linux-low.h (struct linux_target_ops)
6374 <supports_range_stepping>: New field.
6375 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6376 * linux-x86-low.c (x86_supports_range_stepping): New.
6377 (the_low_target) <supports_range_stepping>: Set to
6378 x86_supports_range_stepping.
6379 * server.c (handle_v_cont): Handle 'r' action.
6380 (handle_v_requests): Append ";r" if the target supports range
6381 stepping.
6382 * target.h (struct thread_resume) <step_range_start,
6383 step_range_end>: New fields.
6384 (struct target_ops) <supports_range_stepping>:
6385 New field.
6386 (target_supports_range_stepping): New macro.
6387
58794e1a
JB
63882013-05-17 Joel Brobecker <brobecker@adacore.com>
6389
6390 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6391 confusion in comment.
6392
d631c5a7
JB
63932013-05-17 Joel Brobecker <brobecker@adacore.com>
6394
6395 * lynx-low.c (struct process_info_private): New type.
6396 (lynx_add_process): New function.
6397 (lynx_create_inferior, lynx_attach): Replace calls to
6398 add_process by calls to lynx_add_process.
6399 (lynx_resume): If PTID is null, then try using
6400 current_process()->private->last_wait_event_ptid.
6401 Add comments.
6402 (lynx_clear_inferiors): Delete. The contents of that function
6403 has been inlined in lynx_mourn;
6404 (lynx_wait_1): Save the ptid in the process's private data.
6405 (lynx_mourn): Free the process' private data. Replace call
6406 to lynx_clear_inferiors by call to clear_inferiors.
6407
96f7a20f
YQ
64082013-05-17 Yao Qi <yao@codesourcery.com>
6409
6410 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6411 the right place.
6412
db0dfaa0
LM
64132013-05-16 Luis Machado <lgustavo@codesourcery.com>
6414
6415 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6416 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6417 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6418 PT_TEXT_END_ADDR guards. Update comments.
6419 (linux_target_op) <read_offsets>: Conditionally define to
6420 linux_read_offsets if the target is UCLIBC and if it defines
6421 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6422
68f5f838
SL
64232013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6424 Andrew Jenner <andrew@codesourcery.com>
6425
6426 * Makefile.in (SFILES): Add linux-nios2-low.c.
6427 (clean): Add action to delete nios2-linux.c.
6428 (nios2-linux.c): New rule.
6429 * configure.srv: Add nios2*-*-linux*.
6430 * linux-nios2-low.c: New.
6431
1ebff1fd
HAQ
64322013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6433
6434 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6435
f6150862
HZ
64362013-04-25 Hui Zhu <hui@codesourcery.com>
6437
6438 PR gdb/15186
f6150862
HZ
6439 * ax.c (ax_printf): Add fflush.
6440
614c279d
TT
64412013-04-22 Tom Tromey <tromey@redhat.com>
6442
6443 * Makefile.in (SFILES): Add filestuff.c.
6444 (OBS): Add filestuff.o.
6445 (filestuff.o): New target.
6446 * config.in, configure: Rebuild.
6447 * configure.ac: Check for fdwalk, pipe2.
6448
7d4e5717
PA
64492013-04-17 Pedro Alves <palves@redhat.com>
6450
6451 * configure.ac (USE_THREAD_DB): Delete variable.
6452 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6453 Don't AC_SUBST USE_THREAD_DB.
6454 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6455 * config.in, configure: Regenerate.
6456
d5c93e41
PA
64572013-04-16 Pedro Alves <palves@redhat.com>
6458
6459 * linux-low.h (struct lwp_info) <thread_known>: Move under
6460 the USE_THREAD_DB #ifdef.
6461
04f5fe89
PA
64622013-04-16 Pedro Alves <palves@redhat.com>
6463
6464 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6465 (linux-low.o): Delete rule.
6466 * linux-low.h: Always include "gdb_thread_db.h" instead of
6467 conditionally including thread_db.h.
6468 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6469 HAVE_THREAD_DB_H.
6470
480b27bf
JK
64712013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 * Makefile.in (install-only): Fix make install regression.
6474
43662968
JK
64752013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6476
6477 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6478 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6479 installation.
6480 * gdbserver.1: Remove.
6481
3e74e146
PA
64822013-03-22 Pedro Alves <palves@redhat.com>
6483
6484 * linux-low.c (handle_extended_wait): Don't call
6485 linux_enable_event_reporting.
6486
a8347a2a
TT
64872013-03-15 Tony Theodore <tonyt@logyst.com>
6488
6489 PR build/9098:
6490 * Makefile.in (SHELL): Use @SHELL@.
6491
eeb56fa7
SDJ
64922013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6493
6494 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6495 compiler warning.
6496
4fa7e2ff
JB
64972013-03-13 Joel Brobecker <brobecker@adacore.com>
6498
6499 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6500 Remove extraneous NULL element.
6501
8ddb1965
YQ
65022013-03-13 Yao Qi <yao@codesourcery.com>
6503
6504 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6505 'V' block in trace frame.
6506
9accd112
MM
65072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6508
6509 * target.h (struct target_ops): Add btrace ops.
6510 (target_supports_btrace): New macro.
6511 (target_enable_btrace): New macro.
6512 (target_disable_btrace): New macro.
6513 (target_read_btrace): New macro.
6514 * gdbthread.h (struct thread_info): Add btrace field.
6515 * server.c: Include btrace-common.h.
6516 (handle_btrace_general_set): New function.
6517 (handle_btrace_enable): New function.
6518 (handle_btrace_disable): New function.
6519 (handle_general_set): Call handle_btrace_general_set.
6520 (handle_qxfer_btrace): New function.
6521 (struct qxfer qxfer_packets[]): Add btrace entry.
6522 * inferiors.c (remove_thread): Disable btrace.
6523 * linux-low: Include linux-btrace.h.
6524 (linux_low_enable_btrace): New function.
6525 (linux_low_read_btrace): New function.
6526 (linux_target_ops): Add btrace ops.
6527 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6528 Add srv_linux_btrace=yes.
6529 (x86_64-*-linux*): Add linux-btrace.o.
6530 Add srv_linux_btrace=yes.
6531 * configure.ac: Define HAVE_LINUX_BTRACE.
6532 * config.in: Regenerated.
6533 * configure: Regenerated.
6534
5cc22e4c
MM
65352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6536
6537 * server.c (handle_qxfer): Preserve error message if -3 is
6538 returned.
6539 (qxfer): Document the -3 return value.
6540
7c97f91e
MM
65412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6542
6543 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6544 (linux_btrace_h): New variable.
6545 (linux-btrace.o): New rule.
6546
be9a119c 65472013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6548 Hafiz Abid Qadeer <abidh@codesourcery.com>
6549
6550 * tracepoint.c (trace_buffer_size): New global.
6551 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6552 (init_trace_buffer): Change to one-argument function. Allocate
6553 trace buffer memory.
6554 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6555 handle QTBuffer:size packet.
6556 (cmd_bigqtbuffer_size): New function.
6557 (initialize_tracepoint): Call init_trace_buffer with
6558 DEFAULT_TRACE_BUFFER_SIZE.
6559 * server.c (handle_query): Add QTBuffer:size in the
6560 supported packets.
6561
e64f7499
YQ
65622013-03-07 Yao Qi <yao@codesourcery.com>
6563
6564 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6565 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6566 of -1.
6567 (cmd_qtsp): Adjust condition. Do post increment.
6568 Set cur_action and cur_step_action back to 0.
6569
f0ae6fc3
PA
65702013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6571
6572 PR server/15236
6573 * linux-low.c (linux_write_memory): Return early success if LEN is
6574 zero.
6575
b5b0b0af
CV
65762013-03-05 Corinna Vinschen <vinschen@redhat.de>
6577
334ad4a8 6578 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6579
589bc927
TT
65802013-02-28 Tom Tromey <tromey@redhat.com>
6581
6582 * configure.ac: Invoke AC_SYS_LARGEFILE.
6583 * configure, config.in: Rebuild.
6584
dfe07582
CV
65852013-02-28 Corinna Vinschen <vinschen@redhat.com>
6586
6587 * win32-low.c: Throughout, fix format strings and casts of
6588 printf-like functions to avoid type related warnings on all
6589 platforms.
6590 (get_child_debug_event): Print dwDebugEventCode as hex since
6591 that's how it's usually documented.
6592
736cd585
YQ
65932013-02-28 Yao Qi <yao@codesourcery.com>
6594
6595 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6596 pulongest.
6597
e1f58301
JW
65982013-02-27 Jiong Wang <jiwang@tilera.com>
6599
6600 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6601 (reg-tilegx32.c): New rule.
6602 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6603 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6604 different register info initializer according to elf class.
6605 (init_registers_tilgx32): New function. The tilegx32 register info
6606 initializer.
6607 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6608 (tile_store_gregset): Likewise.
6609
d171ca78
YQ
66102013-02-27 Yao Qi <yao@codesourcery.com>
6611
6612 * server.c (process_point_options): Print debug message when
6613 debug_threads is true.
6614
282bbdf3
YQ
66152013-02-26 Yao Qi <yao@codesourcery.com>
6616
6617 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6618
aca22551
PA
66192013-02-19 Pedro Alves <palves@redhat.com>
6620 Kai Tietz <ktietz@redhat.com>
6621
6622 PR gdb/15161
6623
6624 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6625 instead of strtoul to extract address from packet.
6626 (process_serial_event) <'z'>: Likewise.
6627
4f3cee1c
YQ
66282013-02-18 Yao Qi <yao@codesourcery.com>
6629
6630 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6631
8e1d55a3
PA
66322013-02-14 Pedro Alves <palves@redhat.com>
6633
6634 Plug memory leak.
6635
6636 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6637 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6638
458820da
PA
66392013-02-14 Pedro Alves <palves@redhat.com>
6640
6641 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6642
baea0dae
PA
66432013-02-14 Pedro Alves <palves@redhat.com>
6644
6645 * tracepoint.c (save_string): Delete.
6646 (add_tracepoint_action): Use savestring instead of save_string.
6647
0b1afbb3
PA
66482013-02-12 Pedro Alves <palves@redhat.com>
6649
6650 * linux-xtensa-low.c: Ditto.
6651 * xtensa-xtregs.c: Ditto.
6652
8a4ac37e
PA
66532013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6654
6655 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6656 thread_db.
6657
148de6bb
MS
66582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6659
6660 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6661 aarch64_num_wp_regs and aarch64_num_bp_regs to
6662 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6663
55fac6e0
MS
66642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6665
6666 * linux-aarch64-low.c (ps_get_thread_area): Replace
6667 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6668
176eb98c
MS
66692013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6670 Marcus Shawcroft <marcus.shawcroft@arm.com>
6671 Nigel Stephens <nigel.stephens@arm.com>
6672 Yufeng Zhang <yufeng.zhang@arm.com>
6673
6674 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6675 (aarch64.c, aarch64-without-fpu.c): New targets.
6676 * configure.srv (aarch64*-*-linux*): New.
6677 * linux-aarch64-low.c: New file.
6678
56f7af9c
MS
66792013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6680
43aaf8b6 6681 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6682 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6683 (dequeue_one_deferred_signal, linux_resume_one_thread)
6684 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6685 (linux_tracefork_grandchild, linux_test_for_tracefork)
6686 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6687 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6688 where the argument is 0.
6689
60f662b0
YQ
66902013-01-25 Yao Qi <yao@codesourcery.com>
6691
6692 * event-loop.c: Include "queue.h".
6693 (gdb_event_p): New typedef.
6694 (struct gdb_event) <next_event>: Remove.
6695 (event_queue): Change to QUEUE(gdb_event_p).
6696 (async_queue_event): Remove.
6697 (gdb_event_xfree): New.
6698 (initialize_event_loop): New.
6699 (process_event): Use API from QUEUE.
6700 (wait_for_event): Likewise.
6701 * server.c (main): Call initialize_event_loop.
6702 * server.h (initialize_event_loop): Declare.
6703
5ae4861a
YQ
67042013-01-18 Yao Qi <yao@codesourcery.com>
6705
6706 * ax.h (struct eval_agent_expr_context): New.
6707 (gdb_eval_agent_expr): Update declaration.
6708 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6709 TFRAME. Add new argument CTX.
6710 * server.h (struct eval_agent_expr_context): Declare.
6711 (agent_mem_read, agent_tsv_read): Update declaration.
6712 (agent_mem_read_string): Likewise.
6713 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6714 (add_traceframe_block): Add new argument TPOINT.
6715 Increase TPOINT->traceframe_usage.
6716 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6717 eval_tracepoint_agent_expr.
6718 (condition_true_at_tracepoint): Likewise.
6719 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6720 (agent_mem_read_string, agent_tsv_read): Likewise.
6721
85e00e85
YQ
67222013-01-16 Yao Qi <yao@codesourcery.com>
6723
6724 * linux-low.c (linux_resume_one_lwp): Don't check
6725 'lwp->bp_reinsert != 0'.
6726
4039cf45
JB
67272013-01-07 Joel Brobecker <brobecker@adacore.com>
6728 Pedro Alves <palves@redhat.com>
6729
6730 * lynx-low.c (ptrace_request_to_str): Define a temporary
6731 macro and use it to simplify this function's implementation.
6732
9044dee2
JB
67332013-01-07 Joel Brobecker <brobecker@adacore.com>
6734
6735 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6736 sets errno.
6737
e6352c8f
JB
67382013-01-07 Joel Brobecker <brobecker@adacore.com>
6739
6740 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6741
50681a27
JB
67422013-01-07 Joel Brobecker <brobecker@adacore.com>
6743
6744 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6745
3f6e77ef
JB
67462013-01-07 Joel Brobecker <brobecker@adacore.com>
6747
6748 * lynx-low.c (lynx_resume): Use the resume_info parameter
6749 to determine the ptid for the lynx_ptrace call, unless
6750 it is equal to minus_one_ptid, in which case we use the
6751 ptid of the current_inferior.
6752 (lynx_wait_1): After having received a thread create/exit
6753 event, resume the inferior's execution using the signaling
6754 thread's ptid, rather than the old ptid.
6755
7fda33ae
JB
67562013-01-07 Joel Brobecker <brobecker@adacore.com>
6757
6758 * lynx-low.c (lynx_resume): Delete variable ret.
6759
b9786c74
JB
67602013-01-01 Joel Brobecker <brobecker@adacore.com>
6761
6762 * gdbreplay.c (gdbreplay_version): Update copyright year.
6763 * server.c (gdbserver_version): Likewise.
6764
8b93d60f
JB
67652012-12-17 Joel Brobecker <brobecker@adacore.com>
6766
6767 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6768 new thread.
6769
037335a7
JB
67702012-12-17 Joel Brobecker <brobecker@adacore.com>
6771
6772 * lynx-low.c (ptrace_request_to_str): Add handling for
6773 PTRACE_GETTRACESIG.
6774
52d4cbd8
JB
67752012-12-17 Joel Brobecker <brobecker@adacore.com>
6776
6777 * lynx-low.c (lynx_attach): Delete variable new_process.
6778
ab8f6ca9
JB
67792012-12-17 Joel Brobecker <brobecker@adacore.com>
6780
6781 * lynx-low.c (lynx_create_inferior): Delete variable
6782 new_process.
6783
78cbc024
JB
67842012-12-17 Joel Brobecker <brobecker@adacore.com>
6785
6786 * lynx-low.c (ptrace_request_to_str): Do not handle
6787 PTRACE_GETTHREADLIST if this macro does not exist.
6788
14a00470
YQ
67892012-12-15 Yao Qi <yao@codesourcery.com>
6790
6791 * Makefile.in (OBS): Add notif.o.
6792 * notif.c, notif.h: New.
6793 * server.c: Include "notif.h".
6794 (struct vstop_notif) <next>: Remove.
6795 <base>: New field.
6796 (queue_stop_reply): Update.
6797 (push_event, send_next_stop_reply): Remove.
6798 (discard_queued_stop_replies): Update.
6799 (notif_stop): New variable.
6800 (handle_v_stopped): Remove.
6801 (handle_v_requests): Don't call handle_v_stopped. Call
6802 handle_ack_notif instead.
6803 (queue_stop_reply_callback): Call notif_event_enque instead
6804 of queue_stop_reply.
6805 (handle_status): Don't call send_next_stop_reply, call
6806 notif_write_event instead.
6807 (kill_inferior_callback): Likewise.
6808 (detach_or_kill_inferior_callback): Likewise.
6809 (main): Call initialize_notif.
6810 (process_serial_event): Call QUEUE_is_empty.
6811 (handle_target_event): Call notif_push instead of push event.
6812 * server.h (push_event): Remove declaration.
6813
61c125b9
TT
68142012-12-10 Tom Tromey <tromey@redhat.com>
6815
6816 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6817 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6818 macros.
6819 (.c.o): Rewrite.
6820 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6821 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6822 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6823 (amd64-linux-ipa.o, ax.o): Rewrite.
6824 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6825 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6826 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6827 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6828 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6829 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6830 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6831 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6832 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6833 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6834 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6835 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6836 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6837 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6838 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6839 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6840 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6841 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6842 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6843 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6844 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6845 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6846 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6847 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6848 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6849 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6850 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6851 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6852 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6853 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6854 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6855 (reg-tilegx.o): Remove.
6856 (all_object_files): New macro.
6857 Include .deps files.
6858 * aclocal.m4, configure: Rebuild.
6859 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6860 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6861 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6862
e90e9ad9
TT
68632012-12-05 Tom Tromey <tromey@redhat.com>
6864
6865 PR gdb/14917:
6866 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6867
02d403bf 68682012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6869
6870 * configure.ac: Check for linux/perf_event.h.
6871 * config.in: Regenerated.
6872 * configure: Regenerated.
6873
0270a750
PA
68742012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6875
6876 * hostio.c (handle_readlink): Decrease buffer size
6877 parameter passed to readlink by one byte.
6878
8c29b58e
YQ
68792012-11-26 Yao Qi <yao@codesourcery.com>
6880
6881 * configure.ac (build_warnings): Append '-Wempty-body'.
6882 * configure: Regenerated.
6883 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6884 body.
6885
8bdce1ff
PM
68862012-11-15 Pierre Muller <muller@sourceware.org>
6887
6888 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6889 * config.in: Regenerate.
6890 * configure: Regenerate.
6891 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6892 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6893 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6894 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6895 header.
6896 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6897 instead of <sys/wait.h> header.
6898 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6899
02d403bf 69002012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6901
6902 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6903 (various make rules): Remove -DGDBSERVER
6904
fbd5db48
YQ
69052012-11-09 Yao Qi <yao@codesourcery.com>
6906
6907 * spu-low.c (current_ptid): Move it to ..
6908 * gdbthread.h: ... here. New.
6909 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6910 * server.c (myresume, process_serial_event): Likewise.
6911 * thread-db.c (thread_db_find_new_threads): Likewise.
6912 * tracepoint.c (run_inferior_command): Likewise.
6913
b3dc46ff
AB
69142012-10-01 Andrew Burgess <aburgess@broadcom.com>
6915
6916 * server.c (handle_search_memory_1): Include access length in
6917 warning message.
6918
07c04788
HPN
69192012-09-05 Michael Brandt <michael.brandt@axis.com>
6920
6921 * linux-crisv32-low.c: Fix compile errors.
6922
918d227b
YQ
69232012-09-04 Yao Qi <yao@codesourcery.com>
6924
6925 * tracepoint.c (cmd_qtsv): Adjust debug message.
6926 Don't check CUR_TPOINT.
6927
18c1b81a
YQ
69282012-08-28 Yao Qi <yao@codesourcery.com>
6929
6930 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6931 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6932 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6933 Remove declarations of xmalloc, xreallloc, xstrdup and
6934 freeargv.
6935 * Makefile.in (libiberty_h): New.
6936 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6937 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6938
dc82f37b
YQ
69392012-08-23 Yao Qi <yao@codesourcery.com>
6940
6941 * server.h: Remove declaration of 'xsnprintf'.
6942
406b1477
KS
69432012-08-22 Keith Seitz <keiths@redhat.com>
6944
6945 * server.h: Include build-gnulib-gbserver/config.h.
6946 * gdbreplay.c: Likewise.
6947
e6712ff1
DE
69482012-08-08 Doug Evans <dje@google.com>
6949
6950 * Makefile.in (SFILES): Add gdb_vecs.c.
6951 (OBS): Add gdb_vecs.o.
6952 (gdb_vecs_h, host_defs_h): New variables.
6953 (thread-db.o): Add $(gdb_vecs_h) dependency.
6954 (gdb_vecs.o): New rule.
6955 * thread-db.c: #include "gdb_vecs.h".
6956 (thread_db_load_search): Use a vector to iterate over path elements.
6957 Handle text appearing after "$pdir".
6958
6959 * configure.ac: Add check for strstr.
6960 * config.in: Regenerate.
6961 * configure: Regenerate.
6962
7c3270ae
UW
69632012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6964
6965 * hostio.c (handle_pread): If pread fails, fall back to attempting
6966 lseek/read.
6967 (handle_pwrite): Likewise for pwrite.
6968
b62e2b27
UW
69692012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6970
6971 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6972 between unsupported TYPE and unimplementable ADDR/LEN combination.
6973 (arm_insert_point): Act on new return value.
6974
78a99e91
PA
69752012-07-31 Pedro Alves <palves@redhat.com>
6976
6977 * server.c (process_point_options): Only skip tokens if we find
6978 one that is unrecognized. Don't treat 'X' specially while
6979 skipping unrecognized tokens.
6980
fcf303ab
UW
69812012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6982
6983 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6984 to 4-byte-align HW breakpoint addresses for Thumb.
6985
7255706c
YQ
69862012-07-27 Yao Qi <yao@codesourcery.com>
6987
6988 PR remote/14161.
6989
6990 * server.h: Declare gdb_agent_about_to_close.
6991 * target.c (kill_inferior): Include "agent.h".
6992 New. Send command 'kill'.
6993 * target.h (kill_inferior): Removed macro.
6994 * tracepoint.c (gdb_agent_about_to_close): New.
6995 (gdb_agent_helper_thread): Handle command 'close'.
6996 Wait endlessly until the inferior stops.
6997 Install gdb_agent_remove_socket to atexit hook.
6998 (agent_socket_name): New static variable.
6999 (gdb_agent_socket_init): Replace local variable 'name' with
7000 'agent_socket_name'.
7001 (gdb_agent_remove_socket): New.
7002
5a3f286f
YQ
70032012-07-27 Yao Qi <yao@codesourcery.com>
7004
7005 * server.c (process_point_options): Stop at 'X' when parsing.
7006
961bd387
ME
70072012-07-19 Michael Eager <eager@eagercon.com>
7008
a261b8f5 7009 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7010 to hw_execute.
7011 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7012 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7013 hardware breakpoint.
7014
aa7c7447
JK
70152012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7016
7017 * gdbserver/linux-low.c (initialize_low): Call
7018 linux_ptrace_init_warnings.
7019
7f216e7c
DE
70202012-07-02 Doug Evans <dje@google.com>
7021
7022 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7023 pointer to int.
7024
d3ce09f5
SS
70252012-07-02 Stan Shebs <stan@codesourcery.com>
7026
7027 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7028 (ax.o): Add it to build rule.
7029 (ax-ipa.o): Ditto.
7030 (OBS): Add format.o.
7031 (IPA_OBS): Add format.o.
7032 * server.c (handle_query): Claim support for breakpoint commands.
7033 (process_point_options): Add command case.
7034 (process_serial_event): Leave running if there are printfs in
7035 effect.
7036 * mem-break.h (any_persistent_commands): Declare.
7037 (add_breakpoint_commands): Declare.
7038 (gdb_no_commands_at_breakpoint): Declare.
7039 (run_breakpoint_commands): Declare.
7040 * mem-break.c (struct point_command_list): New struct.
7041 (struct breakpoint): New field command_list.
7042 (any_persistent_commands): New function.
7043 (add_commands_to_breakpoint): New function.
7044 (add_breakpoint_commands): New function.
7045 (gdb_no_commands_at_breakpoint): New function.
7046 (run_breakpoint_commands): New function.
7047 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7048 locally.
7049 * ax.c: Include format.h.
7050 (ax_printf): New function.
7051 (gdb_eval_agent_expr): Add printf opcode.
7052
2f8f6aed
YQ
70532012-06-13 Yao Qi <yao@codesourcery.com>
7054
7055 * server.c (start_inferior): Remove duplicated writes to fields
7056 'last_resume_kind' and 'last_status' of 'current_inferior'.
7057
0c9070b3
YQ
70582012-06-12 Yao Qi <yao@codesourcery.com>
7059 Pedro Alves <palves@redhat.com>
7060
7061 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7062 comment.
7063 * server.c (handle_v_cont): Extend comment.
7064
c52daf70
YQ
70652012-06-11 Yao Qi <yao@codesourcery.com>
7066
7067 * linux-low.c (linux_attach): Add 'static'.
7068
d38bbb0a
YQ
70692012-06-06 Yao Qi <yao@codesourcery.com>
7070
7071 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7072
89dc0afd
JK
70732012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7074
7075 Fix gcc -flto compilation warning.
7076 * server.c (main): Make variable multi_mode and attach volatile.
7077
75f62ce7
TJB
70782012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7079
7080 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7081 if the platform doesn't know about it.
7082
65f479b6
PA
70832012-05-30 Jeff Kenton <jkenton@tilera.com>
7084
7085 * Makefile.in (SFILES): Add linux-tile-low.c.
7086 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7087 * configure.srv: Handle tilegx-*-linux*.
7088 * linux-tile-low.c: New file.
7089
0c5bf5a9
JK
70902012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7091
7092 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7093
a493e3e2
PA
70942012-05-24 Pedro Alves <palves@redhat.com>
7095
7096 PR gdb/7205
7097
43aaf8b6 7098 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7099
2ea28649
PA
71002012-05-24 Pedro Alves <palves@redhat.com>
7101
7102 PR gdb/7205
7103
7104 Replace target_signal with gdb_signal throughout.
7105
8d409d16
MR
71062012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7107
7108 * linux-low.c (linux_store_registers): Avoid the copying sequence
7109 when no data has been retrieved by ptrace.
7110
23512c01
MGD
71112012-05-22 Will Deacon <will.deacon@arm.com>
7112
7113 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7114 Include asm/ptrace.h.
7115 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7116 already defined.
7117
4934b29e
MR
71182012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7119
7120 * linux-low.c (linux_store_registers): Don't re-retrieve data
7121 with ptrace that has already been obtained from /proc. Always
7122 copy any data retrieved with ptrace to the buffer supplied.
7123
bde24c0a
PA
71242012-05-11 Yao Qi <yao@codesourcery.com>
7125 Pedro Alves <palves@redhat.com>
7126
7127 * linux-low.c (enum stopping_threads_kind): New.
7128 (stopping_threads): Change type to `enum stopping_threads_kind'.
7129 (handle_extended_wait): If stopping and suspending threads, leave
7130 the new_lwp suspended too.
7131 (linux_wait_for_event): Adjust.
7132 (stop_all_lwps): Set `stopping_threads' to
7133 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7134 whether we're suspending threads or just stopping them. Assert no
7135 recursion happens.
7136
623b6bdf
YQ
71372012-04-29 Yao Qi <yao@codesourcery.com>
7138
7139 * server.h: Move some code to ...
7140 * gdbthread.h: ... here. New.
7141 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7142 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7143 (nto-low.o, win32-low.o): Likewise.
7144 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7145 * regcache.c, remote-utils.c, server.c: Likewise.
7146 * target.c, tracepoint.c, win32-low.c: Likewise.
7147
f15f9948
TJB
71482012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7149
7150 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7151 (PTRACE_ARG4_TYPE): Likewise.
7152 (PTRACE_XFER_TYPE): Likewise.
7153 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7154 ptrace to PTRACE_ARG3_TYPE.
7155 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7156 (PTRACE_ARG4_TYPE): Likewise.
7157 (PTRACE_XFER_TYPE): Likewise.
7158 (linux_detach_one_lwp): Cast fourth argument of
7159 ptrace to long then PTRACE_ARG4_TYPE.
7160 (regsets_fetch_inferior_registers): Cast third argument of
7161 ptrace to long then PTRACE_ARG3_TYPE.
7162 (regsets_store_inferior_registers): Likewise.
7163
38ea300a
PA
71642012-04-20 Pedro Alves <palves@redhat.com>
7165
7166 * configure: Regenerate.
7167
c971b7fa
PA
71682012-04-19 Pedro Alves <palves@redhat.com>
7169
43aaf8b6 7170 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7171 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7172 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7173 (all, install-only, uninstall, clean-info, all-lib, clean): No
7174 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7175 (maintainer-clean realclean distclean): Use subdir_do.
7176 (subdir_do): New.
7177 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7178 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7179 * acinclude.m4: Include acx_configure_dir.m4.
7180 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7181 calls. Call AC_PROG_RANLIB. Configure gnulib using
7182 ACX_CONFIGURE_DIR.
7183 (GNULIB): New.
7184 (GNULIB_STDINT_H): Adjust.
7185 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7186 * gdbreplay.c: Include build-gnulib/config.h.
7187 * server.h: Likewise.
7188 * aclocal.m4: Regenerate.
7189 * config.in: Regenerate.
7190 * configure: Regenerate.
c971b7fa 7191
809277f8
PA
71922012-04-19 Pedro Alves <palves@redhat.com>
7193
7194 * Makefile.in (LIBGNU, INCGNU): Adjust.
7195 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7196 (all, install-only, uninstall, clean-info, all-lib, clean)
7197 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7198 * configure.ac: Adjust AC_OUTPUT output.
7199 * aclocal.m4: Regenerate.
7200 * configure: Regenerate.
7201
fd9bb8b8
PA
72022012-04-19 Pedro Alves <palves@redhat.com>
7203
7204 * Makefile.in (generated_files): New.
7205 (server_h): Remove the explicit dependency on config.h, and depend
7206 on $generated_files.
7207
1c298c66
PA
72082012-04-19 Pedro Alves <palves@redhat.com>
7209
7210 * Makefile.in (INCGNU): Add -Ignulib.
7211
57c4b50b
PA
72122012-04-19 Pedro Alves <palves@redhat.com>
7213
7214 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7215 (INCGNU): ... this, and spell out -I here.
7216 (GNULIB_LIB): Rename to ...
7217 (LIBGNU): ... this.
7218 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7219
1030e047
PA
72202012-04-19 Pedro Alves <palves@redhat.com>
7221
7222 * config.in: Regenerate.
7223
447d4319
PA
72242012-04-19 Pedro Alves <palves@redhat.com>
7225
7226 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7227 * server.h (memmem): Remove declaration.
7228 * config.in: Regenerate.
7229 * configure: Regenerate.
7230
aad9eab9
YQ
72312012-04-19 Yao Qi <yao@codesourcery.com>
7232
7233 * Makefile.in (SFILES): Add common/vec.c.
7234 (OBS): Add vec.o.
7235 (vec.o): New rule.
7236
3e10640f
YQ
72372012-04-19 Yao Qi <yao@codesourcery.com>
7238
7239 * remote-utils.c (prepare_resume_reply): Replace with macro
7240 target_core_of_thread.
7241 * server.c (handle_qxfer_threads_proper): Likewise.
7242 * target.h (traget_core_of_thread): New macro.
7243
71622373
PA
72442012-04-18 Pedro Alves <palves@redhat.com>
7245
7246 * aclocal.m4: Regenerate.
7247 * configure: Regenerate.
7248
80d26939
YQ
72492012-04-16 Yao Qi <yao@codesourcery.com>
7250
7251 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7252 duplicated on address.
7253
42476b70
YQ
72542012-04-16 Yao Qi <yao@codesourcery.com>
7255
7256 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7257 (struct tracepoint_action_ops) <send>: New field.
7258 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7259 (agent_expr_send, x_tracepoint_action_send): New.
7260 (l_tracepoint_action_send): New.
7261 (cmd_qtdp): Download and install tracepoint
7262 according to `use_agent'.
7263 (run_inferior_command): Add one more parameter `len'.
7264 Update callers.
7265 (tracepoint_send_agent): New.
7266 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7267
7bc83639
YQ
72682012-04-16 Yao Qi <yao@codesourcery.com>
7269
7270 * tracepoint.c (download_tracepoints): Moved to ...
7271 (cmd_qtstart): ... here.
7272
5f18041e
YQ
72732012-04-14 Yao Qi <yao@codesourcery.com>
7274
7275 * tracepoint.c: Include inttypes.h.
7276 (struct collect_memory_action): Use sized types.
7277 (struct tracepoint): Likewise.
7278 (cmd_qtdp, stop_tracing): Update print specifiers.
7279 (cmd_qtp, response_tracepoint): Likewise.
7280 (collect_data_at_tracepoint): Likewise.
7281 (collect_data_at_step): Likewise.
7282
55a8c076
YQ
72832012-04-14 Yao Qi <yao@codesourcery.com>
7284
7285 Import gnulib module inttypes.
7286 * aclocal.m4, config.in, configure: Regenerated.
7287
dc750257
YQ
72882012-04-14 Yao Qi <yao@codesourcery.com>
7289
7290 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7291 Makefile and config.status at last.
7292
0ab5faf9
YQ
72932012-04-13 Yao Qi <yao@codesourcery.com>
7294
7295 * tracepoint.c: Include stdint.h unconditionally.
7296
18f5fd81
TJB
72972012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7298
7299 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7300 on BFD_HAVE_SYS_PROCFS_TYPE.
7301 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7302 * configure: Regenerate.
7303 * config.in: Likewise.
7304
4d47af5c
L
73052012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7306
7307 * Makefile.in (clean): Also remove x32.c x32-linux.c
7308 x32-avx.c x32-avx-linux.c.
7309 (x32.o): New target.
7310 (x32.c): Likewise.
7311 (x32-linux.o): Likewise.
7312 (x32-linux.c): Likewise.
7313 (x32-avx.o): Likewise.
7314 (x32-avx.c): Likewise.
7315 (x32-avx-linux.o): Likewise.
7316 (x32-avx-linux.c): Likewise.
7317
7318 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7319 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7320 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7321 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7322 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7323 i386/x32-avx-linux.xml.
7324
7325 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7326 (init_registers_x32_avx_linux): Likwise.
7327 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7328 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7329
ecedbe58
PA
73302012-04-13 Pedro Alves <palves@redhat.com>
7331
7332 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7333 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7334 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7335 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7336 the sub-make.
7337
c92b5177
L
73382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7339
7340 * linux-x86-low.c (compat_x32_clock_t): New.
7341 (compat_x32_siginfo_t): Likewise.
7342 (compat_x32_siginfo_from_siginfo): Likewise.
7343 (siginfo_from_compat_x32_siginfo): Likewise.
7344 (linux_is_elf64): Likewise.
7345 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7346 and siginfo_from_compat_x32_siginfo for x32.
7347 (x86_arch_setup): Set linux_is_elf64.
7348
214d508e
L
73492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7350
7351 PR gdb/13969
7352 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7353 e_machine field.
7354 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7355 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7356 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7357 compatible with process.
7358
c9a1864a
YQ
73592012-04-12 Yao Qi <yao@codesourcery.com>
7360
7361 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7362 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7363 (install-only, install-info, clean): Handle sub dir gnulib.
7364 (all-lib, am--refresh): New targets.
7365 (memmem.o): Remove target.
7366 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7367 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7368 (AC_REPLACE_FUNCS): Remove memmem.
7369 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7370 (AC_OUTPUT): Generate Makefile in gnulib/.
7371 * aclocal.m4, config.in, configure: Regenerated.
7372
367ba2c2
MR
73732012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7374
7375 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7376
9d236627
PA
73772012-04-05 Pedro Alves <palves@redhat.com>
7378
7379 -Werror=strict-aliasing
7380
7381 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7382 pointer.
7383
111217b3
PA
73842012-04-04 Pedro Alves <palves@redhat.com>
7385
7386 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7387 (sparc_store_gregset_from_stack, sparc_store_gregset)
7388 (sparc_breakpoint_at): Fix formatting.
7389
8365dcf5
TJB
73902012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7391
7392 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7393 are available.
7394 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7395 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7396 * config.in: Regenerate.
7397 * configure: Likewise.
7398
689cc2ae
PA
73992012-03-29 Pedro Alves <palves@redhat.com>
7400
7401 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7402 Correct ptrace arguments.
7403
c14dfd32
PA
74042012-03-28 Pedro Alves <palves@redhat.com>
7405
7406 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7407 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7408 (IA64_FR1_REGNUM): New defines.
7409 (ia64_fetch_register): New.
7410 (the_low_target): Install it.
7411 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7412 field.
7413 * linux-low.c (linux_fetch_registers): Try the
7414 the_low_target.fetch_register hook first.
7415
7416 * linux-arm-low.c (the_low_target): Adjust.
7417 * linux-bfin-low.c (the_low_target): Adjust.
7418 * linux-cris-low.c (the_low_target): Adjust.
7419 * linux-crisv32-low.c (the_low_target): Adjust.
7420 * linux-m32r-low.c (the_low_target): Adjust.
7421 * linux-m68k-low.c (the_low_target): Adjust.
7422 * linux-mips-low.c (the_low_target): Adjust.
7423 * linux-ppc-low.c (the_low_target): Adjust.
7424 * linux-s390-low.c (the_low_target): Adjust.
7425 * linux-sh-low.c (the_low_target): Adjust.
7426 * linux-sparc-low.c (the_low_target): Adjust.
7427 * linux-tic6x-low.c (the_low_target): Adjust.
7428 * linux-x86-low.c (the_low_target): Adjust.
7429 * linux-xtensa-low.c (the_low_target): Adjust.
7430
63c88e13
PA
74312012-03-26 Pedro Alves <palves@redhat.com>
7432
7433 * server.c (handle_qxfer_libraries): Don't bail early if
7434 the_target->qxfer_libraries_svr4 is not NULL.
7435
fb723180
PA
74362012-03-26 Pedro Alves <palves@redhat.com>
7437
7438 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7439
0afae3cf
PA
74402012-03-23 Pedro Alves <palves@redhat.com>
7441
7442 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7443 "library-list-svr4" element's start tag when the the DSO list is
7444 empty.
7445
485f1ee4
PA
74462012-03-23 Pedro Alves <palves@redhat.com>
7447
7448 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7449 a variable whose type size is the same as the inferior's pointer
7450 size.
7451
a5362b9a
TS
74522012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7453
7454 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7455 struct siginfo.
7456 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7457 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7458 * linux-low.h: Include <signal.h>.
7459 (struct siginfo): Remove forward declaration.
7460 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7461 struct siginfo.
7462
d226c142
MF
74632012-03-21 Mike Frysinger <vapier@gentoo.org>
7464
7465 * .gitignore: Ignore more files.
7466
122f36ef
PA
74672012-03-19 Pedro Alves <palves@redhat.com>
7468 Jan Kratochvil <jan.kratochvil@redhat.com>
7469
7470 * server.c (cont_thread, general_thread): Add describing comments.
7471 (start_inferior): Clear `cont_thread'.
7472 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7473 of a process.
7474
fc3e5175
YQ
74752012-03-15 Yao Qi <yao@codesourcery.com>
7476
7477 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7478 handling to ...
7479 (cmd_qtdp): ... here.
7480
8d0d92cd
YQ
74812012-03-15 Yao Qi <yao@codesourcery.com>
7482
7483 * tracepoint.c (struct tracepoint_action_ops): New.
7484 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7485 (m_tracepoint_action_download): New.
7486 (r_tracepoint_action_download): New.
7487 (x_tracepoint_action_download): New.
7488 (l_tracepoint_action_download): New.
7489 (add_tracepoint_action): Install `action->ops' according type.
7490 (download_tracepoint_1): Move code `download' function pointer
7491 of various tracepoint_action_ops.
7492
87b0bb13
JK
74932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7494
7495 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7496 linux_ptrace_attach_warnings.
7497
5f572dec
JK
74982012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7499
7500 * Makefile.in (linux-ptrace.o): New.
7501 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7502 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7503 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7504 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7505 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7506 of these targets.
7507 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7508
f4647387
YQ
75092012-03-08 Yao Qi <yao@codesourcery.com>
7510 Pedro Alves <palves@redhat.com>
7511
7512 Fix PR server/13392.
7513 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7514 offset of JMP insn.
7515 * tracepoint.c (remove_tracepoint): New.
7516 (cmd_qtdp): Call remove_tracepoint when failed to install.
7517
9b224c5e
PA
75182012-03-07 Pedro Alves <palves@redhat.com>
7519
7520 * linux-low.c (get_detach_signal): New.
7521 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7522 Pass on pending signals to PTRACE_DETACH. Check the result of the
7523 ptrace call.
7524 * server.c (program_signals, program_signals_p): New.
7525 (handle_general_set): Handle QProgramSignals.
7526 * server.h (program_signals, program_signals_p): Declare.
7527
e237a7e2
JK
75282012-03-05 Pedro Alves <palves@redhat.com>
7529 Jan Kratochvil <jan.kratochvil@redhat.com>
7530
7531 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7532 New comment why.
7533
5808517f
YQ
75342012-03-03 Yao Qi <yao@codesourcery.com>
7535
7536 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7537 agent_look_up_symbols.
7538
58b4daa5
YQ
75392012-03-03 Yao Qi <yao@codesourcery.com>
7540
7541 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7542 (linux-x86-low.o): Likewise.
7543 * server.h: Remove in_process_agent_loaded.
7544 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7545 common/agent.c.
7546 Update callers.
7547
8ffcbaaf
YQ
75482012-03-03 Yao Qi <yao@codesourcery.com>
7549
7550 * tracepoint.c (gdb_agent_capability): New global.
7551 (in_process_agent_loaded_ust): Renamed to
7552 `in_process_agent_supports_ust'.
7553 Update callers.
7554 (in_process_agent_supports_ust): Call agent_capability_check.
7555 (clear_installed_tracepoints): Assert that agent supports
7556 agent.
7557
d1feda86
YQ
75582012-03-03 Yao Qi <yao@codesourcery.com>
7559
7560 * linux-low.c (linux_supports_agent): New.
7561 (linux_target_ops): Initialize field `supports_agent' with
7562 linux_supports_agent.
7563 * target.h (struct target_ops) <supports_agent>: New.
7564 (target_supports_agent): New macro.
7565 * server.c (handle_general_set): Handle packet 'QAgent'.
7566 (handle_query): Send `QAgent+'.
7567 * Makefile.in (server.o): Depends on agent.h.
7568
2fa291ac
YQ
75692012-03-03 Yao Qi <yao@codesourcery.com>
7570
7571 * Makefile.in (OBS): Add agent.o.
7572 Add new rule for agent.o.
7573 Track dependence of tracepoint.c on agent.h.
7574 * tracepoint.c (run_inferior_command_1):
7575 (run_inferior_command): Call agent_run_command.
7576 (gdb_ust_connect_sync_socket): Deleted. Move it to
7577 common/agent.c.
7578 (resume_thread, stop_thread): Likewise.
7579 (gdb_ust_socket_init): Renamed to ...
7580 (gdb_agent_socket_init): ... New.
7581 (gdb_ust_thread): Renamed to ...
7582 (gdb_agent_helper_thread): ... New.
7583 (gdb_ust_init): Move some code to ...
7584 (gdb_agent_init): ... here. New.
7585 [HAVE_UST]: Call gdb_ust_init.
7586 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7587 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7588 * config.in, configure: Regenerated.
7589
05044653
PA
75902012-03-02 Pedro Alves <palves@redhat.com>
7591
7592 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7593 * linux-low.c (struct simple_pid_list): New.
7594 (stopped_pids): New a struct simple_pid_list pointer.
7595 (add_to_pid_list, pull_pid_from_list): New.
7596 (handle_extended_wait): Don't assume the first signal new children
7597 report is SIGSTOP. Adjust call to pull_pid_from_list.
7598 (linux_wait_for_lwp): Adjust.
7599
8d00225b
YQ
76002012-03-02 Yao Qi <yao@codesourcery.com>
7601
7602 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7603 debug log.
7604
19560ba5
YQ
76052012-03-02 Yao Qi <yao@codesourcery.com>
7606
7607 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7608 `stop_pc' and `tpoint'. Update caller.
7609
1faeff08
MR
76102012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7611
7612 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7613 * linux-low.c (use_linux_regsets): New macro.
7614 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7615 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7616 (linux_register_in_regsets): New function.
7617 (usr_fetch_inferior_registers): Skip registers covered by
7618 regsets.
7619 (usr_store_inferior_registers): Likewise.
7620 (usr_fetch_inferior_registers): New macro.
7621 (usr_store_inferior_registers): Likewise.
7622 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7623 (linux_store_registers): Likewise.
7624 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7625 prototype.
7626 (init_registers_mips64_dsp_linux): Likewise.
7627 (init_registers_mips_linux): New macro.
7628 (init_registers_mips_dsp_linux): Likewise.
7629 (mips_dsp_num_regs): Likewise.
7630 (DSP_BASE, DSP_CONTROL): New fallback macros.
7631 (mips_base_regs): New macro.
7632 (mips_regmap): Use it. Fix the size.
7633 (mips_dsp_regmap): New variable.
7634 (mips_dsp_regset_bitmap): Likewise.
7635 (mips_arch_setup): New function.
7636 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7637 than mips_regmap.
7638 (mips_cannot_store_register): Likewise.
7639 (the_low_target): Update .arch_setup, .num_regs and .regmap
7640 initializers. Add .regset_bitmap initializer.
7641 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7642 initializer.
7643 * linux-bfin-low.c (the_low_target): Likewise.
7644 * linux-cris-low.c (the_low_target): Likewise.
7645 * linux-crisv32-low.c (the_low_target): Likewise.
7646 * linux-ia64-low.c (the_low_target): Likewise.
7647 * linux-m32r-low.c (the_low_target): Likewise.
7648 * linux-m68k-low.c (the_low_target): Likewise.
7649 * linux-ppc-low.c (the_low_target): Likewise.
7650 * linux-s390-low.c (the_low_target): Likewise.
7651 * linux-sh-low.c (the_low_target): Likewise.
7652 * linux-sparc-low.c (the_low_target): Likewise.
7653 * linux-tic6x-low.c (the_low_target): Likewise.
7654 * linux-x86-low.c (the_low_target): Likewise.
7655 * linux-xtensa-low.c (the_low_target): Likewise.
7656 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7657 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7658 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7659 srv_xmlfiles.
7660 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7661 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7662
c03e6ccc
YQ
76632012-02-29 Yao Qi <yao@codesourcery.com>
7664 Pedro Alves <palves@redhat.com>
7665
7666 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7667 `step_over_finished' is true.
7668
644cebc9
PA
76692012-02-27 Pedro Alves <palves@redhat.com>
7670
7671 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7672 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7673
c14d7ab2
PA
76742012-02-27 Pedro Alves <palves@redhat.com>
7675
7676 PR server/9684
7677 * linux-low.c (pid_is_stopped): New.
7678 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7679
412c89dd
LM
76802012-02-25 Luis Machado <lgustavo@codesourcery.com>
7681
7682 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7683 of conditions.
7684
b745defe
MR
76852012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7686
7687 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7688
9f3a5c85
LM
76892012-02-24 Luis Machado <lgustavo@codesourcery>
7690
7691 * server.c (handle_query): Advertise support for target-side
7692 breakpoint condition evaluation.
7693 (process_point_options): New function.
7694 (process_serial_event): When inserting a breakpoint, check for
7695 a target-side condition that should be evaluated.
7696
7697 * mem-break.c: Include regcache.h and ax.h.
7698 (point_cond_list_t): New data structure.
7699 (breakpoint) <cond_list>: New field.
7700 (find_gdb_breakpoint_at): Make non-static.
7701 (delete_gdb_breakpoint_at): Clear any target-side
7702 conditions.
7703 (clear_gdb_breakpoint_conditions): New function.
7704 (add_condition_to_breakpoint): Likewise.
7705 (add_breakpoint_condition): Likewise.
7706 (gdb_condition_true_at_breakpoint): Likewise.
7707 (gdb_breakpoint_here): Return result directly instead
7708 of going through a local variable.
7709
7710 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7711 (clear_gdb_breakpoint_conditions): Likewise.
7712 (add_breakpoint_condition): Likewise.
7713 (gdb_condition_true_at_breakpoint): Likewise.
7714
7715 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7716 (need_step_over_p): Take target-side breakpoint condition into
7717 consideration.
7718
5e1dc496
LM
77192012-02-24 Luis Machado <lgustavo@codesourcery>
7720
7721 * server.h: Include tracepoint.h.
7722 (agent_mem_read, agent_get_trace_state_variable_value,
7723 agent_set_trace_state_variable_value,
7724 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7725 get_set_tsv_func_addr): New prototypes.
7726
7727 * ax.h: New include file.
7728 * ax.c: New source file.
7729
7730 * tracepoint.c: Include ax.h.
7731 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7732 agent_expr, eval_result_type): Move to ax.h.
7733 (parse_agent_expr): Rename to ...
7734 (gdb_parse_agent_expr): ... this, make it non-static and move
7735 to ax.h.
7736 (unparse_agent_expr) Rename to ...
7737 (gdb_unparse_agent_expr): ... this, make it non-static and move
7738 to ax.h.
7739 (eval_agent_expr): Rename to ...
7740 (eval_tracepoint_agent_expr): ... this.
7741 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7742 forward declarations.
7743 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7744 (agent_get_trace_state_variable_value): New function.
7745 (agent_set_trace_state_variable_value): New function.
7746 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7747 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7748 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7749 (condition_true_at_tracepoint): Likewise.
7750 (parse_agent_expr): Rename to ...
7751 (gdb_parse_agent_expr): ... this and move to ax.c.
7752 (unparse_agent_expr): Rename to ...
7753 (gdb_unparse_agent_expr): ... this and move to ax.c.
7754 (gdb_agent_op_name): Move to ax.c.
7755 (eval_agent_expr): Rename to ...
7756 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7757 and move to ax.c.
7758 (eval_tracepoint_agent_expr): New function.
7759 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7760 non-static.
5e1dc496
LM
7761 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7762 ax.c.
7763 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7764 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7765 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7766 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7767 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7768 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7769 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7770 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7771 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7772 (compile_bytecodes): Remove forward declaration.
7773 (is_goto_target): Move to ax.c.
7774 (compile_bytecodes): Move to ax.c and call
7775 agent_get_trace_state_variable_value (...) and
7776 agent_set_trace_state_variable_value (...).
7777
7778 * Makefile.in: Update ax.c and IPA dependencies.
7779
277e4e52
PA
77802012-02-24 Pedro Alves <palves@redhat.com>
7781
7782 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7783 (cmd_bigqtbuffer_circular): ... this. Only handle
7784 'QTBuffer:circular:'.
7785 (handle_tracepoint_general_set): Adjust.
7786
bf4c19f7
YQ
77872012-02-16 Yao Qi <yao@codesourcery.com>
7788
7789 * inferiors.c: Move code to ...
7790 * dll.c: .... here. New.
7791 * server.h: Declare clear_dlls.
7792 * Makefile.in (SFILES): Add dll.c.
7793 (OBS): Add dll.o
7794 (dll.o): New rule.
7795
d73f2619
YQ
77962012-02-11 Yao Qi <yao@codesourcery.com>
7797
7798 * server.c: (handle_monitor_command): Add a new parameter
7799 `own_buf'.
7800 (handle_query): Update caller.
7801
f8255c2a
JB
78022012-02-09 Joel Brobecker <brobecker@adacore.com>
7803
7804 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7805 * configure, config.in: Regenerate.
7806 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7807 is not defined.
7808
da84f473
PA
78092012-02-02 Pedro Alves <palves@redhat.com>
7810
7811 Try SIGKILL first, then PTRACE_KILL.
7812 * linux-low.c (linux_kill_one_lwp): New.
7813 (linux_kill_one_lwp): Rename to ...
7814 (kill_one_lwp_callback): ... this. Use the new
7815 linux_kill_one_lwp.
7816
e886a173
PA
78172012-02-02 Pedro Alves <palves@redhat.com>
7818
7819 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7820 inferior.
7821
be07f1a2
PA
78222012-01-27 Pedro Alves <palves@redhat.com>
7823
7824 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7825 (elf_64_file_p): Make static.
7826 (linux_pid_exe_is_elf_64_file): New.
7827 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7828 Delete declarations.
7829 (linux_pid_exe_is_elf_64_file): Declare.
7830 * linux-x86-low.c (x86_arch_setup): Use
7831 linux_pid_exe_is_elf_64_file.
7832
d8301ad1
JK
78332012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7834
7835 * linux-low.c (linux_wait_for_event_1): Rename to ...
7836 (linux_wait_for_event): ... here and merge it with former
7837 linux_wait_for_event - new variable wait_ptid, use it.
7838 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7839
01b17894
PA
78402012-01-23 Pedro Alves <palves@redhat.com>
7841
7842 * server.c (main): Avoid yet another case of infinite loop while
7843 detaching/killing after a longjmp.
7844
e825046f
JK
78452012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7846
7847 Code cleanup.
7848 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7849
b9e7b9c3
UW
78502012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7851
7852 * hostio.c (handle_readlink): New function.
7853 (handle_vFile): Call it to handle "vFile:readlink" packets.
7854
901f9912
UW
78552012-01-20 Pedro Alves <palves@redhat.com>
7856 Ulrich Weigand <ulrich.weigand@linaro.org>
7857
7858 * server.c (handle_v_requests): Only support vAttach and vRun to
7859 start multiple processes when in extended protocol mode.
7860
fc1ab1a0
PA
78612012-01-17 Pedro Alves <palves@redhat.com>
7862
7863 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7864 memalign plus mprotect to allocate the scratch buffer.
7865
7d5d4e98
PA
78662012-01-13 Pedro Alves <palves@redhat.com>
7867
7868 * server.c (attach_inferior): Clear `cont_thread'.
7869
f128d5e9
PA
78702012-01-13 Pedro Alves <palves@redhat.com>
7871
7872 * server.c (main): Avoid infinite loop while detaching/killing
7873 after a longjmp.
7874
06db92f0
DE
78752012-01-09 Doug Evans <dje@google.com>
7876
7877 * server.c (start_inferior): Set last_ptid in --wrapper case.
7878
32d92999
YQ
78792012-01-06 Yao Qi <yao@codesourcery.com>
7880
7881 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7882 defined.
7883 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7884
5e0a92a9
YQ
78852012-01-04 Yao Qi <yao@codesourcery.com>
7886
7887 * tracepoint.c (cmd_qtdp): Print debug message
7888 for static tracepoint.
7889
ae639e8c
YQ
78902012-01-04 Yao Qi <yao@codesourcery.com>
7891
7892 * tracepoint.c (trace_vdebug): Differentiate debug message
7893 between gdbserver and IPA.
7894
f72429c5
YQ
78952012-01-03 Yao Qi <yao@codesourcery.com>
7896
7897 * tracepoint.c (tracepoint_was_hit): Don't collect for
7898 static tracepoint.
7899
12c3e59c
JB
79002012-01-02 Joel Brobecker <brobecker@adacore.com>
7901
7902 * terminal.h: Reformat copyright header.
7903
67827812
JB
79042012-01-02 Joel Brobecker <brobecker@adacore.com>
7905
7906 * server.c (gdbserver_version): Update copyright year.
7907 * gdbreplay.c (gdbreplay_version): Likewise.
7908
3e52c33d
JK
79092011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7910
7911 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7912
7913 Revert:
7914 2011-12-18 Hui Zhu <teawater@gmail.com>
7915 * linux-low.c (linux_create_inferior): Save return value to ret.
7916
66f1260e
HZ
79172011-12-18 Hui Zhu <teawater@gmail.com>
7918
7919 * linux-low.c (linux_create_inferior): Save return value to ret.
7920
e77616d7
DE
79212011-12-16 Doug Evans <dje@google.com>
7922
e7b06c57
DE
7923 * linux-low.c (linux_create_inferior): If stdio connection,
7924 redirect stdin from /dev/null, stdout to stderr.
7925 * remote-utils.c (remote_is_stdio): New static global.
7926 (remote_connection_is_stdio): New function.
7927 (remote_prepare): Handle stdio connection.
7928 (remote_open): Ditto.
7929 (remote_close): Don't close stdin for stdio connections.
7930 (read_prim,write_prim): New functions. Replace all calls to
7931 read/write to these.
7932 * server.c (main): Watch for "-" argument. Move call to
7933 remote_prepare before start_inferior.
7934 * server.h (STDIO_CONNECTION_NAME): New macro.
7935 (remote_connection_is_stdio): Declare.
7936
e77616d7
DE
7937 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7938 in debugging output.
7939
82067193
YQ
79402011-12-15 Yao Qi <yao@codesourcery.com>
7941
7942 * tracepoint.c: Include sys/syscall.h.
7943 (gdb_ust_thread): Remove preprocessor conditional.
7944
82bfbe7e
PA
79452011-12-14 Pedro Alves <pedro@codesourcery.com>
7946
7947 * linux-low.c (linux_detach_one_lwp): Call
7948 the_low_target.prepare_to_resume before detaching.
7949
712c6575
YQ
79502011-12-14 Yao Qi <yao@codesourcery.com>
7951
7952 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7953 of write.
7954
d54d1edf
YQ
79552011-12-14 Yao Qi <yao@codesourcery.com>
7956
7957 * i386-low.c (i386_low_stopped_data_address): Initialize local
7958 variable `control'.
7959
6210a125
PA
79602011-12-13 Pedro Alves <pedro@codesourcery.com>
7961
7962 PR remote/13492
7963
7964 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7965 DR_CONTROL unless necessary. Extend comments.
7966 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7967 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7968
2ece8244
YQ
79692011-12-13 Yao Qi <yao@codesourcery.com>
7970
7971 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7972 macros.
7973 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7974
784867a5
JK
79752011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7976
7977 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7978 Print new debug message for such case.
7979
6bf36717
JK
79802011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7981
7982 Fix overlapping memcpy.
7983 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7984 the read_inferior_memory transfer.
7985 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7986 write_inferior_memory transfer.
7987 (set_fast_tracepoint_jump): New variable buf. Use it for the
7988 read_inferior_memory and write_inferior_memory transfers.
7989 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7990 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7991 Use it for the write_inferior_memory transfer.
7992 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7993 buffers.
7994
50275556
MR
79952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7996
7997 * linux-low.c (fetch_register, store_register): Make code
7998 consistent, fix formatting.
7999
7325beb4
MR
80002011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8001
8002 * linux-low.c (usr_store_inferior_registers): Factor out code
8003 to handle individual registers into...
8004 (store_register): ... this new function.
8005
c642a434
UW
80062011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8007
8008 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8009 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8010 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8011 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8012 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8013 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8014 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8015 (srv_xmlfiles): Add new XML files.
8016
8017 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8018 and <sys/uio.h>.
8019 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8020 (init_registers_s390_linux32v1): Add prototype.
8021 (init_registers_s390_linux32v2): Likewise.
8022 (init_registers_s390_linux64v1): Likewise.
8023 (init_registers_s390_linux64v2): Likewise.
8024 (init_registers_s390x_linux64v1): Likewise.
8025 (init_registers_s390x_linux64v2): Likewise.
8026 (s390_num_regs): Increment to 52.
8027 (s390_regmap): Add orig_r2 register.
8028 (s390_num_regs_3264): Increment to 68.
8029 (s390_regmap_3264): Add orig_r2 register.
8030 (s390_collect_ptrace_register): Handle orig_r2 register.
8031 (s390_supply_ptrace_register): Likewise.
8032 (s390_fill_last_break): New function.
8033 (s390_store_last_break): Likewise.
8034 (s390_fill_system_call): New function.
8035 (s390_store_system_call): Likewise.
8036 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8037 register sets.
8038 (s390_check_regset): New function.
8039 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8040 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8041 Update target_regsets for available register sets.
8042
2268b414
JK
80432011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8044 Jan Kratochvil <jan.kratochvil@redhat.com>
8045
8046 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8047 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8048 New.
8049 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8050 * linux-low.h (struct process_info_private): New member r_debug.
8051 * server.c (handle_qxfer_libraries): Call
8052 the_target->qxfer_libraries_svr4.
8053 (handle_qxfer_libraries_svr4): New function.
8054 (qxfer_packets): New entry "libraries-svr4".
8055 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8056 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8057 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8058 PACKET_qXfer_libraries_svr4.
8059
d6db1fab
UW
80602011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8061
8062 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8063 PSW address/mask between 8-byte and 16-byte formats.
8064 (s390_supply_ptrace_register): Likewise.
8065 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8066 basic addressing mode bit.
8067
242f5f1c
SS
80682011-11-24 Stan Shebs <stan@codesourcery.com>
8069
8070 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8071
f196051f
SS
80722011-11-17 Stan Shebs <stan@codesourcery.com>
8073
8074 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8075 (tracing_start_time): New global.
8076 (tracing_stop_time): New global.
8077 (tracing_user_name): New global.
8078 (tracing_notes): New global.
8079 (tracing_stop_note): New global.
8080 (cmd_qtstart): Set traceframe_usage, start_time.
8081 (stop_tracing): Set stop_time.
8082 (cmd_qtstatus): Report additional status.
8083 (cmd_qtp): New function.
8084 (handle_tracepoint_query): Call it.
8085 (cmd_qtnotes): New function.
8086 (handle_tracepoint_general_set): Call it.
8087 (get_timestamp): Rename from tsv_get_timestamp.
8088
405f8e94
SS
80892011-11-14 Stan Shebs <stan@codesourcery.com>
8090 Kwok Cheung Yeung <kcy@codesourcery.com>
8091
8092 * linux-x86-low.c (small_jump_insn): New.
8093 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8094 trampoline and error message, build a trampoline and issue a small
8095 jump instruction to it.
8096 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8097 trampoline and error message.
8098 (x86_get_min_fast_tracepoint_insn_len): New.
8099 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8100 * linux-low.h (struct linux_target_ops): Add arguments to
8101 install_fast_tracepoint_jump_pad operation, add new operation.
8102 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8103 arguments.
8104 (linux_get_min_fast_tracepoint_insn_len): New function.
8105 (linux_target_op): Add new operation.
8106 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8107 (gdb_trampoline_buffer_end): Ditto.
8108 (gdb_trampoline_buffer_error): Ditto.
8109 (struct ipa_sym_addresses): Add fields for new IPA variables.
8110 (symbol_list): Add entries for new IPA variables.
8111 (struct tracepoint): Add fields to hold the address range of the
8112 trampoline used by the tracepoint.
8113 (trampoline_buffer_head): New static variable.
8114 (trampoline_buffer_tail): Ditto.
8115 (claim_trampoline_space): New function.
8116 (have_fast_tracepoint_trampoline_buffer): New function.
8117 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8118 structure.
8119 (install_fast_tracepoint): Ditto, also add error buffer argument.
8120 (cmd_qtminftpilen): New function.
8121 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8122 (fast_tracepoint_from_trampoline_address): New function.
8123 (fast_tracepoint_collecting): Handle trampoline as part of jump
8124 pad space.
8125 (set_trampoline_buffer_space): New function.
8126 (initialize_tracepoint): Initialize new IPA variables.
8127 * target.h (struct target_ops): Add arguments to
8128 install_fast_tracepoint_jump_pad operation, add new
8129 get_min_fast_tracepoint_insn_len operation.
8130 (target_get_min_fast_tracepoint_insn_len): New.
8131 (install_fast_tracepoint_jump_pad): Add arguments.
8132 * server.h (IPA_BUFSIZ): Define.
8133 * linux-i386-ipa.c: Include extra header files.
8134 (initialize_fast_tracepoint_trampoline_buffer): New function.
8135 (initialize_low_tracepoint): Call it.
8136 * server.h (set_trampoline_buffer_space): Declare.
8137 (claim_trampoline_space): Ditto.
8138 (have_fast_tracepoint_trampoline_buffer): Ditto.
8139
1e4d1764
YQ
81402011-11-14 Yao Qi <yao@codesourcery.com>
8141
8142 * server.c (handle_query): Handle InstallInTrace for qSupported.
8143 * tracepoint.c (add_tracepoint): Sort list.
8144 (install_tracepoint, download_tracepoint): New.
8145 (cmd_qtdp): Call them to install and download tracepoints.
8146 (sort_tracepoints): Removed.
8147 (cmd_qtstart): Update.
8148
5c73ff4e
YQ
81492011-11-14 Yao Qi <yao@codesourcery.com>
8150
8151 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8152 * mem-break.h: Declare.
8153 * tracepoint.c (cmd_qtstart): Move some code to ...
8154 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8155 New.
8156 (download_tracepoints): Move some code to ...
8157 (download_tracepoint_1): ... here. New.
8158
86a30030
YQ
81592011-11-08 Yao Qi <yao@codesourcery.com>
8160
8161 * remote-utils.c (relocate_instruction): A comment fix.
8162
8d26e50c
JB
81632011-11-07 Joel Brobecker <brobecker@adacore.com>
8164
8165 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8166 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8167 dr_status_mirror and dr_control_mirror from debug_reg_state.
8168 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8169 (i386_initial_stuff): Remove use of deleted globals.
8170 (i386_get_thread_context, i386_set_thread_context,
8171 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8172 from debug_reg_state.
8173
a59306a3
YQ
81742011-11-05 Yao Qi <yao@codesourcery.com>
8175
8176 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8177 address as TPOINT's.
8178
3065dfb6
SS
81792011-11-02 Stan Shebs <stan@codesourcery.com>
8180
8181 * tracepoint.c (agent_mem_read_string): New function.
8182 (eval_agent_expr): Call it for tracenz.
8183 * server.c (handle_query): Report support for tracenz.
8184
fd0d8c7c
YQ
81852011-11-02 Yao Qi <yao@codesourcery.com>
8186
8187 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8188
609086b1
YQ
81892011-11-02 Yao Qi <yao@codesourcery.com>
8190
8191 * target.h: Fix a typo in comment.
8192
b9fd1791
PA
81932011-10-31 Pedro Alves <pedro@codesourcery.com>
8194
8195 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8196 clobber the breakpoints' shadows with fast tracepoint jumps.
8197 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8198 * target.c (write_inferior_memory): Also pass MYADDR down to
8199 check_mem_write.
8200
03583c20
UW
82012011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8202
8203 * configure.ac: Check support for personality routine.
8204 * configure: Regenerate.
8205 * config.in: Likewise.
8206 * linux-low.c: Include <sys/personality.h>.
8207 Define ADDR_NO_RANDOMIZE if necessary.
8208 (linux_create_inferior): Disable address space randomization when
8209 forking inferior, if requested.
8210 (linux_supports_disable_randomization): New function.
8211 (linux_target_ops): Install it.
8212 * server.h (disable_randomization): Declare.
8213 * server.c (disable_randomization): New global variable.
8214 (handle_general_set): Handle QDisableRandomization.
8215 (handle_query): Likewise for qSupported.
8216 (main): Support --disable-randomization and --no-disable-randomization
8217 command line arguments.
8218 * target.h (struct target_ops): Add supports_disable_randomization.
8219 (target_supports_disable_randomization): New macro.
8220
723b724b
MF
82212011-09-29 Mike Frysinger <vapier@gentoo.org>
8222
8223 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8224 ifdef check.
8225 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8226 [!PT_GETDSBT] (target_loadmap): New definition.
8227 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8228 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8229 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8230 and PT_GETDSBT to LINUX_LOADMAP.
8231 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8232 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8233
55329a5c 82342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8235
8236 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8237 (arm_linux_hwbp_cap): New static variable.
8238 (arm_linux_get_hwbp_cap): Replace by ...
8239 (arm_linux_init_hwbp_cap): ... this new function.
8240 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8241 (arm_linux_get_hw_watchpoint_count): Likewise.
8242 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8243 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8244 (arm_prepare_to_resume): Use perror_with_name instead of error.
8245
55329a5c 82462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8247
8248 * linux-arm-low.c: Include <signal.h>.
8249 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8250 (struct arm_linux_hwbp_cap): New data type.
8251 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8252 (struct arm_linux_hw_breakpoint): New data type.
8253 (MAX_BPTS, MAX_WPTS): Define.
8254 (struct arch_process_info, struct arch_lwp_info): New data types.
8255 (arm_linux_get_hwbp_cap): New function.
8256 (arm_linux_get_hw_breakpoint_count): Likewise.
8257 (arm_linux_get_hw_watchpoint_count): Likewise.
8258 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8259 (arm_hwbp_control_initialize): Likewise.
8260 (arm_hwbp_control_is_enabled): Likewise.
8261 (arm_hwbp_control_is_initialized): Likewise.
8262 (arm_hwbp_control_disable): Likewise.
8263 (arm_linux_hw_breakpoint_equal): Likewise.
8264 (arm_linux_hw_point_initialize): Likewise.
8265 (struct update_registers_data): New data structure.
8266 (update_registers_callback: New function.
8267 (arm_insert_point): Likewise.
8268 (arm_remove_point): Likewise.
8269 (arm_stopped_by_watchpoint): Likewise.
8270 (arm_stopped_data_address): Likewise.
8271 (arm_new_process): Likewise.
8272 (arm_new_thread): Likewise.
8273 (arm_prepare_to_resume): Likewise.
8274 (the_low_target): Register arm_insert_point, arm_remove_point,
8275 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8276 arm_new_thread, and arm_prepare_to_resume.
8277
6b9801d4
SS
82782011-09-15 Stan Shebs <stan@codesourcery.com>
8279
8280 * server.h (struct emit_ops): Add compare-goto fields.
8281 * tracepoint.c (gdb_agent_op_sizes): New table.
8282 (emit_eq_goto): New function.
8283 (emit_ne_goto): New function.
8284 (emit_lt_goto): New function.
8285 (emit_le_goto): New function.
8286 (emit_gt_goto): New function.
8287 (emit_ge_goto): New function.
8288 (is_goto_target): New function.
8289 (compile_bytecodes): Recognize special cases of compare-goto
8290 combinations and call specialized emitters for them.
8291 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8292 (amd64_emit_ne_goto): New function.
8293 (amd64_emit_lt_goto): New function.
8294 (amd64_emit_le_goto): New function.
8295 (amd64_emit_gt_goto): New function.
8296 (amd64_emit_ge_goto): New function.
8297 (amd64_emit_ops): Add the new functions.
8298 (i386_emit_eq_goto): New function.
8299 (i386_emit_ne_goto): New function.
8300 (i386_emit_lt_goto): New function.
8301 (i386_emit_le_goto): New function.
8302 (i386_emit_gt_goto): New function.
8303 (i386_emit_ge_goto): New function.
8304 (i386_emit_ops): Add the new functions.
8305
bf15cbda
SS
83062011-09-08 Stan Shebs <stan@codesourcery.com>
8307
8308 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8309 (i386_emit_epilogue): Restore %ebx.
8310
943ca1dd
JZ
83112011-08-31 Jie Zhang <jzhang918@gmail.com>
8312
8313 * server.c (step_thread): Remove definition.
8314 (process_serial_event): Don't handle Hs.
8315 * server.h (step_thread): Remove declaration.
8316 * target.c (set_desired_inferior): Remove use of step_thread.
8317
e3deef73
LM
83182011-08-24 Luis Machado <lgustavo@codesourcery.com>
8319
8320 * linux-low.c: Include linux-procfs.h.
8321 (linux_attach_lwp_1): Update comments.
8322 (linux_attach): Scan for existing threads when attaching to a
8323 process that is the tgid.
8324 * Makefile.in: Update dependencies.
8325
13da1c97
LM
83262011-08-24 Luis Machado <lgustavo@codesourcery.com>
8327
8328 * configure.srv: Add linux-procfs.o dependencies.
8329
881127c9
YQ
83302011-08-14 Yao Qi <yao@codesourcery.com>
8331
8332 * target.h (struct target_ops): Fix indent.
8333 * win32-low.c (win32_target_ops): Fix comment.
8334
58dbd541
YQ
83352011-08-14 Andrew Jenner <andrew@codesourcery.com>
8336 Yao Qi <yao@codesourcery.com>
8337
8338 * Makefile.in (clean): Remove tic6x-*.c files.
8339 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8340 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8341 (tic6x-c64xp-linux.c): Likewise.
8342 * configure.srv: Add support for tic6x-*-uclinux.
8343 * linux-tic6x-low.c: New.
8344 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8345
78d85199
YQ
83462011-08-14 Andrew Stubbs <ams@codesourcery.com>
8347 Yao Qi <yao@codesourcery.com>
8348
8349 * target.h (struct target_ops): Add read_loadmap.
8350 * linux-low.c (struct target_loadseg): New type.
8351 (struct target_loadmap): New type.
8352 (linux_read_loadmap): New function.
8353 (linux_target_ops): Add linux_read_loadmap.
8354 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8355 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8356 to NULL.
78d85199 8357
a959a88d
EZ
83582011-08-05 Eli Zaretskii <eliz@gnu.org>
8359
8360 * win32-low.c: Include <stdint.h>.
8361
1ced966e
PA
83622011-07-22 Pedro Alves <pedro@codesourcery.com>
8363
8364 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8365 to the inferior here.
8366 (i386_remove_aligned_watchpoint): Ditto.
8367 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8368 fit part of the watchpoint in the debug registers.
8369 (i386_update_inferior_debug_regs): New.
8370 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8371 registers, and only update the inferior on success.
8372 (i386_low_remove_watchpoint): Ditto.
8373
d26e3629
KY
83742011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8375
8376 * linux-low.c (compare_ints, unique, list_threads, show_process,
8377 linux_core_of_thread): Delete.
8378 (linux_target_ops): Change linux_core_of_thread to
8379 linux_common_core_of_thread.
8380 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8381 * utils.c (malloc_failure): Change type of argument.
8382 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8383 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8384 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8385 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8386 (IPA_OBJS): Add common-utils-ipa.o.
8387 (ptid_h, linux_osdata_h): New macros.
8388 (server_h): Add common/common-utils.h, common/xml-utils.h,
8389 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8390 common/ptid.h.
8391 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8392 ptid.o, buffer.o): New rules.
8393 (linux-low.o): Add common/linux-osdata.h as a dependency.
8394 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8395 * configure.ac: Add AC_HEADER_DIRENT check.
8396 * config.in: Regenerate.
8397 * configure: Regenerate.
8398 * remote-utils.c (xml_escape_text): Delete.
8399 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8400 buffer_xml_printf): Move to common/buffer.c.
8401 * server.c (main): Remove call to initialize_inferiors.
8402 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8403 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8404 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8405 internal_error, gdb_assert, gdb_assert_fail): Delete.
8406 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8407 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8408 common/buffer.h.
8409 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8410 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8411 initialize_inferiors): Delete.
8412
2275a1a7
PA
84132011-07-20 Pedro Alves <pedro@codesourcery.com>
8414
8415 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8416 symbol error.
8417
0a5b1e09
PA
84182011-05-31 Pedro Alves <pedro@codesourcery.com>
8419
8420 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8421 assertion.
8422 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8423
6938fd34
YQ
84242011-05-26 Yao Qi <yao@codesourcery.com>
8425
8426 * Makefile.in (thread-db.o): Track dependence to
8427 common/gdb_thread_db.h.
8428 * thread-db.c: include gdb_thread_db.h from right place.
8429
b481f9e0
TT
84302011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8431
8432 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8433 __FILE__ and __LINE__ to internal_error.
8434
98a5dd13
DE
84352011-05-13 Doug Evans <dje@google.com>
8436
8437 * thread-db.c (try_thread_db_load_from_sdir): New function.
8438 (try_thread_db_load_from_dir): New function.
8439 (thread_db_load_search): Handle $sdir, ignore $pdir.
8440 Remove trying of system directories if search of
8441 libthread-db-search-path fails, that is now done via $sdir.
8442
d248b706
KY
84432011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8444
8445 * server.c (handle_query): Add EnableDisableTracepoints to the list
8446 of supported features.
43aaf8b6 8447 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8448 tracepoints.
43aaf8b6
PA
8449 (cmd_qtenable_disable): New.
8450 (cmd_qtstart): Install tracepoints even if disabled.
8451 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8452 receiving a QTEnable or QTDisable packet.
8453 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8454 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8455 tracepoints.
8456 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8457
84e578fb
DE
84582011-05-10 Doug Evans <dje@google.com>
8459
8460 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8461
71f55dd8
DE
84622011-05-04 Doug Evans <dje@google.com>
8463
8464 * linux-low.c (linux_join): Skip process lookup.
8465 * spu-low.c (spu_join): Ditto.
8466 * server.c (join_inferiors_callback): Delete.
8467 (process_serial_event): For 'D' packet (detach) call join_inferior
8468 directly.
8469
4d393d60
JM
84702011-05-04 Joseph Myers <joseph@codesourcery.com>
8471
8472 * README: Don't mention xscale*-*-linux*.
8473 * configure.srv (xscale*-*-linux*): Don't handle target.
8474
b00ad6ff
NF
84752011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8476
8477 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8478 casting pointers.
8479 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8480 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8481 (i386_emit_void_call_2): Likewise.
8482
af96c192
YQ
84832011-04-26 Yao Qi <yao@codesourcery.com>
8484
43aaf8b6
PA
8485 * linux-low.c: Move common macros to linux-ptrace.h.
8486 Include linux-ptrace.h.
af96c192
YQ
8487 * Makefile.in (linux_ptrace_h): New.
8488 (linux-low.o): Depends on linux-ptrace.h.
8489
03f2bd59
JK
84902011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8491
8492 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8493 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8494 (remote_prepare): New function with most of the TCP code from ...
8495 (remote_open): ... here. Detect PORT here unconditionally. Move also
8496 setting transport_is_reliable.
8497 * server.c (run_once): New variable.
8498 (gdbserver_usage): Document it.
8499 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8500 the first run if RUN_ONCE.
8501 * server.h (run_once, remote_prepare): New declarations.
8502
7a9dd1b2
TT
85032011-04-19 Tom Tromey <tromey@redhat.com>
8504
8505 * win32-low.c (handle_load_dll): Remove duplicate "the".
8506
81239425
PM
85072011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8508
8509 Remove support for old Cygwin 1.5 versions.
8510 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8511 function to avoid warning.
8512 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8513 warning.
8514
9e0627f1
PM
85152011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8516
8517 * gdbserver/server.h (Macro _): Define it if not available.
8518
588eebee
MS
85192011-03-14 Michael Snyder <msnyder@vmware.com>
8520
348af9f7 8521 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8522
43f70d4c
JB
85232011-03-10 Joel Brobecker <brobecker@adacore.com>
8524
8525 * Makefile.in (maintainer-clean realclean distclean): Remove
8526 "make ... subdir_do" command.
8527
348af9f7
MS
85282011-03-10 Michael Snyder <msnyder@vmware.com>
8529
8530 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8531
8532 * server.c (handle_v_run): Free alloced buffer on early return.
8533
e637a4f5
YQ
85342011-03-09 Yao Qi <yao@codesourcery.com>
8535
8536 Revert:
8537 2011-03-04 Yao Qi <yao@codesourcery.com>
8538
8539 * Makefile.in: Remove GNU make feature --directory.
8540
8541 2011-03-05 Yao Qi <yao@codesourcery.com>
8542
8543 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8544 (subdir_do): New make target. Copied from gdb/Makefile.
8545 (maintainer-clean, realclean, distclean, clean): Call corresponding
8546 make targets in common/Makefile.
8547
8548 2011-02-11 Yao Qi <yao@codesourcery.com>
8549
8550 * configure.ac: Call AC_PROG_RANLIB.
8551 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8552 * configure: Regenerate.
8553
e6edda56
JK
85542011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8555
8556 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8557
e5141119
JB
85582011-03-06 Yao Qi <yao@codesourcery.com>
8559
8560 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8561
64794aa4
JB
85622011-03-05 Yao Qi <yao@codesourcery.com>
8563
8564 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8565 (subdir_do): New make target. Copied from gdb/Makefile.
8566 (maintainer-clean, realclean, distclean, clean): Call corresponding
8567 make targets in common/Makefile.
8568
7a762829
YQ
85692011-03-04 Yao Qi <yao@codesourcery.com>
8570
8571 * Makefile.in: Remove GNU make feature --directory.
8572
348af9f7
MS
85732011-03-04 Michael Snyder <msnyder@vmware.com>
8574
8575 * server.c (queue_stop_reply): Call xmalloc not malloc.
8576
85772011-03-02 Michael Snyder <msnyder@vmware.com>
8578
8579 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8580
9f72fee2
MS
85812011-02-28 Michael Snyder <msnyder@vmware.com>
8582
588eebee
MS
8583 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8584 (cmd_qtframe): Ditto.
8585 (cmd_qtbuffer): Ditto.
8586 (cmd_bigqtbuffer): Ditto.
8587
9f72fee2
MS
8588 * utils.c (decimal2str): Initialize 'width' to nine, then
8589 don't mess with it.
8590
8040bd49
UW
85912011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8592
8593 * hostio.c (require_data): Free *data, not data.
8594
7e52cbd0
JK
85952011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8596
8597 * hostio.c (require_data): Use free, not xfree.
8598
9130f83e
MS
85992011-02-27 Michael Snyder <msnyder@vmware.com>
8600
4b812f4e
MS
8601 * server.c (handle_query): Discard unused value.
8602
9130f83e
MS
8603 * hostio.c (require_data): Free malloc memory before returning
8604 error.
8605
69d37113
MS
86062011-02-26 Michael Snyder <msnyder@vmware.com>
8607
8608 * linux-low.c (list_threads): Call closedir for dirent.
8609
35f5825a
MS
86102011-02-27 Michael Snyder <msnyder@vmware.com>
8611
2a589cef
MS
8612 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8613 a case statement falls through.
8614
0adea5f7
MS
8615 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8616
35f5825a
MS
8617 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8618 in comparison.
8619
238f1c74
MS
86202011-02-26 Michael Snyder <msnyder@vmware.com>
8621
8622 * utils.c (decimal2str): Eliminate dead code and dead param.
8623 (pulongest): Drop dead param from call to decimal2str.
8624 (plongest): Ditto.
8625
633ff500
JB
86262011-02-24 Joel Brobecker <brobecker@adacore.com>
8627
8628 Revert the following patch (not approved yet):
8629 2011-02-21 Hui Zhu <teawater@gmail.com>
8630 * tracepoint.c (tp_printf): New function.
8631 (eval_agent_expr): Handle gdb_agent_op_printf.
8632
f9c6ff72
HZ
86332011-02-21 Hui Zhu <teawater@gmail.com>
8634
8635 * tracepoint.c (tp_printf): New function.
8636 (eval_agent_expr): Handle gdb_agent_op_printf.
8637
94d5e490
TT
86382011-02-18 Tom Tromey <tromey@redhat.com>
8639
8640 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8641 (tracepoint.o): Likewise.
8642 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8643 (gdb_agent_op_names): Likewise.
8644
c7f96d2b
TT
86452011-02-18 Tom Tromey <tromey@redhat.com>
8646
8647 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8648 gdb_agent_op_rot>: New constants.
8649 (gdb_agent_op_names): Add pick and roll.
8650 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8651 cases.
8652
0feedb2c
JK
86532011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8654
8655 * aclocal.m4: Regenerated with aclocal-1.11.1.
8656
b3b9301e
PA
86572011-02-14 Pedro Alves <pedro@codesourcery.com>
8658
8659 * server.c (handle_qxfer_traceframe_info): New.
8660 (qxfer_packets): Register "traceframe-info".
8661 (handle_query): Report support for qXfer:traceframe-info:read+.
8662 * tracepoint.c (match_blocktype): New.
8663 (traceframe_find_block_type): Rename to ...
8664 (traceframe_walk_blocks): ... this. Add callback filter argument,
8665 and use it.
8666 (traceframe_find_block_type): New, reimplemented on top of
8667 traceframe_walk_blocks.
8668 (build_traceframe_info_xml): New.
8669 (traceframe_read_info): New.
8670 * server.h (traceframe_read_info): Declare.
8671
4f3e6fb7
YQ
86722011-02-11 Yao Qi <yao@codesourcery.com>
8673
8674 * configure.ac: Call AC_PROG_RANLIB.
8675 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8676 * configure: Regenerate.
8677
764880b7
PA
86782011-02-07 Pedro Alves <pedro@codesourcery.com>
8679
8680 * server.c (gdb_read_memory): Change return semantics to allow
8681 partial transfers.
8682 (handle_search_memory_1): Adjust.
8683 (process_serial_event) <'m' packet>: Handle partial transfers.
8684 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8685
1c79eb8a
PA
86862011-01-28 Pedro Alves <pedro@codesourcery.com>
8687
8688 * regcache.c (init_register_cache): Initialize
8689 regcache->register_status.
8690 (free_register_cache): Release regcache->register_status.
8691 (regcache_cpy): Copy register_status.
8692 (registers_to_string): Print 'x's for unavailable registers.
8693 (supply_register): Mark the register's status valid or
8694 unavailable, depending on whether a buffer was passed in or not.
8695 (supply_register_zeroed): New.
8696 (supply_regblock): Mark the registers' status valid or
8697 unavailable, depending on whether a buffer was passed in or not.
8698 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8699 (struct regcache): New `register_status' field.
8700 (supply_register_zeroed): Declare.
8701 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8702 supply_register_zeroed, rather than passing a NULL buffer to
8703 supply_register.
8704 * tracepoint.c (fetch_traceframe_registers): Update comment.
8705
85724a0e
PA
87062011-01-28 Pedro Alves <pedro@codesourcery.com>
8707
8708 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8709 buffer explicit.
8710
d08aafef
PA
87112011-01-25 Pedro Alves <pedro@codesourcery.com>
8712
8713 * server.h (decode_xfer_write): Change prototype.
8714 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8715 and don't extract the annex here.
8716 * server.c (decode_xfer_read): Remove `annex' parameter,
8717 and don't extract the annex here.
8718 (decode_xfer): New.
8719 (struct qxfer): New.
8720 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8721 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8722 (handle_qxfer_statictrace): New functions, abstracted out from
8723 handle_query, and made to use the struct qxfer interface.
8724 (handle_threads_qxfer_proper): Rename to ...
8725 (handle_qxfer_threads_proper): ... this.
8726 (handle_threads_qxfer): Rename to ...
8727 (handle_qxfer_threads): ... this. Adjust.
8728 (qxfer_packets): New array.
8729 (handle_qxfer): New function.
8730 (handle_query): Use handle_qxfer.
8731
493e2a69
MS
87322011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8733
8734 * gdbreplay.c: Shorten lines of >= 80 columns.
8735 * linux-low.c: Ditto.
8736 * linux-ppc-low.c: Ditto.
8737 * linux-s390-low.c: Ditto.
8738 * linux-sparc-low.c: Ditto.
8739 * linux-x86-low.c: Ditto.
8740 * linux-xtensa-low.c: Ditto.
8741 * mem-break.c: Ditto.
8742 * nto-low.c: Ditto.
8743 * regcache.h: Ditto.
8744 * remote-utils.c: Ditto.
8745 * server.c: Ditto.
8746 * server.h: Ditto.
8747 * thread-db.c: Ditto.
8748 * tracepoint.c: Ditto.
8749 * utils.c: Ditto.
8750 * win32-low.h: Ditto.
8751
44944448
JB
87522011-01-05 Joel Brobecker <brobecker@adacore.com>
8753
8754 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8755 update.
8756
71ce852c
JB
87572011-01-01 Joel Brobecker <brobecker@adacore.com>
8758
8759 * server.c (gdbserver_version): Update copyright year in version
8760 output.
8761 * gdbreplay.c (gdbreplay_version): Ditto.
8762
eb826dc6
MF
87632010-12-29 Jie Zhang <jie.zhang@analog.com>
8764
8765 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8766 * linux-bfin-low.c: New file.
8767 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8768 PT_DATA_ADDR for BFIN targets.
8769 * Makefile.in (SFILES): Add linux-bfin-low.c.
8770 (clean): Remove reg-bfin.c.
8771 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8772 * README: Mention supported Blackfin targets.
8773
39ab222a
MF
87742010-12-23 Mike Frysinger <vapier@gentoo.org>
8775
8776 * .gitignore: New file.
8777
a1f2ce7d
MF
87782010-11-16 Mike Frysinger <vapier@gentoo.org>
8779
8780 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8781
f474844c
JZ
87822010-10-22 Jie Zhang <jie@codesourcery.com>
8783
8784 * Makefile.in: Add FLAGS_TO_PASS variable.
8785 (install): Remove dependency of install-only and recursively
8786 invoke make for install-only.
8787
f1048712
DE
87882010-10-04 Doug Evans <dje@google.com>
8789
8790 * Makefile.in (uninstall): Use $(DESTDIR).
8791
b53a1623
PA
87922010-09-24 Pedro Alves <pedro@codesourcery.com>
8793
e6ee044d
PA
8794 PR gdb/11842
8795
b53a1623
PA
8796 * linux-x86-low.c (compat_siginfo_from_siginfo)
8797 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8798 si_code is < 0. Check for si_code == SI_TIMER before checking for
8799 si_code < 0.
8800
fa1bd1e4
JB
88012010-09-13 Joel Brobecker <brobecker@adacore.com>
8802
8803 * lynx-i386-low.c: New file.
8804 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8805
47fac8f8
JB
88062010-09-13 Joel Brobecker <brobecker@adacore.com>
8807
8808 * lynx-low.c (ptrace_request_to_str): Remove handling for
8809 request values that have been removed in LynxOS 5.x.
8810
1adfc54d
JB
88112010-09-13 Joel Brobecker <brobecker@adacore.com>
8812
8813 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8814 <ptrace.h>
8815
c2a66c29
NS
88162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8817
8818 * configure.ac: Add --enable-inprocess-agent option.
8819 * configure: Rebuilt.
8820
32fcada3
YQ
88212010-09-06 Yao Qi <yao@codesourcery.com>
8822
8823 * linux-low.c (linux_kill): Remove unused variable.
8824 (linux_stabilize_threads): Likewise.
8825 * server.c (start_inferior): Likewise.
8826 (queue_stop_reply_callback): Likewise.
8827 * tracepoint.c (do_action_at_tracepoint): Likewise.
8828
0cccb683
YQ
88292010-09-06 Yao Qi <yao@codesourcery.com>
8830
8831 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8832 on return.
8833
423ec54c
JK
88342010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8835
8836 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8837
12ac6819
PA
88382010-09-06 Pedro Alves <pedro@codesourcery.com>
8839
8840 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8841 "$(IPA_DEPFILES)".
8842
8ed54b31
JB
88432010-09-01 Joel Brobecker <brobecker@adacore.com>
8844
8845 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8846 gdbserver/lynx-ppc-low.c: New files.
8847 * Makefile.in (lynx_low_h): New variable.
8848 (lynx-low.o, lynx-ppc-low.o): New rules.
8849 * configure.ac: On LynxOS, link with -lnetinet.
8850 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8851 * configure: regenerate.
8852
bb0116a4
JB
88532010-09-01 Joel Brobecker <brobecker@adacore.com>
8854
8855 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8856 * configure.ac: Add check for vasprintf and vsnprintf.
8857 * configure, config.in: Regenerate.
8858 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8859
a778ab81 88602010-09-01 Joel Brobecker <brobecker@adacore.com>
8861
8862 * gdbreplay.c: Move include of alloca.h up, next to include of
8863 malloc.h.
8864 * server.h: Add include of malloc.h.
8865 * mem-break.c: Remove include of malloc.h.
8866 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8867
8b034a19 88682010-09-01 Joel Brobecker <brobecker@adacore.com>
8869
8870 * Makefile.in (memmem.o): Build with -Wno-error.
8871
88722010-09-01 Joel Brobecker <brobecker@adacore.com>
8873
8874 * utils.c (xsnprintf): Make non-static.
8875 * server.h: Add xsnprintf declaration.
8876 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8877 replace calls to snprintf by calls to xsnprintf throughout.
8878
88792010-09-01 Joel Brobecker <brobecker@adacore.com>
8880
8881 * configure.ac: Add configure check for alloca.
8882 * configure, config.in: Regenerate.
8883 * server.h: Include alloca.h if it exists.
8884 * gdbreplay.c: Include alloca.h if it exists.
8885
1a981360
PA
88862010-08-28 Pedro Alves <pedro@codesourcery.com>
8887
8888 * linux-low.c (__SIGRTMIN): Define if not already defined.
8889 (linux_create_inferior): Check for __ANDROID__ rather than
8890 __SIGRTMIN.
8891 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8892 are already deferred.
8893 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8894 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8895 stopped and already has a pending signal to report.
8896 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8897 a pending signal to report or is moving out of a jump pad.
8898 (linux_init_signals): Check for __ANDROID__ rather than
8899 __SIGRTMIN.
8900
b4d51a55
PA
89012010-08-28 Pedro Alves <pedro@codesourcery.com>
8902
8903 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8904 debug_threads check. Avoid a linear search when not doing debug
8905 output.
8906
ec48365d
PA
89072010-08-27 Pedro Alves <pedro@codesourcery.com>
8908
8909 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8910 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8911 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8912 (process_event): Change local fd's type to gdb_fildes_t.
8913 (create_file_handler): Adjust prototype.
8914 (delete_file_handler): Adjust prototype.
8915 (handle_file_event): Adjust prototype. Use pfildes.
8916 (create_file_event): Adjsut prototype.
8917 * remote-utils.c (remote_desc, listen_desc): Change type to
8918 gdb_fildes_t.
8919 * server.h: New gdb_fildes_t typedef.
8920 [USE_WIN32API]: Include winsock2.h.
8921 (delete_file_handler, add_file_handler): Adjust prototypes.
8922 (pfildes): Declare.
8923 * utils.c (pfildes): New.
8924
854d88f0
PA
89252010-08-27 Pedro Alves <pedro@codesourcery.com>
8926
8927 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8928 * configure: Regenerate.
8929
0146f85b
PA
89302010-08-27 Pedro Alves <pedro@codesourcery.com>
8931
8932 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8933 (linux_done_accessing_memory): ... this.
8934 (linux_target_ops): Adjust.
8935 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8936 * nto-low.c (nto_target_ops): Adjust comment.
8937 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8938 * spu-low.c (spu_target_ops): Adjust comment.
8939 * target.h (target_ops): Rename unprepare_to_access_memory field
8940 to done_accessing_memory.
8941 (unprepare_to_access_memory): Rename to ...
8942 (done_accessing_memory): ... this.
8943
90d74c30
PA
89442010-08-26 Pedro Alves <pedro@codesourcery.com>
8945
8946 * linux-low.c (linux_prepare_to_access_memory): New.
8947 (linux_unprepare_to_access_memory): New.
8948 (linux_target_ops): Install them.
8949 * server.c (read_memory): Rename to ...
8950 (gdb_read_memory): ... this. Use
8951 prepare_to_access_memory/prepare_to_access_memory.
8952 (write_memory): Rename to ...
8953 (gdb_write_memory): ... this. Use
8954 prepare_to_access_memory/prepare_to_access_memory.
8955 (handle_search_memory_1): Adjust.
8956 (process_serial_event): Adjust.
8957 * target.h (struct target_ops): New fields
8958 prepare_to_access_memory and unprepare_to_access_memory.
8959 (prepare_to_access_memory, unprepare_to_access_memory): New.
8960 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8961 prepare_to_access_memory/prepare_to_access_memory.
8962 * nto-low.c (nto_target_ops): Adjust.
8963 * spu-low.c (spu_target_ops): Adjust.
8964 * win32-low.c (win32_target_ops): Adjust.
8965
fd467969
PA
89662010-08-26 Pedro Alves <pedro@codesourcery.com>
8967
8968 * Makefile.in (WARN_CFLAGS): Get it from configure.
8969 (WERROR_CFLAGS): New.
8970 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8971 * configure.ac: Introduce --enable-werror, which adds -Werror to
8972 the compiler command line. Enabled by default. Disable with
8973 --disable-werror. Add -Wdeclaration-after-statement
8974 Wpointer-arith and -Wformat-nonliteral to warning flags.
8975 * configure: Regenerate.
8976
331e2f5f
PA
89772010-08-26 Pedro Alves <pedro@codesourcery.com>
8978
8979 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8980
e581f2b4
PA
89812010-08-26 Pedro Alves <pedro@codesourcery.com>
8982
8983 * gdbreplay.c (remote_error): New.
8984 (gdbchar): New.
8985 (expect): Use gdbchar. Check for error reading from GDB.
8986 Clarify sync error output.
8987 (play): Check for errors writing to GDB.
8988 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8989 * remote-utils.c (getpkt): Check for errors writing to the remote
8990 descriptor.
8991
3c11dd79
PA
89922010-08-25 Pedro Alves <pedro@codesourcery.com>
8993
8994 * linux-low.c (linux_wait_1): Move non-debugging code out of
8995 `debug_threads' control.
8996
d20a8ad9
PA
89972010-08-25 Pedro Alves <pedro@codesourcery.com>
8998
8999 * linux-low.c (linux_wait_1): Don't set last_status here.
9000 * server.c (push_event, queue_stop_reply_callback): Assert we're
9001 not pushing a TARGET_WAITKIND_IGNORE event.
9002 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9003 (myresume, handle_target_event): Set the thread's last_resume_kind
9004 and last_status from the target returned status.
9005
964e4306
PA
90062010-08-25 Pedro Alves <pedro@codesourcery.com>
9007
9008 PR threads/10729
9009
9010 * linux-x86-low.c (update_debug_registers_callback): New.
9011 (i386_dr_low_set_addr): Use it.
9012 (i386_dr_low_get_addr): New.
9013 (i386_dr_low_set_control): Use update_debug_registers_callback.
9014 (i386_dr_low_get_control): New.
9015 (i386_dr_low_get_status): Adjust.
9016 * linux-low.c (linux_stop_lwp): New.
9017 * linux-low.h (linux_stop_lwp): Declare.
9018
9019 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9020 argument instead of a i386_debug_reg_state.
9021 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9022 a i386_debug_reg_state.
9023 (i386_insert_aligned_watchpoint): Adjust.
9024 (i386_remove_aligned_watchpoint): Adjust.
9025 (i386_low_stopped_data_address): Read the debug registers from the
9026 inferior instead of from the mirrors.
9027 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9028 (i386_dr_low_get_addr): Declare.
9029 (i386_dr_low_get_control): Declare.
9030 (i386_dr_low_get_status): Change prototype.
9031
9032 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9033 (i386_dr_low_get_addr): New.
9034 (i386_dr_low_get_control): New.
9035 (i386_dr_low_get_status): Adjust prototype. Return
9036 dr_status_mirror.
9037 (i386_initial_stuff): Clear dr_status_mirror and
9038 dr_control_mirror.
9039 (i386_get_thread_context): Adjust.
9040 (i386_set_thread_context): Adjust.
9041 (i386_thread_added): Adjust.
9042
5f21a75b
PA
90432010-08-24 Pedro Alves <pedro@codesourcery.com>
9044
9045 * linux-low.h (linux_thread_area): Delete declaration.
9046
3e4c1235
TS
90472010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9048
9049 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9050 after its termination.
9051
1971b033
PA
90522010-08-09 Pedro Alves <pedro@codesourcery.com>
9053
9054 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9055 (gdb_wants_all_stopped): Delete.
9056 (linux_wait_1): Don't call them.
9057 * server.c (handle_v_cont): Tag all threads as want-stopped.
9058 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9059 stopped as "client-wants-stopped".
9060
310444ac
PA
90612010-07-31 Pedro Alves <pedro@codesourcery.com>
9062
9063 * Makefile.in (signals_h): New.
9064 (server_h): Depend on it.
9065 (server.o): Don't depend on $(signals_def).
9066 (signals.o): Depend on $(signals_def).
9067
a19cae16
JK
90682010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9069
9070 * Makefile.in (signals_def): New.
9071 (server_h): Append include/gdb/signals.h and signals_def.
9072 (server.o): Append signals_def.
9073
30d50328
JK
90742010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9075
9076 * server.c (handle_target_event): Use target_signal_to_host for
9077 resume_info.sig initialization.
9078 * target.h (struct thread_resume) <sig>: New comment.
9079
5c3216e2
OS
90802010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9081
c6f46ca0
OS
9082 * server.c (handle_query): strcpy() the returned string from paddress()
9083 instead of sprintf().
5c3216e2
OS
9084 * utils.c (paddress): Return phex_nz().
9085
6bd31874
JB
90862010-07-07 Joel Brobecker <brobecker@adacore.com>
9087
9088 * server.c (handle_v_cont): Call mourn_inferior if process
9089 just exited.
9090 (myresume): Likewise.
9091
0fb4aa4b
PA
90922010-07-01 Pedro Alves <pedro@codesourcery.com>
9093
9094 Static tracepoints, and integration with UST.
9095
9096 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9097 * mem-break.c (uninsert_all_breakpoints)
9098 (reinsert_all_breakpoints): New.
9099 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9100 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9101 (gdb_agent_ust_loaded, helper_thread_id)
9102 (gdb_agent_helper_thread_id): New macros.
9103 (struct ipa_sym_addresses): Add addr_ust_loaded,
9104 addr_helper_thread_id, addr_cmd_buf.
9105 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9106 (in_process_agent_loaded_ust): New.
9107 (write_e_ust_not_loaded): New.
9108 (maybe_write_ipa_ust_not_loaded): New.
9109 (struct collect_static_trace_data_action): New.
9110 (enum tracepoint_type) <static_tracepoint>: New.
9111 (struct tracepoint) <handle>: Mention static tracepoints.
9112 (struct static_tracepoint_ctx): New.
9113 (CMD_BUF_SIZE): New.
9114 (add_tracepoint_action): Handle static tracepoint actions.
9115 (unprobe_marker_at): New.
9116 (clear_installed_tracepoints): Handle static tracepoints.
9117 (cmd_qtdp): Handle static tracepoints.
9118 (probe_marker_at): New.
9119 (cmd_qtstart): Handle static tracepoints.
9120 (response_tracepoint): Handle static tracepoints.
9121 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9122 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9123 (get_context_regcache): Handle static tracepoints.
9124 (do_action_at_tracepoint): Handle static tracepoint actions.
9125 (traceframe_find_block_type): Handle static trace data blocks.
9126 (traceframe_read_sdata): New.
9127 (download_tracepoints): Download static tracepoint actions.
9128 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9129 (GDB_PROBE_NAME): New.
9130 (ust_ops): New.
9131 (GET_UST_SYM): New.
9132 (USTF): New.
9133 (dlsym_ust): New.
9134 (ust_marker_to_static_tracepoint): New.
9135 (gdb_probe): New.
9136 (collect_ust_data_at_tracepoint): New.
9137 (gdb_ust_probe): New.
9138 (UNIX_PATH_MAX, SOCK_DIR): New.
9139 (gdb_ust_connect_sync_socket): New.
9140 (resume_thread, stop_thread): New.
9141 (run_inferior_command): New.
9142 (init_named_socket): New.
9143 (gdb_ust_socket_init): New.
9144 (cstr_to_hexstr): New.
9145 (next_st): New.
9146 (first_marker, next_marker): New.
9147 (response_ust_marker): New.
9148 (cmd_qtfstm, cmd_qtsstm): New.
9149 (unprobe_marker_at, probe_marker_at): New.
9150 (cmd_qtstmat, gdb_ust_thread): New.
9151 (gdb_ust_init): New.
9152 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9153 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9154 (ST_REGENTRY): New.
9155 (x86_64_st_collect_regmap): New.
9156 (X86_64_NUM_ST_COLLECT_GREGS): New.
9157 (AMD64_RIP_REGNUM): New.
9158 (supply_static_tracepoint_registers): New.
9159 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9160 (ST_REGENTRY): New.
9161 (i386_st_collect_regmap): New.
9162 (i386_NUM_ST_COLLECT_GREGS): New.
9163 (supply_static_tracepoint_registers): New.
9164 * server.c (handle_query): Handle qXfer:statictrace:read.
9165 <qSupported>: Report support for StaticTracepoints, and
9166 qXfer:statictrace:read features.
9167 * server.h (traceframe_read_sdata)
9168 (supply_static_tracepoint_registers): Declare.
9169 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9170 (unpack_varlen_hex): Include in IPA build.
9171 * Makefile.in (ustlibs, ustinc): New.
9172 (IPA_OBJS): Add remote-utils-ipa.o.
9173 ($(IPA_LIB)): Link -ldl and -lpthread.
9174 (UST_CFLAGS): New.
9175 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9176 * config.in, configure: Regenerate.
9177
9e4344e5
PA
91782010-06-20 Ian Lance Taylor <iant@google.com>
9179 Pedro Alves <pedro@codesourcery.com>
9180
9181 * linux-x86-low.c (always_true): Delete.
9182 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9183 trying to fool the compiler with always_true.
9184
c6beb2cb
PA
91852010-06-20 Pedro Alves <pedro@codesourcery.com>
9186
9187 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9188 conditions in gdbserver.
9189
d2ed6730
UW
91902010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9191
9192 * spu-low.c (spu_read_memory): Wrap around local store limit.
9193 (spu_write_memory): Likewise.
9194
4e29fb54
PA
91952010-06-15 Pedro Alves <pedro@codesourcery.com>
9196
9197 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9198 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9199 LONGEST uses.
9200 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9201 uses.
9202 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9203 uses with LONGEST uses.
9204
6a271cae
PA
92052010-06-14 Stan Shebs <stan@codesourcery.com>
9206 Pedro Alves <pedro@codesourcery.com>
9207
9208 Bytecode compiler.
9209
9210 * linux-x86-low.c: Include limits.h.
9211 (add_insns): New.
9212 (always_true): New.
9213 (EMIT_ASM): New.
9214 (EMIT_ASM32): New.
9215 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9216 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9217 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9218 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9219 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9220 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9221 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9222 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9223 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9224 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9225 (amd64_emit_void_call_2): New.
9226 (amd64_emit_ops): New.
9227 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9228 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9229 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9230 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9231 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9232 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9233 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9234 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9235 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9236 (i386_emit_stack_adjust, i386_emit_int_call_1)
9237 (i386_emit_void_call_2): New.
9238 (i386_emit_ops): New.
9239 (x86_emit_ops): New.
9240 (the_low_target): Install x86_emit_ops.
9241 * server.h (struct emit_ops): New.
9242 (get_raw_reg_func_addr): Declare.
9243 (current_insn_ptr, emit_error): Declare.
9244 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9245 (set_trace_state_variable_value): New defines.
9246 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9247 addr_get_trace_state_variable_value and
9248 addr_set_trace_state_variable_value.
9249 (symbol_list): New fields for get_raw_reg,
9250 get_trace_state_variable_value and set_trace_state_variable_value.
9251 (condfn): New typedef.
9252 (struct tracepoint): New field `compiled_cond'.
9253 (do_action_at_tracepoint): Clear compiled_cond.
9254 (get_trace_state_variable_value, set_trace_state_variable_value):
9255 Export in the IPA.
9256 (condition_true_at_tracepoint): If there's a compiled condition,
9257 run that.
9258 (current_insn_ptr, emit_error): New globals.
9259 (struct bytecode_address): New.
9260 (get_raw_reg_func_addr): New.
9261 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9262 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9263 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9264 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9265 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9266 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9267 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9268 (compile_tracepoint_condition, compile_bytecodes): New.
9269 * target.h (emit_ops): Forward declare.
9270 (struct target_ops): New field emit_ops.
9271 (target_emit_ops): New.
9272 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9273 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9274 * linux-low.c (linux_emit_ops): New.
9275 (linux_target_ops): Install it.
9276 * linux-low.h (struct linux_target_ops): New field emit_ops.
9277
92b72907
UW
92782010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9279
9280 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9281 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9282
fa593d66
PA
92832010-06-01 Pedro Alves <pedro@codesourcery.com>
9284 Stan Shebs <stan@codesourcery.com>
9285
9286 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9287 (all): Depend on $(extra_libraries).
9288 (install-only): Install the IPA.
9289 (IPA_OBJS, IPA_LIB): New.
9290 (clean): Remove the IPA lib.
9291 (IPAGENT_CFLAGS): New.
9292 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9293 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9294 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9295 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9296 * configure.ac: Check for atomic builtins support in the compiler.
9297 (IPA_DEPFILES, extra_libraries): Define.
9298 * configure.srv (ipa_obj): Add description.
9299 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9300 (i[34567]86-*-linux*): Set ipa_obj.
9301 (x86_64-*-linux*): Set ipa_obj.
9302 * linux-low.c (stabilizing_threads): New.
9303 (supports_fast_tracepoints): New.
9304 (linux_detach): Stabilize threads before detaching.
9305 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9306 the lwp is either not stabilizing, or is moving out of a jump pad.
9307 (linux_fast_tracepoint_collecting): New.
9308 (maybe_move_out_of_jump_pad): New.
9309 (enqueue_one_deferred_signal): New.
9310 (dequeue_one_deferred_signal): New.
9311 (linux_wait_for_event_1): If moving out of a jump pad, defer
9312 pending signals to later.
9313 (linux_stabilize_threads): New.
9314 (linux_wait_1): Check if threads need moving out of jump pads, and
9315 do it if so.
9316 (stuck_in_jump_pad_callback): New.
9317 (move_out_of_jump_pad_callback): New.
9318 (lwp_running): New.
9319 (linux_resume_one_lwp): Handle moving out of jump pads.
9320 (linux_set_resume_request): Dequeue deferred signals.
9321 (need_step_over_p): Also step over fast tracepoint jumps.
9322 (start_step_over): Also uninsert fast tracepoint jumps.
9323 (finish_step_over): Also reinsert fast tracepoint jumps.
9324 (linux_install_fast_tracepoint_jump): New.
9325 (linux_target_ops): Install linux_stabilize_threads and
9326 linux_install_fast_tracepoint_jump_pad.
9327 * linux-low.h (linux_target_ops) <get_thread_area,
9328 install_fast_tracepoint_jump_pad>: New fields.
9329 (struct lwp_info) <collecting_fast_tracepoint,
9330 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9331 (linux_get_thread_area): Declare.
9332 * linux-x86-low.c (jump_insn): New.
9333 (x86_get_thread_area): New.
9334 (append_insns): New.
9335 (push_opcode): New.
9336 (amd64_install_fast_tracepoint_jump_pad): New.
9337 (i386_install_fast_tracepoint_jump_pad): New.
9338 (x86_install_fast_tracepoint_jump_pad): New.
9339 (the_low_target): Install x86_get_thread_area and
9340 x86_install_fast_tracepoint_jump_pad.
9341 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9342 (struct fast_tracepoint_jump): New.
9343 (fast_tracepoint_jump_insn): New.
9344 (fast_tracepoint_jump_shadow): New.
9345 (find_fast_tracepoint_jump_at): New.
9346 (fast_tracepoint_jump_here): New.
9347 (delete_fast_tracepoint_jump): New.
9348 (set_fast_tracepoint_jump): New.
9349 (uninsert_fast_tracepoint_jumps_at): New.
9350 (reinsert_fast_tracepoint_jumps_at): New.
9351 (set_breakpoint_at): Use write_inferior_memory.
9352 (uninsert_raw_breakpoint): Use write_inferior_memory.
9353 (check_mem_read): Mask out fast tracepoint jumps.
9354 (check_mem_write): Mask out fast tracepoint jumps.
9355 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9356 (set_fast_tracepoint_jump): Declare.
9357 (delete_fast_tracepoint_jump)
9358 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9359 (reinsert_fast_tracepoint_jumps_at): Declare.
9360 * regcache.c: Don't compile many functions when building the
9361 in-process agent library.
9362 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9363 the register buffer in the heap.
9364 (free_register_cache): If the register buffer isn't owned by the
9365 regcache, don't free it.
9366 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9367 pre-existing register caches.
9368 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9369 type.
9370 (convert_ascii_to_int): : Constify `from' parameter type.
9371 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9372 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9373 the needed buffer in-place.
9374 (relocate_instruction): New.
9375 * server.c (handle_query) <qSymbols>: If the target supports
9376 tracepoints, give it a chance of looking up symbols. Report
9377 support for fast tracepoints.
9378 (handle_status): Stabilize threads.
9379 (process_serial_event): Adjust.
9380 * server.h (struct fast_tracepoint_jump): Forward declare.
9381 (struct process_info) <fast_tracepoint_jumps>: New field.
9382 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9383 (decode_X_packet, decode_M_packet): Adjust.
9384 (relocate_instruction): Declare.
9385 (in_process_agent_loaded): Declare.
9386 (tracepoint_look_up_symbols): Declare.
9387 (struct fast_tpoint_collect_status): Declare.
9388 (fast_tracepoint_collecting): Declare.
9389 (force_unlock_trace_buffer): Declare.
9390 (handle_tracepoint_bkpts): Declare.
9391 (initialize_low_tracepoint)
9392 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9393 * target.h (struct target_ops) <stabilize_threads,
9394 install_fast_tracepoint_jump_pad>: New fields.
9395 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9396 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9397 [HAVE_STDINT_H]: Include stdint.h.
9398 (trace_debug_1): Rename to ...
9399 (trace_vdebug): ... this.
9400 (trace_debug): Rename to ...
9401 (trace_debug_1): ... this. Add `level' parameter.
9402 (trace_debug): New.
9403 (ATTR_USED, ATTR_NOINLINE): New.
9404 (IP_AGENT_EXPORT): New.
9405 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9406 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9407 (about_to_request_buffer_space, trace_buffer_is_full)
9408 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9409 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9410 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9411 (traceframe_write_count, traceframes_created)
9412 (trace_state_variables)
9413 New renaming defines.
9414 (struct ipa_sym_addresses): New.
9415 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9416 (symbol_list): New.
9417 (ipa_sym_addrs): New.
9418 (all_tracepoint_symbols_looked_up): New.
9419 (in_process_agent_loaded): New.
9420 (write_e_ipa_not_loaded): New.
9421 (maybe_write_ipa_not_loaded): New.
9422 (tracepoint_look_up_symbols): New.
9423 (debug_threads) [IN_PROCESS_AGENT]: New.
9424 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9425 (UNKNOWN_SIDE_EFFECTS): New.
9426 (stop_tracing): New.
9427 (flush_trace_buffer): New.
9428 (stop_tracing_bkpt): New.
9429 (flush_trace_buffer_bkpt): New.
9430 (read_inferior_integer): New.
9431 (read_inferior_uinteger): New.
9432 (read_inferior_data_pointer): New.
9433 (write_inferior_data_pointer): New.
9434 (write_inferior_integer): New.
9435 (write_inferior_uinteger): New.
9436 (struct collect_static_trace_data_action): Delete.
9437 (enum tracepoint_type): New.
9438 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9439 <actions_str, step_actions, step_actions_str>: Only include in
9440 GDBserver.
fa593d66
PA
9441 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9442 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9443 (tracepoints): Use IP_AGENT_EXPORT.
9444 (last_tracepoint): Don't include in the IPA.
9445 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9446 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9447 (alloced_trace_state_variables): New.
9448 (trace_state_variables): Use IP_AGENT_EXPORT.
9449 (traceframe_t): Delete unused variable.
9450 (circular_trace_buffer): Don't include in the IPA.
9451 (trace_buffer_start): Delete.
9452 (struct trace_buffer_control): New.
9453 (trace_buffer_free): Delete.
9454 (struct ipa_trace_buffer_control): New.
9455 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9456 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9457 New.
9458 (trace_buffer_ctrl): New.
9459 (TRACE_BUFFER_CTRL_CURR): New.
9460 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9461 Reimplement as macros.
9462 (trace_buffer_wrap): Delete.
9463 (traceframe_write_count, traceframe_read_count)
9464 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9465 (struct tracepoint_hit_ctx) <type>: New field.
9466 (struct fast_tracepoint_ctx): New.
9467 (memory_barrier): New.
9468 (cmpxchg): New.
9469 (record_tracepoint_error): Update atomically in the IPA.
9470 (clear_inferior_trace_buffer): New.
9471 (about_to_request_buffer_space): New.
9472 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9473 updating the same buffer.
9474 (add_tracepoint): Default the tracepoint's type to trap
9475 tracepoint, and orig_size to -1.
9476 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9477 internal variables.
9478 (create_trace_state_variable): New parameter `gdb'. Handle it.
9479 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9480 (cmd_qtdp): Handle fast tracepoints.
9481 (cmd_qtdv): Adjust.
9482 (max_jump_pad_size): New.
9483 (gdb_jump_pad_head): New.
9484 (get_jump_space_head): New.
9485 (claim_jump_space): New.
9486 (sort_tracepoints): New.
9487 (MAX_JUMP_SIZE): New.
9488 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9489 IPA.
9490 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9491 support. Upload fast traceframes, and delete internal IPA
9492 breakpoints.
9493 (stop_tracing_handler): New.
9494 (flush_trace_buffer_handler): New.
9495 (cmd_qtstop): Upload fast tracepoints.
9496 (response_tracepoint): Handle fast tracepoints.
9497 (tracepoint_finished_step): Upload fast traceframes. Set the
9498 tracepoint hit context's tracepoint type.
9499 (handle_tracepoint_bkpts): New.
9500 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9501 type. Add comment about fast tracepoints.
9502 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9503 non-existing action_str field.
9504 (get_context_regcache): Handle fast tracepoints.
9505 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9506 to the regcache.
9507 (fast_tracepoint_from_jump_pad_address): New.
9508 (fast_tracepoint_from_ipa_tpoint_address): New.
9509 (collecting_t): New.
9510 (force_unlock_trace_buffer): New.
9511 (fast_tracepoint_collecting): New.
9512 (collecting): New.
9513 (gdb_collect): New.
9514 (write_inferior_data_ptr): New.
9515 (target_tp_heap): New.
9516 (target_malloc): New.
9517 (download_agent_expr): New.
9518 (UALIGN): New.
9519 (download_tracepoints): New.
9520 (download_trace_state_variables): New.
9521 (upload_fast_traceframes): New.
9522 (IPA_FIRST_TRACEFRAME): New.
9523 (IPA_NEXT_TRACEFRAME_1): New.
9524 (IPA_NEXT_TRACEFRAME): New.
9525 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9526 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9527 (gdb_jump_pad_buffer_end): New.
9528 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9529 (initialize_tracepoint): Adjust.
9530 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9531 buffer. Initialize the low module.
9532 * utils.c (PREFIX, TOOLNAME): New.
9533 (malloc_failure): Use PREFIX.
9534 (error): In the IPA, an error causes an exit.
9535 (fatal, warning): Use PREFIX.
9536 (internal_error): Use TOOLNAME.
9537 (NUMCELLS): Increase to 10.
9538 * configure, config.in: Regenerate.
9539
d149dd1d
PA
95402010-06-01 Pedro Alves <pedro@codesourcery.com>
9541
9542 * server.c (handle_query) <qSupported>: Do two passes over the
9543 qSupported string to avoid nesting strtok.
9544
f6528abd
JK
95452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9546
9547 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9548 (CDEPS): New.
9549 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9550 -Wl,--dynamic-list.
9551 * configure: Regenerate.
9552 * proc-service.list: New.
9553
ca2a87a0
JK
95542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9557 New comment.
9558
363a6e9f
OS
95592010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9560
9561 * gdbreplay.c (remote_open): Check error return from socket() call by
9562 its equality to -1 not by it being negative.
9563 * remote-utils.c (remote_open): Likewise.
9564
d23b6cb1
PA
95652010-05-23 Pedro Alves <pedro@codesourcery.com>
9566
9567 * config.h: Regenerate.
9568
28d3cf85
MK
95692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9570
9571 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9572 doesn't provide PTRACE_GET_THREAD_AREA.
9573
fea36a59
MK
95742010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9575
9576 * linux-m68k-low.c: Include <asm/ptrace.h>
9577 (ps_get_thread_area): Implement.
9578
24b066ba
DE
95792010-05-03 Doug Evans <dje@google.com>
9580
9581 * event-loop.c (struct callback_event): New struct.
9582 (callback_list): New global.
9583 (append_callback_event, delete_callback_event): New functions.
9584 (process_callback): New function.
9585 (start_event_loop): Call it.
9586 * remote-utils.c (NOT_SCHEDULED): Define.
9587 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9588 moved out of readchar.
9589 (readchar): Rewrite. Call reschedule before returning.
9590 (reset_readchar): New function.
9591 (remote_close): Call it.
9592 (process_remaining, reschedule): New functions.
9593 * server.h (callback_handler_func): New typedef.
9594 (append_callback_event, delete_callback_event): Declare.
9595
9836d6ea
PA
95962010-05-03 Pedro Alves <pedro@codesourcery.com>
9597
9598 * proc-service.c (ps_pglobal_lookup): Use
9599 thread_db_look_up_one_symbol.
9600 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9601 parameter. Use it instead of all_symbols_looked_up.
9602 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9603 field.
9604 (all_symbols_looked_up): Don't declare.
9605 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9606 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9607 field.
9608 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9609 Set all_symbols_looked_up here.
9610 (thread_db_look_up_one_symbol): New.
9611 (thread_db_get_tls_address): Adjust.
9612 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9613 thread_db object on the heap, and tentatively set it in the
9614 process structure.
9615 (thread_db_init): Don't set all_symbols_looked_up here.
9616 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9617
7984d532
PA
96182010-05-03 Pedro Alves <pedro@codesourcery.com>
9619
9620 * linux-low.c (linux_kill, linux_detach): Adjust.
9621 (status_pending_p_callback): Remove redundant statement. Check
9622 for !TARGET_WAITIKIND_IGNORE, instead of
9623 TARGET_WAITKIND_STOPPED.
9624 (handle_tracepoints): Make sure LWP is locked. Adjust.
9625 (linux_wait_for_event_1): Adjust.
9626 (linux_cancel_breakpoints): New.
9627 (unsuspend_one_lwp): New.
9628 (unsuspend_all_lwps): New.
9629 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9630 (send_sigstop_callback): Change return type to int, add new
9631 `except' parameter and handle it.
9632 (suspend_and_send_sigstop_callback): New.
9633 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9634 pass them down. If SUSPEND, also increment the lwp's suspend
9635 count.
9636 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9637 (need_step_over_p): Don't consider suspended LWPs.
9638 (start_step_over): Adjust.
9639 (proceed_one_lwp): Change return type to int, add new `except'
9640 parameter and handle it.
9641 (unsuspend_and_proceed_one_lwp): New.
9642 (proceed_all_lwps): Use find_inferior instead of
9643 for_each_inferior.
9644 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9645 also decrement the suspend count of LWPs. Pass `except' down,
9646 instead of hacking its suspend count.
9647 (linux_pause_all): Add `freeze' parameter. Adjust.
9648 (linux_unpause_all): New.
9649 (linux_target_ops): Install linux_unpause_all.
9650 * server.c (handle_status): Adjust.
9651 * target.h (struct target_ops): New fields `unpause_all' and
9652 `cancel_breakpoints'. Add new parameter to `pause_all'.
9653 (pause_all): Add new `freeze' parameter.
9654 (unpause_all): New.
9655 (cancel_breakpoints): New.
9656 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9657 cancel breakpoints.
9658 (cmd_qtstart): Pause threads.
9659 (stop_tracing): Pause threads, and cancel breakpoints.
9660 * win32-low.c (win32_target_ops): Adjust.
9661
e471f25b
PA
96622010-05-03 Pedro Alves <pedro@codesourcery.com>
9663
9664 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9665 the inferior right away from here...
9666 (linux_wait_1): ... to here, and adjust to check the thread's
9667 last_resume_kind instead of the lwp's step or stop_expected flags.
9668
1915ef4f
PA
96692010-05-02 Pedro Alves <pedro@codesourcery.com>
9670
9671 * README: Use consistent `GDB' and `GDBserver' spellings.
9672
f9e39928
PA
96732010-05-02 Pedro Alves <pedro@codesourcery.com>
9674
9675 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9676 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9677 (linux_detach_one_lwp): Assume the lwp is stopped.
9678 (any_thread_of): Delete.
9679 (linux_detach): Stop all lwps here. Don't blindly delete all
9680 breakpoints.
9681 (delete_lwp_callback): New.
9682 (linux_mourn): Delete all lwps of the process that is gone.
9683 (linux_wait_1): Don't delete the last lwp of the process here.
9684 * mem-break.h (mark_breakpoints_out): Declare.
9685 * mem-break.c (mark_breakpoints_out): New.
9686 (free_all_breakpoints): Use it.
9687 * server.c (handle_target_event): If the process is gone, mark
9688 breakpoints out.
9689 * thread-db.c (struct thread_db) <create_bp>: New field.
9690 (thread_db_enable_reporting): Fix prototype. Store a thread event
9691 breakpoint reference in the thread_db struct.
9692 (thread_db_load_search): Clear the thread_db object.
9693 (try_thread_db_load_1): Ditto.
9694 (switch_to_process): New.
9695 (disable_thread_event_reporting): Use it.
9696 (remove_thread_event_breakpoints): New.
9697 (thread_db_detach, thread_db_mourn): Use it.
9698
1e7fc18c
PA
96992010-05-01 Pedro Alves <pedro@codesourcery.com>
9700
9701 * linux-low.c (linux_enable_event_reporting): New.
9702 (linux_wait_for_event_1, handle_extended_wait): Use it.
9703
02fc4de7
PA
97042010-04-30 Pedro Alves <pedro@codesourcery.com>
9705
9706 * linux-low.c (linux_kill_one_lwp, linux_kill)
9707 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9708 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9709 SIGSTOP even if the LWP is stopped.
9710 (send_sigstop_callback): New.
9711 (stop_all_lwps): Use send_sigstop_callback instead.
9712 (linux_resume_one_thread): Adjust.
9713 (proceed_one_lwp): Still proceed an LWP that the client has
9714 requested to stop, if we haven't reported it as stopped yet. Make
9715 sure that LWPs the client want stopped, have a pending SIGSTOP.
9716
bc3b5632
DE
97172010-04-26 Doug Evans <dje@google.com>
9718
ae1ada35
DE
9719 * server.c (handle_general_set): Make static.
9720
bc3b5632
DE
9721 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9722 Print received char after testing for error/eof instead of before.
9723 (input_interrupt): Tweak comment.
9724
65730243
DE
97252010-04-23 Doug Evans <dje@google.com>
9726
9727 * server.c (start_inferior): Print inferior argv if --debug.
9728
a8ae7dc0
AR
97292010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9730
9731 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9732 * nto-x86-low.c: Include server.h
9733
1c07cc19
PM
97342010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9735
9736 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9737 be consistent with other sources of this directory.
9738 (init_registers_amd64): Correct name of source file of this function
9739 in the comment.
9740
e0a61e09
PM
97412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9742
9743 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9744 64-bit executables.
9745
54709339
PM
97462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9747
9748 * win32-i386-low.c: Add 64-bit support.
9749 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9750 (init_registers_amd64): Declare.
9751 (mappings): Add 64-bit version of array.
9752 (init_windows_x86): New function.
9753 (the_low_target): Change init_arch field to init_windows_x86.
9754
e8f0053d
PM
97552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9756
9757 * win32-low.c: Adapt to support also 64-bit architecture.
9758 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9759 (get_image_name): Use SIZE_T type for local variable `done'.
9760 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9761 (toolhelp_get_dll_name): Idem.
9762 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9763 Use uintptr_t typecast to avoid warning.
9764 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9765 (handle_exception): Use phex_nz to avoid warning.
9766 (win32_wait): Remove unused local variable `process'.
9767
c481e77e
PM
97682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9769
9770 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9771 `amd64-avx.o'.
9772
12ea4b69
PM
97732010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9774
9775 * configure.ac: Use `ws2_32' library for srv_mingw.
9776 * configure: Regenerate.
9777 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9778 * remote-utils.c: Likewise.
9779
f6d1620c
L
97802010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9781
9782 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9783 if __x86_64__ is defined.
9784
8e642873
PM
97852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9786
9787 * configure: Regenerate.
9788
711e434b
PM
97892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9790
9791 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9792 * target.h (target_ops): New get_tib_address field.
9793 * win32-low.h (win32_thread_info): Add thread_local_base field.
9794 * win32-low.c (child_add_thread): Add tlb argument.
9795 Set thread_local_base field to TLB.
9796 (get_child_debug_event): Adapt to child_add_thread change.
9797 (win32_get_tib_address): New function.
9798 (win32_target_ops): Set get_tib_address field to
9799 win32_get_tib_address.
9800 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9801
505106cd
PA
98022010-04-12 Pedro Alves <pedro@codesourcery.com>
9803
505106cd
PA
9804 * linux-low.c (linux_mourn): Also remove the process.
9805 * server.c (handle_target_event): Don't remove the process here.
9806 * nto-low.c (nto_mourn): New.
9807 (nto_target_ops): Install it.
9808 * spu-low.c (spu_mourn): New.
9809 (spu_target_ops): Install it.
9810 * win32-low.c (win32_mourn): New.
9811 (win32_target_ops): Install it.
9812
e8470a06
PA
98132010-04-12 Pedro Alves <pedro@codesourcery.com>
9814
9815 * server.h (buffer_xml_printf): Remove redundant `;'.
9816
45ba0d02
PA
98172010-04-12 Pedro Alves <pedro@codesourcery.com>
9818
9819 * regcache.c (set_register_cache): Invalidate regcaches before
9820 changing the register cache layout.
9821 (regcache_invalidate_one): Allow a NULL regcache.
9822 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9823 regcaches before changing the register cache layout or the target
9824 regsets.
9825
59e04013
L
98262010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9827
9828 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9829 variable warning on Linux/x86-64.
9830
8336d594
PA
98312010-04-11 Pedro Alves <pedro@codesourcery.com>
9832
9833 GDBserver disconnected tracing support.
9834
9835 * linux-low.c (linux_remove_process): Delete.
9836 (add_lwp): Don't set last_resume_kind here.
9837 (linux_kill): Use `mourn'.
9838 (linux_detach): Use `thread_db_detach', and `mourn'.
9839 (linux_mourn): New.
9840 (linux_attach_lwp_1): Adjust comment.
9841 (linux_attach): last_resume_kind moved the thread_info; adjust.
9842 (status_pending_p_callback): Adjust.
9843 (linux_wait_for_event_1): Adjust.
9844 (count_events_callback, select_singlestep_lwp_callback)
9845 (select_event_lwp_callback, cancel_breakpoints_callback)
9846 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9847 (proceed_one_lwp): Adjust.
9848 (linux_async): Add debug output.
9849 (linux_thread_stopped): New.
9850 (linux_pause_all): New.
9851 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9852 linux_pause_all.
9853 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9854 (thread_db_free): Delete declaration.
9855 (thread_db_detach, thread_db_mourn): Declare.
9856 * thread-db.c (thread_db_init): Use thread_db_mourn.
9857 (thread_db_free): Delete, split in two.
9858 (disable_thread_event_reporting): New.
9859 (thread_db_detach): New.
9860 (thread_db_mourn): New.
9861
9862 * server.h (struct thread_info) <last_resume_kind>: New field.
9863 <attached>: Add comment.
9864 <gdb_detached>: New field.
9865 (handler_func): Change return type to int.
9866 (handle_serial_event, handle_target_event): Ditto.
9867 (gdb_connected): Declare.
9868 (tracing): Delete.
9869 (disconnected_tracing): Declare.
9870 (stop_tracing): Declare.
9871
9872 * server.c (handle_query) <qSupported>: Report support for
9873 disconnected tracing.
9874 (queue_stop_reply_callback): Account for running threads.
9875 (gdb_wants_thread_stopped): New.
9876 (gdb_wants_all_threads_stopped): New.
9877 (gdb_reattached_process): New.
9878 (handle_status): Clear the `gdb_detached' flag of all processes.
9879 In all-stop, stop all threads.
9880 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9881 (process_serial_event): If the remote connection breaks, or if an
9882 exit was forced with "monitor exit", force an event loop exit.
9883 Handle disconnected tracing on detach.
9884 (handle_serial_event): Adjust.
9885 (handle_target_event): If GDB isn't connected, forward events back
9886 to the inferior, unless the last process exited, in which case,
9887 exit gdbserver. Adjust interface.
9888
9889 * remote-utils.c (remote_open): Don't block in accept. Instead
9890 register an event loop source on the listen socket file
9891 descriptor. Refactor bits into ...
9892 (listen_desc): ... this new global.
9893 (gdb_connected): ... this new function.
9894 (enable_async_notification): ... this new function.
9895 (handle_accept_event): ... this new function.
9896 (remote_close): Clear remote_desc.
9897
9898 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9899
9900 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9901 New fields.
9902 (mourn_inferior): Define.
9903 (target_process_qsupported): Avoid the dangling else problem.
9904 (thread_stopped): Define.
9905 (pause_all): Define.
9906 (target_waitstatus_to_string): Declare.
9907 * target.c (target_waitstatus_to_string): New.
9908
9909 * tracepoint.c (tracing): Make extern.
9910 (disconnected_tracing): New.
9911 (stop_tracing): Make extern. Handle tracing stops due to GDB
9912 disconnecting.
9913 (cmd_qtdisconnected): New.
9914 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9915 (handle_tracepoint_general_set): Handle QTDisconnected.
9916
9917 * event-loop.c (event_handler_func): Change return type to int.
9918 (process_event): Bail out if the event handler wants the event
9919 loop to stop.
9920 (handle_file_event): Ditto.
9921 (start_event_loop): Bail out if the event handler wants the event
9922 loop to stop.
9923
9924 * nto-low.c (nto_target_ops): Adjust.
9925 * spu-low.c (spu_wait): Don't remove the process here.
9926 (spu_target_ops): Adjust.
9927 * win32-low.c (win32_wait): Don't remove the process here.
9928 (win32_target_ops): Adjust.
9929
5d267c4c
PA
99302010-04-11 Pedro Alves <pedro@codesourcery.com>
9931
9932 * regcache.c (realloc_register_cache): Invalidate inferior's
9933 regcache before recreating it.
9934
623ccd72
PA
99352010-04-09 Pedro Alves <pedro@codesourcery.com>
9936
9937 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9938
219f2f23
PA
99392010-04-09 Stan Shebs <stan@codesourcery.com>
9940 Pedro Alves <pedro@codesourcery.com>
9941
9942 * server.h (LONGEST): New.
9943 (struct thread_info) <while_stepping>: New field.
9944 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9945 Declare.
9946 (initialize_tracepoint, handle_tracepoint_general_set)
9947 (handle_tracepoint_query, tracepoint_finished_step)
9948 (tracepoint_was_hit, release_while_stepping_state_list):
9949 (current_traceframe): Declare.
9950 * server.c (handle_general_set): Handle tracepoint packets.
9951 (read_memory): New.
9952 (write_memory): New.
9953 (handle_search_memory_1): Use read_memory.
9954 (handle_query): Report support for conditional tracepoints, trace
9955 state variables, and tracepoint sources. Handle tracepoint
9956 queries.
9957 (main): Initialize the tracepoints module.
9958 (process_serial_event): Handle traceframe reads/writes.
9959
9960 * linux-low.c (handle_tracepoints): New.
9961 (linux_wait_1): Call it.
9962 (linux_resume_one_lwp): Handle while-stepping.
9963 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9964 (linux_target_ops): Install them.
9965 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9966 New field.
9967 * linux-x86-low.c (x86_supports_tracepoints): New.
9968 (the_low_target). Install it.
9969
9970 * mem-break.h (delete_breakpoint): Declare.
9971 * mem-break.c (delete_breakpoint): Make external.
9972
9973 * target.h (struct target_ops): Add `supports_tracepoints',
9974 `read_pc', and `write_pc' fields.
9975 (target_supports_tracepoints): Define.
9976 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9977 (phex_nz): New.
9978
9979 * regcache.h (struct regcache) <registers_owned>: New field.
9980 (init_register_cache, regcache_cpy): Declare.
9981 (regcache_read_pc, regcache_write_pc): Declare.
9982 (register_cache_size): Declare.
9983 (supply_regblock): Declare.
9984 * regcache.c (init_register_cache): New.
9985 (new_register_cache): Use it.
9986 (regcache_cpy): New.
9987 (register_cache_size): New.
9988 (supply_regblock): New.
9989 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9990
219f2f23
PA
9991 * tracepoint.c: New.
9992
9993 * Makefile.in (OBS): Add tracepoint.o.
9994 (tracepoint.o): New rule.
9995
3a13a53b
L
99962010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9997
9998 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9999 (i386-mmx.o): New.
10000 (i386-mmx.c): Likewise.
10001 (i386-mmx-linux.o): Likewise.
10002 (i386-mmx-linux.c): Likewise.
10003
10004 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10005 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10006 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10007 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10008
10009 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10010 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10011 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10012
1570b33e
L
100132010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10014
10015 * Makefile.in (clean): Updated.
10016 (i386-avx.o): New.
10017 (i386-avx.c): Likewise.
10018 (i386-avx-linux.o): Likewise.
10019 (i386-avx-linux.c): Likewise.
10020 (amd64-avx.o): Likewise.
10021 (amd64-avx.c): Likewise.
10022 (amd64-avx-linux.o): Likewise.
10023 (amd64-avx-linux.c): Likewise.
10024
10025 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10026 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10027 (srv_amd64_regobj): Add amd64-avx.o.
10028 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10029 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10030 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10031 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10032 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10033 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10034 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10035
10036 * i387-fp.c: Include "i386-xstate.h".
10037 (i387_xsave): New.
10038 (i387_cache_to_xsave): Likewise.
10039 (i387_xsave_to_cache): Likewise.
10040 (x86_xcr0): Likewise.
10041
10042 * i387-fp.h (i387_cache_to_xsave): Likewise.
10043 (i387_xsave_to_cache): Likewise.
10044 (x86_xcr0): Likewise.
10045
10046 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10047 * linux-crisv32-low.c (target_regsets): Likewise.
10048 * linux-m68k-low.c (target_regsets): Likewise.
10049 * linux-mips-low.c (target_regsets): Likewise.
10050 * linux-ppc-low.c (target_regsets): Likewise.
10051 * linux-s390-low.c (target_regsets): Likewise.
10052 * linux-sh-low.c (target_regsets): Likewise.
10053 * linux-sparc-low.c (target_regsets): Likewise.
10054 * linux-xtensa-low.c (target_regsets): Likewise.
10055
10056 * linux-low.c: Include <sys/uio.h>.
10057 (regsets_fetch_inferior_registers): Support nt_type.
10058 (regsets_store_inferior_registers): Likewise.
10059 (linux_process_qsupported): New.
10060 (linux_target_ops): Add linux_process_qsupported.
10061
10062 * linux-low.h (regset_info): Add nt_type.
10063 (linux_target_ops): Add process_qsupported.
10064
10065 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10066 and <sys/uio.h>.
10067 (init_registers_i386_avx_linux): New.
10068 (init_registers_amd64_avx_linux): Likewise.
10069 (xmltarget_i386_linux_no_xml): Likewise.
10070 (xmltarget_amd64_linux_no_xml): Likewise.
10071 (PTRACE_GETREGSET): Likewise.
10072 (PTRACE_SETREGSET): Likewise.
10073 (x86_fill_xstateregset): Likewise.
10074 (x86_store_xstateregset): Likewise.
10075 (use_xml): Likewise.
10076 (x86_linux_update_xmltarget): Likewise.
10077 (x86_linux_process_qsupported): Likewise.
10078 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10079 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10080 init_registers_i386_linux here. Call
10081 x86_linux_update_xmltarget.
10082 (the_low_target): Add x86_linux_process_qsupported.
10083
10084 * server.c (handle_query): Call target_process_qsupported.
10085
10086 * target.h (target_ops): Add process_qsupported.
10087 (target_process_qsupported): New.
10088
fc7238bb
PA
100892010-04-03 Pedro Alves <pedro@codesourcery.com>
10090
10091 * inferiors.c (add_thread): Set last_status kind to
10092 TARGET_WAITKIND_IGNORE.
10093 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10094 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10095 (linux_wait_1): Move `thread' local definition to block that uses
10096 it. Don't NULL initialize `event_child'.
10097 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10098 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10099 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10100
bdabb078
PA
101012010-04-01 Pedro Alves <pedro@codesourcery.com>
10102
10103 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10104 an extended waitstatus, or by a watchpoint.
10105 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10106 thread was stepping or has been stopped by a watchpoint.
10107
d3bbe7a0
PA
101082010-04-01 Pedro Alves <pedro@codesourcery.com>
10109
10110 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10111 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10112 of another, then delete the previous, and validate all
10113 breakpoints.
10114 (validate_inserted_breakpoint): New.
10115 (delete_disabled_breakpoints): New.
10116 (validate_breakpoints): New.
10117 (check_mem_read): Validate breakpoints before trusting their
10118 shadow. Delete disabled breakpoints.
10119 (check_mem_write): Validate breakpoints before trusting they
10120 should be inserted. Delete disabled breakpoints.
10121 * mem-break.h (validate_breakpoints):
10122 * server.c (handle_query): Validate breakpoints when we see a
10123 qSymbol query.
10124
8b07ae33
PA
101252010-04-01 Pedro Alves <pedro@codesourcery.com>
10126
10127 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10128 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10129 if we could tell there's a GDB breakpoint at stop_pc.
10130 (need_step_over_p): Don't do a step over if we find a GDB
10131 breakpoint at the resume PC.
10132
10133 * mem-break.c (struct raw_breakpoint): New.
10134 (enum bkpt_type): New type `gdb_breakpoint'.
10135 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10136 fields. New field `raw'.
10137 (find_raw_breakpoint_at): New.
10138 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10139 breakpoint instead.
10140 (set_breakpoint_at): Adjust.
10141 (delete_raw_breakpoint): New.
10142 (release_breakpoint): New.
10143 (delete_breakpoint): Rename to...
10144 (delete_breakpoint_1): ... this. Add proc parameter. Use
10145 release_breakpoint. Return ENOENT.
10146 (delete_breakpoint): Reimplement.
10147 (find_breakpoint_at): Delete.
10148 (find_gdb_breakpoint_at): New.
10149 (delete_breakpoint_at): Delete.
10150 (set_gdb_breakpoint_at): New.
10151 (delete_gdb_breakpoint_at): New.
10152 (gdb_breakpoint_here): New.
10153 (set_reinsert_breakpoint): Use release_breakpoint.
10154 (uninsert_breakpoint): Rename to ...
10155 (uninsert_raw_breakpoint): ... this.
10156 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10157 (reinsert_raw_breakpoint): Change parameter type to
10158 raw_breakpoint.
10159 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10160 instead.
10161 (check_breakpoints): Adjust. Use release_breakpoint.
10162 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10163 (breakpoint_inserted_here): Ditto.
10164 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10165 Don't trust the breakpoint's shadow if it is not inserted.
10166 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10167 (delete_all_breakpoints): Adjust.
10168 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10169 use delete_breakpoint_1.
10170
10171 * mem-break.h (breakpoints_supported): Delete declaration.
10172 (set_gdb_breakpoint_at): Declare.
10173 (gdb_breakpoint_here): Declare.
10174 (delete_breakpoint_at): Delete.
10175 (delete_gdb_breakpoint_at): Declare.
10176
10177 * server.h (struct raw_breakpoint): Forward declare.
10178 (struct process_info): New field `raw_breakpoints'.
10179
10180 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10181 breakpoints.
10182
6bf5e0ba
PA
101832010-03-24 Pedro Alves <pedro@codesourcery.com>
10184
10185 * linux-low.c (status_pending_p_callback): Fix comment.
10186 (linux_wait_for_event_1): Move most of the internal breakpoint
10187 handling from here...
10188 (linux_wait_1): ... to here.
10189 (count_events_callback): New.
10190 (select_singlestep_lwp_callback): New.
10191 (select_event_lwp_callback): New.
10192 (cancel_breakpoints_callback): New.
10193 (select_event_lwp): New.
10194 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10195 priority to all LWPs that have had events that should be reported
10196 to the client. Cancel breakpoints when about to reporting the
10197 event to the client, not while stopping lwps. No longer cancel
10198 finished single-steps here.
10199 (cancel_finished_single_step): Delete.
10200 (cancel_finished_single_steps): Delete.
10201
414a389f
PA
102022010-03-24 Pedro Alves <pedro@codesourcery.com>
10203
10204 * mem-break.c (enum bkpt_type): New.
10205 (struct breakpoint): New field `type'.
10206 (set_breakpoint_at): Change return type to struct breakpoint
10207 pointer. Set type to `other_breakpoint' by default.
10208 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10209 in the breakpoint list.
10210 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10211 (reinsert_breakpoint): Rename to ...
10212 (reinsert_raw_breakpoint): ... this.
10213 (reinsert_breakpoints_at): Adjust.
10214 * mem-break.h (struct breakpoint): Declare.
10215 (set_breakpoint_at): Change return type to struct breakpoint
10216 pointer.
10217
2280c721
PA
102182010-03-24 Pedro Alves <pedro@codesourcery.com>
10219
10220 * server.c (handle_query): Assign, not compare.
10221
d50171e4
PA
102222010-03-24 Pedro Alves <pedro@codesourcery.com>
10223
10224 Teach linux gdbserver to step-over-breakpoints.
10225
10226 * linux-low.c (can_hardware_single_step): New.
10227 (supports_breakpoints): New.
10228 (handle_extended_wait): If stopping threads, read the stop pc of
10229 the new cloned LWP.
10230 (get_pc): New.
10231 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10232 low target doesn't support retrieving the PC.
10233 (add_lwp): Set last_resume_kind to resume_continue.
10234 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10235 (linux_attach): Don't clear stop_expected. Set the lwp's
10236 last_resume_kind to resume_stop.
10237 (linux_detach_one_lwp): Don't check for removed breakpoints.
10238 (check_removed_breakpoint): Delete.
10239 (status_pending_p): Rename to ...
10240 (status_pending_p_callback): ... this. Don't check for removed
10241 breakpoints. Don't consider threads that are stopped from GDB's
10242 perspective.
10243 (linux_wait_for_lwp): Always read the stop_pc here.
10244 (cancel_breakpoint): New.
10245 (step_over_bkpt): New global.
10246 (linux_wait_for_event_1): Implement stepping over breakpoints.
10247 (gdb_wants_lwp_stopped): New.
10248 (gdb_wants_all_stopped): New.
10249 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10250 single-step traps here. Store the thread's last reported target
10251 wait status.
10252 (send_sigstop): Don't clear stop_expected. Always set it,
10253 instead.
10254 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10255 (cancel_finished_single_step): New.
10256 (cancel_finished_single_steps): New.
10257 (wait_for_sigstop): Don't cancel finished single-step traps here.
10258 (linux_resume_one_lwp): Don't check for removed breakpoints.
10259 Don't set `step' on non-hardware step archs.
10260 (linux_set_resume_request): Ignore resume_stop requests if already
10261 stopping or stopped. Set the lwp's last_resume_kind.
10262 (resume_status_pending_p): Don't check for removed breakpoints.
10263 (need_step_over_p): New.
10264 (start_step_over): New.
10265 (finish_step_over): New.
10266 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10267 requests. Clear the thread's last reported target waitstatus.
10268 Don't use the `suspended' flag. Don't consider pending breakpoints.
10269 (linux_resume): Start a step-over if necessary.
10270 (proceed_one_lwp): New.
10271 (proceed_all_lwps): New.
10272 (unstop_all_lwps): New.
10273 * linux-low.h (struct lwp_info): Rewrite comment for the
10274 `suspended' flag. Add the `stop_pc' field. Delete the
10275 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10276 Add `'last_resume_kind' and `need_step_over' fields.
10277 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10278 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10279 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10280 (set_raw_breakpoint_at): New.
10281 (set_breakpoint_at): Rewrite to use it.
10282 (reinsert_breakpoint_handler): Delete.
10283 (set_reinsert_breakpoint): New.
10284 (reinsert_breakpoint_by_bp): Delete.
10285 (delete_reinsert_breakpoints): New.
10286 (uninsert_breakpoint): Rewrite.
10287 (uninsert_breakpoints_at): New.
10288 (reinsert_breakpoint): Rewrite.
10289 (reinsert_breakpoints_at): New.
10290 (check_breakpoints): Rewrite.
10291 (breakpoint_here): New.
10292 (breakpoint_inserted_here): New.
10293 (check_mem_read): Adjust.
10294 * mem-break.h (breakpoints_supported, breakpoint_here)
10295 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10296 (reinsert_breakpoint_by_bp): Delete declaration.
10297 (delete_reinsert_breakpoints): Declare.
10298 (reinsert_breakpoint): Delete declaration.
10299 (reinsert_breakpoints_at): Declare.
10300 (uninsert_breakpoint): Delete declaration.
10301 (uninsert_breakpoints_at): Declare.
10302 (check_breakpoints): Adjust prototype.
10303 * server.h: Adjust include order.
10304 (struct thread_info): Declare here. Add a `last_status' field.
10305
30ba68cb
MS
103062010-03-23 Michael Snyder <msnyder@vmware.com>
10307
10308 * server.c (crc32): New function.
10309 (handle_query): Add handling for 'qCRC:' request.
10310
b9a881c2
PA
103112010-03-23 Pedro Alves <pedro@codesourcery.com>
10312
10313 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10314 lwp had been stopped by a watchpoint.
10315
e92d13d5
PA
103162010-03-16 Pedro Alves <pedro@codesourcery.com>
10317
10318 * server.h (internal_error): Declare.
10319 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10320 * utils.c (internal_error): New function.
10321
64daa791
AS
103222010-03-15 Andreas Schwab <schwab@redhat.com>
10323
10324 * configure.srv: Fix typo setting srv_regobj.
10325
f52cd8cd
PA
103262010-03-15 Pedro Alves <pedro@codesourcery.com>
10327
10328 * linux-low.c (fetch_register): Avoid passing a non string literal
10329 format to `error'.
10330 (usr_store_inferior_registers): Ditto.
10331
93ae6fdc
PA
103322010-03-14 Pedro Alves <pedro@codesourcery.com>
10333
10334 * linux-low.c (linux_write_memory): Bail out early if peeking
10335 memory failed.
10336
c3adc08c
PA
103372010-03-14 Pedro Alves <pedro@codesourcery.com>
10338
10339 * linux-low.h (struct lwp_info): New fields
10340 `stopped_by_watchpoint' and `stopped_data_address'.
10341 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10342 here, and cache them in the lwp object.
10343 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10344 directly.
10345 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10346 field.
10347 (linux_stopped_by_watchpoint): Rewrite.
10348 (linux_stopped_data_address): Rewrite.
10349
bce522a2
PA
103502010-03-06 Simo Melenius <simo.melenius@iki.fi>
10351
10352 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10353 switching the current inferior, not before.
10354
90884b2b
L
103552010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10356
10357 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10358 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10359 i386-linux.c and amd64-linux.c.
10360 (reg-i386.o): Removed.
10361 (reg-i386.c): Likewise.
10362 (reg-i386-linux.o): Likewise.
10363 (reg-i386-linux.c): Likewise.
10364 (reg-x86-64.o): Likewise.
10365 (reg-x86-64.c): Likewise.
10366 (reg-x86-64-linux.o): Likewise.
10367 (reg-x86-64-linux.c): Likewise.
10368 (i386.o): New.
10369 (i386.c): Likewise.
10370 (i386-linux.o): Likewise.
10371 (i386-linux.c): Likewise.
10372 (amd64.o): Likewise.
10373 (amd64.c): Likewise.
10374 (amd64-linux.o): Likewise.
10375 (amd64-linux.c): Likewise.
10376
10377 * configure.srv (srv_i386_regobj): New.
10378 (srv_i386_linux_regobj): Likewise.
10379 (srv_amd64_regobj): Likewise.
10380 (srv_amd64_linux_regobj): Likewise.
10381 (srv_i386_32bit_xmlfiles): Likewise.
10382 (srv_i386_64bit_xmlfiles): Likewise.
10383 (srv_i386_xmlfiles): Likewise.
10384 (srv_amd64_xmlfiles): Likewise.
10385 (srv_i386_linux_xmlfiles): Likewise.
10386 (srv_amd64_linux_xmlfiles): Likewise.
10387 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10388 srv_xmlfiles to $srv_i386_xmlfiles.
10389 (i[34567]86-*-mingw32ce*): Likewise.
10390 (i[34567]86-*-mingw*): Likewise.
10391 (i[34567]86-*-nto*): Likewise.
10392 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10393 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10394 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10395 (x86_64-*-linux*): Likewise.
10396
10397 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10398 (init_registers_amd64_linux): New.
10399 (x86_arch_setup): Replace init_registers_x86_64_linux with
10400 init_registers_amd64_linux.
10401
193f13e6
MK
104022010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10403
10404 * configure.ac: Check for libdl. If it is not available link against
10405 static libthread_db.
10406 * configure: Regenerate.
10407
85d721b8
PA
104082010-02-22 Pedro Alves <pedro@codesourcery.com>
10409
10410 PR9605
10411
10412 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10413 handing a read watchpoint.
10414 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10415
6076632b
DE
104162010-02-12 Doug Evans <dje@google.com>
10417
10418 * linux-low.c (linux_supports_tracefork_flag): Document.
10419 (linux_look_up_symbols): Add comment.
10420
3327ccf7
L
104212010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10422
10423 * regcache.c (supply_register): Clear regcache if buf is NULL.
10424
0718675c 104252010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10426 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10427
10428 * inferiors.c (find_inferior): Add function documentation.
10429 (unloaded_dll): Handle the case where the unloaded dll has not
10430 been previously registered in the dll list.
10431
177321bd
DJ
104322010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10433
10434 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10435 (thumb2_breakpoint): New.
10436 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10437
2b009048
DJ
104382010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10439
10440 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10441 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10442 breakpoints.
10443
3be029c7
PA
104442010-01-21 Pedro Alves <pedro@codesourcery.com>
10445
10446 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10447
18f5de3b
JK
104482010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10449
10450 * linux-s390-low.c (s390_collect_ptrace_register)
10451 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10452
3743bb4f
DE
104532010-01-21 Doug Evans <dje@google.com>
10454
14ce3065
DE
10455 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10456 (PTRACE_ARG4_TYPE): New macro.
10457 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10458 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10459 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10460 (usr_store_inferior_registers): Ditto.
10461 (linux_read_memory, linux_write_memory): Ditto.
10462 (linux_test_for_tracefork): Ditto.
10463
3743bb4f
DE
10464 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10465 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10466
8b315be5
PA
104672010-01-21 Pedro Alves <pedro@codesourcery.com>
10468
10469 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10470 target.
10471
85492558
PA
104722010-01-21 Pedro Alves <pedro@codesourcery.com>
10473
10474 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10475 prototype to take a regcache. Adjust.
10476
442ea881
PA
104772010-01-20 Pedro Alves <pedro@codesourcery.com>
10478
10479 * regcache.h (struct thread_info): Forward declare.
10480 (struct regcache): New.
10481 (new_register_cache): Adjust prototype.
10482 (get_thread_regcache): Declare.
10483 (free_register_cache): Adjust prototype.
10484 (registers_to_string, registers_from_string): Ditto.
10485 (supply_register, supply_register_by_name, collect_register)
10486 (collect_register_as_string, collect_register_by_name): Ditto.
10487 * regcache.c (struct inferior_regcache_data): Delete.
10488 (get_regcache): Rename to ...
10489 (get_thread_regcache): ... this. Adjust. Switch inferior before
10490 fetching registers.
10491 (regcache_invalidate_one): Adjust.
10492 (regcache_invalidate): Fix prototype.
10493 (new_register_cache): Return the new register cache.
10494 (free_register_cache): Change prototype.
10495 (realloc_register_cache): Adjust.
10496 (registers_to_string): Change prototype to take a regcache. Adjust.
10497 (registers_from_string): Ditto.
10498 (register_data): Ditto.
10499 (supply_register): Ditto.
10500 (supply_register_by_name): Ditto.
10501 (collect_register): Ditto.
10502 (collect_register_as_string): Ditto.
10503 (collect_register_by_name): Ditto.
10504 * server.c (process_serial_event): Adjust.
10505 * linux-low.h (regset_fill_func, regset_store_func): Change
10506 prototype.
10507 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10508 Change prototype.
10509 * linux-low.c (get_stop_pc): Adjust.
10510 (check_removed_breakpoint): Adjust.
10511 (linux_wait_for_event): Adjust.
10512 (linux_resume_one_lwp): Adjust.
10513 (fetch_register): Add regcache parameter. Adjust.
10514 (usr_store_inferior_registers): Ditto.
10515 (regsets_fetch_inferior_registers): Ditto.
10516 (regsets_store_inferior_registers): Ditto.
10517 (linux_fetch_registers, linux_store_registers): Ditto.
10518 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10519 regcache. Adjust.
43aaf8b6
PA
10520 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10521 Ditto.
442ea881
PA
10522 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10523 prototype to take a regcache.
10524 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10525 * remote-utils.c (convert_ascii_to_int, outreg)
10526 (prepare_resume_reply): Change prototype to take a regcache.
10527 Adjust.
10528 * target.h (struct target_ops) <fetch_registers, store_registers>:
10529 Change prototype to take a regcache.
10530 (fetch_inferior_registers, store_inferior_registers): Change
10531 prototype to take a regcache. Adjust.
10532 * proc-service.c (ps_lgetregs): Adjust.
10533 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10534 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10535 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10536 take a regcache. Adjust.
10537 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10538 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10539 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10540 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10541 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10542 (cris_cannot_fetch_register):
10543 (cris_breakpoint_at): Change prototype to take a regcache.
10544 Adjust.
10545 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10546 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10547 to take a regcache. Adjust.
10548 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10549 Adjust.
10550 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10551 take a regcache. Adjust.
10552 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10553 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10554 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10555 * linux-mips-low.c (mips_get_pc):
10556 (mips_set_pc): Change prototype to take a regcache. Adjust.
10557 (mips_reinsert_addr): Adjust.
10558 (mips_collect_register): Change prototype to take a regcache.
10559 Adjust.
10560 (mips_supply_register):
10561 (mips_collect_register_32bit, mips_supply_register_32bit)
10562 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10563 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10564 * linux-ppc-low.c (ppc_supply_ptrace_register)
10565 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10566 (parse_spufs_run): Adjust.
10567 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10568 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10569 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10570 take a regcache. Adjust.
10571 * linux-s390-low.c (s390_collect_ptrace_register)
10572 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10573 (s390_set_pc): Change prototype to take a regcache. Adjust.
10574 (s390_arch_setup): Adjust.
10575 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10576 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10577 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10578 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10579 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10580 regcache. Adjust.
10581 (sparc_breakpoint_at): Adjust.
10582 * linux-xtensa-low.c (xtensa_fill_gregset):
10583 (xtensa_store_gregset):
10584 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10585 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10586 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10587 prototype to take a regcache. Adjust.
10588 * win32-arm-low.c (arm_fetch_inferior_register)
10589 (arm_store_inferior_register): Change prototype to take a
10590 regcache. Adjust.
10591 * win32-i386-low.c (i386_fetch_inferior_register)
10592 (i386_store_inferior_register): Change prototype to take a
10593 regcache. Adjust.
10594 * win32-low.c (child_fetch_inferior_registers)
10595 (child_store_inferior_registers): Change prototype to take a
10596 regcache. Adjust.
10597 (win32_wait): Adjust.
10598 (win32_fetch_inferior_registers): Change prototype to take a
10599 regcache. Adjust.
10600 (win32_store_inferior_registers): Adjust.
10601 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10602 store_inferior_register>: Change prototype to take a regcache.
10603
60c3d7b0
DE
106042010-01-20 Doug Evans <dje@google.com>
10605
10606 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10607 #ifdef.
10608 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10609 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10610
dc146f7c
VP
106112010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10612
10613 * linux-low.c (linux_core_of_thread): New.
10614 (compare_ints, show_process, list_threads): New.
10615 (linux_qxfer_osdata): Report threads and cores.
10616 (linux_target_op): Register linux_core_of_thread.
10617 * remote-utils.c (prepare_resume_reply): Report the core.
10618 (buffer_xml_printf): Support %d specifier.
10619 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10620 New.
10621 (handle_query): Handle qXfer:threads. Announce availability
10622 thereof.
10623 * target.h (struct target_ops): New field core_of_thread.
10624
7803799a
UW
106252010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10626
10627 * Makefile.in (clean): Remove new generated files.
10628 (reg-s390.o, reg-s390.c): Remove rules.
10629 (reg-s390x.o, reg-s390x.c): Likewise.
10630 (s390-linux32.o, s390-linux32.c): Add rules.
10631 (s390-linux64.o, s390-linux64.c): Likewise.
10632 (s390x-linux64.o, s390x-linux64.c): Likewise.
10633 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10634 * linux-s390-low.c: Include <elf.h>.
10635 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10636 (init_registers_s390): Remove prototype.
10637 (init_registers_s390x): Likewise.
10638 (init_registers_s390_linux32): Add prototype.
10639 (init_registers_s390_linux64): Likewise.
10640 (init_registers_s390x_linux64): Likewise.
10641 (s390_num_regs_3264): New define.
10642 (s390_regmap_3264): New global variable.
10643 (s390_cannot_fetch_register): Remove obsolete check.
10644 (s390_cannot_store_register): Likewise.
10645 (s390_collect_ptrace_register): Handle upper/lower register halves.
10646 (s390_supply_ptrace_register): Likewise.
10647 (s390_fill_gregset): Update to register number changes.
10648 (s390_get_hwcap): New routine.
10649 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10650 Install appropriate regmap and register set.
10651
6e7ffa39
JB
106522010-01-01 Joel Brobecker <brobecker@adacore.com>
10653
10654 * server.c (gdbserver_version): Update copyright year to 2010.
10655 * gdbreplay.c (gdbreplay_version): Likewise.
10656
957f3f49
DE
106572009-12-28 Doug Evans <dje@google.com>
10658
10659 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10660 elf/external.h. Include <elf.h> instead but only if necessary.
10661
ca5c370d
PA
106622009-12-28 Pedro Alves <pedro@codesourcery.com>
10663
10664 * linux-low.c (linux_remove_process): Remove `detaching'
10665 parameter. Don't release/detach from thread_db here.
10666 (linux_kill): Release/detach from thread_db here, ...
10667 (linux_detach): ... and here, before actually detaching.
10668 (linux_wait_1): ... and here, when a process exits.
10669 * thread-db.c (any_thread_of): New.
10670 (thread_db_free): Switch the current inferior to a thread of the
10671 passed in process.
10672
4ee62156
DE
106732009-12-21 Doug Evans <dje@google.com>
10674
d90e6a88
DE
10675 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10676
c5f62d5f
DE
10677 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10678 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10679 warning ifndef __NR_tkill. Move setting of errno there too.
10680 Delete unnecessary resetting of errno after syscall.
10681 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10682
10e86dd7
DE
10683 * configure.ac: Check for dladdr.
10684 * config.in: Regenerate.
10685 * configure: Regenerate.
10686 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10687 (try_thread_db_load): Update.
10688
4ee62156
DE
10689 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10690
00f515da
DE
106912009-12-18 Doug Evans <dje@google.com>
10692
e9464885
DE
10693 * event-loop.c: Include unistd.h if it exists.
10694
07d4f67e
DE
10695 * linux-low.c (my_waitpid): Move definition away from being in
10696 between linux_tracefork_child/linux_test_for_tracefork.
10697
00f515da
DE
10698 * gdb_proc_service.h (psaddr_t): Fix type.
10699 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10700 signature to match glibc.
10701
1de1badb
DE
107022009-12-16 Doug Evans <dje@google.com>
10703
10704 * linux-low.c (linux_read_memory): Fix argument to read.
10705
aeeb81d1
PA
107062009-11-26 Pedro Alves <pedro@codesourcery.com>
10707
10708 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10709 events, don't leave current_inferior pointing at null.
10710
10357975
PA
107112009-11-26 Pedro Alves <pedro@codesourcery.com>
10712
10713 * win32-low.c (LOG): Delete.
10714 (OUTMSG): Output to stderr.
10715 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10716 on compile time LOG macro.
10717 (win32_wait): Fix debug output.
10718
cf6e3471
PA
107192009-11-26 Pedro Alves <pedro@codesourcery.com>
10720
10721 * win32-low.c (win32_add_one_solib): If the dll name is
10722 "ntdll.dll", prepend the system directory to the dll path.
10723
0c85e18e
MK
107242009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10727
9ac544ce 107282009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10729 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10730
10731 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10732 * configure.ac: Check for __mcoldfire__ and set
10733 gdb_cv_m68k_is_coldfire.
10734 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10735 reg-cf.o and reg-m68k.o.
10736 * configure: Regenerated.
10737
fd7dd3e6
PA
107382009-11-16 Pedro Alves <pedro@codesourcery.com>
10739
10740 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10741 Pass it to thread_db_free.
10742 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10743 proper `detaching' argument to linux_remove_process.
10744 * linux-low.h (thread_db_free): Add `detaching' parameter.
10745 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10746 to thread_db_free.
10747 (thread_db_free): Add `detaching' parameter. Only
10748 call td_ta_clear_event if detaching from process.
10749
75aa492e
MK
107502009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10751
10752 * thread-db.c (thread_db_free): Fix typo.
10753
21e1bee4
PP
107542009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10755
10756 PR gdb/10838
10757 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10758
8838b45e
NS
107592009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10760
10761 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10762 with an i686 compiler.
10763 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10764 needed.
10765 * configure: Rebuilt.
10766
8a35fb51
SL
107672009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10768
10769 PR gdb/10783
10770
10771 * server.c (handle_search_memory_1): Correct read_addr initialization
10772 in loop for searching subsequent chunks.
10773
96f15937
PP
107742009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10775
10776 * configure.ac: New --with-libthread-db option.
10777 * thread-db.c: Allow direct dependence on libthread_db.
10778 (thread_db_free): Adjust.
10779 * config.in: Regenerate.
10780 * configure: Likewise.
889bf7c5 10781
5f7d1694
PP
107822009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10783
10784 PR gdb/10757
10785 * thread-db.c (attach_thread): New function.
10786 (maybe_attach_thread): Return success/failure.
10787 (find_new_threads_callback): Adjust.
889bf7c5
PA
10788 (thread_db_find_new_threads): Loop until no new threads.
10789
88e3b899
PA
107902009-10-13 Pedro Alves <pedro@codesourcery.com>
10791
10792 * proc-service.c (ps_lgetregs): Formatting.
10793
cdbfd419
PP
107942009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10795
10796 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10797 * configure.ac: Adjust.
10798 * linux-low.h (struct process_info_private): Move members to struct
10799 thread_db.
10800 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10801 * linux-low.c (linux_remove_process): Adjust.
10802 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10803 * server.c (handle_query): Move code ...
10804 (handle_monitor_command): ... here. New function.
10805 * target.h (struct target_ops): New member.
10806 * thread-db.c (struct thread_db): New.
10807 (libthread_db_search_path): New variable.
10808 (thread_db_create_event, thread_db_enable_reporting)
10809 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10810 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10811 (try_thread_db_load_1, dladdr_to_soname): New functions.
10812 (try_thread_db_load, thread_db_load_search): New functions.
10813 (thread_db_init): Search for libthread_db.
10814 (thread_db_free): New function.
10815 (thread_db_handle_monitor_command): Likewise.
10816 * config.in: Regenerate.
10817 * configure: Regenerate.
889bf7c5 10818
4168d2d6
UW
108192009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10820
10821 * spu-low.c (spu_kill): Wait for inferior to terminate.
10822 Call clear_inferiors.
10823 (spu_detach): Call clear_inferiors.
10824
81ecdfbb
RW
108252009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10826
10827 * aclocal.m4: Regenerate.
10828 * config.in: Likewise.
10829 * configure: Likewise.
10830
0b9ff2c0
UW
108312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10832
10833 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10834 (parse_spufs_run): New function.
10835 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10836 (ppc_breakpoint_at): Handle SPU breakpoints.
10837
efcbbd14
UW
108382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10839
10840 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10841 (SPUFS_MAGIC): Define.
10842 (spu_enumerate_spu_ids): New function.
10843 (linux_qxfer_spu): New function.
10844 (linux_target_ops): Install linux_qxfer_spu.
10845
f4d9bade
UW
108462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10847
10848 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10849 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10850 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10851 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10852 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10853 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10854 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10855 (init_registers_powerpc_cell32l): Add prototype.
10856 (init_registers_powerpc_cell64l): Likewise.
10857 (ppc_arch_setup): Detect Cell/B.E. architecture.
10858
96e946ca
RW
108592009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10860
10861 * Makefile.in (datarootdir): New variable.
10862
58d6951d
DJ
108632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10864
10865 * linux-low.c (linux_write_memory): Update debugging output.
10866 * Makefile.in (clean): Add new descriptions.
10867 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10868 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10869 * configure.srv: Add new files for arm*-*-linux*.
10870 * linux-arm-low.c: Add new declarations.
10871 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10872 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10873 (HWCAP_VFPv3D16): New.
10874 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10875 instead of __IWMMXT__.
10876 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10877 (arm_arch_setup): New.
10878 (target_regsets): Remove #ifdef. Add VFP regset.
10879 (the_low_target): Use arm_arch_setup.
10880
12b42a12
DJ
108812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10884 the main thread again.
10885
ac8c974e
AR
108862009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10887
10888 Adding Neutrino gdbserver.
10889 * configure: Regenerated.
10890 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10891 * configure.srv (i[34567]86-*-nto*): New target.
10892 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10893 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10894 (nto_comctrl) [__QNX__]: New function.
10895 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10896
4424e0c3 108972009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10898
10899 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10900 srv_tgtobj.
10901
912cf4ba
PA
109022009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10903 Pedro Alves <pedro@codesourcery.com>
10904
10905 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10906 don't support CONTEXT_EXTENDED_REGISTERS.
10907 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10908 (the_low_target): Install them.
10909 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10910 failing with ERROR_PIPE_NOT_CONNECTED.
10911
aa5ca48f
DE
109122009-06-30 Doug Evans <dje@google.com>
10913 Pierre Muller <muller@ics.u-strasbg.fr>
10914
10915 Add h/w watchpoint support to x86-linux, win32-i386.
10916 * Makefile.in (SFILES): Add i386-low.c
10917 (i386_low_h): Define.
10918 (i386-low.o): Add dependencies.
10919 (linux-x86-low.o): Add i386-low.h dependency.
10920 (win32-i386-low.o): Ditto.
10921 * i386-low.c: New file.
10922 * i386-low.h: New file.
10923 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10924 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10925 * linux-low.c (linux_add_process): Initialize arch_private.
10926 (linux_remove_process): Free arch_private.
10927 (add_lwp): Initialize arch_private.
10928 (delete_lwp): Free arch_private.
10929 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10930 provided.
10931 * linux-low.h (process_info_private): New member arch_private.
10932 (lwp_info): New member arch_private.
10933 (linux_target_ops): New members new_process, new_thread,
10934 prepare_to_resume.
10935 (ptid_of): New macro.
10936 * linux-x86-low.c: Include stddef.h, i386-low.h.
10937 (arch_process_info): New struct.
10938 (arch_lwp_info): New struct.
10939 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10940 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10941 (i386_dr_low_get_status): New function.
10942 (x86_insert_point, x86_remove_point): New functions.
10943 (x86_stopped_by_watchpoint): New function.
10944 (x86_stopped_data_address): New function.
10945 (x86_linux_new_process, x86_linux_new_thread): New functions.
10946 (x86_linux_prepare_to_resume): New function.
10947 (the_low_target): Add entries for insert_point, remove_point,
10948 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10949 prepare_to_resume.
10950 * server.c (debug_hw_points): New global.
10951 (monitor_show_help): Document set debug-hw-points.
10952 (handle_query): Process "set debug-hw-points".
10953 * server.h (debug_hw_points): Declare.
10954 (paddress): Declare.
10955 * utils.c (NUMCELLS, CELLSIZE): New macros.
10956 (get_sell, xsnprintf, paddress): New functions.
10957 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10958 remove_point, stopped_by_watchpoint, stopped_data_address.
10959 * win32-i386-low.c: Include i386-low.h.
10960 (debug_reg_state): Replaces dr.
10961 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10962 (i386_dr_low_get_status): New function.
10963 (i386_insert_point, i386_remove_point): New functions.
10964 (i386_stopped_by_watchpoint): New function.
10965 (i386_stopped_data_address): New function.
10966 (i386_initial_stuff): Update.
10967 (get_thread_context,set_thread_context,i386_thread_added): Update.
10968 (the_low_target): Add entries for insert_point,
10969 remove_point, stopped_by_watchpoint, stopped_data_address.
10970 * win32-low.c (win32_insert_watchpoint): New function.
10971 (win32_remove_watchpoint): New function.
10972 (win32_stopped_by_watchpoint): New function.
10973 (win32_stopped_data_address): New function.
10974 (win32_target_ops): Add entries for insert_watchpoint,
10975 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10976 * win32-low.h (win32_target_ops): New members insert_point,
10977 remove_point, stopped_by_watchpoint, stopped_data_address.
10978
d993e290
PA
109792009-06-25 Pedro Alves <pedro@codesourcery.com>
10980
10981 * server.c (process_serial_event): Re-return unsupported, not
10982 error, if the type isn't recognized. Re-allow supporting only
10983 insert or remove packets. Also call require_running for
10984 breakpoints. Add missing break statement to default case. Tidy.
10985 * target.h (struct target_ops): Rename insert_watchpoint to
10986 insert_point, and remove_watchpoint to remove_point.
10987
10988 * linux-low.h (struct linux_target_ops): Likewise.
10989 * linux-low.c (linux_insert_watchpoint): Rename to ...
10990 (linux_insert_point): ... this. Adjust.
10991 (linux_remove_watchpoint): Rename to ...
10992 (linux_remove_point): ... this. Adjust.
10993 (linux_target_ops): Adjust.
10994 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10995 (cris_insert_point): ... this.
10996 (cris_remove_watchpoint): Rename to ...
10997 (cris_remove_point): ... this.
10998 (the_low_target): Adjust.
10999
0f54c268
PM
110002009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11001
11002 * server.c (handle_v_kill): Pass signal_pid to
11003 kill_inferior if multi_process is zero.
11004
c6314022
AR
110052009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11006
11007 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11008 * target.h (target_ops): Comment for *_watchpoint to make it clear
11009 the functions can get types '0' and '1'.
11010
4463ce24
AR
110112009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11012
11013 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11014 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11015 * regcache.c (get_regcache): Likewise.
11016 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11017 * win32-low.c (child_fetch_inferior_registers): Remove check for
11018 regno 0.
11019
cf8fd78b
PA
110202009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11021 Pedro Alves <pedro@codesourcery.com>
11022
11023 * target.h (struct target_ops) <supports_multi_process>: New
11024 callback.
11025 (target_supports_multi_process): New.
11026 * server.c (handle_query): Even if GDB reports support, only
11027 enable multi-process if the target also supports it. Report
11028 multi-process support only if the target backend supports it.
11029 * linux-low.c (linux_supports_multi_process): New function.
11030 (linux_target_ops): Install it as target_supports_multi_process
11031 callback.
11032
47c0c975
DE
110332009-05-24 Doug Evans <dje@google.com>
11034
e09875d4
DE
11035 Global renaming of find_thread_pid to find_thread_ptid.
11036 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11037 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11038 All callers updated.
11039
e27d73f6
DE
11040 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11041 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11042 directly.
11043
47c0c975
DE
11044 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11045 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11046 (linux_resume_one_lwp): Ditto.
11047
2acc282a
DE
110482009-05-23 Doug Evans <dje@google.com>
11049
11050 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11051 from struct inferior_list_entry * to struct lwp_info *.
11052 All callers updated.
11053
9f1036c1
DE
110542009-05-13 Doug Evans <dje@google.com>
11055
11056 * linux-x86-low.c: Don't include assert.h.
11057 (x86_siginfo_fixup): Use fatal, not assert.
11058 (x86_arch_setup): Fix comment.
11059
d0722149
DE
110602009-05-12 Doug Evans <dje@google.com>
11061
11062 Biarch support for i386/amd64 gdbserver.
11063 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11064 Add linux-x86-low.c.
11065 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11066 (linux-x86-low.o): Add.
11067 * linux-x86-64-low.c: Delete.
11068 * linux-i386-low.c: Delete.
11069 * linux-x86-low.c: New file.
11070 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11071 linux-x86-low.o.
11072 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11073 linux-x86-low.o.
11074 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11075 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11076 (linux_child_pid_to_exec_file): New function.
11077 (elf_64_header_p, elf_64_file_p): New functions.
11078 (siginfo_fixup): New function.
11079 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11080 give target a chance to convert layout.
11081 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11082 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11083
fdeb2a12
DE
110842009-05-07 Doug Evans <dje@google.com>
11085
11086 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11087 (regsets_store_inferior_registers): Ditto.
11088
a6dbe5df
PA
110892009-05-06 Pedro Alves <pedro@codesourcery.com>
11090
11091 PR server/10048
11092
11093 * linux-low.c (must_set_ptrace_flags): Delete.
11094 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11095 of the global.
11096 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11097 `lwp->must_set_ptrace_flags' instead.
ba42693b 11098 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11099 (linux_wait_1): ... not here.
11100
5091eb23
DE
111012009-04-30 Doug Evans <dje@google.com>
11102
9f767825
DE
11103 * inferiors.c (started_inferior_callback): New function.
11104 (attached_inferior_callback): New function.
11105 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11106 * server.c (print_started_pid, print_attached_pid): New functions.
11107 (detach_or_kill_for_exit): New function.
11108 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11109 * server.h (have_started_inferiors_p): Declare.
11110 (have_attached_inferiors_p): Declare.
11111
5091eb23
DE
11112 * inferiors.c (remove_process): Fix memory leak, free process.
11113 * linux-low.c (linux_remove_process): New function.
11114 (linux_kill): Call it instead of remove_process.
11115 (linux_detach, linux_wait_1): Ditto.
11116
155c8968
PA
111172009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11118
11119 * configure.srv: Add x86 Windows CE target.
11120
7fe519cb
UW
111212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11122
11123 * inferiors.c (get_thread_process): Make global.
11124 * server.h (get_thread_process): Add prototype.
11125 * thread-db.c (find_one_thread): Use get_thread_process
11126 instead of current_process.
11127 (thread_db_get_tls_address): Do not crash if called when
11128 thread layer is not yet initialized.
11129
5472f405
UW
111302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11131
11132 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11133 * spu-low.c (current_tid): Rename to ...
11134 (current_ptid): ... this.
11135 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11136 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11137 ptid_get_lwp (current_ptid) instead of current_tid.
11138 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11139 instead of current_tid. Use find_process_pid to verify pid
11140 argument is valid. Pass proper argument to remove_process.
11141 (spu_thread_alive): Compare current_ptid instead of current_tid.
11142 (spu_resume): Likewise.
11143
55ac2b99
PA
111442009-04-02 Pedro Alves <pedro@codesourcery.com>
11145
11146 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11147 variable.
11148
95954743
PA
111492009-04-01 Pedro Alves <pedro@codesourcery.com>
11150
11151 Implement the multiprocess extensions, and add linux multiprocess
11152 support.
11153
11154 * server.h (ULONGEST): Declare.
11155 (struct ptid, ptid_t): New.
11156 (minus_one_ptid, null_ptid): Declare.
11157 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11158 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11159 (struct inferior_list_entry): Change `id' type from unsigned from
11160 to ptid_t.
11161 (struct sym_cache, struct breakpoint, struct
11162 process_info_private): Forward declare.
11163 (struct process_info): Declare.
11164 (current_process): Declare.
11165 (all_processes): Declare.
11166 (initialize_inferiors): Declare.
11167 (add_thread): Adjust to use ptid_t.
11168 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11169 (add_process, remove_process, find_thread_pid): Declare.
11170 (find_inferior_id): Adjust to use ptid_t.
11171 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11172 (multi_process): Declare.
11173 (push_event): Adjust to use ptid_t.
11174 (read_ptid, write_ptid): Declare.
11175 (prepare_resume_reply): Adjust to use ptid_t.
11176 (clear_symbol_cache): Declare.
11177 * inferiors.c (all_processes): New.
11178 (null_ptid, minus_one_ptid): New.
11179 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11180 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11181 (add_thread): Change unsigned long to ptid. Remove gdb_id
11182 parameter. Adjust.
11183 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11184 (gdb_id_to_thread): Rename to ...
11185 (find_thread_pid): ... this. Change unsigned long to ptid.
11186 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11187 (loaded_dll, pull_pid_from_list): Adjust.
11188 (add_process, remove_process, find_process_pid)
11189 (get_thread_process, current_process, initialize_inferiors): New.
11190 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11191 (struct target_waitstatus) <related_pid>: Ditto.
11192 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11193 return type to int.
11194 (struct target_ops) <join>: Add `pid' argument.
11195 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11196 (struct target_ops) <wait>: Add `ptid' field. Change return type
11197 to ptid.
11198 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11199 (mywait): Add `ptid' argument. Change return type to ptid_t.
11200 (target_pid_to_str): Declare.
11201 * target.c (set_desired_inferior): Adjust to use ptids.
11202 (mywait): Add new `ptid' argument. Adjust.
11203 (target_pid_to_str): New.
11204 * mem-break.h (free_all_breakpoints): Declare.
11205 * mem-break.c (breakpoints): Delelete.
11206 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11207 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11208 to use per-process breakpoint list.
11209 (free_all_breakpoints): New.
11210 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11211 (symbol_cache, all_symbols_looked_up): Delete.
11212 (hexchars): New.
11213 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11214 read_ptid): New.
11215 (prepare_resume_reply): Change ptid argument's type from unsigned
11216 long to ptid_t. Adjust. Implement W;process and X;process.
11217 (free_sym_cache, clear_symbol_cache): New.
11218 (look_up_one_symbol): Adjust to per-process symbol cache. *
11219 * server.c (cont_thread, general_thread, step_thread): Change type
11220 to ptid_t.
11221 (attached): Delete.
11222 (multi_process): New.
11223 (last_ptid): Change type to ptid_t.
11224 (struct vstop_notif) <ptid>: Change type to ptid_t.
11225 (queue_stop_reply, push_event): Change `ptid' argument's type to
11226 ptid_t.
11227 (discard_queued_stop_replies): Add `pid' argument.
11228 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11229 changes. Don't reference the `attached' global.
11230 (attach_inferior): Adjust to mywait interface changes.
11231 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11232 features. Handle and report "multiprocess+". Handle
11233 "qAttached:PID".
11234 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11235 changes.
11236 (handle_v_kill): New.
11237 (handle_v_stopped): Adjust to use target_pid_to_str.
11238 (handle_v_requests): Allow multiple attaches and runs when
11239 multiprocess extensions are in effect. Handle "vKill".
11240 (myresume): Adjust to use ptids.
11241 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11242 (handle_status): Adjust to discard_queued_stop_replies interface
11243 change.
11244 (first_thread_of, kill_inferior_callback)
11245 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11246 (main): Call initialize_inferiors. Adjust to use ptids, killing
11247 and detaching from all inferiors. Handle multiprocess packet
11248 variants.
11249 * linux-low.h: Include gdb_proc_service.h.
11250 (struct process_info_private): New.
11251 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11252 <lwpid_of>: Use ptid_get_lwp.
11253 (get_lwp_thread): Adjust.
11254 (struct lwp_info): Add `dead' member.
11255 (find_lwp_pid): Declare.
11256 * linux-low.c (thread_db_active): Delete.
11257 (new_inferior): Adjust comment.
11258 (inferior_pid): Delete.
11259 (linux_add_process): New.
11260 (handle_extended_wait): Adjust.
11261 (add_lwp): Change unsigned long to ptid.
11262 (linux_create_inferior): Add process to processes table. Adjust
11263 to use ptids. Don't set new_inferior here.
11264 (linux_attach_lwp): Rename to ...
11265 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11266 it. Adjust to use ptids.
11267 (linux_attach_lwp): New.
11268 (linux_attach): Add process to processes table. Don't set
11269 new_inferior here.
11270 (struct counter): New.
11271 (second_thread_of_pid_p, last_thread_of_process_p): New.
11272 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11273 multiple processes.
11274 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11275 processes. Remove process from process table.
11276 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11277 to multiple processes.
11278 (any_thread_of): New.
11279 (linux_detach): Add `pid' argument, and handle it. Remove process
11280 from processes table.
11281 (linux_join): Add `pid' argument. Handle it.
11282 (linux_thread_alive): Change unsighed long argument to ptid_t.
11283 Consider dead lwps as not being alive.
11284 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11285 threads we're not interested in.
11286 (same_lwp, find_lwp_pid): New.
11287 (linux_wait_for_lwp): Change `pid' argument's type from int to
11288 ptid_t. Adjust.
11289 (linux_wait_for_event): Rename to ...
11290 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11291 from int to ptid_t. Adjust.
11292 (linux_wait_for_event): New.
11293 (linux_wait_1): Add `ptid' argument. Change return type to
11294 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11295 that exit from the process table.
11296 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11297 Adjust.
11298 (mark_lwp_dead): New.
11299 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11300 stopping all threads, mark its main lwp as dead.
11301 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11302 ptids.
11303 (fetch_register, usr_store_inferior_registers)
11304 (regsets_fetch_inferior_registers)
11305 (regsets_store_inferior_registers, linux_read_memory)
11306 (linux_write_memory): Inline `inferior_pid'.
11307 (linux_look_up_symbols): Adjust to use per-process
11308 `thread_db_active'.
11309 (linux_request_interrupt): Adjust to use ptids.
11310 (linux_read_auxv): Inline `inferior_pid'.
11311 (initialize_low): Don't reference thread_db_active.
11312 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11313 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11314 (ps_getpid): Return the pid of the current inferior.
11315 * thread-db.c (proc_handle, thread_agent): Delete.
11316 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11317 per-process data.
11318 (find_one_thread): Change argument type to ptid_t. Adjust to
11319 per-process data.
11320 (maybe_attach_thread): Adjust to per-process data and ptids.
11321 (thread_db_find_new_threads): Ditto.
11322 (thread_db_init): Ditto.
11323 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11324 processes table. Adjust to use ptids.
11325 (spu_kill, spu_detach): Adjust interface. Remove process from
11326 processes table.
11327 (spu_join, spu_thread_alive): Adjust interface.
11328 (spu_wait): Adjust interface. Remove process from processes
11329 table. Adjust to use ptids.
11330 * win32-low.c (current_inferior_tid): Delete.
11331 (current_inferior_ptid): New.
11332 (debug_event_ptid): New.
11333 (thread_rec): Take a ptid. Adjust.
11334 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11335 (child_delete_thread): Ditto.
11336 (do_initial_child_stuff): Add `attached' argument. Add process to
11337 processes table.
11338 (child_fetch_inferior_registers, child_store_inferior_registers):
11339 Adjust.
11340 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11341 (win32_attach): Pass 1 to do_initial_child_stuff.
11342 (win32_kill): Adjust interface. Remove process from processes
11343 table.
11344 (win32_detach): Ditto.
11345 (win32_join): Adjust interface.
11346 (win32_thread_alive): Take a ptid.
11347 (win32_resume): Adjust to use ptids.
11348 (get_child_debug_event): Ditto.
11349 (win32_wait): Adjust interface. Remove exiting process from
11350 processes table.
11351
bd99dc85
PA
113522009-04-01 Pedro Alves <pedro@codesourcery.com>
11353
11354 Non-stop mode support.
11355
11356 * server.h (non_stop): Declare.
11357 (gdb_client_data, handler_func): Declare.
11358 (delete_file_handler, add_file_handler, start_event_loop):
11359 Declare.
11360 (handle_serial_event, handle_target_event, push_event)
11361 (putpkt_notif): Declare.
11362 * target.h (enum resume_kind): New.
11363 (struct thread_resume): Replace `step' field by `kind' field.
11364 (TARGET_WNOHANG): Define.
11365 (struct target_ops) <wait>: Add `options' argument.
11366 <supports_non_stop, async, start_non_stop>: New fields.
11367 (target_supports_non_stop, target_async): New.
11368 (start_non_stop): Declare.
11369 (mywait): Add `options' argument.
11370 * target.c (mywait): Add `options' argument. Print child exit
11371 notifications here.
11372 (start_non_stop): New.
11373 * server.c (non_stop, own_buf, mem_buf): New globals.
11374 (struct vstop_notif): New.
11375 (notif_queue): New global.
11376 (queue_stop_reply, push_event, discard_queued_stop_replies)
11377 (send_next_stop_reply): New.
11378 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11379 interface changes.
11380 (attach_inferior): In non-stop mode, don't wait for the target
11381 here.
11382 (handle_general_set): Handle QNonStop.
11383 (handle_query): When handling qC, return the current general
11384 thread, instead of the first thread of the list.
11385 (handle_query): If the backend supports non-stop mode, include
11386 QNonStop+ in the qSupported query response.
11387 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11388 and non-stop mode.
11389 (handle_v_attach, handle_v_run): Handle non-stop mode.
11390 (handle_v_stopped): New.
11391 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11392 (myresume): Adjust to use resume_kind. Handle non-stop.
11393 (queue_stop_reply_callback): New.
11394 (handle_status): Handle non-stop mode.
11395 (main): Clear non_stop flag on reconnection. Use the event-loop.
11396 Refactor serial protocol handling from here ...
11397 (process_serial_event): ... to this new function. When GDB
11398 selects any thread, select one here. In non-stop mode, wait until
11399 GDB acks all pending events before exiting.
11400 (handle_serial_event, handle_target_event): New.
11401 * remote-utils.c (remote_open): Install remote_desc in the event
11402 loop.
11403 (remote_close): Remove remote_desc from the event loop.
11404 (putpkt_binary): Rename to...
11405 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11406 (putpkt_binary): New as wrapper around putpkt_binary_1.
11407 (putpkt_notif): New.
11408 (prepare_resume_reply): In non-stop mode, don't change the
11409 general_thread.
11410 * event-loop.c: New.
11411 * Makefile.in (OBJ): Add event-loop.o.
11412 (event-loop.o): New rule.
11413
11414 * linux-low.h (pid_of): Moved here.
11415 (lwpid_of): New.
11416 (get_lwp_thread): Use lwpid_of.
11417 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11418 * linux-low.c (pid_of): Delete.
11419 (inferior_pid): Use lwpid_of.
11420 (linux_event_pipe): New.
11421 (target_is_async_p): New.
11422 (delete_lwp): New.
11423 (handle_extended_wait): Use lwpid_of.
11424 (add_lwp): Don't set lwpid field.
11425 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11426 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11427 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11428 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11429 first. Adjust to linux_wait_for_event interface changes. Use
11430 lwpid_of.
11431 (linux_detach): Don't delete the main lwp here.
11432 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11433 (status_pending_p): Don't consider explicitly suspended lwps.
11434 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11435 pointer. Add OPTIONS argument. Change return type to int. Use
11436 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11437 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11438 pointer. Add status pointer argument. Return a pid instead of a
11439 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11440 changes. In non-stop mode, don't switch to a random thread.
11441 (linux_wait): Rename to...
11442 (linux_wait_1): ... this. Add target_options argument, and handle
11443 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11444 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11445 clean exit and signal exit code. Don't stop all threads in
11446 non-stop mode. In all-stop mode, only stop all threads when
11447 reporting a stop to GDB. Handle explicit thread stop requests.
11448 (async_file_flush, async_file_mark): New.
11449 (linux_wait): New.
11450 (send_sigstop): Use lwpid_of.
11451 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11452 interface changes. In non-stop mode, don't switch to a random
11453 thread.
11454 (linux_resume_one_lwp): Use lwpid_of.
11455 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11456 (linux_resume_one_thread): ... this. Handle resume_stop. In
11457 non-stop mode, don't look for pending flag in all threads.
11458 (resume_status_pending_p): Don't consider explicitly suspended
11459 threads.
11460 (my_waitpid): Reimplement. Emulate __WALL.
11461 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11462 Use lwpid_of.
11463 (sigchld_handler, linux_supports_non_stop, linux_async)
11464 (linux_start_non_stop): New.
11465 (linux_target_ops): Register linux_supports_non_stop, linux_async
11466 and linux_start_non_stop.
11467 (initialize_low): Install SIGCHLD handler.
11468 * thread-db.c (thread_db_create_event, find_one_thread)
11469 (thread_db_get_tls_address): Use lwpid_of.
11470 * win32-low.c (win32_detach): Adjust to use resume_kind.
11471 (win32_wait): Add `options' argument.
11472 * spu-low.c (spu_resume): Adjust to use resume_kind.
11473 (spu_wait): Add `options' argument.
11474
5b1c542e
PA
114752009-04-01 Pedro Alves <pedro@codesourcery.com>
11476
11477 Decouple target code from remote protocol.
11478
11479 * target.h (enum target_waitkind): New.
11480 (struct target_waitstatus): New.
11481 (struct target_ops) <wait>: Return an unsigned long. Take a
11482 target_waitstatus pointer instead of a char pointer.
11483 (mywait): Likewise.
11484 * target.c (mywait): Change prototype to return an unsigned long.
11485 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11486 * server.h (thread_from_wait, old_thread_from_wait): Delete
11487 declarations.
11488 (prepare_resume_reply): Change prototype to take a
11489 target_waitstatus.
11490 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11491 (last_status, last_ptid): New.
11492 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11493 pid instead of a signal.
11494 (attach_inferior): Remove "status" and "signal" parameters.
11495 Adjust.
11496 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11497 not as an address.
11498 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11499 (handle_v_requests, myresume): Remove "status" and "signal"
11500 parameters. Adjust.
11501 (handle_status): New.
11502 (main): Delete local `status'. Adjust.
11503 * remote-utils.c: Include target.h.
11504 (prepare_resume_reply): Change prototype to take a
11505 target_waitstatus. Adjust.
11506
11507 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11508 interface.
11509 * spu-low.c (spu_wait): Adjust.
11510 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11511 Delete.
11512 (win32_wait): Adjust.
11513
2bd7c093
PA
115142009-04-01 Pedro Alves <pedro@codesourcery.com>
11515
11516 * target.h (struct thread_resume): Delete leave_stopped member.
11517 (struct target_ops): Add a `n' argument to the `resume' callback.
11518 * server.c (start_inferior): Adjust.
11519 (handle_v_cont, myresume): Adjust.
11520 * linux-low.c (check_removed_breakpoint): Adjust to resume
11521 interface change, and to removed leave_stopped field.
11522 (resume_ptr): Delete.
11523 (struct thread_resume_array): New.
11524 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11525 resume interface change.
11526 (linux_continue_one_thread, linux_queue_one_thread)
11527 (resume_status_pending_p): Check if the resume field is NULL
11528 instead of checking the leave_stopped member.
11529 (linux_resume): Adjust to the target resume interface change.
11530 * spu-low.c (spu_resume): Adjust to the target resume interface
11531 change.
11532 * win32-low.c (win32_detach, win32_resume): Ditto.
11533
c35fafde
PA
115342009-04-01 Pedro Alves <pedro@codesourcery.com>
11535
11536 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11537 flag.
11538 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11539 pending.
11540 (linux_continue_one_thread): Only preserve the stepping flag if
11541 there's a pending breakpoint.
11542
0a59d50b
PA
115432009-03-31 Pedro Alves <pedro@codesourcery.com>
11544
11545 * server.c (main): After the inferior having exited, call
11546 remote_close before exiting gdbserver.
11547
f04c6d38
TJB
115482009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11549
11550 Fix size of FPSCR in Power 7 processors.
11551 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11552 (PPC_FEATURE_HAS_DFP): New #define.
11553 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11554 size of the FPSCR.
11555
78e5cee6
PA
115562009-03-23 Pedro Alves <pedro@codesourcery.com>
11557
11558 * server.c (handle_query) Whitespace and formatting.
11559
1b3f6016
PA
115602009-03-22 Pedro Alves <pedro@codesourcery.com>
11561
11562 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11563 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11564 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11565 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11566 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11567 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11568 Makefile.in, configure.ac: Fix whitespace throughout.
11569 * configure: Regenerate.
11570
a07b2135
PA
115712009-03-22 Pedro Alves <pedro@codesourcery.com>
11572
11573 * inferiors.c (find_inferior): Make it safe for the callback
11574 function to delete the currently iterated inferior.
11575
67cc2626
PA
115762009-03-22 Pedro Alves <pedro@codesourcery.com>
11577
11578 * Makefile.in (linuw_low_h): Move higher.
11579 (thread-db.o): Depend on $(linux_low_h).
11580
54a0b537
PA
115812009-03-17 Pedro Alves <pedro@codesourcery.com>
11582
11583 Rename "process" to "lwp" throughout.
11584
11585 * linux-low.c (all_processes): Rename to...
11586 (all_lwps): ... this.
11587 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11588 (add_process): Rename to ...
11589 (add_lwp): ... this. Adjust.
11590 (linux_create_inferior): Adjust.
11591 (linux_attach_lwp): Adjust.
11592 (linux_attach): Adjust.
11593 (linux_kill_one_process): Rename to ...
11594 (linux_kill_one_lwp): ... this. Adjust.
11595 (linux_kill): Adjust.
11596 (linux_detach_one_process): Rename to ...
11597 (linux_detach_one_lwp): ... this. Adjust.
11598 (linux_detach): Adjust.
11599 (check_removed_breakpoint): Adjust.
11600 (status_pending_p): Adjust.
11601 (linux_wait_for_process): Rename to ...
11602 (linux_wait_for_lwp): ... this. Adjust.
11603 (linux_wait_for_event): Adjust.
11604 (send_sigstop): Adjust.
11605 (wait_for_sigstop): Adjust.
11606 (stop_all_processes): Rename to ...
11607 (stop_all_lwps): ... this.
11608 (linux_resume_one_process): Rename to ...
11609 (linux_resume_one_lwp): ... this. Adjust.
11610 (linux_set_resume_request, linux_continue_one_thread)
11611 (linux_queue_one_thread, resume_status_pending_p)
11612 (usr_store_inferior_registers, regsets_store_inferior_registers)
11613 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11614 Adjust.
11615 * linux-low.h (get_process): Rename to ...
11616 (get_lwp): ... this. Adjust.
11617 (get_thread_process): Rename to ...
11618 (get_thread_lwp): ... this. Adjust.
11619 (get_process_thread): Rename to ...
11620 (get_lwp_thread): ... this. Adjust.
11621 (struct process_info): Rename to ...
11622 (struct lwp_info): ... this.
11623 (all_processes): Rename to ...
11624 (all_lwps): ... this.
11625 * proc-service.c (ps_lgetregs): Adjust.
11626 * thread-db.c (thread_db_create_event, find_one_thread)
11627 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11628
0b16c5cf
PA
116292009-03-14 Pedro Alves <pedro@codesourcery.com>
11630
11631 * server.c (handle_query): Handle "qAttached".
11632
32de4b9d
NS
116332009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11634
11635 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11636 GPLv3, update license URL.
11637
2aecd87f
DE
116382009-03-01 Doug Evans <dje@google.com>
11639
93efd302 11640 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11641 (server_h): Add gdb_signals.h.
11642 (signals.o): Update.
11643 * server.h (target_signal_from_host,target_signal_to_host_p)
11644 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11645
86b1f9c5
PM
116462009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11647
11648 * remote-utils.c (getpkt): Also generate remote-debug
11649 information if noack_mode is set.
11650
4aa995e1
PA
116512009-02-06 Pedro Alves <pedro@codesourcery.com>
11652
11653 * server.c (handle_query): Report qXfer:siginfo:read and
11654 qXfer:siginfo:write as supported and handle them.
11655 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11656 * linux-low.c (linux_xfer_siginfo): New.
11657 (linux_target_ops): Set it.
11658
62709adf
PA
116592009-01-26 Pedro Alves <pedro@codesourcery.com>
11660
11661 * server.c (gdbserver_usage): Mention --remote-debug.
11662 (main): Accept '--remote-debug' switch.
11663
aef93bd7
DE
116642009-01-18 Doug Evans <dje@google.com>
11665
11666 * regcache.c (new_register_cache): No need to check result of xcalloc.
11667 * server.c (handle_search_memory): Back out calls to xmalloc,
11668 result is checked and error is returned to user upon failure.
11669 (handle_query): Ditto. Add more checks for result of malloc.
11670 (handle_v_cont): Check result of malloc, report error back to
11671 user upon failure.
11672 (handle_v_run): Ditto. Call freeargv.
11673 * server.h (freeargv): Declare.
11674 * utils.c (freeargv): New fn.
11675
54363045
DE
116762009-01-15 Doug Evans <dje@google.com>
11677
f626972c
DE
11678 * gdbreplay.c (perror_with_name): Make arg const char *.
11679 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11680 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11681 * utils.c (perror_with_name): Make arg const char *.
54363045 11682
18aae699
PA
116832009-01-14 Pedro Alves <pedro@codesourcery.com>
11684
11685 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11686 when handling a EXIT_PROCESS_DEBUG_EVENT.
11687
ff703abe
JB
116882009-01-06 Joel Brobecker <brobecker@adacore.com>
11689
11690 * gdbreplay.c (gdbreplay_version): Update copyright year.
11691 * server.c (gdbserver_version): Likewise.
11692
f21cc1a2 116932009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11694
11695 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11696 (handle_extended_wait): Improve comment.
0e21c1ec 11697
bca929d3
DE
116982008-12-13 Doug Evans <dje@google.com>
11699
11700 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11701 * server.h (ATTR_MALLOC): New macro.
11702 (xmalloc,xcalloc,xstrdup): Declare.
11703 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11704 * inferiors.c: Ditto.
11705 * linux-low.c: Ditto.
11706 * mem-break.c: Ditto.
11707 * regcache.c: Ditto.
11708 * remote-utils.c: Ditto.
11709 * server.c: Ditto.
11710 * target.c: Ditto.
11711 * win32-low.c: Ditto.
11712
97438e3f
DE
117132008-12-12 Doug Evans <dje@google.com>
11714
896c7fbb
DE
11715 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11716 in debugging printf.
11717
97438e3f
DE
11718 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11719
e3b886f8
DE
117202008-12-09 Doug Evans <dje@google.com>
11721
11722 * linux-low.h (struct process_info): Delete member tid, unused.
11723 * thread-db.c (find_one_thread): Update.
11724 (maybe_attach_thread): Update.
11725
07e059b5
VP
117262008-12-02 Pedro Alves <pedro@codesourcery.com>
11727
889bf7c5
PA
11728 * target.h (struct target_ops): Add qxfer_osdata member.
11729 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11730 and dirent.h.
11731 (linux_qxfer_osdata): New functions.
11732 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11733 callback.
11734 * server.c (handle_query): Handle "qXfer:osdata:read:".
11735 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11736 (buffer_xml_printf): New functions.
11737 * server.h (struct buffer): New.
11738 (buffer_grow_str, buffer_grow_str0): New macros.
11739 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11740 (buffer_xml_printf): Declare.
07e059b5 11741
4cab47ab
DE
117422008-11-24 Doug Evans <dje@google.com>
11743
11744 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11745
f142445f
DJ
117462008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11747
11748 * server.c (handle_v_run): Always use the supplied argument list.
11749
d0107bb6 117502008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11751
d0107bb6
BW
11752 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11753 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11754
2c4ad781
TJB
117552008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11756
11757 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11758 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11759 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11760 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11761 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11762 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11763 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11764 XML target descriptions.
11765 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11766 when inferior is running on an ISA 2.05 or later processor. Add
11767 special case to return offset for full 64-bit slot of FPSCR when
11768 in 32-bits.
11769
dfb64f85
DJ
117702008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11771
11772 * Makefile.in (SFILES, clean): Added sparc64 files.
11773 (reg-sparc64.o, reg-sparc64.c): New.
11774 * configure.srv (sparc*-*-linux*): New configuration.
11775 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11776 syscall arguments for SPARC.
11777 (regsets_store_inferior_registers): Likewise.
11778 * linux-sparc-low.c: New file.
11779
66b6e1dd
DE
117802008-10-21 Doug Evans <dje@google.com>
11781
11782 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11783 (READLINE_DIR,READLINE_DEP): Delete.
11784 (INTERNAL_CFLAGS): Update.
11785 (LINTFLAGS): Update.
11786
9b710a42
PA
117872008-10-10 Pedro Alves <pedro@codesourcery.com>
11788
11789 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11790 whole argv from the last run, not just argv[0].
11791
5822d809
PA
117922008-09-08 Pedro Alves <pedro@codesourcery.com>
11793
11794 * regcache.c (new_register_cache): Return NULL if the register
11795 cache size isn't known yet.
11796 (free_register_cache): Avoid dereferencing a NULL regcache.
11797
74aac56f
DJ
117982008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11799
11800 * configure.srv: Merge MIPS and MIPS64.
11801
400b20f5
MR
118022008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11803
11804 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11805
677c5bb1
LM
118062008-08-18 Luis Machado <luisgpm@br.ibm.com>
11807
11808 * Makefile.in: Add required vsx dependencies.
11809
11810 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11811 Declare init_registers_powerpc_vsx32l.
11812 Declare init_registers_powerpc_vsx64l.
11813 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11814 (ppc_arch_setup): Check for VSX in hwcap.
11815 (ppc_fill_vsxregset): New function.
11816 (ppc_store_vsxregset): New function.
11817 Add new VSX entry in regset_info target_regsets.
11818
11819 * configure.srv: Add new VSX dependencies.
11820
a6f3e723
SL
118212008-08-12 Pedro Alves <pedro@codesourcery.com>
11822
11823 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11824 (remote_open): Set or clear transport_is_reliable.
11825 (putpkt_binary): Don't expect acks in noack mode.
11826 (getpkt): Don't send ack/nac in noack mode.
11827 * server.c (handle_general_set): Handle QStartNoAckMode.
11828 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11829 qSupported.
11830 (main): Reset noack_mode on every connection.
11831 * server.h (noack_mode): Declare.
11832
a417dc56
RW
118332008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11834
11835 * Makefile.in (GDBREPLAY_OBS): New variable.
11836 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11837
3221518c
UW
118382008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11839 Daniel Jacobowitz <dan@codesourcery.com>
11840
11841 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11842 (usr_store_inferior_registers): Likewise.
11843 (regsets_store_inferior_registers): Likewise.
11844
ec56be1b
PA
118452008-07-31 Rolf Jansen <rj@surtec.com>
11846 Pedro Alves <pedro@codesourcery.com>
11847
11848 * configure.ac: Check for memmem declaration.
11849 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11850 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11851 (disable_packet_qfThreadInfo): Unconditionally compile.
11852 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11853 * configure, config.in: Regenerate.
11854
2fe5e3ff
DE
118552008-07-28 Doug Kwan <dougkwan@google.com>
11856
11857 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11858 (linux_write_memory): Remove declaration of errno.
11859
836acd6d
UW
118602008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11861
11862 * linux-low.c (handle_extended_wait): Do not use "status"
11863 variable uninitialized.
11864
aeba519e
PA
118652008-07-07 Pedro Alves <pedro@codesourcery.com>
11866
11867 * server.c (handle_v_attach): Inhibit reporting dll changes.
11868
db42f210
PA
118692008-06-27 Pedro Alves <pedro@codesourcery.com>
11870
11871 * remote-utils.c (prepare_resume_reply): If requested, don't
11872 output "thread:TID" in the T stop reply.
11873
11874 * server.c (disable_packet_vCont, disable_packet_Tthread)
11875 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11876 (handle_query): If requested, disable support for qC, qfThreadInfo
11877 and qsThreadInfo.
11878 (handle_v_requests): If requested, disable support for vCont.
11879 (gdbserver_show_disableable): New.
11880 (main): Handle --disable-packet and --disable-packet=LIST.
11881
11882 * server.h (disable_packet_vCont, disable_packet_Tthread)
11883 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11884
8e4c5421
CD
118852008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11886
11887 * server.c (gdbserver_usage): Mention --version.
11888
6e23a804
DJ
118892008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11890
11891 * Makefile.in (gdbreplay.o): New rule.
11892
90aa6a40
JM
118932008-06-06 Joseph Myers <joseph@codesourcery.com>
11894
11895 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11896 message, not gdbserver.
11897
c16158bc 118982008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11899 Nathan Sidwell <nathan@codesourcery.com>
11900 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11901
11902 * acinclude.m4: Include ../../config/acx.m4.
11903 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11904 * configure, config.in: Regenerate.
11905 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11906 * server.c (gdbserver_version): Print PKGVERSION.
11907 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11908 (main): Adjust gdbserver_usage calls.
11909 * gdbreplay.c (version, host_name): Add declarations.
11910 (gdbreplay_version, gdbreplay_usage): New.
11911 (main): Accept --version and --help options.
11912
aeb75bf5
DJ
119132008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11914
11915 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11916 (arm_breakpoint_at): Handle Thumb.
11917 (the_low_target): Add comment.
11918
76b233dd
UW
119192008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11920
11921 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11922
08388c79
DE
119232008-05-09 Doug Evans <dje@google.com>
11924
a3c83fae
DE
11925 * server.h (decode_search_memory_packet): Declare.
11926 * remote-utils.c (decode_search_memory_packet): New fn.
11927 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11928 (handle_search_memory): New fn.
11929 (handle_query): Process qSearch:memory packets.
11930
bb9c3d36
UW
119312008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11932
11933 * regcache.c (registers_length): Remove.
11934 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11935 full register packet.
11936 * regcache.h (registers_length): Remove prototype.
11937 * server.h (PBUFSIZ): Define to 16384.
11938
7284e1be
UW
119392008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11940
11941 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11942 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11943 powerpc-64l.o, and powerpc-altivec64l.o.
11944 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11945 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11946 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11947 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11948 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11949 to srv_xmlfiles.
11950
11951 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11952 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11953 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11954 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11955 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11956 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11957 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11958 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11959 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11960 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11961 (clean): Update.
11962
11963 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11964 (init_registers_powerpc_32l): ... this new prototype.
11965 (init_registers_powerpc_32): Remove, replace by ...
11966 (init_registers_powerpc_altivec32l): ... this new prototype.
11967 (init_registers_powerpc_e500): Remove, replace by ...
11968 (init_registers_powerpc_e500l): ... this new prototype.
11969 (init_registers_ppc64): Remove, replace by ...
11970 (init_registers_powerpc_64l): ... this new prototype.
11971 (init_registers_powerpc_64): Remove, replace by ...
11972 (init_registers_powerpc_altivec64l): ... this new prototype.
11973 (ppc_num_regs): Set to 73.
11974 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11975 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11976 (ppc_cannot_store_register): Handle orig_r3 and trap.
11977 (ppc_arch_setup): Update init_registers_... calls.
11978 (ppc_fill_gregset): Handle orig_r3 and trap.
11979
11980 * inferiors.c (clear_inferiors): Reset current_inferior.
11981
fdc59709
PB
119822008-04-23 Paolo Bonzini <bonzini@gnu.org>
11983
889bf7c5
PA
11984 * acinclude.m4: Add override.m4.
11985 * configure: Regenerate.
fdc59709 11986
c9b2f845
UW
119872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11988
11989 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11990 initial call to init_register_ppc64.
11991
550512b8
UW
119922008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11993
43aaf8b6
PA
11994 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11995 single powerpc*-*-linux* case.
550512b8
UW
11996 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11997
b6430ec3
UW
119982008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11999
12000 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12001 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12002 from reg_xmlfiles.
12003 * linux-ppc-low.c: Include <elf.h>.
12004 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12005 (ppc_hwcap): New global variable.
12006 (ppc_regmap): Remove __SPE__ #ifdef sections.
12007 (ppc_regmap_e500): New global variable.
12008 (ppc_cannot_store_register): Update __SPE__ special case.
12009 (ppc_get_hwcap): New function.
12010 (ppc_arch_setup): Use it to determine whether inferior supports
12011 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12012 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12013 Do not access registers if target does not support AltiVec.
12014 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12015 Do not access registers if target does not support SPE.
12016 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12017
52fa2412
UW
120182008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12019
12020 * linux-low.c (disabled_regsets, num_regsets): New.
12021 (use_regsets_p): Delete.
12022 (linux_wait_for_process): Clear disabled_regsets.
12023 (regsets_fetch_inferior_registers): Check and set it.
12024 (regsets_store_inferior_registers): Likewise.
12025 (linux_fetch_registers, linux_store_registers): Do not use
12026 use_regsets_p.
12027 (initialize_low): Allocate disabled_regsets.
12028
e28b3332
DJ
120292008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12030
12031 * Makefile.in (LIBOBJS): New.
12032 (OBS): Use LIBOBJS.
12033 (memmem.o): New rule.
12034 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12035 * configure: Regenerated.
12036
4536995d
UW
120372008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12038
12039 * server.c (handle_query): Never return "unsupported" for
12040 qXfer:features:read queries.
12041
221c031f
UW
120422008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12043
12044 * server.c (get_features_xml): Fix inverted condition.
12045 (handle_query): Always support qXfer:feature:read.
12046
ccd213ac
DJ
120472008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * server.c (wrapper_argv): New.
12050 (start_inferior): Handle wrapper_argv. If set, expect an extra
12051 trap.
12052 (gdbserver_usage): Document --wrapper.
12053 (main): Parse --wrapper.
12054
6fe305f7
UW
120552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12056
12057 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12058 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12059 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12060 (ppc_set_pc): Likewise.
12061 (ppc_arch_setup): New function.
12062 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12063 of collect_register.
889bf7c5 12064 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12065
5b0a002e
UW
120662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12067
12068 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12069 instead of linux-ppc64-low.o.
12070 * linux-ppc64-low.c: Remove file.
12071 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12072 (linux-ppc64-low.o): Remove rule.
12073
12074 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12075 (init_registers_powerpc_64): Likewise.
12076 (ppc_regmap): Conditionally define depending on __powerpc64__.
12077 (ppc_cannot_store_register): Do not special-case "fpscr" when
12078 compiled on __powerpc64__.
12079 (ppc_collect_ptrace_register): New function.
12080 (ppc_supply_ptrace_register): New function.
12081 (ppc_breakpoint): Change type to "unsigned int".
12082 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12083 (the_low_target): Conditionally provide initializers for the
889bf7c5 12084 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12085 collect_ptrace_register and supply_ptrace_register members.
12086
9b4b61c8
UW
120872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12088
12089 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12090 * server.c (gdbserver_xmltarget): Define.
12091 (get_features_xml): Use it to replace "target.xml" and arch_string.
12092
12093 * configure.srv: Remove srv_xmltarget. Add XML files that were
12094 mentioned there to srv_xmlfiles instead. Remove conditional tests
12095 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12096 srv_xmlfiles and srv_regobj to include all possible choices.
12097 * configure.ac (srv_xmltarget): Remove.
12098 (srv_xmlfiles): Do not add "target.xml".
12099 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12100 checks for supplementary target information.
12101 * configure: Regenerate.
12102 * Makefile.in (XML_TARGET): Remove.
12103 (target.xml): Remove rule.
12104 (clean): Do not clean up target.xml.
12105 (.PRECIOUS): Do not mention target.xml.
12106
12107 * target.h (struct target_ops): Remove arch_string member.
12108 * linux-low.c (linux_arch_string): Remove.
12109 (linux_target_ops): Remove arch_string initializer.
12110 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12111 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12112 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12113 * spu-low.c (spu_arch_string): Remove.
12114 (spu_target_ops): Remove arch_string initializer.
12115 * win32-low.c (win32_arch_string): Remove.
12116 (win32_target_ops): Remove arch_string initializer.
12117 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12118 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12119 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12120
ee1a7ae4
UW
121212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12122
12123 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12124 by collect_ptrace_register and supply_ptrace_register hooks.
12125 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12126 instead of checking for the_low_target.left_pad_xfer.
12127 (usr_store_inferior_registers): Use collect_ptrace_register callback
12128 instead of checking for the_low_target.left_pad_xfer.
12129
12130 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12131 (s390_supply_ptrace_register): Likewise.
12132 (s390_fill_gregset): Call s390_collect_ptrace_register.
12133 (the_low_target): Update.
12134
12135 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12136 (ppc_supply_ptrace_register): Likewise.
12137 (the_low_target): Update.
12138
12139 * linux-i386-low.c (the_low_target): Update.
12140 * linux-x86-64-low.c (the_low_target): Update.
12141
d61ddec4
UW
121422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12143
12144 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12145 reg-s390.o and reg-s390x.o.
12146
12147 * linux-low.c (new_inferior): New global variable.
12148 (linux_create_inferior, linux_attach): Set it.
12149 (linux_wait_for_process): Call the_low_target.arch_setup after the
12150 target has stopped for the first time.
12151 (initialize_low): Do not call the_low_target.arch_setup.
12152
12153 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12154 (s390_set_pc): Likewise.
12155 (s390_arch_setup): New function.
12156 (the_low_target): Use s390_arch_setup as arch_setup routine.
12157
12158 * regcache.c (realloc_register_cache): New function.
12159 (set_register_cache): Call it for each existing regcache.
12160
d05b4ac3
UW
121612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12162
12163 * server.h (init_registers): Remove prototype.
12164
12165 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12166 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12167 instead of init_registers ().
12168 * linux-arm-low.c (init_registers_arm): Add prototype.
12169 (init_registers_arm_with_iwmmxt): Likewise.
12170 (the_low_target): Add initializer for arch_setup field.
12171 * linux-cris-low.c (init_registers_cris): Add prototype.
12172 (the_low_target): Add initializer for arch_setup field.
12173 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12174 (the_low_target): Add initializer for arch_setup field.
12175 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12176 (the_low_target): Add initializer for arch_setup field.
12177 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12178 (the_low_target): Add initializer for arch_setup field.
12179 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12180 (the_low_target): Add initializer for arch_setup field.
12181 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12182 (the_low_target): Add initializer for arch_setup field.
12183 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12184 (init_registers_mips64_linux): Likewise.
12185 (the_low_target): Add initializer for arch_setup field.
12186 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12187 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12188 (the_low_target): Add initializer for arch_setup field.
12189 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12190 (init_registers_powerpc_64): Likewise.
12191 (the_low_target): Add initializer for arch_setup field.
12192 * linux-s390-low.c (init_registers_s390): Add prototype.
12193 (init_registers_s390x): Likewise.
12194 (the_low_target): Add initializer for arch_setup field.
12195 * linux-sh-low.c (init_registers_sh): Add prototype.
12196 (the_low_target): Add initializer for arch_setup field.
12197 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12198 (the_low_target): Add initializer for arch_setup field.
12199 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12200 (the_low_target): Add initializer for arch_setup field.
12201
12202 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12203 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12204 instead of init_registers ().
12205 * win32-arm-low.c (init_registers_arm): Add prototype.
12206 (the_low_target): Add initializer for arch_setup field.
12207 * win32-i386-low.c (init_registers_i386): Add prototype.
12208 (the_low_target): Add initializer for arch_setup field.
12209
12210 * spu-low.c (init_registers_spu): Add prototype.
12211 (initialize_low): Call initialie_registers_spu () instead of
12212 initialize_registers ().
12213
fd96d250
PA
122142008-02-19 Pedro Alves <pedro@codesourcery.com>
12215
12216 * server.c (handle_v_requests): When handling the vRun and vAttach
12217 packets, if already debugging a process, don't kill it. Return an
12218 error instead.
12219
d41b6bb4
DJ
122202008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12221
12222 * server.c (handle_query): Correct length check.
12223
5ac588cf
PA
122242008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12225
12226 * win32-low.c (do_initial_child_stuff): Add process handle
12227 parameter. Set current_process_handle and current_process_id from the
12228 parameters. Clear globals.
12229 (win32_create_inferior): Don't set current_process_handle and
12230 current_process_id here. Instead pass them on the call to
12231 do_initial_child_stuff.
12232 (win32_attach): Likewise.
12233 (win32_clear_inferiors): New.
12234 (win32_kill): Don't close the current process handle or the
12235 current thread handle here. Instead call win32_clear_inferiors.
12236 (win32_detach): Don't open a new handle to the process. Call
12237 win32_clear_inferiors.
12238 (win32_join): Don't rely on current_process_handle; open a new
12239 handle using the process id.
12240 (win32_wait): Call win32_clear_inferiors when the inferior process
12241 has exited.
12242
ecd7ecbc
DJ
122432008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12244
12245 * server.c (monitor_show_help): Add "exit".
12246
1525d545
MG
122472008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12248
ecd7ecbc 12249 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12250 (clean): Add reg-xtensa.c.
12251 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12252 * configure.srv (xtensa*-*-linux*) New target.
12253 * linux-xtensa-low.c: New.
12254 * xtensa-xtregs.c: New.
1525d545 12255
59a016f0
PA
122562008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12257
12258 * hostio.c: Don't include errno.h.
12259 (errno_to_fileio_errno): Move to hostio-errno.
12260 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12261 error number outputting to the target->hostio_last_error callback.
12262 (hostio_packet_error): Use FILEIO_EINVAL directly.
12263 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12264 calls to hostio_error.
12265 * hostio-errno.c: New.
12266 * server.h (hostio_last_error_from_errno): Declare.
12267 * target.h (target_ops): Add hostio_last_error member.
12268 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12269 as hostio_last_error handler.
889bf7c5 12270 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12271 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12272 (wince_hostio_last_error): New functions.
12273 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12274 as hostio_last_error handler.
12275 (win32_target_ops) [!_WIN32_WCE]: Register
12276 hostio_last_error_from_errno as hostio_last_error handler.
12277 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12278 (hostio-errno.o): New rule.
12279 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12280 * configure.srv (srv_hostio_err_objs): New variable. Default to
12281 hostio-errno.o.
12282 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12283 * configure: Regenerate.
12284
2d717e4f
DJ
122852008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12286
12287 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12288 (linux_kill, linux_detach): Clean up the process list.
12289 * remote-utils.c (remote_open): Improve port number parsing.
12290 (putpkt_binary, input_interrupt): Only send interrupts if the target
12291 is running.
12292 * server.c (extended_protocol): Make static.
12293 (attached): Define earlier.
12294 (exit_requested, response_needed, program_argv): New variables.
12295 (target_running): New.
12296 (start_inferior): Clear attached here.
12297 (attach_inferior): Set attached here.
12298 (require_running): Define.
12299 (handle_query): Use require_running and target_running. Implement
12300 "monitor exit".
12301 (handle_v_attach, handle_v_run): New.
12302 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12303 (gdbserver_usage): Update.
12304 (main): Redo argument parsing. Handle --debug and --multi. Handle
12305 --attach along with other options or after the port. Save
12306 program_argv. Support no initial program. Resynchronize
12307 communication with GDB after an error. Handle "monitor exit".
12308 Use require_running and target_running. Always allow the extended
12309 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12310 restart in extended mode.
12311 * README: Refer to the GDB manual. Update --attach usage.
12312
7407e2de
AS
123132007-12-20 Andreas Schwab <schwab@suse.de>
12314
12315 * linux-low.c (STACK_SIZE): Define.
12316 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12317 (linux_test_for_tracefork): Likewise.
12318
b65d95c5
DJ
123192007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12320
12321 * linux-low.c (linux_wait_for_event): Update messages. Do not
12322 reinsert auto-delete breakpoints.
12323 * mem-break.c (struct breakpoint): Change return type of handler to
12324 int.
12325 (set_breakpoint_at): Update handler type.
12326 (reinsert_breakpoint_handler): Return 1 instead of calling
12327 delete_breakpoint.
12328 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12329 setting a new one.
12330 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12331 * mem-break.h (set_breakpoint_at): Update handler type.
12332 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12333 * win32-low.c (auto_delete_breakpoint): New.
12334 (get_child_debug_event): Use it.
12335
4e799345
DJ
123362007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12337
12338 * configure.ac: Check for pread and pwrite.
12339 * hostio.c (handle_pread): Fall back to lseek and read.
12340 (handle_pwrite): Fall back to lseek and write.
12341 * config.in, configure: Regenerated.
12342
27524b67
DJ
123432007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * server.c (myresume): Add own_buf argument.
12346 (main): Update calls.
12347
a20d5e98
DJ
123482007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12349
12350 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12351 * remote-utils.c (remote_open): Do not call disable_async_io.
12352 (block_async_io): Delete.
12353 (unblock_async_io): Make static.
12354 (initialize_async_io): New.
12355 * server.c (handle_v_cont): Handle async I/O here.
12356 (myresume): Likewise. Move other common resume tasks here...
12357 (main): ... from here. Call initialize_async_io. Disable async
12358 I/O before the main loop.
12359 * server.h (initialize_async_io): Declare.
12360 (block_async_io, unblock_async_io): Delete prototypes.
12361 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12362
b79d787e
DJ
123632007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12364
12365 * remote-utils.c (readchar): Allow binary data in received messages.
12366
d97903b2
PA
123672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12368
12369 * win32-low.c (attaching): New global.
12370 (win32_create_inferior): Clear the `attaching' global.
12371 (win32_attach): Set the `attaching' global.
12372 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12373 attaching. Only set a breakpoint at the entry point if not
12374 attaching.
12375
311de423
PA
123762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12377
12378 * server.c (main): Don't report dll events on the initial
12379 connection on attaches.
12380
6c2d16d2
PA
123812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12382
12383 * server.c (main): Relax numerical bases supported for the pid of
12384 the --attach command line argument.
12385
5ca906e6
PA
123862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12387
12388 * win32-low.c (win32_attach): Call OpenProcess before
12389 DebugActiveProcess, not after. Add last error output to error
12390 call.
12391
9c6c8194
PA
123922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12393
12394 * win32-low.c (win32_get_thread_context)
12395 (win32_set_thread_context): New functions.
12396 (thread_rec): Use win32_get_thread_context.
12397 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12398 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12399 field.
12400
4d5d1aaa
PA
124012007-12-03 Leo Zayas
12402 Pedro Alves <pedro_alves@portugalmail.pt>
12403
12404 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12405 global variables.
12406 (child_add_thread): Minor cleanup.
12407 (child_continue): Resume artificially suspended threads before
12408 calling ContinueDebugEvent.
12409 (suspend_one_thread): New.
12410 (fake_breakpoint_event): New.
12411 (get_child_debug_event): Change return type to int. Check here if
12412 gdb sent an interrupt request. If a soft interrupt was requested,
12413 fake a breakpoint event. Return 0 if there is no event to handle,
12414 and 1 otherwise.
12415 (win32_wait): Don't check here if gdb sent an interrupt request.
12416 Ensure there is a valid event to handle.
12417 (win32_request_interrupt): Add soft interruption method as last
12418 resort.
12419
c436e841
PA
124202007-12-03 Leo Zayas
12421 Pedro Alves <pedro_alves@portugalmail.pt>
12422
12423 * win32-low.h (win32_thread_info): Add descriptions to the
12424 structure members. Replace `suspend_count' counter by a
12425 `suspended' flag.
12426 * win32-low.c (thread_rec): Update condition of when to get the
12427 context from the inferior. Rely on ContextFlags being set if it
12428 has already been retrieved. Only suspend the inferior thread if
12429 we haven't already. Warn if that fails.
12430 (continue_one_thread): s/suspend_count/suspended/. Only call
12431 ResumeThread once. Warn if that fails.
12432
e7b5fa67
PA
124332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12434
12435 * win32-low.c (win32_wait): Don't read from the inferior when it
12436 has already exited.
12437
a385171d
PA
124382007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12439
12440 * Makefile.in (win32_low_h): New variable.
12441 (win32-low.o): Add dependency on $(win32_low_h).
12442 (win32-arm-low.o, win32-i386-low.o): New rules.
12443
f80c84b3
DJ
124442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12445
12446 * hostio.c: Correct copyright year.
12447
a6b151f1
DJ
124482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12449
12450 * Makefile.in (OBS): Add hostio.o.
12451 (hostio.o): New rule.
12452 * server.h (handle_vFile): Declare.
12453 * hostio.c: New file.
12454 * server.c (handle_v_requests): Take packet_len and new_packet_len
12455 for binary packets. Call handle_vFile.
12456 (main): Update call to handle_v_requests.
12457
f9387fc3
DJ
124582007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12459
12460 * linux-low.c: Include <sched.h>.
12461
51c2684e
DJ
124622007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12463
12464 * linux-low.c (linux_tracefork_grandchild): New.
12465 (linux_tracefork_child): Use clone.
12466 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12467
75f83163
JB
124682007-10-31 Joel Brobecker <brobecker@adacore.com>
12469
12470 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12471
da5898ce
DJ
124722007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12473
12474 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12475
24a09b5f
DJ
124762007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12477
12478 * inferiors.c (change_inferior_id): Delete.
12479 (add_pid_to_list, pull_pid_from_list): New.
12480 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12481 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12482 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12483 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12484 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12485 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12486 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12487 (using_threads): Always set to 1.
12488 (handle_extended_wait): New.
12489 (add_process): Do not set TID.
12490 (linux_create_inferior): Set must_set_ptrace_flags.
12491 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12492 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12493 (linux_thread_alive): Rename TID argument to LWPID.
12494 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12495 (linux_wait_for_event): Do not use TID or check using_threads. Update
12496 call to dead_thread_notify. Call handle_extended_wait.
12497 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12498 (send_sigstop): Delete sigstop_sent.
12499 (wait_for_sigstop): Avoid TID.
12500 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12501 (linux_test_for_tracefork): New.
12502 (linux_lookup_signals): Use thread_db_active and
12503 linux_supports_tracefork_flag.
12504 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12505 * linux-low.h (get_process_thread): Avoid TID.
12506 (struct process_ifo): Move thread_known and tid to the end. Remove
12507 sigstop_sent.
12508 (linux_attach_lwp, thread_db_init): Update prototypes.
12509 * server.h (change_inferior_id): Delete prototype.
12510 (add_pid_to_list, pull_pid_from_list): New prototypes.
12511 * thread-db.c (thread_db_use_events): New.
12512 (find_first_thread): Rename to...
12513 (find_one_thread): ...this. Update callers and messages. Do not
12514 call fatal. Check thread_db_use_events. Do not call
12515 change_inferior_id or new_thread_notify.
12516 (maybe_attach_thread): Update. Do not call new_thread_notify.
12517 (thread_db_init): Set thread_db_use_events. Check use_events.
12518 * utils.c (fatal, warning): Correct message prefix.
12519
30ed0a8f
DJ
125202007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12521
12522 * Makefile.in (clean): Remove new files.
12523 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12524 (powerpc-64.o, powerpc-64.c): New rules.
12525 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12526 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12527 with SPE.
12528 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12529 SPE targets.
12530 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12531 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12532 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12533 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12534 (target_regsets): Add AltiVec and SPE register sets.
12535 * configure.ac: Check for AltiVec and SPE.
12536 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12537 (ppc_fill_vrregset, ppc_store_vrregset): New.
12538 (target_regsets): Add AltiVec register set.
12539 * configure: Regenerated.
12540
fd462a61
DJ
125412007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12542
12543 * linux-low.c (O_LARGEFILE): Define.
12544 (linux_read_memory): Use /proc/PID/mem.
12545 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12546 * configure, config.in: Regenerated.
12547
69f223ed
DJ
125482007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12549
12550 * linux-low.c (linux_wait_for_event): Do not pass signals while
12551 single-stepping.
12552
aec18585
PA
125532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12554
12555 * win32-low.c (create_process): New.
12556 (win32_create_inferior): Use create_process instead of
12557 CreateProcess. If create_process failed retry appending an ".exe"
12558 suffix. Store the GetLastError result immediatelly after
12559 create_process calls and use it on the call to error.
12560
34d86ddd
PA
125612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12562
12563 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12564
5a0e3bd0
JB
125652007-08-23 Joel Brobecker <brobecker@adacore.com>
12566
12567 * configure.ac: Switch license to GPLv3.
12568
f88c79e6
MS
125692007-08-01 Michael Snyder <msnyder@access-company.com>
12570
12571 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12572
6b3d9b83
PA
125732007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12574
12575 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12576 typedef.
12577 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12578 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12579 CloseToolhelp32Snapshot.
12580 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12581 CloseToolhelp32Snapshot.
12582
c588c53c
MS
125832007-07-27 Michael Snyder <michael.snyder@access-company.com>
12584
12585 * server.c (main): Check for inferior exit before main loop.
12586
aa0403d9
PA
125872007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12588
12589 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12590 instead of on tmp_desc.
12591
255e7678
DJ
125922007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12593 Daniel Jacobowitz <dan@codesourcery.com>
12594
12595 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12596 (add_thread): Minor cleanups.
12597 (clear_inferiors): Move lower in the file. Clear the DLL
12598 list.
12599 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12600 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12601 (xml_escape_text): New.
12602 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12603 for qSupported.
12604 (handle_v_cont): Report errors.
12605 (gdbserver_version): Update.
12606 (main): Correct size of own_buf. Do not report initial DLL events.
12607 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12608 (unloaded_dll, xml_escape_text): New.
12609 * win32-low.c (enum target_waitkind): Update comments.
12610 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12611 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12612 (win32_EnumProcessModules, win32_GetModuleInformation)
12613 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12614 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12615 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12616 (win32_Module32First, win32_Module32Next, load_toolhelp)
12617 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12618 (get_child_debug_event): Handle DLL events.
12619 (win32_wait): Likewise.
12620
0d37add9
DJ
126212007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12622
12623 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12624 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12625
45e2715e
PA
126262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12627
12628 * win32-low.c (handle_output_debug_string): Ignore event if not
12629 waiting.
12630
c5674cf1
PA
126312007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12632
12633 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12634
2bbe3cc1
DJ
126352007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12636
12637 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12638
ae13219e
DJ
126392007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12640
12641 * inferiors.c (change_inferior_id): Add comment.
12642 * linux-low.c (check_removed_breakpoint): Add an early
12643 prototype. Improve debug output.
12644 (linux_attach): Doc update.
12645 (linux_detach_one_process, linux_detach): Clean up before releasing
12646 each process.
12647 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12648 * linux-low.h (struct process_info): Doc improvement.
12649 * mem-break.c (delete_all_breakpoints): New.
12650 * mem-break.h (delete_all_breakpoints): New prototype.
12651 * thread-db.c (find_first_thread): New.
12652 (thread_db_create_event): Call it instead of
12653 thread_db_find_new_threads. Clean up unused variables.
12654 (maybe_attach_thread): Remove first thread handling.
12655 (thread_db_find_new_threads): Use find_first_thread.
12656 (thread_db_get_tls_address): Likewise.
12657
4105de34
DJ
126582007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12659
12660 * thread-db.c (thread_db_find_new_threads): Add prototype.
12661 (thread_db_create_event): Check for the main thread before adding
12662 a new thread.
12663 (maybe_attach_thread): Only enable event reporting if TID == 0.
12664 (thread_db_get_tls_address): Check for new threads.
12665
2b876972
DJ
126662007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12667
12668 * linux-low.c (linux_create_inferior): Try execv before execvp.
12669 * spu-low.c (spu_create_inferior): Likewise.
12670
7a245884
DJ
126712007-06-13 Mike Frysinger <vapier@gentoo.org>
12672
12673 * linux-low.c (linux_create_inferior): Change execv to execvp.
12674 * spu-low.c (spu_create_inferior): Likewies.
12675
117ce543
DJ
126762007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12677
12678 * Makefile.in (clean): Clean new files instead of deleted ones.
12679 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12680 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12681 rules.
12682 * configure.srv: Specify XML files and new regformats for MIPS and
12683 MIPS64 GNU/Linux.
12684 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12685 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12686 an entry for the restart register.
12687 (mips_cannot_fetch_register, mips_cannot_store_register)
12688 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12689 register names to match the XML descriptions.
12690 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12691 restart register instead of $0.
12692
0e7f50da
UW
126932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12694 Markus Deuling <deuling@de.ibm.com>
12695
12696 * remote-utils.c (decode_xfer_write): New function.
12697 * server.h (decode_xfer_write): Add prototype.
12698 * server.c (handle_query): Add PACKET_LEN argument. Support
12699 qXfer:spu:read and qXfer:spu:write packets.
12700 (main): Pass packet_len to handle_query.
12701 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12702 * target.h (target_ops): Add qxfer_spu.
12703
374c1d38
UW
127042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12705
12706 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12707 accessing non-seekable spufs files.
12708
bb63802a
UW
127092007-05-16 Markus Deuling <deuling@de.ibm.com>
12710
889bf7c5 12711 * server.c (handle_query): Add reply for qC packet.
bb63802a 12712
7390519e
PA
127132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12714 Leo Zayas <lerele@champenstudios@com>
12715
12716 * server.h (check_remote_input_interrupt_request): New function.
12717 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12718 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12719 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12720 (check_remote_input_interrupt_request): New function.
12721 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12722 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12723 winapi_GenerateConsoleCtrlEvent): New typedefs.
12724 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12725 to 250 ms.
12726 (win32_wait): Check for remote interrupt request
12727 with check_remote_input_interrupt_request.
12728 (win32_request_interrupt): New function.
12729 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12730
34b34921
PA
127312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12732
12733 * win32-low.c (debug_registers_changed,
12734 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12735 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12736 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12737 (thread_rec): Get context using the low target.
12738 (child_add_thread): Call thread_added on the low target,
12739 which does the same thing.
12740 (regptr): Delete.
12741 (do_initial_child_stuff): Remove debug registers references.
12742 Set context using the low target. Resume threads after
12743 setting the contexts.
12744 (child_continue): Remove dead variable. Remove debug
12745 registers references.
12746 (child_fetch_inferior_registers): Go through the low target.
12747 (do_child_store_inferior_registers): Remove.
12748 (child_store_inferior_registers): Go through the low target.
12749 (win32_resume): Remove debug registers references.
12750 Set context using the low target.
12751 (handle_exception): Change return type to void. Don't record
12752 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12753 first chance exception.
889bf7c5 12754 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12755 goto loop. Always return after waiting for debug event.
12756 (win32_wait): Convert to switch statement. Handle spurious
12757 events.
12758
12759 * win32-i386-low.c (debug_registers_changed,
12760 debug_registers_used): New.
12761 (initial_stuff): Rename to ...
12762 (i386_initial_stuff): ... this. Clear debug registers
12763 state variables.
12764 (store_debug_registers): Delete.
12765 (i386_get_thread_context): New.
12766 (load_debug_registers): Delete.
12767 (i386_set_thread_context): New.
12768 (i386_thread_added): New.
12769 (single_step): Rename to ...
12770 (i386_single_step): ... this.
12771 (do_fetch_inferior_registers): Rename to ...
12772 (i386_fetch_inferior_register): ... this.
12773 (i386_store_inferior_register): New.
12774 (the_low_target): Adapt to new interface.
12775
12776 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12777 (arm_get_thread_context): New.
12778 (arm_set_thread_context): New.
12779 (regptr): New.
12780 (do_fetch_inferior_registers): Rename to ...
12781 (arm_fetch_inferior_register): ... this.
12782 (arm_store_inferior_register): New.
12783 (arm_wince_breakpoint): Reimplement as unsigned long.
12784 (arm_wince_breakpoint_len): Define.
12785 (the_low_target): Adapt to new interface.
12786
12787 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12788 load_debug_registers. Add get_thread_context, set_thread_context,
12789 thread_added and store_inferior_register. Rename
12790 fetch_inferior_registers to fetch_inferior_register.
12791 (regptr): Remove declaration.
12792
dd6953e1
PA
127932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12794
12795 * linux-low.c (linux_detach): Change return type to int. Return 0.
12796 * spu-low.c (spu_detach): Likewise.
12797
444d6139
PA
127982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12799
12800 * target.h (target_ops): Change return type of detach to int.
12801 Add join.
12802 (join_inferior): New.
12803 * server.c (main): Don't skip detach support on mingw32.
12804 If the inferior doesn't support detaching return error.
12805 Call join_inferior instead of using waitpid.
12806 * linux-low.c (linux_join): New.
12807 (linux_target_op): Add linux_join.
12808 * spu-low.c (spu_join): New.
12809 (spu_target_ops): Add spu_join.
12810 * win32-low.c (win32_detach): Adapt to new interface.
12811 Reopen current_process_handle before detaching. Issue a child
12812 resume before detaching.
12813 (win32_join): New.
12814 (win32_target_op): Add win32_join.
12815
1d5315fe
PA
128162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12817
12818 * win32-low.c (win32-attach): Fix return value.
12819 * target.h (target_ops): Describe ATTACH return values.
12820
bf914831
PA
128212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12822
12823 * win32-low.c (GETPROCADDRESS): Define.
12824 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12825 (winapi_DebugSetProcessKillOnExit): Likewise.
12826 (win32_create_inferior): Force usage of ansi CreateProcessA.
12827 (win32_attach): Use GETPROCADDRESS.
12828 (win32_detach): Likewise.
12829
f72f3e60
PA
128302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12831
12832 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12833
ed50f18f
PA
128342007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12835
12836 * win32-low.c: Commit leftover changes from 2007-03-29.
12837
0c2ead7e
DJ
128382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12839
12840 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12841 fields short instead of int. Add explicit padding.
12842 (i387_cache_to_fsave): Remove unnecessary casts.
12843 (i387_fsave_to_cache): Doc fix.
12844 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12845
73725ff3
DJ
128462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12847
12848 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12849 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12850
d99f33d8
PA
128512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12852
12853 * configure.srv (arm*-*-mingw32ce*): Move near the other
12854 arm targets.
12855
68070c10
PA
128562007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12857
2482afc6 12858 * configure.ac: Add errno checking.
68070c10
PA
12859 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12860 sys/file.h and malloc.h.
12861 (AC_CHECK_DECLS): Add perror.
12862 (srv_mingwce): Handle.
2482afc6 12863 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12864 win32-i386-low.o to srv_tgtobj.
12865 (i[34567]86-*-mingw*): Likewise.
12866 (arm*-*-mingw32ce*): Add case.
12867 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12868 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12869 [__MINGW32CE__] (strerror): New function.
12870 [__MINGW32CE__] (errno): Define to GetLastError.
12871 [__MINGW32CE__] (COUNTOF): New macro.
12872 (remote_open): Remove extra close call.
12873 * mem-break.c (delete_breakpoint_at): New function.
12874 * mem-break.h (delete_breakpoint_at): Declare.
12875 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12876 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12877 [USE_WIN32API] (read, write): Add char* casts.
12878 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12879 * server.h: Include wincecompat.h on Windows CE.
12880 [HAVE_ERRNO_H]: Check.
12881 (perror): Declare if not declared.
12882 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12883 (perror_with_name): Remove errno declaration.
12884 * wincecompat.h: New.
12885 * wincecompat.c: New.
12886 * win32-low.h: New.
12887 * win32-arm-low.c: New.
12888 * win32-i386-low.c: New.
12889 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12890 (OUTMSG2): Make it safe.
12891 (_T): New macro.
12892 (COUNTOF): New macro.
12893 (NUM_REGS): Get it from the low target.
12894 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12895 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12896 (thread_rec): Let low target handle debug registers.
12897 (child_add_thread): Likewise.
12898 (child_init_thread_list): Likewise.
12899 (continue_one_thread): Likewise.
12900 (regptr): New.
12901 (do_child_fetch_inferior_registers): Move to ...
12902 * win32-i386-low.c: ... here, and rename to ...
12903 (do_fetch_inferior_registers): ... this.
889bf7c5 12904 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12905 Go through the low target.
12906 (do_child_store_inferior_registers): Use regptr.
12907 (strwinerror): New function.
12908 (win32_create_inferior): Handle Windows CE.
12909 Use strwinerror instead of strerror on Windows error
12910 codes. Add program to the error output.
12911 Don't close the main thread handle on Windows CE.
12912 (win32_attach): Use coredll.dll on Windows CE.
12913 (win32_kill): Close current process and current
12914 thread handles.
12915 (win32_detach): Use coredll.dll on Windows CE.
12916 (win32_resume): Let low target handle debug registers, and
12917 step request.
12918 (handle_exception): Add/Remove initial breakpoint. Avoid
12919 non-existant WSTOPSIG on Windows CE.
12920 (win32_read_inferior_memory): Cast to remove warning.
12921 (win32_arch_string): Go through the low target.
12922 (initialize_low): Call set_breakpoint_data with the low
12923 target's breakpoint.
12924 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12925 FOP_REGNUM, mappings): Move to ...
12926 * win32-i386-low.c: ... here.
12927 * win32-low.c (win32_thread_info): Move to ...
12928 * win32-low.h: ... here.
12929 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12930 win32-arm-low.c and wincecompat.c.
12931 (all:): Add $EXEEXT.
12932 (install-only:): Likewise.
12933 (gdbserver:): Likewise.
12934 (gdbreplay:): Likewise.
12935 * config.in: Regenerate.
12936 * configure: Regenerate.
12937
41093d81
PA
129382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12939
12940 * win32-low.c: Rename typedef thread_info to
12941 win32_thread_info throughout.
12942
544afa54
PA
129432007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12944
12945 * win32-i386-low.c: Rename to ...
12946 * win32-low.c: ... this.
12947 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12948 * Makefile.in: Likewise.
12949
bce7165d
PA
129502007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12951
12952 * remote-utils.c (monitor_output): Constify msg parameter.
12953 * server.h (monitor_output): Likewise.
12954 * win32-i386-low.c (handle_output_debug_string): New.
12955 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12956 handle_output_debug_string.
12957 (get_child_debug_event): Likewise.
12958
506c7aa0
DJ
129592007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12960
12961 * server.c (main): Correct strtoul check.
12962
42c81e2a
DJ
129632007-03-27 Jon Ringle <jon@ringle.org>
12964
12965 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12966
9453113a
DJ
129672007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12968
12969 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12970
64a69107
DJ
129712007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12972
12973 * terminal.h: Check HAVE_SGTTY_H.
12974
129752007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12976
12977 * remote-utils.c (remote_open): Print out the assigned port number.
12978
c74d0ad8
DJ
129792007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * remote-utils.c (monitor_output): New function.
12982 * server.c (debug_threads): Define here.
12983 (monitor_show_help): New function.
12984 (handle_query): Handle qRcmd.
12985 (main): Do not handle 'd' packet.
12986 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12987 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12988 of debug_threads.
12989
de7c3b4a
PA
129902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12991
12992 * Makefile.in (EXEEXT): New.
12993 (clean): Use $(EXEEXT).
12994
ef57601b
PA
129952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12996
12997 * target.h (target_ops): Rename send_signal to request_interrupt,
12998 and remove enum target_signal parameter.
12999 * linux-low.c (linux_request_interrupt): Rename from
13000 linux_send_signal, and always send SIGINT.
13001 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13002 and always send SIGINT.
13003 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13004 of send_signal.
13005 (input_interrupt): Likewise.
13006
820f2bda
PA
130072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13008
13009 * server.c (get_features_xml): Check if target implemented
13010 arch_string.
13011 * win32-i386-low.c (win32_arch_string): New.
13012 (win32_target_ops): Add win32_arch_string as arch_string member.
13013
ab39bf24
UW
130142007-02-22 Markus Deuling <deuling@de.ibm.com>
13015
13016 * spu-low.c (spu_arch_string): New.
13017 (spu_target_ops): Add spu_arch_string.
13018
61ff6e04
DJ
130192007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13020
13021 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13022 * configure.ac: Do not check for terminal.h.
13023 * configure, config.in: Regenerated.
13024
fb1e4ffc
DJ
130252007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13026
13027 * Makefile.in (OBS): Add $(XML_BUILTIN).
13028 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13029 (clean): Update.
13030 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13031 (arm-with-iwmmxt.c): New.
13032 * config.in, configure: Regenerate.
13033 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13034 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13035 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13036 (arm*-*-linux*): Add iWMMXt and regset support.
13037 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13038 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13039 (arm_store_wmmxregset, target_regsets): New.
13040 * server.c (get_features_xml): Take annex argument. Check builtin
13041 XML documents.
13042 (handle_query): Handle multiple annexes.
13043
0f48aa01
DJ
130442007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13045
13046 * remote-utils.c [USE_WIN32API] (read, write): Define.
13047 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13048 write.
13049
23181151
DJ
130502007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13051
13052 * linux-i386-low.c (the_low_target): Set arch_string.
13053 * linux-x86-64-low.c (the_low_target): Likewise.
13054 * linux-low.c (linux_arch_string): New.
13055 (linux_target_ops): Add it.
13056 * linux-low.h (struct linux_target_ops): Add arch_string.
13057 * server.c (write_qxfer_response): Use const void * for DATA.
13058 (get_features_xml): New.
13059 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13060 * target.h (struct target_ops): Add arch_string method.
13061
9d606399
DJ
130622007-01-03 Denis Pilat <denis.pilat@st.com>
13063 Daniel Jacobowitz <dan@codesourcery.com>
13064
13065 * linux-low.c (linux_kill): Handle being called with no threads.
13066 * win32-i386-low.c (win32_kill): Likewise.
13067 (get_child_debug_event): Clear current_process_handle.
13068
130692006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13070 Daniel Jacobowitz <dan@codesourcery.com>
13071
13072 * remote-utils.c (remote_open): Check the type of specified
13073 serial port devices before opening them.
13074 * server.c (main): Kill the inferior if an error occurs during
13075 the first remote_open.
13076
a5e13d24
DJ
130772006-12-05 Markus Deuling <deuling@de.ibm.com>
13078
13079 * README: Update supported targets.
13080
186947f7
DJ
130812006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13082
13083 * Makefile.in (clean): Remove reg-mips64.c.
13084 (reg-mips64.c, reg-mips64.o): New rules.
13085 * configure.srv: Handle mips64. Include regset support for mips.
13086 * linux-mips-low.c (union mips_register): New.
13087 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13088 (mips_breakpoint, mips_breakpoint_at): Use int.
13089 (mips_collect_register, mips_supply_register)
13090 (mips_collect_register_32bit, mips_supply_register_32bit)
13091 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13092 (mips_store_fpregset, target_regsets): New.
13093 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13094
a13e2c95
UW
130952006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13096
13097 * configure.srv: Add target "spu*-*-*".
13098 * Makefile.in (clean): Remove reg-spu.c.
13099 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13100 * spu-low.c: New file.
13101
cb7283db
DJ
131022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13103
13104 * configure.ac: Correct td_thr_tls_get_addr test.
13105 * configure: Regenerated.
13106
89be2091
DJ
131072006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13108
13109 * linux-low.c (linux_wait_for_event): Reformat. Use the
13110 pass_signals array.
13111 * remote-utils.c (decode_address_to_semicolon): New.
13112 * server.c (pass_signals, handle_general_set): New.
13113 (handle_query): Mention QPassSignals for qSupported.
13114 (main): Call handle_general_set.
13115 * server.h (pass_signals, decode_address_to_semicolon): New.
13116
000ef4f0
DJ
131172006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13118
13119 * server.c (handle_query): Correct error handling for read_auxv.
13120
b7149293
UW
131212005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13122
13123 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13124 and srv_linux_thread_db to yes.
13125 * linux-s390-low.c (s390_fill_gregset): New function.
13126 (target_regsets): Define data structure.
13127
dae5f5cf
DJ
131282006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13131 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13132 * config.in, configure: Regenerated.
13133 * inferiors.c (gdb_id_to_thread): New function.
13134 (gdb_id_to_thread_id): Use it.
13135 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13136 * linux-low.h (struct process_info): Add th member.
13137 (thread_db_get_tls_address): New prototype.
13138 * remote-utils.c (decode_address): Make non-static.
13139 * server.c (handle_query): Handle qGetTLSAddr.
13140 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13141 * target.h (struct target_ops): Add get_tls_address.
13142 * thread-db.c (maybe_attach_thread): Save the thread handle.
13143 (thread_db_get_tls_address): New.
13144
32ca6d61
DJ
131452006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13146
13147 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13148 (linux_resume_one_process): Take a siginfo_t *. Update all
13149 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13150 (struct pending_signals): Add a siginfo_t.
13151 (linux_wait_for_process): Always set last_status.
13152 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13153 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13154 * linux-low.h (struct process_info): Add last_status.
13155
5ffff7c1
DJ
131562006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13157
13158 * remote-utils.c (try_rle): New function.
13159 (putpkt_binary): Use it.
13160
8695c747
DJ
131612006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13162
13163 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13164 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13165 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13166 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13167 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13168 point registers.
13169
290fadea
RS
131702006-08-08 Richard Sandiford <richard@codesourcery.com>
13171
13172 * server.c (terminal_fd): New variable.
13173 (old_foreground_pgrp): Likewise.
13174 (restore_old_foreground_pgrp): New function.
13175 (start_inferior): Record the terminal file descriptor in terminal_fd
13176 and its original foreground group in old_foreground_pgrp. Register
13177 restore_old_foreground_pgrp with atexit().
13178
9f2e1e63
DJ
131792006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13180
13181 * server.c (handle_query): Correct qPart to qXfer.
13182
b80864fb
DJ
131832006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13184
13185 * configure.ac: Check for more headers which are missing on
13186 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13187 * configure.srv: Add Cygwin and mingw32.
13188 * remote-utils.c: Don't include headers unconditionally which
13189 are missing on mingw32. Include <winsock.h> for mingw32.
13190 (remote_open): Adjust for mingw32 support. Flush
13191 standard error after writing to it.
13192 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13193 (unblock_async_io, enable_async_io, disable_async_io)
13194 (readchar, getpkt): Update for Winsock support.
13195 (prepare_resume_reply): Expect a protocol signal number.
13196 * server.c: Disable <sys/wait.h> on mingw32.
13197 (start_inferior): Adjust for mingw32 support. Flush
13198 standard error after writing to it.
13199 (attach_inferior): Likewise. Use protocol signal
13200 numbers.
13201 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13202 and names.
13203 * win32-i386-low.c: New file.
13204 * Makefile.in (XM_CLIBS): Set.
13205 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13206 (win32-i386-low.o): New dependency rule.
13207 * linux-low.c (linux_wait): Use target signal numbers.
13208 * target.h (struct target_ops): Doc fix.
13209 * server.h (target_signal_to_name): New prototype.
13210 * gdbreplay.c: Don't include headers unconditionally which
13211 are missing on mingw32. Include <winsock.h> for mingw32.
13212 (remote_close, remote_open): Adjust for Winsock support.
13213 * configure, config.in: Regenerated.
13214
0876f84a
DJ
132152006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13216
13217 * server.c (decode_xfer_read, write_qxfer_response): New.
13218 (handle_query): Take a packet length argument. Handle
13219 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13220 the qSupported response.
13221 (main): Update call to handle_query.
13222
01f9e8fa
DJ
132232006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13224
13225 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13226 (putpkt_binary): Renamed from putpkt and adjusted for binary
13227 data.
13228 (putpkt): New wrapper for putpkt_binary.
13229 (readchar): Don't mask off the high bit.
13230 (decode_X_packet): New function.
13231 * server.c (main): Call putpkt_binary if a handler sets the packet
13232 length. Save the length of the incoming packet. Handle 'X'.
13233 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13234
be2a5f71
DJ
132352006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * server.c (handle_query): Handle qSupported.
13238
ea025f5f
DJ
132392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13240
13241 * remote-utils.c (all_symbols_looked_up): New variable.
13242 (look_up_one_symbol): Check it.
13243 * server.h (look_up_one_symbol): New declaration.
13244 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13245
9308fc88
DJ
132462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13247
13248 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13249 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13250 (PTRACE_GET_THREAD_AREA): Define.
13251 (ps_get_thread_area): New function.
13252
52fb6437
NS
132532006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13254
13255 * configure.srv (m68k*-*-uclinux*): New target.
13256 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13257 (linux_resume_one_process): Remove extraneous cast.
13258 (linux_read_offsets): New.
13259 (linux_target_op): Add linux_read_offsets on mmuless systems.
13260 * server.c (handle_query): Add qOffsets logic.
13261 * target.h (struct target_ops): Add read_offsets.
13262
21b0f40c
DJ
132632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13266 (PTRACE_GET_THREAD_AREA): Define.
13267 (ps_get_thread_area): New function.
13268 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13269 (linux-x86-64-low.o): Update.
13270
0050a760
DJ
132712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13272
13273 * configure.ac: Remove checks for prfpregset_t.
13274 * gdb_proc_service.h: New file.
13275 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13276 new "gdb_proc_service.h".
13277 * proc-service.c: Likewise.
13278 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13279 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13280 * Makefile.in (gdb_proc_service_h): Updated.
13281 * configure, config.in: Regenerated.
13282
b92a518e
DJ
132832006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * remote-utils.c (prepare_resume_reply): Move declaration
13286 of gdb_id_from_wait to the top of the block.
13287
545587ee
DJ
132882006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * linux-low.c (regsets_store_inferior_registers): Read the regset
13291 from the target before filling it.
13292
9db87ebd
DJ
132932006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13294
13295 * server.c (attach_inferior): Return SIGTRAP for a successful
13296 attach.
13297
dd24457d
DJ
132982006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13299
13300 * Makefile.in (OBS): Add version.o.
13301 (STAGESTUFF): Delete.
13302 (version.o): Add dependencies.
13303 (version.c): Replace rule.
13304 (clean): Remove version.c.
13305 * server.c (gdbserver_version): New.
13306 (gdbserver_usage): Use printf.
13307 (main): Handle --version and --help.
13308 * server.h (version, host_name): Add declarations.
13309
6f0f660e
EZ
133102005-12-23 Eli Zaretskii <eliz@gnu.org>
13311
889bf7c5
PA
13312 * linux-arm-low.c:
13313 * linux-arm-low.c:
13314 * inferiors.c:
13315 * i387-fp.h:
13316 * i387-fp.c:
13317 * gdbreplay.c:
13318 * regcache.c:
13319 * proc-service.c:
13320 * mem-break.h:
13321 * mem-break.c:
13322 * linux-x86-64-low.c:
13323 * linux-sh-low.c:
13324 * linux-s390-low.c:
13325 * linux-ppc64-low.c:
13326 * linux-ppc-low.c:
13327 * linux-mips-low.c:
13328 * linux-m68k-low.c:
13329 * linux-m32r-low.c:
13330 * linux-low.h:
13331 * linux-low.c:
13332 * linux-ia64-low.c:
13333 * linux-i386-low.c:
13334 * linux-crisv32-low.c:
13335 * thread-db.c:
13336 * terminal.h:
13337 * target.h:
13338 * target.c:
13339 * server.h:
13340 * server.c:
13341 * remote-utils.c:
13342 * regcache.h:
13343 * utils.c:
13344 * Makefile.in:
13345 * configure.ac:
6f0f660e
EZ
13346 * gdbserver.1: Add (C) after Copyright. Update the FSF
13347 address.
13348
9d1fb177
DJ
133492005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13350
13351 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13352 (arm_breakpoint_at): Recognize both breakpoints.
13353 (the_low_target): Use the correct breakpoint instruction.
13354
011a70c2
DJ
133552005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13358 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13359 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13360 (the_low_target): Update.
13361
7fb85e41
AS
133622005-10-25 Andreas Schwab <schwab@suse.de>
13363
13364 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13365
13366 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13367 (ia64_num_regs): Reduce to 462.
13368
3db0444b
DJ
133692005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13370
13371 * acinclude.m4: Correct quoting.
13372 * aclocal.m4: Regenerated.
13373
13374 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13375 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13376 (thread_db_init): Call thread_db_err_str.
13377 * configure.ac: Check for TD_VERSION.
13378 * config.in, configure: Regenerated.
13379
bee0189a
DJ
133802005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13381
13382 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13383
e9d25b98
DJ
133842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13387 is not available. Define HAVE_PTRACE_GETREGS if it is.
13388 * config.in, configure: Regenerated.
13389 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13390 * linux-i386-low.c, linux-m68k-low.c: Update to use
13391 HAVE_PTRACE_GETREGS.
13392 * linux-low.c (regsets_fetch_inferior_registers)
13393 (regsets_store_inferior_registers): Only return 0 if we processed
13394 GENERAL_REGS.
13395 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13396 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13397
a06660f7
DJ
133982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * inferiors.c (struct thread_info): Add gdb_id.
13401 (add_thread): Add gdb_id argument.
13402 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13403 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13404 calls to add_thread.
13405 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13406 * server.c (handle_query): Use thread_to_gdb_id.
13407 (handle_v_cont, main): Use gdb_id_to_thread_id.
13408 * server.h (add_thread): Update prototype.
13409 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13410 prototypes.
13411
5a1f5858
DJ
134122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13413
13414 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13415 left-padded registers.
13416 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13417 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13418
e122f1f5
SE
134192005-07-01 Steve Ellcey <sje@cup.hp.com>
13420
13421 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13422 * configure: Regenerate.
13423 * config.in: Regenerate.
13424 * server.h (NEED_DECLARATION_STRERROR):
13425 Replace with !HAVE_DECL_STRERROR.
13426
d592fa2f
DJ
134272005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13428
13429 * linux-low.c (linux_wait, linux_send_signal): Don't test
13430 an unsigned long variable for > 0 if it could be MAX_ULONG.
13431 * server.c (myresume): Likewise.
13432 * target.c (set_desired_inferior): Likewise.
13433
ccbd4912
MK
134342005-06-13 Mark Kettenis <kettenis@gnu.org>
13435
13436 * configure.ac: Simplify and improve check for socklen_t.
13437 * configure, config.in: Regenerate.
13438
f450004a
DJ
134392005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13440
13441 * acconfig.h: Remove.
13442 * configure.ac: Add a test for socklen_t. Use three-argument
13443 AC_DEFINE throughout.
13444 * config.in: Regenerated using autoheader 2.59.
13445 * configure: Regenerated.
13446
13447 * gdbreplay.c (socklen_t): Provide a default.
13448 (remote_open): Use socklen_t.
13449 * remote-utils.c (socklen_t): Provide a default.
13450 (remote_open): Use socklen_t.
13451 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13452 unsigned char.
13453
13454 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13455 char for buffers.
13456 * linux-low.c (linux_read_memory, linux_write_memory)
13457 (linux_read_auxv): Likewise.
13458 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13459 (check_mem_write): Likewise.
13460 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13461 Likewise.
13462 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13463 (registers_from_string, register_data): Likewise.
13464 * server.c (handle_query, main): Likewise.
13465 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13466 (decode_M_packet): Likewise.
13467 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13468 * target.h (struct target_ops): Update read_memory, write_memory,
13469 and read_auxv.
13470 (read_inferior_memory, write_inferior_memory): Update.
13471 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13472 to unsigned char *.
13473 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13474 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13475 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13476 linux-s390-low.c, linux-sh-low.c: Update for changes in
13477 read_inferior_memory and the_low_target->breakpoint.
13478
eee84df1
DJ
134792005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13480
13481 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13482 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13483 * configure.srv: Add powerpc64-*-linux*.
13484 * linux-ppc64-low.c: New file.
13485
45b134e5
OF
134862005-05-23 Orjan Friberg <orjanf@axis.com>
13487
13488 * linux-cris-low.c: New file with support for CRIS.
13489 * linux-crisv32-low.c: Ditto for CRISv32.
13490 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13491 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13492 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13493 reg-crisv32.o, and reg-crisv32.c to make rules.
13494 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13495 recognized targets.
13496
48d93c75
UW
134972005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13498
13499 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13500 of sizeof (PTRACE_XFER_TYPE).
13501 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13502
e013ee27
OF
135032005-05-12 Orjan Friberg <orjanf@axis.com>
13504
889bf7c5 13505 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13506 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13507 pointers for hardware watchpoint support.
13508 * linux-low.h (struct linux_target_ops): Ditto.
13509 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13510 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13511 to linux_target_ops.
13512 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13513 reply packet.
13514 * server.c (main): Recognize 'Z' and 'z' packets.
13515
b0ded00b
UW
135162005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13517
13518 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13519 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13520 (the_low_target): Add new members.
13521
8643e2ad
DJ
135222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13523
13524 * proc-service.c (ps_lgetregs): Search all_processes instead of
13525 all_threads.
13526
fc620387
DJ
135272005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13528
13529 * server.c (start_inferior): Change return type to int.
13530 (attach_inferior): Change sigptr to int *.
13531 (handle_v_cont, handle_v_requests): Change signal to int *.
13532 (main): Change signal to int.
13533
135342005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13535
13536 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13537 * configure.srv: Add m32r*-*-linux*.
13538 * linux-m32r-low.c: New file.
13539
e0e76420
DJ
135402005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13543
a1928bad
DJ
135442005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13545
13546 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13547 Take unsigned long arguments for PIDs.
13548 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13549 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13550 (wait_for_sigstop, linux_resume_one_process)
13551 (regsets_fetch_inferior_registers, linux_send_signal)
13552 (linux_read_auxv): Likewise. Update the types of variables holding
13553 PIDs. Update format string specifiers.
13554 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13555 * remote-utils.c (prepare_resume_reply): Likewise.
13556 * server.c (cont_thread, general_thread, step_thread)
13557 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13558 unsigned long.
13559 (handle_query): Update format specifiers.
13560 (handle_v_cont, main): Use strtoul for thread IDs.
13561 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13562 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13563 (general_thread, step_thread, thread_from_wait)
13564 (old_thread_from_wait): Update.
13565 * target.h (struct thread_resume): Use unsigned long for THREAD.
13566 (struct target_ops): Use unsigned long for arguments to attach and
13567 thread_alive.
13568
dcdb98d2
DJ
135692005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * acinclude.m4: Include bfd/bfd.m4 directly.
13572 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13573 <agriffis@toolchain.org>.
13574 * aclocal.m4, configure: Regenerated.
13575
bec39cab
AC
135762005-01-07 Andrew Cagney <cagney@gnu.org>
13577
13578 * configure.ac: Rename configure.in, require autoconf 2.59.
13579 * configure: Re-generate.
13580
434c4c77
DJ
135812004-12-08 Daniel Jacobowitz <dan@debian.org>
13582
13583 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13584 LIBS when finished.
13585 * aclocal.m4: Regenerated.
13586 * configure: Regenerated.
13587
db1d3e1b
AS
135882004-11-21 Andreas Schwab <schwab@suse.de>
13589
13590 * linux-m68k-low.c (m68k_num_gregs): Define.
13591 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13592 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13593 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13594 (m68k_breakpoint_at): New. Add to the_low_target.
13595
13596 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13597 srv_linux_thread_db to yes.
13598
43360365
JB
135992004-10-20 Joel Brobecker <brobecker@gnat.com>
13600
13601 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13602 (ARCH_SET_FS): Likewise.
13603 (ARCH_GET_FS): Likewise.
13604 (ARCH_GET_GS): Likewise.
13605
fd500816
DJ
136062004-10-16 Daniel Jacobowitz <dan@debian.org>
13607
13608 * linux-i386-low.c (ps_get_thread_area): New.
13609 * linux-x86-64-low.c (ps_get_thread_area): New.
13610 * linux-low.c: Include <sys/syscall.h>.
13611 (linux_kill_one_process): Don't kill the first thread here.
13612 (linux_kill): Kill the first thread here.
13613 (kill_lwp): New function.
13614 (send_sigstop, linux_send_signal): Use it.
13615 * proc-service.c: Clean up #ifdefs.
13616 (fpregset_info): Delete.
13617 (ps_lgetregs): Update and enable implementation.
13618 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13619 implementations.
13620 * remote-utils.c (struct sym_cache, symbol_cache): New.
13621 (input_interrupt): Print a clearer message.
13622 (async_io_enabled): New variable.
13623 (enable_async_io, disable_async_io): Use it. Update comments.
13624 (look_up_one_symbol): Use the symbol cache.
13625 * thread-db.c (thread_db_look_up_symbols): New function.
13626 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13627
f6de3c42
DJ
136282004-10-16 Daniel Jacobowitz <dan@debian.org>
13629
13630 * configure.in: Test for -rdynamic.
13631 * configure: Regenerated.
13632 * Makefile (INTERNAL_LDFLAGS): New.
13633 (gdbserver, gdbreplay): Use it.
13634
2c0fc042
AC
136352004-09-02 Andrew Cagney <cagney@gnu.org>
13636
13637 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13638
075b3282
DJ
136392004-03-23 Daniel Jacobowitz <drow@mvista.com>
13640
13641 * linux-low.c (linux_wait): Clear all_processes list also.
13642
fa6a77dc
DJ
136432004-03-12 Daniel Jacobowitz <drow@mvista.com>
13644
13645 * linux-low.c: Include <errno.h>. Remove extern declaration of
13646 errno.
13647
6d782a97
DJ
136482004-03-12 Daniel Jacobowitz <drow@mvista.com>
13649
13650 * gdbreplay.c, server.h, utils.c: Update copyright years.
13651
3a7fb99b
DJ
136522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13653
13654 * server.c (main): Print child status or termination signal from
13655 variable 'signal', not 'sig'.
13656
c3e735a6
DJ
136572004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13658
13659 * linux-low.c (linux_read_memory): Change return type to
13660 int. Check for and return error from ptrace().
13661 * target.c (read_inferior_memory): Change return type to int. Pass
13662 back return status from the_target->read_memory().
13663 * target.h (struct target_ops): Adapt *read_memory() prototype.
13664 Update comment.
13665 (read_inferior_memory): Adapt prototype.
13666 * server.c (main): Return an error packet if
13667 read_inferior_memory() returns an error.
13668
a59d1c82
DJ
136692004-03-04 Daniel Jacobowitz <drow@mvista.com>
13670
13671 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13672 Unify with other clean targets.
13673
dc3f8883
DJ
136742004-02-29 Daniel Jacobowitz <drow@mvista.com>
13675
13676 * server.c (handle_v_cont): Call set_desired_inferior.
13677
89a208da
DJ
136782004-02-29 Daniel Jacobowitz <drow@mvista.com>
13679
13680 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13681
62ea82f5
DJ
136822004-02-29 Daniel Jacobowitz <drow@mvista.com>
13683
13684 * linux-low.c (linux_wait): Unblock async I/O.
13685 (linux_resume): Block and enable async I/O.
13686 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13687 * server.h (block_async_io, unblock_async_io): Add prototypes.
13688
6910d122
DJ
136892004-02-29 Daniel Jacobowitz <drow@mvista.com>
13690
13691 * remote-utils.c (remote_open): Print a status notice after
13692 opening a TCP port.
13693 * server.c (attach_inferior): Print a status notice after
13694 attaching.
13695
136962004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13697
13698 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13699
c89dc5d4
DJ
137002004-02-26 Daniel Jacobowitz <drow@mvista.com>
13701
13702 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13703 error packet.
13704 * server.c, target.h: Update copyright years.
13705
4b8dad4a
RM
137062004-02-25 Roland McGrath <roland@redhat.com>
13707
13708 * target.h (struct target_ops): New member `read_auxv'.
13709 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13710 * linux-low.c (linux_read_auxv): New function.
13711 (linux_target_ops): Initialize `read_auxv' member to that.
13712
d7446758
JB
137132004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13714
13715 Committed by Jim Blandy <jimb@redhat.com>.
13716
13717 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13718 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13719 instead of GPR_SIZE to distiguish s390 and s390x targets.
13720
5544ad89
DJ
137212004-01-31 Daniel Jacobowitz <drow@mvista.com>
13722
13723 * linux-low.c: Update copyright year.
13724 (check_removed_breakpoint): Clear pending_is_breakpoint.
13725 (linux_set_resume_request, linux_queue_one_thread)
13726 (resume_status_pending_p): New functions.
13727 (linux_continue_one_thread): Use process->resume.
13728 (linux_resume): Only resume threads if there are no pending events.
13729 * linux-low.h (struct process_info): Add resume request
13730 pointer.
13731
2a68b70e
DJ
137322004-01-30 Daniel Jacobowitz <drow@mvista.com>
13733
13734 * regcache.c (new_register_cache): Clear the allocated register
13735 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13736
64386c31
DJ
137372003-10-13 Daniel Jacobowitz <drow@mvista.com>
13738
13739 * linux-low.c (linux_resume): Take a struct thread_resume *
13740 argument.
13741 (linux_wait): Update call.
13742 (resume_ptr): New static variable.
13743 (linux_continue_one_thread): Renamed from
13744 linux_continue_one_process. Use resume_ptr.
13745 (linux_resume): Use linux_continue_one_thread.
13746 * server.c (handle_v_cont, handle_v_requests): New functions.
13747 (myresume): New function.
13748 (main): Handle 'v' case.
13749 * target.h (struct thread_resume): New type.
13750 (struct target_ops): Change argument of "resume" to struct
13751 thread_resume *.
13752 (myresume): Delete macro.
13753
c938e9b0
L
137542003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13755
13756 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13757 (uninstall): Support DESTDIR.
13758
7f313d07
BC
13759Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13760
13761 * configure.srv: Add xscale*linux copy of arm*linux entry.
13762
3b2fc2ea
DJ
137632003-07-24 Daniel Jacobowitz <drow@mvista.com>
13764
13765 * linux-arm-low.c (arm_reinsert_addr): New function.
13766 (the_low_target): Add arm_reinsert_addr.
13767
1c0a559e
MK
137682003-07-08 Mark Kettenis <kettenis@gnu.org>
13769
13770 * mem-break.c: Remove whitespace at end of file.
13771
43d5792c
DJ
137722003-06-28 Daniel Jacobowitz <drow@mvista.com>
13773
13774 * configure.in: Check whether we need to prototype strerror.
13775 * server.h: Optionally prototype strerror.
13776 * gdbreplay.c (perror_with_name): Use strerror.
13777 * linux-low.c (linux_attach_lwp): Use strerror.
13778 * utils.c (perror_with_name): Use strerror.
13779 * config.in, configure: Regenerated.
13780
c8a86edf
DJ
137812003-06-28 Daniel Jacobowitz <drow@mvista.com>
13782
13783 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13784 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13785
73d37363
DJ
137862003-06-20 Daniel Jacobowitz <drow@mvista.com>
13787
13788 * Makefile.in (SFILES): Update.
13789 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13790 low-sun3.c: Remove files.
13791
6ad8ae5c
DJ
137922003-06-17 Daniel Jacobowitz <drow@mvista.com>
13793
13794 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13795 (linux_detach_one_process, linux_detach): New functions.
13796 (linux_target_ops): Add linux_detach.
13797 * server.c (main): Handle 'D' packet.
13798 * target.h (struct target_ops): Add "detach" member.
13799 (detach_inferior): Define.
13800
1581182a
MK
138012003-06-13 Mark Kettenis <kettenis@gnu.org>
13802
13803 From Kelley Cook <kelleycook@wideopenwest.com>:
13804 * configure.srv: Accept i[34567]86 variants.
13805
e5379b03
DJ
138062003-06-05 Daniel Jacobowitz <drow@mvista.com>
13807
13808 * linux-low.c (linux_wait_for_event): Correct comment typos.
13809 (linux_resume_one_process): Call check_removed_breakpoint.
13810 (linux_send_signal): New function.
13811 (linux_target_ops): Add linux_send_signal.
13812 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13813 of kill.
13814 * target.h (struct target_ops): Add send_signal.
13815
2ff29de4
JB
138162003-05-29 Jim Blandy <jimb@redhat.com>
13817
13818 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13819 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13820 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13821 away part of the register's value.
13822
254787d4
DJ
138232003-03-26 Daniel Jacobowitz <drow@mvista.com>
13824
13825 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13826 (linux_wait_for_event, linux_init_signals): Likewise.
13827
94e10508
DJ
138282003-03-17 Daniel Jacobowitz <drow@mvista.com>
13829
13830 * configure.in: Check for stdlib.h.
13831 * configure: Regenerated.
13832 * config.in: Regenerated.
13833
4c0711e0
DJ
138342003-01-04 Andreas Schwab <schwab@suse.de>
13835
13836 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13837
ef66e766
AC
138382003-01-02 Andrew Cagney <ac131313@redhat.com>
13839
13840 * Makefile.in: Remove obsolete code.
13841
a1358604
DJ
138422002-11-20 Daniel Jacobowitz <drow@mvista.com>
13843
13844 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13845 defined(PT_FPR0_HI).
13846
23ce3b1c
DJ
138472002-11-17 Stuart Hughes <seh@zee2.com>
13848
13849 * linux-arm-low.c (arm_num_regs): Increase.
13850 (arm_regmap): Include status register.
13851
138522002-11-17 Daniel Jacobowitz <drow@mvista.com>
13853
13854 * linux-low.c (register_addr): Remove incorrect -1 check.
13855
a9fa9f7d
DJ
138562002-08-29 Daniel Jacobowitz <drow@mvista.com>
13857
13858 * linux-low.c (linux_create_inferior): Call setpgid. Return
13859 the new PID.
13860 (unstopped_p, linux_signal_pid): Remove.
13861 (linux_target_ops): Remove linux_signal_pid.
13862 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13863 global instead of target method.
13864 * target.h (struct target_ops): Remove signal_pid. Update comment
13865 for create_inferior.
13866 * server.c (signal_pid): New variable.
13867 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13868 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13869 (attach_inferior): Set signal_pid.
13870
17574093
DJ
138712002-08-23 Daniel Jacobowitz <drow@mvista.com>
13872
13873 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13874
138752002-08-20 Jim Blandy <jimb@redhat.com>
13876
13877 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13878 default for this.
13879
138802002-08-01 Andrew Cagney <cagney@redhat.com>
13881
13882 * Makefile.in: Make chill references obsolete.
13883
138842002-07-24 Kevin Buettner <kevinb@redhat.com>
13885
13886 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13887 * configure: Regenerate.
13888 * config.in: Regenerate.
13889
138902002-07-09 David O'Brien <obrien@FreeBSD.org>
13891
13892 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13893 (perror_with_name, remote_close, remote_open, expect, play): Static.
13894
138952002-07-04 Michal Ludvig <mludvig@suse.cz>
13896
4b8dad4a 13897 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13898 byte offsets instead of an array of indexes.
13899 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13900
139012002-06-13 Daniel Jacobowitz <drow@mvista.com>
13902
13903 * regcache.c: Add comment.
13904
139052002-06-11 Daniel Jacobowitz <drow@mvista.com>
13906
13907 * thread-db.c: New file.
13908 * proc-service.c: New file.
13909 * acinclude.m4: New file.
13910 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13911 proc-service.o, and thread-db.o.
13912 (linux-low.o): Add USE_THREAD_DB.
13913 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13914 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13915 * aclocal.m4: Regenerated.
13916 * config.in: Regenerated.
13917 * configure: Regenerated.
13918 * configure.in: Check for proc_service.h, sys/procfs.h,
13919 thread_db.h, and linux/elf.h headrs.
13920 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13921 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13922 Check for -lthread_db and thread support.
13923 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13924 PowerPC, and SuperH.
13925 * i387-fp.c: Constify arguments.
13926 * i387-fp.h: Likewise.
13927 * inferiors.c: (struct thread_info): Renamed from
13928 `struct inferior_info'. Remove PID member. Use generic inferior
13929 list header. All uses updated.
13930 (inferiors, signal_pid): Removed.
13931 (all_threads): New variable.
13932 (get_thread): Define.
13933 (add_inferior_to_list): New function.
13934 (for_each_inferior): New function.
13935 (change_inferior_id): New function.
13936 (add_inferior): Removed.
13937 (remove_inferior): New function.
13938 (add_thread): New function.
13939 (free_one_thread): New function.
13940 (remove_thread): New function.
13941 (clear_inferiors): Use for_each_inferior and free_one_thread.
13942 (find_inferior): New function.
13943 (find_inferior_id): New function.
13944 (inferior_target_data): Update argument type.
13945 (set_inferior_target_data): Likewise.
13946 (inferior_regcache_data): Likewise.
13947 (set_inferior_regcache_data): Likewise.
13948 * linux-low.c (linux_bp_reinsert): Remove.
13949 (all_processes, stopping_threads, using_thrads)
13950 (struct pending_signals, debug_threads, pid_of): New.
13951 (inferior_pid): Replace with macro.
13952 (struct inferior_linux_data): Remove.
13953 (get_stop_pc, add_process): New functions.
13954 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13955 Use add_process and add_thread.
13956 (linux_attach_lwp): New function, based on old linux_attach. Use
13957 add_process and add_thread. Set stop_expected for new threads.
13958 (linux_attach): New function.
13959 (linux_kill_one_process): New function.
13960 (linux_kill): Kill all LWPs.
13961 (linux_thread_alive): Use find_inferior_id.
13962 (check_removed_breakpoints, status_pending_p): New functions.
13963 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13964 Update. Use WNOHANG. Wait for cloned processes also. Update process
13965 struct for the found process.
13966 (linux_wait_for_event): New function.
13967 (linux_wait): Use it. Support LWPs.
13968 (send_sigstop, wait_for_sigstop, stop_all_processes)
13969 (linux_resume_one_process, linux_continue_one_process): New functions.
13970 (linux_resume): Support LWPs.
13971 (REGISTER_RAW_SIZE): Remove.
13972 (fetch_register): Use register_size instead. Call supply_register.
13973 (usr_store_inferior_registers): Likewise. Call collect_register.
13974 Fix recursive case.
13975 (regsets_fetch_inferior_registers): Improve error message.
13976 (regsets_store_inferior_registers): Add debugging.
13977 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13978 (unstopped_p, linux_signal_pid): New functions.
13979 (linux_target_ops): Add linux_signal_pid.
13980 (linux_init_signals): New function.
13981 (initialize_low): Call it. Initialize using_threads.
13982 * regcache.c (inferior_regcache_data): Add valid
13983 flag.
13984 (get_regcache): Fetch registers lazily. Add fetch argument
13985 and update all callers.
13986 (regcache_invalidate_one, regcache_invalidate): New
13987 functions.
13988 (new_register_cache): Renamed from create_register_cache.
13989 Return the new regcache.
13990 (free_register_cache): Change argument to a void *.
13991 (registers_to_string, registers_from_string): Call get_regcache
13992 with fetch flag set.
13993 (register_data): Make static. Pass fetch flag to get_regcache.
13994 (supply_register): Call get_regcache with fetch flag clear.
13995 (collect_register): Call get_regcache with fetch flag set.
13996 (collect_register_as_string): New function.
13997 * regcache.h: Update.
13998 * remote-utils.c (putpkt): Flush after debug output and use
13999 stderr.
14000 Handle input interrupts while waiting for an ACK.
14001 (input_interrupt): Use signal_pid method.
14002 (getpkt): Flush after debug output and use stderr.
14003 (outreg): Use collect_register_as_string.
14004 (new_thread_notify, dead_thread_notify): New functions.
14005 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14006 and general_thread.
14007 (look_up_one_symbol): Flush after debug output.
14008 * server.c (step_thread, server_waiting): New variables.
14009 (start_inferior): Don't use signal_pid. Update call to mywait.
14010 (attach_inferior): Update call to mywait.
14011 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14012 (main): Don't fetch/store registers explicitly. Use
14013 set_desired_inferior. Support proposed ``Hs'' packet. Update
14014 calls to mywait.
14015 * server.h: Update.
14016 (struct inferior_list, struct_inferior_list_entry): New.
14017 * target.c (set_desired_inferior): New.
14018 (write_inferior_memory): Constify.
14019 (mywait): New function.
14020 * target.h: Update.
14021 (struct target_ops): New signal_pid method.
14022 (mywait): Removed macro, added prototype.
14023
14024 * linux-low.h (regset_func): Removed.
14025 (regset_fill_func, regset_store_func): New.
14026 (enum regset_type): New.
14027 (struct regset_info): Add type field. Use new operation types.
14028 (struct linux_target_ops): stop_pc renamed to get_pc.
14029 Add decr_pc_after_break and breakpoint_at.
14030 (get_process, get_thread_proess, get_process_thread)
14031 (strut process_info, all_processes, linux_attach_lwp)
14032 (thread_db_init): New.
14033
14034 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14035 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14036 (the_low_target): Add new members.
14037 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14038 (i386_store_fpxregset): Constify.
14039 (target_regsets): Add new kind identifier.
14040 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14041 (i386_set_pc): Add debugging.
14042 (i386_breakpoint_at): New function.
14043 (the_low_target): Add new members.
14044 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14045 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14046 (mips_breakpoint_at): New.
14047 (the_low_target): Add new members.
14048 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14049 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14050 (the_low_target): Add new members.
14051 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14052 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14053 (the_low_target): Add new members.
14054 * linux-x86-64-low.c (target_regsets): Add new kind
14055 identifier.
14056
140572002-05-15 Daniel Jacobowitz <drow@mvista.com>
14058
14059 From Martin Pool <mbp@samba.org>:
14060 * server.c (gdbserver_usage): New function.
14061 (main): Call it.
14062
140632002-05-14 Daniel Jacobowitz <drow@mvista.com>
14064
14065 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14066 stop_at -> stop_pc.
14067
140682002-05-04 Andrew Cagney <ac131313@redhat.com>
14069
14070 * Makefile.in: Remove obsolete code.
14071
140722002-04-24 Michal Ludvig <mludvig@suse.cz>
14073
14074 * linux-low.c (regsets_fetch_inferior_registers),
14075 (regsets_store_inferior_registers): Removed cast to int from
14076 ptrace() calls.
14077 * regcache.h: Added declaration of struct inferior_info.
14078
140792002-04-20 Daniel Jacobowitz <drow@mvista.com>
14080
14081 * inferiors.c (struct inferior_info): Add regcache_data.
14082 (add_inferior): Call create_register_cache.
14083 (clear_inferiors): Call free_register_cache.
14084 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14085 * regcache.c (struct inferior_regcache_data): New.
14086 (registers): Remove.
14087 (get_regcache): New function.
14088 (create_register_cache, free_register_cache): New functions.
14089 (set_register_cache): Don't initialize the register cache here.
14090 (registers_to_string, registers_from_string, register_data): Call
14091 get_regcache.
14092 * regcache.h: Add prototypes.
14093 * server.h: Likewise.
14094
140952002-04-20 Daniel Jacobowitz <drow@mvista.com>
14096
14097 * mem-break.c: New file.
14098 * mem-break.h: New file.
14099 * Makefile.in: Add mem-break.o rule; update server.h
14100 dependencies.
14101 * inferiors.c (struct inferior_info): Add target_data
14102 member.
14103 (clear_inferiors): Free target_data member if set.
14104 (inferior_target_data, set_inferior_target_data): New functions.
14105 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14106 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14107 * linux-low.c (linux_bp_reinsert): New variable.
14108 (struct inferior_linux_data): New.
14109 (linux_create_inferior): Use set_inferior_target_data.
14110 (linux_attach): Likewise. Call add_inferior.
14111 (linux_wait_for_one_inferior): New function.
14112 (linux_wait): Call it.
14113 (linux_write_memory): Add const.
14114 (initialize_low): Call set_breakpoint_data.
14115 * linux-low.h (struct linux_target_ops): Add breakpoint
14116 handling members.
14117 * server.c (attach_inferior): Remove extra add_inferior
14118 call.
14119 * server.h: Include mem-break.h. Update inferior.c
14120 prototypes.
14121 * target.c (read_inferior_memory)
14122 (write_inferior_memory): New functions.
14123 * target.h (read_inferior_memory)
14124 (write_inferior_memory): Change macros to prototypes.
14125 (struct target_ops): Update comments. Add const to write_memory
14126 definition.
14127
141282002-04-11 Daniel Jacobowitz <drow@mvista.com>
14129
14130 * linux-low.c (usr_store_inferior_registers): Support
14131 registers which are allowed to fail to store.
14132 * linux-low.h (linux_target_ops): Likewise.
14133 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14134 (ppc_cannot_store_register): FPSCR may not be storable.
14135
141362002-04-09 Daniel Jacobowitz <drow@mvista.com>
14137
14138 * server.h: Include <string.h> if HAVE_STRING_H.
14139 * ChangeLog: Correct paths in last ChangeLog entry.
14140
141412002-04-09 Daniel Jacobowitz <drow@mvista.com>
14142
14143 * linux-low.h: Remove obsolete prototypes.
14144 (struct linux_target_ops): New.
14145 (extern the_low_target): New.
14146 * linux-low.c (num_regs, regmap): Remove declarations.
14147 (register_addr): Use the_low_target explicitly.
14148 (fetch_register): Likewise.
14149 (usr_fetch_inferior_registers): Likewise.
14150 (usr_store_inferior_registers): Likewise.
14151 * linux-arm-low.c (num_regs): Remove.
14152 (arm_num_regs): Define.
14153 (arm_regmap): Renamed from regmap, made static.
14154 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14155 made static.
14156 (arm_cannot_store_register): Renamed from cannot_store_register,
14157 made static.
14158 (the_low_target): New.
14159 * linux-i386-low.c (num_regs): Remove.
14160 (i386_num_regs): Define.
14161 (i386_regmap): Renamed from regmap, made static.
14162 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14163 made static.
14164 (i386_cannot_store_register): Renamed from cannot_store_register,
14165 made static.
14166 (the_low_target): New.
14167 * linux-ia64-low.c (num_regs): Remove.
14168 (ia64_num_regs): Define.
14169 (ia64_regmap): Renamed from regmap, made static.
14170 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14171 made static.
14172 (ia64_cannot_store_register): Renamed from cannot_store_register,
14173 made static.
14174 (the_low_target): New.
14175 * linux-m68k-low.c (num_regs): Remove.
14176 (m68k_num_regs): Define.
14177 (m68k_regmap): Renamed from regmap, made static.
14178 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14179 made static.
14180 (m68k_cannot_store_register): Renamed from cannot_store_register,
14181 made static.
14182 (the_low_target): New.
14183 * linux-mips-low.c (num_regs): Remove.
14184 (mips_num_regs): Define.
14185 (mips_regmap): Renamed from regmap, made static.
14186 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14187 made static.
14188 (mips_cannot_store_register): Renamed from cannot_store_register,
14189 made static.
14190 (the_low_target): New.
14191 * linux-ppc-low.c (num_regs): Remove.
14192 (ppc_num_regs): Define.
14193 (ppc_regmap): Renamed from regmap, made static.
14194 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14195 made static.
14196 (ppc_cannot_store_register): Renamed from cannot_store_register,
14197 made static.
14198 (the_low_target): New.
14199 * linux-s390-low.c (num_regs): Remove.
14200 (s390_num_regs): Define.
14201 (s390_regmap): Renamed from regmap, made static.
14202 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14203 made static.
14204 (s390_cannot_store_register): Renamed from cannot_store_register,
14205 made static.
14206 (the_low_target): New.
14207 * linux-sh-low.c (num_regs): Remove.
14208 (sh_num_regs): Define.
14209 (sh_regmap): Renamed from regmap, made static.
14210 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14211 made static.
14212 (sh_cannot_store_register): Renamed from cannot_store_register,
14213 made static.
14214 (the_low_target): New.
14215 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14216 (the_low_target): New.
14217
142182002-04-09 Daniel Jacobowitz <drow@mvista.com>
14219
14220 * Makefile.in: Add stamp-h target.
14221 * configure.in: Create stamp-h.
14222 * configure: Regenerated.
14223
142242002-04-09 Daniel Jacobowitz <drow@mvista.com>
14225
14226 * inferiors.c: New file.
14227 * target.c: New file.
14228 * target.h: New file.
14229 * Makefile.in: Add target.o and inferiors.o. Update
14230 dependencies.
14231 * linux-low.c (inferior_pid): New static variable,
14232 moved from server.c.
14233 (linux_create_inferior): Renamed from create_inferior.
14234 Call add_inferior. Return 0 on success instead of a PID.
14235 (linux_attach): Renamed from myattach.
14236 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14237 (linux_thread_alive): Renamed from mythread_alive.
14238 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14239 child dies.
14240 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14241 (regsets_store_inferior_registers): Correct error message.
14242 Add missing ``return 0''.
14243 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14244 (linux_store_registers): Renamed from store_inferior_registers.
14245 (linux_read_memory): Renamed from read_inferior_memory.
14246 (linux_write_memory): Renamed from write_inferior_memory.
14247 (linux_target_ops): New structure.
14248 (initialize_low): Call set_target_ops ().
14249 * remote-utils.c (unhexify): New function.
14250 (hexify): New function.
14251 (input_interrupt): Send signals to ``signal_pid''.
14252 * server.c (inferior_pid): Remove.
14253 (start_inferior): Update create_inferior call.
14254 (attach_inferior): Call add_inferior.
14255 (handle_query): New function.
14256 (main): Call handle_query for `q' packets.
14257 * server.h: Include "target.h". Remove obsolete prototypes.
14258 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14259
142602002-04-09 Daniel Jacobowitz <drow@mvista.com>
14261
14262 * Makefile.in: Add WARN_CFLAGS. Update configury
14263 dependencies.
14264 * configure.in: Check for <string.h>
14265 * configure: Regenerate.
14266 * config.in: Regenerate.
14267 * gdbreplay.c: Include needed system headers.
14268 (remote_open): Remove strchr prototype.
14269 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14270 * regcache.c (supply_register): Change buf argument to const void *.
14271 (supply_register_by_name): Likewise.
14272 (collect_register): Change buf argument to void *.
14273 (collect_register_by_name): Likewise.
14274 * regcache.h: Add missing prototypes.
14275 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14276 * server.c (handle_query): New function.
14277 (attached): New static variable, moved out of main.
14278 (main): Quiet longjmp clobber warnings.
14279 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14280 * utils.c (error): Remove NORETURN.
14281 (fatal): Likewise.