Implement get_syscall_trapinfo for aarch64-linux
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
061fc021
YQ
12016-06-28 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4 function.
5 (the_low_target): Install aarch64_get_syscall_trapinfo.
6
4cc32bec
YQ
72016-06-28 Yao Qi <yao.qi@linaro.org>
8
9 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
10 Callers updated.
11 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
12 Remove parameter sysno.
13 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
14 sysret.
15
782c1122
AA
162016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
17
18 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
19 (s390_emit_ne_goto): Likewise.
20 (s390_emit_lt_goto): Likewise.
21 (s390_emit_le_goto): Likewise.
22 (s390_emit_gt_goto): Likewise.
23 (s390_emit_ge_goto): Likewise.
24 (s390x_emit_eq_goto): Likewise.
25 (s390x_emit_ne_goto): Likewise.
26 (s390x_emit_lt_goto): Likewise.
27 (s390x_emit_le_goto): Likewise.
28 (s390x_emit_gt_goto): Likewise.
29 (s390x_emit_ge_goto): Likewise.
30 (s390_emit_ops_impl): Mark variable static.
31 (s390x_emit_ops): Likewise.
32
2e7b624b
YQ
332016-06-17 Yao Qi <yao.qi@linaro.org>
34
35 * linux-low.c (handle_extended_wait): Call
36 uninsert_reinsert_breakpoints for the parent process. Remove
37 reinsert breakpoints from the child process. Reinsert them to
38 the parent process when vfork is done.
39 * mem-break.c (uninsert_reinsert_breakpoints): New function.
40 (reinsert_reinsert_breakpoints): New function.
41 * mem-break.h (uninsert_reinsert_breakpoints): Declare
42 (reinsert_reinsert_breakpoints): Declare.
43
8a81c5d7
YQ
442016-06-17 Yao Qi <yao.qi@linaro.org>
45
46 * linux-low.c (handle_extended_wait): If the parent is doing
47 step-over, remove the reinsert breakpoints from the forked child.
48
f50bf8e5
YQ
492016-06-17 Yao Qi <yao.qi@linaro.org>
50
51 * linux-low.c (unsuspend_all_lwps): Declare.
52 (linux_low_filter_event): If thread exited, call finish_step_over.
53 If step-over is finished, unsuspend other threads.
54
8376a3cb
YQ
552016-06-17 Yao Qi <yao.qi@linaro.org>
56
57 * linux-low.c (linux_resume_one_lwp_throw): Assert
58 has_reinsert_breakpoints returns false.
59 * mem-break.c (delete_disabled_breakpoints): Assert
60 bp type isn't reinsert_breakpoint.
61
f79b145d
YQ
622016-06-17 Yao Qi <yao.qi@linaro.org>
63
64 * linux-low.c (maybe_hw_step): New function.
65 (linux_resume_one_lwp_throw): Call maybe_hw_step.
66 (finish_step_over): Switch current_thread to lwp temporarily,
67 and assert has_reinsert_breakpoints returns true.
68 (proceed_one_lwp): Call maybe_hw_step.
69 * mem-break.c (has_reinsert_breakpoints): New function.
70 * mem-break.h (has_reinsert_breakpoints): Declare.
71
0ae534d2
JT
722016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
73
74 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
75
fcdad592
YQ
762016-05-17 Yao Qi <yao.qi@linaro.org>
77
78 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
79 instead of find_inferior.
80
9e784964
YQ
812016-05-05 Yao Qi <yao.qi@linaro.org>
82
83 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
84 Initialize res to zero.
85
cf2ebb6e
YQ
862016-05-05 Yao Qi <yao.qi@linaro.org>
87
88 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
89 to uint32_t.
90
c1aebf87
UW
912016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
92
93 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
94 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
95 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
96
35fd2deb 972016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 98 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
99
100 * tracepoint.c (write_inferior_int8): New function.
101 (cmd_qtenable_disable): Write enable flag using
102 write_inferior_int8.
103
484b3c32
YQ
1042016-04-25 Yao Qi <yao.qi@linaro.org>
105
106 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
107 (need_step_over_p): Return zero if the LWP has pending signals
108 can be delivered on software single step target.
109
85ba7d86
YQ
1102016-04-25 Yao Qi <yao.qi@linaro.org>
111
112 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
113 return instead of error.
114
3539aa13
YQ
1152016-04-22 Yao Qi <yao.qi@linaro.org>
116
117 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
118 to 23.
119
5b061e98
YQ
1202016-04-22 Yao Qi <yao.qi@linaro.org>
121
122 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
123 signal when stepping over breakpoint with software single
124 step.
125
3451269c
PA
1262016-04-21 Pedro Alves <palves@redhat.com>
127
128 * linux-s390-low.c (s390_collect_ptrace_register)
129 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
130 add casts.
131 (s390_check_regset): Use void * instead of gdb_byte *.
132
a2358508
PA
1332016-04-20 Pedro Alves <palves@redhat.com>
134
135 * configure: Renegerate.
136
6885166d
YQ
1372016-04-20 Yao Qi <yao.qi@linaro.org>
138
139 * linux-aarch32-low.c: Include "arch/arm-linux.h".
140 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
141 number 16.
142 (arm_store_gregset): Likewise.
143
2b863f51
WT
1442016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
145
146 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
147 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
148 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
149 (amd64-avx-mpx-linux.c): New rules.
150 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
151 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
152 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
153 (srv_amd64_regobj): Add amd64-avx-mpx.o.
154 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
155 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
156 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
157 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
158 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
159 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
160 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
161 * linux-x86-low.c (x86_linux_read_description): Add case for
162 X86_XSTATE_AVX_MPX_MASK.
163 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
164 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
165 init_registers_i386_avx_mpx_linux.
166 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
167 (initialize_low_tracepoint): Call
168 init_registers_i386_avx_mpx_linux.
169 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
170 (initialize_low_tracepoint): Call
171 init_registers_amd64_avx_mpx_linux.
172 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
173 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
174 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
175 declarations.
176
9b30624b
PA
1772016-04-18 Pedro Alves <palves@redhat.com>
178
179 * configure: Regenerate.
180
45e3745e
AT
1812016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
182
183 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
184 (aarch64_emit_sub): Likewise.
185
2afc13ff
PA
1862016-04-12 Pedro Alves <palves@redhat.com>
187
188 * utils.c (prepare_to_throw_exception): Delete.
189
6e774b13
SM
1902016-04-05 Simon Marchi <simon.marchi@ericsson.com>
191
192 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
193
4dca19f8
MK
1942016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
195
196 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
197
d0a9981f
MK
1982016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
199
200 * linux-aarch64-ipa.c: Add <elf.h> include.
201 * linux-ppc-ipa.c: Add <elf.h> include.
202 * linux-s390-ipa.c: Add <elf.h> include.
203
252db07e
MK
2042016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
205
206 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
207 (get_raw_reg_ptr): Likewise.
208 (get_trace_state_variable_value_ptr): Likewise.
209 (set_trace_state_variable_value_ptr): Likewise.
210 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
211 char *.
212
14e2b6d9
MK
2132016-03-31 Wei-cheng Wang <cole945@gmail.com>
214 Marcin Kościelnicki <koriakin@0x04.net>
215
216 PR/17221
217 * linux-ppc-low.c (emit_insns): New function.
218 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
219 (ppc_emit_prologue): New function.
220 (ppc_emit_epilogue): New function.
221 (ppc_emit_add): New function.
222 (ppc_emit_sub): New function.
223 (ppc_emit_mul): New function.
224 (ppc_emit_lsh): New function.
225 (ppc_emit_rsh_signed): New function.
226 (ppc_emit_rsh_unsigned): New function.
227 (ppc_emit_ext): New function.
228 (ppc_emit_zero_ext): New function.
229 (ppc_emit_log_not): New function.
230 (ppc_emit_bit_and): New function.
231 (ppc_emit_bit_or): New function.
232 (ppc_emit_bit_xor): New function.
233 (ppc_emit_bit_not): New function.
234 (ppc_emit_equal): New function.
235 (ppc_emit_less_signed): New function.
236 (ppc_emit_less_unsigned): New function.
237 (ppc_emit_ref): New function.
238 (ppc_emit_const): New function.
239 (ppc_emit_reg): New function.
240 (ppc_emit_pop): New function.
241 (ppc_emit_stack_flush): New function.
242 (ppc_emit_swap): New function.
243 (ppc_emit_stack_adjust): New function.
244 (ppc_emit_call): New function.
245 (ppc_emit_int_call_1): New function.
246 (ppc_emit_void_call_2): New function.
247 (ppc_emit_if_goto): New function.
248 (ppc_emit_goto): New function.
249 (ppc_emit_eq_goto): New function.
250 (ppc_emit_ne_goto): New function.
251 (ppc_emit_lt_goto): New function.
252 (ppc_emit_le_goto): New function.
253 (ppc_emit_gt_goto): New function.
254 (ppc_emit_ge_goto): New function.
255 (ppc_write_goto_address): New function.
256 (ppc_emit_ops_impl): New static variable.
257 (ppc64v1_emit_prologue): New function.
258 (ppc64v2_emit_prologue): New function.
259 (ppc64_emit_epilogue): New function.
260 (ppc64_emit_add): New function.
261 (ppc64_emit_sub): New function.
262 (ppc64_emit_mul): New function.
263 (ppc64_emit_lsh): New function.
264 (ppc64_emit_rsh_signed): New function.
265 (ppc64_emit_rsh_unsigned): New function.
266 (ppc64_emit_ext): New function.
267 (ppc64_emit_zero_ext): New function.
268 (ppc64_emit_log_not): New function.
269 (ppc64_emit_bit_and): New function.
270 (ppc64_emit_bit_or): New function.
271 (ppc64_emit_bit_xor): New function.
272 (ppc64_emit_bit_not): New function.
273 (ppc64_emit_equal): New function.
274 (ppc64_emit_less_signed): New function.
275 (ppc64_emit_less_unsigned): New function.
276 (ppc64_emit_ref): New function.
277 (ppc64_emit_const): New function.
278 (ppc64v1_emit_reg): New function.
279 (ppc64v2_emit_reg): New function.
280 (ppc64_emit_pop): New function.
281 (ppc64_emit_stack_flush): New function.
282 (ppc64_emit_swap): New function.
283 (ppc64v1_emit_call): New function.
284 (ppc64v2_emit_call): New function.
285 (ppc64v1_emit_int_call_1): New function.
286 (ppc64v2_emit_int_call_1): New function.
287 (ppc64v1_emit_void_call_2): New function.
288 (ppc64v2_emit_void_call_2): New function.
289 (ppc64_emit_if_goto): New function.
290 (ppc64_emit_eq_goto): New function.
291 (ppc64_emit_ne_goto): New function.
292 (ppc64_emit_lt_goto): New function.
293 (ppc64_emit_le_goto): New function.
294 (ppc64_emit_gt_goto): New function.
295 (ppc64_emit_ge_goto): New function.
296 (ppc64v1_emit_ops_impl): New static variable.
297 (ppc64v2_emit_ops_impl): New static variable.
298 (ppc_emit_ops): New function.
299 (linux_low_target): Wire in ppc_emit_ops.
300
a2174ba4
MK
3012016-03-31 Wei-cheng Wang <cole945@gmail.com>
302 Marcin Kościelnicki <koriakin@0x04.net>
303
304 PR/17221
305 * Makefile.in: Add powerpc-*-ipa.o
306 * configure.srv: Add ipa_obj for powerpc*-linux.
307 * linux-ppc-ipa.c: New file.
308 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
309 includes.
310 (PPC_FIELD): New macro.
311 (PPC_SEXT): New macro.
312 (PPC_OP6): New macro.
313 (PPC_BO): New macro.
314 (PPC_LI): New macro.
315 (PPC_BD): New macro.
316 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
317 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
318 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
319 (ppc_get_thread_area): New function.
320 (is_elfv2_inferior): New function.
321 (gen_ds_form): New function.
322 (GEN_STD): New macro.
323 (GEN_STDU): New macro.
324 (GEN_LD): New macro.
325 (GEN_LDU): New macro.
326 (gen_d_form): New function.
327 (GEN_ADDI): New macro.
328 (GEN_ADDIS): New macro.
329 (GEN_LI): New macro.
330 (GEN_LIS): New macro.
331 (GEN_ORI): New macro.
332 (GEN_ORIS): New macro.
333 (GEN_LWZ): New macro.
334 (GEN_STW): New macro.
335 (GEN_STWU): New macro.
336 (gen_xfx_form): New function.
337 (GEN_MFSPR): New macro.
338 (GEN_MTSPR): New macro.
339 (GEN_MFCR): New macro.
340 (GEN_MTCR): New macro.
341 (GEN_SYNC): New macro.
342 (GEN_LWSYNC): New macro.
343 (gen_x_form): New function.
344 (GEN_OR): New macro.
345 (GEN_MR): New macro.
346 (GEN_LWARX): New macro.
347 (GEN_STWCX): New macro.
348 (GEN_CMPW): New macro.
349 (gen_md_form): New function.
350 (GEN_RLDICL): New macro.
351 (GEN_RLDICR): New macro.
352 (gen_i_form): New function.
353 (GEN_B): New macro.
354 (GEN_BL): New macro.
355 (gen_b_form): New function.
356 (GEN_BNE): New macro.
357 (GEN_LOAD): New macro.
358 (GEN_STORE): New macro.
359 (gen_limm): New function.
360 (gen_atomic_xchg): New function.
361 (gen_call): New function.
362 (ppc_relocate_instruction): New function.
363 (ppc_install_fast_tracepoint_jump_pad): New function.
364 (ppc_get_min_fast_tracepoint_insn_len): New function.
365 (ppc_get_ipa_tdesc_idx): New function.
366 (the_low_target): Wire in the new functions.
367 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
368 tdescs.
369 * linux-ppc-tdesc.h: New file.
370
a13c4696
MK
3712016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
372
373 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
374 (alloc_jump_pad_buffer): New function.
375 * linux-amd64-ipa.c: Add <sys/mman.h> include.
376 (alloc_jump_pad_buffer): New function.
377 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
378 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
379 (alloc_jump_pad_buffer): New function.
380 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
381 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
382 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
383 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
384
1cda1512
MK
3852016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
386
387 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
388 * linux-amd64-ipa.c: Likewise.
389 * linux-i386-ipa.c: Likewise.
390 * linux-s390-ipa.c: Likewise.
391 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
392 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
393 set_trace_state_variable_value_ptr.
394 (struct ipa_sym_addresses): Likewise.
395 (symbol_list): Likewise.
396 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
397 accessing gdb_collect directly.
398 (gdb_collect_ptr_type): New typedef.
399 (get_raw_reg_ptr_type): New typedef.
400 (get_trace_state_variable_value_ptr_type): New typedef.
401 (set_trace_state_variable_value_ptr_type): New typedef.
402 (gdb_collect_ptr): New global.
403 (get_raw_reg_ptr): New global.
404 (get_trace_state_variable_value_ptr): New global.
405 (set_trace_state_variable_value_ptr): New global.
406 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
407 accessing get_raw_reg directly.
408 (get_get_tsv_func_addr): Likewise for
409 get_trace_state_variable_value_ptr.
410 (get_set_tsv_func_addr): Likewise for
411 set_trace_state_variable_value_ptr.
412 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
413
72fb5488
SM
4142016-03-30 Simon Marchi <simon.marchi@ericsson.com>
415
416 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
417
28170b88
MK
4182016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
419
420 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
421 packets.
422 (relocate_instruction): Remove own_buf.
423 * server.c (own_buf): Make global.
424 (handle_v_requests): Make global.
425 * server.h (own_buf): New declaration.
426 (handle_v_requests): New prototype.
427
f39e8743
MK
4282016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
429
430 PR 18377
431 * linux-s390-low.c (add_insns): New function.
432 (s390_emit_prologue): New function.
433 (s390_emit_epilogue): New function.
434 (s390_emit_add): New function.
435 (s390_emit_sub): New function.
436 (s390_emit_mul): New function.
437 (s390_emit_lsh): New function.
438 (s390_emit_rsh_signed): New function.
439 (s390_emit_rsh_unsigned): New function.
440 (s390_emit_ext): New function.
441 (s390_emit_log_not): New function.
442 (s390_emit_bit_and): New function.
443 (s390_emit_bit_or): New function.
444 (s390_emit_bit_xor): New function.
445 (s390_emit_bit_not): New function.
446 (s390_emit_equal): New function.
447 (s390_emit_less_signed): New function.
448 (s390_emit_less_unsigned): New function.
449 (s390_emit_ref): New function.
450 (s390_emit_if_goto): New function.
451 (s390_emit_goto): New function.
452 (s390_write_goto_address): New function.
453 (s390_emit_litpool): New function.
454 (s390_emit_const): New function.
455 (s390_emit_call): New function.
456 (s390_emit_reg): New function.
457 (s390_emit_pop): New function.
458 (s390_emit_stack_flush): New function.
459 (s390_emit_zero_ext): New function.
460 (s390_emit_swap): New function.
461 (s390_emit_stack_adjust): New function.
462 (s390_emit_set_r2): New function.
463 (s390_emit_int_call_1): New function.
464 (s390_emit_void_call_2): New function.
465 (s390_emit_eq_goto): New function.
466 (s390_emit_ne_goto): New function.
467 (s390_emit_lt_goto): New function.
468 (s390_emit_le_goto): New function.
469 (s390_emit_gt_goto): New function.
470 (s390_emit_ge_goto): New function.
471 (s390x_emit_prologue): New function.
472 (s390x_emit_epilogue): New function.
473 (s390x_emit_add): New function.
474 (s390x_emit_sub): New function.
475 (s390x_emit_mul): New function.
476 (s390x_emit_lsh): New function.
477 (s390x_emit_rsh_signed): New function.
478 (s390x_emit_rsh_unsigned): New function.
479 (s390x_emit_ext): New function.
480 (s390x_emit_log_not): New function.
481 (s390x_emit_bit_and): New function.
482 (s390x_emit_bit_or): New function.
483 (s390x_emit_bit_xor): New function.
484 (s390x_emit_bit_not): New function.
485 (s390x_emit_equal): New function.
486 (s390x_emit_less_signed): New function.
487 (s390x_emit_less_unsigned): New function.
488 (s390x_emit_ref): New function.
489 (s390x_emit_if_goto): New function.
490 (s390x_emit_const): New function.
491 (s390x_emit_call): New function.
492 (s390x_emit_reg): New function.
493 (s390x_emit_pop): New function.
494 (s390x_emit_stack_flush): New function.
495 (s390x_emit_zero_ext): New function.
496 (s390x_emit_swap): New function.
497 (s390x_emit_stack_adjust): New function.
498 (s390x_emit_int_call_1): New function.
499 (s390x_emit_void_call_2): New function.
500 (s390x_emit_eq_goto): New function.
501 (s390x_emit_ne_goto): New function.
502 (s390x_emit_lt_goto): New function.
503 (s390x_emit_le_goto): New function.
504 (s390x_emit_gt_goto): New function.
505 (s390x_emit_ge_goto): New function.
506 (s390_emit_ops): New function.
507 (struct linux_target_ops): Fill in emit_ops hook.
508
abd9baf9
MK
5092016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
510
511 PR 18377
512 * Makefile.in: Add s390 IPA files.
513 * configure.srv: Build IPA for s390.
514 * linux-s390-ipa.c: New file.
515 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
516 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
517 (tdesc_s390_linux32): Likewise.
518 (init_registers_s390_linux32v1): Likewise.
519 (tdesc_s390_linux32v1): Likewise.
520 (init_registers_s390_linux32v2): Likewise.
521 (tdesc_s390_linux32v2): Likewise.
522 (init_registers_s390_linux64): Likewise.
523 (tdesc_s390_linux64): Likewise.
524 (init_registers_s390_linux64v1): Likewise.
525 (tdesc_s390_linux64v1): Likewise.
526 (init_registers_s390_linux64v2): Likewise.
527 (tdesc_s390_linux64v2): Likewise.
528 (init_registers_s390_te_linux64): Likewise.
529 (tdesc_s390_te_linux64): Likewise.
530 (init_registers_s390_vx_linux64): Likewise.
531 (tdesc_s390_vx_linux64): Likewise.
532 (init_registers_s390_tevx_linux64): Likewise.
533 (tdesc_s390_tevx_linux64): Likewise.
534 (init_registers_s390x_linux64): Likewise.
535 (tdesc_s390x_linux64): Likewise.
536 (init_registers_s390x_linux64v1): Likewise.
537 (tdesc_s390x_linux64v1): Likewise.
538 (init_registers_s390x_linux64v2): Likewise.
539 (tdesc_s390x_linux64v2): Likewise.
540 (init_registers_s390x_te_linux64): Likewise.
541 (tdesc_s390x_te_linux64): Likewise.
542 (init_registers_s390x_vx_linux64): Likewise.
543 (tdesc_s390x_vx_linux64): Likewise.
544 (init_registers_s390x_tevx_linux64): Likewise.
545 (tdesc_s390x_tevx_linux64): Likewise.
546 (have_hwcap_s390_vx): New static variable.
547 (s390_arch_setup): Fill have_hwcap_s390_vx.
548 (s390_get_thread_area): New function.
549 (s390_ft_entry_gpr_esa): New const.
550 (s390_ft_entry_gpr_zarch): New const.
551 (s390_ft_entry_misc): New const.
552 (s390_ft_entry_fr): New const.
553 (s390_ft_entry_vr): New const.
554 (s390_ft_main_31): New const.
555 (s390_ft_main_64): New const.
556 (s390_ft_exit_fr): New const.
557 (s390_ft_exit_vr): New const.
558 (s390_ft_exit_misc): New const.
559 (s390_ft_exit_gpr_esa): New const.
560 (s390_ft_exit_gpr_zarch): New const.
561 (append_insns): New function.
562 (s390_relocate_instruction): New function.
563 (s390_install_fast_tracepoint_jump_pad): New function.
564 (s390_get_min_fast_tracepoint_insn_len): New function.
565 (s390_get_ipa_tdesc_idx): New function.
566 (struct linux_target_ops): Wire in the above functions.
567 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
568 * linux-s390-tdesc.h: New file.
569
a4105d04
MK
5702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
571
572 * linux-s390-low.c (s390_supports_tracepoints): New function.
573 (struct linux_target_ops): Fill supports_tracepoints hook.
574
35ac8b3e
YQ
5752016-03-18 Yao Qi <yao.qi@linaro.org>
576
577 * linux-low.c (lwp_signal_can_be_delivered): New function.
578 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
579
94610ec4
YQ
5802016-03-18 Yao Qi <yao.qi@linaro.org>
581
582 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
583 0 if signal is enqueued. Remove 'signal' from one debugging
584 message. Move one debugging message to some lines below.
585 Remove code setting 'signal' to 0.
586
80aea927
YQ
5872016-03-18 Yao Qi <yao.qi@linaro.org>
588
589 * linux-low.c (linux_low_filter_event): Remove redundant
590 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
591
b04fd3be
MK
5922016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
593
594 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
595 (struct linux_target_ops): Wire in the above.
596
c40c8d4b
YQ
5972016-03-03 Yao Qi <yao.qi@linaro.org>
598
599 * linux-low.c: Update comments to start_step_over.
600
0f8288ae
YQ
6012016-03-03 Yao Qi <yao.qi@linaro.org>
602
603 PR server/19736
604 * linux-low.c (handle_extended_wait): Set child suspended
605 if event_lwp->bp_reinsert isn't zero.
606
fdbd04a8
YQ
6072016-03-02 Yao Qi <yao.qi@linaro.org>
608
609 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
610 enqueue_pending_signal.
611
6896a8fa
MK
6122016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
613
614 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
615 is actually loaded.
616
ab503087
MK
6172016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
618
619 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
620 (s390_regmap_3264) [!__s390x__]: New global.
621 (s390_collect_ptrace_register): Skip map entries containing -1.
622 (s390_supply_ptrace_register): Ditto.
623 (s390_fill_gprs_high): New function.
624 (s390_store_gprs_high): New function.
625 (s390_regsets): Add NT_S390_HIGH_GPRS.
626 (s390_get_hwcap): Enable on 31-bit.
627 (have_hwcap_s390_high_gprs): Enable on 31-bit.
628 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
629 Detect NT_S390_HIGH_GPRS.
630 (s390_usrregs_info_3264): Enable on 31-bit.
631 (s390_regs_info): Enable regs_info_3264 on 31-bit.
632 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
633
ae91f625
MK
6342016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
635
636 PR gdb/13808
637 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
638 * configure.srv: Ditto.
639 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
640 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
641 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
642 (init_registers_amd64_linux): Remove prototype.
643 (tdesc_amd64_linux): Remove declaration.
644 (get_ipa_tdesc): New function.
645 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
646 initialize remaining tdescs.
647 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
648 (init_registers_i386_linux): Remove prototype.
649 (tdesc_i386_linux): Remove declaration.
650 (get_ipa_tdesc): New function.
651 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
652 initialize remaining tdescs.
653 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
654 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
655 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
656 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
657 (x86_get_ipa_tdesc_idx): New function.
658 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
659 * linux-x86-tdesc.h: New file.
660 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
661 (target_get_ipa_tdesc_idx): New macro.
662 * tracepoint.c (ipa_tdesc_idx): New macro.
663 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
664 (symbol_list): Add ipa_tdesc_idx.
665 (cmd_qtstart): Write ipa_tdesc_idx in the target.
666 (ipa_tdesc): Remove.
667 (ipa_tdesc_idx): New variable.
668 (get_context_regcache): Use get_ipa_tdesc.
669 (gdb_collect): Ditto.
670 (gdb_probe): Ditto.
671 * tracepoint.h (get_ipa_tdesc): New prototype.
672 (ipa_tdesc): Remove.
673
e7ad2f14
PA
6742016-02-24 Pedro Alves <palves@redhat.com>
675
676 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
677 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
678 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
679 Factor out common code between the USE_SIGTRAP_SIGINFO and
680 !USE_SIGTRAP_SIGINFO blocks.
681 (linux_low_filter_event): Call save_stop_reason instead of
682 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
683 Update comments.
684 (linux_wait_1): Update comments.
685
657f9cde
WW
6862016-02-24 Wei-cheng Wang <cole945@gmail.com>
687
688 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
689 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
690 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
691 ppc_insert_point, ppc_remove_point.
692
b00b61e1
MK
6932016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
694
695 * linux-s390-low.c (s390_supports_z_point_type): New function.
696 (struct linux_target_ops): Wire s390_supports_z_point_type in.
697
553cb527
YQ
6982016-02-16 Yao Qi <yao.qi@linaro.org>
699
700 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
701 PC. Get pc from regcache_read_pc.
702
a5652c21
YQ
7032016-02-12 Yao Qi <yao.qi@linaro.org>
704
705 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
706 or linux_get_pc_32bit.
707 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
708
ed443b61
YQ
7092016-02-12 Yao Qi <yao.qi@linaro.org>
710
711 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
712 arm_linux_get_next_pcs_fixup.
713
020ecd38
MK
7142016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
715
716 * tracepoint.c (x_tracepoint_action_download): Change
717 write_inferior_data_ptr to write_inferior_data_pointer.
718 (cmd_qtstart): Likewise.
719 (write_inferior_data_ptr): Remove.
720 (download_agent_expr): Change write_inferior_data_ptr to
721 write_inferior_data_pointer.
722 (download_tracepoint_1): Likewise.
723 (download_tracepoint): Likewise.
724 (download_trace_state_variables): Likewise.
725
7cae9051
WW
7262016-02-11 Wei-cheng Wang <cole945@gmail.com>
727 Marcin Kościelnicki <koriakin@0x04.net>
728
729 * tracepoint.c (struct tracepoint_action_ops): Remove.
730 (struct tracepoint_action): Remove ops.
731 (m_tracepoint_action_download, r_tracepoint_action_download)
732 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
733 size and offset accordingly.
734 (m_tracepoint_action_ops, r_tracepoint_action_ops)
735 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
736 (tracepoint_action_send, tracepoint_action_download): New functions.
737 Helpers for trace action handlers.
738 (add_tracepoint_action): Remove setup actions ops.
739 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
740
9f6a71b4
YQ
7412016-02-10 Yao Qi <yao.qi@linaro.org>
742
743 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
744
1e94266c
SM
7452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
746
747 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
748 to AC_OUTPUT.
749 * configure: Regenerate.
750
8adce034
SM
7512016-02-09 Simon Marchi <simon.marchi@ericsson.com>
752
753 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
754 void * to gdb_byte *.
755 * linux-low.c (siginfo_fixup): Likewise.
756 (linux_xfer_siginfo): Likewise.
757 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
758 Likewise.
759 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
760
93813b37
WT
7612016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
762
763 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
764 to srv_tgtobj.
765 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
766 to srv_tgtobj.
767 * linux-x86-low.c [__x86_64__]: Include
768 "nat/amd64-linux-siginfo.h".
769 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
770 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
771 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
772 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
773 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
774 (cpt_si_fd, si_timerid, si_overrun): Move from
775 nat/amd64-linux-siginfo.c.
776 * Makefile.in (amd64-linux-siginfo.o:): New rule.
777
8424cc97
SM
7782016-01-28 Simon Marchi <simon.marchi@ericsson.com>
779
780 * server.c (skip_to_semicolon): Remove.
781 (process_point_options): Use strchrnul instead of
782 skip_to_semicolon.
783
4d18591b
YQ
7842016-01-26 Yao Qi <yao.qi@linaro.org>
785
786 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
787 * linux-low.c (install_software_single_step_breakpoints): Don't
788 call regcache_read_pc.
789 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
790 argument pc.
791
d8020970
YQ
7922016-01-26 Yao Qi <yao.qi@linaro.org>
793
794 * linux-low.c (install_software_single_step_breakpoints): Call
795 regcache_read_pc instead of get_pc.
796
8b207339
YQ
7972016-01-26 Yao Qi <yao.qi@linaro.org>
798
799 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
800 (unblock_async_io): Rename to ...
801 (block_unblock_async_io): ... it. New function.
802 (enable_async_io): Don't install SIGIO handler. Unblock it
803 instead.
804 (disable_async_io): Don't ignore SIGIO. Block it instead.
805 (initialize_async_io): Install SIGIO handler. Don't call
806 unblock_async_io.
807
18879fef
YQ
8082016-01-26 Yao Qi <yao.qi@linaro.org>
809
810 * remote-utils.c (getpkt): If the buffer isn't empty, and the
811 first character is '\003', call *the_target->request_interrupt.
812
a0f8e08a
YQ
8132016-01-25 Yao Qi <yao.qi@linaro.org>
814
815 * remote-utils.c (new_thread_notify): Remove.
816 (dead_thread_notify): Likewise.
817 * remote-utils.h (new_thread_notify): Remove declaration.
818 (dead_thread_notify): Likewise.
819
cc5fd9ab
MK
8202016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
821
822 * gdb.trace/pending.exp: Fix expected message on continue.
823
99e8eb11
MK
8242016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
825
826 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
827 it works properly on big-endian machines where sizeof (CORE_ADDR)
828 != sizeof (void *).
829
a994041d
PA
8302016-01-21 Pedro Alves <palves@redhat.com>
831
832 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
833 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
834 * configure: Regenerate.
835
f7a6a40d
YQ
8362016-01-21 Yao Qi <yao.qi@linaro.org>
837
838 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
839 is_thumb and set it according to CPSR saved on the stack.
840 (get_next_pcs_syscall_next_pc): Pass is_thumb to
841 arm_sigreturn_next_pc.
842
6f69e520
YQ
8432016-01-18 Yao Qi <yao.qi@linaro.org>
844
845 * linux-low.c (linux_set_pc_64bit): New function.
846 (linux_get_pc_64bit): New function.
847 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
848 Declare.
849 * linux-sparc-low.c (debug_threads): Remove declaration.
850 (sparc_get_pc): Remove.
851 (the_low_target): Use linux_get_pc_64bit instead of
852 sparc_get_pc.
853 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
854 (the_low_target): Use linux_get_pc_64bit and
855 linux_set_pc_64bit.
856
276d4552
YQ
8572016-01-18 Yao Qi <yao.qi@linaro.org>
858
859 * linux-arm-low.c (debug_threads): Remove declaration.
860 (arm_get_pc, arm_set_pc): Remove.
861 (the_low_target): Use linux_get_pc_32bit and
862 linux_set_pc_32bit.
863 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
864 (the_low_target): Use linux_get_pc_32bit and
865 linux_set_pc_32bit.
866 * linux-cris-low.c (debug_threads): Remove declaration.
867 (cris_get_pc, cris_set_pc,): Remove.
868 (the_low_target): Use linux_get_pc_32bit and
869 linux_set_pc_32bit.
870 * linux-crisv32-low.c (debug_threads): Remove declaration.
871 (cris_get_pc, cris_set_pc): Remove.
872 (the_low_target): Use linux_get_pc_32bit and
873 linux_set_pc_32bit.
874 * linux-low.c: Include inttypes.h.
875 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
876 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
877 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
878 (the_low_target): Use linux_get_pc_32bit and
879 linux_set_pc_32bit.
880 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
881 (the_low_target): Use linux_get_pc_32bit and
882 linux_set_pc_32bit.
883 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
884 (the_low_target): Use linux_get_pc_32bit and
885 linux_set_pc_32bit.
886 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
887 (the_low_target): Use linux_get_pc_32bit and
888 linux_set_pc_32bit.
889 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
890 (the_low_target): Use linux_get_pc_32bit and
891 linux_set_pc_32bit.
892
eb0edac8
GB
8932016-01-18 Gary Benson <gbenson@redhat.com>
894
895 * configure.ac (AC_FUNC_FORK): New check.
896 * config.in: Regenerate.
897 * configure: Likewise.
898
1b451dda
YQ
8992016-01-14 Yao Qi <yao.qi@linaro.org>
900
901 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
902 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
903 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
904 arm_get_next_pcs_ctor.
905
82075af2
JS
9062016-01-12 Josh Stone <jistone@redhat.com>
907 Philippe Waroquiers <philippe.waroquiers@skynet.be>
908
909 * inferiors.h: Include "gdb_vecs.h".
910 (struct process_info): Add syscalls_to_catch.
911 * inferiors.c (remove_process): Free syscalls_to_catch.
912 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
913 syscall_return stops.
914 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
915 * server.c (handle_general_set): Handle QCatchSyscalls.
916 (handle_query): Report support for QCatchSyscalls.
917 * target.h (struct target_ops): Add supports_catch_syscall.
918 (target_supports_catch_syscall): New macro.
919 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
920 (struct lwp_info): Add syscall_state.
921 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
922 Maintain syscall_state and syscalls_to_catch across exec.
923 (get_syscall_trapinfo): New function, proxy to the_low_target.
924 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
925 (linux_low_filter_event): Toggle syscall_state entry/return for
926 syscall traps, and set it ignored for all others.
927 (gdb_catching_syscalls_p): New function.
928 (gdb_catch_this_syscall_p): New function.
929 (linux_wait_1): Handle SYSCALL_SIGTRAP.
930 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
931 (linux_supports_catch_syscall): New function.
932 (linux_target_ops): Install it.
933 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
934 (the_low_target): Install it.
935
8f13a3ce
MF
9362016-01-12 Mike Frysinger <vapier@gentoo.org>
937
938 * acinclude.m4: Include new ../warning.m4 file.
939 * configure: Regenerated.
940 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
941
5b3da067
MF
9422016-01-12 Mike Frysinger <vapier@gentoo.org>
943
944 * ax.c (is_goto_target): Mark static.
945 * linux-low.c (register_addr): Likewise.
946 (linux_fetch_registers, linux_store_registers): Likewise.
947 * mem-break.c (any_persistent_commands): Fix old prototype.
948 (add_commands_to_breakpoint): Mark static.
949 * regcache.c (find_register_by_name): Delete unused func.
950 * remote-utils.c (hex_or_minus_one): Mark static.
951 * server.c (monitor_show_help): Mark static.
952 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
953 handle_v_requests): Likewise.
954
bc504a31
PA
9552016-01-12 Pedro Alves <palves@redhat.com>
956
957 Remove use of the registered trademark symbol throughout.
958
5a0dd67a
YQ
9592016-01-08 Yao Qi <yao.qi@linaro.org>
960
961 * remote-utils.c (getpkt): If c is '\003', call target hook
962 request_interrupt.
963
b2ca446f
YQ
9642016-01-06 Yao Qi <yao.qi@linaro.org>
965
966 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
967 linux-aarch32-low.c.
968 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
969 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
970 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
971 (thumb2_breakpoint): Declare.
972 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
973 linux-aarch32-low.h.
974 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
975 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
976 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
977
edd88788
JB
9782016-01-01 Joel Brobecker <brobecker@adacore.com>
979
980 * gdbreplay.c (gdbreplay_version): Change copyright year in
981 version message.
982 * server.c (gdbserver_version): Likewise.
983
65da7f14
PP
9842015-12-28 Patrick Palka <patrick@parcs.ath.cx>
985
986 * server.c (crc32_table): Delete.
987 (crc32): Use libiberty's xcrc32 function.
988
4abd5ed2
JB
9892015-12-22 Joel Brobecker <brobecker@adacore.com>
990
991 * lynx-low.c (lynx_delete_thread_callback): New function.
992 (lynx_mourn): Properly delete our process and all of its
993 threads. Remove call to clear_inferiors.
994
0e50fe5c
JB
9952015-12-22 Joel Brobecker <brobecker@adacore.com>
996
997 * target.c (thread_search_callback): Add check that
998 the thread_stopped target callback is not NULL before
999 calling it.
1000
35adc03f
YQ
10012015-12-21 Yao Qi <yao.qi@linaro.org>
1002
1003 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1004 arm breakpoint.
1005
bd2b2909
AT
10062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1007
1008 * server.c (handle_query): Call target_supports_software_single_step.
1009
7fe5e27e
AT
10102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1011
1012 * linux-low.c (single_step): New function.
1013 (linux_resume_one_lwp_throw): Call single_step.
1014 (start_step_over): Likewise.
1015
d9311bfa
AT
10162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1017
1018 * Makefile.in (SFILES): Append arch/arm-linux.c,
1019 arch/arm-get-next-pcs.c.
1020 (arm-linux.o): New rule.
1021 (arm-get-next-pcs.o): New rule.
1022 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1023 arm-linux.o.
1024 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1025 to linux-aarch32-low.c.
1026 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1027 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1028 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1029 (thumb2_breakpoint_len): Likewise.
1030 (arm_is_thumb_mode): Make non-static.
1031 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1032 from linux-aarch32-low.c.
1033 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1034 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1035 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1036 (thumb2_breakpoint_len): Likewise.
1037 (arm_is_thumb_mode): New declaration.
1038 * linux-arm-low.c: Include arch/arm-linux.h
1039 aarch/arm-get-next-pcs.h, sys/syscall.h.
1040 (get_next_pcs_ops): New struct.
1041 (get_next_pcs_addr_bits_remove): New function.
1042 (get_next_pcs_is_thumb): New function.
1043 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1044 (arm_sigreturn_next_pc): Likewise.
1045 (get_next_pcs_syscall_next_pc): Likewise.
1046 (arm_gdbserver_get_next_pcs): Likewise.
1047 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1048 Initialize.
1049 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1050 * server.h: Include gdb_vecs.h.
1051
68ce2059
AT
10522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1053
1054 * Makefile.in (SFILES): Append common/common-regcache.c.
1055 (OBS): Append common-regcache.o.
1056 (common-regcache.o): New rule.
1057 * regcache.c (init_register_cache): Initialize cache to
1058 REG_UNAVAILABLE.
1059 (regcache_raw_read_unsigned): New function.
1060 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1061 register_status enum.
1062
fa5308bd
AT
10632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1064
1065 * linux-aarch64-low.c (the_low_targets): Rename
1066 breakpoint_reinsert_addr to get_next_pcs.
1067 * linux-arm-low.c (the_low_targets): Likewise.
1068 * linux-bfin-low.c (the_low_targets): Likewise.
1069 * linux-cris-low.c (the_low_targets): Likewise.
1070 * linux-crisv32-low.c (the_low_targets): Likewise.
1071 * linux-low.c (can_software_single_step): Likewise.
1072 (install_software_single_step_breakpoints): New function.
1073 (start_step_over): Use install_software_single_step_breakpoints.
1074 * linux-low.h: New CORE_ADDR vector.
1075 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1076 get_next_pcs.
1077 * linux-mips-low.c (the_low_targets): Likewise.
1078 * linux-nios2-low.c (the_low_targets): Likewise.
1079 * linux-sparc-low.c (the_low_targets): Likewise.
1080
4a6ed09b
PA
10812015-12-17 Pedro Alves <palves@redhat.com>
1082
1083 * linux-low.c (linux_kill_one_lwp): Remove references to
1084 LinuxThreads.
1085 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1086 to 'kill'.
1087 (linux_init_signals): Delete.
1088 (initialize_low): Adjust.
1089 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1090
7544db95
PA
10912015-12-16 Pedro Alves <palves@redhat.com>
1092
1093 * configure.ac (compiler warning flags): When testing a
1094 -Wno-foo option, check whether -Wfoo works instead.
1095 * configure: Regenerate.
1096
8020350c
DB
10972015-12-11 Don Breazeal <donb@codesourcery.com>
1098
1099 * server.c (process_serial_event): Don't exit from gdbserver
1100 in remote mode if there are still active inferiors.
1101
db91f502
YQ
11022015-12-11 Yao Qi <yao.qi@linaro.org>
1103
1104 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1105 arm_breakpoint_at if the process is 32-bit.
1106
b37a6290
YQ
11072015-12-11 Yao Qi <yao.qi@linaro.org>
1108
1109 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1110 arm breakpoint.
1111
17b1509a
YQ
11122015-12-07 Yao Qi <yao.qi@linaro.org>
1113
1114 * configure.srv: Append arm.o to srv_tgtobj for
1115 aarch64*-*-linux* target.
1116 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1117 from linux-arm-low.c.
1118 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1119 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1120 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1121 (thumb2_breakpoint_len): Likewise.
1122 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1123 (arm_breakpoint_kinds): Likewise.
1124 (arm_breakpoint_kind_from_pc): Likewise.
1125 (arm_sw_breakpoint_from_kind): Likewise.
1126 (arm_breakpoint_kind_from_current_state): Likewise.
1127 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1128 (arm_sw_breakpoint_from_kind): Declare.
1129 (arm_breakpoint_kind_from_current_state): Declare.
1130 (arm_breakpoint_at): Declare.
1131 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1132 arm_sw_breakpoint_from_kind if process is 32-bit.
1133 (aarch64_breakpoint_kind_from_pc): New function.
1134 (aarch64_breakpoint_kind_from_current_state): New function.
1135 (the_low_target): Initialize fields breakpoint_kind_from_pc
1136 and breakpoint_kind_from_current_state.
1137 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1138 linux-aarch32-low.c.
1139 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1140 (arm_breakpoint, arm_breakpoint_len): Likewise.
1141 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1142 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1143 (arm_is_thumb_mode): Likewise.
1144 (arm_breakpoint_at): Likewise.
1145 (arm_breakpoint_kind_from_pc): Likewise.
1146 (arm_sw_breakpoint_from_kind): Likewise.
1147 (arm_breakpoint_kind_from_current_state): Likewise.
1148
1149 Revert:
1150 2015-08-04 Yao Qi <yao.qi@linaro.org>
1151
1152 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1153 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1154 * server.c (extended_protocol): Remove "static".
1155 * server.h (extended_protocol): Declare it.
1156
ece66d65
JS
11572015-12-04 Josh Stone <jistone@redhat.com>
1158
1159 * target.h (struct target_ops) <arch_setup>: Rename to ...
1160 (struct target_ops) <post_create_inferior>: ... this.
1161 (target_arch_setup): Rename to ...
1162 (target_post_create_inferior): ... this, calling post_create_inferior.
1163 * server.c (start_inferior): Update target_arch_setup calls to
1164 target_post_create_inferior.
1165 * linux-low.c (linux_low_ptrace_options): Forward declare.
1166 (linux_arch_setup): Update its comment for general use.
1167 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1168 (struct linux_target_ops): Use linux_post_create_inferior.
1169 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1170 to post_create_inferior.
1171 * nto-low.c (struct nto_target_ops): Likewise.
1172 * spu-low.c (struct spu_target_ops): Likewise.
1173 * win32-low.c (struct win32_target_ops): Likewise.
1174
e58c48b4
AT
11752015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1176
1177 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1178
fbec8956
AT
11792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1180
1181 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1182 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1183 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1184 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1185 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1186 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1187 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1188 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1189 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1191 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1193
9b4c5f87
AT
11942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1195
1196 * linux-low.c (linux_look_up_symbols): Don't call
1197 linux_supports_traceclone.
1198 * linux-low.h (thread_db_init): Remove use_events argument.
1199 * thread-db.c (thread_db_use_event): Remove global variable.
1200 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1201 (struct thread_db) <td_create_bp>: Remove field.
1202 (thread_db_create_event): Remove function.
1203 (thread_db_enable_reporting): Likewise.
1204 (find_one_thread): Don't check for thread_db_use_events.
1205 (attach_thread): Likewise.
1206 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1207 (try_thread_db_load_1): Don't check for thread_db_use_events.
1208 (thread_db_init): Remove use_events argument and thread events
1209 handling.
1210 (remove_thread_event_breakpoints): Remove function.
1211 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1212
7d00775e
AT
12132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1214
1215 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1216 New function.
1217 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1218 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1219 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1220 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1221 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1222 Initialize.
1223 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1224 New function.
1225 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1226 * linux-low.c (can_hardware_single_step): Use
1227 supports_hardware_single_step.
1228 (can_software_single_step): New function.
1229 (start_step_over): Call can_software_single_step.
1230 (linux_supports_hardware_single_step): New function.
1231 (struct target_ops) <supports_software_single_step>: Initialize.
1232 * linux-low.h (struct linux_target_ops)
1233 <supports_hardware_single_step>: Initialize.
1234 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1235 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1236 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1237 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1238 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1239 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1240 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1242 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1243 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1244 Initialize.
1245 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1246 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1247 Initialize.
1248 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1249 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1250 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1251 New function.
1252 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1253 * target.h (struct target_ops): <supports_software_single_step>:
1254 New field.
1255 (target_supports_software_single_step): New macro.
1256
2d97cd35
AT
12572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1258
1259 * linux-low.c (linux_wait_1): Fix pc advance condition.
1260 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1261 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1262
769ef81f
AT
12632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1264
1265 * linux-arm-low.c (arm_is_thumb_mode): New function.
1266 (arm_breakpoint_at): Use arm_is_thumb_mode.
1267 (arm_breakpoint_kind_from_current_state): New function.
1268 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1269 Initialize.
1270 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1271 (linux_breakpoint_kind_from_current_state): New function.
1272 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1273 * linux-low.h (struct linux_target_ops)
1274 <breakpoint_kind_from_current_state>: New field.
1275 * target.h (struct target_ops): Likewise.
1276 (target_breakpoint_kind_from_current_state): New macro.
1277
1bebeeca
PA
12782015-11-30 Pedro Alves <palves@redhat.com>
1279
1280 * linux-low.c (linux_resume): Wake up the event loop before
1281 returning.
1282
a67a9fae
PA
12832015-11-30 Pedro Alves <palves@redhat.com>
1284
1285 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1286 check.
1287 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1288 to -1.
1289 * target.c (struct thread_search): New structure.
1290 (thread_search_callback): New function.
1291 (prev_general_thread): New global.
1292 (prepare_to_access_memory, done_accessing_memory): New functions.
1293 * target.h (prepare_to_access_memory, done_accessing_memory):
1294 Replace macros with function declarations.
1295
f2faf941
PA
12962015-11-30 Pedro Alves <palves@redhat.com>
1297
1298 PR 14618
1299 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1300 report TARGET_WAITKIND_NO_RESUMED.
1301 * remote-utils.c (prepare_resume_reply): Handle
1302 TARGET_WAITKIND_NO_RESUMED.
1303 * server.c (report_no_resumed): New global.
1304 (handle_query) <qSupported>: Handle "no-resumed+". Report
1305 "no-resumed+" support.
1306 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1307 return error if the client doesn't support no-resumed events.
1308 (push_stop_notification): New function.
1309 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1310 events if the client supports them.
1311
a681f9c9
PA
13122015-11-30 Pedro Alves <palves@redhat.com>
1313
1314 * linux-low.c (thread_still_has_status_pending_p): Don't check
1315 vCont;t here.
1316 (lwp_resumed): New function.
1317 (status_pending_p_callback): Return early if the LWP is not
1318 supposed to be resumed.
1319
65706a29
PA
13202015-11-30 Pedro Alves <palves@redhat.com>
1321
1322 * linux-low.c (handle_extended_wait): Assert that the LWP's
1323 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1324 thread create events, leave the new child's status pending.
1325 (linux_low_filter_event): If GDB wants to hear about thread exit
1326 events, leave the LWP marked dead and don't delete it.
1327 (linux_wait_for_event_filtered): Don't check for thread exit.
1328 (filter_exit_event): New function.
1329 (linux_wait_1): Use it, when returning an exit event.
1330 (linux_resume_one_lwp_throw): Assert that the LWP's
1331 waitstatus is TARGET_WAITKIND_IGNORE.
1332 * remote-utils.c (prepare_resume_reply): Handle
1333 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1334 * server.c (report_thread_events): New global.
1335 (handle_general_set): Handle QThreadEvents.
1336 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1337 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1338 TARGET_WAITKIND_THREAD_EXITED.
1339 * server.h (report_thread_events): Declare.
1340
56cf4bed
PA
13412015-11-30 Pedro Alves <palves@redhat.com>
1342
1343 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1344 the thread's last_resume_kind was resume_stop.
1345
500c1d85
PA
13462015-11-30 Pedro Alves <palves@redhat.com>
1347
1348 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1349 before returning.
1350
de979965
PA
13512015-11-30 Pedro Alves <palves@redhat.com>
1352
1353 * server.c (handle_v_requests): Handle vCtrlC.
1354
34c65914
PA
13552015-11-30 Pedro Alves <palves@redhat.com>
1356
1357 * gdbthread.h (find_any_thread_of_pid): Declare.
1358 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1359 functions.
1360 * server.c (handle_query): If current_thread is NULL, look for
1361 another thread of the selected process.
1362
79efa585 13632015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1364 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1365
1366 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1367 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1368 name in reply.
1369 * target.h (struct target_ops) <thread_name>: New field.
1370 (target_thread_name): New macro.
1371
80d82c19
JB
13722015-11-23 Joel Brobecker <brobecker@adacore.com>
1373
1374 * regcache.h (regcache_invalidate_pid): Add declaration.
1375 * regcache.c (regcache_invalidate_pid): New function, extracted
1376 from regcache_invalidate.
1377 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1378 Add trivial documentation comment.
1379 * lynx-low.c: Use regcache_invalidate_pid instead of
1380 regcache_invalidate.
1381
64da5dd5
JB
13822015-11-23 Joel Brobecker <brobecker@adacore.com>
1383
1384 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1385 and Elf64_auxv_t if the target is Android.
1386
37ce4055
DE
13872015-11-22 Doug Evans <xdje42@gmail.com>
1388
1389 * target.h: #include <sys/types.h>.
1390
06e03fff
PA
13912015-11-19 Pedro Alves <palves@redhat.com>
1392
1393 * linux-low.c (linux_process_qsupported): Change prototype.
1394 Adjust.
1395 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1396 Change prototype.
1397 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1398 and adjust to loop over all features.
1399 * server.c (handle_query) <qSupported>: Adjust to call
1400 target_process_qsupported once, passing it a vector of unprocessed
1401 features.
1402 * target.h (struct target_ops) <process_qsupported>: Change
1403 prototype.
1404 (target_process_qsupported): Adjust.
1405
9a084706
PA
14062015-11-19 Pedro Alves <palves@redhat.com>
1407
1408 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1409 mode.
1410 * configure: Regenerate.
1411
dad44a1f
PA
14122015-11-19 Pedro Alves <palves@redhat.com>
1413
1414 * configure: Regenerate.
1415
231c0592
YQ
14162015-11-19 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1419 type to uint32_t.
1420
6c1c9a8b
YQ
14212015-11-19 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1424 (struct aarch64_operand): Move enum out.
1425
9caa3311
YQ
14262015-11-19 Yao Qi <yao.qi@linaro.org>
1427
1428 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1429 struct user_fpsimd_state *.
1430 (aarch64_store_fpregset): Likewise.
1431
6a69a054
YQ
14322015-11-19 Yao Qi <yao.qi@linaro.org>
1433
1434 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1435 struct user_pt_regs *.
1436 (aarch64_store_gregset): Likewise.
1437
1798301e
PA
14382015-11-18 Pedro Alves <palves@redhat.com>
1439
1440 * Makefile.in (all_object_files): Add $IPA_OBJS.
1441
ce7715e2
PA
14422015-11-17 Pedro Alves <palves@redhat.com>
1443
1444 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1445 GDB_SIGNAL_0 and gdb_signal_to_string.
1446
c0879059
PA
14472015-11-17 Pedro Alves <palves@redhat.com>
1448
1449 * win32-low.c (handle_output_debug_string): Remove parameter.
1450 (win32_kill): Remove our_status local and adjust call to
1451 handle_output_debug_string.
1452 (get_child_debug_event): Adjust call to
1453 handle_output_debug_string.
1454
1996e237
SM
14552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1456
1457 * linux-mips-low.c (mips_fill_gregset): Add cast.
1458 (mips_store_gregset): Likewise.
1459 (mips_fill_fpregset): Likewise.
1460 (mips_store_fpregset): Likewise.
1461
cbec665b
SM
14622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1465 priv.
1466
eb3e3c67
SM
14672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1468
1469 * linux-mips-low.c (mips_linux_new_thread): Change type of
1470 watch_type to enum target_hw_bp_type.
1471
171de4b8
SM
14722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1475 Change return type to arm_hwbp_type.
1476
04248ead
SM
14772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1480 (arm_store_gregset): Likewise.
1481 * linux-arm-low.c (arm_get_hwcap): Likewise.
1482 (arm_read_description): Likewise.
1483
04b3479c
SM
14842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1485
1486 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1487
2bc84e8a
SM
14882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1491 (ppc_fill_vsxregset): Likewise.
1492 (ppc_store_vsxregset): Likewise.
1493 (ppc_fill_vrregset): Likewise.
1494 (ppc_store_vrregset): Likewise.
1495 (ppc_fill_evrregset): Likewise.
1496 (ppc_store_evrregset): Likewise.
1497
e6c5bb05
SM
14982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * linux-ppc-low.c (ppc_usrregs_info): Remove
1501 forward-declaration.
1502 (ppc_arch_setup): Move lower in file.
1503
7ea45d72
SM
15042015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1507 (ps_pdwrite): Likewise.
1508
69291610
HW
15092015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1510
1511 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1512 to after assert checks.
1513
b42945fd
SM
15142015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1515
1516 * proc-service.c (ps_pdread): Add/adjust casts.
1517 (ps_pdwrite): Add/adjust casts.
1518
d6f85c84
SM
15192015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1520
1521 * server.c (handle_search_memory_1): Cast return value of
1522 memmem.
1523
f98cd059
SM
15242015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1525
1526 * server.c (write_qxfer_response): Change type of data to
1527 gdb_byte *.
1528
d2412fa5
PA
15292015-10-29 Pedro Alves <palves@redhat.com>
1530
1531 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1532
c17414a2
PA
15332015-10-29 Pedro Alves <palves@redhat.com>
1534
1535 * tracepoint.c (clear_installed_tracepoints): Add casts.
1536
e053fbc4
PA
15372015-10-29 Pedro Alves <palves@redhat.com>
1538
1539 * server.c (handle_v_cont, process_serial_event): Add enum
1540 gdb_signal casts to signal parsing code.
1541
add67df8
PA
15422015-10-29 Pedro Alves <palves@redhat.com>
1543
1544 * linux-low.h (NULL_REGSET): Define.
1545 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1546 * linux-arm-low.c (arm_regsets): Likewise.
1547 * linux-crisv32-low.c (cris_regsets): Likewise.
1548 * linux-m68k-low.c (m68k_regsets): Likewise.
1549 * linux-mips-low.c (mips_regsets): Likewise.
1550 * linux-nios2-low.c (nios2_regsets): Likewise.
1551 * linux-ppc-low.c (ppc_regsets): Likewise.
1552 * linux-s390-low.c (s390_regsets): Likewise.
1553 * linux-sh-low.c (sh_regsets): Likewise.
1554 * linux-sparc-low.c (sparc_regsets): Likewise.
1555 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1556 * linux-tile-low.c (tile_regsets): Likewise.
1557 * linux-x86-low.c (x86_regsets): Likewise.
1558 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1559
50bc912a
PA
15602015-10-29 Pedro Alves <palves@redhat.com>
1561
1562 * linux-low.h (NULL_REGSET): Define.
1563 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1564 * linux-arm-low.c (arm_regsets): Likewise.
1565 * linux-crisv32-low.c (cris_regsets): Likewise.
1566 * linux-m68k-low.c (m68k_regsets): Likewise.
1567 * linux-mips-low.c (mips_regsets): Likewise.
1568 * linux-nios2-low.c (nios2_regsets): Likewise.
1569 * linux-ppc-low.c (ppc_regsets): Likewise.
1570 * linux-s390-low.c (s390_regsets): Likewise.
1571 * linux-sh-low.c (sh_regsets): Likewise.
1572 * linux-sparc-low.c (sparc_regsets): Likewise.
1573 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1574 * linux-tile-low.c (tile_regsets): Likewise.
1575 * linux-x86-low.c (x86_regsets): Likewise.
1576 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1577
682b2546
DE
15782015-10-26 Doug Evans <dje@google.com>
1579
1580 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1581
963843d4
DE
15822015-10-26 Doug Evans <dje@google.com>
1583
1584 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1585
d41401ac
DE
15862015-10-26 Doug Evans <dje@google.com>
1587
1588 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1589 for debug_printf.
1590 (attach_thread, find_new_threads_callback): Ditto.
1591
3db28855
AT
15922015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1593
1594 * mem-break.h (set_breakpoint_data): Remove.
1595
fb78e89c
AT
15962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1597
1598 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1599 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1600 (initialize_low): Remove set_breakpoint_data call.
1601 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1602 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1603 (initialize_low): Remove set_breakpoint_data call.
1604 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1605 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1606 (initialize_low): Remove set_breakpoint_data call.
1607
2e6ee069
AT
16082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1609
1610 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1611 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1612 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1613 * target.h (target_breakpoint_kind_from_pc): New macro.
1614
1652a986
AT
16152015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1616
1617 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1618 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1619 the default breakpoint kind.
1620
abeead09
AT
16212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1622
1623 * linux-arm-low.c (arm_supports_z_point_type): Add software
1624 breakpoint support.
1625
b0b4b501
AT
16262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1627
1628 * linux-arm-low.c: Refactor breakpoint definitions.
1629 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1630 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1631
8689682c
AT
16322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1633
1634 * Makefile.in: Add arm.c/o.
1635 * configure.srv: Likewise.
1636 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1637 (arm_breakpoint_kind_from_pc): New function.
1638 (arm_sw_breakpoint_from_kind): Return proper kind.
1639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1640
27165294
AT
16412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1642
1643 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1644 removal.
1645 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1646 (struct raw_breakpoint) <size>: Remove.
1647 (struct raw_breakpoint) <kind>: Add.
1648 (bp_size): New function.
1649 (bp_opcode): Likewise.
1650 (find_raw_breakpoint_at): Adjust for kind.
1651 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1652 (remove_memory_breakpoint): Adjust for kind call bp_size.
1653 (set_raw_breakpoint_at): Adjust for kind.
1654 (set_breakpoint): Likewise.
1655 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1656 (delete_raw_breakpoint): Adjust for kind.
1657 (delete_breakpoint): Likewise.
1658 (find_gdb_breakpoint): Likewise.
1659 (set_gdb_breakpoint_1): Likewise.
1660 (set_gdb_breakpoint): Likewise.
1661 (delete_gdb_breakpoint_1): Likewise.
1662 (delete_gdb_breakpoint): Likewise.
1663 (uninsert_raw_breakpoint): Likewise.
1664 (reinsert_raw_breakpoint): Likewise.
1665 (set_breakpoint_data): Remove.
1666 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1667 (check_mem_read): Adjust for kind call bp_size.
1668 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1669 (clone_one_breakpoint): Adjust for kind.
1670 * mem-break.h (set_gdb_breakpoint): Likewise.
1671 (delete_gdb_breakpoint): Likewise.
1672 * server.c (process_serial_event): Likewise.
1673
dd373349
AT
16742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1675
1676 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1677 (struct linux_target_ops) <breakpoint>: Remove.
1678 (struct linux_target_ops) <breakpoint_len>: Remove.
1679 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1680 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1681 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1682 (arm_sw_breakpoint_from_kind): New function.
1683 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1684 (struct linux_target_ops) <breakpoint>: Remove.
1685 (struct linux_target_ops) <breakpoint_len>: Remove.
1686 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1687 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1688 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1689 (struct linux_target_ops) <breakpoint>: Remove.
1690 (struct linux_target_ops) <breakpoint_len>: Remove.
1691 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1692 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1693 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1694 (struct linux_target_ops) <breakpoint>: Remove.
1695 (struct linux_target_ops) <breakpoint_len>: Remove.
1696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1698 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1699 and sw_breakpoint_from_kind to increment the pc.
1700 (linux_breakpoint_kind_from_pc): New function.
1701 (linux_sw_breakpoint_from_kind): New function.
1702 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1703 (initialize_low): Call breakpoint_kind_from_pc and
1704 sw_breakpoint_from_kind to replace breakpoint_data/len.
1705 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1706 New field.
1707 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1708 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1709 (struct linux_target_ops) <breakpoint>: Remove.
1710 (struct linux_target_ops) <breakpoint_len>: Remove.
1711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1712 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1713 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1714 (struct linux_target_ops) <breakpoint>: Remove.
1715 (struct linux_target_ops) <breakpoint_len>: Remove.
1716 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1717 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1718 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1719 (struct linux_target_ops) <breakpoint>: Remove.
1720 (struct linux_target_ops) <breakpoint_len>: Remove.
1721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1722 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1723 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1724 (struct linux_target_ops) <breakpoint>: Remove.
1725 (struct linux_target_ops) <breakpoint_len>: Remove.
1726 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1727 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1728 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1729 (struct linux_target_ops) <breakpoint>: Remove.
1730 (struct linux_target_ops) <breakpoint_len>: Remove.
1731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1733 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1734 (struct linux_target_ops) <breakpoint>: Remove.
1735 (struct linux_target_ops) <breakpoint_len>: Remove.
1736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1738 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1739 (struct linux_target_ops) <breakpoint>: Remove.
1740 (struct linux_target_ops) <breakpoint_len>: Remove.
1741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1743 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1744 (struct linux_target_ops) <breakpoint>: Remove.
1745 (struct linux_target_ops) <breakpoint_len>: Remove.
1746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1748 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1749 (struct linux_target_ops) <breakpoint>: Remove.
1750 (struct linux_target_ops) <breakpoint_len>: Remove.
1751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1753 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1754 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1755 (struct linux_target_ops) <breakpoint>: Remove.
1756 (struct linux_target_ops) <breakpoint_len>: Remove.
1757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1758 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1759 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1760 (struct linux_target_ops) <breakpoint>: Remove.
1761 (struct linux_target_ops) <breakpoint_len>: Remove.
1762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1764
4cd98a19
AT
17652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1766
1767 * linux-cris-low.c (cris_get_pc): Remove void arg.
1768
774ee6d2
AR
17692015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1770
1771 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1772 variable name.
1773
833dcd29
AR
17742015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1775
1776 * inferiors.c (thread_pid_matches_callback): New function.
1777 (find_thread_process): New function.
1778 (remove_thread): Reset current_thread.
1779 (remove_process): Assert threads have been removed first.
1780
8d689ee5
YQ
17812015-10-15 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1784 if it is 3.
1785 (aarch64_remove_point): Likewise.
1786 * regcache.c (regcache_register_size): New function.
1787
1c2e1515
YQ
17882015-10-12 Yao Qi <yao.qi@linaro.org>
1789
1790 * linux-aarch64-low.c: Update all callers as emit_load_store
1791 is renamed to aarch64_emit_load_store.
1792
e1c587c3
YQ
17932015-10-12 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-aarch64-low.c: Update all callers of function renaming
1796 from emit_insn to aarch64_emit_insn.
1797
b6542f81
YQ
17982015-10-12 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1801 arch/aarch64-insn.h.
1802 (struct aarch64_memory_operand): Likewise.
1803 (ENCODE): Likewise.
1804 (emit_insn): Move to arch/aarch64-insn.c.
1805 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1806 (emit_load_store): Move to arch/aarch64-insn.c.
1807 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1808 (can_encode_int32): Remove.
1809
246994ce
YQ
18102015-10-12 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1813 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1814 (aarch64_relocate_instruction): Likewise.
1815 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1816 (struct aarch64_insn_visitor): Likewise.
1817
0badd99f
YQ
18182015-10-12 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1821 (struct aarch64_insn_visitor): New.
1822 (struct aarch64_insn_relocation_data): New.
1823 (aarch64_ftrace_insn_reloc_b): New function.
1824 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1825 (aarch64_ftrace_insn_reloc_cb): Likewise.
1826 (aarch64_ftrace_insn_reloc_tb): Likewise.
1827 (aarch64_ftrace_insn_reloc_adr): Likewise.
1828 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1829 (aarch64_ftrace_insn_reloc_others): Likewise.
1830 (visitor): New.
1831 (aarch64_relocate_instruction): Use visitor.
1832
dfaffe9d
YQ
18332015-10-12 Yao Qi <yao.qi@linaro.org>
1834
1835 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1836 int. Add argument buf.
1837 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1838 aarch64_relocate_instruction.
1839
70b439f0
YQ
18402015-10-12 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1843 argument insn. Remove local variable insn. Don't call
1844 target_read_uint32.
1845 (aarch64_install_fast_tracepoint_jump_pad): Call
1846 target_read_uint32.
1847
7781c06f
YQ
18482015-09-30 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1851 (emit_load_store_pair): Likewise.
1852
9a3c8263
SM
18532015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * dll.c (match_dll): Add cast(s).
1856 (unloaded_dll): Likewise.
1857 * linux-low.c (second_thread_of_pid_p): Likewise.
1858 (delete_lwp_callback): Likewise.
1859 (count_events_callback): Likewise.
1860 (select_event_lwp_callback): Likewise.
1861 (linux_set_resume_request): Likewise.
1862 * server.c (accumulate_file_name_length): Likewise.
1863 (emit_dll_description): Likewise.
1864 (handle_qxfer_threads_worker): Likewise.
1865 (visit_actioned_threads): Likewise.
1866 * thread-db.c (any_thread_of): Likewise.
1867 * tracepoint.c (same_process_p): Likewise.
1868 (match_blocktype): Likewise.
1869 (build_traceframe_info_xml): Likewise.
1870
224c3ddb
SM
18712015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1872
1873 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1874 assignment.
1875 (gdb_unparse_agent_expr): Likewise.
1876 * hostio.c (require_data): Likewise.
1877 (handle_pread): Likewise.
1878 * linux-low.c (disable_regset): Likewise.
1879 (fetch_register): Likewise.
1880 (store_register): Likewise.
1881 (get_dynamic): Likewise.
1882 (linux_qxfer_libraries_svr4): Likewise.
1883 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1884 (set_fast_tracepoint_jump): Likewise.
1885 (uninsert_fast_tracepoint_jumps_at): Likewise.
1886 (reinsert_fast_tracepoint_jumps_at): Likewise.
1887 (validate_inserted_breakpoint): Likewise.
1888 (clone_agent_expr): Likewise.
1889 * regcache.c (init_register_cache): Likewise.
1890 * remote-utils.c (putpkt_binary_1): Likewise.
1891 (decode_M_packet): Likewise.
1892 (decode_X_packet): Likewise.
1893 (look_up_one_symbol): Likewise.
1894 (relocate_instruction): Likewise.
1895 (monitor_output): Likewise.
1896 * server.c (handle_search_memory): Likewise.
1897 (handle_qxfer_exec_file): Likewise.
1898 (handle_qxfer_libraries): Likewise.
1899 (handle_qxfer): Likewise.
1900 (handle_query): Likewise.
1901 (handle_v_cont): Likewise.
1902 (handle_v_run): Likewise.
1903 (captured_main): Likewise.
1904 * target.c (write_inferior_memory): Likewise.
1905 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1906 * tracepoint.c (init_trace_buffer): Likewise.
1907 (add_tracepoint_action): Likewise.
1908 (add_traceframe): Likewise.
1909 (add_traceframe_block): Likewise.
1910 (cmd_qtdpsrc): Likewise.
1911 (cmd_qtdv): Likewise.
1912 (cmd_qtstatus): Likewise.
1913 (response_source): Likewise.
1914 (response_tsv): Likewise.
1915 (cmd_qtnotes): Likewise.
1916 (gdb_collect): Likewise.
1917 (initialize_tracepoint): Likewise.
1918
afbe19f8
PL
19192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1920
1921 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1922 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1923 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1924 <NOP>: New.
1925 (enum aarch64_condition_codes): New enum.
1926 (w0): New static global.
1927 (fp): Likewise.
1928 (lr): Likewise.
1929 (struct aarch64_memory_operand) <type>: New
1930 MEMORY_OPERAND_POSTINDEX type.
1931 (postindex_memory_operand): New helper function.
1932 (emit_ret): New function.
1933 (emit_load_store_pair): New function, factored out of emit_stp
1934 with support for MEMORY_OPERAND_POSTINDEX.
1935 (emit_stp): Rewrite using emit_load_store_pair.
1936 (emit_ldp): New function.
1937 (emit_load_store): Likewise.
1938 (emit_ldr): Mention post-index instruction in comment.
1939 (emit_ldrh): New function.
1940 (emit_ldrb): New function.
1941 (emit_ldrsw): Mention post-index instruction in comment.
1942 (emit_str): Likewise.
1943 (emit_subs): New function.
1944 (emit_cmp): Likewise.
1945 (emit_and): Likewise.
1946 (emit_orr): Likewise.
1947 (emit_orn): Likewise.
1948 (emit_eor): Likewise.
1949 (emit_mvn): Likewise.
1950 (emit_lslv): Likewise.
1951 (emit_lsrv): Likewise.
1952 (emit_asrv): Likewise.
1953 (emit_mul): Likewise.
1954 (emit_sbfm): Likewise.
1955 (emit_sbfx): Likewise.
1956 (emit_ubfm): Likewise.
1957 (emit_ubfx): Likewise.
1958 (emit_csinc): Likewise.
1959 (emit_cset): Likewise.
1960 (emit_nop): Likewise.
1961 (emit_ops_insns): New helper function.
1962 (emit_pop): Likewise.
1963 (emit_push): Likewise.
1964 (aarch64_emit_prologue): New function.
1965 (aarch64_emit_epilogue): Likewise.
1966 (aarch64_emit_add): Likewise.
1967 (aarch64_emit_sub): Likewise.
1968 (aarch64_emit_mul): Likewise.
1969 (aarch64_emit_lsh): Likewise.
1970 (aarch64_emit_rsh_signed): Likewise.
1971 (aarch64_emit_rsh_unsigned): Likewise.
1972 (aarch64_emit_ext): Likewise.
1973 (aarch64_emit_log_not): Likewise.
1974 (aarch64_emit_bit_and): Likewise.
1975 (aarch64_emit_bit_or): Likewise.
1976 (aarch64_emit_bit_xor): Likewise.
1977 (aarch64_emit_bit_not): Likewise.
1978 (aarch64_emit_equal): Likewise.
1979 (aarch64_emit_less_signed): Likewise.
1980 (aarch64_emit_less_unsigned): Likewise.
1981 (aarch64_emit_ref): Likewise.
1982 (aarch64_emit_if_goto): Likewise.
1983 (aarch64_emit_goto): Likewise.
1984 (aarch64_write_goto_address): Likewise.
1985 (aarch64_emit_const): Likewise.
1986 (aarch64_emit_call): Likewise.
1987 (aarch64_emit_reg): Likewise.
1988 (aarch64_emit_pop): Likewise.
1989 (aarch64_emit_stack_flush): Likewise.
1990 (aarch64_emit_zero_ext): Likewise.
1991 (aarch64_emit_swap): Likewise.
1992 (aarch64_emit_stack_adjust): Likewise.
1993 (aarch64_emit_int_call_1): Likewise.
1994 (aarch64_emit_void_call_2): Likewise.
1995 (aarch64_emit_eq_goto): Likewise.
1996 (aarch64_emit_ne_goto): Likewise.
1997 (aarch64_emit_lt_goto): Likewise.
1998 (aarch64_emit_le_goto): Likewise.
1999 (aarch64_emit_gt_goto): Likewise.
2000 (aarch64_emit_ge_got): Likewise.
2001 (aarch64_emit_ops_impl): New static global variable.
2002 (aarch64_emit_ops): New target function, return
2003 &aarch64_emit_ops_impl.
2004 (struct linux_target_ops): Install it.
2005
bb903df0
PL
20062015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2007
2008 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2009 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2010 aarch64-ipa.o.
2011 * linux-aarch64-ipa.c: New file.
2012 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2013 and endian.h.
2014 (aarch64_get_thread_area): New target method.
2015 (extract_signed_bitfield): New helper function.
2016 (aarch64_decode_ldr_literal): New function.
2017 (enum aarch64_opcodes): New enum.
2018 (struct aarch64_register): New struct.
2019 (struct aarch64_operand): New struct.
2020 (x0): New static global.
2021 (x1): Likewise.
2022 (x2): Likewise.
2023 (x3): Likewise.
2024 (x4): Likewise.
2025 (w2): Likewise.
2026 (ip0): Likewise.
2027 (sp): Likewise.
2028 (xzr): Likewise.
2029 (aarch64_register): New helper function.
2030 (register_operand): Likewise.
2031 (immediate_operand): Likewise.
2032 (struct aarch64_memory_operand): New struct.
2033 (offset_memory_operand): New helper function.
2034 (preindex_memory_operand): Likewise.
2035 (enum aarch64_system_control_registers): New enum.
2036 (ENCODE): New macro.
2037 (emit_insn): New helper function.
2038 (emit_b): New function.
2039 (emit_bcond): Likewise.
2040 (emit_cb): Likewise.
2041 (emit_tb): Likewise.
2042 (emit_blr): Likewise.
2043 (emit_stp): Likewise.
2044 (emit_ldp_q_offset): Likewise.
2045 (emit_stp_q_offset): Likewise.
2046 (emit_load_store): Likewise.
2047 (emit_ldr): Likewise.
2048 (emit_ldrsw): Likewise.
2049 (emit_str): Likewise.
2050 (emit_ldaxr): Likewise.
2051 (emit_stxr): Likewise.
2052 (emit_stlr): Likewise.
2053 (emit_data_processing_reg): Likewise.
2054 (emit_data_processing): Likewise.
2055 (emit_add): Likewise.
2056 (emit_sub): Likewise.
2057 (emit_mov): Likewise.
2058 (emit_movk): Likewise.
2059 (emit_mov_addr): Likewise.
2060 (emit_mrs): Likewise.
2061 (emit_msr): Likewise.
2062 (emit_sevl): Likewise.
2063 (emit_wfe): Likewise.
2064 (append_insns): Likewise.
2065 (can_encode_int32_in): New helper function.
2066 (aarch64_relocate_instruction): New function.
2067 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2068 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2069 (struct linux_target_ops): Install aarch64_get_thread_area,
2070 aarch64_install_fast_tracepoint_jump_pad and
2071 aarch64_get_min_fast_tracepoint_insn_len.
2072
787749ea
PL
20732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2074
2075 * Makefile.in (aarch64-insn.o): New rule.
2076 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2077
9812b2e6
YQ
20782015-09-21 Yao Qi <yao.qi@linaro.org>
2079
2080 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2081
18fe412b
YQ
20822015-09-21 Yao Qi <yao.qi@linaro.org>
2083
2084 * tracepoint.c (max_jump_pad_size): Remove.
2085
a0cc84cd
YQ
20862015-09-18 Yao Qi <yao.qi@linaro.org>
2087
2088 * linux-aarch64-low.c: Don't include sys/uio.h.
2089 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2090
d78908cf
WW
20912015-09-16 Wei-cheng Wang <cole945@gmail.com>
2092
2093 * tracepoint.c (eval_result_type): Change prototype.
2094 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2095
d57e0d50
PA
20962015-09-15 Pedro Alves <palves@redhat.com>
2097
2098 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2099 Check whether to report exec events instead of checking whether
2100 multiprocess is enabled.
2101
5a676acc
PA
21022015-09-15 Pedro Alves <palves@redhat.com>
2103
2104 PR remote/18965
2105 * remote-utils.c (prepare_resume_reply): Merge
2106 TARGET_WAITKIND_VFORK_DONE switch case with the
2107 TARGET_WAITKIND_FORKED case.
2108
7c5d0fad
YQ
21092015-09-15 Yao Qi <yao.qi@linaro.org>
2110
2111 * server.c (handle_query): Check string comparison using
2112 "else if" instead of "if".
2113
750ce8d1
YQ
21142015-09-15 Yao Qi <yao.qi@linaro.org>
2115
2116 * server.c (vCont_supported): New global variable.
2117 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2118 matches. Append ";vContSupported+" to own_buf.
2119 (handle_v_requests): Append ";s;S" to own_buf if target supports
2120 hardware single step or vCont_supported is false.
2121 (capture_main): Set vCont_supported to zero.
2122
70b90b91
YQ
21232015-09-15 Yao Qi <yao.qi@linaro.org>
2124
2125 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2126 it to ...
2127 (linux_supports_hardware_single_step): ... New function.
2128 (linux_target_ops): Update.
2129 * lynx-low.c (lynx_target_ops): Set field
2130 supports_hardware_single_step to target_can_do_hardware_single_step.
2131 * nto-low.c (nto_target_ops): Likewise.
2132 * spu-low.c (spu_target_ops): Likewise.
2133 * win32-low.c (win32_target_ops): Likewise.
2134 * target.c (target_can_do_hardware_single_step): New function.
2135 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2136 Remove. <supports_hardware_single_step>: New field.
2137 (target_supports_conditional_breakpoints): Remove.
2138 (target_supports_hardware_single_step): New macro.
2139 (target_can_do_hardware_single_step): Declare.
2140 * server.c (handle_query): Use target_supports_hardware_single_step
2141 instead of target_supports_conditional_breakpoints.
2142
ade90bde
YQ
21432015-09-15 Yao Qi <yao.qi@linaro.org>
2144
2145 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2146 function.
2147 (struct linux_target_ops the_low_target): Install
2148 aarch64_linux_siginfo_fixup.
2149
94585166
DB
21502015-09-11 Don Breazeal <donb@codesourcery.com>
2151 Luis Machado <lgustavo@codesourcery.com>
2152
2153 * linux-low.c (linux_mourn): Static declaration.
2154 (linux_arch_setup): Move in front of
2155 handle_extended_wait.
2156 (linux_arch_setup_thread): New function.
2157 (handle_extended_wait): Handle exec events. Call
2158 linux_arch_setup_thread. Make event_lwp argument a
2159 pointer-to-a-pointer.
2160 (check_zombie_leaders): Do not check stopped threads.
2161 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2162 (linux_low_filter_event): Add lwp and thread for exec'ing
2163 non-leader thread if leader thread has been deleted.
2164 Refactor code into linux_arch_setup_thread and call it.
2165 Pass child lwp pointer by reference to handle_extended_wait.
2166 (linux_wait_for_event_filtered): Update comment.
2167 (linux_wait_1): Prevent clobbering exec event status.
2168 (linux_supports_exec_events): New function.
2169 (linux_target_ops) <supports_exec_events>: Initialize new member.
2170 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2171 new member.
2172 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2173 * server.c (report_exec_events): New global variable.
2174 (handle_query): Handle qSupported query for exec-events feature.
2175 (captured_main): Initialize report_exec_events.
2176 * server.h (report_exec_events): Declare new global variable.
2177 * target.h (struct target_ops) <supports_exec_events>: New
2178 member.
2179 (target_supports_exec_events): New macro.
2180 * win32-low.c (win32_target_ops) <supports_exec_events>:
2181 Initialize new member.
2182
0568462b
MM
21832015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2184
2185 * linux-low.c (linux_low_enable_btrace): Remove.
2186 (linux_target_ops): Replace linux_low_enable_btrace with
2187 linux_enable_btrace.
2188
39edd165
YQ
21892015-09-03 Yao Qi <yao.qi@linaro.org>
2190
2191 * linux-aarch64-low.c (aarch64_insert_point): Call
2192 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2193 returns true.
2194
1db33b5a
UW
21952015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2196
2197 * linux-low.c (check_stopped_by_breakpoint): Use
2198 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2199
ab290430
PA
22002015-08-27 Pedro Alves <palves@redhat.com>
2201
2202 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2203
8d749320
SM
22042015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2205
6711b7f8
SM
2206 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2207 the XNEW-family equivalent.
8d749320
SM
2208 (compile_bytecodes): Likewise.
2209 * dll.c (loaded_dll): Likewise.
2210 * event-loop.c (append_callback_event): Likewise.
2211 (create_file_handler): Likewise.
2212 (create_file_event): Likewise.
2213 * hostio.c (handle_open): Likewise.
2214 * inferiors.c (add_thread): Likewise.
2215 (add_process): Likewise.
2216 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2217 * linux-arm-low.c (arm_new_process): Likewise.
2218 (arm_new_thread): Likewise.
2219 * linux-low.c (add_to_pid_list): Likewise.
2220 (linux_add_process): Likewise.
2221 (handle_extended_wait): Likewise.
2222 (add_lwp): Likewise.
2223 (enqueue_one_deferred_signal): Likewise.
2224 (enqueue_pending_signal): Likewise.
2225 (linux_resume_one_lwp_throw): Likewise.
2226 (linux_resume_one_thread): Likewise.
2227 (linux_read_memory): Likewise.
2228 (linux_write_memory): Likewise.
2229 * linux-mips-low.c (mips_linux_new_process): Likewise.
2230 (mips_linux_new_thread): Likewise.
2231 (mips_add_watchpoint): Likewise.
2232 * linux-x86-low.c (initialize_low_arch): Likewise.
2233 * lynx-low.c (lynx_add_process): Likewise.
2234 * mem-break.c (set_raw_breakpoint_at): Likewise.
2235 (set_breakpoint): Likewise.
2236 (add_condition_to_breakpoint): Likewise.
2237 (add_commands_to_breakpoint): Likewise.
2238 (clone_agent_expr): Likewise.
2239 (clone_one_breakpoint): Likewise.
2240 * regcache.c (new_register_cache): Likewise.
2241 * remote-utils.c (look_up_one_symbol): Likewise.
2242 * server.c (queue_stop_reply): Likewise.
2243 (start_inferior): Likewise.
2244 (queue_stop_reply_callback): Likewise.
2245 (handle_target_event): Likewise.
2246 * spu-low.c (fetch_ppc_memory): Likewise.
2247 (store_ppc_memory): Likewise.
2248 * target.c (set_target_ops): Likewise.
2249 * thread-db.c (thread_db_load_search): Likewise.
2250 (try_thread_db_load_1): Likewise.
2251 * tracepoint.c (add_tracepoint): Likewise.
2252 (add_tracepoint_action): Likewise.
2253 (create_trace_state_variable): Likewise.
2254 (cmd_qtdpsrc): Likewise.
2255 (cmd_qtro): Likewise.
2256 (add_while_stepping_state): Likewise.
2257 * win32-low.c (child_add_thread): Likewise.
2258 (get_image_name): Likewise.
2259
ed8b7b42
YQ
22602015-08-25 Yao Qi <yao.qi@linaro.org>
2261
2262 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2263
db3cb7cb
YQ
22642015-08-25 Yao Qi <yao.qi@linaro.org>
2265
2266 * Makefile.in (aarch64-linux.o): New rule.
2267 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2268 srv_tgtobj.
2269 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2270 (aarch64_init_debug_reg_state): Make it extern.
2271 (aarch64_linux_prepare_to_resume): Remove.
2272
f6011a1c
YQ
22732015-08-25 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2276 lwp_arch_private_info and ptid_of_lwp.
2277
88e2cf7e
YQ
22782015-08-25 Yao Qi <yao.qi@linaro.org>
2279
2280 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2281 Find proc_info by find_process_pid. All callers updated.
2282
5e35436e
YQ
22832015-08-25 Yao Qi <yao.qi@linaro.org>
2284
2285 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2286 Remove.
2287 (debug_reg_change_callback): Remove.
2288 (aarch64_notify_debug_reg_change): Remove.
2289
4a8a7965
YQ
22902015-08-25 Yao Qi <yao.qi@linaro.org>
2291
2292 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2293 Call current_lwp_ptid.
2294
32a271ee
YQ
22952015-08-25 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-aarch64-low.c (debug_reg_change_callback): Use
2298 debug_printf.
2299
0d51c8d7
YQ
23002015-08-25 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2303
31a43dd5
YQ
23042015-08-25 Yao Qi <yao.qi@linaro.org>
2305
2306 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2307
8ee52567
YQ
23082015-08-25 Yao Qi <yao.qi@linaro.org>
2309
2310 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2311 the code.
2312
ff3f0f45
YQ
23132015-08-25 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2316 Remove.
2317 (debug_reg_change_callback): Remove argument entry and add argument
2318 lwp. Remove local variable thread. Don't print thread id in the
2319 debugging output. Don't check whether pid of thread equals to pid.
2320 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2321 iterate_over_lwps instead find_inferior.
2322
3d40fbb5
PA
23232015-08-24 Pedro Alves <palves@redhat.com>
2324
2325 * inferiors.c (get_first_process): New function.
2326 * inferiors.h (get_first_process): New declaration.
2327 * remote-utils.c (read_ptid): Default to the first process in the
2328 list, instead of to the current thread's process.
2329
438e1e42
PA
23302015-08-24 Pedro Alves <palves@redhat.com>
2331
2332 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2333 * event-loop.c: Likewise.
2334 * remote-utils.c: Likewise.
2335 * tracepoint.c: Likewise.
2336
a8c6d4fc
PA
23372015-08-24 Pedro Alves <palves@redhat.com>
2338
2339 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2340 ptid_get_lwp.
2341
99b0bb12
PA
23422015-08-21 Pedro Alves <palves@redhat.com>
2343
2344 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2345 instead of literal 1.
2346
f8904751
PA
23472015-08-21 Pedro Alves <palves@redhat.com>
2348
2349 * tdesc.c (default_description): Explicitly zero-initialize.
2350
465a859e
PA
23512015-08-21 Pedro Alves <palves@redhat.com>
2352
2353 PR gdb/18749
2354 * inferiors.c (remove_thread): Discard any pending stop reply for
2355 this thread.
2356 * server.c (remove_all_on_match_pid): Rename to ...
2357 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2358 instead of a pid.
2359 (discard_queued_stop_replies): Change parameter to a ptid. Now
2360 extern.
2361 (handle_v_kill, kill_inferior_callback, captured_main)
2362 (process_serial_event): Adjust.
2363 * server.h (discard_queued_stop_replies): Declare.
2364
f0db101d
PA
23652015-08-21 Pedro Alves <palves@redhat.com>
2366
2367 * linux-low.c (wait_for_sigstop): Always switch to no thread
2368 selected if the previously current thread dies.
2369 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2370 process instead of the current thread's.
2371 * remote-utils.c (input_interrupt): Don't check if there's no
2372 current thread.
2373 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2374 current thread to the general thread fails, error out.
2375 (handle_qxfer_auxv, handle_qxfer_libraries)
2376 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2377 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2378 (handle_query): Check if there's a thread selected instead of
2379 checking whether there's any thread in the thread list.
2380 (handle_qxfer_threads, handle_qxfer_btrace)
2381 (handle_qxfer_btrace_conf): Don't error out early if there's no
2382 thread in the thread list.
2383 (handle_v_cont, myresume): Don't set the current thread to the
2384 continue thread.
2385 (process_serial_event) <Hg handling>: Also set thread_id if the
2386 previous general thread is still alive.
2387 (process_serial_event) <g/G handling>: If setting the current
2388 thread to the general thread fails, error out.
2389 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2390 thread's lwp instead of the current thread's.
2391 * target.c (set_desired_thread): If the desired thread was not
2392 found, leave the current thread pointing to NULL. Return an int
2393 (boolean) indicating success.
2394 * target.h (set_desired_thread): Change return type to int.
2395
40045d91
MF
23962015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2397
2398 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2399 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2400 #includes.
2401 (ps_get_thread_area): New function.
2402
45face3b
GB
24032015-08-19 Gary Benson <gbenson@redhat.com>
2404
2405 * hostio.c (handle_pread): Do not attempt to read more data
2406 than hostio_reply_with_data can fit in a packet.
2407
16d5f642
JB
24082015-08-18 Joel Brobecker <brobecker@adacore.com>
2409
2410 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2411
a738da3a
MF
24122015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2413
2414 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2415
33ebda9d
PA
24162015-08-06 Pedro Alves <palves@redhat.com>
2417
2418 * tracepoint.c (expr_eval_result): Now an int.
2419
a44892be
PA
24202015-08-06 Pedro Alves <palves@redhat.com>
2421
2422 * gdbthread.h (struct regcache): Forward declare.
2423 (struct thread_info) <regcache_data>: Now a struct regcache
2424 pointer.
2425 * inferiors.c (inferior_regcache_data)
2426 (set_inferior_regcache_data): Now work with struct regcache
2427 pointers.
2428 * inferiors.h (struct regcache): Forward declare.
2429 (inferior_regcache_data, set_inferior_regcache_data): Now work
2430 with struct regcache pointers.
2431 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2432 (free_register_cache_thread): Remove struct regcache pointer
2433 casts.
2434
608a1e46
PA
24352015-08-06 Pedro Alves <palves@redhat.com>
2436
2437 * server.c (captured_main): On error, print the exception message
2438 to stderr, and if run_once is set, throw a quit.
2439
f0ce0d3a
PA
24402015-08-06 Pedro Alves <palves@redhat.com>
2441
2442 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2443 the current thread.
2444
bf47e248
PA
24452015-08-06 Pedro Alves <palves@redhat.com>
2446
2447 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2448 reading beyond the passed in buffer length.
2449
b6b9ffcc
PL
24502015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2451
2452 * tracepoint.c (symbol_list) <required>: Remove.
2453
863d01bd
PA
24542015-08-06 Pedro Alves <palves@redhat.com>
2455
2456 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2457 count if stopping and suspending threads.
2458 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2459 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2460 (linux_detach): Complete an ongoing step-over.
2461 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2462 throughout.
2463 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2464 (linux_wait_1): If passing a signal to the inferior after
2465 finishing a step-over, unsuspend and re-resume all lwps. If we
2466 see a single-step event but the thread should be continuing, don't
2467 pass the trap to gdb.
2468 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2469 internal_error instead of gdb_assert.
2470 (enqueue_pending_signal): New function.
2471 (check_ptrace_stopped_lwp_gone): Add debug output.
2472 (start_step_over): Use internal_error instead of gdb_assert.
2473 (complete_ongoing_step_over): New function.
2474 (linux_resume_one_thread): Don't resume a suspended thread.
2475 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2476 it stepping.
2477
00db26fa
PA
24782015-08-06 Pedro Alves <palves@redhat.com>
2479
2480 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2481 (linux_thread_alive): Use lwp_is_marked_dead.
2482 (extended_event_reported): Delete.
2483 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2484 instead of extended_event_reported.
2485 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2486 as well.
2487 (lwp_is_marked_dead): New function.
2488 (lwp_running): Use lwp_is_marked_dead.
2489 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2490 comment.
2491
ad071a30
PA
24922015-08-06 Pedro Alves <palves@redhat.com>
2493
2494 * linux-low.c (linux_wait_1): Move fork event output out of the
2495 !report_to_gdb check. Pass event_child->waitstatus to
2496 target_waitstatus_to_string instead of ourstatus.
2497
524b57e6
YQ
24982015-08-04 Yao Qi <yao.qi@linaro.org>
2499
2500 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2501 if current_thread is 32 bit.
2502
6085d6f6
YQ
25032015-08-04 Yao Qi <yao.qi@linaro.org>
2504
2505 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2506 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2507 * server.c (extended_protocol): Remove "static".
2508 * server.h (extended_protocol): Declare it.
2509
8a7e4587
YQ
25102015-08-04 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2513 both aarch64 and aarch32.
2514 (aarch64_set_pc): Likewise.
2515
3b53ae99
YQ
25162015-08-04 Yao Qi <yao.qi@linaro.org>
2517
2518 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2519 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2520 arm-with-neon.xml to srv_xmlfiles.
2521 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2522 (is_64bit_tdesc): New function.
2523 (aarch64_linux_read_description): New function.
2524 (aarch64_arch_setup): Call aarch64_linux_read_description.
2525 (regs_info): Rename to regs_info_aarch64.
2526 (aarch64_regs_info): Return right regs_info.
2527 (initialize_low_arch): Call initialize_low_arch_aarch32.
2528
bd9e6534
YQ
25292015-08-04 Yao Qi <yao.qi@linaro.org>
2530
2531 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2532 * linux-aarch32-low.c: New file.
2533 * linux-aarch32-low.h: New file.
2534 * linux-arm-low.c (arm_fill_gregset): Move it to
2535 linux-aarch32-low.c.
2536 (arm_store_gregset): Likewise.
2537 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2538 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2539 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2540 (regs_info): Rename to regs_info_arm.
2541 (arm_regs_info): Return regs_info_aarch32 if
2542 have_ptrace_getregset is 1 and target description is
2543 arm_with_neon or arm_with_vfpv3.
2544 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2545 Call initialize_low_arch_aarch32 instead.
2546
ded48a5e
YQ
25472015-08-04 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2550 * linux-low.c: ... here.
2551 * linux-low.h (have_ptrace_getregset): Declare it.
2552
96e9210f
PA
25532015-08-04 Pedro Alves <palves@redhat.com>
2554
2555 * thread-db.c (struct thread_db): Use new typedefs.
2556 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2557 CHK calls.
2558 (disable_thread_event_reporting): Cast result of dlsym to
2559 destination function pointer type.
2560 (thread_db_mourn): Use td_ta_delete_ftype.
2561
af60a1ef
SL
25622015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2563
2564 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2565 arch variant.
2566 (CDX_BREAKPOINT): Define for R2.
2567 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2568 (the_low_target): Add comments.
2569
e8b41681
YQ
25702015-07-30 Yao Qi <yao.qi@linaro.org>
2571
2572 * linux-arm-low.c (arm_hwcap): Remove it.
2573 (arm_read_description): New local variable arm_hwcap. Don't
2574 set arm_hwcap to zero.
2575
89abb039
YQ
25762015-07-30 Yao Qi <yao.qi@linaro.org>
2577
2578 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2579 Use regcache->tdesc instead.
2580 (arm_store_wmmxregset): Likewise.
2581 (arm_fill_vfpregset): Likewise.
2582 (arm_store_vfpregset): Likewise.
2583
deca266c
YQ
25842015-07-30 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-arm-low.c: Include arch/arm.h.
2587 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2588 (arm_store_gregset): Likewise.
2589
aa58a496
SM
25902015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2591
2592 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2593 ptrace's 4th parameter.
2594
50904b25
YQ
25952015-07-27 Yao Qi <yao.qi@linaro.org>
2596
2597 * configure.srv (case aarch64*-*-linux*): Don't set
2598 srv_linux_usrregs.
2599
5826e159
PA
26002015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2601
2602 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2603 sys/ptrace.h.
2604 * linux-arm-low.c: Likewise.
2605 * linux-cris-low.c: Likewise.
2606 * linux-crisv32-low.c: Likewise.
2607 * linux-low.c: Likewise.
2608 * linux-m68k-low.c: Likewise.
2609 * linux-mips-low.c: Likewise.
2610 * linux-nios2-low.c: Likewise.
2611 * linux-s390-low.c: Likewise.
2612 * linux-sparc-low.c: Likewise.
2613 * linux-tic6x-low.c: Likewise.
2614 * linux-tile-low.c: Likewise.
2615 * linux-x86-low.c: Likewise.
2616
54019719
PA
26172015-07-24 Pedro Alves <palves@redhat.com>
2618
2619 * config.in: Regenerate.
2620 * configure: Regenerate.
2621
eb7aa561
PA
26222015-07-24 Pedro Alves <palves@redhat.com>
2623
2624 * acinclude.m4: Include ../ptrace.m4.
2625 * configure.ac: Call GDB_AC_PTRACE.
2626 * config.in, configure: Regenerate.
2627
55d7b841
YQ
26282015-07-24 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-low.c (linux_create_inferior): Remove setting to
2631 proc->priv->new_inferior.
2632 (linux_attach): Likewise.
2633 (linux_low_filter_event): Likewise.
2634 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2635
c06cbd92
YQ
26362015-07-24 Yao Qi <yao.qi@linaro.org>
2637
2638 * linux-low.c (linux_arch_setup): New function.
2639 (linux_low_filter_event): If proc->tdesc is NULL and
2640 proc->attached is true, call the_low_target.arch_setup.
2641 Otherwise, keep status pending, and return.
2642 (linux_resume_one_lwp_throw): Don't call get_pc if
2643 thread->while_stepping isn't NULL. Don't call
2644 get_thread_regcache if proc->tdesc is NULL.
2645 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2646 (linux_target_ops): Install arch_setup.
2647 * server.c (start_inferior): Call the_target->arch_setup.
2648 * target.h (struct target_ops) <arch_setup>: New field.
2649 (target_arch_setup): New marco.
2650 * lynx-low.c (lynx_target_ops): Update.
2651 * nto-low.c (nto_target_ops): Update.
2652 * spu-low.c (spu_target_ops): Update.
2653 * win32-low.c (win32_target_ops): Update.
2654
5ae3ebba
YQ
26552015-07-24 Yao Qi <yao.qi@linaro.org>
2656
2657 * linux-low.c (linux_add_process): Don't set
2658 proc->priv->new_inferior.
2659 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2660 (linux_attach): Likewise.
2661
eb97750b
YQ
26622015-07-24 Yao Qi <yao.qi@linaro.org>
2663
2664 * server.c (start_inferior): Code refactor.
2665
51aee833
YQ
26662015-07-24 Yao Qi <yao.qi@linaro.org>
2667
2668 * server.c (process_serial_event): Set general_thread.
2669
af1b22f3
YQ
26702015-07-21 Yao Qi <yao.qi@linaro.org>
2671
2672 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2673 aarch64_linux_get_debug_reg_capacity.
2674
554717a3
YQ
26752015-07-17 Yao Qi <yao.qi@linaro.org>
2676
2677 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2678 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2679 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2680 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2681 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2682 (AARCH64_HWP_ALIGNMENT): Likewise.
2683 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2684 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2685 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2686 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2687 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2688 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2689 (struct aarch64_debug_reg_state): Likewise.
2690 (struct arch_lwp_info): Likewise.
2691 (aarch64_align_watchpoint): Likewise.
2692 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2693 (aarch64_watchpoint_length): Likewise.
2694 (aarch64_point_encode_ctrl_reg): Likewise
2695 (aarch64_point_is_aligned): Likewise.
2696 (aarch64_align_watchpoint): Likewise.
2697 (aarch64_linux_set_debug_regs):
2698 (aarch64_dr_state_insert_one_point): Likewise.
2699 (aarch64_dr_state_remove_one_point): Likewise.
2700 (aarch64_handle_breakpoint): Likewise.
2701 (aarch64_handle_aligned_watchpoint): Likewise.
2702 (aarch64_handle_unaligned_watchpoint): Likewise.
2703 (aarch64_handle_watchpoint): Likewise.
2704
c67ca4de
YQ
27052015-07-17 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2708 and don't aarch64_get_debug_reg_state. All callers update.
2709 (aarch64_handle_aligned_watchpoint): Likewise.
2710 (aarch64_handle_unaligned_watchpoint): Likewise.
2711 (aarch64_handle_watchpoint): Likewise.
2712 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2713 (aarch64_remove_point): Likewise.
2714
25abf979
YQ
27152015-07-17 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2718 debug_printf.
2719 (aarch64_handle_unaligned_watchpoint): Likewise.
2720
db1ff28b
JK
27212015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2722
2723 Revert the previous 3 commits:
2724 Move gdb_regex* to common/
2725 Move linux_find_memory_regions_full & co.
2726 gdbserver build-id attribute generator
2727
700ca40f
JK
27282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2729 Jan Kratochvil <jan.kratochvil@redhat.com>
2730
2731 gdbserver build-id attribute generator.
2732 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2733 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2734 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2735 (find_phdr): New.
2736 (get_dynamic): Use find_pdhr to traverse program headers.
2737 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2738 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2739 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2740 (get_hex_build_id): New.
2741 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2742 to reply XML document.
2743
9904185c
JK
27442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2745 Jan Kratochvil <jan.kratochvil@redhat.com>
2746
2747 * target.c: Include target/target-utils.h and fcntl.h.
2748 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2749 (target_fileio_read_stralloc): New functions.
2750
6e5b4429
JK
27512015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2752
2753 * Makefile.in (OBS): Add gdb_regex.o.
2754 (gdb_regex.o): New.
2755 * config.in: Rebuilt.
2756 * configure: Rebuilt.
2757
ddc98fbf
JK
27582015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2759 Jan Kratochvil <jan.kratochvil@redhat.com>
2760
2761 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2762 * Makefile.in (OBS): Add target-utils.o.
2763 (linux-maps.o, target-utils.o): New.
2764 * configure.srv (srv_linux_obj): Add linux-maps.o.
2765
e57bb7a0
PL
27662015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2767
2768 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2769 function, return 1.
2770 (the_low_target): Install it.
2771
586b02a9
PA
27722015-07-14 Pedro Alves <palves@redhat.com>
2773
2774 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2775 Instead, ignore ECHILD, and throw an error for other errnos.
2776
58c1b36c
PA
27772015-07-10 Pedro Alves <palves@redhat.com>
2778
2779 * event-loop.c (struct callback_event) <data>: Change type to
2780 gdb_client_data instance instead of gdb_client_data pointer.
2781 (append_callback_event): Adjust.
2782
421530db
PL
27832015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2784
2785 * linux-aarch64-low.c: Add comments for each linux_target_ops
2786 method. Remove comments already covered in target_ops and
2787 linux_target_ops definitions.
2788 (the_low_target): Add comments for each unimplemented method.
2789
c2d65f38
YQ
27902015-07-09 Yao Qi <yao.qi@linaro.org>
2791
2792 * linux-aarch64-low.c (aarch64_regmap): Remove.
2793 (aarch64_usrregs_info): Remove.
2794 (regs_info): Set field usrregs to NULL.
2795
b20a6524
MM
27962015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2797
2798 * linux-low.c: Include "rsp-low.h"
2799 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2800 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2801 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2802 (handle_btrace_enable_pt): New.
2803 (handle_btrace_general_set): Support "pt".
2804 (handle_btrace_conf_general_set): Support "pt:size".
2805
96c97461
PL
28062015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2807
2808 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2809 Z_PACKET_SW_BP.
2810
37d66942
PL
28112015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2812
2813 * linux-aarch64-low.c: Remove comment about endianness.
2814 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2815 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2816 memcmp.
2817
dc06243f
GB
28182015-06-24 Gary Benson <gbenson@redhat.com>
2819
2820 * linux-i386-ipa.c (stdint.h): Do not include.
2821 * lynx-i386-low.c (stdint.h): Likewise.
2822 * lynx-ppc-low.c (stdint.h): Likewise.
2823 * mem-break.c (stdint.h): Likewise.
2824 * thread-db.c (stdint.h): Likewise.
2825 * tracepoint.c (stdint.h): Likewise.
2826 * win32-low.c (stdint.h): Likewise.
2827
124e13d9
SM
28282015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * server.c (write_qxfer_response): Update call to
2831 remote_escape_output.
2832
909c2cda
JK
28332015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2834 Jan Kratochvil <jan.kratochvil@redhat.com>
2835
2836 Merge multiple hex conversions.
2837 * gdbreplay.c (tohex): Rename to 'fromhex'.
2838 (logchar): Use fromhex.
2839
24c05f46
JK
28402015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2841
2842 * server.c (handle_qxfer_libraries): Set `version' attribute for
2843 <library-list>.
2844
14d2069a
GB
28452015-06-10 Gary Benson <gbenson@redhat.com>
2846
2847 * target.h (struct target_ops) <multifs_open>: New field.
2848 <multifs_unlink>: Likewise.
2849 <multifs_readlink>: Likewise.
2850 * linux-low.c (nat/linux-namespaces.h): New include.
2851 (linux_target_ops): Initialize the_target->multifs_open,
2852 the_target->multifs_unlink and the_target->multifs_readlink.
2853 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2854 * hostio.c (hostio_fs_pid): New static variable.
2855 (hostio_handle_new_gdb_connection): New function.
2856 (handle_setfs): Likewise.
2857 (handle_open): Use the_target->multifs_open as appropriate.
2858 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2859 (handle_readlink): Use the_target->multifs_readlink as
2860 appropriate.
2861 (handle_vFile): Handle vFile:setfs packets.
2862 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2863 after target_handle_new_gdb_connection.
2864
4b8b5e72
GB
28652015-06-10 Gary Benson <gbenson@redhat.com>
2866
2867 * configure.ac (AC_CHECK_FUNCS): Add setns.
2868 * config.in: Regenerate.
2869 * configure: Likewise.
2870 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2871 (linux-namespaces.o): New rule.
2872 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2873
3ac2e371
GB
28742015-06-09 Gary Benson <gbenson@redhat.com>
2875
2876 * hostio.c (handle_open): Process mode argument with
2877 fileio_to_host_mode.
2878
ca9b78ce
YQ
28792015-06-01 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2882 * linux-x86-low.c: Likewise.
2883
bfacd19d
DB
28842015-05-28 Don Breazeal <donb@codesourcery.com>
2885
2886 * linux-low.c (handle_extended_wait): Initialize
2887 thread_info.last_resume_kind for new fork children.
2888
452003ef
PA
28892015-05-15 Pedro Alves <palves@redhat.com>
2890
2891 * target.h (target_handle_new_gdb_connection): Rewrite using if
2892 wrapped in do/while.
2893
1041a03c
JB
28942015-05-14 Joel Brobecker <brobecker@adacore.com>
2895
2896 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2897 * configure, config.in: Regenerate.
2898 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2899 Declare typedef.
2900
c269dbdb
DB
29012015-05-12 Don Breazeal <donb@codesourcery.com>
2902
2903 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2904 PTRACE_EVENT_VFORK_DONE.
2905 (linux_low_ptrace_options, extended_event_reported): Add vfork
2906 events.
2907 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2908 and "vforkdone" for RSP 'T' Stop Reply Packet.
2909 * server.h (report_vfork_events): Declare
2910 global variable.
2911
3a8a0396
DB
29122015-05-12 Don Breazeal <donb@codesourcery.com>
2913
2914 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2915 (the_low_target) <new_fork>: Initialize new member.
2916 * linux-arm-low.c (arm_new_fork): New function.
2917 (the_low_target) <new_fork>: Initialize new member.
2918 * linux-low.c (handle_extended_wait): Call new target function
2919 new_fork.
2920 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2921 * linux-mips-low.c (mips_add_watchpoint): New function
2922 extracted from mips_insert_point.
2923 (the_low_target) <new_fork>: Initialize new member.
2924 (mips_linux_new_fork): New function.
2925 (mips_insert_point): Call mips_add_watchpoint.
2926 * linux-x86-low.c (x86_linux_new_fork): New function.
2927 (the_low_target) <new_fork>: Initialize new member.
2928
de0d863e
DB
29292015-05-12 Don Breazeal <donb@codesourcery.com>
2930
2931 * linux-low.c (handle_extended_wait): Implement return value,
2932 rename argument 'event_child' to 'event_lwp', handle
2933 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2934 (linux_low_ptrace_options): New function.
2935 (linux_low_filter_event): Call linux_low_ptrace_options,
2936 use different argument fo linux_enable_event_reporting,
2937 use return value from handle_extended_wait.
2938 (extended_event_reported): New function.
2939 (linux_wait_1): Call extended_event_reported and set
2940 status to report fork events.
2941 (linux_write_memory): Add pid to debug message.
2942 (reset_lwp_ptrace_options_callback): New function.
2943 (linux_handle_new_gdb_connection): New function.
2944 (linux_target_ops): Initialize new structure member.
2945 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2946 * lynx-low.c: Initialize new structure member.
2947 * remote-utils.c (prepare_resume_reply): Implement stop reason
2948 "fork" for "T" stop message.
2949 * server.c (handle_query): Call handle_new_gdb_connection.
2950 * server.h (report_fork_events): Declare global flag.
2951 * target.h (struct target_ops) <handle_new_gdb_connection>:
2952 New member.
2953 (target_handle_new_gdb_connection): New macro.
2954 * win32-low.c: Initialize new structure member.
2955
ddcbc397
DB
29562015-05-12 Don Breazeal <donb@codesourcery.com>
2957
2958 * mem-break.c (APPEND_TO_LIST): Define macro.
2959 (clone_agent_expr): New function.
2960 (clone_one_breakpoint): New function.
2961 (clone_all_breakpoints): New function.
2962 * mem-break.h: Declare new functions.
2963
89245bc0
DB
29642015-05-12 Don Breazeal <donb@codesourcery.com>
2965
2966 * linux-low.c (linux_supports_fork_events): New function.
2967 (linux_supports_vfork_events): New function.
2968 (linux_target_ops): Initialize new structure members.
2969 (initialize_low): Call linux_check_ptrace_features.
2970 * lynx-low.c (lynx_target_ops): Initialize new structure
2971 members.
2972 * server.c (report_fork_events, report_vfork_events):
2973 New global flags.
2974 (handle_query): Add new features to qSupported packet and
2975 response.
2976 (captured_main): Initialize new global variables.
2977 * target.h (struct target_ops) <supports_fork_events>:
2978 New member.
2979 <supports_vfork_events>: New member.
2980 (target_supports_fork_events): New macro.
2981 (target_supports_vfork_events): New macro.
2982 * win32-low.c (win32_target_ops): Initialize new structure
2983 members.
2984
835205d0
GB
29852015-05-12 Gary Benson <gbenson@redhat.com>
2986
2987 * server.c (handle_qxfer_exec_file): Use current process
2988 if annex is empty.
2989
21e94bd9
SL
29902015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2991
2992 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2993 Remove HAVE_PTRACE_GETREGS conditionals.
2994 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2995 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2996
45614f15
YQ
29972015-05-08 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-low.c (linux_supports_conditional_breakpoints): New
3000 function.
3001 (linux_target_ops): Install new target method.
3002 * lynx-low.c (lynx_target_ops): Install NULL hook for
3003 supports_conditional_breakpoints.
3004 * nto-low.c (nto_target_ops): Likewise.
3005 * spu-low.c (spu_target_ops): Likewise.
3006 * win32-low.c (win32_target_ops): Likewise.
3007 * server.c (handle_query): Check
3008 target_supports_conditional_breakpoints.
3009 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3010 New field.
3011 (target_supports_conditional_breakpoints): New macro.
3012
80ad801e
PA
30132015-05-06 Pedro Alves <palves@redhat.com>
3014
3015 PR server/18081
3016 * server.c (start_inferior): If the process exits, mourn it.
3017
819843c7
GB
30182015-04-21 Gary Benson <gbenson@redhat.com>
3019
3020 * hostio.c (fileio_open_flags_to_host): Factored out to
3021 fileio_to_host_openflags in common/fileio.c. Single use
3022 updated.
3023
a2d5a9d7
MF
30242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3025
3026 * linux-xtensa-low.c (xtensa_fill_gregset)
3027 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3028 XCHAL_HAVE_LOOP.
3029
deb44829
MF
30302015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3031
3032 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3033 (regs_info): Replace usrregs pointer with NULL.
3034
e57f1de3
GB
30352015-04-17 Gary Benson <gbenson@redhat.com>
3036
3037 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3038 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3039 * server.c (handle_qxfer_exec_file): New function.
3040 (qxfer_packets): Add exec-file entry.
3041 (handle_query): Report qXfer:exec-file:read as supported packet.
3042
62828379
RN
30432015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3044
3045 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3046
b88bb450
GB
30472015-04-09 Gary Benson <gbenson@redhat.com>
3048
3049 * hostio-errno.c (errno_to_fileio_error): Remove function.
3050 Update caller to use remote_fileio_to_fio_error.
3051
c8f4bfdd
YQ
30522015-04-09 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-low.c (linux_insert_point): Call
3055 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3056 (linux_remove_point): Call remove_memory_breakpoint if type is
3057 raw_bkpt_type_sw.
3058 * linux-x86-low.c (x86_insert_point): Don't call
3059 insert_memory_breakpoint.
3060 (x86_remove_point): Don't call remove_memory_breakpoint.
3061
41f98f02
PA
30622015-04-01 Pedro Alves <palves@redhat.com>
3063 Cleber Rosa <crosa@redhat.com>
3064
3065 * server.c (gdbserver_usage): Reorganize and extend the usage
3066 message.
3067
2bf6fb9d
PA
30682015-03-24 Pedro Alves <palves@redhat.com>
3069
3070 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3071 output. Also dump TRAP_TRACE.
3072 (linux_low_filter_event): In debug output, distinguish a
3073 resume_stop SIGSTOP from a delayed SIGSTOP.
3074
369f6daa
GB
30752015-03-24 Gary Benson <gbenson@redhat.com>
3076
3077 * linux-x86-low.c (x86_linux_new_thread): Moved to
3078 nat/x86-linux.c.
3079 (x86_linux_prepare_to_resume): Likewise.
3080
8e5d4070
GB
30812015-03-24 Gary Benson <gbenson@redhat.com>
3082
3083 * Makefile.in (x86-linux-dregs.o): New rule.
3084 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3085 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3086 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3087 (x86_linux_dr_get): Likewise.
3088 (x86_linux_dr_set): Likewise.
3089 (update_debug_registers_callback): Likewise.
3090 (x86_linux_dr_set_addr): Likewise.
3091 (x86_linux_dr_get_addr): Likewise.
3092 (x86_linux_dr_set_control): Likewise.
3093 (x86_linux_dr_get_control): Likewise.
3094 (x86_linux_dr_get_status): Likewise.
3095 (x86_linux_update_debug_registers): Likewise.
3096
2b95d440
GB
30972015-03-24 Gary Benson <gbenson@redhat.com>
3098
3099 * linux-x86-low.c (x86_linux_update_debug_registers):
3100 New function, factored out from...
3101 (x86_linux_prepare_to_resume): ...this.
3102
14b0bc68
GB
31032015-03-24 Gary Benson <gbenson@redhat.com>
3104
3105 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3106 (x86_linux_dr_set): Likewise.
3107 (update_debug_registers_callback): Likewise.
3108 (x86_linux_dr_set_addr): Likewise.
3109 (x86_linux_dr_get_addr): Likewise.
3110 (x86_linux_dr_set_control): Likewise.
3111 (x86_linux_dr_get_control): Likewise.
3112 (x86_linux_dr_get_status): Likewise.
3113 (x86_linux_prepare_to_resume): Likewise.
3114
5dfe6ca8
GB
31152015-03-24 Gary Benson <gbenson@redhat.com>
3116
3117 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3118 Use perror_with_name. Pass string through gettext.
3119 (x86_linux_dr_set): Likewise.
3120
d33472ad
GB
31212015-03-24 Gary Benson <gbenson@redhat.com>
3122
3123 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3124 (x86_linux_dr_set_addr): ...this.
3125 (x86_dr_low_get_addr): Rename to...
3126 (x86_linux_dr_get_addr): ...this.
3127 (x86_dr_low_set_control): Rename to...
3128 (x86_linux_dr_set_control): ...this.
3129 (x86_dr_low_get_control): Rename to...
3130 (x86_linux_dr_get_control): ...this.
3131 (x86_dr_low_get_status): Rename to...
3132 (x86_linux_dr_get_status): ...this.
3133 (x86_dr_low): Update with new function names.
3134
4b134ca1
GB
31352015-03-24 Gary Benson <gbenson@redhat.com>
3136
3137 * Makefile.in (x86-linux.o): New rule.
3138 * configure.srv: Add x86-linux.o to relevant targets.
3139 * linux-low.c (lwp_set_arch_private_info): New function.
3140 (lwp_arch_private_info): Likewise.
3141 * linux-x86-low.c: Include nat/x86-linux.h.
3142 (arch_lwp_info): Removed structure.
3143 (update_debug_registers_callback):
3144 Use lwp_set_debug_registers_changed.
3145 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3146 and lwp_set_debug_registers_changed.
3147 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3148
34c703da
GB
31492015-03-24 Gary Benson <gbenson@redhat.com>
3150
3151 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3152 * linux-arm-low.c (arm_new_thread): Likewise.
3153 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3154 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3155 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3156 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3157
cff068da
GB
31582015-03-24 Gary Benson <gbenson@redhat.com>
3159
3160 * linux-low.c (ptid_of_lwp): New function.
3161 (lwp_is_stopped): Likewise.
3162 (lwp_stop_reason): Likewise.
3163 * linux-x86-low.c (update_debug_registers_callback):
3164 Use lwp_is_stopped.
3165 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3166 lwp_stop_reason.
3167
b2f7c7e8
GB
31682015-03-24 Gary Benson <gbenson@redhat.com>
3169
3170 * linux-low.h (linux_stop_lwp): Remove declaration.
3171
6d4ee8c6
GB
31722015-03-24 Gary Benson <gbenson@redhat.com>
3173
3174 * linux-low.h: Include nat/linux-nat.h.
3175 * linux-low.c (iterate_over_lwps_args): New structure.
3176 (iterate_over_lwps_filter): New function.
3177 (iterate_over_lwps): Likewise.
3178 * linux-x86-low.c (update_debug_registers_callback):
3179 Update signature to what iterate_over_lwps expects.
3180 Remove PID check that iterate_over_lwps now performs.
3181 (x86_dr_low_set_addr): Use iterate_over_lwps.
3182 (x86_dr_low_set_control): Likewise.
3183
70a0bb6b
GB
31842015-03-24 Gary Benson <gbenson@redhat.com>
3185
3186 * linux-x86-low.c (x86_debug_reg_state): New function.
3187 (x86_linux_prepare_to_resume): Use the above.
3188
7b669087
GB
31892015-03-24 Gary Benson <gbenson@redhat.com>
3190
3191 * linux-low.c (current_lwp_ptid): New function.
3192 * linux-x86-low.c: Include nat/linux-nat.h.
3193 (x86_dr_low_get_addr): Use current_lwp_ptid.
3194 (x86_dr_low_get_control): Likewise.
3195 (x86_dr_low_get_status): Likewise.
3196
eef49a3d
PA
31972015-03-20 Pedro Alves <palves@redhat.com>
3198
3199 * tracepoint.c (cmd_qtstatus): Make "str" const.
3200
b2333d22
PA
32012015-03-20 Pedro Alves <palves@redhat.com>
3202
3203 * server.c (handle_general_set): Make "req_str" const.
3204
23f238d3
PA
32052015-03-19 Pedro Alves <palves@redhat.com>
3206
3207 * linux-low.c (linux_resume_one_lwp): Rename to ...
3208 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3209 instead call perror_with_name.
3210 (check_ptrace_stopped_lwp_gone): New function.
3211 (linux_resume_one_lwp): Reimplement as wrapper around
3212 linux_resume_one_lwp_throw that swallows errors if the LWP is
3213 gone.
3214
91baf43f
PA
32152015-03-19 Pedro Alves <palves@redhat.com>
3216
3217 * linux-low.c (count_events_callback, select_event_lwp_callback):
3218 No longer check whether the thread has resume_stop as last resume
3219 kind.
3220
8bf3b159
PA
32212015-03-19 Pedro Alves <palves@redhat.com>
3222
3223 * linux-low.c (count_events_callback, select_event_lwp_callback):
3224 Use the lwp's status_pending_p field, not the thread's.
3225
b90fc188
PA
32262015-03-19 Pedro Alves <palves@redhat.com>
3227
3228 * linux-low.c (select_event_lwp_callback): Update comments to
3229 no longer mention SIGTRAP.
3230
464b0089
GB
32312015-03-18 Gary Benson <gbenson@redhat.com>
3232
3233 * server.c (handle_query): Do not report vFile:fstat as supported.
3234
aa9e327f
GB
32352015-03-11 Gary Benson <gbenson@redhat.com>
3236
3237 * hostio.c (sys/types.h): New include.
3238 (sys/stat.h): Likewise.
3239 (common-remote-fileio.h): Likewise.
3240 (handle_fstat): New function.
3241 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3242
791c0056
GB
32432015-03-11 Gary Benson <gbenson@redhat.com>
3244
3245 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3246 struct stat.st_blocks and struct stat.st_blksize.
3247 * configure: Regenerate.
3248 * config.in: Likewise.
3249 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3250 (OBS): Add common-remote-fileio.o.
3251 (common-remote-fileio.o): New rule.
3252
9a9df970
PA
32532015-03-09 Pedro Alves <palves@redhat.com>
3254
3255 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3256 'struct sockaddr' pointer in 'accept' call.
3257
9eb1356e
PA
32582015-03-09 Pedro Alves <palves@redhat.com>
3259
3260 Revert:
3261 2015-03-07 Pedro Alves <palves@redhat.com>
3262 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3263 or <winsock2.h> here. Instead include "gdb_socket.h".
3264 (remote_open): Use union gdb_sockaddr_u.
3265 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3266 or <winsock2.h> here. Instead include "gdb_socket.h".
3267 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3268 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3269 or <sys/un.h>.
3270 (init_named_socket, gdb_agent_helper_thread): Use union
3271 gdb_sockaddr_u.
3272
aac331e4
PA
32732015-03-07 Pedro Alves <palves@redhat.com>
3274
3275 * configure.ac (build_warnings): Move
3276 -Wdeclaration-after-statement to the C-specific set.
3277 * configure: Regenerate.
3278
366c75fc
PA
32792015-03-07 Pedro Alves <palves@redhat.com>
3280
3281 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3282 or <winsock2.h> here. Instead include "gdb_socket.h".
3283 (remote_open): Use union gdb_sockaddr_u.
3284 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3285 or <winsock2.h> here. Instead include "gdb_socket.h".
3286 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3287 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3288 or <sys/un.h>.
3289 (init_named_socket, gdb_agent_helper_thread): Use union
3290 gdb_sockaddr_u.
3291
492d29ea
PA
32922015-03-07 Pedro Alves <palves@redhat.com>
3293
3294 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3295 instead.
3296
60a191ed
YQ
32972015-03-06 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-aarch64-low.c (aarch64_insert_point): Use
3300 show_debug_regs as a boolean.
3301 (aarch64_remove_point): Likewise.
3302
f5771b1d
PA
33032015-03-05 Pedro Alves <palves@redhat.com>
3304
3305 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3306 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3307 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3308 * nto-low.c (nto_target_ops): Likewise.
3309 * spu-low.c (spu_target_ops): Likewise.
3310 * win32-low.c (win32_target_ops): Likewise.
3311
3e572f71
PA
33122015-03-04 Pedro Alves <palves@redhat.com>
3313
72f4393d 3314 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3315 Decide whether a breakpoint triggered based on the SIGTRAP's
3316 siginfo.si_code.
72f4393d
L
3317 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3318 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3319 (linux_low_filter_event): Check for breakpoints before checking
3320 watchpoints.
3321 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3322 siginfo.si_code.
72f4393d
L
3323 (linux_stopped_by_sw_breakpoint)
3324 (linux_supports_stopped_by_sw_breakpoint)
3325 (linux_stopped_by_hw_breakpoint)
3326 (linux_supports_stopped_by_hw_breakpoint): New functions.
3327 (linux_target_ops): Install new target methods.
3e572f71 3328
1ec68e26
PA
33292015-03-04 Pedro Alves <palves@redhat.com>
3330
3331 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3332 * server.c (swbreak_feature, hwbreak_feature): New globals.
3333 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3334 (captured_main): Clear swbreak_feature and hwbreak_feature.
3335 * server.h (swbreak_feature, hwbreak_feature): Declare.
3336 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3337 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3338 supports_stopped_by_hw_breakpoint>: New fields.
3339 (target_supports_stopped_by_sw_breakpoint)
3340 (target_stopped_by_sw_breakpoint)
3341 (target_supports_stopped_by_hw_breakpoint)
3342 (target_stopped_by_hw_breakpoint): Declare.
3343
15c66dd6
PA
33442015-03-04 Pedro Alves <palves@redhat.com>
3345
3346 enum lwp_stop_reason -> enum target_stop_reason
3347 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3348 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3349 (linux_wait_1, stuck_in_jump_pad_callback)
3350 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3351 (linux_stopped_by_watchpoint):
3352 * linux-low.h (enum lwp_stop_reason): Delete.
3353 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3354 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3355
98fc70d6
YQ
33562015-03-04 Yao Qi <yao.qi@linaro.org>
3357
3358 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3359
dd2ac174
GB
33602015-03-03 Gary Benson <gbenson@redhat.com>
3361
3362 * hostio.c (handle_vFile): Fix prefix lengths.
3363
d68e53f4
MM
33642015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3365
3366 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3367 ptr_bits.
3368
bf2d68ab
AA
33692015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3370
3371 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3372 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3373 (clean): Add "rm -f" for above C files.
3374 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3375 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3376 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3377 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3378 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3379 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3380 (init_registers_s390x_vx_linux64)
3381 (init_registers_s390x_tevx_linux64)
3382 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3383 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3384 declarations.
3385 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3386 (s390_store_vxrs_high): New functions.
3387 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3388 NT_S390_VXRS_HIGH.
3389 (s390_arch_setup): Add logic for selecting one of the new target
3390 descriptions. Activate the new vector regsets if applicable.
3391 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3392 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3393 and init_registers_s390x_tevx_linux64.
3394
c966a859
PA
33952015-03-01 Pedro Alves <palves@redhat.com>
3396
3397 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3398 parameter.
3399
4180215b
PA
34002015-02-27 Pedro Alves <palves@redhat.com>
3401
3402 * linux-x86-low.c (u_debugreg_offset): New function.
3403 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3404
749bab01
PA
34052015-02-27 Pedro Alves <palves@redhat.com>
3406
3407 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3408 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3409 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3410 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3411 (ps_lsetfpregs, ps_getpid)
3412 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3413 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3414 (ps_lsetxregs, ps_plog): Declare.
3415
3c14e5a3
PA
34162015-02-27 Pedro Alves <palves@redhat.com>
3417
3418 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3419 IP_AGENT_EXPORT_FUNC.
3420 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3421 IP_AGENT_EXPORT_FUNC.
3422 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3423 (IP_AGENT_EXPORT): Delete.
3424 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3425 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3426 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3427 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3428 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3429 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3430 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3431 (traceframe_read_count, traceframe_write_count)
3432 (traceframes_created, trace_state_variables, get_raw_reg)
3433 (get_trace_state_variable_value, set_trace_state_variable_value)
3434 (ust_loaded, helper_thread_id, cmd_buf): Use
3435 IPA_SYM_EXPORTED_NAME.
3436 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3437 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3438 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3439 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3440 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3441 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3442 EXTERN_C_PUSH/EXTERN_C_POP.
3443 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3444 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3445 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3446 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3447 (traceframe_write_count, traceframe_read_count)
3448 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3449 (about_to_request_buffer_space, get_trace_state_variable_value)
3450 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3451 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3452 EXTERN_C_PUSH/EXTERN_C_POP.
3453 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3454 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3455 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3456 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3457 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3458 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3459 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3460 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3461 Define.
3462 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3463 (IP_AGENT_EXPORT_VAR_DECL): Define.
3464 (tracing): Declare.
3465 (gdb_agent_get_raw_reg): Declare.
3466
fe978cb0
PA
34672015-02-27 Tom Tromey <tromey@redhat.com>
3468 Pedro Alves <palves@redhat.com>
3469
3470 Rename symbols whose names are reserved C++ keywords throughout.
3471
3bc3d82a
PA
34722015-02-27 Pedro Alves <palves@redhat.com>
3473
3474 * Makefile.in (COMPILER): New, get it from autoconf.
3475 (CXX): Get from autoconf instead.
3476 (COMPILE.pre): Use COMPILER.
3477 (CC-LD): Rename to ...
3478 (CC_LD): ... this. Use COMPILER.
3479 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3480 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3481 * acinclude.m4: Include build-with-cxx.m4.
3482 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3483 Disable -Werror by default if building in C++ mode.
3484 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3485 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3486 the C++ compiler. Save/restore CXXFLAGS too.
3487 * configure: Regenerate.
3488
07697489
PA
34892015-02-27 Pedro Alves <palves@redhat.com>
3490
3491 * acinclude.m4: Include libiberty.m4.
3492 * configure.ac: Call libiberty_INIT.
3493 * config.in, configure: Regenerate.
3494
9beb7c4e
PA
34952015-02-26 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (linux_wait_1): When incrementing the PC past a
3498 program breakpoint always use the_low_target.breakpoint_len as
3499 increment, rather than the maximum between that and
3500 the_low_target.decr_pc_after_break.
3501
8090aef2
PA
35022015-02-23 Pedro Alves <palves@redhat.com>
3503
3504 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3505 thread was doing a step-over; always adjust the PC if
3506 we stepped over a permanent breakpoint.
3507 (linux_wait_1): If we stepped over breakpoint that was on top of a
3508 permanent breakpoint, manually advance the PC past it.
3509
bc9540e8
PA
35102015-02-23 Pedro Alves <palves@redhat.com>
3511
3512 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3513 modes.
3514 (x86_fill_gregset, x86_store_gregset): Use it when handling
3515 $orig_eax.
3516
2db9a427
PA
35172015-02-20 Pedro Alves <palves@redhat.com>
3518
3519 * thread-db.c: Include "nat/linux-procfs.h".
3520 (thread_db_init): Skip listing new threads if the kernel supports
3521 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3522
afa8d396
PA
35232015-02-20 Pedro Alves <palves@redhat.com>
3524
3525 * linux-low.c (status_pending_p_callback): Use ptid_match.
3526
c9587f88
AT
35272015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3528
3529 PR breakpoints/16812
3530 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3531 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3532 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3533
b05ec7a5
AT
35342015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535
3536 PR breakpoints/15956
3537 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3538
d33501a5
MM
35392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3540
3541 * linux-low.c (linux_low_btrace_conf): Print size.
3542 * server.c (handle_btrace_conf_general_set): New.
3543 (hanle_general_set): Call handle_btrace_conf_general_set.
3544 (handle_query): Report Qbtrace-conf:bts:size as supported.
3545
f4abbc16
MM
35462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3547
3548 * linux-low.c (linux_low_enable_btrace): Update parameters.
3549 (linux_low_btrace_conf): New.
3550 (linux_target_ops)<to_btrace_conf>: Initialize.
3551 * server.c (current_btrace_conf): New.
3552 (handle_btrace_enable): Rename to ...
3553 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3554 to target_enable_btrace. Update comment. Update users.
3555 (handle_qxfer_btrace_conf): New.
3556 (qxfer_packets): Add btrace-conf entry.
3557 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3558 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3559 (target_ops)<read_btrace_conf>: New.
3560 (target_enable_btrace): Update parameters.
3561 (target_read_btrace_conf): New.
3562
043c3577
MM
35632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3564
3565 * server.c (handle_btrace_general_set): Remove call to
3566 target_supports_btrace.
3567 (supported_btrace_packets): New.
3568 (handle_query): Call supported_btrace_packets.
3569 * target.h: include btrace-common.h.
3570 (btrace_target_info): Removed.
3571 (supports_btrace, target_supports_btrace): Update parameters.
3572
734b0e4b
MM
35732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3574
3575 * Makefile.in (SFILES): Add common/btrace-common.c.
3576 (OBS): Add common/btrace-common.o.
3577 (btrace-common.o): Add build rules.
3578 * linux-low: Include btrace-common.h.
3579 (linux_low_read_btrace): Use struct btrace_data. Call
3580 btrace_data_init and btrace_data_fini.
3581
d6c146e9
PA
35822015-02-06 Pedro Alves <palves@redhat.com>
3583
3584 * thread-db.c (find_new_threads_callback): Add debug output.
3585
20ba1ce6
PA
35862015-02-04 Pedro Alves <palves@redhat.com>
3587
3588 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3589 (resume_stopped_resumed_lwps): New function.
3590 (linux_wait_for_event_filtered): Use it.
3591
8cc73a39
SDJ
35922015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3593
3594 * Makefile.in (SFILES): Add linux-personality.c.
3595 (linux-personality.o): New rule.
3596 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3597 list of objects to be built.
3598 * linux-low.c: Include nat/linux-personality.h.
3599 (linux_create_inferior): Remove code to disable address space
3600 randomization (moved to ../nat/linux-personality.c). Create
3601 cleanup to disable address space randomization.
3602
fb23d554
SDJ
36032015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3604
3605 * Makefile.in (posix-strerror.o): New rule.
3606 (mingw-strerror.o): Likewise.
3607 * configure: Regenerated.
3608 * configure.ac: Source file ../common/common.host. Initialize new
3609 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3610
cdf43629
YQ
36112015-01-14 Yao Qi <yao@codesourcery.com>
3612
3613 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3614 (ppc-linux.o): New rule.
3615 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3616 * configure.ac: AC_CHECK_FUNCS(getauxval).
3617 * config.in: Re-generated.
3618 * configure: Re-generated.
3619 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3620 ppc64_64bit_inferior_p
3621
514c5338
YQ
36222015-01-14 Yao Qi <yao@codesourcery.com>
3623
3624 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3625 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3626 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3627 (PT_ORIG_R3, PT_TRAP): Likewise.
3628 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3629 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3630 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3631
3368c1e5
JB
36322015-01-10 Joel Brobecker <brobecker@adacore.com>
3633
3634 * i387-fp.c (i387_cache_to_xsave): In look over
3635 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3636 zmmh_low_space field by use of zmmh_high_space.
3637
582511be
PA
36382015-01-09 Pedro Alves <palves@redhat.com>
3639
3640 * linux-low.c (step_over_bkpt): Move higher up in the file.
3641 (handle_extended_wait): Don't store the stop_pc here.
3642 (get_stop_pc): Adjust comments and rename to ...
3643 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3644 stopped for a software breakpoint or hardware breakpoint.
3645 (thread_still_has_status_pending_p): New function.
3646 (status_pending_p_callback): Use
3647 thread_still_has_status_pending_p. If the event is no longer
3648 interesting, resume the LWP.
3649 (handle_tracepoints): Add assert.
3650 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3651 (wstatus_maybe_breakpoint): New function.
3652 (cancel_breakpoint): Delete function.
3653 (check_stopped_by_watchpoint): New function, factored out from
3654 linux_low_filter_event.
3655 (lp_status_maybe_breakpoint): Delete function.
3656 (linux_low_filter_event): Remove filter_ptid argument.
3657 Leave thread group exits pending here. Store the LWP's stop PC.
3658 Always leave events pending.
3659 (linux_wait_for_event_filtered): Pull all events out of the
3660 kernel, and leave them all pending.
3661 (count_events_callback, select_event_lwp_callback): Consider all
3662 events.
3663 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3664 (select_event_lwp): Only give preference to the stepping LWP in
3665 all-stop mode. Adjust comments.
3666 (ignore_event): New function.
3667 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3668 references to cancel_breakpoints. Adjust to renames. Also give
3669 equal priority to all LWPs that have had events in non-stop mode.
3670 If reporting a software breakpoint event, unadjust the LWP's PC.
3671 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3672 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3673 Adjust.
3674 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3675 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3676 (linux_stopped_by_watchpoint): Adjust.
3677 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3678 * linux-low.h (enum lwp_stop_reason): New.
3679 (struct lwp_info) <stop_pc>: Adjust comment.
3680 <stopped_by_watchpoint>: Delete field.
3681 <stop_reason>: New field.
3682 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3683 * mem-break.c (software_breakpoint_inserted_here)
3684 (hardware_breakpoint_inserted_here): New function.
3685 * mem-break.h (software_breakpoint_inserted_here)
3686 (hardware_breakpoint_inserted_here): Declare.
3687 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3688 (cancel_breakpoints): Delete.
3689 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3690 (upload_fast_traceframes): Remove references to
3691 cancel_breakpoints.
3692
a33e3959
PA
36932015-01-09 Pedro Alves <palves@redhat.com>
3694
3695 * thread-db.c (find_new_threads_callback): Ignore thread if the
3696 kernel thread ID is -1.
3697
8784d563
PA
36982015-01-09 Pedro Alves <palves@redhat.com>
3699
3700 * linux-low.c (linux_attach_fail_reason_string): Move to
3701 nat/linux-ptrace.c, and rename.
3702 (linux_attach_lwp): Update comment.
3703 (attach_proc_task_lwp_callback): New function.
3704 (linux_attach): Adjust to rename and use
3705 linux_proc_attach_tgid_threads.
3706 (linux_attach_fail_reason_string): Delete declaration.
3707
76f2b779
JB
37082015-01-01 Joel Brobecker <brobecker@adacore.com>
3709
3710 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3711 * server.c (gdbserver_version): Likewise.
3712
fafcc06a
SDJ
37132014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3714
3715 * remote-utils.c: Include ctype.h.
3716 (input_interrupt): Explicitly handle the case when the char
3717 received is the NUL byte. Improve the printing of non-ASCII
3718 characters.
3719
beed38b8
JB
37202014-12-16 Joel Brobecker <brobecker@adacore.com>
3721
3722 * linux-low.c (linux_low_filter_event): Update call to
3723 linux_enable_event_reporting following the addition of
3724 a new parameter to that function.
3725
bf330350
CU
37262014-12-16 Catalin Udma <catalin.udma@freescale.com>
3727
3728 PR server/17457
3729 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3730 (AARCH64_FPCR_REGNO): Likewise.
3731 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3732 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3733 (aarch64_store_fpregset): Likewise.
3734
5227d625
JB
37352014-12-15 Joel Brobecker <brobecker@adacore.com>
3736
3737 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3738 Remove FIXME comment about assumption about N.
3739
f93b65a0
JB
37402014-12-13 Joel Brobecker <brobecker@adacore.com>
3741
3742 * configure.ac: If large-file support is disabled in GDBserver,
3743 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3744 * configure: Regenerate.
3745
e5a9158d
AA
37462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3747
3748 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3749 warning upon ENODATA from ptrace.
3750 * linux-s390-low.c (s390_store_tdb): New.
3751 (s390_regsets): Add regset for NT_S390_TDB.
3752
feea5f36
AA
37532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3754
3755 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3756 without a fill_function.
3757 * linux-s390-low.c (s390_fill_last_break): Remove.
3758 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3759 (s390_arch_setup): Use regset's size instead of fill_function for
3760 loop end condition.
3761
098dbe61
AA
37622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3763
3764 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3765 the regset's store function when ptrace returned an error.
3766 * regcache.c (get_thread_regcache): Invalidate register cache
3767 before fetching inferior's registers.
3768
28eef672
AA
37692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3770
3771 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3772 while-loop as for-loop.
3773 (regsets_store_inferior_registers): Likewise.
3774
bdca27a2
YQ
37752014-11-28 Yao Qi <yao@codesourcery.com>
3776
3777 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3778 * config.in, configure: Re-generate.
3779 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3780 is defined.
3781
9c232dda
YQ
37822014-11-21 Yao Qi <yao@codesourcery.com>
3783
3784 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3785 (AC_CHECK_HEADERS): Remove malloc.h.
3786 * configure: Re-generated.
3787 * config.in: Re-generated.
3788 * server.h: Don't include alloca.h and malloc.h.
3789 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3790 Don't include malloc.h.
3791
43968415
JB
37922014-11-17 Joel Brobecker <brobecker@adacore.com>
3793
3794 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3795 corresponding ERRNO check in same block.
3796
40e91bc7
PA
37972014-11-12 Pedro Alves <palves@redhat.com>
3798
3799 * server.c (cont_thread): Update comment.
3800 (start_inferior, attach_inferior): No longer clear cont_thread.
3801 (handle_v_cont): No longer set cont_thread.
3802 (captured_main): Clear cont_thread each time a GDB connects.
3803
c2c118cf
PA
38042014-11-12 Pedro Alves <palves@redhat.com>
3805
3806 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3807 thread, and don't resume all threads if the Hc thread has exited.
3808
78708b7c
PA
38092014-11-12 Pedro Alves <palves@redhat.com>
3810
3811 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3812 the process group instead of to a specific LWP.
3813
a2abc7de
PA
38142014-10-15 Pedro Alves <palves@redhat.com>
3815
3816 PR server/17487
3817 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3818 parameter.
3819 (arm_set_thread_context): Delete.
3820 (the_low_target): Adjust.
3821 * win32-i386-low.c (debug_registers_changed)
3822 (debug_registers_used): Delete.
3823 (update_debug_registers_callback): New function.
3824 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3825 needing to update their debug registers.
3826 (win32_get_current_dr): New function.
3827 (x86_dr_low_get_addr, x86_dr_low_get_control)
3828 (x86_dr_low_get_status): Fetch the debug register from the thread
3829 record's context.
3830 (i386_initial_stuff): Adjust.
3831 (i386_get_thread_context): Remove current_event parameter. Don't
3832 clear debug_registers_changed nor copy DR values to
3833 debug_reg_state.
3834 (i386_set_thread_context): Delete.
3835 (i386_prepare_to_resume): New function.
3836 (i386_thread_added): Mark the thread as needing to update irs
3837 debug registers.
3838 (the_low_target): Remove i386_set_thread_context and install
3839 i386_prepare_to_resume.
3840 * win32-low.c (win32_get_thread_context): Adjust.
3841 (win32_set_thread_context): Use SetThreadContext
3842 directly.
3843 (win32_prepare_to_resume): New function.
3844 (win32_require_context): New function, factored out from ...
3845 (thread_rec): ... this.
3846 (continue_one_thread): Call win32_prepare_to_resume on each thread
3847 we're about to continue.
3848 (win32_resume): Call win32_prepare_to_resume on the event thread.
3849 * win32-low.h (struct win32_thread_info)
3850 <debug_registers_changed>: New field.
3851 (struct win32_target_ops): Change prototype of set_thread_context,
3852 delete set_thread_context and add prepare_to_resume.
3853 (win32_require_context): New declaration.
3854
a442d071
GB
38552014-10-08 Gary Benson <gbenson@redhat.com>
3856
3857 * server.h: Do not include common-exceptions.h.
3858
6f1947e8
GB
38592014-10-08 Gary Benson <gbenson@redhat.com>
3860
3861 * server.h: Do not include cleanups.h.
3862
63b434a4
JH
38632014-09-30 James Hogan <james.hogan@imgtec.com>
3864
3865 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3866 mips64-dsp-linux.c.
3867
c4d9ceb6
YQ
38682014-09-23 Yao Qi <yao@codesourcery.com>
3869
3870 * linux-low.c (lp_status_maybe_breakpoint): New function.
3871 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3872 (count_events_callback): Likewise.
3873 (select_event_lwp_callback): Likewise.
3874 (cancel_breakpoints_callback): Likewise.
3875
89a5711c
DB
38762014-09-19 Don Breazeal <donb@codesourcery.com>
3877
3878 * linux-low.c (handle_extended_wait): Call
3879 linux_ptrace_get_extended_event.
3880 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3881 linux_is_extended_waitstatus.
3882
bffc0964
JB
38832014-09-16 Joel Brobecker <brobecker@adacore.com>
3884
3885 * Makefile.in (CPPFLAGS): Define.
3886 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3887 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3888
0bfdf32f
GB
38892014-09-16 Gary Benson <gbenson@redhat.com>
3890
3891 * inferiors.h (current_inferior): Renamed as...
3892 (current_thread): New variable. All uses updated.
3893 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3894 (maybe_move_out_of_jump_pad): Likewise.
3895 (cancel_breakpoint): Likewise.
3896 (linux_low_filter_event): Likewise.
3897 (wait_for_sigstop): Likewise.
3898 (linux_resume_one_lwp): Likewise.
3899 (need_step_over_p): Likewise.
3900 (start_step_over): Likewise.
3901 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3902 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3903 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3904 and save_inferior as saved_thread.
3905 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3906 saved_thread.
3907 (regcache_invalidate_thread): Likewise.
3908 * remote-utils.c (prepare_resume_reply): Likewise.
3909 * thread-db.c (thread_db_get_tls_address): Likewise.
3910 (disable_thread_event_reporting): Likewise.
3911 (remove_thread_event_breakpoints): Likewise.
3912 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3913 as saved_thread.
3914 * target.h (set_desired_inferior): Renamed as...
3915 (set_desired_thread): New declaration. All uses updated.
3916 * server.c (myresume): Updated comment to reference thread instead
3917 of inferior.
3918 (handle_serial_event): Likewise.
3919 (handle_target_event): Likewise.
3920
361c8ade
GB
39212014-09-12 Tom Tromey <tromey@redhat.com>
3922 Gary Benson <gbenson@redhat.com>
3923
3924 * regcache.h: Include common-regcache.h.
3925 (regcache_read_pc): Don't declare.
3926 * regcache.c (get_thread_regcache_for_ptid): New function.
3927
bd9269f7
GB
39282014-09-11 Tom Tromey <tromey@redhat.com>
3929 Gary Benson <gbenson@redhat.com>
3930
3931 * symbol.c: New file.
3932 * Makefile.in (SFILES): Add symbol.c.
3933 (OBS): Add symbol.o.
3934
f8c1d06b
GB
39352014-09-11 Gary Benson <gbenson@redhat.com>
3936
3937 * target.c (target_stop_ptid, target_continue_ptid): New
3938 functions.
3939
721ec300
GB
39402014-09-11 Tom Tromey <tromey@redhat.com>
3941 Gary Benson <gbenson@redhat.com>
3942
3943 * target.h: Include target/target.h.
3944 * target.c (target_read_memory, target_read_uint32)
3945 (target_write_memory): New functions.
3946
c5e92cca
GB
39472014-09-11 Gary Benson <gbenson@redhat.com>
3948
3949 * server.h (debug_hw_points): Don't declare.
3950 * server.c (debug_hw_points): Don't define. Replace all uses
3951 with show_debug_regs.
3952 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3953 all uses with show_debug_regs.
3954
2e4bb98a
EBM
39552014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3956
3957 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3958 endianness into account.
3959 (ppc_supply_ptrace_register): Likewise.
3960
ac740bc7
JH
39612014-09-03 James Hogan <james.hogan@imgtec.com>
3962
3963 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3964 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3965
97ea6506
GB
39662014-09-03 Gary Benson <gbenson@redhat.com>
3967
3968 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3969 ALL_DEBUG_ADDRESS_REGISTERS.
3970
df7e5265
GB
39712014-09-02 Gary Benson <gbenson@redhat.com>
3972
3973 * i386-low.h: Renamed as...
3974 * x86-low.h: New file. All type, function and variable name
3975 prefixes changed from "i386_" to "x86_". All references updated.
3976 * i386-low.c: Renamed as...
3977 * x86-low.c: New file. All type, function and variable name
3978 prefixes changed from "i386_" to "x86_". All references updated.
3979
ed859da7
GB
39802014-09-02 Gary Benson <gbenson@redhat.com>
3981
3982 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3983 (x86_linux_new_thread): Likewise.
3984
860789c7
GB
39852014-08-29 Gary Benson <gbenson@redhat.com>
3986
3987 * server.h (setjmp.h): Do not include.
3988 (toplevel): Do not declare.
3989 (common-exceptions.h): Include.
3990 (cleanups.h): Likewise.
3991 * server.c (toplevel): Do not define.
3992 (exit_code): New static global.
3993 (detach_or_kill_for_exit_cleanup): New function.
3994 (main): New function. Original main renamed to...
3995 (captured_main): New function.
3996 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3997
ff55e1b5
GB
39982014-08-29 Gary Benson <gbenson@redhat.com>
3999
4000 * Makefile.in (SFILES): Add common/common-exceptions.c.
4001 (OBS): Add common-exceptions.o.
4002 (common-exceptions.o): New rule.
4003 * utils.c (prepare_to_throw_exception): New function.
4004
e9bcb658
GB
40052014-08-29 Gary Benson <gbenson@redhat.com>
4006
4007 * config.in: Regenerate.
4008 * configure: Likewise.
4009
e3180625
GB
40102014-08-29 Gary Benson <gbenson@redhat.com>
4011
4012 * Makefile.in (SFILES): Add common/cleanups.c.
4013 (OBS): cleanups.o.
4014 (cleanups.o): New rule.
4015
e3d6ba5d
GB
40162014-08-29 Gary Benson <gbenson@redhat.com>
4017
4018 * utils.c (internal_vwarning): New function.
4019
7096e886
GB
40202014-08-28 Gary Benson <gbenson@redhat.com>
4021
4022 * utils.h (fatal): Remove declaration.
4023 * utils.c (fatal): Remove function.
4024
14ce3192
GB
40252014-08-28 Gary Benson <gbenson@redhat.com>
4026
4027 * tracepoint.c (gdb_agent_init): Replace fatal with
4028 perror_with_name.
4029 (initialize_tracepoint): Likewise.
4030
50278d59
GB
40312014-08-28 Gary Benson <gbenson@redhat.com>
4032
4033 * remote-utils.c (remote_prepare): Replace fatal with error.
4034
aa96c426
GB
40352014-08-28 Gary Benson <gbenson@redhat.com>
4036
4037 * linux-low.c (linux_async): Replace fatal with warning.
4038 Tidy up and return.
4039 (linux_start_non_stop): Return -1 if linux_async failed.
4040
f7160e97
GB
40412014-08-28 Gary Benson <gbenson@redhat.com>
4042
4043 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4044 gdb_assert.
4045 (i386_dr_low_get_addr): Remove vague comment.
4046 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4047 gdb_assert.
4048
38e08fca
GB
40492014-08-28 Gary Benson <gbenson@redhat.com>
4050
4051 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4052 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4053 internal_error.
4054 (linux_resume_one_lwp): Likewise.
4055 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4056 gdb_assert.
4057 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4058 with internal_error.
4059 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4060 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4061 (find_register_by_name): Replace fatal with internal_error.
4062 (find_regno): Likewise.
4063 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4064 * thread-db.c (thread_db_create_event): Likewise.
4065 (thread_db_load_search): Likewise.
4066 (try_thread_db_load_1): Likewise.
4067 * tracepoint.c (get_jump_space_head): Replace fatal with
4068 internal_error.
4069 (claim_trampoline_space): Likewise.
4070 (have_fast_tracepoint_trampoline_buffer): Likewise.
4071 (cmd_qtstart): Likewise.
4072 (stop_tracing): Likewise.
4073 (fast_tracepoint_collecting): Likewise.
4074 (target_malloc): Likewise.
4075 (download_tracepoint): Likewise.
4076 (download_trace_state_variables): Replace check with gdb_assert.
4077 (upload_fast_traceframes): Replace fatal with internal_error.
4078
34abf635
GB
40792014-08-19 Tom Tromey <tromey@redhat.com>
4080 Gary Benson <gbenson@redhat.com>
4081
4082 * Makefile.in (SFILES): Add common/common-debug.c.
4083 (OBS): Add common-debug.o.
4084 (common-debug.o): New rule.
4085 * debug.h (debug_printf): Don't declare.
4086 * debug.c (debug_printf): Renamed and rewritten as...
4087 (debug_vprintf): New function.
4088
f6e94d78
GB
40892014-08-19 Gary Benson <gbenson@redhat.com>
4090
4091 * utils.h: Do not include print-utils.h.
4092
9239eeab
GB
40932014-08-19 Tom Tromey <tromey@redhat.com>
4094 Gary Benson <gbenson@redhat.com>
4095
4096 * server.h: Add static assertion.
4097 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4098
ef87c8bb
GB
40992014-08-19 Tom Tromey <tromey@redhat.com>
4100 Gary Benson <gbenson@redhat.com>
4101
4102 * Makefile.in (SFILES): Add common/errors.c.
4103 (OBS): Add errors.o.
4104 (IPA_OBS): Add errors-ipa.o.
4105 (errors.o): New rule.
4106 (errors-ipa.o): Likewise.
4107 * utils.h (perror_with_name, error, warning): Don't declare.
4108 * utils.c (warning): Renamed and rewritten as...
4109 (vwarning): New function.
4110 (error): Renamed and rewritten as...
4111 (verror): New function.
4112 (internal_error): Renamed and rewritten as...
4113 (internal_verror): New function.
4114
bb974a24
GB
41152014-08-07 Gary Benson <gbenson@redhat.com>
4116
4117 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4118 * configure: Regenerate.
4119 * config.in: Likewise.
4120 * server.h: Do not include errno.h.
4121 * event-loop.c: Likewise.
4122 * hostio-errno.c: Likewise.
4123 * linux-low.c: Likewise.
4124 * remote-utils.c: Likewise.
4125 * spu-low.c: Likewise.
4126 * utils.c: Likewise.
4127 * gdbreplay.c: Unconditionally include errno.h.
4128
6d3d12eb
GB
41292014-08-07 Gary Benson <gbenson@redhat.com>
4130
4131 * server.h: Do not include string.h.
4132 * event-loop.c: Likewise.
4133 * linux-low.c: Likewise.
4134 * regcache.c: Likewise.
4135 * remote-utils.c: Likewise.
4136 * spu-low.c: Likewise.
4137 * utils.c: Likewise.
4138
dccbb609
GB
41392014-08-07 Gary Benson <gbenson@redhat.com>
4140
4141 * server.h: Do not include gdb_assert.h.
4142
e76df0d0
GB
41432014-08-07 Gary Benson <gbenson@redhat.com>
4144
4145 * server.h: Do not include common-utils.h.
4146
4cb9c816
GB
41472014-08-07 Gary Benson <gbenson@redhat.com>
4148
4149 * server.h: Do not include ptid.h.
4150 * notif.h: Likewise.
4151
3995eeee
GB
41522014-08-07 Gary Benson <gbenson@redhat.com>
4153
4154 * server.h: Do not include gdb_locale.h.
4155
cb9f1a9b
GB
41562014-08-07 Gary Benson <gbenson@redhat.com>
4157
4158 * server.h: Do not include gdb/signals.h.
4159 * win32-low.c: Likewise.
4160
a5fceff8
GB
41612014-08-07 Gary Benson <gbenson@redhat.com>
4162
4163 * server.h: Do not include pathmax.h.
4164
b9391142
GB
41652014-08-07 Gary Benson <gbenson@redhat.com>
4166
4167 * server.h: Do not include libiberty.h.
4168 * linux-bfin-low.c: Likewise.
4169
0e443c87
GB
41702014-08-07 Gary Benson <gbenson@redhat.com>
4171
4172 * server.h: Do not include ansidecl.h.
4173
8ebb3f56
GB
41742014-08-07 Gary Benson <gbenson@redhat.com>
4175
4176 * linux-x86-low.c: Do not include stddef.h.
4177 * lynx-ppc-low.c: Likewise.
4178 * tracepoint.c: Likewise.
4179
8980bdf6
GB
41802014-08-07 Gary Benson <gbenson@redhat.com>
4181
4182 * server.h: Do not include stdarg.h.
4183 * nto-low.c: Likewise.
4184
d7096f71
GB
41852014-08-07 Gary Benson <gbenson@redhat.com>
4186
4187 * server.h: Do not include stdlib.h.
4188 * inferiors.c: Likewise.
4189 * linux-low.c: Likewise.
4190 * regcache.c: Likewise.
4191 * spu-low.c: Likewise.
4192 * tracepoint.c: Likewise.
4193 * utils.c: Likewise.
4194
d02f550d
GB
41952014-08-07 Gary Benson <gbenson@redhat.com>
4196
4197 * server.h: Do not include stdio.h.
4198 * linux-low.c: Likewise.
4199 * remote-utils.c: Likewise.
4200 * spu-low.c: Likewise.
4201 * utils.c: Likewise.
4202 * wincecompat.c: Likewise.
4203
87f6c4e3
GB
42042014-08-06 Gary Benson <gbenson@redhat.com>
4205
4206 * regcache.c (init_register_cache): Move conditionals inside if.
4207
7089dca4
GB
42082014-08-06 Gary Benson <gbenson@redhat.com>
4209
4210 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4211
462f517e
GB
42122014-07-31 Gary Benson <gbenson@redhat.com>
4213
4214 * ax.h: Do not include server.h.
4215 * gdbthread.h: Likewise.
4216 * lynx-low.h: Likewise.
4217 * notif.h: Likewise.
4218
976411d6
GB
42192014-07-30 Gary Benson <gbenson@redhat.com>
4220
4221 * server.h: Include common-defs.h.
4222 Do not include config.h or build-gnulib-gdbserver/config.h.
4223
d41f6d8e
GB
42242014-07-30 Gary Benson <gbenson@redhat.com>
4225
4226 * hostio-errno.c: Move server.h to top of includes list.
4227 * inferiors.c: Likewise.
4228 * linux-x86-low.c: Likewise.
4229 * notif.c: Include server.h.
4230
314c6a35
TT
42312014-07-24 Tom Tromey <tromey@redhat.com>
4232 Gary Benson <gbenson@redhat.com>
4233
4234 * server.h (CORE_ADDR): Now unsigned.
4235
69ff6be5
PA
42362014-07-16 Pedro Alves <palves@redhat.com>
4237
4238 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4239
ce9e3fe7
PA
42402014-07-15 Pedro Alves <palves@redhat.com>
4241
4242 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4243 copy.
4244
e76126e8
PA
42452014-07-11 Pedro Alves <palves@redhat.com>
4246
4247 * linux-low.c (kill_wait_lwp): New function, based on
4248 kill_one_lwp_callback, but use my_waitpid directly.
4249 (kill_one_lwp_callback, linux_kill): Use it.
4250
8e9db26e
PA
42512014-06-23 Pedro Alves <palves@redhat.com>
4252
4253 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4254 before setting DR0..DR3.
4255
698b3e08
GB
42562014-06-20 Gary Benson <gbenson@redhat.com>
4257
4258 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4259 * configure: Regenerated.
4260 * config.in: Likewise.
4261
125f8a3d
GB
42622014-06-20 Gary Benson <gbenson@redhat.com>
4263
4264 * Makefile.in (SFILES): Update locations for files moved
4265 from common to nat.
4266 (object file files): Reordered.
4267
42995dbd
GB
42682014-06-20 Gary Benson <gbenson@redhat.com>
4269
4270 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4271 (i386_dr_low_set_addr): Likewise.
4272 (i386_dr_low_get_addr): Likewise.
4273 (i386_dr_low_can_set_control): Likewise.
4274 (i386_dr_low_set_control): Likewise.
4275 (i386_dr_low_get_control): Likewise.
4276 (i386_dr_low_get_status): Likewise.
4277 (i386_get_debug_register_length): Likewise.
4278 * linux-x86-low.c (i386_dr_low_set_addr):
4279 Changed signature. Made static.
4280 (i386_dr_low_get_addr): Likewise.
4281 (i386_dr_low_set_control): Likewise.
4282 (i386_dr_low_get_control): Likewise.
4283 (i386_dr_low_get_status): Likewise.
4284 (i386_dr_low): New global variable.
4285 * win32-i386-low.c (i386_dr_low_set_addr):
4286 Changed signature. Made static.
4287 (i386_dr_low_get_addr): Likewise.
4288 (i386_dr_low_set_control): Likewise.
4289 (i386_dr_low_get_control): Likewise.
4290 (i386_dr_low_get_status): Likewise.
4291 (i386_dr_low): New global variable.
4292
e1d2394b
MS
42932014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4294
4295 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4296 * Makefile.in (AR, AR_FLAGS): Define.
4297 * configure: Regenerate.
4298
3a8ee006
GB
42992014-06-19 Gary Benson <gbenson@redhat.com>
4300
4301 * Makefile.in (i386-dregs.o): New rule.
4302 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4303 * i386-low.c (target.h): Remove include.
4304 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4305 (DR_CONTROL_SHIFT): Likewise.
4306 (DR_CONTROL_SIZE): Likewise.
4307 (DR_RW_EXECUTE): Likewise.
4308 (DR_RW_WRITE): Likewise.
4309 (DR_RW_READ): Likewise.
4310 (DR_RW_IORW): Likewise.
4311 (DR_LEN_1): Likewise.
4312 (DR_LEN_2): Likewise.
4313 (DR_LEN_4): Likewise.
4314 (DR_LEN_8): Likewise.
4315 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4316 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4317 (DR_ENABLE_SIZE): Likewise.
4318 (DR_LOCAL_SLOWDOWN): Likewise.
4319 (DR_GLOBAL_SLOWDOWN): Likewise.
4320 (DR_CONTROL_RESERVED): Likewise.
4321 (I386_DR_CONTROL_MASK): Likewise.
4322 (I386_DR_VACANT): Likewise.
4323 (I386_DR_LOCAL_ENABLE): Likewise.
4324 (I386_DR_GLOBAL_ENABLE): Likewise.
4325 (I386_DR_DISABLE): Likewise.
4326 (I386_DR_SET_RW_LEN): Likewise.
4327 (I386_DR_GET_RW_LEN): Likewise.
4328 (I386_DR_WATCH_HIT): Likewise.
4329 (i386_wp_op_t): Likewise.
4330 (i386_show_dr): Likewise.
4331 (i386_length_and_rw_bits): Likewise.
4332 (i386_insert_aligned_watchpoint): Likewise.
4333 (i386_remove_aligned_watchpoint): Likewise.
4334 (i386_handle_nonaligned_watchpoint): Likewise.
4335 i386_update_inferior_debug_regs(): Likewise.
4336 (i386_dr_insert_watchpoint): Likewise.
4337 (i386_dr_remove_watchpoint): Likewise.
4338 (i386_dr_region_ok_for_watchpoint): Likewise.
4339 (i386_dr_stopped_data_address): Likewise.
4340 (i386_dr_stopped_by_watchpoint): Likewise.
4341
8f26655c
GB
43422014-06-19 Gary Benson <gbenson@redhat.com>
4343
4344 * i386-low.c (i386_dr_show): Renamed to
4345 i386_show_dr and made static. All uses updated.
4346 (i386_dr_length_and_rw_bits): Renamed to
4347 i386_length_and_rw_bits and made static.
4348 All uses updated.
4349 (i386_dr_insert_aligned_watchpoint): Renamed to
4350 i386_insert_aligned_watchpoint and made static.
4351 All uses updated.
4352 (i386_dr_remove_aligned_watchpoint): Renamed to
4353 i386_remove_aligned_watchpoint and made static.
4354 All uses updated.
4355 (i386_dr_update_inferior_debug_regs): Renamed to
4356 i386_update_inferior_debug_regs and made static.
4357 All uses updated.
4358
b9228891
GB
43592014-06-18 Gary Benson <gbenson@redhat.com>
4360
5171def3
GB
4361 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4362 (i386_dr_low_can_set_control): Likewise.
4363 (i386_get_debug_register_length): Likewise.
4364 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4365 (i386_dr_low_can_set_control): Likewise.
4366 (i386_get_debug_register_length): Likewise.
4367
43682014-06-17 Gary Benson <gbenson@redhat.com>
4369
b9228891
GB
4370 * i386-low.h (i386-dregs.h): New include.
4371 (DR_FIRSTADDR): Now in i386-dregs.h.
4372 (DR_LASTADDR): Likewise.
4373 (DR_NADDR): Likewise.
4374 (DR_STATUS): Likewise.
4375 (DR_CONTROL): Likewise.
4376 (i386_debug_reg_state): Likewise.
4377 (i386_dr_insert_watchpoint): Likewise.
4378 (i386_dr_remove_watchpoint): Likewise.
4379 (i386_dr_region_ok_for_watchpoint): Likewise.
4380 (i386_dr_stopped_data_address): Likewise.
4381 (i386_dr_stopped_by_watchpoint): Likewise.
4382 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4383
4be83cc2
GB
43842014-06-18 Gary Benson <gbenson@redhat.com>
4385
4386 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4387 i386_dr_insert_watchpoint.
4388 (i386_low_remove_watchpoint): Renamed to
4389 i386_dr_remove_watchpoint.
4390 (i386_low_region_ok_for_watchpoint): Renamed to
4391 i386_dr_region_ok_for_watchpoint.
4392 (i386_low_stopped_data_address): Renamed to
4393 i386_dr_stopped_data_address.
4394 (i386_low_stopped_by_watchpoint): Renamed to
4395 i386_dr_stopped_by_watchpoint.
4396 * i386-low.c (i386_show_dr): Renamed to
4397 i386_dr_show and made nonstatic. All uses updated.
4398 (i386_length_and_rw_bits): Renamed to
4399 i386_dr_length_and_rw_bits and made nonstatic.
4400 All uses updated.
4401 (i386_insert_aligned_watchpoint): Renamed to
4402 i386_dr_insert_aligned_watchpoint and made nonstatic.
4403 All uses updated.
4404 (i386_remove_aligned_watchpoint): Renamed to
4405 i386_dr_remove_aligned_watchpoint and made nonstatic.
4406 All uses updated.
4407 (i386_update_inferior_debug_regs): Renamed to
4408 i386_dr_update_inferior_debug_regs and made nonstatic.
4409 All uses updated.
4410 (i386_low_insert_watchpoint): Renamed to
4411 i386_dr_insert_watchpoint. All uses updated.
4412 (i386_low_remove_watchpoint): Renamed to
4413 i386_dr_remove_watchpoint. All uses updated.
4414 (i386_low_region_ok_for_watchpoint): Renamed to
4415 i386_dr_region_ok_for_watchpoint. All uses updated.
4416 (i386_low_stopped_data_address): Renamed to
4417 i386_dr_stopped_data_address. All uses updated.
4418 (i386_low_stopped_by_watchpoint): Renamed to
4419 i386_dr_stopped_by_watchpoint. All uses updated.
4420
131aa0d4
GB
44212014-06-18 Gary Benson <gbenson@redhat.com>
4422
4423 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4424 (i386_dr_low_can_set_control): Likewise.
4425 (i386_insert_aligned_watchpoint): New check.
4426
d9305f7f
GB
44272014-06-18 Gary Benson <gbenson@redhat.com>
4428
4429 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4430 Renamed to state.
4431
e927c9fc
GB
44322014-06-18 Gary Benson <gbenson@redhat.com>
4433
4434 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4435 instead of fatal and error.
4436 (i386_handle_nonaligned_watchpoint): Likewise.
4437
1b6d4134
GB
44382014-06-18 Gary Benson <gbenson@redhat.com>
4439
4440 * i386-low.c (i386_get_debug_register_length): New macro.
4441 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4442 (i386_show_dr): Use debug_printf instead of fprintf. Use
4443 phex to format values.
4444
6e62758f
GB
44452014-06-18 Gary Benson <gbenson@redhat.com>
4446
4447 * i386-low.h: Comment changes.
4448 * i386-low.c: Likewise.
4449
fc6e2f03
GB
44502014-06-18 Gary Benson <gbenson@redhat.com>
4451
4452 * i386-low.c: Whitespace changes.
4453
f9d1eeed
TT
44542014-06-12 Tom Tromey <tromey@redhat.com>
4455
4456 * utils.c (freeargv): Remove.
4457
0b04e523
TT
44582014-06-12 Tom Tromey <tromey@redhat.com>
4459
4460 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4461 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4462 (parse_debug_format_options): Likewise.
4463 (gdbserver_usage): Likewise.
4464 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4465 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4466 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4467 against libiberty.
4468 ($(LIBGNU)): Depend on libiberty.
4469 (all-lib): Recurse into all subdirs.
4470 (install-only): Invoke "install" target in subdirs.
4471 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4472 targets.
4473 * configure: Rebuild.
4474 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4475 for vasprintf, vsnprintf, or gettimeofday.
4476 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4477 srv_tgtobj.
4478
270c9937
JB
44792014-06-05 Joel Brobecker <brobecker@adacore.com>
4480
4481 * development.sh: Delete.
4482 * Makefile.in (config.status): Adjust dependency on development.sh.
4483 * configure.ac: Adjust development.sh source call.
4484 * configure: Regenerate.
4485
0a261ed8
PA
44862014-06-02 Pedro Alves <palves@redhat.com>
4487
4488 * ax.c (gdb_free_agent_expr): New function.
4489 * ax.h (gdb_free_agent_expr): New declaration.
4490 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4491 list.
4492 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4493 static.
4494 (clear_breakpoint_conditions_and_commands): New function.
4495 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4496 (clear_breakpoint_conditions_and_commands): New declaration.
4497
e9dae05e
RR
44982014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4499
4500 * linux-aarch64-low.c (asm/ptrace.h): Include.
4501
5876f503
JK
45022014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4503
4504 Fix TLS access for -static -pthread.
4505 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4506 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4507 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4508
802e8e6d
PA
45092014-05-20 Pedro Alves <palves@redhat.com>
4510
4511 * linux-aarch64-low.c (aarch64_insert_point)
4512 (aarch64_remove_point): No longer check whether the type is
4513 supported here. Adjust to new interface.
4514 (the_low_target): Install aarch64_supports_z_point_type as
4515 supports_z_point_type method.
4516 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4517 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4518 instead of a Z packet char. Adjust.
4519 (arm_supports_z_point_type): New function.
4520 (arm_insert_point, arm_remove_point): Adjust to new interface.
4521 (the_low_target): Install arm_supports_z_point_type.
4522 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4523 (cris_insert_point, cris_remove_point): Adjust to new interface.
4524 Don't check whether the type is supported here.
4525 (the_low_target): Install cris_supports_z_point_type.
4526 * linux-low.c (linux_supports_z_point_type): New function.
4527 (linux_insert_point, linux_remove_point): Adjust to new interface.
4528 * linux-low.h (struct linux_target_ops) <insert_point,
4529 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4530 raw_breakpoint pointer parameter.
4531 <supports_z_point_type>: New method.
4532 * linux-mips-low.c (mips_supports_z_point_type): New function.
4533 (mips_insert_point, mips_remove_point): Adjust to new interface.
4534 Use mips_supports_z_point_type.
4535 (the_low_target): Install mips_supports_z_point_type.
4536 * linux-ppc-low.c (the_low_target): Install NULL as
4537 supports_z_point_type method.
4538 * linux-s390-low.c (the_low_target): Install NULL as
4539 supports_z_point_type method.
4540 * linux-sparc-low.c (the_low_target): Install NULL as
4541 supports_z_point_type method.
4542 * linux-x86-low.c (x86_supports_z_point_type): New function.
4543 (x86_insert_point): Adjust to new insert_point interface. Use
4544 insert_memory_breakpoint. Adjust to new
4545 i386_low_insert_watchpoint interface.
4546 (x86_remove_point): Adjust to remove_point interface. Use
4547 remove_memory_breakpoint. Adjust to new
4548 i386_low_remove_watchpoint interface.
4549 (the_low_target): Install x86_supports_z_point_type.
4550 * lynx-low.c (lynx_target_ops): Install NULL as
4551 supports_z_point_type callback.
4552 * nto-low.c (nto_supports_z_point_type): New.
4553 (nto_insert_point, nto_remove_point): Adjust to new interface.
4554 (nto_target_ops): Install nto_supports_z_point_type.
4555 * mem-break.c: Adjust intro comment.
4556 (struct raw_breakpoint) <raw_type, size>: New fields.
4557 <inserted>: Update comment.
4558 <shlib_disabled>: Delete field.
4559 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4560 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4561 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4562 (raw_bkpt_type_to_target_hw_bp_type): New function.
4563 (find_enabled_raw_code_breakpoint_at): New function.
4564 (find_raw_breakpoint_at): New type and size parameters. Use them.
4565 (insert_memory_breakpoint): New function, based off
4566 set_raw_breakpoint_at.
4567 (remove_memory_breakpoint): New function.
4568 (set_raw_breakpoint_at): Reimplement.
4569 (set_breakpoint): New, based on set_breakpoint_at.
4570 (set_breakpoint_at): Reimplement.
4571 (delete_raw_breakpoint): Go through the_target->remove_point
4572 instead of assuming memory breakpoints.
4573 (find_gdb_breakpoint_at): Delete.
4574 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4575 (find_gdb_breakpoint): New function.
4576 (set_gdb_breakpoint_at): Delete.
4577 (z_type_supported): New function.
4578 (set_gdb_breakpoint_1): New function, loosely based off
4579 set_gdb_breakpoint_at.
4580 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4581 (delete_gdb_breakpoint_at): Delete.
4582 (delete_gdb_breakpoint_1): New function, loosely based off
4583 delete_gdb_breakpoint_at.
4584 (delete_gdb_breakpoint): New function.
4585 (clear_gdb_breakpoint_conditions): Rename to ...
4586 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4587 breakpoint.
4588 (add_condition_to_breakpoint): Make static.
4589 (add_breakpoint_condition): Take a struct breakpoint pointer
4590 instead of an address. Adjust.
4591 (gdb_condition_true_at_breakpoint): Rename to ...
4592 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4593 z_type parameter.
4594 (gdb_condition_true_at_breakpoint): Reimplement.
4595 (add_breakpoint_commands): Take a struct breakpoint pointer
4596 instead of an address. Adjust.
4597 (gdb_no_commands_at_breakpoint): Rename to ...
4598 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4599 parameter. Return true if no breakpoint was found. Change debug
4600 output.
4601 (gdb_no_commands_at_breakpoint): Reimplement.
4602 (run_breakpoint_commands): Rename to ...
4603 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4604 and change return type to boolean.
4605 (run_breakpoint_commands): New function.
4606 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4607 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4608 breakpoint. Go through the_target->remove_point instead of
4609 assuming memory breakpoint.
4610 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4611 software and hardware breakpoints.
4612 (reinsert_raw_breakpoint): Go through the_target->insert_point
4613 instead of assuming memory breakpoint.
4614 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4615 software and hardware breakpoints.
4616 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4617 Check both software and hardware breakpoints.
4618 (validate_inserted_breakpoint): Assert the breakpoint is a
4619 software breakpoint. Set the inserted flag to -1 instead of
4620 setting shlib_disabled.
4621 (delete_disabled_breakpoints): Adjust.
4622 (validate_breakpoints): Only validate software breakpoints.
4623 Adjust to inserted flag change.
4624 (check_mem_read, check_mem_write): Skip breakpoint types other
4625 than software breakpoints. Adjust to inserted flag change.
4626 * mem-break.h (enum raw_bkpt_type): New enum.
4627 (raw_breakpoint, struct process_info): Forward declare.
4628 (Z_packet_to_target_hw_bp_type): Delete declaration.
4629 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4630 (set_gdb_breakpoint, delete_gdb_breakpoint)
4631 (clear_breakpoint_conditions): New declarations.
4632 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4633 (breakpoint_inserted_here): Update comment.
4634 (add_breakpoint_condition, add_breakpoint_commands): Replace
4635 address parameter with a breakpoint pointer parameter.
4636 (gdb_breakpoint_here): Update comment.
4637 (delete_gdb_breakpoint_at): Delete.
4638 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4639 * server.c (process_point_options): Take a struct breakpoint
4640 pointer instead of an address. Adjust.
4641 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4642 delete_gdb_breakpoint.
4643 * spu-low.c (spu_target_ops): Install NULL as
4644 supports_z_point_type method.
4645 * target.h: Include mem-break.h.
4646 (struct target_ops) <prepare_to_access_memory>: Update comment.
4647 <supports_z_point_type>: New field.
4648 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4649 instead of a char. Also take a raw breakpoint pointer.
4650 * win32-arm-low.c (the_low_target): Install NULL as
4651 supports_z_point_type.
4652 * win32-i386-low.c (i386_supports_z_point_type): New function.
4653 (i386_insert_point, i386_remove_point): Adjust to new interface.
4654 (the_low_target): Install i386_supports_z_point_type.
4655 * win32-low.c (win32_supports_z_point_type): New function.
4656 (win32_insert_point, win32_remove_point): Adjust to new interface.
4657 (win32_target_ops): Install win32_supports_z_point_type.
4658 * win32-low.h (struct win32_target_ops):
4659 <supports_z_point_type>: New method.
4660 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4661 instead of a char. Also take a raw breakpoint pointer.
4662
932539e3
PA
46632014-05-20 Pedro Alves <palves@redhat.com>
4664
4665 * mem-break.h: Include break-common.h.
4666 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4667 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4668 (Z_packet_to_target_hw_bp_type): New declaration.
4669 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4670 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4671 (Z_PACKET_ACCESS_WP): Delete macros.
4672 (Z_packet_to_hw_type): Delete function.
4673 * i386-low.h: Don't include break-common.h here.
4674 (Z_packet_to_hw_type): Delete declaration.
4675 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4676 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4677 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4678 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4679 * linux-aarch64-low.c: Don't include break-common.h here.
4680 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4681 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4682 (Z_packet_to_target_hw_bp_type): Delete function.
4683 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4684 function.
4685 (mips_insert_point, mips_remove_point): Use
4686 Z_packet_to_target_hw_bp_type.
4687
4ff0d3d8
PA
46882014-05-20 Pedro Alves <palves@redhat.com>
4689
4690 * linux-aarch64-low.c: Include break-common.h.
4691 (enum target_point_type): Delete.
4692 (Z_packet_to_point_type): Rename to ...
4693 (Z_packet_to_target_hw_bp_type): ... this, and return a
4694 target_hw_bp_type instead.
4695 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4696 instead of an enum target_point_type.
4697 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4698 breakpoint type.
4699 (aarch64_dr_state_insert_one_point)
4700 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4701 (aarch64_handle_aligned_watchpoint)
4702 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4703 Take an enum target_hw_bp_type instead of an enum
4704 target_point_type.
4705 (aarch64_supports_z_point_type): New function.
4706 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4707 use Z_packet_to_target_hw_bp_type.
4708
786dc519
JB
47092014-05-20 Joel Brobecker <brobecker@adacore.com>
4710
4711 * configure.ac: Only use -Werror by default when DEVELOPMENT
4712 is true.
4713 * configure: Regenerate.
4714
9e0aa64f
JK
47152014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4716
4717 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4718 * linux-x86-low.c (X86_64_USER_REGS): New.
4719 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4720
2b577b92
YQ
47212014-04-28 Yao Qi <yao@codesourcery.com>
4722
4723 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4724 name.
4725
94611da2
PA
47262014-04-25 Pedro Alves <palves@redhat.com>
4727
4728 PR server/16255
4729 * linux-low.c (linux_attach_fail_reason_string): New function.
4730 (linux_attach_lwp): Delete.
4731 (linux_attach_lwp_1): Rename to ...
4732 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4733 argument. Remove "initial" parameter. Return int instead of
4734 void. Don't error or warn here.
4735 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4736 failure to attach to the tgid. Call warning when failing to
4737 attach to an lwp.
4738 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4739 argument. Remove "initial" parameter. Return int instead of
4740 void. Don't error or warn here.
4741 (linux_attach_fail_reason_string): New declaration.
4742 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4743 interface change. Use linux_attach_fail_reason_string.
4744
01f9f808
MS
47452014-04-24 Michael Sturm <michael.sturm@mintel.com>
4746 Walfred Tedeschi <walfred.tedeschi@intel.com>
4747
4748 * Makefile.in: Added rules to handle new files
4749 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4750 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4751 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4752 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4753 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4754 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4755 x32-avx512-linux.o.
4756 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4757 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4758 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4759 i386/x32-avx512.xml.
4760 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4761 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4762 i386/x32-avx512-linux.xml.
4763 * i387-fp.c (num_avx512_k_registers): New constant for number
4764 of K registers.
4765 (num_avx512_zmmh_low_registers): New constant for number of
4766 lower ZMM registers (0-15).
4767 (num_avx512_zmmh_high_registers): New constant for number of
4768 higher ZMM registers (16-31).
4769 (num_avx512_ymmh_registers): New contant for number of higher
4770 YMM registers (ymm16-31 added by avx521 on x86_64).
4771 (num_avx512_xmm_registers): New constant for number of higher
4772 XMM registers (xmm16-31 added by AVX512 on x86_64).
4773 (struct i387_xsave): Add space for AVX512 registers.
4774 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4775 Add code to handle AVX512 registers.
4776 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4777 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4778 prototypei from generated file.
4779 (tdesc_amd64_avx512_linux): Likewise.
4780 (init_registers_x32_avx512_linux): Likewise.
4781 (tdesc_x32_avx512_linux): Likewise.
4782 (init_registers_i386_avx512_linux): Likewise.
4783 (tdesc_i386_avx512_linux): Likewise.
4784 (x86_64_regmap): Add AVX512 registers.
4785 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4786 mask.
4787 (initialize_low_arch): Add code to initialize AVX512 registers.
4788
51aa91f9
PA
47892014-04-23 Pedro Alves <palves@redhat.com>
4790
4791 * mem-break.c (find_gdb_breakpoint_at): Make static.
4792 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4793
a4165e94
PA
47942014-04-23 Pedro Alves <palves@redhat.com>
4795
4796 * i386-low.c: Don't include break-common.h here.
4797 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4798 prototype to take target_hw_bp_type as argument instead of a Z
4799 packet char.
4800 * i386-low.h: Include break-common.h here.
4801 (Z_packet_to_hw_type): Declare.
4802 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4803 prototypes.
4804 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4805 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4806 (x86_remove_point): Convert the packet number to a
4807 target_hw_bp_type before calling i386_low_remove_watchpoint.
4808 * win32-i386-low.c (i386_insert_point): Convert the packet number
4809 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4810 (i386_remove_point): Convert the packet number to a
4811 target_hw_bp_type before calling i386_low_remove_watchpoint.
4812
b8acf843
PA
48132014-04-23 Pedro Alves <palves@redhat.com>
4814
4815 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4816
d708bcd1
PA
48172014-04-10 Pedro Alves <palves@redhat.com>
4818
4819 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4820 Check if the condition or command is NULL before checking if the
4821 breakpoint is known. On success, return true.
4822 * mem-break.h (add_breakpoint_condition): Document return.
4823 (add_breakpoint_commands): Add describing comment.
4824 * server.c (skip_to_semicolon): New function.
4825 (process_point_options): Use it.
4826
2eec7d5b
PA
48272014-04-09 Pedro Alves <palves@redhat.com>
4828
4829 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4830 to lwpid_of.
4831
fa96cb38
PA
48322014-02-27 Pedro Alves <palves@redhat.com>
4833
4834 PR 12702
4835 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4836 macros.
4837 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4838 output.
4839 (last_thread_of_process_p): Take a PID argument instead of a
4840 thread pointer.
4841 (linux_wait_for_lwp): Delete.
4842 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4843 functions.
4844 (linux_low_filter_event): New function, party factored out from
4845 linux_wait_for_event.
4846 (linux_wait_for_event): Rename to ...
4847 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4848 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4849 sigsuspend. Check for zombie leaders.
4850 (linux_wait_for_event): Reimplement as wrapper around
4851 linux_wait_for_event_filtered.
4852 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4853 a normal or signal exit is seen, it's the whole process exiting.
4854 (wait_for_sigstop): No longer a for_each_inferior callback.
4855 Rewrite on top of linux_wait_for_event_filtered.
4856 (stop_all_lwps): Call wait_for_sigstop directly.
4857 * server.c (resume, handle_target_event): Handle
4858 TARGET_WAITKIND_NO_RESUMED.
4859
d763de10
JB
48602014-02-26 Joel Brobecker <brobecker@adacore.com>
4861
4862 * win32-low.c (psapi_get_dll_name,
4863 * win32_CreateToolhelp32Snapshot): Delete.
4864 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4865 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4866 Delete.
4867 (handle_load_dll): Add function description.
4868 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4869
850a0f76
JB
48702014-02-26 Joel Brobecker <brobecker@adacore.com>
4871
4872 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4873 Add comment.
4874 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4875 base address when calling win32_add_one_solib.
4876 (handle_load_dll): Delete local variable load_addr.
4877 Remove 0x1000 offset applied to DLL base address when calling
4878 win32_add_one_solib.
4879 (handle_unload_dll): Add comment.
4880
f25b3fc3
JB
48812014-02-26 Joel Brobecker <brobecker@adacore.com>
4882
4883 * win32-low.c (win32_add_all_dlls): Renames
4884 win32_ensure_ntdll_loaded. Rewrite function documentation.
4885 Adjust implementation to always load all DLLs.
4886 Add 0x1000 offset to DLL base address when calling
4887 win32_add_one_solib.
4888 (child_initialization_done): New static global.
4889 (do_initial_child_stuff): Set child_initialization_done to
4890 zero during child initialization, and 1 after. Replace call
4891 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4892 Add comment.
4893 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4894 (handle_unload_dll): Add function documentation.
4895 (get_child_debug_event): Ignore load and unload DLL events
4896 during child initialization.
4897
d86d4aaf
DE
48982014-02-20 Doug Evans <dje@google.com>
4899
3bc32da3 4900 Remove global all_lwps.
d86d4aaf
DE
4901 * inferiors.h (ptid_of): Move here from linux-low.h.
4902 (pid_of, lwpid_of): Ditto.
4903 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4904 parameter is a struct thread_info * now.
4905 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4906 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4907 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4908 directly.
4909 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4910 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4911 * linux-arm-low.c (update_registers_callback): Update, "entry"
4912 parameter is a struct thread_info * now.
4913 Fetch lwpid from current_inferior directly.
4914 (arm_insert_point): Pass &all_threads to find_inferior instead of
4915 &all_lwps.
4916 (arm_remove_point): Ditto.
4917 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4918 (arm_prepare_to_resume): Fetch pid from thread.
4919 (arm_read_description): Fetch lwpid from current_inferior directly.
4920 * linux-low.c (all_lwps): Delete.
4921 (delete_lwp): Delete call to remove_inferior.
4922 (handle_extended_wait): Fetch lwpid from thread.
4923 (add_lwp): Don't set lwp->entry.id. Remove call to
4924 add_inferior_to_list.
4925 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4926 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4927 (kill_one_lwp_callback): Ditto.
4928 (linux_kill): Don't dereference NULL pointer.
4929 Fetch ptid,lwpid from thread.
4930 (get_detach_signal): Fetch ptid from thread.
4931 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4932 Simplify call to regcache_invalidate_thread.
4933 (delete_lwp_callback): Update, "entry" parameter is a
4934 struct thread_info * now. Fetch pid from thread.
4935 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4936 (status_pending_p_callback): Update, "entry" parameter is a
4937 struct thread_info * now. Fetch ptid from thread.
4938 (find_lwp_pid): Update, "entry" parameter is a
4939 struct thread_info * now.
4940 (linux_wait_for_lwp): Fetch pid from thread.
4941 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4942 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4943 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4944 (dequeue_one_deferred_signal): Ditto.
4945 (cancel_breakpoint): Fetch ptid from current_inferior.
4946 (linux_wait_for_event): Pass &all_threads to find_inferior,
4947 not &all_lwps. Fetch ptid, lwpid from thread.
4948 (count_events_callback): Update, "entry" parameter is a
4949 struct thread_info * now.
4950 (select_singlestep_lwp_callback): Ditto.
4951 (select_event_lwp_callback): Ditto.
4952 (cancel_breakpoints_callback): Ditto.
4953 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4954 not &all_lwps.
4955 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4956 (unsuspend_one_lwp): Update, "entry" parameter is a
4957 struct thread_info * now.
4958 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4959 not &all_lwps.
4960 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4961 Fetch lwpid from thread, not lwp.
4962 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4963 Pass &all_threads to find_inferior, not &all_lwps.
4964 (send_sigstop): Fetch lwpid from thread, not lwp.
4965 (send_sigstop_callback): Update, "entry" parameter is a
4966 struct thread_info * now.
4967 (suspend_and_send_sigstop_callback): Ditto.
4968 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4969 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4970 struct thread_info * now.
4971 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4972 from thread, lwp.
4973 (lwp_running): Update, "entry" parameter is a
4974 struct thread_info * now.
4975 (stop_all_lwps): Fetch ptid from thread.
4976 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4977 (linux_resume_one_lwp): Fetch lwpid from thread.
4978 (linux_set_resume_request): Update, "entry" parameter is a
4979 struct thread_info * now. Fetch pid, lwpid from thread.
4980 (resume_status_pending_p): Update, "entry" parameter is a
4981 struct thread_info * now.
4982 (need_step_over_p): Ditto. Fetch lwpid from thread.
4983 (start_step_over): Fetch lwpid from thread.
4984 (linux_resume_one_thread): Update, "entry" parameter is a
4985 struct thread_info * now. Fetch lwpid from thread.
4986 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4987 (proceed_one_lwp): Update, "entry" parameter is a
4988 struct thread_info * now. Fetch lwpid from thread.
4989 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4990 struct thread_info * now.
4991 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4992 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4993 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4994 directly.
4995 (regsets_store_inferior_registers): Ditto.
4996 (fetch_register, store_register): Ditto.
4997 (linux_read_memory, linux_write_memory): Ditto.
4998 (linux_request_interrupt): Ditto.
4999 (linux_read_auxv): Ditto.
5000 (linux_xfer_siginfo): Ditto.
5001 (linux_qxfer_spu): Ditto.
5002 (linux_qxfer_libraries_svr4): Ditto.
5003 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5004 moved to inferiors.h.
5005 (get_lwp): Delete.
5006 (get_thread_lwp): Update.
5007 (struct lwp_info): Delete member "entry". Simplify comment for
5008 member "thread".
5009 (all_lwps): Delete.
5010 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5011 current_inferior directly.
5012 (update_watch_registers_callback): Update, "entry" parameter is a
5013 struct thread_info * now. Fetch pid from thread.
5014 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5015 (mips_insert_point): Fetch lwpid from current_inferior.
5016 Pass &all_threads to find_inferior, not &all_lwps.
5017 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5018 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5019 directly.
5020 (mips_stopped_data_address): Ditto.
5021 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5022 directly.
5023 * linux-tile-low.c (tile_arch_setup): Ditto.
5024 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5025 (update_debug_registers_callback): Update, "entry" parameter is a
5026 struct thread_info * now. Fetch pid from thread.
5027 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5028 Pass &all_threads to find_inferior, not &all_lwps.
5029 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5030 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5031 Pass &all_threads to find_inferior, not &all_lwps.
5032 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5033 (i386_dr_low_get_status): Ditto.
5034 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5035 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5036 (x86_linux_read_description): Ditto.
5037 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5038
3b8361aa
DE
50392014-02-20 Doug Evans <dje@google.com>
5040
5041 * inferiors.c (get_first_inferior): Fix buglet.
5042
f7667f0d
DE
50432014-02-19 Doug Evans <dje@google.com>
5044
5045 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5046 * inferiors.c (add_thread): Change result type to struct thread_info *.
5047 All callers updated.
5048 (add_lwp): Call add_thread here instead of in callers.
5049 All callers updated.
5050 * linux-low.h (get_lwp_thread): Rewrite.
5051 (struct lwp_info): New member "thread".
5052
b3312d80
DE
50532014-02-19 Doug Evans <dje@google.com>
5054
5055 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5056 All callers updated.
5057
ecc6f45c
DE
50582014-02-19 Doug Evans <dje@google.com>
5059
5060 * inferiors.c (add_thread): Fix whitespace.
5061
649ebbca
DE
50622014-02-19 Doug Evans <dje@google.com>
5063
5064 * dll.c (clear_dlls): Replace accessing list implemention details
5065 with API function.
5066 * gdbthread.h (get_first_thread): Declare.
5067 * inferiors.c (for_each_inferior_with_data): New function.
5068 (get_first_thread): New function.
5069 (find_thread_ptid): Simplify.
5070 (get_first_inferior): New function.
5071 (clear_list): Delete.
5072 (one_inferior_p): New function.
5073 (clear_inferior_list): New function.
5074 (clear_inferiors): Update.
5075 * inferiors.h (for_each_inferior_with_data): Declare.
5076 (clear_inferior_list): Declare.
5077 (one_inferior_p): Declare.
5078 (get_first_inferior): Declare.
5079 * linux-low.c (linux_wait_for_event): Replace accessing list
5080 implemention details with API function.
5081 * server.c (target_running): Ditto.
5082 (accumulate_file_name_length): New function.
5083 (emit_dll_description): New function.
5084 (handle_qxfer_libraries): Replace accessing list implemention
5085 details with API function.
5086 (handle_qxfer_threads_worker): New function.
5087 (handle_qxfer_threads_proper): Replace accessing list implemention
5088 details with API function.
5089 (handle_query): Ditto.
5090 (visit_actioned_threads_callback_ftype): New typedef.
5091 (visit_actioned_threads_data): New struct.
5092 (visit_actioned_threads): Rewrite to be find_inferior callback.
5093 (resume): Call find_inferior.
5094 (handle_status): Replace accessing list implemention
5095 details with API function.
5096 (process_serial_event): Replace accessing list implemention details
5097 with API function.
5098 * target.c (set_desired_inferior): Replace accessing list implemention
5099 details with API function.
5100 * tracepoint.c (same_process_p): New function.
5101 (gdb_agent_about_to_close): Replace accessing list implemention
5102 details with API function.
5103 * win32-low.c (child_delete_thread): Replace accessing list
5104 implemention details with API function.
5105 (match_dll_by_basename): New function.
5106 (dll_is_loaded_by_basename): New function.
5107 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5108 details call to dll_is_loaded_by_basename.
5109
80894984
DE
51102014-02-19 Doug Evans <dje@google.com>
5111
5112 * dll.h (struct dll_info): Add comment.
5113 * gdbthread.h (struct thread_info): Add comment.
5114 (current_ptid): Simplify.
5115 * inferiors.c (add_process): Update.
5116 (remove_process): Update.
5117 * inferiors.h (struct process_info): Rename member "head" to "entry".
5118 * linux-low.c (delete_lwp): Update.
5119 (add_lwp): Update.
5120 (last_thread_of_process_p): Update.
5121 (kill_one_lwp_callback, linux_kill): Update.
5122 (status_pending_p_callback): Update.
5123 (wait_for_sigstop): Update. Simplify read of ptid.
5124 (start_step_over): Update.
5125 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5126 (get_lwp_thread): Update.
5127 (struct lwp_info): Rename member "head" to "entry".
5128 * regcache.h (inferior_list_entry): Delete.
5129 * server.c (kill_inferior_callback): Update.
5130 (detach_or_kill_inferior_callback): Update.
5131 (print_started_pid): Update.
5132 (print_attached_pid): Update.
5133 (process_serial_event): Simplify read of ptid.
5134 * thread-db.c (thread_db_create_event): Update.
5135 (thread_db_get_tls_address): Update.
5136 * win32-low.c (current_inferior_ptid): Simplify.
5137
46917d26
TT
51382014-02-19 Tom Tromey <tromey@redhat.com>
5139
5140 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5141 argument.
5142 (target_supports_btrace): Update.
5143
0759a81e
YQ
51442014-02-14 Yao Qi <yao@codesourcery.com>
5145
5146 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5147 (rsp-low-ipa.o): New target.
5148
a7191e8b
TT
51492014-02-12 Tom Tromey <tromey@redhat.com>
5150
5151 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5152 convert_ascii_to_int.
5153 * regcache.c (registers_to_string): Likewise.
5154 * remote-utils.c (decode_M_packet): Likewise.
5155 * server.c (process_serial_event): Likewise.
5156
ff0e980e
TT
51572014-02-12 Tom Tromey <tromey@redhat.com>
5158
5159 * server.c (handle_query, handle_v_run): Use hex2bin, not
5160 unhexify.
5161 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5162
e9371aff
TT
51632014-02-12 Tom Tromey <tromey@redhat.com>
5164
5165 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5166 convert_int_to_ascii.
5167 * regcache.c (registers_to_string, collect_register_as_string):
5168 Likewise.
5169 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5170 Likewise.
5171 * server.c (process_serial_event): Likewise.
5172 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5173 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5174
971dc0b8
TT
51752014-02-12 Tom Tromey <tromey@redhat.com>
5176
5177 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5178 bin2hex, not hexify.
5179 * tracepoint.c (cmd_qtstatus): Likewise.
5180
0a822afb
TT
51812014-02-12 Tom Tromey <tromey@redhat.com>
5182
5183 * remote-utils.c (monitor_output): Pass explicit length to
5184 hexify.
5185
9c3d6531
TT
51862014-02-12 Tom Tromey <tromey@redhat.com>
5187
5188 * tracepoint.c: Include rsp-low.h.
5189 * server.c: Include rsp-low.h.
5190 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5191 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5192 declare.
5193 * remote-utils.c: Include rsp-low.h.
5194 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5195 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5196 (convert_int_to_ascii, convert_ascii_to_int): Move to
5197 common/rsp-low.c.
5198 * regcache.c: Include rsp-low.h.
5199 * ax.c: Include rsp-low.h.
5200 * Makefile.in (SFILES): Add common/rsp-low.c.
5201 (OBS): Add rsp-low.o.
5202 (rsp-low.o): New target.
5203
01fd3ea5
TT
52042014-02-12 Tom Tromey <tromey@redhat.com>
5205
5206 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5207 Include print-utils.h.
5208 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5209 (plongest, thirty_two, phex_nz): Remove.
5210 * Makefile.in (SFILES): Add common/print-utils.c.
5211 (OBS): Add print-utils.o.
5212 (print-utils-ipa.o): New target.
5213 (print-utils.o): New target.
5214 (IPA_OBJS): Add print-utils-ipa.o.
5215
e99dc820
TT
52162014-02-06 Tom Tromey <tromey@redhat.com>
5217
5218 * Makefile.in (SFILES): Fix indentation.
5219
ee1e2d4f
DE
52202014-02-05 Doug Evans <dje@google.com>
5221
5222 * linux-low.c (linux_wait_for_event): Improve comment.
5223 (linux_wait_1): Keep current_inferior in sync with event_child.
5224
f5a02773
DE
52252014-01-22 Doug Evans <dje@google.com>
5226
5227 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5228
87ce2a04
DE
52292014-01-22 Doug Evans <dje@google.com>
5230
5231 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5232 * configure: Regenerate.
5233 * config.in: Regenerate.
5234 * Makefile.in (SFILES): Add debug.c.
5235 (OBS): Add debug.o.
5236 * debug.c: New file.
5237 * debug.h: New file.
5238 * linux-aarch64-low.c (*): Update all debugging printfs to use
5239 debug_printf instead of fprintf.
5240 * linux-arm-low.c (*): Ditto.
5241 * linux-cris-low.c (*): Ditto.
5242 * linux-crisv32-low.c (*): Ditto.
5243 * linux-m32r-low.c (*): Ditto.
5244 * linux-sparc-low.c (*): Ditto.
5245 * linux-x86.c (*): Ditto.
5246 * linux-low.c (*): Ditto.
5247 (linux_wait_1): Add calls to debug_enter, debug_exit.
5248 (linux_wait): Remove redundant debugging printf.
5249 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5250 (linux_resume, unstop_all_lwps): Ditto.
5251 * mem-break.c (*): Update all debugging printfs to use
5252 debug_printf instead of fprintf.
5253 * remote-utils.c (*): Ditto.
5254 * thread-db.c (*): Ditto.
5255 * server.c #include <ctype.h>, "gdb_vecs.h".
5256 (debug_threads): Moved to debug.c.
5257 (*): Update all debugging printfs to use debug_printf instead of
5258 fprintf.
5259 (start_inferior): Replace call to fflush with call to debug_flush.
5260 (monitor_show_help): Mention set debug-format.
5261 (parse_debug_format_options): New function.
5262 (handle_monitor_command): Handle "monitor set debug-format".
5263 (gdbserver_usage): Mention --debug-format.
5264 (main): Parse --debug-format.
5265 * server.h (debug_threads): Declaration moved to debug.h.
5266 #include "debug.h".
5267 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5268 trace_debug_1 that uses debug_printf.
5269 (tracepoint_look_up_symbols): Update all debugging printfs to use
5270 debug_printf instead of fprintf.
5271
e671835b
BS
52722014-01-20 Baruch Siach <baruch@tkos.co.il>
5273
5274 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5275 sys/ptrace.h.
5276
b5737fa9
PA
52772014-01-17 Pedro Alves <palves@redhat.com>
5278
ea38d2a9 5279 PR build/16445
c7faa97a
PA
5280 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5281 defined after including gdb_proc_service.h.
b5737fa9 5282
40ed484e
DE
52832014-01-16 Doug Evans <dje@google.com>
5284
5285 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5286 (match_dll): Use it.
5287
969c39fb
MM
52882014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5289
5290 * target.h (target_ops) <read_btrace>: Change parameters and
5291 return type to allow error reporting.
5292 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5293 trace reading errors on.
5294 * linux-low.c (linux_low_read_btrace): Pass trace reading
5295 errors on.
5296 (linux_low_disable_btrace): New.
5297
ab7f45ba
DE
52982014-01-15 Doug Evans <dje@google.com>
5299
5300 * inferiors.c (thread_id_to_gdb_id): Delete.
5301 * inferiors.h (thread_id_to_gdb_id): Delete.
5302
66af0f44
EZ
53032014-01-13 Eli Zaretskii <eliz@gnu.org>
5304
5305 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5306 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5307 versions.
5308
9939e131
PA
53092014-01-08 Pedro Alves <palves@redhat.com>
5310
5311 * server.c (handle_status): Don't discard previous queued stop
5312 replies or thread's pending status here.
5313 (main) <disconnection>: Do it here instead.
5314
b7ea362b
PA
53152014-01-08 Pedro Alves <palves@redhat.com>
5316
5317 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5318 * server.c (visit_actioned_threads, handle_pending_status): New
5319 function.
5320 (handle_v_cont): Factor out parts to ...
5321 (resume): ... this new function. If in all-stop, and a thread
5322 being resumed has a pending status, report it without actually
5323 resuming.
5324 (myresume): Adjust to use the new 'resume' function.
5325 (clear_pending_status_callback, set_pending_status_callback)
5326 (find_status_pending_thread_callback): New functions.
5327 (handle_status): Handle the case of multiple threads having
5328 interesting statuses to report. Report threads' real last signal
5329 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5330 with an interesting thread to report the status for, instead of
5331 always reporting the status of the first thread.
5332
28498c42
JB
53332014-01-01 Joel Brobecker <brobecker@adacore.com>
5334
5335 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5336 * gdbreplay.c (gdbreplay_version): Likewise.
5337
f45c82da
YZ
53382013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5339
5340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5341 iov.iov_len with the real length in use.
5342
379a5e2d
JB
53432013-12-13 Joel Brobecker <brobecker@adacore.com>
5344
5345 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5346 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5347 for all targets that use win32-low.c.
5348 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5349 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5350
4210d83e
PA
53512013-12-13 Pedro Alves <palves@redhat.com>
5352
5353 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5354 if equal to TARGET_WAITKIND_LOADED.
5355 * win32-low.c (cached_status): New static global.
5356 (win32_wait): Add declaration.
5357 (do_initial_child_stuff): Flush all initial pending debug events
5358 up to the initial breakpoint.
5359 (win32_wait): If CACHED_STATUS was set, return that instead
5360 of doing a real wait. Remove the code resuming the execution
5361 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5362 during the initial phase. Also remove the code changing
5363 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5364 TARGET_WAITKIND_STOPPED.
5365
e7f0d979
YQ
53662013-12-11 Yao Qi <yao@codesourcery.com>
5367
5368 * notif.c (handle_notif_ack): Return 0 if no notification
5369 matches.
5370
ebcf782c
DE
53712013-11-20 Doug Evans <dje@google.com>
5372
5373 * linux-low.c (linux_set_resume_request): Fix comment.
5374
20ad9378
DE
53752013-11-20 Doug Evans <dje@google.com>
5376
5377 * linux-low.c (resume_status_pending_p): Tweak comment.
5378
a196ebeb
WT
53792013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5380
5381 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5382 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5383 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5384 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5385 (srv_amd64_regobj): Add amd64-mpx.o.
5386 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5387 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5388 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5389 * i387-fp.c (num_pl_bnd_register) Added constant.
5390 (num_pl_bnd_cfg_registers) Added constant.
5391 (struct i387_xsave) Added reserved area and MPX fields.
5392 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5393 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5394 function.
5395 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5396 (init_registers_amd64_mpx_linux): Declare new function.
5397 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5398 (x86_64_regmap): Add MPX registers.
5399 (x86_linux_read_description): Add MPX case.
5400 (initialize_low_arch): Initialize MPX targets.
5401
0080a2f6
TT
54022013-11-18 Tom Tromey <tromey@redhat.com>
5403
5404 * configure: Rebuild.
5405 * configure.ac: Don't check for stdlib.h.
5406 * gdbreplay.c: Unconditionally include stdlib.h.
5407
2978b111
TT
54082013-11-18 Tom Tromey <tromey@redhat.com>
5409
5410 * config.in: Rebuild.
5411 * configure: Rebuild.
5412 * configure.ac: Don't use AC_HEADER_DIRENT.
5413
a3d08894
TT
54142013-11-18 Tom Tromey <tromey@redhat.com>
5415
5416 * server.h: Don't check HAVE_STRING_H.
5417 * gdbreplay.c: Don't check HAVE_STRING_H.
5418 * configure: Rebuild.
5419
0a5dd17d
TT
54202013-11-18 Tom Tromey <tromey@redhat.com>
5421
5422 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5423 LIBGNU.
5424
1bd2f0ba
TT
54252013-11-08 Tom Tromey <tromey@redhat.com>
5426
5427 * configure, config.in: Rebuild.
5428 * configure.ac: Remove unused configury.
5429
3266f10b
TT
54302013-11-08 Tom Tromey <tromey@redhat.com>
5431
5432 * acinclude.m4: Include common.m4, codeset.m4.
5433 * configure, config.in: Rebuild.
5434 * configure.ac: Use GDB_AC_COMMON.
5435
6682d959
AA
54362013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5437
5438 * linux-s390-low.c (HWCAP_S390_TE): New define.
5439 (s390_arch_setup): Consider the TE field in the HWCAP for
5440 determining 'have_regset_tdb'.
5441
fd0a4d76
SDJ
54422013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5443
5444 PR gdb/16014
5445 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5446 call to sizeof.
5447
1a3d890b
PA
54482013-10-02 Pedro Alves <palves@redhat.com>
5449
5450 * server.c (process_serial_event): Don't output "GDBserver
5451 exiting" if GDB is connected through stdio.
5452 * target.c (mywait): Likewise, be silent if GDB is connected
5453 through stdio.
5454
97ad4581
JB
54552013-10-01 Joel Brobecker <brobecker@adacore.com>
5456
5457 * lynx-low.c (lynx_add_threads_after_attach): New function.
5458 (lynx_attach): Remove call to add_thread. Add call to
5459 lynx_add_threads_after_attach instead.
5460
5b4e221c
MF
54612013-09-28 Mike Frysinger <vapier@gentoo.org>
5462
5463 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5464 * config.in, configure: Regenerated.
5465
ee47b2f8
YQ
54662013-09-18 Yao Qi <yao@codesourcery.com>
5467
5468 PR server/15959
5469 * server.c (start_inferior): Clear 'resume_info'.
5470
d6707650 54712013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5472
d6707650
JW
5473 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5474 for each register.
5475
9243dd0e 54762013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5477
9243dd0e
JW
5478 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5479 linux-tile-low.o to srv_tgtobj.
5480
c623a6ef
WN
54812013-09-16 Will Newton <will.newton@linaro.org>
5482
5483 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5484 out regs.
5485
fb71d39e
PA
54862013-09-06 Pedro Alves <palves@redhat.com>
5487
5488 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5489 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5490 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5491 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5492 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5493 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5494
8e7e9910
PA
54952013-09-06 Pedro Alves <palves@redhat.com>
5496
5497 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5498 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5499
7c3a12ca
PA
55002013-09-06 Pedro Alves <palves@redhat.com>
5501
5502 * linux-amd64-ipa.c: Include tracepoint.h.
5503 * linux-i386-ipa.c: Include tracepoint.h.
5504
8eb3d7b6
RW
55052013-09-06 Ricard Wanderlof <ricardw@axis.com>
5506
5507 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5508 (ps_get_thread_area): New function.
5509
eddddb9d
RW
55102013-09-06 Ricard Wanderlof <ricardw@axis.com>
5511
5512 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5513 (initialize_low_arch): Call init_registers_crisv32 rather than
5514 init_register_crisv32.
5515
533b0600
PA
55162013-09-05 Pedro Alves <palves@redhat.com>
5517
5518 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5519 to ...
5520 * hostio.h: ... this new file.
5521 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5522 win32-low.c: Include hostio.h.
5523
0ce3d3b5
PA
55242013-09-05 Pedro Alves <palves@redhat.com>
5525
5526 * server.h (gdb_client_data, handler_func, callback_handler_func)
5527 (delete_file_handler, add_file_handler, append_callback_event)
5528 (delete_callback_event, start_event_loop, initialize_event_loop):
5529 Move to event-loop.h and include it.
5530 * event-loop.h: New file.
5531
799cdc37
PA
55322013-09-05 Pedro Alves <palves@redhat.com>
5533
5534 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5535 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5536 (loaded_dll, unloaded_dll): Move to ...
5537 * dll.h: ... this new file.
5538 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5539
6a6bbd9d
PA
55402013-09-05 Pedro Alves <palves@redhat.com>
5541
5542 * server.h (current_process, get_thread_process, all_processes)
5543 (add_inferior_to_list, for_each_inferior, current_inferior)
5544 (remove_inferior, add_process, remove_process, find_process_pid)
5545 (have_started_inferiors_p, have_attached_inferiors_p)
5546 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5547 (clear_inferiors, find_inferior, find_inferior_id)
5548 (inferior_target_data, set_inferior_target_data)
5549 (inferior_regcache_data, set_inferior_regcache_data): Move to
5550 inferiors.h, and include it.
5551 * inferiors.h: New file.
5552
f699aaba
PA
55532013-09-05 Pedro Alves <palves@redhat.com>
5554
5555 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5556 Move ...
72f4393d 5557 * ax.h: ... here.
f699aaba 5558
c144c7a0
PA
55592013-09-05 Pedro Alves <palves@redhat.com>
5560
5561 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5562 tracepoint.h.
5563 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5564 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5565 (handle_tracepoint_general_set, handle_tracepoint_query)
5566 (tracepoint_finished_step, tracepoint_was_hit)
5567 (release_while_stepping_state_list, current_traceframe)
5568 (in_readonly_region, traceframe_read_mem)
5569 (fetch_traceframe_registers, traceframe_read_sdata)
5570 (traceframe_read_info, struct fast_tpoint_collect_status)
5571 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5572 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5573 (supply_fast_tracepoint_registers)
5574 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5575 (ipa_tdesc, claim_trampoline_space)
5576 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5577 (agent_mem_read, agent_get_trace_state_variable_value)
5578 (agent_set_trace_state_variable_value, agent_tsv_read)
5579 (agent_mem_read_string, get_raw_reg_func_addr)
5580 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5581 * tracepoint.h: ... this new file.
5582
ff42e6ab
PA
55832013-09-05 Pedro Alves <palves@redhat.com>
5584
5585 * server.h (perror_with_name, error, fatal, warning, paddress)
5586 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5587 include it.
5588 * utils.h: New file.
5589
541af0f4
PA
55902013-09-05 Pedro Alves <palves@redhat.com>
5591
5592 * server.h (remote_debug, noack_mode, transport_is_reliable)
5593 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5594 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5595 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5596 (write_enn, initialize_async_io, enable_async_io)
5597 (disable_async_io, check_remote_input_interrupt_request)
5598 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5599 (dead_thread_notify, prepare_resume_reply)
5600 (decode_address_to_semicolon, decode_address, decode_m_packet)
5601 (decode_M_packet, decode_X_packet, decode_xfer_write)
5602 (decode_search_memory_packet, unhexify, hexify)
5603 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5604 (look_up_one_symbol, relocate_instruction)
5605 (monitor_output): Move to remote-utils.h, and include it.
5606 * remote-utils.h: New file.
5607
eebdf26b
PA
56082013-09-05 Pedro Alves <palves@redhat.com>
5609
5610 * server.h (_): Delete.
5611
3aafd2ff
PA
56122013-09-02 Pedro Alves <palves@redhat.com>
5613
5614 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5615 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5616 allocated.
5617 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5618
cee83bcb
PM
56192013-09-02 Pierre Muller <muller@sourceware.org>
5620
5621 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5622 or WriteProcessMemory complete successfully and handle
5623 ERROR_PARTIAL_COPY error.
5624
9a13b2fa
PA
56252013-09-02 Pedro Alves <palves@redhat.com>
5626
5627 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5628 error instead of EIO.
5629
602e3198
JK
56302013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5631
5632 PR server/15604
5633 * linux-low.c: Include filestuff.h.
5634 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5635 * lynx-low.c: Include filestuff.h.
5636 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5637 * server.c: Include filestuff.h.
5638 (main): Call notice_open_fds.
5639 * spu-low.c: Include filestuff.h.
5640 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5641
96d7229d
LM
56422013-08-22 Luis Machado <lgustavo@codesourcery.com>
5643
5644 * Makefile.in: Explain why ../target and ../nat are not
5645 listed as include file search paths.
5646 (linux-waitpid.o): New object file rule.
5647 * configure.srv (srv_native_linux_obj): New variable.
5648 Replace all occurrences of linux native object files with
5649 $srv_native_linux_obj.
5650 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5651 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5652 (linux_enable_event_reporting): Remove declaration.
5653 (my_waitpid): Moved to common/linux-waitpid.c.
5654 (linux_wait_for_event): Pass ptid when calling
5655 linux_enable_event_reporting.
5656 (linux_supports_tracefork_flag): Remove.
5657 (linux_enable_event_reporting): Likewise.
5658 (linux_tracefork_grandchild): Remove.
5659 (STACK_SIZE): Moved to common/linux-ptrace.c.
5660 (linux_tracefork_child): Remove.
5661 (linux_test_for_tracefork): Remove.
5662 (linux_look_up_symbols): Call linux_supports_traceclone.
5663 (initialize_low): Remove call to linux_test_for_tracefork.
5664 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5665 common/linux-ptrace.h.
5666 (PTRACE_TYPE_ARG4): Likewise.
5667 Include linux-ptrace.h.
5668
32940073
PA
56692013-08-21 Pedro Alves <palves@redhat.com>
5670
5671 * config.in: Renegerate.
5672
33b60d58 56732013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5674
33b60d58
LM
5675 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5676 (SFILES): Remove $(srcdir)/common/target-common.c and
5677 add $(srcdir)/target/waitstatus.c.
5678 (OBS): Remove target-common.o and add waitstatus.o.
5679 (server_h): Remove $(srcdir)/../common/target-common.h and
5680 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5681 and $(srcdir)/../target/waitstatus.h.
5682 (target-common.o): Remove.
5683 (waitstatus.o): New target object file.
5684 * target.h: Do not include target-common.h and
5685 include target/resume.h, target/wait.h and
5686 target/waitstatus.h.
5687
b8e1b30e
LM
56882013-08-13 Luis Machado <lgustavo@codesourcery.com>
5689
5690 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5691 to PTRACE_TYPE_ARG3.
5692 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5693 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5694 PTRACE_TYPE_ARG4.
5695 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5696 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5697
7a60ad40
YQ
56982013-07-27 Jie Zhang <jie@codesourcery.com>
5699 Daniel Jacobowitz <dan@codesourcery.com>
5700 Yao Qi <yao@codesourcery.com>
5701
5702 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5703 (mips-linux-watch.o): New rule.
5704 (mips_linux_watch_h): New variable.
5705 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5706 srv_tgtobj.
5707 * linux-mips-low.c: Include mips-linux-watch.h.
5708 (struct arch_process_info, struct arch_lwp_info): New.
5709 (update_watch_registers_callback): New function.
5710 (mips_linux_new_process, mips_linux_new_thread) New functions.
5711 (mips_linux_prepare_to_resume, mips_insert_point): New
5712 functions.
5713 (mips_remove_point, mips_stopped_by_watchpoint): New
5714 functions.
5715 (rsp_bp_type_to_target_hw_bp_type): New function.
5716 (mips_stopped_data_address): New function.
5717 (the_low_target): Add watchpoint support functions.
5718
de6f69ad
YQ
57192013-07-27 Yao Qi <yao@codesourcery.com>
5720
5721 * i386-low.c: Include break-common.h.
5722 (enum target_hw_bp_type): Remove.
5723
3360c0bf
LM
57242013-07-24 Luis Machado <lgustavo@codesourcery.com>
5725
5726 * Makefile.in (SFILES): /common/target-common.c.
5727 (OBS): Add target-common.o.
5728 (server_h): Add $(srcdir)/../common/target-common.h.
5729 (target-common.o): New target.
5730 * server.c (queue_stop_reply_callback): Free
5731 status string after use.
5732 * target.c (target_waitstatus_to_string): Remove.
5733 * target.h: Include target-common.h.
5734 (resume_kind): Likewise.
5735 (target_waitkind): Likewise.
5736 (target_waitstatus): Likewise.
5737 (TARGET_WNOHANG): Likewise.
5738
bd885420
YQ
57392013-07-04 Yao Qi <yao@codesourcery.com>
5740
5741 * Makefile.in (host_alias): Use @host_noncanonical@.
5742 (target_alias): Use @target_noncanonical@.
5743 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5744 ACX_NONCANONICAL_HOST.
5745 * configure: Regenerated.
5746
5747 Revert:
5748 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5749
5750 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5751 * configure: Rebuild.
5752 * Makefile.in (version_host, version_target): Get from configure.
5753 (version.c): Use $(version_host) and $(version_target).
5754
17ef446e
PA
57552013-07-03 Pedro Alves <palves@redhat.com>
5756
5757 * Makefile.in (config.status): Depend on development.sh.
5758 * acinclude.m4: Include libmcheck.m4.
5759 * configure: Regenerate.
5760
7a9a7487
MG
57612013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5762
5763 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5764 attribute inside the parentheses.
5765 (winapi_DebugSetProcessKillOnExit): Ditto.
5766 (winapi_DebugBreakProcess): Ditto.
5767 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5768
49b64de6
MG
57692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5770
5771 * notif.h (notif_event): Add a dummy member to avoid compiler
5772 errors.
5773
d5749ee7
PA
57742013-07-01 Pedro Alves <palves@redhat.com>
5775
5776 * hostio.c (HOSTIO_PATH_MAX): Define.
5777 (require_filename, handle_open, handle_unlink, handle_readlink):
5778 Use it.
5779
d8d2a3ee
PA
57802013-07-01 Pedro Alves <palves@redhat.com>
5781
5782 * server.h: Include "pathmax.h".
5783 * linux-low.c: Don't include sys/param.h.
5784 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5785 MAXPATHLEN.
5786 * win32-low.c: Don't include sys/param.h.
5787 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5788
bc7dea8d
PA
57892013-07-01 Pedro Alves <palves@redhat.com>
5790
5791 * event-loop.c: Don't check HAVE_UNISTD_H before including
5792 <unistd.h>.
5793 * gdbreplay.c: Likewise.
5794 * remote-utils.c: Likewise.
5795 * server.c: Likewise.
5796 * configure.ac: Don't check for unistd.h.
5797 * configure: Regenerate.
5798
d6c2da54
TT
57992013-06-28 Tom Tromey <tromey@redhat.com>
5800
5801 * Makefile.in (version.c): Use version.in, not
5802 common/version.in.
5803
257b6bec
MG
58042013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5805
5806 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5807 * configure: Rebuild.
5808 * Makefile.in (version_host, version_target): Get from configure.
5809 (version.c): Use $(version_host) and $(version_target).
5810
86ebe149
DK
58112013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5812
5813 Fix trace-status to output user name without trailing colon.
5814 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5815
f30aa5af
DK
58162013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5817
5818 Fix trace-status to output proper start-time and stop-time.
5819 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5820 output start time and stop time in hex as gdb expects.
5821
28a93511
YQ
58222013-06-26 Pedro Alves <pedro@codesourcery.com>
5823
5824 * tracepoint.c (build_traceframe_info_xml): Output trace state
5825 variables present in the trace buffer.
5826
01208463
TT
58272013-06-24 Tom Tromey <tromey@redhat.com>
5828
5829 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5830 create-version.sh.
5831 (version.o): Remove.
5832 * gdbreplay.c: Include version.h.
5833 (version, host_name): Don't declare.
5834 * server.h: Include version.h.
5835 (version, host_name): Don't declare.
5836
760256f9
PA
58372013-06-12 Pedro Alves <palves@redhat.com>
5838
5839 * linux-x86-low.c (linux_is_elf64): Delete global.
5840 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5841 with local linux_pid_exe_is_elf_64_file use.
5842
030031ee
PA
58432013-06-11 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (regset_disabled, disable_regset): New functions.
5846 (regsets_fetch_inferior_registers)
5847 (regsets_store_inferior_registers): Use them.
5848 (initialize_regsets_info); Don't allocate the disabled_regsets
5849 array here.
5850 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5851 comment.
5852
5da6eb0a
PA
58532013-06-11 Pedro Alves <palves@redhat.com>
5854
5855 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5856 xmalloc.
5857
7e5aaa09
PA
58582013-06-11 Pedro Alves <palves@redhat.com>
5859
5860 * linux-x86-low.c (initialize_low_arch): Call
5861 init_registers_x32_avx_linux.
5862
d878444c
JK
58632013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5864
5865 Fix compatibility with Android Bionic.
5866 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5867 it is not empty.
5868
3aee8918
PA
58692013-06-07 Pedro Alves <palves@redhat.com>
5870
5f2b57b5 5871 PR server/14823
3aee8918
PA
5872 * Makefile.in (OBS): Add tdesc.o.
5873 (IPA_OBJS): Add tdesc-ipa.o.
5874 (tdesc-ipa.o): New rule.
5875 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5876 interface.
5877 * linux-low.c (new_inferior): Delete.
5878 (disabled_regsets, num_regsets): Delete.
5879 (linux_add_process): Adjust to set the new per-process
5880 new_inferior flag.
5881 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5882 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5883 was a stop. When calling arch_setup, switch the current inferior
5884 to the thread that got an event.
5885 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5886 (regsets_fetch_inferior_registers)
5887 (regsets_store_inferior_registers): New regsets_info parameter.
5888 Adjust to use it.
5889 (linux_register_in_regsets): New regs_info parameter. Adjust to
5890 use it.
5891 (register_addr, fetch_register, store_register): New usrregs_info
5892 parameter. Adjust to use it.
5893 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5894 parameter regs_info. Adjust to use it.
5895 (linux_fetch_registers): Get the current inferior's regs_info, and
5896 adjust to use it.
5897 (linux_store_registers): Ditto.
5898 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5899 (initialize_low): Don't initialize the target_regsets here. Call
5900 initialize_low_arch.
5901 * linux-low.h (target_regsets): Delete declaration.
5902 (struct regsets_info): New.
5903 (struct usrregs_info): New.
5904 (struct regs_info): New.
5905 (struct process_info_private) <new_inferior>: New field.
5906 (struct linux_target_ops): Delete the num_regs, regmap, and
5907 regset_bitmap fields. New field regs_info.
5908 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5909 * i387-fp.c (num_xmm_registers): Delete.
5910 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5911 calls to new interface.
5912 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5913 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5914 Infer the number of xmm registers from the regcache's target
5915 description.
5916 * i387-fp.h (num_xmm_registers): Delete.
5917 * inferiors.c (add_thread): Don't install the thread's regcache
5918 here.
5919 * proc-service.c (gregset_info): Fetch the current inferior's
5920 regs_info. Adjust to use it.
5921 * regcache.c: Include tdesc.h.
5922 (register_bytes, reg_defs, num_registers)
5923 (gdbserver_expedite_regs): Delete.
5924 (get_thread_regcache): If the thread doesn't have a regcache yet,
5925 create one, instead of aborting gdbserver.
5926 (regcache_invalidate_one): Rename to ...
5927 (regcache_invalidate_thread): ... this.
5928 (regcache_invalidate_one): New.
5929 (regcache_invalidate): Only invalidate registers of the current
5930 process.
5931 (init_register_cache): Add target_desc parameter, and use it.
5932 (new_register_cache): Ditto. Assert the target description has a
5933 non zero registers_size.
5934 (regcache_cpy): Add assertions. Adjust.
5935 (realloc_register_cache, set_register_cache): Delete.
5936 (registers_to_string, registers_from_string): Adjust.
5937 (find_register_by_name, find_regno, find_register_by_number)
5938 (register_cache_size): Add target_desc parameter, and use it.
5939 (free_register_cache_thread, free_register_cache_thread_one)
5940 (regcache_release, register_cache_size): New.
5941 (register_size): Add target_desc parameter, and use it.
5942 (register_data, supply_register, supply_register_zeroed)
5943 (supply_regblock, supply_register_by_name, collect_register)
5944 (collect_register_as_string, collect_register_by_name): Adjust.
5945 * regcache.h (struct target_desc): Forward declare.
5946 (struct regcache) <tdesc>: New field.
5947 (init_register_cache, new_register_cache): Add target_desc
5948 parameter.
5949 (regcache_invalidate_thread): Declare.
5950 (regcache_invalidate_one): Delete declaration.
5951 (regcache_release): Declare.
5952 (find_register_by_number, register_cache_size, register_size)
5953 (find_regno): Add target_desc parameter.
5954 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5955 declarations.
5956 * remote-utils.c: Include tdesc.h.
5957 (outreg, prepare_resume_reply): Adjust.
5958 * server.c: Include tdesc.h.
5959 (gdbserver_xmltarget): Delete declaration.
5960 (get_features_xml, process_serial_event): Adjust.
5961 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5962 declare.
5963 (struct process_info) <tdesc>: New field.
5964 (ipa_tdesc): Declare.
5965 * tdesc.c: New file.
5966 * tdesc.h: New file.
5967 * tracepoint.c: Include tdesc.h.
5968 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5969 (get_context_regcache): Adjust to pass ipa_tdesc down.
5970 (do_action_at_tracepoint): Adjust to get the register cache size
5971 from the context regcache's description.
5972 (traceframe_walk_blocks): Adjust to get the register cache size
5973 from the current trace frame's description.
5974 (traceframe_get_pc): Adjust to get current trace frame's
5975 description and pass it down.
5976 (gdb_collect): Adjust to get the register cache size from the
5977 IPA's description.
5978 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5979 (gdbserver_xmltarget): Delete.
5980 (initialize_low_tracepoint): Set the ipa's target description.
5981 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5982 (initialize_low_tracepoint): Set the ipa's target description.
5983 * linux-x86-low.c: Include tdesc.h.
5984 [__x86_64__] (is_64bit_tdesc): New.
5985 (ps_get_thread_area, x86_get_thread_area): Use it.
5986 (i386_cannot_store_register): Rename to ...
5987 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5988 (i386_cannot_fetch_register): Rename to ...
5989 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5990 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5991 to new interface.
5992 (target_regsets): Rename to ...
5993 (x86_regsets): ... this.
5994 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5995 interface.
5996 (x86_siginfo_fixup): Use is_64bit_tdesc.
5997 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5998 (tdesc_x32_avx_linux, tdesc_x32_linux)
5999 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6000 Declare.
6001 (x86_linux_update_xmltarget): Delete.
6002 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6003 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6004 (AMD64_LINUX_USER64_CS): New.
6005 (x86_linux_read_description): New, based on
6006 x86_linux_update_xmltarget.
6007 (same_process_callback): New.
6008 (x86_arch_setup_process_callback): New.
6009 (x86_linux_update_xmltarget): New.
6010 (x86_regsets_info): New.
6011 (amd64_linux_regs_info): New.
6012 (i386_linux_usrregs_info): New.
6013 (i386_linux_regs_info): New.
6014 (x86_linux_regs_info): New.
6015 (x86_arch_setup): Reimplement.
6016 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6017 (x86_emit_ops): Ditto.
6018 (the_low_target): Adjust. Install x86_linux_regs_info,
6019 x86_cannot_fetch_register, and x86_cannot_store_register.
6020 (initialize_low_arch): New.
6021 * linux-ia64-low.c (tdesc_ia64): Declare.
6022 (ia64_fetch_register): Adjust.
6023 (ia64_usrregs_info, regs_info): New globals.
6024 (ia64_regs_info): New function.
6025 (the_low_target): Adjust.
6026 (initialize_low_arch): New function.
6027 * linux-sparc-low.c (tdesc_sparc64): Declare.
6028 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6029 Adjust.
6030 (sparc_arch_setup): New function.
6031 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6032 (the_low_target): Adjust.
6033 (initialize_low_arch): New function.
6034 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6035 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6036 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6037 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6038 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6039 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6040 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6041 (tdesc_powerpc_isa205_vsx64l): Declare.
6042 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6043 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6044 (ppc_set_pc, ppc_get_hwcap): Adjust.
6045 (ppc_usrregs_info): Forward declare.
6046 (!__powerpc64__) ppc_regmap_adjusted: New global.
6047 (ppc_arch_setup): Adjust to the current process'es target
6048 description.
6049 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6050 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6051 (ppc_store_evrregset): Adjust.
6052 (target_regsets): Rename to ...
6053 (ppc_regsets): ... this, and make static.
6054 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6055 (ppc_regs_info): New function.
6056 (the_low_target): Adjust.
6057 (initialize_low_arch): New function.
6058 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6059 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6060 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6061 (tdesc_s390x_linux64v2): Declare.
6062 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6063 (s390_fill_gregset, s390_store_last_break): Adjust.
6064 (target_regsets): Rename to ...
6065 (s390_regsets): ... this, and make static.
6066 (s390_get_pc, s390_set_pc): Adjust.
6067 (s390_get_hwcap): New target_desc parameter, and use it.
6068 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6069 (s390_arch_setup): Adjust to set the current process'es target
6070 description. Don't adjust the regmap.
6071 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6072 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6073 (regs_info_3264): New globals.
6074 (s390_regs_info): New function.
6075 (the_low_target): Adjust.
6076 (initialize_low_arch): New function.
6077 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6078 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6079 [__mips64] (init_registers_mips_linux)
6080 (init_registers_mips_dsp_linux): Delete defines.
6081 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6082 (have_dsp): New global.
6083 (mips_read_description): New, based on mips_arch_setup.
6084 (mips_arch_setup): Reimplement.
6085 (get_usrregs_info): New function.
6086 (mips_cannot_fetch_register, mips_cannot_store_register)
6087 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6088 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6089 (target_regsets): Rename to ...
6090 (mips_regsets): ... this, and make static.
6091 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6092 (dsp_regs_info, regs_info): New globals.
6093 (mips_regs_info): New function.
6094 (the_low_target): Adjust.
6095 (initialize_low_arch): New function.
6096 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6097 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6098 Declare.
6099 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6100 (arm_read_description): New, with bits factored from
6101 arm_arch_setup.
6102 (arm_arch_setup): Reimplement.
6103 (target_regsets): Rename to ...
6104 (arm_regsets): ... this, and make static.
6105 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6106 (arm_regs_info): New function.
6107 (the_low_target): Adjust.
6108 (initialize_low_arch): New function.
6109 * linux-m68k-low.c (tdesc_m68k): Declare.
6110 (target_regsets): Rename to ...
6111 (m68k_regsets): ... this, and make static.
6112 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6113 (m68k_regs_info): New function.
6114 (m68k_arch_setup): New function.
6115 (the_low_target): Adjust.
6116 (initialize_low_arch): New function.
6117 * linux-sh-low.c (tdesc_sharch): Declare.
6118 (target_regsets): Rename to ...
6119 (sh_regsets): ... this, and make static.
6120 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6121 (sh_regs_info, sh_arch_setup): New functions.
6122 (the_low_target): Adjust.
6123 (initialize_low_arch): New function.
6124 * linux-bfin-low.c (tdesc_bfin): Declare.
6125 (bfin_arch_setup): New function.
6126 (bfin_usrregs_info, regs_info): New globals.
6127 (bfin_regs_info): New function.
6128 (the_low_target): Adjust.
6129 (initialize_low_arch): New function.
6130 * linux-cris-low.c (tdesc_cris): Declare.
6131 (cris_arch_setup): New function.
6132 (cris_usrregs_info, regs_info): New globals.
6133 (cris_regs_info): New function.
6134 (the_low_target): Adjust.
6135 (initialize_low_arch): New function.
6136 * linux-cris-low.c (tdesc_crisv32): Declare.
6137 (cris_arch_setup): New function.
6138 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6139 (cris_regs_info): New function.
6140 (the_low_target): Adjust.
6141 (initialize_low_arch): New function.
6142 * linux-m32r-low.c (tdesc_m32r): Declare.
6143 (m32r_arch_setup): New function.
6144 (m32r_usrregs_info, regs_info): New globals.
6145 (m32r_regs_info): Adjust.
6146 (initialize_low_arch): New function.
6147 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6148 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6149 (tic6x_usrregs_info): Forward declare.
6150 (tic6x_read_description): New function, based on ...
6151 (tic6x_arch_setup): ... this. Reimplement.
6152 (target_regsets): Rename to ...
6153 (tic6x_regsets): ... this, and make static.
6154 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6155 (tic6x_regs_info): New function.
6156 (the_low_target): Adjust.
6157 (initialize_low_arch): New function.
6158 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6159 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6160 (target_regsets): Rename to ...
6161 (xtensa_regsets): ... this, and make static.
6162 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6163 globals.
6164 (xtensa_arch_setup, xtensa_regs_info): New functions.
6165 (the_low_target): Adjust.
6166 (initialize_low_arch): New function.
6167 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6168 (nios2_arch_setup): Set the current process'es tdesc.
6169 (target_regsets): Rename to ...
6170 (nios2_regsets): ... this.
6171 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6172 (nios2_regs_info): New function.
6173 (the_low_target): Adjust.
6174 (initialize_low_arch): New function.
a261b8f5
PA
6175 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6176 (aarch64_arch_setup): Set the current process'es tdesc.
6177 (target_regsets): Rename to ...
6178 (aarch64_regsets): ... this.
6179 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6180 (aarch64_regs_info): New function.
6181 (the_low_target): Adjust.
6182 (initialize_low_arch): New function.
3aee8918
PA
6183 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6184 globals.
6185 (target_regsets): Rename to ...
6186 (tile_regsets): ... this.
6187 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6188 (tile_regs_info): New function.
6189 (tile_arch_setup): Set the current process'es tdesc.
6190 (the_low_target): Adjust.
6191 (initialize_low_arch): New function.
6192 * spu-low.c (tdesc_spu): Declare.
6193 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6194 * win32-arm-low.c (tdesc_arm): Declare.
6195 (arm_arch_setup): New function.
6196 (the_low_target): Install arm_arch_setup instead of
6197 init_registers_arm.
6198 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6199 (init_windows_x86): Rename to ...
6200 (i386_arch_setup): ... this. Set `win32_tdesc'.
6201 (the_low_target): Adjust.
6202 * win32-low.c (win32_tdesc): New global.
6203 (child_add_thread): Don't create the thread cache here.
6204 (do_initial_child_stuff): Set the new process'es tdesc.
6205 * win32-low.h (struct target_desc): Forward declare.
6206 (win32_tdesc): Declare.
6207 * lynx-i386-low.c (tdesc_i386): Declare global.
6208 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6209 * lynx-low.c (lynx_tdesc): New global.
6210 (lynx_add_process): Set the new process'es tdesc.
6211 * lynx-low.h (struct target_desc): Forward declare.
6212 (lynx_tdesc): Declare global.
6213 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6214 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6215 * nto-low.c (nto_tdesc): New global.
6216 (do_attach): Set the new process'es tdesc.
6217 * nto-low.h (struct target_desc): Forward declare.
6218 (nto_tdesc): Declare.
6219 * nto-x86-low.c (tdesc_i386): Declare.
6220 (nto_x86_arch_setup): Set `nto_tdesc'.
6221
b1fbec62
GB
62222013-06-04 Gary Benson <gbenson@redhat.com>
6223
6224 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6225 to qSupported response when appropriate.
6226 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6227 with nonzero-length annex.
6228 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6229 arguments supplied in annex.
6230
d1ec4ce7
DE
62312013-05-31 Doug Evans <dje@google.com>
6232
ac44adcb 6233 PR server/15594
d1ec4ce7
DE
6234 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6235 64 bits in 64-cross-32 environment.
6236
9b25f2d3
PA
62372013-05-28 Pedro Alves <palves@redhat.com>
6238
6239 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6240 (aarch64-without-fpu.c): Delete rule.
6241 * configure.srv (aarch64*-*-linux*): Remove references to
6242 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6243 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6244 declaration.
6245
6740dc9c
PA
62462013-05-24 Pedro Alves <palves@redhat.com>
6247
6248 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6249 instead of strchr/decode_address. Error if the range isn't split
6250 with a ','. Don't assume there's be a ':' in the action.
6251
c2d6af84
PA
62522013-05-23 Yao Qi <yao@codesourcery.com>
6253 Pedro Alves <palves@redhat.com>
6254
6255 * linux-low.c (lwp_in_step_range): New function.
6256 (linux_wait_1): If the thread was range stepping and stopped
6257 outside the stepping range, report the stop to GDB. Otherwise,
6258 continue stepping. Add range stepping debug output.
6259 (linux_set_resume_request): Copy the step range from the resume
6260 request to the lwp.
6261 (linux_supports_range_stepping): New.
6262 (linux_target_ops) <supports_range_stepping>: Set to
6263 linux_supports_range_stepping.
6264 * linux-low.h (struct linux_target_ops)
6265 <supports_range_stepping>: New field.
6266 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6267 * linux-x86-low.c (x86_supports_range_stepping): New.
6268 (the_low_target) <supports_range_stepping>: Set to
6269 x86_supports_range_stepping.
6270 * server.c (handle_v_cont): Handle 'r' action.
6271 (handle_v_requests): Append ";r" if the target supports range
6272 stepping.
6273 * target.h (struct thread_resume) <step_range_start,
6274 step_range_end>: New fields.
6275 (struct target_ops) <supports_range_stepping>:
6276 New field.
6277 (target_supports_range_stepping): New macro.
6278
58794e1a
JB
62792013-05-17 Joel Brobecker <brobecker@adacore.com>
6280
6281 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6282 confusion in comment.
6283
d631c5a7
JB
62842013-05-17 Joel Brobecker <brobecker@adacore.com>
6285
6286 * lynx-low.c (struct process_info_private): New type.
6287 (lynx_add_process): New function.
6288 (lynx_create_inferior, lynx_attach): Replace calls to
6289 add_process by calls to lynx_add_process.
6290 (lynx_resume): If PTID is null, then try using
6291 current_process()->private->last_wait_event_ptid.
6292 Add comments.
6293 (lynx_clear_inferiors): Delete. The contents of that function
6294 has been inlined in lynx_mourn;
6295 (lynx_wait_1): Save the ptid in the process's private data.
6296 (lynx_mourn): Free the process' private data. Replace call
6297 to lynx_clear_inferiors by call to clear_inferiors.
6298
96f7a20f
YQ
62992013-05-17 Yao Qi <yao@codesourcery.com>
6300
6301 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6302 the right place.
6303
db0dfaa0
LM
63042013-05-16 Luis Machado <lgustavo@codesourcery.com>
6305
6306 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6307 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6308 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6309 PT_TEXT_END_ADDR guards. Update comments.
6310 (linux_target_op) <read_offsets>: Conditionally define to
6311 linux_read_offsets if the target is UCLIBC and if it defines
6312 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6313
68f5f838
SL
63142013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6315 Andrew Jenner <andrew@codesourcery.com>
6316
6317 * Makefile.in (SFILES): Add linux-nios2-low.c.
6318 (clean): Add action to delete nios2-linux.c.
6319 (nios2-linux.c): New rule.
6320 * configure.srv: Add nios2*-*-linux*.
6321 * linux-nios2-low.c: New.
6322
1ebff1fd
HAQ
63232013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6324
6325 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6326
f6150862
HZ
63272013-04-25 Hui Zhu <hui@codesourcery.com>
6328
6329 PR gdb/15186
f6150862
HZ
6330 * ax.c (ax_printf): Add fflush.
6331
614c279d
TT
63322013-04-22 Tom Tromey <tromey@redhat.com>
6333
6334 * Makefile.in (SFILES): Add filestuff.c.
6335 (OBS): Add filestuff.o.
6336 (filestuff.o): New target.
6337 * config.in, configure: Rebuild.
6338 * configure.ac: Check for fdwalk, pipe2.
6339
7d4e5717
PA
63402013-04-17 Pedro Alves <palves@redhat.com>
6341
6342 * configure.ac (USE_THREAD_DB): Delete variable.
6343 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6344 Don't AC_SUBST USE_THREAD_DB.
6345 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6346 * config.in, configure: Regenerate.
6347
d5c93e41
PA
63482013-04-16 Pedro Alves <palves@redhat.com>
6349
6350 * linux-low.h (struct lwp_info) <thread_known>: Move under
6351 the USE_THREAD_DB #ifdef.
6352
04f5fe89
PA
63532013-04-16 Pedro Alves <palves@redhat.com>
6354
6355 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6356 (linux-low.o): Delete rule.
6357 * linux-low.h: Always include "gdb_thread_db.h" instead of
6358 conditionally including thread_db.h.
6359 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6360 HAVE_THREAD_DB_H.
6361
480b27bf
JK
63622013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6363
6364 * Makefile.in (install-only): Fix make install regression.
6365
43662968
JK
63662013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6367
6368 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6369 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6370 installation.
6371 * gdbserver.1: Remove.
6372
3e74e146
PA
63732013-03-22 Pedro Alves <palves@redhat.com>
6374
6375 * linux-low.c (handle_extended_wait): Don't call
6376 linux_enable_event_reporting.
6377
a8347a2a
TT
63782013-03-15 Tony Theodore <tonyt@logyst.com>
6379
6380 PR build/9098:
6381 * Makefile.in (SHELL): Use @SHELL@.
6382
eeb56fa7
SDJ
63832013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6384
6385 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6386 compiler warning.
6387
4fa7e2ff
JB
63882013-03-13 Joel Brobecker <brobecker@adacore.com>
6389
6390 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6391 Remove extraneous NULL element.
6392
8ddb1965
YQ
63932013-03-13 Yao Qi <yao@codesourcery.com>
6394
6395 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6396 'V' block in trace frame.
6397
9accd112
MM
63982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6399
6400 * target.h (struct target_ops): Add btrace ops.
6401 (target_supports_btrace): New macro.
6402 (target_enable_btrace): New macro.
6403 (target_disable_btrace): New macro.
6404 (target_read_btrace): New macro.
6405 * gdbthread.h (struct thread_info): Add btrace field.
6406 * server.c: Include btrace-common.h.
6407 (handle_btrace_general_set): New function.
6408 (handle_btrace_enable): New function.
6409 (handle_btrace_disable): New function.
6410 (handle_general_set): Call handle_btrace_general_set.
6411 (handle_qxfer_btrace): New function.
6412 (struct qxfer qxfer_packets[]): Add btrace entry.
6413 * inferiors.c (remove_thread): Disable btrace.
6414 * linux-low: Include linux-btrace.h.
6415 (linux_low_enable_btrace): New function.
6416 (linux_low_read_btrace): New function.
6417 (linux_target_ops): Add btrace ops.
6418 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6419 Add srv_linux_btrace=yes.
6420 (x86_64-*-linux*): Add linux-btrace.o.
6421 Add srv_linux_btrace=yes.
6422 * configure.ac: Define HAVE_LINUX_BTRACE.
6423 * config.in: Regenerated.
6424 * configure: Regenerated.
6425
5cc22e4c
MM
64262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6427
6428 * server.c (handle_qxfer): Preserve error message if -3 is
6429 returned.
6430 (qxfer): Document the -3 return value.
6431
7c97f91e
MM
64322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6433
6434 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6435 (linux_btrace_h): New variable.
6436 (linux-btrace.o): New rule.
6437
be9a119c 64382013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6439 Hafiz Abid Qadeer <abidh@codesourcery.com>
6440
6441 * tracepoint.c (trace_buffer_size): New global.
6442 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6443 (init_trace_buffer): Change to one-argument function. Allocate
6444 trace buffer memory.
6445 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6446 handle QTBuffer:size packet.
6447 (cmd_bigqtbuffer_size): New function.
6448 (initialize_tracepoint): Call init_trace_buffer with
6449 DEFAULT_TRACE_BUFFER_SIZE.
6450 * server.c (handle_query): Add QTBuffer:size in the
6451 supported packets.
6452
e64f7499
YQ
64532013-03-07 Yao Qi <yao@codesourcery.com>
6454
6455 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6456 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6457 of -1.
6458 (cmd_qtsp): Adjust condition. Do post increment.
6459 Set cur_action and cur_step_action back to 0.
6460
f0ae6fc3
PA
64612013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6462
6463 PR server/15236
6464 * linux-low.c (linux_write_memory): Return early success if LEN is
6465 zero.
6466
b5b0b0af
CV
64672013-03-05 Corinna Vinschen <vinschen@redhat.de>
6468
334ad4a8 6469 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6470
589bc927
TT
64712013-02-28 Tom Tromey <tromey@redhat.com>
6472
6473 * configure.ac: Invoke AC_SYS_LARGEFILE.
6474 * configure, config.in: Rebuild.
6475
dfe07582
CV
64762013-02-28 Corinna Vinschen <vinschen@redhat.com>
6477
6478 * win32-low.c: Throughout, fix format strings and casts of
6479 printf-like functions to avoid type related warnings on all
6480 platforms.
6481 (get_child_debug_event): Print dwDebugEventCode as hex since
6482 that's how it's usually documented.
6483
736cd585
YQ
64842013-02-28 Yao Qi <yao@codesourcery.com>
6485
6486 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6487 pulongest.
6488
e1f58301
JW
64892013-02-27 Jiong Wang <jiwang@tilera.com>
6490
6491 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6492 (reg-tilegx32.c): New rule.
6493 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6494 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6495 different register info initializer according to elf class.
6496 (init_registers_tilgx32): New function. The tilegx32 register info
6497 initializer.
6498 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6499 (tile_store_gregset): Likewise.
6500
d171ca78
YQ
65012013-02-27 Yao Qi <yao@codesourcery.com>
6502
6503 * server.c (process_point_options): Print debug message when
6504 debug_threads is true.
6505
282bbdf3
YQ
65062013-02-26 Yao Qi <yao@codesourcery.com>
6507
6508 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6509
aca22551
PA
65102013-02-19 Pedro Alves <palves@redhat.com>
6511 Kai Tietz <ktietz@redhat.com>
6512
6513 PR gdb/15161
6514
6515 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6516 instead of strtoul to extract address from packet.
6517 (process_serial_event) <'z'>: Likewise.
6518
4f3cee1c
YQ
65192013-02-18 Yao Qi <yao@codesourcery.com>
6520
6521 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6522
8e1d55a3
PA
65232013-02-14 Pedro Alves <palves@redhat.com>
6524
6525 Plug memory leak.
6526
6527 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6528 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6529
458820da
PA
65302013-02-14 Pedro Alves <palves@redhat.com>
6531
6532 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6533
baea0dae
PA
65342013-02-14 Pedro Alves <palves@redhat.com>
6535
6536 * tracepoint.c (save_string): Delete.
6537 (add_tracepoint_action): Use savestring instead of save_string.
6538
0b1afbb3
PA
65392013-02-12 Pedro Alves <palves@redhat.com>
6540
6541 * linux-xtensa-low.c: Ditto.
6542 * xtensa-xtregs.c: Ditto.
6543
8a4ac37e
PA
65442013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6545
6546 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6547 thread_db.
6548
148de6bb
MS
65492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6550
6551 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6552 aarch64_num_wp_regs and aarch64_num_bp_regs to
6553 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6554
55fac6e0
MS
65552013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6556
6557 * linux-aarch64-low.c (ps_get_thread_area): Replace
6558 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6559
176eb98c
MS
65602013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6561 Marcus Shawcroft <marcus.shawcroft@arm.com>
6562 Nigel Stephens <nigel.stephens@arm.com>
6563 Yufeng Zhang <yufeng.zhang@arm.com>
6564
6565 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6566 (aarch64.c, aarch64-without-fpu.c): New targets.
6567 * configure.srv (aarch64*-*-linux*): New.
6568 * linux-aarch64-low.c: New file.
6569
56f7af9c
MS
65702013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6571
43aaf8b6 6572 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6573 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6574 (dequeue_one_deferred_signal, linux_resume_one_thread)
6575 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6576 (linux_tracefork_grandchild, linux_test_for_tracefork)
6577 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6578 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6579 where the argument is 0.
6580
60f662b0
YQ
65812013-01-25 Yao Qi <yao@codesourcery.com>
6582
6583 * event-loop.c: Include "queue.h".
6584 (gdb_event_p): New typedef.
6585 (struct gdb_event) <next_event>: Remove.
6586 (event_queue): Change to QUEUE(gdb_event_p).
6587 (async_queue_event): Remove.
6588 (gdb_event_xfree): New.
6589 (initialize_event_loop): New.
6590 (process_event): Use API from QUEUE.
6591 (wait_for_event): Likewise.
6592 * server.c (main): Call initialize_event_loop.
6593 * server.h (initialize_event_loop): Declare.
6594
5ae4861a
YQ
65952013-01-18 Yao Qi <yao@codesourcery.com>
6596
6597 * ax.h (struct eval_agent_expr_context): New.
6598 (gdb_eval_agent_expr): Update declaration.
6599 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6600 TFRAME. Add new argument CTX.
6601 * server.h (struct eval_agent_expr_context): Declare.
6602 (agent_mem_read, agent_tsv_read): Update declaration.
6603 (agent_mem_read_string): Likewise.
6604 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6605 (add_traceframe_block): Add new argument TPOINT.
6606 Increase TPOINT->traceframe_usage.
6607 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6608 eval_tracepoint_agent_expr.
6609 (condition_true_at_tracepoint): Likewise.
6610 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6611 (agent_mem_read_string, agent_tsv_read): Likewise.
6612
85e00e85
YQ
66132013-01-16 Yao Qi <yao@codesourcery.com>
6614
6615 * linux-low.c (linux_resume_one_lwp): Don't check
6616 'lwp->bp_reinsert != 0'.
6617
4039cf45
JB
66182013-01-07 Joel Brobecker <brobecker@adacore.com>
6619 Pedro Alves <palves@redhat.com>
6620
6621 * lynx-low.c (ptrace_request_to_str): Define a temporary
6622 macro and use it to simplify this function's implementation.
6623
9044dee2
JB
66242013-01-07 Joel Brobecker <brobecker@adacore.com>
6625
6626 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6627 sets errno.
6628
e6352c8f
JB
66292013-01-07 Joel Brobecker <brobecker@adacore.com>
6630
6631 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6632
50681a27
JB
66332013-01-07 Joel Brobecker <brobecker@adacore.com>
6634
6635 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6636
3f6e77ef
JB
66372013-01-07 Joel Brobecker <brobecker@adacore.com>
6638
6639 * lynx-low.c (lynx_resume): Use the resume_info parameter
6640 to determine the ptid for the lynx_ptrace call, unless
6641 it is equal to minus_one_ptid, in which case we use the
6642 ptid of the current_inferior.
6643 (lynx_wait_1): After having received a thread create/exit
6644 event, resume the inferior's execution using the signaling
6645 thread's ptid, rather than the old ptid.
6646
7fda33ae
JB
66472013-01-07 Joel Brobecker <brobecker@adacore.com>
6648
6649 * lynx-low.c (lynx_resume): Delete variable ret.
6650
b9786c74
JB
66512013-01-01 Joel Brobecker <brobecker@adacore.com>
6652
6653 * gdbreplay.c (gdbreplay_version): Update copyright year.
6654 * server.c (gdbserver_version): Likewise.
6655
8b93d60f
JB
66562012-12-17 Joel Brobecker <brobecker@adacore.com>
6657
6658 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6659 new thread.
6660
037335a7
JB
66612012-12-17 Joel Brobecker <brobecker@adacore.com>
6662
6663 * lynx-low.c (ptrace_request_to_str): Add handling for
6664 PTRACE_GETTRACESIG.
6665
52d4cbd8
JB
66662012-12-17 Joel Brobecker <brobecker@adacore.com>
6667
6668 * lynx-low.c (lynx_attach): Delete variable new_process.
6669
ab8f6ca9
JB
66702012-12-17 Joel Brobecker <brobecker@adacore.com>
6671
6672 * lynx-low.c (lynx_create_inferior): Delete variable
6673 new_process.
6674
78cbc024
JB
66752012-12-17 Joel Brobecker <brobecker@adacore.com>
6676
6677 * lynx-low.c (ptrace_request_to_str): Do not handle
6678 PTRACE_GETTHREADLIST if this macro does not exist.
6679
14a00470
YQ
66802012-12-15 Yao Qi <yao@codesourcery.com>
6681
6682 * Makefile.in (OBS): Add notif.o.
6683 * notif.c, notif.h: New.
6684 * server.c: Include "notif.h".
6685 (struct vstop_notif) <next>: Remove.
6686 <base>: New field.
6687 (queue_stop_reply): Update.
6688 (push_event, send_next_stop_reply): Remove.
6689 (discard_queued_stop_replies): Update.
6690 (notif_stop): New variable.
6691 (handle_v_stopped): Remove.
6692 (handle_v_requests): Don't call handle_v_stopped. Call
6693 handle_ack_notif instead.
6694 (queue_stop_reply_callback): Call notif_event_enque instead
6695 of queue_stop_reply.
6696 (handle_status): Don't call send_next_stop_reply, call
6697 notif_write_event instead.
6698 (kill_inferior_callback): Likewise.
6699 (detach_or_kill_inferior_callback): Likewise.
6700 (main): Call initialize_notif.
6701 (process_serial_event): Call QUEUE_is_empty.
6702 (handle_target_event): Call notif_push instead of push event.
6703 * server.h (push_event): Remove declaration.
6704
61c125b9
TT
67052012-12-10 Tom Tromey <tromey@redhat.com>
6706
6707 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6708 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6709 macros.
6710 (.c.o): Rewrite.
6711 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6712 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6713 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6714 (amd64-linux-ipa.o, ax.o): Rewrite.
6715 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6716 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6717 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6718 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6719 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6720 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6721 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6722 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6723 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6724 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6725 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6726 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6727 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6728 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6729 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6730 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6731 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6732 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6733 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6734 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6735 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6736 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6737 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6738 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6739 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6740 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6741 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6742 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6743 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6744 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6745 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6746 (reg-tilegx.o): Remove.
6747 (all_object_files): New macro.
6748 Include .deps files.
6749 * aclocal.m4, configure: Rebuild.
6750 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6751 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6752 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6753
e90e9ad9
TT
67542012-12-05 Tom Tromey <tromey@redhat.com>
6755
6756 PR gdb/14917:
6757 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6758
02d403bf 67592012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6760
6761 * configure.ac: Check for linux/perf_event.h.
6762 * config.in: Regenerated.
6763 * configure: Regenerated.
6764
0270a750
PA
67652012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6766
6767 * hostio.c (handle_readlink): Decrease buffer size
6768 parameter passed to readlink by one byte.
6769
8c29b58e
YQ
67702012-11-26 Yao Qi <yao@codesourcery.com>
6771
6772 * configure.ac (build_warnings): Append '-Wempty-body'.
6773 * configure: Regenerated.
6774 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6775 body.
6776
8bdce1ff
PM
67772012-11-15 Pierre Muller <muller@sourceware.org>
6778
6779 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6780 * config.in: Regenerate.
6781 * configure: Regenerate.
6782 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6783 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6784 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6785 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6786 header.
6787 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6788 instead of <sys/wait.h> header.
6789 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6790
02d403bf 67912012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6792
6793 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6794 (various make rules): Remove -DGDBSERVER
6795
fbd5db48
YQ
67962012-11-09 Yao Qi <yao@codesourcery.com>
6797
6798 * spu-low.c (current_ptid): Move it to ..
6799 * gdbthread.h: ... here. New.
6800 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6801 * server.c (myresume, process_serial_event): Likewise.
6802 * thread-db.c (thread_db_find_new_threads): Likewise.
6803 * tracepoint.c (run_inferior_command): Likewise.
6804
b3dc46ff
AB
68052012-10-01 Andrew Burgess <aburgess@broadcom.com>
6806
6807 * server.c (handle_search_memory_1): Include access length in
6808 warning message.
6809
07c04788
HPN
68102012-09-05 Michael Brandt <michael.brandt@axis.com>
6811
6812 * linux-crisv32-low.c: Fix compile errors.
6813
918d227b
YQ
68142012-09-04 Yao Qi <yao@codesourcery.com>
6815
6816 * tracepoint.c (cmd_qtsv): Adjust debug message.
6817 Don't check CUR_TPOINT.
6818
18c1b81a
YQ
68192012-08-28 Yao Qi <yao@codesourcery.com>
6820
6821 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6822 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6823 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6824 Remove declarations of xmalloc, xreallloc, xstrdup and
6825 freeargv.
6826 * Makefile.in (libiberty_h): New.
6827 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6828 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6829
dc82f37b
YQ
68302012-08-23 Yao Qi <yao@codesourcery.com>
6831
6832 * server.h: Remove declaration of 'xsnprintf'.
6833
406b1477
KS
68342012-08-22 Keith Seitz <keiths@redhat.com>
6835
6836 * server.h: Include build-gnulib-gbserver/config.h.
6837 * gdbreplay.c: Likewise.
6838
e6712ff1
DE
68392012-08-08 Doug Evans <dje@google.com>
6840
6841 * Makefile.in (SFILES): Add gdb_vecs.c.
6842 (OBS): Add gdb_vecs.o.
6843 (gdb_vecs_h, host_defs_h): New variables.
6844 (thread-db.o): Add $(gdb_vecs_h) dependency.
6845 (gdb_vecs.o): New rule.
6846 * thread-db.c: #include "gdb_vecs.h".
6847 (thread_db_load_search): Use a vector to iterate over path elements.
6848 Handle text appearing after "$pdir".
6849
6850 * configure.ac: Add check for strstr.
6851 * config.in: Regenerate.
6852 * configure: Regenerate.
6853
7c3270ae
UW
68542012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6855
6856 * hostio.c (handle_pread): If pread fails, fall back to attempting
6857 lseek/read.
6858 (handle_pwrite): Likewise for pwrite.
6859
b62e2b27
UW
68602012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6861
6862 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6863 between unsupported TYPE and unimplementable ADDR/LEN combination.
6864 (arm_insert_point): Act on new return value.
6865
78a99e91
PA
68662012-07-31 Pedro Alves <palves@redhat.com>
6867
6868 * server.c (process_point_options): Only skip tokens if we find
6869 one that is unrecognized. Don't treat 'X' specially while
6870 skipping unrecognized tokens.
6871
fcf303ab
UW
68722012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6873
6874 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6875 to 4-byte-align HW breakpoint addresses for Thumb.
6876
7255706c
YQ
68772012-07-27 Yao Qi <yao@codesourcery.com>
6878
6879 PR remote/14161.
6880
6881 * server.h: Declare gdb_agent_about_to_close.
6882 * target.c (kill_inferior): Include "agent.h".
6883 New. Send command 'kill'.
6884 * target.h (kill_inferior): Removed macro.
6885 * tracepoint.c (gdb_agent_about_to_close): New.
6886 (gdb_agent_helper_thread): Handle command 'close'.
6887 Wait endlessly until the inferior stops.
6888 Install gdb_agent_remove_socket to atexit hook.
6889 (agent_socket_name): New static variable.
6890 (gdb_agent_socket_init): Replace local variable 'name' with
6891 'agent_socket_name'.
6892 (gdb_agent_remove_socket): New.
6893
5a3f286f
YQ
68942012-07-27 Yao Qi <yao@codesourcery.com>
6895
6896 * server.c (process_point_options): Stop at 'X' when parsing.
6897
961bd387
ME
68982012-07-19 Michael Eager <eager@eagercon.com>
6899
a261b8f5 6900 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6901 to hw_execute.
6902 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6903 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6904 hardware breakpoint.
6905
aa7c7447
JK
69062012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6907
6908 * gdbserver/linux-low.c (initialize_low): Call
6909 linux_ptrace_init_warnings.
6910
7f216e7c
DE
69112012-07-02 Doug Evans <dje@google.com>
6912
6913 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6914 pointer to int.
6915
d3ce09f5
SS
69162012-07-02 Stan Shebs <stan@codesourcery.com>
6917
6918 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6919 (ax.o): Add it to build rule.
6920 (ax-ipa.o): Ditto.
6921 (OBS): Add format.o.
6922 (IPA_OBS): Add format.o.
6923 * server.c (handle_query): Claim support for breakpoint commands.
6924 (process_point_options): Add command case.
6925 (process_serial_event): Leave running if there are printfs in
6926 effect.
6927 * mem-break.h (any_persistent_commands): Declare.
6928 (add_breakpoint_commands): Declare.
6929 (gdb_no_commands_at_breakpoint): Declare.
6930 (run_breakpoint_commands): Declare.
6931 * mem-break.c (struct point_command_list): New struct.
6932 (struct breakpoint): New field command_list.
6933 (any_persistent_commands): New function.
6934 (add_commands_to_breakpoint): New function.
6935 (add_breakpoint_commands): New function.
6936 (gdb_no_commands_at_breakpoint): New function.
6937 (run_breakpoint_commands): New function.
6938 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6939 locally.
6940 * ax.c: Include format.h.
6941 (ax_printf): New function.
6942 (gdb_eval_agent_expr): Add printf opcode.
6943
2f8f6aed
YQ
69442012-06-13 Yao Qi <yao@codesourcery.com>
6945
6946 * server.c (start_inferior): Remove duplicated writes to fields
6947 'last_resume_kind' and 'last_status' of 'current_inferior'.
6948
0c9070b3
YQ
69492012-06-12 Yao Qi <yao@codesourcery.com>
6950 Pedro Alves <palves@redhat.com>
6951
6952 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6953 comment.
6954 * server.c (handle_v_cont): Extend comment.
6955
c52daf70
YQ
69562012-06-11 Yao Qi <yao@codesourcery.com>
6957
6958 * linux-low.c (linux_attach): Add 'static'.
6959
d38bbb0a
YQ
69602012-06-06 Yao Qi <yao@codesourcery.com>
6961
6962 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6963
89dc0afd
JK
69642012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6965
6966 Fix gcc -flto compilation warning.
6967 * server.c (main): Make variable multi_mode and attach volatile.
6968
75f62ce7
TJB
69692012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6970
6971 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6972 if the platform doesn't know about it.
6973
65f479b6
PA
69742012-05-30 Jeff Kenton <jkenton@tilera.com>
6975
6976 * Makefile.in (SFILES): Add linux-tile-low.c.
6977 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6978 * configure.srv: Handle tilegx-*-linux*.
6979 * linux-tile-low.c: New file.
6980
0c5bf5a9
JK
69812012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6982
6983 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6984
a493e3e2
PA
69852012-05-24 Pedro Alves <palves@redhat.com>
6986
6987 PR gdb/7205
6988
43aaf8b6 6989 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6990
2ea28649
PA
69912012-05-24 Pedro Alves <palves@redhat.com>
6992
6993 PR gdb/7205
6994
6995 Replace target_signal with gdb_signal throughout.
6996
8d409d16
MR
69972012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6998
6999 * linux-low.c (linux_store_registers): Avoid the copying sequence
7000 when no data has been retrieved by ptrace.
7001
23512c01
MGD
70022012-05-22 Will Deacon <will.deacon@arm.com>
7003
7004 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7005 Include asm/ptrace.h.
7006 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7007 already defined.
7008
4934b29e
MR
70092012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7010
7011 * linux-low.c (linux_store_registers): Don't re-retrieve data
7012 with ptrace that has already been obtained from /proc. Always
7013 copy any data retrieved with ptrace to the buffer supplied.
7014
bde24c0a
PA
70152012-05-11 Yao Qi <yao@codesourcery.com>
7016 Pedro Alves <palves@redhat.com>
7017
7018 * linux-low.c (enum stopping_threads_kind): New.
7019 (stopping_threads): Change type to `enum stopping_threads_kind'.
7020 (handle_extended_wait): If stopping and suspending threads, leave
7021 the new_lwp suspended too.
7022 (linux_wait_for_event): Adjust.
7023 (stop_all_lwps): Set `stopping_threads' to
7024 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7025 whether we're suspending threads or just stopping them. Assert no
7026 recursion happens.
7027
623b6bdf
YQ
70282012-04-29 Yao Qi <yao@codesourcery.com>
7029
7030 * server.h: Move some code to ...
7031 * gdbthread.h: ... here. New.
7032 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7033 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7034 (nto-low.o, win32-low.o): Likewise.
7035 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7036 * regcache.c, remote-utils.c, server.c: Likewise.
7037 * target.c, tracepoint.c, win32-low.c: Likewise.
7038
f15f9948
TJB
70392012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7040
7041 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7042 (PTRACE_ARG4_TYPE): Likewise.
7043 (PTRACE_XFER_TYPE): Likewise.
7044 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7045 ptrace to PTRACE_ARG3_TYPE.
7046 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7047 (PTRACE_ARG4_TYPE): Likewise.
7048 (PTRACE_XFER_TYPE): Likewise.
7049 (linux_detach_one_lwp): Cast fourth argument of
7050 ptrace to long then PTRACE_ARG4_TYPE.
7051 (regsets_fetch_inferior_registers): Cast third argument of
7052 ptrace to long then PTRACE_ARG3_TYPE.
7053 (regsets_store_inferior_registers): Likewise.
7054
38ea300a
PA
70552012-04-20 Pedro Alves <palves@redhat.com>
7056
7057 * configure: Regenerate.
7058
c971b7fa
PA
70592012-04-19 Pedro Alves <palves@redhat.com>
7060
43aaf8b6 7061 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7062 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7063 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7064 (all, install-only, uninstall, clean-info, all-lib, clean): No
7065 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7066 (maintainer-clean realclean distclean): Use subdir_do.
7067 (subdir_do): New.
7068 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7069 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7070 * acinclude.m4: Include acx_configure_dir.m4.
7071 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7072 calls. Call AC_PROG_RANLIB. Configure gnulib using
7073 ACX_CONFIGURE_DIR.
7074 (GNULIB): New.
7075 (GNULIB_STDINT_H): Adjust.
7076 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7077 * gdbreplay.c: Include build-gnulib/config.h.
7078 * server.h: Likewise.
7079 * aclocal.m4: Regenerate.
7080 * config.in: Regenerate.
7081 * configure: Regenerate.
c971b7fa 7082
809277f8
PA
70832012-04-19 Pedro Alves <palves@redhat.com>
7084
7085 * Makefile.in (LIBGNU, INCGNU): Adjust.
7086 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7087 (all, install-only, uninstall, clean-info, all-lib, clean)
7088 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7089 * configure.ac: Adjust AC_OUTPUT output.
7090 * aclocal.m4: Regenerate.
7091 * configure: Regenerate.
7092
fd9bb8b8
PA
70932012-04-19 Pedro Alves <palves@redhat.com>
7094
7095 * Makefile.in (generated_files): New.
7096 (server_h): Remove the explicit dependency on config.h, and depend
7097 on $generated_files.
7098
1c298c66
PA
70992012-04-19 Pedro Alves <palves@redhat.com>
7100
7101 * Makefile.in (INCGNU): Add -Ignulib.
7102
57c4b50b
PA
71032012-04-19 Pedro Alves <palves@redhat.com>
7104
7105 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7106 (INCGNU): ... this, and spell out -I here.
7107 (GNULIB_LIB): Rename to ...
7108 (LIBGNU): ... this.
7109 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7110
1030e047
PA
71112012-04-19 Pedro Alves <palves@redhat.com>
7112
7113 * config.in: Regenerate.
7114
447d4319
PA
71152012-04-19 Pedro Alves <palves@redhat.com>
7116
7117 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7118 * server.h (memmem): Remove declaration.
7119 * config.in: Regenerate.
7120 * configure: Regenerate.
7121
aad9eab9
YQ
71222012-04-19 Yao Qi <yao@codesourcery.com>
7123
7124 * Makefile.in (SFILES): Add common/vec.c.
7125 (OBS): Add vec.o.
7126 (vec.o): New rule.
7127
3e10640f
YQ
71282012-04-19 Yao Qi <yao@codesourcery.com>
7129
7130 * remote-utils.c (prepare_resume_reply): Replace with macro
7131 target_core_of_thread.
7132 * server.c (handle_qxfer_threads_proper): Likewise.
7133 * target.h (traget_core_of_thread): New macro.
7134
71622373
PA
71352012-04-18 Pedro Alves <palves@redhat.com>
7136
7137 * aclocal.m4: Regenerate.
7138 * configure: Regenerate.
7139
80d26939
YQ
71402012-04-16 Yao Qi <yao@codesourcery.com>
7141
7142 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7143 duplicated on address.
7144
42476b70
YQ
71452012-04-16 Yao Qi <yao@codesourcery.com>
7146
7147 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7148 (struct tracepoint_action_ops) <send>: New field.
7149 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7150 (agent_expr_send, x_tracepoint_action_send): New.
7151 (l_tracepoint_action_send): New.
7152 (cmd_qtdp): Download and install tracepoint
7153 according to `use_agent'.
7154 (run_inferior_command): Add one more parameter `len'.
7155 Update callers.
7156 (tracepoint_send_agent): New.
7157 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7158
7bc83639
YQ
71592012-04-16 Yao Qi <yao@codesourcery.com>
7160
7161 * tracepoint.c (download_tracepoints): Moved to ...
7162 (cmd_qtstart): ... here.
7163
5f18041e
YQ
71642012-04-14 Yao Qi <yao@codesourcery.com>
7165
7166 * tracepoint.c: Include inttypes.h.
7167 (struct collect_memory_action): Use sized types.
7168 (struct tracepoint): Likewise.
7169 (cmd_qtdp, stop_tracing): Update print specifiers.
7170 (cmd_qtp, response_tracepoint): Likewise.
7171 (collect_data_at_tracepoint): Likewise.
7172 (collect_data_at_step): Likewise.
7173
55a8c076
YQ
71742012-04-14 Yao Qi <yao@codesourcery.com>
7175
7176 Import gnulib module inttypes.
7177 * aclocal.m4, config.in, configure: Regenerated.
7178
dc750257
YQ
71792012-04-14 Yao Qi <yao@codesourcery.com>
7180
7181 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7182 Makefile and config.status at last.
7183
0ab5faf9
YQ
71842012-04-13 Yao Qi <yao@codesourcery.com>
7185
7186 * tracepoint.c: Include stdint.h unconditionally.
7187
18f5fd81
TJB
71882012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7189
7190 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7191 on BFD_HAVE_SYS_PROCFS_TYPE.
7192 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7193 * configure: Regenerate.
7194 * config.in: Likewise.
7195
4d47af5c
L
71962012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7197
7198 * Makefile.in (clean): Also remove x32.c x32-linux.c
7199 x32-avx.c x32-avx-linux.c.
7200 (x32.o): New target.
7201 (x32.c): Likewise.
7202 (x32-linux.o): Likewise.
7203 (x32-linux.c): Likewise.
7204 (x32-avx.o): Likewise.
7205 (x32-avx.c): Likewise.
7206 (x32-avx-linux.o): Likewise.
7207 (x32-avx-linux.c): Likewise.
7208
7209 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7210 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7211 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7212 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7213 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7214 i386/x32-avx-linux.xml.
7215
7216 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7217 (init_registers_x32_avx_linux): Likwise.
7218 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7219 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7220
ecedbe58
PA
72212012-04-13 Pedro Alves <palves@redhat.com>
7222
7223 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7224 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7225 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7226 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7227 the sub-make.
7228
c92b5177
L
72292012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7230
7231 * linux-x86-low.c (compat_x32_clock_t): New.
7232 (compat_x32_siginfo_t): Likewise.
7233 (compat_x32_siginfo_from_siginfo): Likewise.
7234 (siginfo_from_compat_x32_siginfo): Likewise.
7235 (linux_is_elf64): Likewise.
7236 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7237 and siginfo_from_compat_x32_siginfo for x32.
7238 (x86_arch_setup): Set linux_is_elf64.
7239
214d508e
L
72402012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7241
7242 PR gdb/13969
7243 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7244 e_machine field.
7245 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7246 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7247 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7248 compatible with process.
7249
c9a1864a
YQ
72502012-04-12 Yao Qi <yao@codesourcery.com>
7251
7252 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7253 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7254 (install-only, install-info, clean): Handle sub dir gnulib.
7255 (all-lib, am--refresh): New targets.
7256 (memmem.o): Remove target.
7257 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7258 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7259 (AC_REPLACE_FUNCS): Remove memmem.
7260 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7261 (AC_OUTPUT): Generate Makefile in gnulib/.
7262 * aclocal.m4, config.in, configure: Regenerated.
7263
367ba2c2
MR
72642012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7265
7266 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7267
9d236627
PA
72682012-04-05 Pedro Alves <palves@redhat.com>
7269
7270 -Werror=strict-aliasing
7271
7272 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7273 pointer.
7274
111217b3
PA
72752012-04-04 Pedro Alves <palves@redhat.com>
7276
7277 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7278 (sparc_store_gregset_from_stack, sparc_store_gregset)
7279 (sparc_breakpoint_at): Fix formatting.
7280
8365dcf5
TJB
72812012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7282
7283 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7284 are available.
7285 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7286 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7287 * config.in: Regenerate.
7288 * configure: Likewise.
7289
689cc2ae
PA
72902012-03-29 Pedro Alves <palves@redhat.com>
7291
7292 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7293 Correct ptrace arguments.
7294
c14dfd32
PA
72952012-03-28 Pedro Alves <palves@redhat.com>
7296
7297 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7298 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7299 (IA64_FR1_REGNUM): New defines.
7300 (ia64_fetch_register): New.
7301 (the_low_target): Install it.
7302 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7303 field.
7304 * linux-low.c (linux_fetch_registers): Try the
7305 the_low_target.fetch_register hook first.
7306
7307 * linux-arm-low.c (the_low_target): Adjust.
7308 * linux-bfin-low.c (the_low_target): Adjust.
7309 * linux-cris-low.c (the_low_target): Adjust.
7310 * linux-crisv32-low.c (the_low_target): Adjust.
7311 * linux-m32r-low.c (the_low_target): Adjust.
7312 * linux-m68k-low.c (the_low_target): Adjust.
7313 * linux-mips-low.c (the_low_target): Adjust.
7314 * linux-ppc-low.c (the_low_target): Adjust.
7315 * linux-s390-low.c (the_low_target): Adjust.
7316 * linux-sh-low.c (the_low_target): Adjust.
7317 * linux-sparc-low.c (the_low_target): Adjust.
7318 * linux-tic6x-low.c (the_low_target): Adjust.
7319 * linux-x86-low.c (the_low_target): Adjust.
7320 * linux-xtensa-low.c (the_low_target): Adjust.
7321
63c88e13
PA
73222012-03-26 Pedro Alves <palves@redhat.com>
7323
7324 * server.c (handle_qxfer_libraries): Don't bail early if
7325 the_target->qxfer_libraries_svr4 is not NULL.
7326
fb723180
PA
73272012-03-26 Pedro Alves <palves@redhat.com>
7328
7329 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7330
0afae3cf
PA
73312012-03-23 Pedro Alves <palves@redhat.com>
7332
7333 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7334 "library-list-svr4" element's start tag when the the DSO list is
7335 empty.
7336
485f1ee4
PA
73372012-03-23 Pedro Alves <palves@redhat.com>
7338
7339 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7340 a variable whose type size is the same as the inferior's pointer
7341 size.
7342
a5362b9a
TS
73432012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7344
7345 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7346 struct siginfo.
7347 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7348 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7349 * linux-low.h: Include <signal.h>.
7350 (struct siginfo): Remove forward declaration.
7351 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7352 struct siginfo.
7353
d226c142
MF
73542012-03-21 Mike Frysinger <vapier@gentoo.org>
7355
7356 * .gitignore: Ignore more files.
7357
122f36ef
PA
73582012-03-19 Pedro Alves <palves@redhat.com>
7359 Jan Kratochvil <jan.kratochvil@redhat.com>
7360
7361 * server.c (cont_thread, general_thread): Add describing comments.
7362 (start_inferior): Clear `cont_thread'.
7363 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7364 of a process.
7365
fc3e5175
YQ
73662012-03-15 Yao Qi <yao@codesourcery.com>
7367
7368 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7369 handling to ...
7370 (cmd_qtdp): ... here.
7371
8d0d92cd
YQ
73722012-03-15 Yao Qi <yao@codesourcery.com>
7373
7374 * tracepoint.c (struct tracepoint_action_ops): New.
7375 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7376 (m_tracepoint_action_download): New.
7377 (r_tracepoint_action_download): New.
7378 (x_tracepoint_action_download): New.
7379 (l_tracepoint_action_download): New.
7380 (add_tracepoint_action): Install `action->ops' according type.
7381 (download_tracepoint_1): Move code `download' function pointer
7382 of various tracepoint_action_ops.
7383
87b0bb13
JK
73842012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7385
7386 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7387 linux_ptrace_attach_warnings.
7388
5f572dec
JK
73892012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7390
7391 * Makefile.in (linux-ptrace.o): New.
7392 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7393 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7394 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7395 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7396 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7397 of these targets.
7398 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7399
f4647387
YQ
74002012-03-08 Yao Qi <yao@codesourcery.com>
7401 Pedro Alves <palves@redhat.com>
7402
7403 Fix PR server/13392.
7404 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7405 offset of JMP insn.
7406 * tracepoint.c (remove_tracepoint): New.
7407 (cmd_qtdp): Call remove_tracepoint when failed to install.
7408
9b224c5e
PA
74092012-03-07 Pedro Alves <palves@redhat.com>
7410
7411 * linux-low.c (get_detach_signal): New.
7412 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7413 Pass on pending signals to PTRACE_DETACH. Check the result of the
7414 ptrace call.
7415 * server.c (program_signals, program_signals_p): New.
7416 (handle_general_set): Handle QProgramSignals.
7417 * server.h (program_signals, program_signals_p): Declare.
7418
e237a7e2
JK
74192012-03-05 Pedro Alves <palves@redhat.com>
7420 Jan Kratochvil <jan.kratochvil@redhat.com>
7421
7422 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7423 New comment why.
7424
5808517f
YQ
74252012-03-03 Yao Qi <yao@codesourcery.com>
7426
7427 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7428 agent_look_up_symbols.
7429
58b4daa5
YQ
74302012-03-03 Yao Qi <yao@codesourcery.com>
7431
7432 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7433 (linux-x86-low.o): Likewise.
7434 * server.h: Remove in_process_agent_loaded.
7435 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7436 common/agent.c.
7437 Update callers.
7438
8ffcbaaf
YQ
74392012-03-03 Yao Qi <yao@codesourcery.com>
7440
7441 * tracepoint.c (gdb_agent_capability): New global.
7442 (in_process_agent_loaded_ust): Renamed to
7443 `in_process_agent_supports_ust'.
7444 Update callers.
7445 (in_process_agent_supports_ust): Call agent_capability_check.
7446 (clear_installed_tracepoints): Assert that agent supports
7447 agent.
7448
d1feda86
YQ
74492012-03-03 Yao Qi <yao@codesourcery.com>
7450
7451 * linux-low.c (linux_supports_agent): New.
7452 (linux_target_ops): Initialize field `supports_agent' with
7453 linux_supports_agent.
7454 * target.h (struct target_ops) <supports_agent>: New.
7455 (target_supports_agent): New macro.
7456 * server.c (handle_general_set): Handle packet 'QAgent'.
7457 (handle_query): Send `QAgent+'.
7458 * Makefile.in (server.o): Depends on agent.h.
7459
2fa291ac
YQ
74602012-03-03 Yao Qi <yao@codesourcery.com>
7461
7462 * Makefile.in (OBS): Add agent.o.
7463 Add new rule for agent.o.
7464 Track dependence of tracepoint.c on agent.h.
7465 * tracepoint.c (run_inferior_command_1):
7466 (run_inferior_command): Call agent_run_command.
7467 (gdb_ust_connect_sync_socket): Deleted. Move it to
7468 common/agent.c.
7469 (resume_thread, stop_thread): Likewise.
7470 (gdb_ust_socket_init): Renamed to ...
7471 (gdb_agent_socket_init): ... New.
7472 (gdb_ust_thread): Renamed to ...
7473 (gdb_agent_helper_thread): ... New.
7474 (gdb_ust_init): Move some code to ...
7475 (gdb_agent_init): ... here. New.
7476 [HAVE_UST]: Call gdb_ust_init.
7477 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7478 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7479 * config.in, configure: Regenerated.
7480
05044653
PA
74812012-03-02 Pedro Alves <palves@redhat.com>
7482
7483 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7484 * linux-low.c (struct simple_pid_list): New.
7485 (stopped_pids): New a struct simple_pid_list pointer.
7486 (add_to_pid_list, pull_pid_from_list): New.
7487 (handle_extended_wait): Don't assume the first signal new children
7488 report is SIGSTOP. Adjust call to pull_pid_from_list.
7489 (linux_wait_for_lwp): Adjust.
7490
8d00225b
YQ
74912012-03-02 Yao Qi <yao@codesourcery.com>
7492
7493 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7494 debug log.
7495
19560ba5
YQ
74962012-03-02 Yao Qi <yao@codesourcery.com>
7497
7498 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7499 `stop_pc' and `tpoint'. Update caller.
7500
1faeff08
MR
75012012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7502
7503 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7504 * linux-low.c (use_linux_regsets): New macro.
7505 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7506 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7507 (linux_register_in_regsets): New function.
7508 (usr_fetch_inferior_registers): Skip registers covered by
7509 regsets.
7510 (usr_store_inferior_registers): Likewise.
7511 (usr_fetch_inferior_registers): New macro.
7512 (usr_store_inferior_registers): Likewise.
7513 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7514 (linux_store_registers): Likewise.
7515 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7516 prototype.
7517 (init_registers_mips64_dsp_linux): Likewise.
7518 (init_registers_mips_linux): New macro.
7519 (init_registers_mips_dsp_linux): Likewise.
7520 (mips_dsp_num_regs): Likewise.
7521 (DSP_BASE, DSP_CONTROL): New fallback macros.
7522 (mips_base_regs): New macro.
7523 (mips_regmap): Use it. Fix the size.
7524 (mips_dsp_regmap): New variable.
7525 (mips_dsp_regset_bitmap): Likewise.
7526 (mips_arch_setup): New function.
7527 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7528 than mips_regmap.
7529 (mips_cannot_store_register): Likewise.
7530 (the_low_target): Update .arch_setup, .num_regs and .regmap
7531 initializers. Add .regset_bitmap initializer.
7532 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7533 initializer.
7534 * linux-bfin-low.c (the_low_target): Likewise.
7535 * linux-cris-low.c (the_low_target): Likewise.
7536 * linux-crisv32-low.c (the_low_target): Likewise.
7537 * linux-ia64-low.c (the_low_target): Likewise.
7538 * linux-m32r-low.c (the_low_target): Likewise.
7539 * linux-m68k-low.c (the_low_target): Likewise.
7540 * linux-ppc-low.c (the_low_target): Likewise.
7541 * linux-s390-low.c (the_low_target): Likewise.
7542 * linux-sh-low.c (the_low_target): Likewise.
7543 * linux-sparc-low.c (the_low_target): Likewise.
7544 * linux-tic6x-low.c (the_low_target): Likewise.
7545 * linux-x86-low.c (the_low_target): Likewise.
7546 * linux-xtensa-low.c (the_low_target): Likewise.
7547 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7548 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7549 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7550 srv_xmlfiles.
7551 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7552 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7553
c03e6ccc
YQ
75542012-02-29 Yao Qi <yao@codesourcery.com>
7555 Pedro Alves <palves@redhat.com>
7556
7557 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7558 `step_over_finished' is true.
7559
644cebc9
PA
75602012-02-27 Pedro Alves <palves@redhat.com>
7561
7562 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7563 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7564
c14d7ab2
PA
75652012-02-27 Pedro Alves <palves@redhat.com>
7566
7567 PR server/9684
7568 * linux-low.c (pid_is_stopped): New.
7569 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7570
412c89dd
LM
75712012-02-25 Luis Machado <lgustavo@codesourcery.com>
7572
7573 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7574 of conditions.
7575
b745defe
MR
75762012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7577
7578 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7579
9f3a5c85
LM
75802012-02-24 Luis Machado <lgustavo@codesourcery>
7581
7582 * server.c (handle_query): Advertise support for target-side
7583 breakpoint condition evaluation.
7584 (process_point_options): New function.
7585 (process_serial_event): When inserting a breakpoint, check for
7586 a target-side condition that should be evaluated.
7587
7588 * mem-break.c: Include regcache.h and ax.h.
7589 (point_cond_list_t): New data structure.
7590 (breakpoint) <cond_list>: New field.
7591 (find_gdb_breakpoint_at): Make non-static.
7592 (delete_gdb_breakpoint_at): Clear any target-side
7593 conditions.
7594 (clear_gdb_breakpoint_conditions): New function.
7595 (add_condition_to_breakpoint): Likewise.
7596 (add_breakpoint_condition): Likewise.
7597 (gdb_condition_true_at_breakpoint): Likewise.
7598 (gdb_breakpoint_here): Return result directly instead
7599 of going through a local variable.
7600
7601 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7602 (clear_gdb_breakpoint_conditions): Likewise.
7603 (add_breakpoint_condition): Likewise.
7604 (gdb_condition_true_at_breakpoint): Likewise.
7605
7606 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7607 (need_step_over_p): Take target-side breakpoint condition into
7608 consideration.
7609
5e1dc496
LM
76102012-02-24 Luis Machado <lgustavo@codesourcery>
7611
7612 * server.h: Include tracepoint.h.
7613 (agent_mem_read, agent_get_trace_state_variable_value,
7614 agent_set_trace_state_variable_value,
7615 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7616 get_set_tsv_func_addr): New prototypes.
7617
7618 * ax.h: New include file.
7619 * ax.c: New source file.
7620
7621 * tracepoint.c: Include ax.h.
7622 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7623 agent_expr, eval_result_type): Move to ax.h.
7624 (parse_agent_expr): Rename to ...
7625 (gdb_parse_agent_expr): ... this, make it non-static and move
7626 to ax.h.
7627 (unparse_agent_expr) Rename to ...
7628 (gdb_unparse_agent_expr): ... this, make it non-static and move
7629 to ax.h.
7630 (eval_agent_expr): Rename to ...
7631 (eval_tracepoint_agent_expr): ... this.
7632 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7633 forward declarations.
7634 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7635 (agent_get_trace_state_variable_value): New function.
7636 (agent_set_trace_state_variable_value): New function.
7637 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7638 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7639 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7640 (condition_true_at_tracepoint): Likewise.
7641 (parse_agent_expr): Rename to ...
7642 (gdb_parse_agent_expr): ... this and move to ax.c.
7643 (unparse_agent_expr): Rename to ...
7644 (gdb_unparse_agent_expr): ... this and move to ax.c.
7645 (gdb_agent_op_name): Move to ax.c.
7646 (eval_agent_expr): Rename to ...
7647 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7648 and move to ax.c.
7649 (eval_tracepoint_agent_expr): New function.
7650 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7651 non-static.
5e1dc496
LM
7652 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7653 ax.c.
7654 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7655 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7656 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7657 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7658 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7659 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7660 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7661 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7662 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7663 (compile_bytecodes): Remove forward declaration.
7664 (is_goto_target): Move to ax.c.
7665 (compile_bytecodes): Move to ax.c and call
7666 agent_get_trace_state_variable_value (...) and
7667 agent_set_trace_state_variable_value (...).
7668
7669 * Makefile.in: Update ax.c and IPA dependencies.
7670
277e4e52
PA
76712012-02-24 Pedro Alves <palves@redhat.com>
7672
7673 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7674 (cmd_bigqtbuffer_circular): ... this. Only handle
7675 'QTBuffer:circular:'.
7676 (handle_tracepoint_general_set): Adjust.
7677
bf4c19f7
YQ
76782012-02-16 Yao Qi <yao@codesourcery.com>
7679
7680 * inferiors.c: Move code to ...
7681 * dll.c: .... here. New.
7682 * server.h: Declare clear_dlls.
7683 * Makefile.in (SFILES): Add dll.c.
7684 (OBS): Add dll.o
7685 (dll.o): New rule.
7686
d73f2619
YQ
76872012-02-11 Yao Qi <yao@codesourcery.com>
7688
7689 * server.c: (handle_monitor_command): Add a new parameter
7690 `own_buf'.
7691 (handle_query): Update caller.
7692
f8255c2a
JB
76932012-02-09 Joel Brobecker <brobecker@adacore.com>
7694
7695 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7696 * configure, config.in: Regenerate.
7697 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7698 is not defined.
7699
da84f473
PA
77002012-02-02 Pedro Alves <palves@redhat.com>
7701
7702 Try SIGKILL first, then PTRACE_KILL.
7703 * linux-low.c (linux_kill_one_lwp): New.
7704 (linux_kill_one_lwp): Rename to ...
7705 (kill_one_lwp_callback): ... this. Use the new
7706 linux_kill_one_lwp.
7707
e886a173
PA
77082012-02-02 Pedro Alves <palves@redhat.com>
7709
7710 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7711 inferior.
7712
be07f1a2
PA
77132012-01-27 Pedro Alves <palves@redhat.com>
7714
7715 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7716 (elf_64_file_p): Make static.
7717 (linux_pid_exe_is_elf_64_file): New.
7718 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7719 Delete declarations.
7720 (linux_pid_exe_is_elf_64_file): Declare.
7721 * linux-x86-low.c (x86_arch_setup): Use
7722 linux_pid_exe_is_elf_64_file.
7723
d8301ad1
JK
77242012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7725
7726 * linux-low.c (linux_wait_for_event_1): Rename to ...
7727 (linux_wait_for_event): ... here and merge it with former
7728 linux_wait_for_event - new variable wait_ptid, use it.
7729 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7730
01b17894
PA
77312012-01-23 Pedro Alves <palves@redhat.com>
7732
7733 * server.c (main): Avoid yet another case of infinite loop while
7734 detaching/killing after a longjmp.
7735
e825046f
JK
77362012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7737
7738 Code cleanup.
7739 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7740
b9e7b9c3
UW
77412012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7742
7743 * hostio.c (handle_readlink): New function.
7744 (handle_vFile): Call it to handle "vFile:readlink" packets.
7745
901f9912
UW
77462012-01-20 Pedro Alves <palves@redhat.com>
7747 Ulrich Weigand <ulrich.weigand@linaro.org>
7748
7749 * server.c (handle_v_requests): Only support vAttach and vRun to
7750 start multiple processes when in extended protocol mode.
7751
fc1ab1a0
PA
77522012-01-17 Pedro Alves <palves@redhat.com>
7753
7754 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7755 memalign plus mprotect to allocate the scratch buffer.
7756
7d5d4e98
PA
77572012-01-13 Pedro Alves <palves@redhat.com>
7758
7759 * server.c (attach_inferior): Clear `cont_thread'.
7760
f128d5e9
PA
77612012-01-13 Pedro Alves <palves@redhat.com>
7762
7763 * server.c (main): Avoid infinite loop while detaching/killing
7764 after a longjmp.
7765
06db92f0
DE
77662012-01-09 Doug Evans <dje@google.com>
7767
7768 * server.c (start_inferior): Set last_ptid in --wrapper case.
7769
32d92999
YQ
77702012-01-06 Yao Qi <yao@codesourcery.com>
7771
7772 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7773 defined.
7774 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7775
5e0a92a9
YQ
77762012-01-04 Yao Qi <yao@codesourcery.com>
7777
7778 * tracepoint.c (cmd_qtdp): Print debug message
7779 for static tracepoint.
7780
ae639e8c
YQ
77812012-01-04 Yao Qi <yao@codesourcery.com>
7782
7783 * tracepoint.c (trace_vdebug): Differentiate debug message
7784 between gdbserver and IPA.
7785
f72429c5
YQ
77862012-01-03 Yao Qi <yao@codesourcery.com>
7787
7788 * tracepoint.c (tracepoint_was_hit): Don't collect for
7789 static tracepoint.
7790
12c3e59c
JB
77912012-01-02 Joel Brobecker <brobecker@adacore.com>
7792
7793 * terminal.h: Reformat copyright header.
7794
67827812
JB
77952012-01-02 Joel Brobecker <brobecker@adacore.com>
7796
7797 * server.c (gdbserver_version): Update copyright year.
7798 * gdbreplay.c (gdbreplay_version): Likewise.
7799
3e52c33d
JK
78002011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7801
7802 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7803
7804 Revert:
7805 2011-12-18 Hui Zhu <teawater@gmail.com>
7806 * linux-low.c (linux_create_inferior): Save return value to ret.
7807
66f1260e
HZ
78082011-12-18 Hui Zhu <teawater@gmail.com>
7809
7810 * linux-low.c (linux_create_inferior): Save return value to ret.
7811
e77616d7
DE
78122011-12-16 Doug Evans <dje@google.com>
7813
e7b06c57
DE
7814 * linux-low.c (linux_create_inferior): If stdio connection,
7815 redirect stdin from /dev/null, stdout to stderr.
7816 * remote-utils.c (remote_is_stdio): New static global.
7817 (remote_connection_is_stdio): New function.
7818 (remote_prepare): Handle stdio connection.
7819 (remote_open): Ditto.
7820 (remote_close): Don't close stdin for stdio connections.
7821 (read_prim,write_prim): New functions. Replace all calls to
7822 read/write to these.
7823 * server.c (main): Watch for "-" argument. Move call to
7824 remote_prepare before start_inferior.
7825 * server.h (STDIO_CONNECTION_NAME): New macro.
7826 (remote_connection_is_stdio): Declare.
7827
e77616d7
DE
7828 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7829 in debugging output.
7830
82067193
YQ
78312011-12-15 Yao Qi <yao@codesourcery.com>
7832
7833 * tracepoint.c: Include sys/syscall.h.
7834 (gdb_ust_thread): Remove preprocessor conditional.
7835
82bfbe7e
PA
78362011-12-14 Pedro Alves <pedro@codesourcery.com>
7837
7838 * linux-low.c (linux_detach_one_lwp): Call
7839 the_low_target.prepare_to_resume before detaching.
7840
712c6575
YQ
78412011-12-14 Yao Qi <yao@codesourcery.com>
7842
7843 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7844 of write.
7845
d54d1edf
YQ
78462011-12-14 Yao Qi <yao@codesourcery.com>
7847
7848 * i386-low.c (i386_low_stopped_data_address): Initialize local
7849 variable `control'.
7850
6210a125
PA
78512011-12-13 Pedro Alves <pedro@codesourcery.com>
7852
7853 PR remote/13492
7854
7855 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7856 DR_CONTROL unless necessary. Extend comments.
7857 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7858 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7859
2ece8244
YQ
78602011-12-13 Yao Qi <yao@codesourcery.com>
7861
7862 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7863 macros.
7864 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7865
784867a5
JK
78662011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7867
7868 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7869 Print new debug message for such case.
7870
6bf36717
JK
78712011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7872
7873 Fix overlapping memcpy.
7874 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7875 the read_inferior_memory transfer.
7876 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7877 write_inferior_memory transfer.
7878 (set_fast_tracepoint_jump): New variable buf. Use it for the
7879 read_inferior_memory and write_inferior_memory transfers.
7880 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7881 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7882 Use it for the write_inferior_memory transfer.
7883 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7884 buffers.
7885
50275556
MR
78862011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7887
7888 * linux-low.c (fetch_register, store_register): Make code
7889 consistent, fix formatting.
7890
7325beb4
MR
78912011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7892
7893 * linux-low.c (usr_store_inferior_registers): Factor out code
7894 to handle individual registers into...
7895 (store_register): ... this new function.
7896
c642a434
UW
78972011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7898
7899 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7900 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7901 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7902 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7903 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7904 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7905 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7906 (srv_xmlfiles): Add new XML files.
7907
7908 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7909 and <sys/uio.h>.
7910 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7911 (init_registers_s390_linux32v1): Add prototype.
7912 (init_registers_s390_linux32v2): Likewise.
7913 (init_registers_s390_linux64v1): Likewise.
7914 (init_registers_s390_linux64v2): Likewise.
7915 (init_registers_s390x_linux64v1): Likewise.
7916 (init_registers_s390x_linux64v2): Likewise.
7917 (s390_num_regs): Increment to 52.
7918 (s390_regmap): Add orig_r2 register.
7919 (s390_num_regs_3264): Increment to 68.
7920 (s390_regmap_3264): Add orig_r2 register.
7921 (s390_collect_ptrace_register): Handle orig_r2 register.
7922 (s390_supply_ptrace_register): Likewise.
7923 (s390_fill_last_break): New function.
7924 (s390_store_last_break): Likewise.
7925 (s390_fill_system_call): New function.
7926 (s390_store_system_call): Likewise.
7927 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7928 register sets.
7929 (s390_check_regset): New function.
7930 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7931 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7932 Update target_regsets for available register sets.
7933
2268b414
JK
79342011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7935 Jan Kratochvil <jan.kratochvil@redhat.com>
7936
7937 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7938 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7939 New.
7940 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7941 * linux-low.h (struct process_info_private): New member r_debug.
7942 * server.c (handle_qxfer_libraries): Call
7943 the_target->qxfer_libraries_svr4.
7944 (handle_qxfer_libraries_svr4): New function.
7945 (qxfer_packets): New entry "libraries-svr4".
7946 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7947 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7948 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7949 PACKET_qXfer_libraries_svr4.
7950
d6db1fab
UW
79512011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7952
7953 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7954 PSW address/mask between 8-byte and 16-byte formats.
7955 (s390_supply_ptrace_register): Likewise.
7956 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7957 basic addressing mode bit.
7958
242f5f1c
SS
79592011-11-24 Stan Shebs <stan@codesourcery.com>
7960
7961 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7962
f196051f
SS
79632011-11-17 Stan Shebs <stan@codesourcery.com>
7964
7965 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7966 (tracing_start_time): New global.
7967 (tracing_stop_time): New global.
7968 (tracing_user_name): New global.
7969 (tracing_notes): New global.
7970 (tracing_stop_note): New global.
7971 (cmd_qtstart): Set traceframe_usage, start_time.
7972 (stop_tracing): Set stop_time.
7973 (cmd_qtstatus): Report additional status.
7974 (cmd_qtp): New function.
7975 (handle_tracepoint_query): Call it.
7976 (cmd_qtnotes): New function.
7977 (handle_tracepoint_general_set): Call it.
7978 (get_timestamp): Rename from tsv_get_timestamp.
7979
405f8e94
SS
79802011-11-14 Stan Shebs <stan@codesourcery.com>
7981 Kwok Cheung Yeung <kcy@codesourcery.com>
7982
7983 * linux-x86-low.c (small_jump_insn): New.
7984 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7985 trampoline and error message, build a trampoline and issue a small
7986 jump instruction to it.
7987 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7988 trampoline and error message.
7989 (x86_get_min_fast_tracepoint_insn_len): New.
7990 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7991 * linux-low.h (struct linux_target_ops): Add arguments to
7992 install_fast_tracepoint_jump_pad operation, add new operation.
7993 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7994 arguments.
7995 (linux_get_min_fast_tracepoint_insn_len): New function.
7996 (linux_target_op): Add new operation.
7997 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7998 (gdb_trampoline_buffer_end): Ditto.
7999 (gdb_trampoline_buffer_error): Ditto.
8000 (struct ipa_sym_addresses): Add fields for new IPA variables.
8001 (symbol_list): Add entries for new IPA variables.
8002 (struct tracepoint): Add fields to hold the address range of the
8003 trampoline used by the tracepoint.
8004 (trampoline_buffer_head): New static variable.
8005 (trampoline_buffer_tail): Ditto.
8006 (claim_trampoline_space): New function.
8007 (have_fast_tracepoint_trampoline_buffer): New function.
8008 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8009 structure.
8010 (install_fast_tracepoint): Ditto, also add error buffer argument.
8011 (cmd_qtminftpilen): New function.
8012 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8013 (fast_tracepoint_from_trampoline_address): New function.
8014 (fast_tracepoint_collecting): Handle trampoline as part of jump
8015 pad space.
8016 (set_trampoline_buffer_space): New function.
8017 (initialize_tracepoint): Initialize new IPA variables.
8018 * target.h (struct target_ops): Add arguments to
8019 install_fast_tracepoint_jump_pad operation, add new
8020 get_min_fast_tracepoint_insn_len operation.
8021 (target_get_min_fast_tracepoint_insn_len): New.
8022 (install_fast_tracepoint_jump_pad): Add arguments.
8023 * server.h (IPA_BUFSIZ): Define.
8024 * linux-i386-ipa.c: Include extra header files.
8025 (initialize_fast_tracepoint_trampoline_buffer): New function.
8026 (initialize_low_tracepoint): Call it.
8027 * server.h (set_trampoline_buffer_space): Declare.
8028 (claim_trampoline_space): Ditto.
8029 (have_fast_tracepoint_trampoline_buffer): Ditto.
8030
1e4d1764
YQ
80312011-11-14 Yao Qi <yao@codesourcery.com>
8032
8033 * server.c (handle_query): Handle InstallInTrace for qSupported.
8034 * tracepoint.c (add_tracepoint): Sort list.
8035 (install_tracepoint, download_tracepoint): New.
8036 (cmd_qtdp): Call them to install and download tracepoints.
8037 (sort_tracepoints): Removed.
8038 (cmd_qtstart): Update.
8039
5c73ff4e
YQ
80402011-11-14 Yao Qi <yao@codesourcery.com>
8041
8042 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8043 * mem-break.h: Declare.
8044 * tracepoint.c (cmd_qtstart): Move some code to ...
8045 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8046 New.
8047 (download_tracepoints): Move some code to ...
8048 (download_tracepoint_1): ... here. New.
8049
86a30030
YQ
80502011-11-08 Yao Qi <yao@codesourcery.com>
8051
8052 * remote-utils.c (relocate_instruction): A comment fix.
8053
8d26e50c
JB
80542011-11-07 Joel Brobecker <brobecker@adacore.com>
8055
8056 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8057 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8058 dr_status_mirror and dr_control_mirror from debug_reg_state.
8059 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8060 (i386_initial_stuff): Remove use of deleted globals.
8061 (i386_get_thread_context, i386_set_thread_context,
8062 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8063 from debug_reg_state.
8064
a59306a3
YQ
80652011-11-05 Yao Qi <yao@codesourcery.com>
8066
8067 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8068 address as TPOINT's.
8069
3065dfb6
SS
80702011-11-02 Stan Shebs <stan@codesourcery.com>
8071
8072 * tracepoint.c (agent_mem_read_string): New function.
8073 (eval_agent_expr): Call it for tracenz.
8074 * server.c (handle_query): Report support for tracenz.
8075
fd0d8c7c
YQ
80762011-11-02 Yao Qi <yao@codesourcery.com>
8077
8078 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8079
609086b1
YQ
80802011-11-02 Yao Qi <yao@codesourcery.com>
8081
8082 * target.h: Fix a typo in comment.
8083
b9fd1791
PA
80842011-10-31 Pedro Alves <pedro@codesourcery.com>
8085
8086 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8087 clobber the breakpoints' shadows with fast tracepoint jumps.
8088 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8089 * target.c (write_inferior_memory): Also pass MYADDR down to
8090 check_mem_write.
8091
03583c20
UW
80922011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8093
8094 * configure.ac: Check support for personality routine.
8095 * configure: Regenerate.
8096 * config.in: Likewise.
8097 * linux-low.c: Include <sys/personality.h>.
8098 Define ADDR_NO_RANDOMIZE if necessary.
8099 (linux_create_inferior): Disable address space randomization when
8100 forking inferior, if requested.
8101 (linux_supports_disable_randomization): New function.
8102 (linux_target_ops): Install it.
8103 * server.h (disable_randomization): Declare.
8104 * server.c (disable_randomization): New global variable.
8105 (handle_general_set): Handle QDisableRandomization.
8106 (handle_query): Likewise for qSupported.
8107 (main): Support --disable-randomization and --no-disable-randomization
8108 command line arguments.
8109 * target.h (struct target_ops): Add supports_disable_randomization.
8110 (target_supports_disable_randomization): New macro.
8111
723b724b
MF
81122011-09-29 Mike Frysinger <vapier@gentoo.org>
8113
8114 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8115 ifdef check.
8116 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8117 [!PT_GETDSBT] (target_loadmap): New definition.
8118 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8119 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8120 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8121 and PT_GETDSBT to LINUX_LOADMAP.
8122 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8123 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8124
55329a5c 81252011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8126
8127 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8128 (arm_linux_hwbp_cap): New static variable.
8129 (arm_linux_get_hwbp_cap): Replace by ...
8130 (arm_linux_init_hwbp_cap): ... this new function.
8131 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8132 (arm_linux_get_hw_watchpoint_count): Likewise.
8133 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8134 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8135 (arm_prepare_to_resume): Use perror_with_name instead of error.
8136
55329a5c 81372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8138
8139 * linux-arm-low.c: Include <signal.h>.
8140 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8141 (struct arm_linux_hwbp_cap): New data type.
8142 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8143 (struct arm_linux_hw_breakpoint): New data type.
8144 (MAX_BPTS, MAX_WPTS): Define.
8145 (struct arch_process_info, struct arch_lwp_info): New data types.
8146 (arm_linux_get_hwbp_cap): New function.
8147 (arm_linux_get_hw_breakpoint_count): Likewise.
8148 (arm_linux_get_hw_watchpoint_count): Likewise.
8149 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8150 (arm_hwbp_control_initialize): Likewise.
8151 (arm_hwbp_control_is_enabled): Likewise.
8152 (arm_hwbp_control_is_initialized): Likewise.
8153 (arm_hwbp_control_disable): Likewise.
8154 (arm_linux_hw_breakpoint_equal): Likewise.
8155 (arm_linux_hw_point_initialize): Likewise.
8156 (struct update_registers_data): New data structure.
8157 (update_registers_callback: New function.
8158 (arm_insert_point): Likewise.
8159 (arm_remove_point): Likewise.
8160 (arm_stopped_by_watchpoint): Likewise.
8161 (arm_stopped_data_address): Likewise.
8162 (arm_new_process): Likewise.
8163 (arm_new_thread): Likewise.
8164 (arm_prepare_to_resume): Likewise.
8165 (the_low_target): Register arm_insert_point, arm_remove_point,
8166 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8167 arm_new_thread, and arm_prepare_to_resume.
8168
6b9801d4
SS
81692011-09-15 Stan Shebs <stan@codesourcery.com>
8170
8171 * server.h (struct emit_ops): Add compare-goto fields.
8172 * tracepoint.c (gdb_agent_op_sizes): New table.
8173 (emit_eq_goto): New function.
8174 (emit_ne_goto): New function.
8175 (emit_lt_goto): New function.
8176 (emit_le_goto): New function.
8177 (emit_gt_goto): New function.
8178 (emit_ge_goto): New function.
8179 (is_goto_target): New function.
8180 (compile_bytecodes): Recognize special cases of compare-goto
8181 combinations and call specialized emitters for them.
8182 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8183 (amd64_emit_ne_goto): New function.
8184 (amd64_emit_lt_goto): New function.
8185 (amd64_emit_le_goto): New function.
8186 (amd64_emit_gt_goto): New function.
8187 (amd64_emit_ge_goto): New function.
8188 (amd64_emit_ops): Add the new functions.
8189 (i386_emit_eq_goto): New function.
8190 (i386_emit_ne_goto): New function.
8191 (i386_emit_lt_goto): New function.
8192 (i386_emit_le_goto): New function.
8193 (i386_emit_gt_goto): New function.
8194 (i386_emit_ge_goto): New function.
8195 (i386_emit_ops): Add the new functions.
8196
bf15cbda
SS
81972011-09-08 Stan Shebs <stan@codesourcery.com>
8198
8199 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8200 (i386_emit_epilogue): Restore %ebx.
8201
943ca1dd
JZ
82022011-08-31 Jie Zhang <jzhang918@gmail.com>
8203
8204 * server.c (step_thread): Remove definition.
8205 (process_serial_event): Don't handle Hs.
8206 * server.h (step_thread): Remove declaration.
8207 * target.c (set_desired_inferior): Remove use of step_thread.
8208
e3deef73
LM
82092011-08-24 Luis Machado <lgustavo@codesourcery.com>
8210
8211 * linux-low.c: Include linux-procfs.h.
8212 (linux_attach_lwp_1): Update comments.
8213 (linux_attach): Scan for existing threads when attaching to a
8214 process that is the tgid.
8215 * Makefile.in: Update dependencies.
8216
13da1c97
LM
82172011-08-24 Luis Machado <lgustavo@codesourcery.com>
8218
8219 * configure.srv: Add linux-procfs.o dependencies.
8220
881127c9
YQ
82212011-08-14 Yao Qi <yao@codesourcery.com>
8222
8223 * target.h (struct target_ops): Fix indent.
8224 * win32-low.c (win32_target_ops): Fix comment.
8225
58dbd541
YQ
82262011-08-14 Andrew Jenner <andrew@codesourcery.com>
8227 Yao Qi <yao@codesourcery.com>
8228
8229 * Makefile.in (clean): Remove tic6x-*.c files.
8230 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8231 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8232 (tic6x-c64xp-linux.c): Likewise.
8233 * configure.srv: Add support for tic6x-*-uclinux.
8234 * linux-tic6x-low.c: New.
8235 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8236
78d85199
YQ
82372011-08-14 Andrew Stubbs <ams@codesourcery.com>
8238 Yao Qi <yao@codesourcery.com>
8239
8240 * target.h (struct target_ops): Add read_loadmap.
8241 * linux-low.c (struct target_loadseg): New type.
8242 (struct target_loadmap): New type.
8243 (linux_read_loadmap): New function.
8244 (linux_target_ops): Add linux_read_loadmap.
8245 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8246 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8247 to NULL.
78d85199 8248
a959a88d
EZ
82492011-08-05 Eli Zaretskii <eliz@gnu.org>
8250
8251 * win32-low.c: Include <stdint.h>.
8252
1ced966e
PA
82532011-07-22 Pedro Alves <pedro@codesourcery.com>
8254
8255 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8256 to the inferior here.
8257 (i386_remove_aligned_watchpoint): Ditto.
8258 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8259 fit part of the watchpoint in the debug registers.
8260 (i386_update_inferior_debug_regs): New.
8261 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8262 registers, and only update the inferior on success.
8263 (i386_low_remove_watchpoint): Ditto.
8264
d26e3629
KY
82652011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8266
8267 * linux-low.c (compare_ints, unique, list_threads, show_process,
8268 linux_core_of_thread): Delete.
8269 (linux_target_ops): Change linux_core_of_thread to
8270 linux_common_core_of_thread.
8271 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8272 * utils.c (malloc_failure): Change type of argument.
8273 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8274 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8275 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8276 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8277 (IPA_OBJS): Add common-utils-ipa.o.
8278 (ptid_h, linux_osdata_h): New macros.
8279 (server_h): Add common/common-utils.h, common/xml-utils.h,
8280 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8281 common/ptid.h.
8282 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8283 ptid.o, buffer.o): New rules.
8284 (linux-low.o): Add common/linux-osdata.h as a dependency.
8285 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8286 * configure.ac: Add AC_HEADER_DIRENT check.
8287 * config.in: Regenerate.
8288 * configure: Regenerate.
8289 * remote-utils.c (xml_escape_text): Delete.
8290 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8291 buffer_xml_printf): Move to common/buffer.c.
8292 * server.c (main): Remove call to initialize_inferiors.
8293 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8294 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8295 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8296 internal_error, gdb_assert, gdb_assert_fail): Delete.
8297 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8298 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8299 common/buffer.h.
8300 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8301 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8302 initialize_inferiors): Delete.
8303
2275a1a7
PA
83042011-07-20 Pedro Alves <pedro@codesourcery.com>
8305
8306 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8307 symbol error.
8308
0a5b1e09
PA
83092011-05-31 Pedro Alves <pedro@codesourcery.com>
8310
8311 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8312 assertion.
8313 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8314
6938fd34
YQ
83152011-05-26 Yao Qi <yao@codesourcery.com>
8316
8317 * Makefile.in (thread-db.o): Track dependence to
8318 common/gdb_thread_db.h.
8319 * thread-db.c: include gdb_thread_db.h from right place.
8320
b481f9e0
TT
83212011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8322
8323 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8324 __FILE__ and __LINE__ to internal_error.
8325
98a5dd13
DE
83262011-05-13 Doug Evans <dje@google.com>
8327
8328 * thread-db.c (try_thread_db_load_from_sdir): New function.
8329 (try_thread_db_load_from_dir): New function.
8330 (thread_db_load_search): Handle $sdir, ignore $pdir.
8331 Remove trying of system directories if search of
8332 libthread-db-search-path fails, that is now done via $sdir.
8333
d248b706
KY
83342011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8335
8336 * server.c (handle_query): Add EnableDisableTracepoints to the list
8337 of supported features.
43aaf8b6 8338 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8339 tracepoints.
43aaf8b6
PA
8340 (cmd_qtenable_disable): New.
8341 (cmd_qtstart): Install tracepoints even if disabled.
8342 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8343 receiving a QTEnable or QTDisable packet.
8344 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8345 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8346 tracepoints.
8347 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8348
84e578fb
DE
83492011-05-10 Doug Evans <dje@google.com>
8350
8351 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8352
71f55dd8
DE
83532011-05-04 Doug Evans <dje@google.com>
8354
8355 * linux-low.c (linux_join): Skip process lookup.
8356 * spu-low.c (spu_join): Ditto.
8357 * server.c (join_inferiors_callback): Delete.
8358 (process_serial_event): For 'D' packet (detach) call join_inferior
8359 directly.
8360
4d393d60
JM
83612011-05-04 Joseph Myers <joseph@codesourcery.com>
8362
8363 * README: Don't mention xscale*-*-linux*.
8364 * configure.srv (xscale*-*-linux*): Don't handle target.
8365
b00ad6ff
NF
83662011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8367
8368 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8369 casting pointers.
8370 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8371 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8372 (i386_emit_void_call_2): Likewise.
8373
af96c192
YQ
83742011-04-26 Yao Qi <yao@codesourcery.com>
8375
43aaf8b6
PA
8376 * linux-low.c: Move common macros to linux-ptrace.h.
8377 Include linux-ptrace.h.
af96c192
YQ
8378 * Makefile.in (linux_ptrace_h): New.
8379 (linux-low.o): Depends on linux-ptrace.h.
8380
03f2bd59
JK
83812011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8382
8383 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8384 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8385 (remote_prepare): New function with most of the TCP code from ...
8386 (remote_open): ... here. Detect PORT here unconditionally. Move also
8387 setting transport_is_reliable.
8388 * server.c (run_once): New variable.
8389 (gdbserver_usage): Document it.
8390 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8391 the first run if RUN_ONCE.
8392 * server.h (run_once, remote_prepare): New declarations.
8393
7a9dd1b2
TT
83942011-04-19 Tom Tromey <tromey@redhat.com>
8395
8396 * win32-low.c (handle_load_dll): Remove duplicate "the".
8397
81239425
PM
83982011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8399
8400 Remove support for old Cygwin 1.5 versions.
8401 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8402 function to avoid warning.
8403 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8404 warning.
8405
9e0627f1
PM
84062011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8407
8408 * gdbserver/server.h (Macro _): Define it if not available.
8409
588eebee
MS
84102011-03-14 Michael Snyder <msnyder@vmware.com>
8411
348af9f7 8412 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8413
43f70d4c
JB
84142011-03-10 Joel Brobecker <brobecker@adacore.com>
8415
8416 * Makefile.in (maintainer-clean realclean distclean): Remove
8417 "make ... subdir_do" command.
8418
348af9f7
MS
84192011-03-10 Michael Snyder <msnyder@vmware.com>
8420
8421 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8422
8423 * server.c (handle_v_run): Free alloced buffer on early return.
8424
e637a4f5
YQ
84252011-03-09 Yao Qi <yao@codesourcery.com>
8426
8427 Revert:
8428 2011-03-04 Yao Qi <yao@codesourcery.com>
8429
8430 * Makefile.in: Remove GNU make feature --directory.
8431
8432 2011-03-05 Yao Qi <yao@codesourcery.com>
8433
8434 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8435 (subdir_do): New make target. Copied from gdb/Makefile.
8436 (maintainer-clean, realclean, distclean, clean): Call corresponding
8437 make targets in common/Makefile.
8438
8439 2011-02-11 Yao Qi <yao@codesourcery.com>
8440
8441 * configure.ac: Call AC_PROG_RANLIB.
8442 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8443 * configure: Regenerate.
8444
e6edda56
JK
84452011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8448
e5141119
JB
84492011-03-06 Yao Qi <yao@codesourcery.com>
8450
8451 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8452
64794aa4
JB
84532011-03-05 Yao Qi <yao@codesourcery.com>
8454
8455 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8456 (subdir_do): New make target. Copied from gdb/Makefile.
8457 (maintainer-clean, realclean, distclean, clean): Call corresponding
8458 make targets in common/Makefile.
8459
7a762829
YQ
84602011-03-04 Yao Qi <yao@codesourcery.com>
8461
8462 * Makefile.in: Remove GNU make feature --directory.
8463
348af9f7
MS
84642011-03-04 Michael Snyder <msnyder@vmware.com>
8465
8466 * server.c (queue_stop_reply): Call xmalloc not malloc.
8467
84682011-03-02 Michael Snyder <msnyder@vmware.com>
8469
8470 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8471
9f72fee2
MS
84722011-02-28 Michael Snyder <msnyder@vmware.com>
8473
588eebee
MS
8474 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8475 (cmd_qtframe): Ditto.
8476 (cmd_qtbuffer): Ditto.
8477 (cmd_bigqtbuffer): Ditto.
8478
9f72fee2
MS
8479 * utils.c (decimal2str): Initialize 'width' to nine, then
8480 don't mess with it.
8481
8040bd49
UW
84822011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8483
8484 * hostio.c (require_data): Free *data, not data.
8485
7e52cbd0
JK
84862011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8487
8488 * hostio.c (require_data): Use free, not xfree.
8489
9130f83e
MS
84902011-02-27 Michael Snyder <msnyder@vmware.com>
8491
4b812f4e
MS
8492 * server.c (handle_query): Discard unused value.
8493
9130f83e
MS
8494 * hostio.c (require_data): Free malloc memory before returning
8495 error.
8496
69d37113
MS
84972011-02-26 Michael Snyder <msnyder@vmware.com>
8498
8499 * linux-low.c (list_threads): Call closedir for dirent.
8500
35f5825a
MS
85012011-02-27 Michael Snyder <msnyder@vmware.com>
8502
2a589cef
MS
8503 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8504 a case statement falls through.
8505
0adea5f7
MS
8506 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8507
35f5825a
MS
8508 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8509 in comparison.
8510
238f1c74
MS
85112011-02-26 Michael Snyder <msnyder@vmware.com>
8512
8513 * utils.c (decimal2str): Eliminate dead code and dead param.
8514 (pulongest): Drop dead param from call to decimal2str.
8515 (plongest): Ditto.
8516
633ff500
JB
85172011-02-24 Joel Brobecker <brobecker@adacore.com>
8518
8519 Revert the following patch (not approved yet):
8520 2011-02-21 Hui Zhu <teawater@gmail.com>
8521 * tracepoint.c (tp_printf): New function.
8522 (eval_agent_expr): Handle gdb_agent_op_printf.
8523
f9c6ff72
HZ
85242011-02-21 Hui Zhu <teawater@gmail.com>
8525
8526 * tracepoint.c (tp_printf): New function.
8527 (eval_agent_expr): Handle gdb_agent_op_printf.
8528
94d5e490
TT
85292011-02-18 Tom Tromey <tromey@redhat.com>
8530
8531 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8532 (tracepoint.o): Likewise.
8533 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8534 (gdb_agent_op_names): Likewise.
8535
c7f96d2b
TT
85362011-02-18 Tom Tromey <tromey@redhat.com>
8537
8538 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8539 gdb_agent_op_rot>: New constants.
8540 (gdb_agent_op_names): Add pick and roll.
8541 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8542 cases.
8543
0feedb2c
JK
85442011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8545
8546 * aclocal.m4: Regenerated with aclocal-1.11.1.
8547
b3b9301e
PA
85482011-02-14 Pedro Alves <pedro@codesourcery.com>
8549
8550 * server.c (handle_qxfer_traceframe_info): New.
8551 (qxfer_packets): Register "traceframe-info".
8552 (handle_query): Report support for qXfer:traceframe-info:read+.
8553 * tracepoint.c (match_blocktype): New.
8554 (traceframe_find_block_type): Rename to ...
8555 (traceframe_walk_blocks): ... this. Add callback filter argument,
8556 and use it.
8557 (traceframe_find_block_type): New, reimplemented on top of
8558 traceframe_walk_blocks.
8559 (build_traceframe_info_xml): New.
8560 (traceframe_read_info): New.
8561 * server.h (traceframe_read_info): Declare.
8562
4f3e6fb7
YQ
85632011-02-11 Yao Qi <yao@codesourcery.com>
8564
8565 * configure.ac: Call AC_PROG_RANLIB.
8566 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8567 * configure: Regenerate.
8568
764880b7
PA
85692011-02-07 Pedro Alves <pedro@codesourcery.com>
8570
8571 * server.c (gdb_read_memory): Change return semantics to allow
8572 partial transfers.
8573 (handle_search_memory_1): Adjust.
8574 (process_serial_event) <'m' packet>: Handle partial transfers.
8575 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8576
1c79eb8a
PA
85772011-01-28 Pedro Alves <pedro@codesourcery.com>
8578
8579 * regcache.c (init_register_cache): Initialize
8580 regcache->register_status.
8581 (free_register_cache): Release regcache->register_status.
8582 (regcache_cpy): Copy register_status.
8583 (registers_to_string): Print 'x's for unavailable registers.
8584 (supply_register): Mark the register's status valid or
8585 unavailable, depending on whether a buffer was passed in or not.
8586 (supply_register_zeroed): New.
8587 (supply_regblock): Mark the registers' status valid or
8588 unavailable, depending on whether a buffer was passed in or not.
8589 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8590 (struct regcache): New `register_status' field.
8591 (supply_register_zeroed): Declare.
8592 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8593 supply_register_zeroed, rather than passing a NULL buffer to
8594 supply_register.
8595 * tracepoint.c (fetch_traceframe_registers): Update comment.
8596
85724a0e
PA
85972011-01-28 Pedro Alves <pedro@codesourcery.com>
8598
8599 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8600 buffer explicit.
8601
d08aafef
PA
86022011-01-25 Pedro Alves <pedro@codesourcery.com>
8603
8604 * server.h (decode_xfer_write): Change prototype.
8605 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8606 and don't extract the annex here.
8607 * server.c (decode_xfer_read): Remove `annex' parameter,
8608 and don't extract the annex here.
8609 (decode_xfer): New.
8610 (struct qxfer): New.
8611 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8612 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8613 (handle_qxfer_statictrace): New functions, abstracted out from
8614 handle_query, and made to use the struct qxfer interface.
8615 (handle_threads_qxfer_proper): Rename to ...
8616 (handle_qxfer_threads_proper): ... this.
8617 (handle_threads_qxfer): Rename to ...
8618 (handle_qxfer_threads): ... this. Adjust.
8619 (qxfer_packets): New array.
8620 (handle_qxfer): New function.
8621 (handle_query): Use handle_qxfer.
8622
493e2a69
MS
86232011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8624
8625 * gdbreplay.c: Shorten lines of >= 80 columns.
8626 * linux-low.c: Ditto.
8627 * linux-ppc-low.c: Ditto.
8628 * linux-s390-low.c: Ditto.
8629 * linux-sparc-low.c: Ditto.
8630 * linux-x86-low.c: Ditto.
8631 * linux-xtensa-low.c: Ditto.
8632 * mem-break.c: Ditto.
8633 * nto-low.c: Ditto.
8634 * regcache.h: Ditto.
8635 * remote-utils.c: Ditto.
8636 * server.c: Ditto.
8637 * server.h: Ditto.
8638 * thread-db.c: Ditto.
8639 * tracepoint.c: Ditto.
8640 * utils.c: Ditto.
8641 * win32-low.h: Ditto.
8642
44944448
JB
86432011-01-05 Joel Brobecker <brobecker@adacore.com>
8644
8645 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8646 update.
8647
71ce852c
JB
86482011-01-01 Joel Brobecker <brobecker@adacore.com>
8649
8650 * server.c (gdbserver_version): Update copyright year in version
8651 output.
8652 * gdbreplay.c (gdbreplay_version): Ditto.
8653
eb826dc6
MF
86542010-12-29 Jie Zhang <jie.zhang@analog.com>
8655
8656 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8657 * linux-bfin-low.c: New file.
8658 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8659 PT_DATA_ADDR for BFIN targets.
8660 * Makefile.in (SFILES): Add linux-bfin-low.c.
8661 (clean): Remove reg-bfin.c.
8662 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8663 * README: Mention supported Blackfin targets.
8664
39ab222a
MF
86652010-12-23 Mike Frysinger <vapier@gentoo.org>
8666
8667 * .gitignore: New file.
8668
a1f2ce7d
MF
86692010-11-16 Mike Frysinger <vapier@gentoo.org>
8670
8671 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8672
f474844c
JZ
86732010-10-22 Jie Zhang <jie@codesourcery.com>
8674
8675 * Makefile.in: Add FLAGS_TO_PASS variable.
8676 (install): Remove dependency of install-only and recursively
8677 invoke make for install-only.
8678
f1048712
DE
86792010-10-04 Doug Evans <dje@google.com>
8680
8681 * Makefile.in (uninstall): Use $(DESTDIR).
8682
b53a1623
PA
86832010-09-24 Pedro Alves <pedro@codesourcery.com>
8684
e6ee044d
PA
8685 PR gdb/11842
8686
b53a1623
PA
8687 * linux-x86-low.c (compat_siginfo_from_siginfo)
8688 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8689 si_code is < 0. Check for si_code == SI_TIMER before checking for
8690 si_code < 0.
8691
fa1bd1e4
JB
86922010-09-13 Joel Brobecker <brobecker@adacore.com>
8693
8694 * lynx-i386-low.c: New file.
8695 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8696
47fac8f8
JB
86972010-09-13 Joel Brobecker <brobecker@adacore.com>
8698
8699 * lynx-low.c (ptrace_request_to_str): Remove handling for
8700 request values that have been removed in LynxOS 5.x.
8701
1adfc54d
JB
87022010-09-13 Joel Brobecker <brobecker@adacore.com>
8703
8704 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8705 <ptrace.h>
8706
c2a66c29
NS
87072010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8708
8709 * configure.ac: Add --enable-inprocess-agent option.
8710 * configure: Rebuilt.
8711
32fcada3
YQ
87122010-09-06 Yao Qi <yao@codesourcery.com>
8713
8714 * linux-low.c (linux_kill): Remove unused variable.
8715 (linux_stabilize_threads): Likewise.
8716 * server.c (start_inferior): Likewise.
8717 (queue_stop_reply_callback): Likewise.
8718 * tracepoint.c (do_action_at_tracepoint): Likewise.
8719
0cccb683
YQ
87202010-09-06 Yao Qi <yao@codesourcery.com>
8721
8722 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8723 on return.
8724
423ec54c
JK
87252010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8726
8727 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8728
12ac6819
PA
87292010-09-06 Pedro Alves <pedro@codesourcery.com>
8730
8731 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8732 "$(IPA_DEPFILES)".
8733
8ed54b31
JB
87342010-09-01 Joel Brobecker <brobecker@adacore.com>
8735
8736 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8737 gdbserver/lynx-ppc-low.c: New files.
8738 * Makefile.in (lynx_low_h): New variable.
8739 (lynx-low.o, lynx-ppc-low.o): New rules.
8740 * configure.ac: On LynxOS, link with -lnetinet.
8741 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8742 * configure: regenerate.
8743
bb0116a4
JB
87442010-09-01 Joel Brobecker <brobecker@adacore.com>
8745
8746 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8747 * configure.ac: Add check for vasprintf and vsnprintf.
8748 * configure, config.in: Regenerate.
8749 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8750
a778ab81 87512010-09-01 Joel Brobecker <brobecker@adacore.com>
8752
8753 * gdbreplay.c: Move include of alloca.h up, next to include of
8754 malloc.h.
8755 * server.h: Add include of malloc.h.
8756 * mem-break.c: Remove include of malloc.h.
8757 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8758
8b034a19 87592010-09-01 Joel Brobecker <brobecker@adacore.com>
8760
8761 * Makefile.in (memmem.o): Build with -Wno-error.
8762
87632010-09-01 Joel Brobecker <brobecker@adacore.com>
8764
8765 * utils.c (xsnprintf): Make non-static.
8766 * server.h: Add xsnprintf declaration.
8767 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8768 replace calls to snprintf by calls to xsnprintf throughout.
8769
87702010-09-01 Joel Brobecker <brobecker@adacore.com>
8771
8772 * configure.ac: Add configure check for alloca.
8773 * configure, config.in: Regenerate.
8774 * server.h: Include alloca.h if it exists.
8775 * gdbreplay.c: Include alloca.h if it exists.
8776
1a981360
PA
87772010-08-28 Pedro Alves <pedro@codesourcery.com>
8778
8779 * linux-low.c (__SIGRTMIN): Define if not already defined.
8780 (linux_create_inferior): Check for __ANDROID__ rather than
8781 __SIGRTMIN.
8782 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8783 are already deferred.
8784 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8785 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8786 stopped and already has a pending signal to report.
8787 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8788 a pending signal to report or is moving out of a jump pad.
8789 (linux_init_signals): Check for __ANDROID__ rather than
8790 __SIGRTMIN.
8791
b4d51a55
PA
87922010-08-28 Pedro Alves <pedro@codesourcery.com>
8793
8794 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8795 debug_threads check. Avoid a linear search when not doing debug
8796 output.
8797
ec48365d
PA
87982010-08-27 Pedro Alves <pedro@codesourcery.com>
8799
8800 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8801 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8802 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8803 (process_event): Change local fd's type to gdb_fildes_t.
8804 (create_file_handler): Adjust prototype.
8805 (delete_file_handler): Adjust prototype.
8806 (handle_file_event): Adjust prototype. Use pfildes.
8807 (create_file_event): Adjsut prototype.
8808 * remote-utils.c (remote_desc, listen_desc): Change type to
8809 gdb_fildes_t.
8810 * server.h: New gdb_fildes_t typedef.
8811 [USE_WIN32API]: Include winsock2.h.
8812 (delete_file_handler, add_file_handler): Adjust prototypes.
8813 (pfildes): Declare.
8814 * utils.c (pfildes): New.
8815
854d88f0
PA
88162010-08-27 Pedro Alves <pedro@codesourcery.com>
8817
8818 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8819 * configure: Regenerate.
8820
0146f85b
PA
88212010-08-27 Pedro Alves <pedro@codesourcery.com>
8822
8823 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8824 (linux_done_accessing_memory): ... this.
8825 (linux_target_ops): Adjust.
8826 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8827 * nto-low.c (nto_target_ops): Adjust comment.
8828 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8829 * spu-low.c (spu_target_ops): Adjust comment.
8830 * target.h (target_ops): Rename unprepare_to_access_memory field
8831 to done_accessing_memory.
8832 (unprepare_to_access_memory): Rename to ...
8833 (done_accessing_memory): ... this.
8834
90d74c30
PA
88352010-08-26 Pedro Alves <pedro@codesourcery.com>
8836
8837 * linux-low.c (linux_prepare_to_access_memory): New.
8838 (linux_unprepare_to_access_memory): New.
8839 (linux_target_ops): Install them.
8840 * server.c (read_memory): Rename to ...
8841 (gdb_read_memory): ... this. Use
8842 prepare_to_access_memory/prepare_to_access_memory.
8843 (write_memory): Rename to ...
8844 (gdb_write_memory): ... this. Use
8845 prepare_to_access_memory/prepare_to_access_memory.
8846 (handle_search_memory_1): Adjust.
8847 (process_serial_event): Adjust.
8848 * target.h (struct target_ops): New fields
8849 prepare_to_access_memory and unprepare_to_access_memory.
8850 (prepare_to_access_memory, unprepare_to_access_memory): New.
8851 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8852 prepare_to_access_memory/prepare_to_access_memory.
8853 * nto-low.c (nto_target_ops): Adjust.
8854 * spu-low.c (spu_target_ops): Adjust.
8855 * win32-low.c (win32_target_ops): Adjust.
8856
fd467969
PA
88572010-08-26 Pedro Alves <pedro@codesourcery.com>
8858
8859 * Makefile.in (WARN_CFLAGS): Get it from configure.
8860 (WERROR_CFLAGS): New.
8861 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8862 * configure.ac: Introduce --enable-werror, which adds -Werror to
8863 the compiler command line. Enabled by default. Disable with
8864 --disable-werror. Add -Wdeclaration-after-statement
8865 Wpointer-arith and -Wformat-nonliteral to warning flags.
8866 * configure: Regenerate.
8867
331e2f5f
PA
88682010-08-26 Pedro Alves <pedro@codesourcery.com>
8869
8870 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8871
e581f2b4
PA
88722010-08-26 Pedro Alves <pedro@codesourcery.com>
8873
8874 * gdbreplay.c (remote_error): New.
8875 (gdbchar): New.
8876 (expect): Use gdbchar. Check for error reading from GDB.
8877 Clarify sync error output.
8878 (play): Check for errors writing to GDB.
8879 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8880 * remote-utils.c (getpkt): Check for errors writing to the remote
8881 descriptor.
8882
3c11dd79
PA
88832010-08-25 Pedro Alves <pedro@codesourcery.com>
8884
8885 * linux-low.c (linux_wait_1): Move non-debugging code out of
8886 `debug_threads' control.
8887
d20a8ad9
PA
88882010-08-25 Pedro Alves <pedro@codesourcery.com>
8889
8890 * linux-low.c (linux_wait_1): Don't set last_status here.
8891 * server.c (push_event, queue_stop_reply_callback): Assert we're
8892 not pushing a TARGET_WAITKIND_IGNORE event.
8893 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8894 (myresume, handle_target_event): Set the thread's last_resume_kind
8895 and last_status from the target returned status.
8896
964e4306
PA
88972010-08-25 Pedro Alves <pedro@codesourcery.com>
8898
8899 PR threads/10729
8900
8901 * linux-x86-low.c (update_debug_registers_callback): New.
8902 (i386_dr_low_set_addr): Use it.
8903 (i386_dr_low_get_addr): New.
8904 (i386_dr_low_set_control): Use update_debug_registers_callback.
8905 (i386_dr_low_get_control): New.
8906 (i386_dr_low_get_status): Adjust.
8907 * linux-low.c (linux_stop_lwp): New.
8908 * linux-low.h (linux_stop_lwp): Declare.
8909
8910 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8911 argument instead of a i386_debug_reg_state.
8912 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8913 a i386_debug_reg_state.
8914 (i386_insert_aligned_watchpoint): Adjust.
8915 (i386_remove_aligned_watchpoint): Adjust.
8916 (i386_low_stopped_data_address): Read the debug registers from the
8917 inferior instead of from the mirrors.
8918 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8919 (i386_dr_low_get_addr): Declare.
8920 (i386_dr_low_get_control): Declare.
8921 (i386_dr_low_get_status): Change prototype.
8922
8923 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8924 (i386_dr_low_get_addr): New.
8925 (i386_dr_low_get_control): New.
8926 (i386_dr_low_get_status): Adjust prototype. Return
8927 dr_status_mirror.
8928 (i386_initial_stuff): Clear dr_status_mirror and
8929 dr_control_mirror.
8930 (i386_get_thread_context): Adjust.
8931 (i386_set_thread_context): Adjust.
8932 (i386_thread_added): Adjust.
8933
5f21a75b
PA
89342010-08-24 Pedro Alves <pedro@codesourcery.com>
8935
8936 * linux-low.h (linux_thread_area): Delete declaration.
8937
3e4c1235
TS
89382010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8939
8940 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8941 after its termination.
8942
1971b033
PA
89432010-08-09 Pedro Alves <pedro@codesourcery.com>
8944
8945 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8946 (gdb_wants_all_stopped): Delete.
8947 (linux_wait_1): Don't call them.
8948 * server.c (handle_v_cont): Tag all threads as want-stopped.
8949 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8950 stopped as "client-wants-stopped".
8951
310444ac
PA
89522010-07-31 Pedro Alves <pedro@codesourcery.com>
8953
8954 * Makefile.in (signals_h): New.
8955 (server_h): Depend on it.
8956 (server.o): Don't depend on $(signals_def).
8957 (signals.o): Depend on $(signals_def).
8958
a19cae16
JK
89592010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8960
8961 * Makefile.in (signals_def): New.
8962 (server_h): Append include/gdb/signals.h and signals_def.
8963 (server.o): Append signals_def.
8964
30d50328
JK
89652010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8966
8967 * server.c (handle_target_event): Use target_signal_to_host for
8968 resume_info.sig initialization.
8969 * target.h (struct thread_resume) <sig>: New comment.
8970
5c3216e2
OS
89712010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8972
c6f46ca0
OS
8973 * server.c (handle_query): strcpy() the returned string from paddress()
8974 instead of sprintf().
5c3216e2
OS
8975 * utils.c (paddress): Return phex_nz().
8976
6bd31874
JB
89772010-07-07 Joel Brobecker <brobecker@adacore.com>
8978
8979 * server.c (handle_v_cont): Call mourn_inferior if process
8980 just exited.
8981 (myresume): Likewise.
8982
0fb4aa4b
PA
89832010-07-01 Pedro Alves <pedro@codesourcery.com>
8984
8985 Static tracepoints, and integration with UST.
8986
8987 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8988 * mem-break.c (uninsert_all_breakpoints)
8989 (reinsert_all_breakpoints): New.
8990 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8991 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8992 (gdb_agent_ust_loaded, helper_thread_id)
8993 (gdb_agent_helper_thread_id): New macros.
8994 (struct ipa_sym_addresses): Add addr_ust_loaded,
8995 addr_helper_thread_id, addr_cmd_buf.
8996 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8997 (in_process_agent_loaded_ust): New.
8998 (write_e_ust_not_loaded): New.
8999 (maybe_write_ipa_ust_not_loaded): New.
9000 (struct collect_static_trace_data_action): New.
9001 (enum tracepoint_type) <static_tracepoint>: New.
9002 (struct tracepoint) <handle>: Mention static tracepoints.
9003 (struct static_tracepoint_ctx): New.
9004 (CMD_BUF_SIZE): New.
9005 (add_tracepoint_action): Handle static tracepoint actions.
9006 (unprobe_marker_at): New.
9007 (clear_installed_tracepoints): Handle static tracepoints.
9008 (cmd_qtdp): Handle static tracepoints.
9009 (probe_marker_at): New.
9010 (cmd_qtstart): Handle static tracepoints.
9011 (response_tracepoint): Handle static tracepoints.
9012 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9013 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9014 (get_context_regcache): Handle static tracepoints.
9015 (do_action_at_tracepoint): Handle static tracepoint actions.
9016 (traceframe_find_block_type): Handle static trace data blocks.
9017 (traceframe_read_sdata): New.
9018 (download_tracepoints): Download static tracepoint actions.
9019 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9020 (GDB_PROBE_NAME): New.
9021 (ust_ops): New.
9022 (GET_UST_SYM): New.
9023 (USTF): New.
9024 (dlsym_ust): New.
9025 (ust_marker_to_static_tracepoint): New.
9026 (gdb_probe): New.
9027 (collect_ust_data_at_tracepoint): New.
9028 (gdb_ust_probe): New.
9029 (UNIX_PATH_MAX, SOCK_DIR): New.
9030 (gdb_ust_connect_sync_socket): New.
9031 (resume_thread, stop_thread): New.
9032 (run_inferior_command): New.
9033 (init_named_socket): New.
9034 (gdb_ust_socket_init): New.
9035 (cstr_to_hexstr): New.
9036 (next_st): New.
9037 (first_marker, next_marker): New.
9038 (response_ust_marker): New.
9039 (cmd_qtfstm, cmd_qtsstm): New.
9040 (unprobe_marker_at, probe_marker_at): New.
9041 (cmd_qtstmat, gdb_ust_thread): New.
9042 (gdb_ust_init): New.
9043 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9044 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9045 (ST_REGENTRY): New.
9046 (x86_64_st_collect_regmap): New.
9047 (X86_64_NUM_ST_COLLECT_GREGS): New.
9048 (AMD64_RIP_REGNUM): New.
9049 (supply_static_tracepoint_registers): New.
9050 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9051 (ST_REGENTRY): New.
9052 (i386_st_collect_regmap): New.
9053 (i386_NUM_ST_COLLECT_GREGS): New.
9054 (supply_static_tracepoint_registers): New.
9055 * server.c (handle_query): Handle qXfer:statictrace:read.
9056 <qSupported>: Report support for StaticTracepoints, and
9057 qXfer:statictrace:read features.
9058 * server.h (traceframe_read_sdata)
9059 (supply_static_tracepoint_registers): Declare.
9060 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9061 (unpack_varlen_hex): Include in IPA build.
9062 * Makefile.in (ustlibs, ustinc): New.
9063 (IPA_OBJS): Add remote-utils-ipa.o.
9064 ($(IPA_LIB)): Link -ldl and -lpthread.
9065 (UST_CFLAGS): New.
9066 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9067 * config.in, configure: Regenerate.
9068
9e4344e5
PA
90692010-06-20 Ian Lance Taylor <iant@google.com>
9070 Pedro Alves <pedro@codesourcery.com>
9071
9072 * linux-x86-low.c (always_true): Delete.
9073 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9074 trying to fool the compiler with always_true.
9075
c6beb2cb
PA
90762010-06-20 Pedro Alves <pedro@codesourcery.com>
9077
9078 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9079 conditions in gdbserver.
9080
d2ed6730
UW
90812010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9082
9083 * spu-low.c (spu_read_memory): Wrap around local store limit.
9084 (spu_write_memory): Likewise.
9085
4e29fb54
PA
90862010-06-15 Pedro Alves <pedro@codesourcery.com>
9087
9088 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9089 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9090 LONGEST uses.
9091 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9092 uses.
9093 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9094 uses with LONGEST uses.
9095
6a271cae
PA
90962010-06-14 Stan Shebs <stan@codesourcery.com>
9097 Pedro Alves <pedro@codesourcery.com>
9098
9099 Bytecode compiler.
9100
9101 * linux-x86-low.c: Include limits.h.
9102 (add_insns): New.
9103 (always_true): New.
9104 (EMIT_ASM): New.
9105 (EMIT_ASM32): New.
9106 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9107 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9108 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9109 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9110 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9111 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9112 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9113 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9114 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9115 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9116 (amd64_emit_void_call_2): New.
9117 (amd64_emit_ops): New.
9118 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9119 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9120 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9121 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9122 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9123 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9124 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9125 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9126 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9127 (i386_emit_stack_adjust, i386_emit_int_call_1)
9128 (i386_emit_void_call_2): New.
9129 (i386_emit_ops): New.
9130 (x86_emit_ops): New.
9131 (the_low_target): Install x86_emit_ops.
9132 * server.h (struct emit_ops): New.
9133 (get_raw_reg_func_addr): Declare.
9134 (current_insn_ptr, emit_error): Declare.
9135 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9136 (set_trace_state_variable_value): New defines.
9137 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9138 addr_get_trace_state_variable_value and
9139 addr_set_trace_state_variable_value.
9140 (symbol_list): New fields for get_raw_reg,
9141 get_trace_state_variable_value and set_trace_state_variable_value.
9142 (condfn): New typedef.
9143 (struct tracepoint): New field `compiled_cond'.
9144 (do_action_at_tracepoint): Clear compiled_cond.
9145 (get_trace_state_variable_value, set_trace_state_variable_value):
9146 Export in the IPA.
9147 (condition_true_at_tracepoint): If there's a compiled condition,
9148 run that.
9149 (current_insn_ptr, emit_error): New globals.
9150 (struct bytecode_address): New.
9151 (get_raw_reg_func_addr): New.
9152 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9153 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9154 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9155 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9156 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9157 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9158 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9159 (compile_tracepoint_condition, compile_bytecodes): New.
9160 * target.h (emit_ops): Forward declare.
9161 (struct target_ops): New field emit_ops.
9162 (target_emit_ops): New.
9163 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9164 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9165 * linux-low.c (linux_emit_ops): New.
9166 (linux_target_ops): Install it.
9167 * linux-low.h (struct linux_target_ops): New field emit_ops.
9168
92b72907
UW
91692010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9170
9171 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9172 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9173
fa593d66
PA
91742010-06-01 Pedro Alves <pedro@codesourcery.com>
9175 Stan Shebs <stan@codesourcery.com>
9176
9177 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9178 (all): Depend on $(extra_libraries).
9179 (install-only): Install the IPA.
9180 (IPA_OBJS, IPA_LIB): New.
9181 (clean): Remove the IPA lib.
9182 (IPAGENT_CFLAGS): New.
9183 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9184 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9185 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9186 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9187 * configure.ac: Check for atomic builtins support in the compiler.
9188 (IPA_DEPFILES, extra_libraries): Define.
9189 * configure.srv (ipa_obj): Add description.
9190 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9191 (i[34567]86-*-linux*): Set ipa_obj.
9192 (x86_64-*-linux*): Set ipa_obj.
9193 * linux-low.c (stabilizing_threads): New.
9194 (supports_fast_tracepoints): New.
9195 (linux_detach): Stabilize threads before detaching.
9196 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9197 the lwp is either not stabilizing, or is moving out of a jump pad.
9198 (linux_fast_tracepoint_collecting): New.
9199 (maybe_move_out_of_jump_pad): New.
9200 (enqueue_one_deferred_signal): New.
9201 (dequeue_one_deferred_signal): New.
9202 (linux_wait_for_event_1): If moving out of a jump pad, defer
9203 pending signals to later.
9204 (linux_stabilize_threads): New.
9205 (linux_wait_1): Check if threads need moving out of jump pads, and
9206 do it if so.
9207 (stuck_in_jump_pad_callback): New.
9208 (move_out_of_jump_pad_callback): New.
9209 (lwp_running): New.
9210 (linux_resume_one_lwp): Handle moving out of jump pads.
9211 (linux_set_resume_request): Dequeue deferred signals.
9212 (need_step_over_p): Also step over fast tracepoint jumps.
9213 (start_step_over): Also uninsert fast tracepoint jumps.
9214 (finish_step_over): Also reinsert fast tracepoint jumps.
9215 (linux_install_fast_tracepoint_jump): New.
9216 (linux_target_ops): Install linux_stabilize_threads and
9217 linux_install_fast_tracepoint_jump_pad.
9218 * linux-low.h (linux_target_ops) <get_thread_area,
9219 install_fast_tracepoint_jump_pad>: New fields.
9220 (struct lwp_info) <collecting_fast_tracepoint,
9221 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9222 (linux_get_thread_area): Declare.
9223 * linux-x86-low.c (jump_insn): New.
9224 (x86_get_thread_area): New.
9225 (append_insns): New.
9226 (push_opcode): New.
9227 (amd64_install_fast_tracepoint_jump_pad): New.
9228 (i386_install_fast_tracepoint_jump_pad): New.
9229 (x86_install_fast_tracepoint_jump_pad): New.
9230 (the_low_target): Install x86_get_thread_area and
9231 x86_install_fast_tracepoint_jump_pad.
9232 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9233 (struct fast_tracepoint_jump): New.
9234 (fast_tracepoint_jump_insn): New.
9235 (fast_tracepoint_jump_shadow): New.
9236 (find_fast_tracepoint_jump_at): New.
9237 (fast_tracepoint_jump_here): New.
9238 (delete_fast_tracepoint_jump): New.
9239 (set_fast_tracepoint_jump): New.
9240 (uninsert_fast_tracepoint_jumps_at): New.
9241 (reinsert_fast_tracepoint_jumps_at): New.
9242 (set_breakpoint_at): Use write_inferior_memory.
9243 (uninsert_raw_breakpoint): Use write_inferior_memory.
9244 (check_mem_read): Mask out fast tracepoint jumps.
9245 (check_mem_write): Mask out fast tracepoint jumps.
9246 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9247 (set_fast_tracepoint_jump): Declare.
9248 (delete_fast_tracepoint_jump)
9249 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9250 (reinsert_fast_tracepoint_jumps_at): Declare.
9251 * regcache.c: Don't compile many functions when building the
9252 in-process agent library.
9253 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9254 the register buffer in the heap.
9255 (free_register_cache): If the register buffer isn't owned by the
9256 regcache, don't free it.
9257 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9258 pre-existing register caches.
9259 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9260 type.
9261 (convert_ascii_to_int): : Constify `from' parameter type.
9262 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9263 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9264 the needed buffer in-place.
9265 (relocate_instruction): New.
9266 * server.c (handle_query) <qSymbols>: If the target supports
9267 tracepoints, give it a chance of looking up symbols. Report
9268 support for fast tracepoints.
9269 (handle_status): Stabilize threads.
9270 (process_serial_event): Adjust.
9271 * server.h (struct fast_tracepoint_jump): Forward declare.
9272 (struct process_info) <fast_tracepoint_jumps>: New field.
9273 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9274 (decode_X_packet, decode_M_packet): Adjust.
9275 (relocate_instruction): Declare.
9276 (in_process_agent_loaded): Declare.
9277 (tracepoint_look_up_symbols): Declare.
9278 (struct fast_tpoint_collect_status): Declare.
9279 (fast_tracepoint_collecting): Declare.
9280 (force_unlock_trace_buffer): Declare.
9281 (handle_tracepoint_bkpts): Declare.
9282 (initialize_low_tracepoint)
9283 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9284 * target.h (struct target_ops) <stabilize_threads,
9285 install_fast_tracepoint_jump_pad>: New fields.
9286 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9287 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9288 [HAVE_STDINT_H]: Include stdint.h.
9289 (trace_debug_1): Rename to ...
9290 (trace_vdebug): ... this.
9291 (trace_debug): Rename to ...
9292 (trace_debug_1): ... this. Add `level' parameter.
9293 (trace_debug): New.
9294 (ATTR_USED, ATTR_NOINLINE): New.
9295 (IP_AGENT_EXPORT): New.
9296 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9297 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9298 (about_to_request_buffer_space, trace_buffer_is_full)
9299 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9300 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9301 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9302 (traceframe_write_count, traceframes_created)
9303 (trace_state_variables)
9304 New renaming defines.
9305 (struct ipa_sym_addresses): New.
9306 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9307 (symbol_list): New.
9308 (ipa_sym_addrs): New.
9309 (all_tracepoint_symbols_looked_up): New.
9310 (in_process_agent_loaded): New.
9311 (write_e_ipa_not_loaded): New.
9312 (maybe_write_ipa_not_loaded): New.
9313 (tracepoint_look_up_symbols): New.
9314 (debug_threads) [IN_PROCESS_AGENT]: New.
9315 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9316 (UNKNOWN_SIDE_EFFECTS): New.
9317 (stop_tracing): New.
9318 (flush_trace_buffer): New.
9319 (stop_tracing_bkpt): New.
9320 (flush_trace_buffer_bkpt): New.
9321 (read_inferior_integer): New.
9322 (read_inferior_uinteger): New.
9323 (read_inferior_data_pointer): New.
9324 (write_inferior_data_pointer): New.
9325 (write_inferior_integer): New.
9326 (write_inferior_uinteger): New.
9327 (struct collect_static_trace_data_action): Delete.
9328 (enum tracepoint_type): New.
9329 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9330 <actions_str, step_actions, step_actions_str>: Only include in
9331 GDBserver.
fa593d66
PA
9332 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9333 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9334 (tracepoints): Use IP_AGENT_EXPORT.
9335 (last_tracepoint): Don't include in the IPA.
9336 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9337 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9338 (alloced_trace_state_variables): New.
9339 (trace_state_variables): Use IP_AGENT_EXPORT.
9340 (traceframe_t): Delete unused variable.
9341 (circular_trace_buffer): Don't include in the IPA.
9342 (trace_buffer_start): Delete.
9343 (struct trace_buffer_control): New.
9344 (trace_buffer_free): Delete.
9345 (struct ipa_trace_buffer_control): New.
9346 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9347 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9348 New.
9349 (trace_buffer_ctrl): New.
9350 (TRACE_BUFFER_CTRL_CURR): New.
9351 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9352 Reimplement as macros.
9353 (trace_buffer_wrap): Delete.
9354 (traceframe_write_count, traceframe_read_count)
9355 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9356 (struct tracepoint_hit_ctx) <type>: New field.
9357 (struct fast_tracepoint_ctx): New.
9358 (memory_barrier): New.
9359 (cmpxchg): New.
9360 (record_tracepoint_error): Update atomically in the IPA.
9361 (clear_inferior_trace_buffer): New.
9362 (about_to_request_buffer_space): New.
9363 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9364 updating the same buffer.
9365 (add_tracepoint): Default the tracepoint's type to trap
9366 tracepoint, and orig_size to -1.
9367 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9368 internal variables.
9369 (create_trace_state_variable): New parameter `gdb'. Handle it.
9370 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9371 (cmd_qtdp): Handle fast tracepoints.
9372 (cmd_qtdv): Adjust.
9373 (max_jump_pad_size): New.
9374 (gdb_jump_pad_head): New.
9375 (get_jump_space_head): New.
9376 (claim_jump_space): New.
9377 (sort_tracepoints): New.
9378 (MAX_JUMP_SIZE): New.
9379 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9380 IPA.
9381 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9382 support. Upload fast traceframes, and delete internal IPA
9383 breakpoints.
9384 (stop_tracing_handler): New.
9385 (flush_trace_buffer_handler): New.
9386 (cmd_qtstop): Upload fast tracepoints.
9387 (response_tracepoint): Handle fast tracepoints.
9388 (tracepoint_finished_step): Upload fast traceframes. Set the
9389 tracepoint hit context's tracepoint type.
9390 (handle_tracepoint_bkpts): New.
9391 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9392 type. Add comment about fast tracepoints.
9393 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9394 non-existing action_str field.
9395 (get_context_regcache): Handle fast tracepoints.
9396 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9397 to the regcache.
9398 (fast_tracepoint_from_jump_pad_address): New.
9399 (fast_tracepoint_from_ipa_tpoint_address): New.
9400 (collecting_t): New.
9401 (force_unlock_trace_buffer): New.
9402 (fast_tracepoint_collecting): New.
9403 (collecting): New.
9404 (gdb_collect): New.
9405 (write_inferior_data_ptr): New.
9406 (target_tp_heap): New.
9407 (target_malloc): New.
9408 (download_agent_expr): New.
9409 (UALIGN): New.
9410 (download_tracepoints): New.
9411 (download_trace_state_variables): New.
9412 (upload_fast_traceframes): New.
9413 (IPA_FIRST_TRACEFRAME): New.
9414 (IPA_NEXT_TRACEFRAME_1): New.
9415 (IPA_NEXT_TRACEFRAME): New.
9416 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9417 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9418 (gdb_jump_pad_buffer_end): New.
9419 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9420 (initialize_tracepoint): Adjust.
9421 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9422 buffer. Initialize the low module.
9423 * utils.c (PREFIX, TOOLNAME): New.
9424 (malloc_failure): Use PREFIX.
9425 (error): In the IPA, an error causes an exit.
9426 (fatal, warning): Use PREFIX.
9427 (internal_error): Use TOOLNAME.
9428 (NUMCELLS): Increase to 10.
9429 * configure, config.in: Regenerate.
9430
d149dd1d
PA
94312010-06-01 Pedro Alves <pedro@codesourcery.com>
9432
9433 * server.c (handle_query) <qSupported>: Do two passes over the
9434 qSupported string to avoid nesting strtok.
9435
f6528abd
JK
94362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9437
9438 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9439 (CDEPS): New.
9440 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9441 -Wl,--dynamic-list.
9442 * configure: Regenerate.
9443 * proc-service.list: New.
9444
ca2a87a0
JK
94452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9446
9447 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9448 New comment.
9449
363a6e9f
OS
94502010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9451
9452 * gdbreplay.c (remote_open): Check error return from socket() call by
9453 its equality to -1 not by it being negative.
9454 * remote-utils.c (remote_open): Likewise.
9455
d23b6cb1
PA
94562010-05-23 Pedro Alves <pedro@codesourcery.com>
9457
9458 * config.h: Regenerate.
9459
28d3cf85
MK
94602010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9461
9462 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9463 doesn't provide PTRACE_GET_THREAD_AREA.
9464
fea36a59
MK
94652010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9466
9467 * linux-m68k-low.c: Include <asm/ptrace.h>
9468 (ps_get_thread_area): Implement.
9469
24b066ba
DE
94702010-05-03 Doug Evans <dje@google.com>
9471
9472 * event-loop.c (struct callback_event): New struct.
9473 (callback_list): New global.
9474 (append_callback_event, delete_callback_event): New functions.
9475 (process_callback): New function.
9476 (start_event_loop): Call it.
9477 * remote-utils.c (NOT_SCHEDULED): Define.
9478 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9479 moved out of readchar.
9480 (readchar): Rewrite. Call reschedule before returning.
9481 (reset_readchar): New function.
9482 (remote_close): Call it.
9483 (process_remaining, reschedule): New functions.
9484 * server.h (callback_handler_func): New typedef.
9485 (append_callback_event, delete_callback_event): Declare.
9486
9836d6ea
PA
94872010-05-03 Pedro Alves <pedro@codesourcery.com>
9488
9489 * proc-service.c (ps_pglobal_lookup): Use
9490 thread_db_look_up_one_symbol.
9491 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9492 parameter. Use it instead of all_symbols_looked_up.
9493 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9494 field.
9495 (all_symbols_looked_up): Don't declare.
9496 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9497 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9498 field.
9499 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9500 Set all_symbols_looked_up here.
9501 (thread_db_look_up_one_symbol): New.
9502 (thread_db_get_tls_address): Adjust.
9503 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9504 thread_db object on the heap, and tentatively set it in the
9505 process structure.
9506 (thread_db_init): Don't set all_symbols_looked_up here.
9507 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9508
7984d532
PA
95092010-05-03 Pedro Alves <pedro@codesourcery.com>
9510
9511 * linux-low.c (linux_kill, linux_detach): Adjust.
9512 (status_pending_p_callback): Remove redundant statement. Check
9513 for !TARGET_WAITIKIND_IGNORE, instead of
9514 TARGET_WAITKIND_STOPPED.
9515 (handle_tracepoints): Make sure LWP is locked. Adjust.
9516 (linux_wait_for_event_1): Adjust.
9517 (linux_cancel_breakpoints): New.
9518 (unsuspend_one_lwp): New.
9519 (unsuspend_all_lwps): New.
9520 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9521 (send_sigstop_callback): Change return type to int, add new
9522 `except' parameter and handle it.
9523 (suspend_and_send_sigstop_callback): New.
9524 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9525 pass them down. If SUSPEND, also increment the lwp's suspend
9526 count.
9527 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9528 (need_step_over_p): Don't consider suspended LWPs.
9529 (start_step_over): Adjust.
9530 (proceed_one_lwp): Change return type to int, add new `except'
9531 parameter and handle it.
9532 (unsuspend_and_proceed_one_lwp): New.
9533 (proceed_all_lwps): Use find_inferior instead of
9534 for_each_inferior.
9535 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9536 also decrement the suspend count of LWPs. Pass `except' down,
9537 instead of hacking its suspend count.
9538 (linux_pause_all): Add `freeze' parameter. Adjust.
9539 (linux_unpause_all): New.
9540 (linux_target_ops): Install linux_unpause_all.
9541 * server.c (handle_status): Adjust.
9542 * target.h (struct target_ops): New fields `unpause_all' and
9543 `cancel_breakpoints'. Add new parameter to `pause_all'.
9544 (pause_all): Add new `freeze' parameter.
9545 (unpause_all): New.
9546 (cancel_breakpoints): New.
9547 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9548 cancel breakpoints.
9549 (cmd_qtstart): Pause threads.
9550 (stop_tracing): Pause threads, and cancel breakpoints.
9551 * win32-low.c (win32_target_ops): Adjust.
9552
e471f25b
PA
95532010-05-03 Pedro Alves <pedro@codesourcery.com>
9554
9555 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9556 the inferior right away from here...
9557 (linux_wait_1): ... to here, and adjust to check the thread's
9558 last_resume_kind instead of the lwp's step or stop_expected flags.
9559
1915ef4f
PA
95602010-05-02 Pedro Alves <pedro@codesourcery.com>
9561
9562 * README: Use consistent `GDB' and `GDBserver' spellings.
9563
f9e39928
PA
95642010-05-02 Pedro Alves <pedro@codesourcery.com>
9565
9566 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9567 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9568 (linux_detach_one_lwp): Assume the lwp is stopped.
9569 (any_thread_of): Delete.
9570 (linux_detach): Stop all lwps here. Don't blindly delete all
9571 breakpoints.
9572 (delete_lwp_callback): New.
9573 (linux_mourn): Delete all lwps of the process that is gone.
9574 (linux_wait_1): Don't delete the last lwp of the process here.
9575 * mem-break.h (mark_breakpoints_out): Declare.
9576 * mem-break.c (mark_breakpoints_out): New.
9577 (free_all_breakpoints): Use it.
9578 * server.c (handle_target_event): If the process is gone, mark
9579 breakpoints out.
9580 * thread-db.c (struct thread_db) <create_bp>: New field.
9581 (thread_db_enable_reporting): Fix prototype. Store a thread event
9582 breakpoint reference in the thread_db struct.
9583 (thread_db_load_search): Clear the thread_db object.
9584 (try_thread_db_load_1): Ditto.
9585 (switch_to_process): New.
9586 (disable_thread_event_reporting): Use it.
9587 (remove_thread_event_breakpoints): New.
9588 (thread_db_detach, thread_db_mourn): Use it.
9589
1e7fc18c
PA
95902010-05-01 Pedro Alves <pedro@codesourcery.com>
9591
9592 * linux-low.c (linux_enable_event_reporting): New.
9593 (linux_wait_for_event_1, handle_extended_wait): Use it.
9594
02fc4de7
PA
95952010-04-30 Pedro Alves <pedro@codesourcery.com>
9596
9597 * linux-low.c (linux_kill_one_lwp, linux_kill)
9598 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9599 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9600 SIGSTOP even if the LWP is stopped.
9601 (send_sigstop_callback): New.
9602 (stop_all_lwps): Use send_sigstop_callback instead.
9603 (linux_resume_one_thread): Adjust.
9604 (proceed_one_lwp): Still proceed an LWP that the client has
9605 requested to stop, if we haven't reported it as stopped yet. Make
9606 sure that LWPs the client want stopped, have a pending SIGSTOP.
9607
bc3b5632
DE
96082010-04-26 Doug Evans <dje@google.com>
9609
ae1ada35
DE
9610 * server.c (handle_general_set): Make static.
9611
bc3b5632
DE
9612 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9613 Print received char after testing for error/eof instead of before.
9614 (input_interrupt): Tweak comment.
9615
65730243
DE
96162010-04-23 Doug Evans <dje@google.com>
9617
9618 * server.c (start_inferior): Print inferior argv if --debug.
9619
a8ae7dc0
AR
96202010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9621
9622 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9623 * nto-x86-low.c: Include server.h
9624
1c07cc19
PM
96252010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9626
9627 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9628 be consistent with other sources of this directory.
9629 (init_registers_amd64): Correct name of source file of this function
9630 in the comment.
9631
e0a61e09
PM
96322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9633
9634 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9635 64-bit executables.
9636
54709339
PM
96372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9638
9639 * win32-i386-low.c: Add 64-bit support.
9640 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9641 (init_registers_amd64): Declare.
9642 (mappings): Add 64-bit version of array.
9643 (init_windows_x86): New function.
9644 (the_low_target): Change init_arch field to init_windows_x86.
9645
e8f0053d
PM
96462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9647
9648 * win32-low.c: Adapt to support also 64-bit architecture.
9649 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9650 (get_image_name): Use SIZE_T type for local variable `done'.
9651 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9652 (toolhelp_get_dll_name): Idem.
9653 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9654 Use uintptr_t typecast to avoid warning.
9655 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9656 (handle_exception): Use phex_nz to avoid warning.
9657 (win32_wait): Remove unused local variable `process'.
9658
c481e77e
PM
96592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9660
9661 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9662 `amd64-avx.o'.
9663
12ea4b69
PM
96642010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9665
9666 * configure.ac: Use `ws2_32' library for srv_mingw.
9667 * configure: Regenerate.
9668 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9669 * remote-utils.c: Likewise.
9670
f6d1620c
L
96712010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9672
9673 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9674 if __x86_64__ is defined.
9675
8e642873
PM
96762010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9677
9678 * configure: Regenerate.
9679
711e434b
PM
96802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9681
9682 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9683 * target.h (target_ops): New get_tib_address field.
9684 * win32-low.h (win32_thread_info): Add thread_local_base field.
9685 * win32-low.c (child_add_thread): Add tlb argument.
9686 Set thread_local_base field to TLB.
9687 (get_child_debug_event): Adapt to child_add_thread change.
9688 (win32_get_tib_address): New function.
9689 (win32_target_ops): Set get_tib_address field to
9690 win32_get_tib_address.
9691 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9692
505106cd
PA
96932010-04-12 Pedro Alves <pedro@codesourcery.com>
9694
505106cd
PA
9695 * linux-low.c (linux_mourn): Also remove the process.
9696 * server.c (handle_target_event): Don't remove the process here.
9697 * nto-low.c (nto_mourn): New.
9698 (nto_target_ops): Install it.
9699 * spu-low.c (spu_mourn): New.
9700 (spu_target_ops): Install it.
9701 * win32-low.c (win32_mourn): New.
9702 (win32_target_ops): Install it.
9703
e8470a06
PA
97042010-04-12 Pedro Alves <pedro@codesourcery.com>
9705
9706 * server.h (buffer_xml_printf): Remove redundant `;'.
9707
45ba0d02
PA
97082010-04-12 Pedro Alves <pedro@codesourcery.com>
9709
9710 * regcache.c (set_register_cache): Invalidate regcaches before
9711 changing the register cache layout.
9712 (regcache_invalidate_one): Allow a NULL regcache.
9713 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9714 regcaches before changing the register cache layout or the target
9715 regsets.
9716
59e04013
L
97172010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9718
9719 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9720 variable warning on Linux/x86-64.
9721
8336d594
PA
97222010-04-11 Pedro Alves <pedro@codesourcery.com>
9723
9724 GDBserver disconnected tracing support.
9725
9726 * linux-low.c (linux_remove_process): Delete.
9727 (add_lwp): Don't set last_resume_kind here.
9728 (linux_kill): Use `mourn'.
9729 (linux_detach): Use `thread_db_detach', and `mourn'.
9730 (linux_mourn): New.
9731 (linux_attach_lwp_1): Adjust comment.
9732 (linux_attach): last_resume_kind moved the thread_info; adjust.
9733 (status_pending_p_callback): Adjust.
9734 (linux_wait_for_event_1): Adjust.
9735 (count_events_callback, select_singlestep_lwp_callback)
9736 (select_event_lwp_callback, cancel_breakpoints_callback)
9737 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9738 (proceed_one_lwp): Adjust.
9739 (linux_async): Add debug output.
9740 (linux_thread_stopped): New.
9741 (linux_pause_all): New.
9742 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9743 linux_pause_all.
9744 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9745 (thread_db_free): Delete declaration.
9746 (thread_db_detach, thread_db_mourn): Declare.
9747 * thread-db.c (thread_db_init): Use thread_db_mourn.
9748 (thread_db_free): Delete, split in two.
9749 (disable_thread_event_reporting): New.
9750 (thread_db_detach): New.
9751 (thread_db_mourn): New.
9752
9753 * server.h (struct thread_info) <last_resume_kind>: New field.
9754 <attached>: Add comment.
9755 <gdb_detached>: New field.
9756 (handler_func): Change return type to int.
9757 (handle_serial_event, handle_target_event): Ditto.
9758 (gdb_connected): Declare.
9759 (tracing): Delete.
9760 (disconnected_tracing): Declare.
9761 (stop_tracing): Declare.
9762
9763 * server.c (handle_query) <qSupported>: Report support for
9764 disconnected tracing.
9765 (queue_stop_reply_callback): Account for running threads.
9766 (gdb_wants_thread_stopped): New.
9767 (gdb_wants_all_threads_stopped): New.
9768 (gdb_reattached_process): New.
9769 (handle_status): Clear the `gdb_detached' flag of all processes.
9770 In all-stop, stop all threads.
9771 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9772 (process_serial_event): If the remote connection breaks, or if an
9773 exit was forced with "monitor exit", force an event loop exit.
9774 Handle disconnected tracing on detach.
9775 (handle_serial_event): Adjust.
9776 (handle_target_event): If GDB isn't connected, forward events back
9777 to the inferior, unless the last process exited, in which case,
9778 exit gdbserver. Adjust interface.
9779
9780 * remote-utils.c (remote_open): Don't block in accept. Instead
9781 register an event loop source on the listen socket file
9782 descriptor. Refactor bits into ...
9783 (listen_desc): ... this new global.
9784 (gdb_connected): ... this new function.
9785 (enable_async_notification): ... this new function.
9786 (handle_accept_event): ... this new function.
9787 (remote_close): Clear remote_desc.
9788
9789 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9790
9791 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9792 New fields.
9793 (mourn_inferior): Define.
9794 (target_process_qsupported): Avoid the dangling else problem.
9795 (thread_stopped): Define.
9796 (pause_all): Define.
9797 (target_waitstatus_to_string): Declare.
9798 * target.c (target_waitstatus_to_string): New.
9799
9800 * tracepoint.c (tracing): Make extern.
9801 (disconnected_tracing): New.
9802 (stop_tracing): Make extern. Handle tracing stops due to GDB
9803 disconnecting.
9804 (cmd_qtdisconnected): New.
9805 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9806 (handle_tracepoint_general_set): Handle QTDisconnected.
9807
9808 * event-loop.c (event_handler_func): Change return type to int.
9809 (process_event): Bail out if the event handler wants the event
9810 loop to stop.
9811 (handle_file_event): Ditto.
9812 (start_event_loop): Bail out if the event handler wants the event
9813 loop to stop.
9814
9815 * nto-low.c (nto_target_ops): Adjust.
9816 * spu-low.c (spu_wait): Don't remove the process here.
9817 (spu_target_ops): Adjust.
9818 * win32-low.c (win32_wait): Don't remove the process here.
9819 (win32_target_ops): Adjust.
9820
5d267c4c
PA
98212010-04-11 Pedro Alves <pedro@codesourcery.com>
9822
9823 * regcache.c (realloc_register_cache): Invalidate inferior's
9824 regcache before recreating it.
9825
623ccd72
PA
98262010-04-09 Pedro Alves <pedro@codesourcery.com>
9827
9828 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9829
219f2f23
PA
98302010-04-09 Stan Shebs <stan@codesourcery.com>
9831 Pedro Alves <pedro@codesourcery.com>
9832
9833 * server.h (LONGEST): New.
9834 (struct thread_info) <while_stepping>: New field.
9835 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9836 Declare.
9837 (initialize_tracepoint, handle_tracepoint_general_set)
9838 (handle_tracepoint_query, tracepoint_finished_step)
9839 (tracepoint_was_hit, release_while_stepping_state_list):
9840 (current_traceframe): Declare.
9841 * server.c (handle_general_set): Handle tracepoint packets.
9842 (read_memory): New.
9843 (write_memory): New.
9844 (handle_search_memory_1): Use read_memory.
9845 (handle_query): Report support for conditional tracepoints, trace
9846 state variables, and tracepoint sources. Handle tracepoint
9847 queries.
9848 (main): Initialize the tracepoints module.
9849 (process_serial_event): Handle traceframe reads/writes.
9850
9851 * linux-low.c (handle_tracepoints): New.
9852 (linux_wait_1): Call it.
9853 (linux_resume_one_lwp): Handle while-stepping.
9854 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9855 (linux_target_ops): Install them.
9856 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9857 New field.
9858 * linux-x86-low.c (x86_supports_tracepoints): New.
9859 (the_low_target). Install it.
9860
9861 * mem-break.h (delete_breakpoint): Declare.
9862 * mem-break.c (delete_breakpoint): Make external.
9863
9864 * target.h (struct target_ops): Add `supports_tracepoints',
9865 `read_pc', and `write_pc' fields.
9866 (target_supports_tracepoints): Define.
9867 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9868 (phex_nz): New.
9869
9870 * regcache.h (struct regcache) <registers_owned>: New field.
9871 (init_register_cache, regcache_cpy): Declare.
9872 (regcache_read_pc, regcache_write_pc): Declare.
9873 (register_cache_size): Declare.
9874 (supply_regblock): Declare.
9875 * regcache.c (init_register_cache): New.
9876 (new_register_cache): Use it.
9877 (regcache_cpy): New.
9878 (register_cache_size): New.
9879 (supply_regblock): New.
9880 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9881
219f2f23
PA
9882 * tracepoint.c: New.
9883
9884 * Makefile.in (OBS): Add tracepoint.o.
9885 (tracepoint.o): New rule.
9886
3a13a53b
L
98872010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9888
9889 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9890 (i386-mmx.o): New.
9891 (i386-mmx.c): Likewise.
9892 (i386-mmx-linux.o): Likewise.
9893 (i386-mmx-linux.c): Likewise.
9894
9895 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9896 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9897 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9898 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9899
9900 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9901 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9902 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9903
1570b33e
L
99042010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9905
9906 * Makefile.in (clean): Updated.
9907 (i386-avx.o): New.
9908 (i386-avx.c): Likewise.
9909 (i386-avx-linux.o): Likewise.
9910 (i386-avx-linux.c): Likewise.
9911 (amd64-avx.o): Likewise.
9912 (amd64-avx.c): Likewise.
9913 (amd64-avx-linux.o): Likewise.
9914 (amd64-avx-linux.c): Likewise.
9915
9916 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9917 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9918 (srv_amd64_regobj): Add amd64-avx.o.
9919 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9920 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9921 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9922 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9923 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9924 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9925 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9926
9927 * i387-fp.c: Include "i386-xstate.h".
9928 (i387_xsave): New.
9929 (i387_cache_to_xsave): Likewise.
9930 (i387_xsave_to_cache): Likewise.
9931 (x86_xcr0): Likewise.
9932
9933 * i387-fp.h (i387_cache_to_xsave): Likewise.
9934 (i387_xsave_to_cache): Likewise.
9935 (x86_xcr0): Likewise.
9936
9937 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9938 * linux-crisv32-low.c (target_regsets): Likewise.
9939 * linux-m68k-low.c (target_regsets): Likewise.
9940 * linux-mips-low.c (target_regsets): Likewise.
9941 * linux-ppc-low.c (target_regsets): Likewise.
9942 * linux-s390-low.c (target_regsets): Likewise.
9943 * linux-sh-low.c (target_regsets): Likewise.
9944 * linux-sparc-low.c (target_regsets): Likewise.
9945 * linux-xtensa-low.c (target_regsets): Likewise.
9946
9947 * linux-low.c: Include <sys/uio.h>.
9948 (regsets_fetch_inferior_registers): Support nt_type.
9949 (regsets_store_inferior_registers): Likewise.
9950 (linux_process_qsupported): New.
9951 (linux_target_ops): Add linux_process_qsupported.
9952
9953 * linux-low.h (regset_info): Add nt_type.
9954 (linux_target_ops): Add process_qsupported.
9955
9956 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9957 and <sys/uio.h>.
9958 (init_registers_i386_avx_linux): New.
9959 (init_registers_amd64_avx_linux): Likewise.
9960 (xmltarget_i386_linux_no_xml): Likewise.
9961 (xmltarget_amd64_linux_no_xml): Likewise.
9962 (PTRACE_GETREGSET): Likewise.
9963 (PTRACE_SETREGSET): Likewise.
9964 (x86_fill_xstateregset): Likewise.
9965 (x86_store_xstateregset): Likewise.
9966 (use_xml): Likewise.
9967 (x86_linux_update_xmltarget): Likewise.
9968 (x86_linux_process_qsupported): Likewise.
9969 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9970 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9971 init_registers_i386_linux here. Call
9972 x86_linux_update_xmltarget.
9973 (the_low_target): Add x86_linux_process_qsupported.
9974
9975 * server.c (handle_query): Call target_process_qsupported.
9976
9977 * target.h (target_ops): Add process_qsupported.
9978 (target_process_qsupported): New.
9979
fc7238bb
PA
99802010-04-03 Pedro Alves <pedro@codesourcery.com>
9981
9982 * inferiors.c (add_thread): Set last_status kind to
9983 TARGET_WAITKIND_IGNORE.
9984 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9985 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9986 (linux_wait_1): Move `thread' local definition to block that uses
9987 it. Don't NULL initialize `event_child'.
9988 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9989 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9990 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9991
bdabb078
PA
99922010-04-01 Pedro Alves <pedro@codesourcery.com>
9993
9994 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9995 an extended waitstatus, or by a watchpoint.
9996 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9997 thread was stepping or has been stopped by a watchpoint.
9998
d3bbe7a0
PA
99992010-04-01 Pedro Alves <pedro@codesourcery.com>
10000
10001 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10002 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10003 of another, then delete the previous, and validate all
10004 breakpoints.
10005 (validate_inserted_breakpoint): New.
10006 (delete_disabled_breakpoints): New.
10007 (validate_breakpoints): New.
10008 (check_mem_read): Validate breakpoints before trusting their
10009 shadow. Delete disabled breakpoints.
10010 (check_mem_write): Validate breakpoints before trusting they
10011 should be inserted. Delete disabled breakpoints.
10012 * mem-break.h (validate_breakpoints):
10013 * server.c (handle_query): Validate breakpoints when we see a
10014 qSymbol query.
10015
8b07ae33
PA
100162010-04-01 Pedro Alves <pedro@codesourcery.com>
10017
10018 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10019 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10020 if we could tell there's a GDB breakpoint at stop_pc.
10021 (need_step_over_p): Don't do a step over if we find a GDB
10022 breakpoint at the resume PC.
10023
10024 * mem-break.c (struct raw_breakpoint): New.
10025 (enum bkpt_type): New type `gdb_breakpoint'.
10026 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10027 fields. New field `raw'.
10028 (find_raw_breakpoint_at): New.
10029 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10030 breakpoint instead.
10031 (set_breakpoint_at): Adjust.
10032 (delete_raw_breakpoint): New.
10033 (release_breakpoint): New.
10034 (delete_breakpoint): Rename to...
10035 (delete_breakpoint_1): ... this. Add proc parameter. Use
10036 release_breakpoint. Return ENOENT.
10037 (delete_breakpoint): Reimplement.
10038 (find_breakpoint_at): Delete.
10039 (find_gdb_breakpoint_at): New.
10040 (delete_breakpoint_at): Delete.
10041 (set_gdb_breakpoint_at): New.
10042 (delete_gdb_breakpoint_at): New.
10043 (gdb_breakpoint_here): New.
10044 (set_reinsert_breakpoint): Use release_breakpoint.
10045 (uninsert_breakpoint): Rename to ...
10046 (uninsert_raw_breakpoint): ... this.
10047 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10048 (reinsert_raw_breakpoint): Change parameter type to
10049 raw_breakpoint.
10050 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10051 instead.
10052 (check_breakpoints): Adjust. Use release_breakpoint.
10053 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10054 (breakpoint_inserted_here): Ditto.
10055 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10056 Don't trust the breakpoint's shadow if it is not inserted.
10057 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10058 (delete_all_breakpoints): Adjust.
10059 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10060 use delete_breakpoint_1.
10061
10062 * mem-break.h (breakpoints_supported): Delete declaration.
10063 (set_gdb_breakpoint_at): Declare.
10064 (gdb_breakpoint_here): Declare.
10065 (delete_breakpoint_at): Delete.
10066 (delete_gdb_breakpoint_at): Declare.
10067
10068 * server.h (struct raw_breakpoint): Forward declare.
10069 (struct process_info): New field `raw_breakpoints'.
10070
10071 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10072 breakpoints.
10073
6bf5e0ba
PA
100742010-03-24 Pedro Alves <pedro@codesourcery.com>
10075
10076 * linux-low.c (status_pending_p_callback): Fix comment.
10077 (linux_wait_for_event_1): Move most of the internal breakpoint
10078 handling from here...
10079 (linux_wait_1): ... to here.
10080 (count_events_callback): New.
10081 (select_singlestep_lwp_callback): New.
10082 (select_event_lwp_callback): New.
10083 (cancel_breakpoints_callback): New.
10084 (select_event_lwp): New.
10085 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10086 priority to all LWPs that have had events that should be reported
10087 to the client. Cancel breakpoints when about to reporting the
10088 event to the client, not while stopping lwps. No longer cancel
10089 finished single-steps here.
10090 (cancel_finished_single_step): Delete.
10091 (cancel_finished_single_steps): Delete.
10092
414a389f
PA
100932010-03-24 Pedro Alves <pedro@codesourcery.com>
10094
10095 * mem-break.c (enum bkpt_type): New.
10096 (struct breakpoint): New field `type'.
10097 (set_breakpoint_at): Change return type to struct breakpoint
10098 pointer. Set type to `other_breakpoint' by default.
10099 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10100 in the breakpoint list.
10101 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10102 (reinsert_breakpoint): Rename to ...
10103 (reinsert_raw_breakpoint): ... this.
10104 (reinsert_breakpoints_at): Adjust.
10105 * mem-break.h (struct breakpoint): Declare.
10106 (set_breakpoint_at): Change return type to struct breakpoint
10107 pointer.
10108
2280c721
PA
101092010-03-24 Pedro Alves <pedro@codesourcery.com>
10110
10111 * server.c (handle_query): Assign, not compare.
10112
d50171e4
PA
101132010-03-24 Pedro Alves <pedro@codesourcery.com>
10114
10115 Teach linux gdbserver to step-over-breakpoints.
10116
10117 * linux-low.c (can_hardware_single_step): New.
10118 (supports_breakpoints): New.
10119 (handle_extended_wait): If stopping threads, read the stop pc of
10120 the new cloned LWP.
10121 (get_pc): New.
10122 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10123 low target doesn't support retrieving the PC.
10124 (add_lwp): Set last_resume_kind to resume_continue.
10125 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10126 (linux_attach): Don't clear stop_expected. Set the lwp's
10127 last_resume_kind to resume_stop.
10128 (linux_detach_one_lwp): Don't check for removed breakpoints.
10129 (check_removed_breakpoint): Delete.
10130 (status_pending_p): Rename to ...
10131 (status_pending_p_callback): ... this. Don't check for removed
10132 breakpoints. Don't consider threads that are stopped from GDB's
10133 perspective.
10134 (linux_wait_for_lwp): Always read the stop_pc here.
10135 (cancel_breakpoint): New.
10136 (step_over_bkpt): New global.
10137 (linux_wait_for_event_1): Implement stepping over breakpoints.
10138 (gdb_wants_lwp_stopped): New.
10139 (gdb_wants_all_stopped): New.
10140 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10141 single-step traps here. Store the thread's last reported target
10142 wait status.
10143 (send_sigstop): Don't clear stop_expected. Always set it,
10144 instead.
10145 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10146 (cancel_finished_single_step): New.
10147 (cancel_finished_single_steps): New.
10148 (wait_for_sigstop): Don't cancel finished single-step traps here.
10149 (linux_resume_one_lwp): Don't check for removed breakpoints.
10150 Don't set `step' on non-hardware step archs.
10151 (linux_set_resume_request): Ignore resume_stop requests if already
10152 stopping or stopped. Set the lwp's last_resume_kind.
10153 (resume_status_pending_p): Don't check for removed breakpoints.
10154 (need_step_over_p): New.
10155 (start_step_over): New.
10156 (finish_step_over): New.
10157 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10158 requests. Clear the thread's last reported target waitstatus.
10159 Don't use the `suspended' flag. Don't consider pending breakpoints.
10160 (linux_resume): Start a step-over if necessary.
10161 (proceed_one_lwp): New.
10162 (proceed_all_lwps): New.
10163 (unstop_all_lwps): New.
10164 * linux-low.h (struct lwp_info): Rewrite comment for the
10165 `suspended' flag. Add the `stop_pc' field. Delete the
10166 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10167 Add `'last_resume_kind' and `need_step_over' fields.
10168 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10169 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10170 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10171 (set_raw_breakpoint_at): New.
10172 (set_breakpoint_at): Rewrite to use it.
10173 (reinsert_breakpoint_handler): Delete.
10174 (set_reinsert_breakpoint): New.
10175 (reinsert_breakpoint_by_bp): Delete.
10176 (delete_reinsert_breakpoints): New.
10177 (uninsert_breakpoint): Rewrite.
10178 (uninsert_breakpoints_at): New.
10179 (reinsert_breakpoint): Rewrite.
10180 (reinsert_breakpoints_at): New.
10181 (check_breakpoints): Rewrite.
10182 (breakpoint_here): New.
10183 (breakpoint_inserted_here): New.
10184 (check_mem_read): Adjust.
10185 * mem-break.h (breakpoints_supported, breakpoint_here)
10186 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10187 (reinsert_breakpoint_by_bp): Delete declaration.
10188 (delete_reinsert_breakpoints): Declare.
10189 (reinsert_breakpoint): Delete declaration.
10190 (reinsert_breakpoints_at): Declare.
10191 (uninsert_breakpoint): Delete declaration.
10192 (uninsert_breakpoints_at): Declare.
10193 (check_breakpoints): Adjust prototype.
10194 * server.h: Adjust include order.
10195 (struct thread_info): Declare here. Add a `last_status' field.
10196
30ba68cb
MS
101972010-03-23 Michael Snyder <msnyder@vmware.com>
10198
10199 * server.c (crc32): New function.
10200 (handle_query): Add handling for 'qCRC:' request.
10201
b9a881c2
PA
102022010-03-23 Pedro Alves <pedro@codesourcery.com>
10203
10204 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10205 lwp had been stopped by a watchpoint.
10206
e92d13d5
PA
102072010-03-16 Pedro Alves <pedro@codesourcery.com>
10208
10209 * server.h (internal_error): Declare.
10210 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10211 * utils.c (internal_error): New function.
10212
64daa791
AS
102132010-03-15 Andreas Schwab <schwab@redhat.com>
10214
10215 * configure.srv: Fix typo setting srv_regobj.
10216
f52cd8cd
PA
102172010-03-15 Pedro Alves <pedro@codesourcery.com>
10218
10219 * linux-low.c (fetch_register): Avoid passing a non string literal
10220 format to `error'.
10221 (usr_store_inferior_registers): Ditto.
10222
93ae6fdc
PA
102232010-03-14 Pedro Alves <pedro@codesourcery.com>
10224
10225 * linux-low.c (linux_write_memory): Bail out early if peeking
10226 memory failed.
10227
c3adc08c
PA
102282010-03-14 Pedro Alves <pedro@codesourcery.com>
10229
10230 * linux-low.h (struct lwp_info): New fields
10231 `stopped_by_watchpoint' and `stopped_data_address'.
10232 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10233 here, and cache them in the lwp object.
10234 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10235 directly.
10236 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10237 field.
10238 (linux_stopped_by_watchpoint): Rewrite.
10239 (linux_stopped_data_address): Rewrite.
10240
bce522a2
PA
102412010-03-06 Simo Melenius <simo.melenius@iki.fi>
10242
10243 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10244 switching the current inferior, not before.
10245
90884b2b
L
102462010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10247
10248 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10249 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10250 i386-linux.c and amd64-linux.c.
10251 (reg-i386.o): Removed.
10252 (reg-i386.c): Likewise.
10253 (reg-i386-linux.o): Likewise.
10254 (reg-i386-linux.c): Likewise.
10255 (reg-x86-64.o): Likewise.
10256 (reg-x86-64.c): Likewise.
10257 (reg-x86-64-linux.o): Likewise.
10258 (reg-x86-64-linux.c): Likewise.
10259 (i386.o): New.
10260 (i386.c): Likewise.
10261 (i386-linux.o): Likewise.
10262 (i386-linux.c): Likewise.
10263 (amd64.o): Likewise.
10264 (amd64.c): Likewise.
10265 (amd64-linux.o): Likewise.
10266 (amd64-linux.c): Likewise.
10267
10268 * configure.srv (srv_i386_regobj): New.
10269 (srv_i386_linux_regobj): Likewise.
10270 (srv_amd64_regobj): Likewise.
10271 (srv_amd64_linux_regobj): Likewise.
10272 (srv_i386_32bit_xmlfiles): Likewise.
10273 (srv_i386_64bit_xmlfiles): Likewise.
10274 (srv_i386_xmlfiles): Likewise.
10275 (srv_amd64_xmlfiles): Likewise.
10276 (srv_i386_linux_xmlfiles): Likewise.
10277 (srv_amd64_linux_xmlfiles): Likewise.
10278 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10279 srv_xmlfiles to $srv_i386_xmlfiles.
10280 (i[34567]86-*-mingw32ce*): Likewise.
10281 (i[34567]86-*-mingw*): Likewise.
10282 (i[34567]86-*-nto*): Likewise.
10283 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10284 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10285 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10286 (x86_64-*-linux*): Likewise.
10287
10288 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10289 (init_registers_amd64_linux): New.
10290 (x86_arch_setup): Replace init_registers_x86_64_linux with
10291 init_registers_amd64_linux.
10292
193f13e6
MK
102932010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10294
10295 * configure.ac: Check for libdl. If it is not available link against
10296 static libthread_db.
10297 * configure: Regenerate.
10298
85d721b8
PA
102992010-02-22 Pedro Alves <pedro@codesourcery.com>
10300
10301 PR9605
10302
10303 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10304 handing a read watchpoint.
10305 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10306
6076632b
DE
103072010-02-12 Doug Evans <dje@google.com>
10308
10309 * linux-low.c (linux_supports_tracefork_flag): Document.
10310 (linux_look_up_symbols): Add comment.
10311
3327ccf7
L
103122010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10313
10314 * regcache.c (supply_register): Clear regcache if buf is NULL.
10315
0718675c 103162010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10317 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10318
10319 * inferiors.c (find_inferior): Add function documentation.
10320 (unloaded_dll): Handle the case where the unloaded dll has not
10321 been previously registered in the dll list.
10322
177321bd
DJ
103232010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10324
10325 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10326 (thumb2_breakpoint): New.
10327 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10328
2b009048
DJ
103292010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10330
10331 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10332 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10333 breakpoints.
10334
3be029c7
PA
103352010-01-21 Pedro Alves <pedro@codesourcery.com>
10336
10337 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10338
18f5de3b
JK
103392010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10340
10341 * linux-s390-low.c (s390_collect_ptrace_register)
10342 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10343
3743bb4f
DE
103442010-01-21 Doug Evans <dje@google.com>
10345
14ce3065
DE
10346 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10347 (PTRACE_ARG4_TYPE): New macro.
10348 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10349 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10350 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10351 (usr_store_inferior_registers): Ditto.
10352 (linux_read_memory, linux_write_memory): Ditto.
10353 (linux_test_for_tracefork): Ditto.
10354
3743bb4f
DE
10355 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10356 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10357
8b315be5
PA
103582010-01-21 Pedro Alves <pedro@codesourcery.com>
10359
10360 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10361 target.
10362
85492558
PA
103632010-01-21 Pedro Alves <pedro@codesourcery.com>
10364
10365 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10366 prototype to take a regcache. Adjust.
10367
442ea881
PA
103682010-01-20 Pedro Alves <pedro@codesourcery.com>
10369
10370 * regcache.h (struct thread_info): Forward declare.
10371 (struct regcache): New.
10372 (new_register_cache): Adjust prototype.
10373 (get_thread_regcache): Declare.
10374 (free_register_cache): Adjust prototype.
10375 (registers_to_string, registers_from_string): Ditto.
10376 (supply_register, supply_register_by_name, collect_register)
10377 (collect_register_as_string, collect_register_by_name): Ditto.
10378 * regcache.c (struct inferior_regcache_data): Delete.
10379 (get_regcache): Rename to ...
10380 (get_thread_regcache): ... this. Adjust. Switch inferior before
10381 fetching registers.
10382 (regcache_invalidate_one): Adjust.
10383 (regcache_invalidate): Fix prototype.
10384 (new_register_cache): Return the new register cache.
10385 (free_register_cache): Change prototype.
10386 (realloc_register_cache): Adjust.
10387 (registers_to_string): Change prototype to take a regcache. Adjust.
10388 (registers_from_string): Ditto.
10389 (register_data): Ditto.
10390 (supply_register): Ditto.
10391 (supply_register_by_name): Ditto.
10392 (collect_register): Ditto.
10393 (collect_register_as_string): Ditto.
10394 (collect_register_by_name): Ditto.
10395 * server.c (process_serial_event): Adjust.
10396 * linux-low.h (regset_fill_func, regset_store_func): Change
10397 prototype.
10398 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10399 Change prototype.
10400 * linux-low.c (get_stop_pc): Adjust.
10401 (check_removed_breakpoint): Adjust.
10402 (linux_wait_for_event): Adjust.
10403 (linux_resume_one_lwp): Adjust.
10404 (fetch_register): Add regcache parameter. Adjust.
10405 (usr_store_inferior_registers): Ditto.
10406 (regsets_fetch_inferior_registers): Ditto.
10407 (regsets_store_inferior_registers): Ditto.
10408 (linux_fetch_registers, linux_store_registers): Ditto.
10409 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10410 regcache. Adjust.
43aaf8b6
PA
10411 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10412 Ditto.
442ea881
PA
10413 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10414 prototype to take a regcache.
10415 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10416 * remote-utils.c (convert_ascii_to_int, outreg)
10417 (prepare_resume_reply): Change prototype to take a regcache.
10418 Adjust.
10419 * target.h (struct target_ops) <fetch_registers, store_registers>:
10420 Change prototype to take a regcache.
10421 (fetch_inferior_registers, store_inferior_registers): Change
10422 prototype to take a regcache. Adjust.
10423 * proc-service.c (ps_lgetregs): Adjust.
10424 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10425 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10426 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10427 take a regcache. Adjust.
10428 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10429 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10430 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10431 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10432 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10433 (cris_cannot_fetch_register):
10434 (cris_breakpoint_at): Change prototype to take a regcache.
10435 Adjust.
10436 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10437 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10438 to take a regcache. Adjust.
10439 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10440 Adjust.
10441 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10442 take a regcache. Adjust.
10443 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10444 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10445 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10446 * linux-mips-low.c (mips_get_pc):
10447 (mips_set_pc): Change prototype to take a regcache. Adjust.
10448 (mips_reinsert_addr): Adjust.
10449 (mips_collect_register): Change prototype to take a regcache.
10450 Adjust.
10451 (mips_supply_register):
10452 (mips_collect_register_32bit, mips_supply_register_32bit)
10453 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10454 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10455 * linux-ppc-low.c (ppc_supply_ptrace_register)
10456 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10457 (parse_spufs_run): Adjust.
10458 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10459 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10460 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10461 take a regcache. Adjust.
10462 * linux-s390-low.c (s390_collect_ptrace_register)
10463 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10464 (s390_set_pc): Change prototype to take a regcache. Adjust.
10465 (s390_arch_setup): Adjust.
10466 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10467 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10468 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10469 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10470 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10471 regcache. Adjust.
10472 (sparc_breakpoint_at): Adjust.
10473 * linux-xtensa-low.c (xtensa_fill_gregset):
10474 (xtensa_store_gregset):
10475 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10476 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10477 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10478 prototype to take a regcache. Adjust.
10479 * win32-arm-low.c (arm_fetch_inferior_register)
10480 (arm_store_inferior_register): Change prototype to take a
10481 regcache. Adjust.
10482 * win32-i386-low.c (i386_fetch_inferior_register)
10483 (i386_store_inferior_register): Change prototype to take a
10484 regcache. Adjust.
10485 * win32-low.c (child_fetch_inferior_registers)
10486 (child_store_inferior_registers): Change prototype to take a
10487 regcache. Adjust.
10488 (win32_wait): Adjust.
10489 (win32_fetch_inferior_registers): Change prototype to take a
10490 regcache. Adjust.
10491 (win32_store_inferior_registers): Adjust.
10492 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10493 store_inferior_register>: Change prototype to take a regcache.
10494
60c3d7b0
DE
104952010-01-20 Doug Evans <dje@google.com>
10496
10497 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10498 #ifdef.
10499 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10500 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10501
dc146f7c
VP
105022010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10503
10504 * linux-low.c (linux_core_of_thread): New.
10505 (compare_ints, show_process, list_threads): New.
10506 (linux_qxfer_osdata): Report threads and cores.
10507 (linux_target_op): Register linux_core_of_thread.
10508 * remote-utils.c (prepare_resume_reply): Report the core.
10509 (buffer_xml_printf): Support %d specifier.
10510 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10511 New.
10512 (handle_query): Handle qXfer:threads. Announce availability
10513 thereof.
10514 * target.h (struct target_ops): New field core_of_thread.
10515
7803799a
UW
105162010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10517
10518 * Makefile.in (clean): Remove new generated files.
10519 (reg-s390.o, reg-s390.c): Remove rules.
10520 (reg-s390x.o, reg-s390x.c): Likewise.
10521 (s390-linux32.o, s390-linux32.c): Add rules.
10522 (s390-linux64.o, s390-linux64.c): Likewise.
10523 (s390x-linux64.o, s390x-linux64.c): Likewise.
10524 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10525 * linux-s390-low.c: Include <elf.h>.
10526 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10527 (init_registers_s390): Remove prototype.
10528 (init_registers_s390x): Likewise.
10529 (init_registers_s390_linux32): Add prototype.
10530 (init_registers_s390_linux64): Likewise.
10531 (init_registers_s390x_linux64): Likewise.
10532 (s390_num_regs_3264): New define.
10533 (s390_regmap_3264): New global variable.
10534 (s390_cannot_fetch_register): Remove obsolete check.
10535 (s390_cannot_store_register): Likewise.
10536 (s390_collect_ptrace_register): Handle upper/lower register halves.
10537 (s390_supply_ptrace_register): Likewise.
10538 (s390_fill_gregset): Update to register number changes.
10539 (s390_get_hwcap): New routine.
10540 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10541 Install appropriate regmap and register set.
10542
6e7ffa39
JB
105432010-01-01 Joel Brobecker <brobecker@adacore.com>
10544
10545 * server.c (gdbserver_version): Update copyright year to 2010.
10546 * gdbreplay.c (gdbreplay_version): Likewise.
10547
957f3f49
DE
105482009-12-28 Doug Evans <dje@google.com>
10549
10550 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10551 elf/external.h. Include <elf.h> instead but only if necessary.
10552
ca5c370d
PA
105532009-12-28 Pedro Alves <pedro@codesourcery.com>
10554
10555 * linux-low.c (linux_remove_process): Remove `detaching'
10556 parameter. Don't release/detach from thread_db here.
10557 (linux_kill): Release/detach from thread_db here, ...
10558 (linux_detach): ... and here, before actually detaching.
10559 (linux_wait_1): ... and here, when a process exits.
10560 * thread-db.c (any_thread_of): New.
10561 (thread_db_free): Switch the current inferior to a thread of the
10562 passed in process.
10563
4ee62156
DE
105642009-12-21 Doug Evans <dje@google.com>
10565
d90e6a88
DE
10566 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10567
c5f62d5f
DE
10568 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10569 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10570 warning ifndef __NR_tkill. Move setting of errno there too.
10571 Delete unnecessary resetting of errno after syscall.
10572 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10573
10e86dd7
DE
10574 * configure.ac: Check for dladdr.
10575 * config.in: Regenerate.
10576 * configure: Regenerate.
10577 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10578 (try_thread_db_load): Update.
10579
4ee62156
DE
10580 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10581
00f515da
DE
105822009-12-18 Doug Evans <dje@google.com>
10583
e9464885
DE
10584 * event-loop.c: Include unistd.h if it exists.
10585
07d4f67e
DE
10586 * linux-low.c (my_waitpid): Move definition away from being in
10587 between linux_tracefork_child/linux_test_for_tracefork.
10588
00f515da
DE
10589 * gdb_proc_service.h (psaddr_t): Fix type.
10590 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10591 signature to match glibc.
10592
1de1badb
DE
105932009-12-16 Doug Evans <dje@google.com>
10594
10595 * linux-low.c (linux_read_memory): Fix argument to read.
10596
aeeb81d1
PA
105972009-11-26 Pedro Alves <pedro@codesourcery.com>
10598
10599 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10600 events, don't leave current_inferior pointing at null.
10601
10357975
PA
106022009-11-26 Pedro Alves <pedro@codesourcery.com>
10603
10604 * win32-low.c (LOG): Delete.
10605 (OUTMSG): Output to stderr.
10606 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10607 on compile time LOG macro.
10608 (win32_wait): Fix debug output.
10609
cf6e3471
PA
106102009-11-26 Pedro Alves <pedro@codesourcery.com>
10611
10612 * win32-low.c (win32_add_one_solib): If the dll name is
10613 "ntdll.dll", prepend the system directory to the dll path.
10614
0c85e18e
MK
106152009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10616
10617 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10618
9ac544ce 106192009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10620 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10621
10622 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10623 * configure.ac: Check for __mcoldfire__ and set
10624 gdb_cv_m68k_is_coldfire.
10625 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10626 reg-cf.o and reg-m68k.o.
10627 * configure: Regenerated.
10628
fd7dd3e6
PA
106292009-11-16 Pedro Alves <pedro@codesourcery.com>
10630
10631 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10632 Pass it to thread_db_free.
10633 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10634 proper `detaching' argument to linux_remove_process.
10635 * linux-low.h (thread_db_free): Add `detaching' parameter.
10636 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10637 to thread_db_free.
10638 (thread_db_free): Add `detaching' parameter. Only
10639 call td_ta_clear_event if detaching from process.
10640
75aa492e
MK
106412009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10642
10643 * thread-db.c (thread_db_free): Fix typo.
10644
21e1bee4
PP
106452009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10646
10647 PR gdb/10838
10648 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10649
8838b45e
NS
106502009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10651
10652 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10653 with an i686 compiler.
10654 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10655 needed.
10656 * configure: Rebuilt.
10657
8a35fb51
SL
106582009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10659
10660 PR gdb/10783
10661
10662 * server.c (handle_search_memory_1): Correct read_addr initialization
10663 in loop for searching subsequent chunks.
10664
96f15937
PP
106652009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10666
10667 * configure.ac: New --with-libthread-db option.
10668 * thread-db.c: Allow direct dependence on libthread_db.
10669 (thread_db_free): Adjust.
10670 * config.in: Regenerate.
10671 * configure: Likewise.
889bf7c5 10672
5f7d1694
PP
106732009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10674
10675 PR gdb/10757
10676 * thread-db.c (attach_thread): New function.
10677 (maybe_attach_thread): Return success/failure.
10678 (find_new_threads_callback): Adjust.
889bf7c5
PA
10679 (thread_db_find_new_threads): Loop until no new threads.
10680
88e3b899
PA
106812009-10-13 Pedro Alves <pedro@codesourcery.com>
10682
10683 * proc-service.c (ps_lgetregs): Formatting.
10684
cdbfd419
PP
106852009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10686
10687 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10688 * configure.ac: Adjust.
10689 * linux-low.h (struct process_info_private): Move members to struct
10690 thread_db.
10691 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10692 * linux-low.c (linux_remove_process): Adjust.
10693 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10694 * server.c (handle_query): Move code ...
10695 (handle_monitor_command): ... here. New function.
10696 * target.h (struct target_ops): New member.
10697 * thread-db.c (struct thread_db): New.
10698 (libthread_db_search_path): New variable.
10699 (thread_db_create_event, thread_db_enable_reporting)
10700 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10701 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10702 (try_thread_db_load_1, dladdr_to_soname): New functions.
10703 (try_thread_db_load, thread_db_load_search): New functions.
10704 (thread_db_init): Search for libthread_db.
10705 (thread_db_free): New function.
10706 (thread_db_handle_monitor_command): Likewise.
10707 * config.in: Regenerate.
10708 * configure: Regenerate.
889bf7c5 10709
4168d2d6
UW
107102009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10711
10712 * spu-low.c (spu_kill): Wait for inferior to terminate.
10713 Call clear_inferiors.
10714 (spu_detach): Call clear_inferiors.
10715
81ecdfbb
RW
107162009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10717
10718 * aclocal.m4: Regenerate.
10719 * config.in: Likewise.
10720 * configure: Likewise.
10721
0b9ff2c0
UW
107222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10723
10724 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10725 (parse_spufs_run): New function.
10726 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10727 (ppc_breakpoint_at): Handle SPU breakpoints.
10728
efcbbd14
UW
107292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10730
10731 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10732 (SPUFS_MAGIC): Define.
10733 (spu_enumerate_spu_ids): New function.
10734 (linux_qxfer_spu): New function.
10735 (linux_target_ops): Install linux_qxfer_spu.
10736
f4d9bade
UW
107372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10738
10739 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10740 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10741 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10742 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10743 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10744 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10745 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10746 (init_registers_powerpc_cell32l): Add prototype.
10747 (init_registers_powerpc_cell64l): Likewise.
10748 (ppc_arch_setup): Detect Cell/B.E. architecture.
10749
96e946ca
RW
107502009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10751
10752 * Makefile.in (datarootdir): New variable.
10753
58d6951d
DJ
107542009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10755
10756 * linux-low.c (linux_write_memory): Update debugging output.
10757 * Makefile.in (clean): Add new descriptions.
10758 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10759 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10760 * configure.srv: Add new files for arm*-*-linux*.
10761 * linux-arm-low.c: Add new declarations.
10762 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10763 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10764 (HWCAP_VFPv3D16): New.
10765 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10766 instead of __IWMMXT__.
10767 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10768 (arm_arch_setup): New.
10769 (target_regsets): Remove #ifdef. Add VFP regset.
10770 (the_low_target): Use arm_arch_setup.
10771
12b42a12
DJ
107722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10773
10774 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10775 the main thread again.
10776
ac8c974e
AR
107772009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10778
10779 Adding Neutrino gdbserver.
10780 * configure: Regenerated.
10781 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10782 * configure.srv (i[34567]86-*-nto*): New target.
10783 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10784 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10785 (nto_comctrl) [__QNX__]: New function.
10786 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10787
4424e0c3 107882009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10789
10790 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10791 srv_tgtobj.
10792
912cf4ba
PA
107932009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10794 Pedro Alves <pedro@codesourcery.com>
10795
10796 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10797 don't support CONTEXT_EXTENDED_REGISTERS.
10798 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10799 (the_low_target): Install them.
10800 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10801 failing with ERROR_PIPE_NOT_CONNECTED.
10802
aa5ca48f
DE
108032009-06-30 Doug Evans <dje@google.com>
10804 Pierre Muller <muller@ics.u-strasbg.fr>
10805
10806 Add h/w watchpoint support to x86-linux, win32-i386.
10807 * Makefile.in (SFILES): Add i386-low.c
10808 (i386_low_h): Define.
10809 (i386-low.o): Add dependencies.
10810 (linux-x86-low.o): Add i386-low.h dependency.
10811 (win32-i386-low.o): Ditto.
10812 * i386-low.c: New file.
10813 * i386-low.h: New file.
10814 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10815 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10816 * linux-low.c (linux_add_process): Initialize arch_private.
10817 (linux_remove_process): Free arch_private.
10818 (add_lwp): Initialize arch_private.
10819 (delete_lwp): Free arch_private.
10820 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10821 provided.
10822 * linux-low.h (process_info_private): New member arch_private.
10823 (lwp_info): New member arch_private.
10824 (linux_target_ops): New members new_process, new_thread,
10825 prepare_to_resume.
10826 (ptid_of): New macro.
10827 * linux-x86-low.c: Include stddef.h, i386-low.h.
10828 (arch_process_info): New struct.
10829 (arch_lwp_info): New struct.
10830 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10831 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10832 (i386_dr_low_get_status): New function.
10833 (x86_insert_point, x86_remove_point): New functions.
10834 (x86_stopped_by_watchpoint): New function.
10835 (x86_stopped_data_address): New function.
10836 (x86_linux_new_process, x86_linux_new_thread): New functions.
10837 (x86_linux_prepare_to_resume): New function.
10838 (the_low_target): Add entries for insert_point, remove_point,
10839 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10840 prepare_to_resume.
10841 * server.c (debug_hw_points): New global.
10842 (monitor_show_help): Document set debug-hw-points.
10843 (handle_query): Process "set debug-hw-points".
10844 * server.h (debug_hw_points): Declare.
10845 (paddress): Declare.
10846 * utils.c (NUMCELLS, CELLSIZE): New macros.
10847 (get_sell, xsnprintf, paddress): New functions.
10848 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10849 remove_point, stopped_by_watchpoint, stopped_data_address.
10850 * win32-i386-low.c: Include i386-low.h.
10851 (debug_reg_state): Replaces dr.
10852 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10853 (i386_dr_low_get_status): New function.
10854 (i386_insert_point, i386_remove_point): New functions.
10855 (i386_stopped_by_watchpoint): New function.
10856 (i386_stopped_data_address): New function.
10857 (i386_initial_stuff): Update.
10858 (get_thread_context,set_thread_context,i386_thread_added): Update.
10859 (the_low_target): Add entries for insert_point,
10860 remove_point, stopped_by_watchpoint, stopped_data_address.
10861 * win32-low.c (win32_insert_watchpoint): New function.
10862 (win32_remove_watchpoint): New function.
10863 (win32_stopped_by_watchpoint): New function.
10864 (win32_stopped_data_address): New function.
10865 (win32_target_ops): Add entries for insert_watchpoint,
10866 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10867 * win32-low.h (win32_target_ops): New members insert_point,
10868 remove_point, stopped_by_watchpoint, stopped_data_address.
10869
d993e290
PA
108702009-06-25 Pedro Alves <pedro@codesourcery.com>
10871
10872 * server.c (process_serial_event): Re-return unsupported, not
10873 error, if the type isn't recognized. Re-allow supporting only
10874 insert or remove packets. Also call require_running for
10875 breakpoints. Add missing break statement to default case. Tidy.
10876 * target.h (struct target_ops): Rename insert_watchpoint to
10877 insert_point, and remove_watchpoint to remove_point.
10878
10879 * linux-low.h (struct linux_target_ops): Likewise.
10880 * linux-low.c (linux_insert_watchpoint): Rename to ...
10881 (linux_insert_point): ... this. Adjust.
10882 (linux_remove_watchpoint): Rename to ...
10883 (linux_remove_point): ... this. Adjust.
10884 (linux_target_ops): Adjust.
10885 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10886 (cris_insert_point): ... this.
10887 (cris_remove_watchpoint): Rename to ...
10888 (cris_remove_point): ... this.
10889 (the_low_target): Adjust.
10890
0f54c268
PM
108912009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10892
10893 * server.c (handle_v_kill): Pass signal_pid to
10894 kill_inferior if multi_process is zero.
10895
c6314022
AR
108962009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10897
10898 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10899 * target.h (target_ops): Comment for *_watchpoint to make it clear
10900 the functions can get types '0' and '1'.
10901
4463ce24
AR
109022009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10903
10904 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10905 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10906 * regcache.c (get_regcache): Likewise.
10907 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10908 * win32-low.c (child_fetch_inferior_registers): Remove check for
10909 regno 0.
10910
cf8fd78b
PA
109112009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10912 Pedro Alves <pedro@codesourcery.com>
10913
10914 * target.h (struct target_ops) <supports_multi_process>: New
10915 callback.
10916 (target_supports_multi_process): New.
10917 * server.c (handle_query): Even if GDB reports support, only
10918 enable multi-process if the target also supports it. Report
10919 multi-process support only if the target backend supports it.
10920 * linux-low.c (linux_supports_multi_process): New function.
10921 (linux_target_ops): Install it as target_supports_multi_process
10922 callback.
10923
47c0c975
DE
109242009-05-24 Doug Evans <dje@google.com>
10925
e09875d4
DE
10926 Global renaming of find_thread_pid to find_thread_ptid.
10927 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10928 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10929 All callers updated.
10930
e27d73f6
DE
10931 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10932 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10933 directly.
10934
47c0c975
DE
10935 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10936 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10937 (linux_resume_one_lwp): Ditto.
10938
2acc282a
DE
109392009-05-23 Doug Evans <dje@google.com>
10940
10941 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10942 from struct inferior_list_entry * to struct lwp_info *.
10943 All callers updated.
10944
9f1036c1
DE
109452009-05-13 Doug Evans <dje@google.com>
10946
10947 * linux-x86-low.c: Don't include assert.h.
10948 (x86_siginfo_fixup): Use fatal, not assert.
10949 (x86_arch_setup): Fix comment.
10950
d0722149
DE
109512009-05-12 Doug Evans <dje@google.com>
10952
10953 Biarch support for i386/amd64 gdbserver.
10954 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10955 Add linux-x86-low.c.
10956 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10957 (linux-x86-low.o): Add.
10958 * linux-x86-64-low.c: Delete.
10959 * linux-i386-low.c: Delete.
10960 * linux-x86-low.c: New file.
10961 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10962 linux-x86-low.o.
10963 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10964 linux-x86-low.o.
10965 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10966 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10967 (linux_child_pid_to_exec_file): New function.
10968 (elf_64_header_p, elf_64_file_p): New functions.
10969 (siginfo_fixup): New function.
10970 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10971 give target a chance to convert layout.
10972 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10973 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10974
fdeb2a12
DE
109752009-05-07 Doug Evans <dje@google.com>
10976
10977 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10978 (regsets_store_inferior_registers): Ditto.
10979
a6dbe5df
PA
109802009-05-06 Pedro Alves <pedro@codesourcery.com>
10981
10982 PR server/10048
10983
10984 * linux-low.c (must_set_ptrace_flags): Delete.
10985 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10986 of the global.
10987 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10988 `lwp->must_set_ptrace_flags' instead.
ba42693b 10989 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10990 (linux_wait_1): ... not here.
10991
5091eb23
DE
109922009-04-30 Doug Evans <dje@google.com>
10993
9f767825
DE
10994 * inferiors.c (started_inferior_callback): New function.
10995 (attached_inferior_callback): New function.
10996 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10997 * server.c (print_started_pid, print_attached_pid): New functions.
10998 (detach_or_kill_for_exit): New function.
10999 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11000 * server.h (have_started_inferiors_p): Declare.
11001 (have_attached_inferiors_p): Declare.
11002
5091eb23
DE
11003 * inferiors.c (remove_process): Fix memory leak, free process.
11004 * linux-low.c (linux_remove_process): New function.
11005 (linux_kill): Call it instead of remove_process.
11006 (linux_detach, linux_wait_1): Ditto.
11007
155c8968
PA
110082009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11009
11010 * configure.srv: Add x86 Windows CE target.
11011
7fe519cb
UW
110122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11013
11014 * inferiors.c (get_thread_process): Make global.
11015 * server.h (get_thread_process): Add prototype.
11016 * thread-db.c (find_one_thread): Use get_thread_process
11017 instead of current_process.
11018 (thread_db_get_tls_address): Do not crash if called when
11019 thread layer is not yet initialized.
11020
5472f405
UW
110212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11022
11023 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11024 * spu-low.c (current_tid): Rename to ...
11025 (current_ptid): ... this.
11026 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11027 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11028 ptid_get_lwp (current_ptid) instead of current_tid.
11029 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11030 instead of current_tid. Use find_process_pid to verify pid
11031 argument is valid. Pass proper argument to remove_process.
11032 (spu_thread_alive): Compare current_ptid instead of current_tid.
11033 (spu_resume): Likewise.
11034
55ac2b99
PA
110352009-04-02 Pedro Alves <pedro@codesourcery.com>
11036
11037 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11038 variable.
11039
95954743
PA
110402009-04-01 Pedro Alves <pedro@codesourcery.com>
11041
11042 Implement the multiprocess extensions, and add linux multiprocess
11043 support.
11044
11045 * server.h (ULONGEST): Declare.
11046 (struct ptid, ptid_t): New.
11047 (minus_one_ptid, null_ptid): Declare.
11048 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11049 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11050 (struct inferior_list_entry): Change `id' type from unsigned from
11051 to ptid_t.
11052 (struct sym_cache, struct breakpoint, struct
11053 process_info_private): Forward declare.
11054 (struct process_info): Declare.
11055 (current_process): Declare.
11056 (all_processes): Declare.
11057 (initialize_inferiors): Declare.
11058 (add_thread): Adjust to use ptid_t.
11059 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11060 (add_process, remove_process, find_thread_pid): Declare.
11061 (find_inferior_id): Adjust to use ptid_t.
11062 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11063 (multi_process): Declare.
11064 (push_event): Adjust to use ptid_t.
11065 (read_ptid, write_ptid): Declare.
11066 (prepare_resume_reply): Adjust to use ptid_t.
11067 (clear_symbol_cache): Declare.
11068 * inferiors.c (all_processes): New.
11069 (null_ptid, minus_one_ptid): New.
11070 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11071 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11072 (add_thread): Change unsigned long to ptid. Remove gdb_id
11073 parameter. Adjust.
11074 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11075 (gdb_id_to_thread): Rename to ...
11076 (find_thread_pid): ... this. Change unsigned long to ptid.
11077 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11078 (loaded_dll, pull_pid_from_list): Adjust.
11079 (add_process, remove_process, find_process_pid)
11080 (get_thread_process, current_process, initialize_inferiors): New.
11081 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11082 (struct target_waitstatus) <related_pid>: Ditto.
11083 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11084 return type to int.
11085 (struct target_ops) <join>: Add `pid' argument.
11086 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11087 (struct target_ops) <wait>: Add `ptid' field. Change return type
11088 to ptid.
11089 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11090 (mywait): Add `ptid' argument. Change return type to ptid_t.
11091 (target_pid_to_str): Declare.
11092 * target.c (set_desired_inferior): Adjust to use ptids.
11093 (mywait): Add new `ptid' argument. Adjust.
11094 (target_pid_to_str): New.
11095 * mem-break.h (free_all_breakpoints): Declare.
11096 * mem-break.c (breakpoints): Delelete.
11097 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11098 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11099 to use per-process breakpoint list.
11100 (free_all_breakpoints): New.
11101 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11102 (symbol_cache, all_symbols_looked_up): Delete.
11103 (hexchars): New.
11104 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11105 read_ptid): New.
11106 (prepare_resume_reply): Change ptid argument's type from unsigned
11107 long to ptid_t. Adjust. Implement W;process and X;process.
11108 (free_sym_cache, clear_symbol_cache): New.
11109 (look_up_one_symbol): Adjust to per-process symbol cache. *
11110 * server.c (cont_thread, general_thread, step_thread): Change type
11111 to ptid_t.
11112 (attached): Delete.
11113 (multi_process): New.
11114 (last_ptid): Change type to ptid_t.
11115 (struct vstop_notif) <ptid>: Change type to ptid_t.
11116 (queue_stop_reply, push_event): Change `ptid' argument's type to
11117 ptid_t.
11118 (discard_queued_stop_replies): Add `pid' argument.
11119 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11120 changes. Don't reference the `attached' global.
11121 (attach_inferior): Adjust to mywait interface changes.
11122 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11123 features. Handle and report "multiprocess+". Handle
11124 "qAttached:PID".
11125 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11126 changes.
11127 (handle_v_kill): New.
11128 (handle_v_stopped): Adjust to use target_pid_to_str.
11129 (handle_v_requests): Allow multiple attaches and runs when
11130 multiprocess extensions are in effect. Handle "vKill".
11131 (myresume): Adjust to use ptids.
11132 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11133 (handle_status): Adjust to discard_queued_stop_replies interface
11134 change.
11135 (first_thread_of, kill_inferior_callback)
11136 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11137 (main): Call initialize_inferiors. Adjust to use ptids, killing
11138 and detaching from all inferiors. Handle multiprocess packet
11139 variants.
11140 * linux-low.h: Include gdb_proc_service.h.
11141 (struct process_info_private): New.
11142 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11143 <lwpid_of>: Use ptid_get_lwp.
11144 (get_lwp_thread): Adjust.
11145 (struct lwp_info): Add `dead' member.
11146 (find_lwp_pid): Declare.
11147 * linux-low.c (thread_db_active): Delete.
11148 (new_inferior): Adjust comment.
11149 (inferior_pid): Delete.
11150 (linux_add_process): New.
11151 (handle_extended_wait): Adjust.
11152 (add_lwp): Change unsigned long to ptid.
11153 (linux_create_inferior): Add process to processes table. Adjust
11154 to use ptids. Don't set new_inferior here.
11155 (linux_attach_lwp): Rename to ...
11156 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11157 it. Adjust to use ptids.
11158 (linux_attach_lwp): New.
11159 (linux_attach): Add process to processes table. Don't set
11160 new_inferior here.
11161 (struct counter): New.
11162 (second_thread_of_pid_p, last_thread_of_process_p): New.
11163 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11164 multiple processes.
11165 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11166 processes. Remove process from process table.
11167 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11168 to multiple processes.
11169 (any_thread_of): New.
11170 (linux_detach): Add `pid' argument, and handle it. Remove process
11171 from processes table.
11172 (linux_join): Add `pid' argument. Handle it.
11173 (linux_thread_alive): Change unsighed long argument to ptid_t.
11174 Consider dead lwps as not being alive.
11175 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11176 threads we're not interested in.
11177 (same_lwp, find_lwp_pid): New.
11178 (linux_wait_for_lwp): Change `pid' argument's type from int to
11179 ptid_t. Adjust.
11180 (linux_wait_for_event): Rename to ...
11181 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11182 from int to ptid_t. Adjust.
11183 (linux_wait_for_event): New.
11184 (linux_wait_1): Add `ptid' argument. Change return type to
11185 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11186 that exit from the process table.
11187 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11188 Adjust.
11189 (mark_lwp_dead): New.
11190 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11191 stopping all threads, mark its main lwp as dead.
11192 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11193 ptids.
11194 (fetch_register, usr_store_inferior_registers)
11195 (regsets_fetch_inferior_registers)
11196 (regsets_store_inferior_registers, linux_read_memory)
11197 (linux_write_memory): Inline `inferior_pid'.
11198 (linux_look_up_symbols): Adjust to use per-process
11199 `thread_db_active'.
11200 (linux_request_interrupt): Adjust to use ptids.
11201 (linux_read_auxv): Inline `inferior_pid'.
11202 (initialize_low): Don't reference thread_db_active.
11203 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11204 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11205 (ps_getpid): Return the pid of the current inferior.
11206 * thread-db.c (proc_handle, thread_agent): Delete.
11207 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11208 per-process data.
11209 (find_one_thread): Change argument type to ptid_t. Adjust to
11210 per-process data.
11211 (maybe_attach_thread): Adjust to per-process data and ptids.
11212 (thread_db_find_new_threads): Ditto.
11213 (thread_db_init): Ditto.
11214 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11215 processes table. Adjust to use ptids.
11216 (spu_kill, spu_detach): Adjust interface. Remove process from
11217 processes table.
11218 (spu_join, spu_thread_alive): Adjust interface.
11219 (spu_wait): Adjust interface. Remove process from processes
11220 table. Adjust to use ptids.
11221 * win32-low.c (current_inferior_tid): Delete.
11222 (current_inferior_ptid): New.
11223 (debug_event_ptid): New.
11224 (thread_rec): Take a ptid. Adjust.
11225 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11226 (child_delete_thread): Ditto.
11227 (do_initial_child_stuff): Add `attached' argument. Add process to
11228 processes table.
11229 (child_fetch_inferior_registers, child_store_inferior_registers):
11230 Adjust.
11231 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11232 (win32_attach): Pass 1 to do_initial_child_stuff.
11233 (win32_kill): Adjust interface. Remove process from processes
11234 table.
11235 (win32_detach): Ditto.
11236 (win32_join): Adjust interface.
11237 (win32_thread_alive): Take a ptid.
11238 (win32_resume): Adjust to use ptids.
11239 (get_child_debug_event): Ditto.
11240 (win32_wait): Adjust interface. Remove exiting process from
11241 processes table.
11242
bd99dc85
PA
112432009-04-01 Pedro Alves <pedro@codesourcery.com>
11244
11245 Non-stop mode support.
11246
11247 * server.h (non_stop): Declare.
11248 (gdb_client_data, handler_func): Declare.
11249 (delete_file_handler, add_file_handler, start_event_loop):
11250 Declare.
11251 (handle_serial_event, handle_target_event, push_event)
11252 (putpkt_notif): Declare.
11253 * target.h (enum resume_kind): New.
11254 (struct thread_resume): Replace `step' field by `kind' field.
11255 (TARGET_WNOHANG): Define.
11256 (struct target_ops) <wait>: Add `options' argument.
11257 <supports_non_stop, async, start_non_stop>: New fields.
11258 (target_supports_non_stop, target_async): New.
11259 (start_non_stop): Declare.
11260 (mywait): Add `options' argument.
11261 * target.c (mywait): Add `options' argument. Print child exit
11262 notifications here.
11263 (start_non_stop): New.
11264 * server.c (non_stop, own_buf, mem_buf): New globals.
11265 (struct vstop_notif): New.
11266 (notif_queue): New global.
11267 (queue_stop_reply, push_event, discard_queued_stop_replies)
11268 (send_next_stop_reply): New.
11269 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11270 interface changes.
11271 (attach_inferior): In non-stop mode, don't wait for the target
11272 here.
11273 (handle_general_set): Handle QNonStop.
11274 (handle_query): When handling qC, return the current general
11275 thread, instead of the first thread of the list.
11276 (handle_query): If the backend supports non-stop mode, include
11277 QNonStop+ in the qSupported query response.
11278 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11279 and non-stop mode.
11280 (handle_v_attach, handle_v_run): Handle non-stop mode.
11281 (handle_v_stopped): New.
11282 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11283 (myresume): Adjust to use resume_kind. Handle non-stop.
11284 (queue_stop_reply_callback): New.
11285 (handle_status): Handle non-stop mode.
11286 (main): Clear non_stop flag on reconnection. Use the event-loop.
11287 Refactor serial protocol handling from here ...
11288 (process_serial_event): ... to this new function. When GDB
11289 selects any thread, select one here. In non-stop mode, wait until
11290 GDB acks all pending events before exiting.
11291 (handle_serial_event, handle_target_event): New.
11292 * remote-utils.c (remote_open): Install remote_desc in the event
11293 loop.
11294 (remote_close): Remove remote_desc from the event loop.
11295 (putpkt_binary): Rename to...
11296 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11297 (putpkt_binary): New as wrapper around putpkt_binary_1.
11298 (putpkt_notif): New.
11299 (prepare_resume_reply): In non-stop mode, don't change the
11300 general_thread.
11301 * event-loop.c: New.
11302 * Makefile.in (OBJ): Add event-loop.o.
11303 (event-loop.o): New rule.
11304
11305 * linux-low.h (pid_of): Moved here.
11306 (lwpid_of): New.
11307 (get_lwp_thread): Use lwpid_of.
11308 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11309 * linux-low.c (pid_of): Delete.
11310 (inferior_pid): Use lwpid_of.
11311 (linux_event_pipe): New.
11312 (target_is_async_p): New.
11313 (delete_lwp): New.
11314 (handle_extended_wait): Use lwpid_of.
11315 (add_lwp): Don't set lwpid field.
11316 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11317 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11318 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11319 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11320 first. Adjust to linux_wait_for_event interface changes. Use
11321 lwpid_of.
11322 (linux_detach): Don't delete the main lwp here.
11323 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11324 (status_pending_p): Don't consider explicitly suspended lwps.
11325 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11326 pointer. Add OPTIONS argument. Change return type to int. Use
11327 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11328 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11329 pointer. Add status pointer argument. Return a pid instead of a
11330 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11331 changes. In non-stop mode, don't switch to a random thread.
11332 (linux_wait): Rename to...
11333 (linux_wait_1): ... this. Add target_options argument, and handle
11334 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11335 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11336 clean exit and signal exit code. Don't stop all threads in
11337 non-stop mode. In all-stop mode, only stop all threads when
11338 reporting a stop to GDB. Handle explicit thread stop requests.
11339 (async_file_flush, async_file_mark): New.
11340 (linux_wait): New.
11341 (send_sigstop): Use lwpid_of.
11342 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11343 interface changes. In non-stop mode, don't switch to a random
11344 thread.
11345 (linux_resume_one_lwp): Use lwpid_of.
11346 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11347 (linux_resume_one_thread): ... this. Handle resume_stop. In
11348 non-stop mode, don't look for pending flag in all threads.
11349 (resume_status_pending_p): Don't consider explicitly suspended
11350 threads.
11351 (my_waitpid): Reimplement. Emulate __WALL.
11352 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11353 Use lwpid_of.
11354 (sigchld_handler, linux_supports_non_stop, linux_async)
11355 (linux_start_non_stop): New.
11356 (linux_target_ops): Register linux_supports_non_stop, linux_async
11357 and linux_start_non_stop.
11358 (initialize_low): Install SIGCHLD handler.
11359 * thread-db.c (thread_db_create_event, find_one_thread)
11360 (thread_db_get_tls_address): Use lwpid_of.
11361 * win32-low.c (win32_detach): Adjust to use resume_kind.
11362 (win32_wait): Add `options' argument.
11363 * spu-low.c (spu_resume): Adjust to use resume_kind.
11364 (spu_wait): Add `options' argument.
11365
5b1c542e
PA
113662009-04-01 Pedro Alves <pedro@codesourcery.com>
11367
11368 Decouple target code from remote protocol.
11369
11370 * target.h (enum target_waitkind): New.
11371 (struct target_waitstatus): New.
11372 (struct target_ops) <wait>: Return an unsigned long. Take a
11373 target_waitstatus pointer instead of a char pointer.
11374 (mywait): Likewise.
11375 * target.c (mywait): Change prototype to return an unsigned long.
11376 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11377 * server.h (thread_from_wait, old_thread_from_wait): Delete
11378 declarations.
11379 (prepare_resume_reply): Change prototype to take a
11380 target_waitstatus.
11381 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11382 (last_status, last_ptid): New.
11383 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11384 pid instead of a signal.
11385 (attach_inferior): Remove "status" and "signal" parameters.
11386 Adjust.
11387 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11388 not as an address.
11389 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11390 (handle_v_requests, myresume): Remove "status" and "signal"
11391 parameters. Adjust.
11392 (handle_status): New.
11393 (main): Delete local `status'. Adjust.
11394 * remote-utils.c: Include target.h.
11395 (prepare_resume_reply): Change prototype to take a
11396 target_waitstatus. Adjust.
11397
11398 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11399 interface.
11400 * spu-low.c (spu_wait): Adjust.
11401 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11402 Delete.
11403 (win32_wait): Adjust.
11404
2bd7c093
PA
114052009-04-01 Pedro Alves <pedro@codesourcery.com>
11406
11407 * target.h (struct thread_resume): Delete leave_stopped member.
11408 (struct target_ops): Add a `n' argument to the `resume' callback.
11409 * server.c (start_inferior): Adjust.
11410 (handle_v_cont, myresume): Adjust.
11411 * linux-low.c (check_removed_breakpoint): Adjust to resume
11412 interface change, and to removed leave_stopped field.
11413 (resume_ptr): Delete.
11414 (struct thread_resume_array): New.
11415 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11416 resume interface change.
11417 (linux_continue_one_thread, linux_queue_one_thread)
11418 (resume_status_pending_p): Check if the resume field is NULL
11419 instead of checking the leave_stopped member.
11420 (linux_resume): Adjust to the target resume interface change.
11421 * spu-low.c (spu_resume): Adjust to the target resume interface
11422 change.
11423 * win32-low.c (win32_detach, win32_resume): Ditto.
11424
c35fafde
PA
114252009-04-01 Pedro Alves <pedro@codesourcery.com>
11426
11427 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11428 flag.
11429 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11430 pending.
11431 (linux_continue_one_thread): Only preserve the stepping flag if
11432 there's a pending breakpoint.
11433
0a59d50b
PA
114342009-03-31 Pedro Alves <pedro@codesourcery.com>
11435
11436 * server.c (main): After the inferior having exited, call
11437 remote_close before exiting gdbserver.
11438
f04c6d38
TJB
114392009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11440
11441 Fix size of FPSCR in Power 7 processors.
11442 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11443 (PPC_FEATURE_HAS_DFP): New #define.
11444 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11445 size of the FPSCR.
11446
78e5cee6
PA
114472009-03-23 Pedro Alves <pedro@codesourcery.com>
11448
11449 * server.c (handle_query) Whitespace and formatting.
11450
1b3f6016
PA
114512009-03-22 Pedro Alves <pedro@codesourcery.com>
11452
11453 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11454 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11455 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11456 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11457 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11458 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11459 Makefile.in, configure.ac: Fix whitespace throughout.
11460 * configure: Regenerate.
11461
a07b2135
PA
114622009-03-22 Pedro Alves <pedro@codesourcery.com>
11463
11464 * inferiors.c (find_inferior): Make it safe for the callback
11465 function to delete the currently iterated inferior.
11466
67cc2626
PA
114672009-03-22 Pedro Alves <pedro@codesourcery.com>
11468
11469 * Makefile.in (linuw_low_h): Move higher.
11470 (thread-db.o): Depend on $(linux_low_h).
11471
54a0b537
PA
114722009-03-17 Pedro Alves <pedro@codesourcery.com>
11473
11474 Rename "process" to "lwp" throughout.
11475
11476 * linux-low.c (all_processes): Rename to...
11477 (all_lwps): ... this.
11478 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11479 (add_process): Rename to ...
11480 (add_lwp): ... this. Adjust.
11481 (linux_create_inferior): Adjust.
11482 (linux_attach_lwp): Adjust.
11483 (linux_attach): Adjust.
11484 (linux_kill_one_process): Rename to ...
11485 (linux_kill_one_lwp): ... this. Adjust.
11486 (linux_kill): Adjust.
11487 (linux_detach_one_process): Rename to ...
11488 (linux_detach_one_lwp): ... this. Adjust.
11489 (linux_detach): Adjust.
11490 (check_removed_breakpoint): Adjust.
11491 (status_pending_p): Adjust.
11492 (linux_wait_for_process): Rename to ...
11493 (linux_wait_for_lwp): ... this. Adjust.
11494 (linux_wait_for_event): Adjust.
11495 (send_sigstop): Adjust.
11496 (wait_for_sigstop): Adjust.
11497 (stop_all_processes): Rename to ...
11498 (stop_all_lwps): ... this.
11499 (linux_resume_one_process): Rename to ...
11500 (linux_resume_one_lwp): ... this. Adjust.
11501 (linux_set_resume_request, linux_continue_one_thread)
11502 (linux_queue_one_thread, resume_status_pending_p)
11503 (usr_store_inferior_registers, regsets_store_inferior_registers)
11504 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11505 Adjust.
11506 * linux-low.h (get_process): Rename to ...
11507 (get_lwp): ... this. Adjust.
11508 (get_thread_process): Rename to ...
11509 (get_thread_lwp): ... this. Adjust.
11510 (get_process_thread): Rename to ...
11511 (get_lwp_thread): ... this. Adjust.
11512 (struct process_info): Rename to ...
11513 (struct lwp_info): ... this.
11514 (all_processes): Rename to ...
11515 (all_lwps): ... this.
11516 * proc-service.c (ps_lgetregs): Adjust.
11517 * thread-db.c (thread_db_create_event, find_one_thread)
11518 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11519
0b16c5cf
PA
115202009-03-14 Pedro Alves <pedro@codesourcery.com>
11521
11522 * server.c (handle_query): Handle "qAttached".
11523
32de4b9d
NS
115242009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11525
11526 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11527 GPLv3, update license URL.
11528
2aecd87f
DE
115292009-03-01 Doug Evans <dje@google.com>
11530
93efd302 11531 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11532 (server_h): Add gdb_signals.h.
11533 (signals.o): Update.
11534 * server.h (target_signal_from_host,target_signal_to_host_p)
11535 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11536
86b1f9c5
PM
115372009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11538
11539 * remote-utils.c (getpkt): Also generate remote-debug
11540 information if noack_mode is set.
11541
4aa995e1
PA
115422009-02-06 Pedro Alves <pedro@codesourcery.com>
11543
11544 * server.c (handle_query): Report qXfer:siginfo:read and
11545 qXfer:siginfo:write as supported and handle them.
11546 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11547 * linux-low.c (linux_xfer_siginfo): New.
11548 (linux_target_ops): Set it.
11549
62709adf
PA
115502009-01-26 Pedro Alves <pedro@codesourcery.com>
11551
11552 * server.c (gdbserver_usage): Mention --remote-debug.
11553 (main): Accept '--remote-debug' switch.
11554
aef93bd7
DE
115552009-01-18 Doug Evans <dje@google.com>
11556
11557 * regcache.c (new_register_cache): No need to check result of xcalloc.
11558 * server.c (handle_search_memory): Back out calls to xmalloc,
11559 result is checked and error is returned to user upon failure.
11560 (handle_query): Ditto. Add more checks for result of malloc.
11561 (handle_v_cont): Check result of malloc, report error back to
11562 user upon failure.
11563 (handle_v_run): Ditto. Call freeargv.
11564 * server.h (freeargv): Declare.
11565 * utils.c (freeargv): New fn.
11566
54363045
DE
115672009-01-15 Doug Evans <dje@google.com>
11568
f626972c
DE
11569 * gdbreplay.c (perror_with_name): Make arg const char *.
11570 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11571 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11572 * utils.c (perror_with_name): Make arg const char *.
54363045 11573
18aae699
PA
115742009-01-14 Pedro Alves <pedro@codesourcery.com>
11575
11576 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11577 when handling a EXIT_PROCESS_DEBUG_EVENT.
11578
ff703abe
JB
115792009-01-06 Joel Brobecker <brobecker@adacore.com>
11580
11581 * gdbreplay.c (gdbreplay_version): Update copyright year.
11582 * server.c (gdbserver_version): Likewise.
11583
f21cc1a2 115842009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11585
11586 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11587 (handle_extended_wait): Improve comment.
0e21c1ec 11588
bca929d3
DE
115892008-12-13 Doug Evans <dje@google.com>
11590
11591 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11592 * server.h (ATTR_MALLOC): New macro.
11593 (xmalloc,xcalloc,xstrdup): Declare.
11594 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11595 * inferiors.c: Ditto.
11596 * linux-low.c: Ditto.
11597 * mem-break.c: Ditto.
11598 * regcache.c: Ditto.
11599 * remote-utils.c: Ditto.
11600 * server.c: Ditto.
11601 * target.c: Ditto.
11602 * win32-low.c: Ditto.
11603
97438e3f
DE
116042008-12-12 Doug Evans <dje@google.com>
11605
896c7fbb
DE
11606 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11607 in debugging printf.
11608
97438e3f
DE
11609 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11610
e3b886f8
DE
116112008-12-09 Doug Evans <dje@google.com>
11612
11613 * linux-low.h (struct process_info): Delete member tid, unused.
11614 * thread-db.c (find_one_thread): Update.
11615 (maybe_attach_thread): Update.
11616
07e059b5
VP
116172008-12-02 Pedro Alves <pedro@codesourcery.com>
11618
889bf7c5
PA
11619 * target.h (struct target_ops): Add qxfer_osdata member.
11620 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11621 and dirent.h.
11622 (linux_qxfer_osdata): New functions.
11623 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11624 callback.
11625 * server.c (handle_query): Handle "qXfer:osdata:read:".
11626 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11627 (buffer_xml_printf): New functions.
11628 * server.h (struct buffer): New.
11629 (buffer_grow_str, buffer_grow_str0): New macros.
11630 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11631 (buffer_xml_printf): Declare.
07e059b5 11632
4cab47ab
DE
116332008-11-24 Doug Evans <dje@google.com>
11634
11635 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11636
f142445f
DJ
116372008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11638
11639 * server.c (handle_v_run): Always use the supplied argument list.
11640
d0107bb6 116412008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11642
d0107bb6
BW
11643 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11644 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11645
2c4ad781
TJB
116462008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11647
11648 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11649 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11650 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11651 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11652 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11653 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11654 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11655 XML target descriptions.
11656 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11657 when inferior is running on an ISA 2.05 or later processor. Add
11658 special case to return offset for full 64-bit slot of FPSCR when
11659 in 32-bits.
11660
dfb64f85
DJ
116612008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11662
11663 * Makefile.in (SFILES, clean): Added sparc64 files.
11664 (reg-sparc64.o, reg-sparc64.c): New.
11665 * configure.srv (sparc*-*-linux*): New configuration.
11666 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11667 syscall arguments for SPARC.
11668 (regsets_store_inferior_registers): Likewise.
11669 * linux-sparc-low.c: New file.
11670
66b6e1dd
DE
116712008-10-21 Doug Evans <dje@google.com>
11672
11673 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11674 (READLINE_DIR,READLINE_DEP): Delete.
11675 (INTERNAL_CFLAGS): Update.
11676 (LINTFLAGS): Update.
11677
9b710a42
PA
116782008-10-10 Pedro Alves <pedro@codesourcery.com>
11679
11680 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11681 whole argv from the last run, not just argv[0].
11682
5822d809
PA
116832008-09-08 Pedro Alves <pedro@codesourcery.com>
11684
11685 * regcache.c (new_register_cache): Return NULL if the register
11686 cache size isn't known yet.
11687 (free_register_cache): Avoid dereferencing a NULL regcache.
11688
74aac56f
DJ
116892008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * configure.srv: Merge MIPS and MIPS64.
11692
400b20f5
MR
116932008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11694
11695 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11696
677c5bb1
LM
116972008-08-18 Luis Machado <luisgpm@br.ibm.com>
11698
11699 * Makefile.in: Add required vsx dependencies.
11700
11701 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11702 Declare init_registers_powerpc_vsx32l.
11703 Declare init_registers_powerpc_vsx64l.
11704 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11705 (ppc_arch_setup): Check for VSX in hwcap.
11706 (ppc_fill_vsxregset): New function.
11707 (ppc_store_vsxregset): New function.
11708 Add new VSX entry in regset_info target_regsets.
11709
11710 * configure.srv: Add new VSX dependencies.
11711
a6f3e723
SL
117122008-08-12 Pedro Alves <pedro@codesourcery.com>
11713
11714 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11715 (remote_open): Set or clear transport_is_reliable.
11716 (putpkt_binary): Don't expect acks in noack mode.
11717 (getpkt): Don't send ack/nac in noack mode.
11718 * server.c (handle_general_set): Handle QStartNoAckMode.
11719 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11720 qSupported.
11721 (main): Reset noack_mode on every connection.
11722 * server.h (noack_mode): Declare.
11723
a417dc56
RW
117242008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11725
11726 * Makefile.in (GDBREPLAY_OBS): New variable.
11727 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11728
3221518c
UW
117292008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11730 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11733 (usr_store_inferior_registers): Likewise.
11734 (regsets_store_inferior_registers): Likewise.
11735
ec56be1b
PA
117362008-07-31 Rolf Jansen <rj@surtec.com>
11737 Pedro Alves <pedro@codesourcery.com>
11738
11739 * configure.ac: Check for memmem declaration.
11740 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11741 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11742 (disable_packet_qfThreadInfo): Unconditionally compile.
11743 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11744 * configure, config.in: Regenerate.
11745
2fe5e3ff
DE
117462008-07-28 Doug Kwan <dougkwan@google.com>
11747
11748 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11749 (linux_write_memory): Remove declaration of errno.
11750
836acd6d
UW
117512008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11752
11753 * linux-low.c (handle_extended_wait): Do not use "status"
11754 variable uninitialized.
11755
aeba519e
PA
117562008-07-07 Pedro Alves <pedro@codesourcery.com>
11757
11758 * server.c (handle_v_attach): Inhibit reporting dll changes.
11759
db42f210
PA
117602008-06-27 Pedro Alves <pedro@codesourcery.com>
11761
11762 * remote-utils.c (prepare_resume_reply): If requested, don't
11763 output "thread:TID" in the T stop reply.
11764
11765 * server.c (disable_packet_vCont, disable_packet_Tthread)
11766 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11767 (handle_query): If requested, disable support for qC, qfThreadInfo
11768 and qsThreadInfo.
11769 (handle_v_requests): If requested, disable support for vCont.
11770 (gdbserver_show_disableable): New.
11771 (main): Handle --disable-packet and --disable-packet=LIST.
11772
11773 * server.h (disable_packet_vCont, disable_packet_Tthread)
11774 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11775
8e4c5421
CD
117762008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11777
11778 * server.c (gdbserver_usage): Mention --version.
11779
6e23a804
DJ
117802008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11781
11782 * Makefile.in (gdbreplay.o): New rule.
11783
90aa6a40
JM
117842008-06-06 Joseph Myers <joseph@codesourcery.com>
11785
11786 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11787 message, not gdbserver.
11788
c16158bc 117892008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11790 Nathan Sidwell <nathan@codesourcery.com>
11791 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11792
11793 * acinclude.m4: Include ../../config/acx.m4.
11794 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11795 * configure, config.in: Regenerate.
11796 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11797 * server.c (gdbserver_version): Print PKGVERSION.
11798 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11799 (main): Adjust gdbserver_usage calls.
11800 * gdbreplay.c (version, host_name): Add declarations.
11801 (gdbreplay_version, gdbreplay_usage): New.
11802 (main): Accept --version and --help options.
11803
aeb75bf5
DJ
118042008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11805
11806 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11807 (arm_breakpoint_at): Handle Thumb.
11808 (the_low_target): Add comment.
11809
76b233dd
UW
118102008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11811
11812 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11813
08388c79
DE
118142008-05-09 Doug Evans <dje@google.com>
11815
a3c83fae
DE
11816 * server.h (decode_search_memory_packet): Declare.
11817 * remote-utils.c (decode_search_memory_packet): New fn.
11818 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11819 (handle_search_memory): New fn.
11820 (handle_query): Process qSearch:memory packets.
11821
bb9c3d36
UW
118222008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11823
11824 * regcache.c (registers_length): Remove.
11825 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11826 full register packet.
11827 * regcache.h (registers_length): Remove prototype.
11828 * server.h (PBUFSIZ): Define to 16384.
11829
7284e1be
UW
118302008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11831
11832 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11833 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11834 powerpc-64l.o, and powerpc-altivec64l.o.
11835 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11836 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11837 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11838 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11839 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11840 to srv_xmlfiles.
11841
11842 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11843 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11844 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11845 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11846 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11847 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11848 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11849 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11850 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11851 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11852 (clean): Update.
11853
11854 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11855 (init_registers_powerpc_32l): ... this new prototype.
11856 (init_registers_powerpc_32): Remove, replace by ...
11857 (init_registers_powerpc_altivec32l): ... this new prototype.
11858 (init_registers_powerpc_e500): Remove, replace by ...
11859 (init_registers_powerpc_e500l): ... this new prototype.
11860 (init_registers_ppc64): Remove, replace by ...
11861 (init_registers_powerpc_64l): ... this new prototype.
11862 (init_registers_powerpc_64): Remove, replace by ...
11863 (init_registers_powerpc_altivec64l): ... this new prototype.
11864 (ppc_num_regs): Set to 73.
11865 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11866 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11867 (ppc_cannot_store_register): Handle orig_r3 and trap.
11868 (ppc_arch_setup): Update init_registers_... calls.
11869 (ppc_fill_gregset): Handle orig_r3 and trap.
11870
11871 * inferiors.c (clear_inferiors): Reset current_inferior.
11872
fdc59709
PB
118732008-04-23 Paolo Bonzini <bonzini@gnu.org>
11874
889bf7c5
PA
11875 * acinclude.m4: Add override.m4.
11876 * configure: Regenerate.
fdc59709 11877
c9b2f845
UW
118782008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11879
11880 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11881 initial call to init_register_ppc64.
11882
550512b8
UW
118832008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11884
43aaf8b6
PA
11885 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11886 single powerpc*-*-linux* case.
550512b8
UW
11887 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11888
b6430ec3
UW
118892008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11890
11891 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11892 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11893 from reg_xmlfiles.
11894 * linux-ppc-low.c: Include <elf.h>.
11895 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11896 (ppc_hwcap): New global variable.
11897 (ppc_regmap): Remove __SPE__ #ifdef sections.
11898 (ppc_regmap_e500): New global variable.
11899 (ppc_cannot_store_register): Update __SPE__ special case.
11900 (ppc_get_hwcap): New function.
11901 (ppc_arch_setup): Use it to determine whether inferior supports
11902 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11903 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11904 Do not access registers if target does not support AltiVec.
11905 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11906 Do not access registers if target does not support SPE.
11907 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11908
52fa2412
UW
119092008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11910
11911 * linux-low.c (disabled_regsets, num_regsets): New.
11912 (use_regsets_p): Delete.
11913 (linux_wait_for_process): Clear disabled_regsets.
11914 (regsets_fetch_inferior_registers): Check and set it.
11915 (regsets_store_inferior_registers): Likewise.
11916 (linux_fetch_registers, linux_store_registers): Do not use
11917 use_regsets_p.
11918 (initialize_low): Allocate disabled_regsets.
11919
e28b3332
DJ
119202008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11921
11922 * Makefile.in (LIBOBJS): New.
11923 (OBS): Use LIBOBJS.
11924 (memmem.o): New rule.
11925 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11926 * configure: Regenerated.
11927
4536995d
UW
119282008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11929
11930 * server.c (handle_query): Never return "unsupported" for
11931 qXfer:features:read queries.
11932
221c031f
UW
119332008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11934
11935 * server.c (get_features_xml): Fix inverted condition.
11936 (handle_query): Always support qXfer:feature:read.
11937
ccd213ac
DJ
119382008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11939
11940 * server.c (wrapper_argv): New.
11941 (start_inferior): Handle wrapper_argv. If set, expect an extra
11942 trap.
11943 (gdbserver_usage): Document --wrapper.
11944 (main): Parse --wrapper.
11945
6fe305f7
UW
119462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11947
11948 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11949 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11950 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11951 (ppc_set_pc): Likewise.
11952 (ppc_arch_setup): New function.
11953 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11954 of collect_register.
889bf7c5 11955 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11956
5b0a002e
UW
119572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11958
11959 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11960 instead of linux-ppc64-low.o.
11961 * linux-ppc64-low.c: Remove file.
11962 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11963 (linux-ppc64-low.o): Remove rule.
11964
11965 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11966 (init_registers_powerpc_64): Likewise.
11967 (ppc_regmap): Conditionally define depending on __powerpc64__.
11968 (ppc_cannot_store_register): Do not special-case "fpscr" when
11969 compiled on __powerpc64__.
11970 (ppc_collect_ptrace_register): New function.
11971 (ppc_supply_ptrace_register): New function.
11972 (ppc_breakpoint): Change type to "unsigned int".
11973 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11974 (the_low_target): Conditionally provide initializers for the
889bf7c5 11975 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11976 collect_ptrace_register and supply_ptrace_register members.
11977
9b4b61c8
UW
119782008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11979
11980 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11981 * server.c (gdbserver_xmltarget): Define.
11982 (get_features_xml): Use it to replace "target.xml" and arch_string.
11983
11984 * configure.srv: Remove srv_xmltarget. Add XML files that were
11985 mentioned there to srv_xmlfiles instead. Remove conditional tests
11986 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11987 srv_xmlfiles and srv_regobj to include all possible choices.
11988 * configure.ac (srv_xmltarget): Remove.
11989 (srv_xmlfiles): Do not add "target.xml".
11990 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11991 checks for supplementary target information.
11992 * configure: Regenerate.
11993 * Makefile.in (XML_TARGET): Remove.
11994 (target.xml): Remove rule.
11995 (clean): Do not clean up target.xml.
11996 (.PRECIOUS): Do not mention target.xml.
11997
11998 * target.h (struct target_ops): Remove arch_string member.
11999 * linux-low.c (linux_arch_string): Remove.
12000 (linux_target_ops): Remove arch_string initializer.
12001 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12002 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12003 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12004 * spu-low.c (spu_arch_string): Remove.
12005 (spu_target_ops): Remove arch_string initializer.
12006 * win32-low.c (win32_arch_string): Remove.
12007 (win32_target_ops): Remove arch_string initializer.
12008 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12009 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12010 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12011
ee1a7ae4
UW
120122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12013
12014 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12015 by collect_ptrace_register and supply_ptrace_register hooks.
12016 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12017 instead of checking for the_low_target.left_pad_xfer.
12018 (usr_store_inferior_registers): Use collect_ptrace_register callback
12019 instead of checking for the_low_target.left_pad_xfer.
12020
12021 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12022 (s390_supply_ptrace_register): Likewise.
12023 (s390_fill_gregset): Call s390_collect_ptrace_register.
12024 (the_low_target): Update.
12025
12026 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12027 (ppc_supply_ptrace_register): Likewise.
12028 (the_low_target): Update.
12029
12030 * linux-i386-low.c (the_low_target): Update.
12031 * linux-x86-64-low.c (the_low_target): Update.
12032
d61ddec4
UW
120332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12034
12035 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12036 reg-s390.o and reg-s390x.o.
12037
12038 * linux-low.c (new_inferior): New global variable.
12039 (linux_create_inferior, linux_attach): Set it.
12040 (linux_wait_for_process): Call the_low_target.arch_setup after the
12041 target has stopped for the first time.
12042 (initialize_low): Do not call the_low_target.arch_setup.
12043
12044 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12045 (s390_set_pc): Likewise.
12046 (s390_arch_setup): New function.
12047 (the_low_target): Use s390_arch_setup as arch_setup routine.
12048
12049 * regcache.c (realloc_register_cache): New function.
12050 (set_register_cache): Call it for each existing regcache.
12051
d05b4ac3
UW
120522008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12053
12054 * server.h (init_registers): Remove prototype.
12055
12056 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12057 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12058 instead of init_registers ().
12059 * linux-arm-low.c (init_registers_arm): Add prototype.
12060 (init_registers_arm_with_iwmmxt): Likewise.
12061 (the_low_target): Add initializer for arch_setup field.
12062 * linux-cris-low.c (init_registers_cris): Add prototype.
12063 (the_low_target): Add initializer for arch_setup field.
12064 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12065 (the_low_target): Add initializer for arch_setup field.
12066 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12067 (the_low_target): Add initializer for arch_setup field.
12068 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12069 (the_low_target): Add initializer for arch_setup field.
12070 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12071 (the_low_target): Add initializer for arch_setup field.
12072 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12073 (the_low_target): Add initializer for arch_setup field.
12074 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12075 (init_registers_mips64_linux): Likewise.
12076 (the_low_target): Add initializer for arch_setup field.
12077 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12078 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12079 (the_low_target): Add initializer for arch_setup field.
12080 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12081 (init_registers_powerpc_64): Likewise.
12082 (the_low_target): Add initializer for arch_setup field.
12083 * linux-s390-low.c (init_registers_s390): Add prototype.
12084 (init_registers_s390x): Likewise.
12085 (the_low_target): Add initializer for arch_setup field.
12086 * linux-sh-low.c (init_registers_sh): Add prototype.
12087 (the_low_target): Add initializer for arch_setup field.
12088 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12089 (the_low_target): Add initializer for arch_setup field.
12090 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12091 (the_low_target): Add initializer for arch_setup field.
12092
12093 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12094 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12095 instead of init_registers ().
12096 * win32-arm-low.c (init_registers_arm): Add prototype.
12097 (the_low_target): Add initializer for arch_setup field.
12098 * win32-i386-low.c (init_registers_i386): Add prototype.
12099 (the_low_target): Add initializer for arch_setup field.
12100
12101 * spu-low.c (init_registers_spu): Add prototype.
12102 (initialize_low): Call initialie_registers_spu () instead of
12103 initialize_registers ().
12104
fd96d250
PA
121052008-02-19 Pedro Alves <pedro@codesourcery.com>
12106
12107 * server.c (handle_v_requests): When handling the vRun and vAttach
12108 packets, if already debugging a process, don't kill it. Return an
12109 error instead.
12110
d41b6bb4
DJ
121112008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12112
12113 * server.c (handle_query): Correct length check.
12114
5ac588cf
PA
121152008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12116
12117 * win32-low.c (do_initial_child_stuff): Add process handle
12118 parameter. Set current_process_handle and current_process_id from the
12119 parameters. Clear globals.
12120 (win32_create_inferior): Don't set current_process_handle and
12121 current_process_id here. Instead pass them on the call to
12122 do_initial_child_stuff.
12123 (win32_attach): Likewise.
12124 (win32_clear_inferiors): New.
12125 (win32_kill): Don't close the current process handle or the
12126 current thread handle here. Instead call win32_clear_inferiors.
12127 (win32_detach): Don't open a new handle to the process. Call
12128 win32_clear_inferiors.
12129 (win32_join): Don't rely on current_process_handle; open a new
12130 handle using the process id.
12131 (win32_wait): Call win32_clear_inferiors when the inferior process
12132 has exited.
12133
ecd7ecbc
DJ
121342008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12135
12136 * server.c (monitor_show_help): Add "exit".
12137
1525d545
MG
121382008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12139
ecd7ecbc 12140 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12141 (clean): Add reg-xtensa.c.
12142 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12143 * configure.srv (xtensa*-*-linux*) New target.
12144 * linux-xtensa-low.c: New.
12145 * xtensa-xtregs.c: New.
1525d545 12146
59a016f0
PA
121472008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12148
12149 * hostio.c: Don't include errno.h.
12150 (errno_to_fileio_errno): Move to hostio-errno.
12151 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12152 error number outputting to the target->hostio_last_error callback.
12153 (hostio_packet_error): Use FILEIO_EINVAL directly.
12154 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12155 calls to hostio_error.
12156 * hostio-errno.c: New.
12157 * server.h (hostio_last_error_from_errno): Declare.
12158 * target.h (target_ops): Add hostio_last_error member.
12159 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12160 as hostio_last_error handler.
889bf7c5 12161 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12162 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12163 (wince_hostio_last_error): New functions.
12164 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12165 as hostio_last_error handler.
12166 (win32_target_ops) [!_WIN32_WCE]: Register
12167 hostio_last_error_from_errno as hostio_last_error handler.
12168 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12169 (hostio-errno.o): New rule.
12170 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12171 * configure.srv (srv_hostio_err_objs): New variable. Default to
12172 hostio-errno.o.
12173 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12174 * configure: Regenerate.
12175
2d717e4f
DJ
121762008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12177
12178 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12179 (linux_kill, linux_detach): Clean up the process list.
12180 * remote-utils.c (remote_open): Improve port number parsing.
12181 (putpkt_binary, input_interrupt): Only send interrupts if the target
12182 is running.
12183 * server.c (extended_protocol): Make static.
12184 (attached): Define earlier.
12185 (exit_requested, response_needed, program_argv): New variables.
12186 (target_running): New.
12187 (start_inferior): Clear attached here.
12188 (attach_inferior): Set attached here.
12189 (require_running): Define.
12190 (handle_query): Use require_running and target_running. Implement
12191 "monitor exit".
12192 (handle_v_attach, handle_v_run): New.
12193 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12194 (gdbserver_usage): Update.
12195 (main): Redo argument parsing. Handle --debug and --multi. Handle
12196 --attach along with other options or after the port. Save
12197 program_argv. Support no initial program. Resynchronize
12198 communication with GDB after an error. Handle "monitor exit".
12199 Use require_running and target_running. Always allow the extended
12200 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12201 restart in extended mode.
12202 * README: Refer to the GDB manual. Update --attach usage.
12203
7407e2de
AS
122042007-12-20 Andreas Schwab <schwab@suse.de>
12205
12206 * linux-low.c (STACK_SIZE): Define.
12207 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12208 (linux_test_for_tracefork): Likewise.
12209
b65d95c5
DJ
122102007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * linux-low.c (linux_wait_for_event): Update messages. Do not
12213 reinsert auto-delete breakpoints.
12214 * mem-break.c (struct breakpoint): Change return type of handler to
12215 int.
12216 (set_breakpoint_at): Update handler type.
12217 (reinsert_breakpoint_handler): Return 1 instead of calling
12218 delete_breakpoint.
12219 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12220 setting a new one.
12221 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12222 * mem-break.h (set_breakpoint_at): Update handler type.
12223 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12224 * win32-low.c (auto_delete_breakpoint): New.
12225 (get_child_debug_event): Use it.
12226
4e799345
DJ
122272007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12228
12229 * configure.ac: Check for pread and pwrite.
12230 * hostio.c (handle_pread): Fall back to lseek and read.
12231 (handle_pwrite): Fall back to lseek and write.
12232 * config.in, configure: Regenerated.
12233
27524b67
DJ
122342007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12235
12236 * server.c (myresume): Add own_buf argument.
12237 (main): Update calls.
12238
a20d5e98
DJ
122392007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12240
12241 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12242 * remote-utils.c (remote_open): Do not call disable_async_io.
12243 (block_async_io): Delete.
12244 (unblock_async_io): Make static.
12245 (initialize_async_io): New.
12246 * server.c (handle_v_cont): Handle async I/O here.
12247 (myresume): Likewise. Move other common resume tasks here...
12248 (main): ... from here. Call initialize_async_io. Disable async
12249 I/O before the main loop.
12250 * server.h (initialize_async_io): Declare.
12251 (block_async_io, unblock_async_io): Delete prototypes.
12252 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12253
b79d787e
DJ
122542007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12255
12256 * remote-utils.c (readchar): Allow binary data in received messages.
12257
d97903b2
PA
122582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12259
12260 * win32-low.c (attaching): New global.
12261 (win32_create_inferior): Clear the `attaching' global.
12262 (win32_attach): Set the `attaching' global.
12263 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12264 attaching. Only set a breakpoint at the entry point if not
12265 attaching.
12266
311de423
PA
122672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12268
12269 * server.c (main): Don't report dll events on the initial
12270 connection on attaches.
12271
6c2d16d2
PA
122722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12273
12274 * server.c (main): Relax numerical bases supported for the pid of
12275 the --attach command line argument.
12276
5ca906e6
PA
122772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12278
12279 * win32-low.c (win32_attach): Call OpenProcess before
12280 DebugActiveProcess, not after. Add last error output to error
12281 call.
12282
9c6c8194
PA
122832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12284
12285 * win32-low.c (win32_get_thread_context)
12286 (win32_set_thread_context): New functions.
12287 (thread_rec): Use win32_get_thread_context.
12288 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12289 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12290 field.
12291
4d5d1aaa
PA
122922007-12-03 Leo Zayas
12293 Pedro Alves <pedro_alves@portugalmail.pt>
12294
12295 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12296 global variables.
12297 (child_add_thread): Minor cleanup.
12298 (child_continue): Resume artificially suspended threads before
12299 calling ContinueDebugEvent.
12300 (suspend_one_thread): New.
12301 (fake_breakpoint_event): New.
12302 (get_child_debug_event): Change return type to int. Check here if
12303 gdb sent an interrupt request. If a soft interrupt was requested,
12304 fake a breakpoint event. Return 0 if there is no event to handle,
12305 and 1 otherwise.
12306 (win32_wait): Don't check here if gdb sent an interrupt request.
12307 Ensure there is a valid event to handle.
12308 (win32_request_interrupt): Add soft interruption method as last
12309 resort.
12310
c436e841
PA
123112007-12-03 Leo Zayas
12312 Pedro Alves <pedro_alves@portugalmail.pt>
12313
12314 * win32-low.h (win32_thread_info): Add descriptions to the
12315 structure members. Replace `suspend_count' counter by a
12316 `suspended' flag.
12317 * win32-low.c (thread_rec): Update condition of when to get the
12318 context from the inferior. Rely on ContextFlags being set if it
12319 has already been retrieved. Only suspend the inferior thread if
12320 we haven't already. Warn if that fails.
12321 (continue_one_thread): s/suspend_count/suspended/. Only call
12322 ResumeThread once. Warn if that fails.
12323
e7b5fa67
PA
123242007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12325
12326 * win32-low.c (win32_wait): Don't read from the inferior when it
12327 has already exited.
12328
a385171d
PA
123292007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12330
12331 * Makefile.in (win32_low_h): New variable.
12332 (win32-low.o): Add dependency on $(win32_low_h).
12333 (win32-arm-low.o, win32-i386-low.o): New rules.
12334
f80c84b3
DJ
123352007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12336
12337 * hostio.c: Correct copyright year.
12338
a6b151f1
DJ
123392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12340
12341 * Makefile.in (OBS): Add hostio.o.
12342 (hostio.o): New rule.
12343 * server.h (handle_vFile): Declare.
12344 * hostio.c: New file.
12345 * server.c (handle_v_requests): Take packet_len and new_packet_len
12346 for binary packets. Call handle_vFile.
12347 (main): Update call to handle_v_requests.
12348
f9387fc3
DJ
123492007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12350
12351 * linux-low.c: Include <sched.h>.
12352
51c2684e
DJ
123532007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12354
12355 * linux-low.c (linux_tracefork_grandchild): New.
12356 (linux_tracefork_child): Use clone.
12357 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12358
75f83163
JB
123592007-10-31 Joel Brobecker <brobecker@adacore.com>
12360
12361 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12362
da5898ce
DJ
123632007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12364
12365 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12366
24a09b5f
DJ
123672007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12368
12369 * inferiors.c (change_inferior_id): Delete.
12370 (add_pid_to_list, pull_pid_from_list): New.
12371 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12372 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12373 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12374 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12375 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12376 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12377 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12378 (using_threads): Always set to 1.
12379 (handle_extended_wait): New.
12380 (add_process): Do not set TID.
12381 (linux_create_inferior): Set must_set_ptrace_flags.
12382 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12383 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12384 (linux_thread_alive): Rename TID argument to LWPID.
12385 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12386 (linux_wait_for_event): Do not use TID or check using_threads. Update
12387 call to dead_thread_notify. Call handle_extended_wait.
12388 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12389 (send_sigstop): Delete sigstop_sent.
12390 (wait_for_sigstop): Avoid TID.
12391 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12392 (linux_test_for_tracefork): New.
12393 (linux_lookup_signals): Use thread_db_active and
12394 linux_supports_tracefork_flag.
12395 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12396 * linux-low.h (get_process_thread): Avoid TID.
12397 (struct process_ifo): Move thread_known and tid to the end. Remove
12398 sigstop_sent.
12399 (linux_attach_lwp, thread_db_init): Update prototypes.
12400 * server.h (change_inferior_id): Delete prototype.
12401 (add_pid_to_list, pull_pid_from_list): New prototypes.
12402 * thread-db.c (thread_db_use_events): New.
12403 (find_first_thread): Rename to...
12404 (find_one_thread): ...this. Update callers and messages. Do not
12405 call fatal. Check thread_db_use_events. Do not call
12406 change_inferior_id or new_thread_notify.
12407 (maybe_attach_thread): Update. Do not call new_thread_notify.
12408 (thread_db_init): Set thread_db_use_events. Check use_events.
12409 * utils.c (fatal, warning): Correct message prefix.
12410
30ed0a8f
DJ
124112007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12412
12413 * Makefile.in (clean): Remove new files.
12414 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12415 (powerpc-64.o, powerpc-64.c): New rules.
12416 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12417 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12418 with SPE.
12419 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12420 SPE targets.
12421 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12422 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12423 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12424 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12425 (target_regsets): Add AltiVec and SPE register sets.
12426 * configure.ac: Check for AltiVec and SPE.
12427 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12428 (ppc_fill_vrregset, ppc_store_vrregset): New.
12429 (target_regsets): Add AltiVec register set.
12430 * configure: Regenerated.
12431
fd462a61
DJ
124322007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12433
12434 * linux-low.c (O_LARGEFILE): Define.
12435 (linux_read_memory): Use /proc/PID/mem.
12436 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12437 * configure, config.in: Regenerated.
12438
69f223ed
DJ
124392007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12440
12441 * linux-low.c (linux_wait_for_event): Do not pass signals while
12442 single-stepping.
12443
aec18585
PA
124442007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12445
12446 * win32-low.c (create_process): New.
12447 (win32_create_inferior): Use create_process instead of
12448 CreateProcess. If create_process failed retry appending an ".exe"
12449 suffix. Store the GetLastError result immediatelly after
12450 create_process calls and use it on the call to error.
12451
34d86ddd
PA
124522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12453
12454 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12455
5a0e3bd0
JB
124562007-08-23 Joel Brobecker <brobecker@adacore.com>
12457
12458 * configure.ac: Switch license to GPLv3.
12459
f88c79e6
MS
124602007-08-01 Michael Snyder <msnyder@access-company.com>
12461
12462 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12463
6b3d9b83
PA
124642007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12465
12466 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12467 typedef.
12468 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12469 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12470 CloseToolhelp32Snapshot.
12471 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12472 CloseToolhelp32Snapshot.
12473
c588c53c
MS
124742007-07-27 Michael Snyder <michael.snyder@access-company.com>
12475
12476 * server.c (main): Check for inferior exit before main loop.
12477
aa0403d9
PA
124782007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12479
12480 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12481 instead of on tmp_desc.
12482
255e7678
DJ
124832007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12484 Daniel Jacobowitz <dan@codesourcery.com>
12485
12486 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12487 (add_thread): Minor cleanups.
12488 (clear_inferiors): Move lower in the file. Clear the DLL
12489 list.
12490 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12491 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12492 (xml_escape_text): New.
12493 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12494 for qSupported.
12495 (handle_v_cont): Report errors.
12496 (gdbserver_version): Update.
12497 (main): Correct size of own_buf. Do not report initial DLL events.
12498 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12499 (unloaded_dll, xml_escape_text): New.
12500 * win32-low.c (enum target_waitkind): Update comments.
12501 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12502 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12503 (win32_EnumProcessModules, win32_GetModuleInformation)
12504 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12505 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12506 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12507 (win32_Module32First, win32_Module32Next, load_toolhelp)
12508 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12509 (get_child_debug_event): Handle DLL events.
12510 (win32_wait): Likewise.
12511
0d37add9
DJ
125122007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12513
12514 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12515 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12516
45e2715e
PA
125172007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12518
12519 * win32-low.c (handle_output_debug_string): Ignore event if not
12520 waiting.
12521
c5674cf1
PA
125222007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12523
12524 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12525
2bbe3cc1
DJ
125262007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12527
12528 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12529
ae13219e
DJ
125302007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12531
12532 * inferiors.c (change_inferior_id): Add comment.
12533 * linux-low.c (check_removed_breakpoint): Add an early
12534 prototype. Improve debug output.
12535 (linux_attach): Doc update.
12536 (linux_detach_one_process, linux_detach): Clean up before releasing
12537 each process.
12538 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12539 * linux-low.h (struct process_info): Doc improvement.
12540 * mem-break.c (delete_all_breakpoints): New.
12541 * mem-break.h (delete_all_breakpoints): New prototype.
12542 * thread-db.c (find_first_thread): New.
12543 (thread_db_create_event): Call it instead of
12544 thread_db_find_new_threads. Clean up unused variables.
12545 (maybe_attach_thread): Remove first thread handling.
12546 (thread_db_find_new_threads): Use find_first_thread.
12547 (thread_db_get_tls_address): Likewise.
12548
4105de34
DJ
125492007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12550
12551 * thread-db.c (thread_db_find_new_threads): Add prototype.
12552 (thread_db_create_event): Check for the main thread before adding
12553 a new thread.
12554 (maybe_attach_thread): Only enable event reporting if TID == 0.
12555 (thread_db_get_tls_address): Check for new threads.
12556
2b876972
DJ
125572007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12558
12559 * linux-low.c (linux_create_inferior): Try execv before execvp.
12560 * spu-low.c (spu_create_inferior): Likewise.
12561
7a245884
DJ
125622007-06-13 Mike Frysinger <vapier@gentoo.org>
12563
12564 * linux-low.c (linux_create_inferior): Change execv to execvp.
12565 * spu-low.c (spu_create_inferior): Likewies.
12566
117ce543
DJ
125672007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12568
12569 * Makefile.in (clean): Clean new files instead of deleted ones.
12570 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12571 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12572 rules.
12573 * configure.srv: Specify XML files and new regformats for MIPS and
12574 MIPS64 GNU/Linux.
12575 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12576 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12577 an entry for the restart register.
12578 (mips_cannot_fetch_register, mips_cannot_store_register)
12579 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12580 register names to match the XML descriptions.
12581 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12582 restart register instead of $0.
12583
0e7f50da
UW
125842007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12585 Markus Deuling <deuling@de.ibm.com>
12586
12587 * remote-utils.c (decode_xfer_write): New function.
12588 * server.h (decode_xfer_write): Add prototype.
12589 * server.c (handle_query): Add PACKET_LEN argument. Support
12590 qXfer:spu:read and qXfer:spu:write packets.
12591 (main): Pass packet_len to handle_query.
12592 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12593 * target.h (target_ops): Add qxfer_spu.
12594
374c1d38
UW
125952007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12596
12597 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12598 accessing non-seekable spufs files.
12599
bb63802a
UW
126002007-05-16 Markus Deuling <deuling@de.ibm.com>
12601
889bf7c5 12602 * server.c (handle_query): Add reply for qC packet.
bb63802a 12603
7390519e
PA
126042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12605 Leo Zayas <lerele@champenstudios@com>
12606
12607 * server.h (check_remote_input_interrupt_request): New function.
12608 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12609 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12610 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12611 (check_remote_input_interrupt_request): New function.
12612 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12613 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12614 winapi_GenerateConsoleCtrlEvent): New typedefs.
12615 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12616 to 250 ms.
12617 (win32_wait): Check for remote interrupt request
12618 with check_remote_input_interrupt_request.
12619 (win32_request_interrupt): New function.
12620 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12621
34b34921
PA
126222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12623
12624 * win32-low.c (debug_registers_changed,
12625 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12626 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12627 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12628 (thread_rec): Get context using the low target.
12629 (child_add_thread): Call thread_added on the low target,
12630 which does the same thing.
12631 (regptr): Delete.
12632 (do_initial_child_stuff): Remove debug registers references.
12633 Set context using the low target. Resume threads after
12634 setting the contexts.
12635 (child_continue): Remove dead variable. Remove debug
12636 registers references.
12637 (child_fetch_inferior_registers): Go through the low target.
12638 (do_child_store_inferior_registers): Remove.
12639 (child_store_inferior_registers): Go through the low target.
12640 (win32_resume): Remove debug registers references.
12641 Set context using the low target.
12642 (handle_exception): Change return type to void. Don't record
12643 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12644 first chance exception.
889bf7c5 12645 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12646 goto loop. Always return after waiting for debug event.
12647 (win32_wait): Convert to switch statement. Handle spurious
12648 events.
12649
12650 * win32-i386-low.c (debug_registers_changed,
12651 debug_registers_used): New.
12652 (initial_stuff): Rename to ...
12653 (i386_initial_stuff): ... this. Clear debug registers
12654 state variables.
12655 (store_debug_registers): Delete.
12656 (i386_get_thread_context): New.
12657 (load_debug_registers): Delete.
12658 (i386_set_thread_context): New.
12659 (i386_thread_added): New.
12660 (single_step): Rename to ...
12661 (i386_single_step): ... this.
12662 (do_fetch_inferior_registers): Rename to ...
12663 (i386_fetch_inferior_register): ... this.
12664 (i386_store_inferior_register): New.
12665 (the_low_target): Adapt to new interface.
12666
12667 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12668 (arm_get_thread_context): New.
12669 (arm_set_thread_context): New.
12670 (regptr): New.
12671 (do_fetch_inferior_registers): Rename to ...
12672 (arm_fetch_inferior_register): ... this.
12673 (arm_store_inferior_register): New.
12674 (arm_wince_breakpoint): Reimplement as unsigned long.
12675 (arm_wince_breakpoint_len): Define.
12676 (the_low_target): Adapt to new interface.
12677
12678 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12679 load_debug_registers. Add get_thread_context, set_thread_context,
12680 thread_added and store_inferior_register. Rename
12681 fetch_inferior_registers to fetch_inferior_register.
12682 (regptr): Remove declaration.
12683
dd6953e1
PA
126842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12685
12686 * linux-low.c (linux_detach): Change return type to int. Return 0.
12687 * spu-low.c (spu_detach): Likewise.
12688
444d6139
PA
126892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12690
12691 * target.h (target_ops): Change return type of detach to int.
12692 Add join.
12693 (join_inferior): New.
12694 * server.c (main): Don't skip detach support on mingw32.
12695 If the inferior doesn't support detaching return error.
12696 Call join_inferior instead of using waitpid.
12697 * linux-low.c (linux_join): New.
12698 (linux_target_op): Add linux_join.
12699 * spu-low.c (spu_join): New.
12700 (spu_target_ops): Add spu_join.
12701 * win32-low.c (win32_detach): Adapt to new interface.
12702 Reopen current_process_handle before detaching. Issue a child
12703 resume before detaching.
12704 (win32_join): New.
12705 (win32_target_op): Add win32_join.
12706
1d5315fe
PA
127072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12708
12709 * win32-low.c (win32-attach): Fix return value.
12710 * target.h (target_ops): Describe ATTACH return values.
12711
bf914831
PA
127122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12713
12714 * win32-low.c (GETPROCADDRESS): Define.
12715 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12716 (winapi_DebugSetProcessKillOnExit): Likewise.
12717 (win32_create_inferior): Force usage of ansi CreateProcessA.
12718 (win32_attach): Use GETPROCADDRESS.
12719 (win32_detach): Likewise.
12720
f72f3e60
PA
127212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12722
12723 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12724
ed50f18f
PA
127252007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12726
12727 * win32-low.c: Commit leftover changes from 2007-03-29.
12728
0c2ead7e
DJ
127292007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12730
12731 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12732 fields short instead of int. Add explicit padding.
12733 (i387_cache_to_fsave): Remove unnecessary casts.
12734 (i387_fsave_to_cache): Doc fix.
12735 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12736
73725ff3
DJ
127372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12738
12739 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12740 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12741
d99f33d8
PA
127422007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12743
12744 * configure.srv (arm*-*-mingw32ce*): Move near the other
12745 arm targets.
12746
68070c10
PA
127472007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12748
2482afc6 12749 * configure.ac: Add errno checking.
68070c10
PA
12750 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12751 sys/file.h and malloc.h.
12752 (AC_CHECK_DECLS): Add perror.
12753 (srv_mingwce): Handle.
2482afc6 12754 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12755 win32-i386-low.o to srv_tgtobj.
12756 (i[34567]86-*-mingw*): Likewise.
12757 (arm*-*-mingw32ce*): Add case.
12758 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12759 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12760 [__MINGW32CE__] (strerror): New function.
12761 [__MINGW32CE__] (errno): Define to GetLastError.
12762 [__MINGW32CE__] (COUNTOF): New macro.
12763 (remote_open): Remove extra close call.
12764 * mem-break.c (delete_breakpoint_at): New function.
12765 * mem-break.h (delete_breakpoint_at): Declare.
12766 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12767 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12768 [USE_WIN32API] (read, write): Add char* casts.
12769 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12770 * server.h: Include wincecompat.h on Windows CE.
12771 [HAVE_ERRNO_H]: Check.
12772 (perror): Declare if not declared.
12773 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12774 (perror_with_name): Remove errno declaration.
12775 * wincecompat.h: New.
12776 * wincecompat.c: New.
12777 * win32-low.h: New.
12778 * win32-arm-low.c: New.
12779 * win32-i386-low.c: New.
12780 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12781 (OUTMSG2): Make it safe.
12782 (_T): New macro.
12783 (COUNTOF): New macro.
12784 (NUM_REGS): Get it from the low target.
12785 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12786 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12787 (thread_rec): Let low target handle debug registers.
12788 (child_add_thread): Likewise.
12789 (child_init_thread_list): Likewise.
12790 (continue_one_thread): Likewise.
12791 (regptr): New.
12792 (do_child_fetch_inferior_registers): Move to ...
12793 * win32-i386-low.c: ... here, and rename to ...
12794 (do_fetch_inferior_registers): ... this.
889bf7c5 12795 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12796 Go through the low target.
12797 (do_child_store_inferior_registers): Use regptr.
12798 (strwinerror): New function.
12799 (win32_create_inferior): Handle Windows CE.
12800 Use strwinerror instead of strerror on Windows error
12801 codes. Add program to the error output.
12802 Don't close the main thread handle on Windows CE.
12803 (win32_attach): Use coredll.dll on Windows CE.
12804 (win32_kill): Close current process and current
12805 thread handles.
12806 (win32_detach): Use coredll.dll on Windows CE.
12807 (win32_resume): Let low target handle debug registers, and
12808 step request.
12809 (handle_exception): Add/Remove initial breakpoint. Avoid
12810 non-existant WSTOPSIG on Windows CE.
12811 (win32_read_inferior_memory): Cast to remove warning.
12812 (win32_arch_string): Go through the low target.
12813 (initialize_low): Call set_breakpoint_data with the low
12814 target's breakpoint.
12815 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12816 FOP_REGNUM, mappings): Move to ...
12817 * win32-i386-low.c: ... here.
12818 * win32-low.c (win32_thread_info): Move to ...
12819 * win32-low.h: ... here.
12820 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12821 win32-arm-low.c and wincecompat.c.
12822 (all:): Add $EXEEXT.
12823 (install-only:): Likewise.
12824 (gdbserver:): Likewise.
12825 (gdbreplay:): Likewise.
12826 * config.in: Regenerate.
12827 * configure: Regenerate.
12828
41093d81
PA
128292007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12830
12831 * win32-low.c: Rename typedef thread_info to
12832 win32_thread_info throughout.
12833
544afa54
PA
128342007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12835
12836 * win32-i386-low.c: Rename to ...
12837 * win32-low.c: ... this.
12838 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12839 * Makefile.in: Likewise.
12840
bce7165d
PA
128412007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12842
12843 * remote-utils.c (monitor_output): Constify msg parameter.
12844 * server.h (monitor_output): Likewise.
12845 * win32-i386-low.c (handle_output_debug_string): New.
12846 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12847 handle_output_debug_string.
12848 (get_child_debug_event): Likewise.
12849
506c7aa0
DJ
128502007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12851
12852 * server.c (main): Correct strtoul check.
12853
42c81e2a
DJ
128542007-03-27 Jon Ringle <jon@ringle.org>
12855
12856 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12857
9453113a
DJ
128582007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12859
12860 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12861
64a69107
DJ
128622007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12863
12864 * terminal.h: Check HAVE_SGTTY_H.
12865
128662007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12867
12868 * remote-utils.c (remote_open): Print out the assigned port number.
12869
c74d0ad8
DJ
128702007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12871
12872 * remote-utils.c (monitor_output): New function.
12873 * server.c (debug_threads): Define here.
12874 (monitor_show_help): New function.
12875 (handle_query): Handle qRcmd.
12876 (main): Do not handle 'd' packet.
12877 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12878 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12879 of debug_threads.
12880
de7c3b4a
PA
128812007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12882
12883 * Makefile.in (EXEEXT): New.
12884 (clean): Use $(EXEEXT).
12885
ef57601b
PA
128862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12887
12888 * target.h (target_ops): Rename send_signal to request_interrupt,
12889 and remove enum target_signal parameter.
12890 * linux-low.c (linux_request_interrupt): Rename from
12891 linux_send_signal, and always send SIGINT.
12892 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12893 and always send SIGINT.
12894 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12895 of send_signal.
12896 (input_interrupt): Likewise.
12897
820f2bda
PA
128982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12899
12900 * server.c (get_features_xml): Check if target implemented
12901 arch_string.
12902 * win32-i386-low.c (win32_arch_string): New.
12903 (win32_target_ops): Add win32_arch_string as arch_string member.
12904
ab39bf24
UW
129052007-02-22 Markus Deuling <deuling@de.ibm.com>
12906
12907 * spu-low.c (spu_arch_string): New.
12908 (spu_target_ops): Add spu_arch_string.
12909
61ff6e04
DJ
129102007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12911
12912 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12913 * configure.ac: Do not check for terminal.h.
12914 * configure, config.in: Regenerated.
12915
fb1e4ffc
DJ
129162007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * Makefile.in (OBS): Add $(XML_BUILTIN).
12919 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12920 (clean): Update.
12921 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12922 (arm-with-iwmmxt.c): New.
12923 * config.in, configure: Regenerate.
12924 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12925 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12926 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12927 (arm*-*-linux*): Add iWMMXt and regset support.
12928 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12929 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12930 (arm_store_wmmxregset, target_regsets): New.
12931 * server.c (get_features_xml): Take annex argument. Check builtin
12932 XML documents.
12933 (handle_query): Handle multiple annexes.
12934
0f48aa01
DJ
129352007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12936
12937 * remote-utils.c [USE_WIN32API] (read, write): Define.
12938 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12939 write.
12940
23181151
DJ
129412007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12942
12943 * linux-i386-low.c (the_low_target): Set arch_string.
12944 * linux-x86-64-low.c (the_low_target): Likewise.
12945 * linux-low.c (linux_arch_string): New.
12946 (linux_target_ops): Add it.
12947 * linux-low.h (struct linux_target_ops): Add arch_string.
12948 * server.c (write_qxfer_response): Use const void * for DATA.
12949 (get_features_xml): New.
12950 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12951 * target.h (struct target_ops): Add arch_string method.
12952
9d606399
DJ
129532007-01-03 Denis Pilat <denis.pilat@st.com>
12954 Daniel Jacobowitz <dan@codesourcery.com>
12955
12956 * linux-low.c (linux_kill): Handle being called with no threads.
12957 * win32-i386-low.c (win32_kill): Likewise.
12958 (get_child_debug_event): Clear current_process_handle.
12959
129602006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12961 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * remote-utils.c (remote_open): Check the type of specified
12964 serial port devices before opening them.
12965 * server.c (main): Kill the inferior if an error occurs during
12966 the first remote_open.
12967
a5e13d24
DJ
129682006-12-05 Markus Deuling <deuling@de.ibm.com>
12969
12970 * README: Update supported targets.
12971
186947f7
DJ
129722006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * Makefile.in (clean): Remove reg-mips64.c.
12975 (reg-mips64.c, reg-mips64.o): New rules.
12976 * configure.srv: Handle mips64. Include regset support for mips.
12977 * linux-mips-low.c (union mips_register): New.
12978 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12979 (mips_breakpoint, mips_breakpoint_at): Use int.
12980 (mips_collect_register, mips_supply_register)
12981 (mips_collect_register_32bit, mips_supply_register_32bit)
12982 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12983 (mips_store_fpregset, target_regsets): New.
12984 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12985
a13e2c95
UW
129862006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12987
12988 * configure.srv: Add target "spu*-*-*".
12989 * Makefile.in (clean): Remove reg-spu.c.
12990 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12991 * spu-low.c: New file.
12992
cb7283db
DJ
129932006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12994
12995 * configure.ac: Correct td_thr_tls_get_addr test.
12996 * configure: Regenerated.
12997
89be2091
DJ
129982006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12999
13000 * linux-low.c (linux_wait_for_event): Reformat. Use the
13001 pass_signals array.
13002 * remote-utils.c (decode_address_to_semicolon): New.
13003 * server.c (pass_signals, handle_general_set): New.
13004 (handle_query): Mention QPassSignals for qSupported.
13005 (main): Call handle_general_set.
13006 * server.h (pass_signals, decode_address_to_semicolon): New.
13007
000ef4f0
DJ
130082006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13009
13010 * server.c (handle_query): Correct error handling for read_auxv.
13011
b7149293
UW
130122005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13013
13014 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13015 and srv_linux_thread_db to yes.
13016 * linux-s390-low.c (s390_fill_gregset): New function.
13017 (target_regsets): Define data structure.
13018
dae5f5cf
DJ
130192006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13020
13021 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13022 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13023 * config.in, configure: Regenerated.
13024 * inferiors.c (gdb_id_to_thread): New function.
13025 (gdb_id_to_thread_id): Use it.
13026 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13027 * linux-low.h (struct process_info): Add th member.
13028 (thread_db_get_tls_address): New prototype.
13029 * remote-utils.c (decode_address): Make non-static.
13030 * server.c (handle_query): Handle qGetTLSAddr.
13031 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13032 * target.h (struct target_ops): Add get_tls_address.
13033 * thread-db.c (maybe_attach_thread): Save the thread handle.
13034 (thread_db_get_tls_address): New.
13035
32ca6d61
DJ
130362006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13037
13038 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13039 (linux_resume_one_process): Take a siginfo_t *. Update all
13040 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13041 (struct pending_signals): Add a siginfo_t.
13042 (linux_wait_for_process): Always set last_status.
13043 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13044 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13045 * linux-low.h (struct process_info): Add last_status.
13046
5ffff7c1
DJ
130472006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * remote-utils.c (try_rle): New function.
13050 (putpkt_binary): Use it.
13051
8695c747
DJ
130522006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13053
13054 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13055 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13056 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13057 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13058 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13059 point registers.
13060
290fadea
RS
130612006-08-08 Richard Sandiford <richard@codesourcery.com>
13062
13063 * server.c (terminal_fd): New variable.
13064 (old_foreground_pgrp): Likewise.
13065 (restore_old_foreground_pgrp): New function.
13066 (start_inferior): Record the terminal file descriptor in terminal_fd
13067 and its original foreground group in old_foreground_pgrp. Register
13068 restore_old_foreground_pgrp with atexit().
13069
9f2e1e63
DJ
130702006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13071
13072 * server.c (handle_query): Correct qPart to qXfer.
13073
b80864fb
DJ
130742006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13075
13076 * configure.ac: Check for more headers which are missing on
13077 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13078 * configure.srv: Add Cygwin and mingw32.
13079 * remote-utils.c: Don't include headers unconditionally which
13080 are missing on mingw32. Include <winsock.h> for mingw32.
13081 (remote_open): Adjust for mingw32 support. Flush
13082 standard error after writing to it.
13083 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13084 (unblock_async_io, enable_async_io, disable_async_io)
13085 (readchar, getpkt): Update for Winsock support.
13086 (prepare_resume_reply): Expect a protocol signal number.
13087 * server.c: Disable <sys/wait.h> on mingw32.
13088 (start_inferior): Adjust for mingw32 support. Flush
13089 standard error after writing to it.
13090 (attach_inferior): Likewise. Use protocol signal
13091 numbers.
13092 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13093 and names.
13094 * win32-i386-low.c: New file.
13095 * Makefile.in (XM_CLIBS): Set.
13096 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13097 (win32-i386-low.o): New dependency rule.
13098 * linux-low.c (linux_wait): Use target signal numbers.
13099 * target.h (struct target_ops): Doc fix.
13100 * server.h (target_signal_to_name): New prototype.
13101 * gdbreplay.c: Don't include headers unconditionally which
13102 are missing on mingw32. Include <winsock.h> for mingw32.
13103 (remote_close, remote_open): Adjust for Winsock support.
13104 * configure, config.in: Regenerated.
13105
0876f84a
DJ
131062006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13107
13108 * server.c (decode_xfer_read, write_qxfer_response): New.
13109 (handle_query): Take a packet length argument. Handle
13110 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13111 the qSupported response.
13112 (main): Update call to handle_query.
13113
01f9e8fa
DJ
131142006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13117 (putpkt_binary): Renamed from putpkt and adjusted for binary
13118 data.
13119 (putpkt): New wrapper for putpkt_binary.
13120 (readchar): Don't mask off the high bit.
13121 (decode_X_packet): New function.
13122 * server.c (main): Call putpkt_binary if a handler sets the packet
13123 length. Save the length of the incoming packet. Handle 'X'.
13124 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13125
be2a5f71
DJ
131262006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13127
13128 * server.c (handle_query): Handle qSupported.
13129
ea025f5f
DJ
131302006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13131
13132 * remote-utils.c (all_symbols_looked_up): New variable.
13133 (look_up_one_symbol): Check it.
13134 * server.h (look_up_one_symbol): New declaration.
13135 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13136
9308fc88
DJ
131372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13138
13139 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13140 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13141 (PTRACE_GET_THREAD_AREA): Define.
13142 (ps_get_thread_area): New function.
13143
52fb6437
NS
131442006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13145
13146 * configure.srv (m68k*-*-uclinux*): New target.
13147 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13148 (linux_resume_one_process): Remove extraneous cast.
13149 (linux_read_offsets): New.
13150 (linux_target_op): Add linux_read_offsets on mmuless systems.
13151 * server.c (handle_query): Add qOffsets logic.
13152 * target.h (struct target_ops): Add read_offsets.
13153
21b0f40c
DJ
131542006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13155
13156 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13157 (PTRACE_GET_THREAD_AREA): Define.
13158 (ps_get_thread_area): New function.
13159 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13160 (linux-x86-64-low.o): Update.
13161
0050a760
DJ
131622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13163
13164 * configure.ac: Remove checks for prfpregset_t.
13165 * gdb_proc_service.h: New file.
13166 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13167 new "gdb_proc_service.h".
13168 * proc-service.c: Likewise.
13169 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13170 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13171 * Makefile.in (gdb_proc_service_h): Updated.
13172 * configure, config.in: Regenerated.
13173
b92a518e
DJ
131742006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13175
13176 * remote-utils.c (prepare_resume_reply): Move declaration
13177 of gdb_id_from_wait to the top of the block.
13178
545587ee
DJ
131792006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13180
13181 * linux-low.c (regsets_store_inferior_registers): Read the regset
13182 from the target before filling it.
13183
9db87ebd
DJ
131842006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13185
13186 * server.c (attach_inferior): Return SIGTRAP for a successful
13187 attach.
13188
dd24457d
DJ
131892006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13190
13191 * Makefile.in (OBS): Add version.o.
13192 (STAGESTUFF): Delete.
13193 (version.o): Add dependencies.
13194 (version.c): Replace rule.
13195 (clean): Remove version.c.
13196 * server.c (gdbserver_version): New.
13197 (gdbserver_usage): Use printf.
13198 (main): Handle --version and --help.
13199 * server.h (version, host_name): Add declarations.
13200
6f0f660e
EZ
132012005-12-23 Eli Zaretskii <eliz@gnu.org>
13202
889bf7c5
PA
13203 * linux-arm-low.c:
13204 * linux-arm-low.c:
13205 * inferiors.c:
13206 * i387-fp.h:
13207 * i387-fp.c:
13208 * gdbreplay.c:
13209 * regcache.c:
13210 * proc-service.c:
13211 * mem-break.h:
13212 * mem-break.c:
13213 * linux-x86-64-low.c:
13214 * linux-sh-low.c:
13215 * linux-s390-low.c:
13216 * linux-ppc64-low.c:
13217 * linux-ppc-low.c:
13218 * linux-mips-low.c:
13219 * linux-m68k-low.c:
13220 * linux-m32r-low.c:
13221 * linux-low.h:
13222 * linux-low.c:
13223 * linux-ia64-low.c:
13224 * linux-i386-low.c:
13225 * linux-crisv32-low.c:
13226 * thread-db.c:
13227 * terminal.h:
13228 * target.h:
13229 * target.c:
13230 * server.h:
13231 * server.c:
13232 * remote-utils.c:
13233 * regcache.h:
13234 * utils.c:
13235 * Makefile.in:
13236 * configure.ac:
6f0f660e
EZ
13237 * gdbserver.1: Add (C) after Copyright. Update the FSF
13238 address.
13239
9d1fb177
DJ
132402005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13241
13242 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13243 (arm_breakpoint_at): Recognize both breakpoints.
13244 (the_low_target): Use the correct breakpoint instruction.
13245
011a70c2
DJ
132462005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13247
13248 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13249 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13250 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13251 (the_low_target): Update.
13252
7fb85e41
AS
132532005-10-25 Andreas Schwab <schwab@suse.de>
13254
13255 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13256
13257 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13258 (ia64_num_regs): Reduce to 462.
13259
3db0444b
DJ
132602005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13261
13262 * acinclude.m4: Correct quoting.
13263 * aclocal.m4: Regenerated.
13264
13265 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13266 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13267 (thread_db_init): Call thread_db_err_str.
13268 * configure.ac: Check for TD_VERSION.
13269 * config.in, configure: Regenerated.
13270
bee0189a
DJ
132712005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13272
13273 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13274
e9d25b98
DJ
132752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13276
13277 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13278 is not available. Define HAVE_PTRACE_GETREGS if it is.
13279 * config.in, configure: Regenerated.
13280 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13281 * linux-i386-low.c, linux-m68k-low.c: Update to use
13282 HAVE_PTRACE_GETREGS.
13283 * linux-low.c (regsets_fetch_inferior_registers)
13284 (regsets_store_inferior_registers): Only return 0 if we processed
13285 GENERAL_REGS.
13286 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13287 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13288
a06660f7
DJ
132892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13290
13291 * inferiors.c (struct thread_info): Add gdb_id.
13292 (add_thread): Add gdb_id argument.
13293 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13294 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13295 calls to add_thread.
13296 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13297 * server.c (handle_query): Use thread_to_gdb_id.
13298 (handle_v_cont, main): Use gdb_id_to_thread_id.
13299 * server.h (add_thread): Update prototype.
13300 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13301 prototypes.
13302
5a1f5858
DJ
133032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13304
13305 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13306 left-padded registers.
13307 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13308 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13309
e122f1f5
SE
133102005-07-01 Steve Ellcey <sje@cup.hp.com>
13311
13312 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13313 * configure: Regenerate.
13314 * config.in: Regenerate.
13315 * server.h (NEED_DECLARATION_STRERROR):
13316 Replace with !HAVE_DECL_STRERROR.
13317
d592fa2f
DJ
133182005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13319
13320 * linux-low.c (linux_wait, linux_send_signal): Don't test
13321 an unsigned long variable for > 0 if it could be MAX_ULONG.
13322 * server.c (myresume): Likewise.
13323 * target.c (set_desired_inferior): Likewise.
13324
ccbd4912
MK
133252005-06-13 Mark Kettenis <kettenis@gnu.org>
13326
13327 * configure.ac: Simplify and improve check for socklen_t.
13328 * configure, config.in: Regenerate.
13329
f450004a
DJ
133302005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * acconfig.h: Remove.
13333 * configure.ac: Add a test for socklen_t. Use three-argument
13334 AC_DEFINE throughout.
13335 * config.in: Regenerated using autoheader 2.59.
13336 * configure: Regenerated.
13337
13338 * gdbreplay.c (socklen_t): Provide a default.
13339 (remote_open): Use socklen_t.
13340 * remote-utils.c (socklen_t): Provide a default.
13341 (remote_open): Use socklen_t.
13342 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13343 unsigned char.
13344
13345 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13346 char for buffers.
13347 * linux-low.c (linux_read_memory, linux_write_memory)
13348 (linux_read_auxv): Likewise.
13349 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13350 (check_mem_write): Likewise.
13351 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13352 Likewise.
13353 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13354 (registers_from_string, register_data): Likewise.
13355 * server.c (handle_query, main): Likewise.
13356 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13357 (decode_M_packet): Likewise.
13358 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13359 * target.h (struct target_ops): Update read_memory, write_memory,
13360 and read_auxv.
13361 (read_inferior_memory, write_inferior_memory): Update.
13362 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13363 to unsigned char *.
13364 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13365 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13366 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13367 linux-s390-low.c, linux-sh-low.c: Update for changes in
13368 read_inferior_memory and the_low_target->breakpoint.
13369
eee84df1
DJ
133702005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13371
13372 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13373 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13374 * configure.srv: Add powerpc64-*-linux*.
13375 * linux-ppc64-low.c: New file.
13376
45b134e5
OF
133772005-05-23 Orjan Friberg <orjanf@axis.com>
13378
13379 * linux-cris-low.c: New file with support for CRIS.
13380 * linux-crisv32-low.c: Ditto for CRISv32.
13381 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13382 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13383 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13384 reg-crisv32.o, and reg-crisv32.c to make rules.
13385 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13386 recognized targets.
13387
48d93c75
UW
133882005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13389
13390 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13391 of sizeof (PTRACE_XFER_TYPE).
13392 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13393
e013ee27
OF
133942005-05-12 Orjan Friberg <orjanf@axis.com>
13395
889bf7c5 13396 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13397 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13398 pointers for hardware watchpoint support.
13399 * linux-low.h (struct linux_target_ops): Ditto.
13400 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13401 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13402 to linux_target_ops.
13403 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13404 reply packet.
13405 * server.c (main): Recognize 'Z' and 'z' packets.
13406
b0ded00b
UW
134072005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13408
13409 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13410 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13411 (the_low_target): Add new members.
13412
8643e2ad
DJ
134132005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13414
13415 * proc-service.c (ps_lgetregs): Search all_processes instead of
13416 all_threads.
13417
fc620387
DJ
134182005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13419
13420 * server.c (start_inferior): Change return type to int.
13421 (attach_inferior): Change sigptr to int *.
13422 (handle_v_cont, handle_v_requests): Change signal to int *.
13423 (main): Change signal to int.
13424
134252005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13426
13427 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13428 * configure.srv: Add m32r*-*-linux*.
13429 * linux-m32r-low.c: New file.
13430
e0e76420
DJ
134312005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13432
13433 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13434
a1928bad
DJ
134352005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13438 Take unsigned long arguments for PIDs.
13439 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13440 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13441 (wait_for_sigstop, linux_resume_one_process)
13442 (regsets_fetch_inferior_registers, linux_send_signal)
13443 (linux_read_auxv): Likewise. Update the types of variables holding
13444 PIDs. Update format string specifiers.
13445 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13446 * remote-utils.c (prepare_resume_reply): Likewise.
13447 * server.c (cont_thread, general_thread, step_thread)
13448 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13449 unsigned long.
13450 (handle_query): Update format specifiers.
13451 (handle_v_cont, main): Use strtoul for thread IDs.
13452 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13453 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13454 (general_thread, step_thread, thread_from_wait)
13455 (old_thread_from_wait): Update.
13456 * target.h (struct thread_resume): Use unsigned long for THREAD.
13457 (struct target_ops): Use unsigned long for arguments to attach and
13458 thread_alive.
13459
dcdb98d2
DJ
134602005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13461
13462 * acinclude.m4: Include bfd/bfd.m4 directly.
13463 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13464 <agriffis@toolchain.org>.
13465 * aclocal.m4, configure: Regenerated.
13466
bec39cab
AC
134672005-01-07 Andrew Cagney <cagney@gnu.org>
13468
13469 * configure.ac: Rename configure.in, require autoconf 2.59.
13470 * configure: Re-generate.
13471
434c4c77
DJ
134722004-12-08 Daniel Jacobowitz <dan@debian.org>
13473
13474 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13475 LIBS when finished.
13476 * aclocal.m4: Regenerated.
13477 * configure: Regenerated.
13478
db1d3e1b
AS
134792004-11-21 Andreas Schwab <schwab@suse.de>
13480
13481 * linux-m68k-low.c (m68k_num_gregs): Define.
13482 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13483 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13484 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13485 (m68k_breakpoint_at): New. Add to the_low_target.
13486
13487 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13488 srv_linux_thread_db to yes.
13489
43360365
JB
134902004-10-20 Joel Brobecker <brobecker@gnat.com>
13491
13492 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13493 (ARCH_SET_FS): Likewise.
13494 (ARCH_GET_FS): Likewise.
13495 (ARCH_GET_GS): Likewise.
13496
fd500816
DJ
134972004-10-16 Daniel Jacobowitz <dan@debian.org>
13498
13499 * linux-i386-low.c (ps_get_thread_area): New.
13500 * linux-x86-64-low.c (ps_get_thread_area): New.
13501 * linux-low.c: Include <sys/syscall.h>.
13502 (linux_kill_one_process): Don't kill the first thread here.
13503 (linux_kill): Kill the first thread here.
13504 (kill_lwp): New function.
13505 (send_sigstop, linux_send_signal): Use it.
13506 * proc-service.c: Clean up #ifdefs.
13507 (fpregset_info): Delete.
13508 (ps_lgetregs): Update and enable implementation.
13509 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13510 implementations.
13511 * remote-utils.c (struct sym_cache, symbol_cache): New.
13512 (input_interrupt): Print a clearer message.
13513 (async_io_enabled): New variable.
13514 (enable_async_io, disable_async_io): Use it. Update comments.
13515 (look_up_one_symbol): Use the symbol cache.
13516 * thread-db.c (thread_db_look_up_symbols): New function.
13517 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13518
f6de3c42
DJ
135192004-10-16 Daniel Jacobowitz <dan@debian.org>
13520
13521 * configure.in: Test for -rdynamic.
13522 * configure: Regenerated.
13523 * Makefile (INTERNAL_LDFLAGS): New.
13524 (gdbserver, gdbreplay): Use it.
13525
2c0fc042
AC
135262004-09-02 Andrew Cagney <cagney@gnu.org>
13527
13528 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13529
075b3282
DJ
135302004-03-23 Daniel Jacobowitz <drow@mvista.com>
13531
13532 * linux-low.c (linux_wait): Clear all_processes list also.
13533
fa6a77dc
DJ
135342004-03-12 Daniel Jacobowitz <drow@mvista.com>
13535
13536 * linux-low.c: Include <errno.h>. Remove extern declaration of
13537 errno.
13538
6d782a97
DJ
135392004-03-12 Daniel Jacobowitz <drow@mvista.com>
13540
13541 * gdbreplay.c, server.h, utils.c: Update copyright years.
13542
3a7fb99b
DJ
135432004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13544
13545 * server.c (main): Print child status or termination signal from
13546 variable 'signal', not 'sig'.
13547
c3e735a6
DJ
135482004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13549
13550 * linux-low.c (linux_read_memory): Change return type to
13551 int. Check for and return error from ptrace().
13552 * target.c (read_inferior_memory): Change return type to int. Pass
13553 back return status from the_target->read_memory().
13554 * target.h (struct target_ops): Adapt *read_memory() prototype.
13555 Update comment.
13556 (read_inferior_memory): Adapt prototype.
13557 * server.c (main): Return an error packet if
13558 read_inferior_memory() returns an error.
13559
a59d1c82
DJ
135602004-03-04 Daniel Jacobowitz <drow@mvista.com>
13561
13562 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13563 Unify with other clean targets.
13564
dc3f8883
DJ
135652004-02-29 Daniel Jacobowitz <drow@mvista.com>
13566
13567 * server.c (handle_v_cont): Call set_desired_inferior.
13568
89a208da
DJ
135692004-02-29 Daniel Jacobowitz <drow@mvista.com>
13570
13571 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13572
62ea82f5
DJ
135732004-02-29 Daniel Jacobowitz <drow@mvista.com>
13574
13575 * linux-low.c (linux_wait): Unblock async I/O.
13576 (linux_resume): Block and enable async I/O.
13577 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13578 * server.h (block_async_io, unblock_async_io): Add prototypes.
13579
6910d122
DJ
135802004-02-29 Daniel Jacobowitz <drow@mvista.com>
13581
13582 * remote-utils.c (remote_open): Print a status notice after
13583 opening a TCP port.
13584 * server.c (attach_inferior): Print a status notice after
13585 attaching.
13586
135872004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13588
13589 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13590
c89dc5d4
DJ
135912004-02-26 Daniel Jacobowitz <drow@mvista.com>
13592
13593 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13594 error packet.
13595 * server.c, target.h: Update copyright years.
13596
4b8dad4a
RM
135972004-02-25 Roland McGrath <roland@redhat.com>
13598
13599 * target.h (struct target_ops): New member `read_auxv'.
13600 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13601 * linux-low.c (linux_read_auxv): New function.
13602 (linux_target_ops): Initialize `read_auxv' member to that.
13603
d7446758
JB
136042004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13605
13606 Committed by Jim Blandy <jimb@redhat.com>.
13607
13608 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13609 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13610 instead of GPR_SIZE to distiguish s390 and s390x targets.
13611
5544ad89
DJ
136122004-01-31 Daniel Jacobowitz <drow@mvista.com>
13613
13614 * linux-low.c: Update copyright year.
13615 (check_removed_breakpoint): Clear pending_is_breakpoint.
13616 (linux_set_resume_request, linux_queue_one_thread)
13617 (resume_status_pending_p): New functions.
13618 (linux_continue_one_thread): Use process->resume.
13619 (linux_resume): Only resume threads if there are no pending events.
13620 * linux-low.h (struct process_info): Add resume request
13621 pointer.
13622
2a68b70e
DJ
136232004-01-30 Daniel Jacobowitz <drow@mvista.com>
13624
13625 * regcache.c (new_register_cache): Clear the allocated register
13626 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13627
64386c31
DJ
136282003-10-13 Daniel Jacobowitz <drow@mvista.com>
13629
13630 * linux-low.c (linux_resume): Take a struct thread_resume *
13631 argument.
13632 (linux_wait): Update call.
13633 (resume_ptr): New static variable.
13634 (linux_continue_one_thread): Renamed from
13635 linux_continue_one_process. Use resume_ptr.
13636 (linux_resume): Use linux_continue_one_thread.
13637 * server.c (handle_v_cont, handle_v_requests): New functions.
13638 (myresume): New function.
13639 (main): Handle 'v' case.
13640 * target.h (struct thread_resume): New type.
13641 (struct target_ops): Change argument of "resume" to struct
13642 thread_resume *.
13643 (myresume): Delete macro.
13644
c938e9b0
L
136452003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13646
13647 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13648 (uninstall): Support DESTDIR.
13649
7f313d07
BC
13650Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13651
13652 * configure.srv: Add xscale*linux copy of arm*linux entry.
13653
3b2fc2ea
DJ
136542003-07-24 Daniel Jacobowitz <drow@mvista.com>
13655
13656 * linux-arm-low.c (arm_reinsert_addr): New function.
13657 (the_low_target): Add arm_reinsert_addr.
13658
1c0a559e
MK
136592003-07-08 Mark Kettenis <kettenis@gnu.org>
13660
13661 * mem-break.c: Remove whitespace at end of file.
13662
43d5792c
DJ
136632003-06-28 Daniel Jacobowitz <drow@mvista.com>
13664
13665 * configure.in: Check whether we need to prototype strerror.
13666 * server.h: Optionally prototype strerror.
13667 * gdbreplay.c (perror_with_name): Use strerror.
13668 * linux-low.c (linux_attach_lwp): Use strerror.
13669 * utils.c (perror_with_name): Use strerror.
13670 * config.in, configure: Regenerated.
13671
c8a86edf
DJ
136722003-06-28 Daniel Jacobowitz <drow@mvista.com>
13673
13674 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13675 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13676
73d37363
DJ
136772003-06-20 Daniel Jacobowitz <drow@mvista.com>
13678
13679 * Makefile.in (SFILES): Update.
13680 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13681 low-sun3.c: Remove files.
13682
6ad8ae5c
DJ
136832003-06-17 Daniel Jacobowitz <drow@mvista.com>
13684
13685 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13686 (linux_detach_one_process, linux_detach): New functions.
13687 (linux_target_ops): Add linux_detach.
13688 * server.c (main): Handle 'D' packet.
13689 * target.h (struct target_ops): Add "detach" member.
13690 (detach_inferior): Define.
13691
1581182a
MK
136922003-06-13 Mark Kettenis <kettenis@gnu.org>
13693
13694 From Kelley Cook <kelleycook@wideopenwest.com>:
13695 * configure.srv: Accept i[34567]86 variants.
13696
e5379b03
DJ
136972003-06-05 Daniel Jacobowitz <drow@mvista.com>
13698
13699 * linux-low.c (linux_wait_for_event): Correct comment typos.
13700 (linux_resume_one_process): Call check_removed_breakpoint.
13701 (linux_send_signal): New function.
13702 (linux_target_ops): Add linux_send_signal.
13703 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13704 of kill.
13705 * target.h (struct target_ops): Add send_signal.
13706
2ff29de4
JB
137072003-05-29 Jim Blandy <jimb@redhat.com>
13708
13709 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13710 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13711 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13712 away part of the register's value.
13713
254787d4
DJ
137142003-03-26 Daniel Jacobowitz <drow@mvista.com>
13715
13716 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13717 (linux_wait_for_event, linux_init_signals): Likewise.
13718
94e10508
DJ
137192003-03-17 Daniel Jacobowitz <drow@mvista.com>
13720
13721 * configure.in: Check for stdlib.h.
13722 * configure: Regenerated.
13723 * config.in: Regenerated.
13724
4c0711e0
DJ
137252003-01-04 Andreas Schwab <schwab@suse.de>
13726
13727 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13728
ef66e766
AC
137292003-01-02 Andrew Cagney <ac131313@redhat.com>
13730
13731 * Makefile.in: Remove obsolete code.
13732
a1358604
DJ
137332002-11-20 Daniel Jacobowitz <drow@mvista.com>
13734
13735 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13736 defined(PT_FPR0_HI).
13737
23ce3b1c
DJ
137382002-11-17 Stuart Hughes <seh@zee2.com>
13739
13740 * linux-arm-low.c (arm_num_regs): Increase.
13741 (arm_regmap): Include status register.
13742
137432002-11-17 Daniel Jacobowitz <drow@mvista.com>
13744
13745 * linux-low.c (register_addr): Remove incorrect -1 check.
13746
a9fa9f7d
DJ
137472002-08-29 Daniel Jacobowitz <drow@mvista.com>
13748
13749 * linux-low.c (linux_create_inferior): Call setpgid. Return
13750 the new PID.
13751 (unstopped_p, linux_signal_pid): Remove.
13752 (linux_target_ops): Remove linux_signal_pid.
13753 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13754 global instead of target method.
13755 * target.h (struct target_ops): Remove signal_pid. Update comment
13756 for create_inferior.
13757 * server.c (signal_pid): New variable.
13758 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13759 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13760 (attach_inferior): Set signal_pid.
13761
17574093
DJ
137622002-08-23 Daniel Jacobowitz <drow@mvista.com>
13763
13764 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13765
137662002-08-20 Jim Blandy <jimb@redhat.com>
13767
13768 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13769 default for this.
13770
137712002-08-01 Andrew Cagney <cagney@redhat.com>
13772
13773 * Makefile.in: Make chill references obsolete.
13774
137752002-07-24 Kevin Buettner <kevinb@redhat.com>
13776
13777 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13778 * configure: Regenerate.
13779 * config.in: Regenerate.
13780
137812002-07-09 David O'Brien <obrien@FreeBSD.org>
13782
13783 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13784 (perror_with_name, remote_close, remote_open, expect, play): Static.
13785
137862002-07-04 Michal Ludvig <mludvig@suse.cz>
13787
4b8dad4a 13788 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13789 byte offsets instead of an array of indexes.
13790 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13791
137922002-06-13 Daniel Jacobowitz <drow@mvista.com>
13793
13794 * regcache.c: Add comment.
13795
137962002-06-11 Daniel Jacobowitz <drow@mvista.com>
13797
13798 * thread-db.c: New file.
13799 * proc-service.c: New file.
13800 * acinclude.m4: New file.
13801 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13802 proc-service.o, and thread-db.o.
13803 (linux-low.o): Add USE_THREAD_DB.
13804 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13805 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13806 * aclocal.m4: Regenerated.
13807 * config.in: Regenerated.
13808 * configure: Regenerated.
13809 * configure.in: Check for proc_service.h, sys/procfs.h,
13810 thread_db.h, and linux/elf.h headrs.
13811 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13812 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13813 Check for -lthread_db and thread support.
13814 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13815 PowerPC, and SuperH.
13816 * i387-fp.c: Constify arguments.
13817 * i387-fp.h: Likewise.
13818 * inferiors.c: (struct thread_info): Renamed from
13819 `struct inferior_info'. Remove PID member. Use generic inferior
13820 list header. All uses updated.
13821 (inferiors, signal_pid): Removed.
13822 (all_threads): New variable.
13823 (get_thread): Define.
13824 (add_inferior_to_list): New function.
13825 (for_each_inferior): New function.
13826 (change_inferior_id): New function.
13827 (add_inferior): Removed.
13828 (remove_inferior): New function.
13829 (add_thread): New function.
13830 (free_one_thread): New function.
13831 (remove_thread): New function.
13832 (clear_inferiors): Use for_each_inferior and free_one_thread.
13833 (find_inferior): New function.
13834 (find_inferior_id): New function.
13835 (inferior_target_data): Update argument type.
13836 (set_inferior_target_data): Likewise.
13837 (inferior_regcache_data): Likewise.
13838 (set_inferior_regcache_data): Likewise.
13839 * linux-low.c (linux_bp_reinsert): Remove.
13840 (all_processes, stopping_threads, using_thrads)
13841 (struct pending_signals, debug_threads, pid_of): New.
13842 (inferior_pid): Replace with macro.
13843 (struct inferior_linux_data): Remove.
13844 (get_stop_pc, add_process): New functions.
13845 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13846 Use add_process and add_thread.
13847 (linux_attach_lwp): New function, based on old linux_attach. Use
13848 add_process and add_thread. Set stop_expected for new threads.
13849 (linux_attach): New function.
13850 (linux_kill_one_process): New function.
13851 (linux_kill): Kill all LWPs.
13852 (linux_thread_alive): Use find_inferior_id.
13853 (check_removed_breakpoints, status_pending_p): New functions.
13854 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13855 Update. Use WNOHANG. Wait for cloned processes also. Update process
13856 struct for the found process.
13857 (linux_wait_for_event): New function.
13858 (linux_wait): Use it. Support LWPs.
13859 (send_sigstop, wait_for_sigstop, stop_all_processes)
13860 (linux_resume_one_process, linux_continue_one_process): New functions.
13861 (linux_resume): Support LWPs.
13862 (REGISTER_RAW_SIZE): Remove.
13863 (fetch_register): Use register_size instead. Call supply_register.
13864 (usr_store_inferior_registers): Likewise. Call collect_register.
13865 Fix recursive case.
13866 (regsets_fetch_inferior_registers): Improve error message.
13867 (regsets_store_inferior_registers): Add debugging.
13868 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13869 (unstopped_p, linux_signal_pid): New functions.
13870 (linux_target_ops): Add linux_signal_pid.
13871 (linux_init_signals): New function.
13872 (initialize_low): Call it. Initialize using_threads.
13873 * regcache.c (inferior_regcache_data): Add valid
13874 flag.
13875 (get_regcache): Fetch registers lazily. Add fetch argument
13876 and update all callers.
13877 (regcache_invalidate_one, regcache_invalidate): New
13878 functions.
13879 (new_register_cache): Renamed from create_register_cache.
13880 Return the new regcache.
13881 (free_register_cache): Change argument to a void *.
13882 (registers_to_string, registers_from_string): Call get_regcache
13883 with fetch flag set.
13884 (register_data): Make static. Pass fetch flag to get_regcache.
13885 (supply_register): Call get_regcache with fetch flag clear.
13886 (collect_register): Call get_regcache with fetch flag set.
13887 (collect_register_as_string): New function.
13888 * regcache.h: Update.
13889 * remote-utils.c (putpkt): Flush after debug output and use
13890 stderr.
13891 Handle input interrupts while waiting for an ACK.
13892 (input_interrupt): Use signal_pid method.
13893 (getpkt): Flush after debug output and use stderr.
13894 (outreg): Use collect_register_as_string.
13895 (new_thread_notify, dead_thread_notify): New functions.
13896 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13897 and general_thread.
13898 (look_up_one_symbol): Flush after debug output.
13899 * server.c (step_thread, server_waiting): New variables.
13900 (start_inferior): Don't use signal_pid. Update call to mywait.
13901 (attach_inferior): Update call to mywait.
13902 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13903 (main): Don't fetch/store registers explicitly. Use
13904 set_desired_inferior. Support proposed ``Hs'' packet. Update
13905 calls to mywait.
13906 * server.h: Update.
13907 (struct inferior_list, struct_inferior_list_entry): New.
13908 * target.c (set_desired_inferior): New.
13909 (write_inferior_memory): Constify.
13910 (mywait): New function.
13911 * target.h: Update.
13912 (struct target_ops): New signal_pid method.
13913 (mywait): Removed macro, added prototype.
13914
13915 * linux-low.h (regset_func): Removed.
13916 (regset_fill_func, regset_store_func): New.
13917 (enum regset_type): New.
13918 (struct regset_info): Add type field. Use new operation types.
13919 (struct linux_target_ops): stop_pc renamed to get_pc.
13920 Add decr_pc_after_break and breakpoint_at.
13921 (get_process, get_thread_proess, get_process_thread)
13922 (strut process_info, all_processes, linux_attach_lwp)
13923 (thread_db_init): New.
13924
13925 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13926 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13927 (the_low_target): Add new members.
13928 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13929 (i386_store_fpxregset): Constify.
13930 (target_regsets): Add new kind identifier.
13931 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13932 (i386_set_pc): Add debugging.
13933 (i386_breakpoint_at): New function.
13934 (the_low_target): Add new members.
13935 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13936 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13937 (mips_breakpoint_at): New.
13938 (the_low_target): Add new members.
13939 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13940 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13941 (the_low_target): Add new members.
13942 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13943 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13944 (the_low_target): Add new members.
13945 * linux-x86-64-low.c (target_regsets): Add new kind
13946 identifier.
13947
139482002-05-15 Daniel Jacobowitz <drow@mvista.com>
13949
13950 From Martin Pool <mbp@samba.org>:
13951 * server.c (gdbserver_usage): New function.
13952 (main): Call it.
13953
139542002-05-14 Daniel Jacobowitz <drow@mvista.com>
13955
13956 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13957 stop_at -> stop_pc.
13958
139592002-05-04 Andrew Cagney <ac131313@redhat.com>
13960
13961 * Makefile.in: Remove obsolete code.
13962
139632002-04-24 Michal Ludvig <mludvig@suse.cz>
13964
13965 * linux-low.c (regsets_fetch_inferior_registers),
13966 (regsets_store_inferior_registers): Removed cast to int from
13967 ptrace() calls.
13968 * regcache.h: Added declaration of struct inferior_info.
13969
139702002-04-20 Daniel Jacobowitz <drow@mvista.com>
13971
13972 * inferiors.c (struct inferior_info): Add regcache_data.
13973 (add_inferior): Call create_register_cache.
13974 (clear_inferiors): Call free_register_cache.
13975 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13976 * regcache.c (struct inferior_regcache_data): New.
13977 (registers): Remove.
13978 (get_regcache): New function.
13979 (create_register_cache, free_register_cache): New functions.
13980 (set_register_cache): Don't initialize the register cache here.
13981 (registers_to_string, registers_from_string, register_data): Call
13982 get_regcache.
13983 * regcache.h: Add prototypes.
13984 * server.h: Likewise.
13985
139862002-04-20 Daniel Jacobowitz <drow@mvista.com>
13987
13988 * mem-break.c: New file.
13989 * mem-break.h: New file.
13990 * Makefile.in: Add mem-break.o rule; update server.h
13991 dependencies.
13992 * inferiors.c (struct inferior_info): Add target_data
13993 member.
13994 (clear_inferiors): Free target_data member if set.
13995 (inferior_target_data, set_inferior_target_data): New functions.
13996 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13997 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13998 * linux-low.c (linux_bp_reinsert): New variable.
13999 (struct inferior_linux_data): New.
14000 (linux_create_inferior): Use set_inferior_target_data.
14001 (linux_attach): Likewise. Call add_inferior.
14002 (linux_wait_for_one_inferior): New function.
14003 (linux_wait): Call it.
14004 (linux_write_memory): Add const.
14005 (initialize_low): Call set_breakpoint_data.
14006 * linux-low.h (struct linux_target_ops): Add breakpoint
14007 handling members.
14008 * server.c (attach_inferior): Remove extra add_inferior
14009 call.
14010 * server.h: Include mem-break.h. Update inferior.c
14011 prototypes.
14012 * target.c (read_inferior_memory)
14013 (write_inferior_memory): New functions.
14014 * target.h (read_inferior_memory)
14015 (write_inferior_memory): Change macros to prototypes.
14016 (struct target_ops): Update comments. Add const to write_memory
14017 definition.
14018
140192002-04-11 Daniel Jacobowitz <drow@mvista.com>
14020
14021 * linux-low.c (usr_store_inferior_registers): Support
14022 registers which are allowed to fail to store.
14023 * linux-low.h (linux_target_ops): Likewise.
14024 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14025 (ppc_cannot_store_register): FPSCR may not be storable.
14026
140272002-04-09 Daniel Jacobowitz <drow@mvista.com>
14028
14029 * server.h: Include <string.h> if HAVE_STRING_H.
14030 * ChangeLog: Correct paths in last ChangeLog entry.
14031
140322002-04-09 Daniel Jacobowitz <drow@mvista.com>
14033
14034 * linux-low.h: Remove obsolete prototypes.
14035 (struct linux_target_ops): New.
14036 (extern the_low_target): New.
14037 * linux-low.c (num_regs, regmap): Remove declarations.
14038 (register_addr): Use the_low_target explicitly.
14039 (fetch_register): Likewise.
14040 (usr_fetch_inferior_registers): Likewise.
14041 (usr_store_inferior_registers): Likewise.
14042 * linux-arm-low.c (num_regs): Remove.
14043 (arm_num_regs): Define.
14044 (arm_regmap): Renamed from regmap, made static.
14045 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14046 made static.
14047 (arm_cannot_store_register): Renamed from cannot_store_register,
14048 made static.
14049 (the_low_target): New.
14050 * linux-i386-low.c (num_regs): Remove.
14051 (i386_num_regs): Define.
14052 (i386_regmap): Renamed from regmap, made static.
14053 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14054 made static.
14055 (i386_cannot_store_register): Renamed from cannot_store_register,
14056 made static.
14057 (the_low_target): New.
14058 * linux-ia64-low.c (num_regs): Remove.
14059 (ia64_num_regs): Define.
14060 (ia64_regmap): Renamed from regmap, made static.
14061 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14062 made static.
14063 (ia64_cannot_store_register): Renamed from cannot_store_register,
14064 made static.
14065 (the_low_target): New.
14066 * linux-m68k-low.c (num_regs): Remove.
14067 (m68k_num_regs): Define.
14068 (m68k_regmap): Renamed from regmap, made static.
14069 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14070 made static.
14071 (m68k_cannot_store_register): Renamed from cannot_store_register,
14072 made static.
14073 (the_low_target): New.
14074 * linux-mips-low.c (num_regs): Remove.
14075 (mips_num_regs): Define.
14076 (mips_regmap): Renamed from regmap, made static.
14077 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14078 made static.
14079 (mips_cannot_store_register): Renamed from cannot_store_register,
14080 made static.
14081 (the_low_target): New.
14082 * linux-ppc-low.c (num_regs): Remove.
14083 (ppc_num_regs): Define.
14084 (ppc_regmap): Renamed from regmap, made static.
14085 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14086 made static.
14087 (ppc_cannot_store_register): Renamed from cannot_store_register,
14088 made static.
14089 (the_low_target): New.
14090 * linux-s390-low.c (num_regs): Remove.
14091 (s390_num_regs): Define.
14092 (s390_regmap): Renamed from regmap, made static.
14093 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14094 made static.
14095 (s390_cannot_store_register): Renamed from cannot_store_register,
14096 made static.
14097 (the_low_target): New.
14098 * linux-sh-low.c (num_regs): Remove.
14099 (sh_num_regs): Define.
14100 (sh_regmap): Renamed from regmap, made static.
14101 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14102 made static.
14103 (sh_cannot_store_register): Renamed from cannot_store_register,
14104 made static.
14105 (the_low_target): New.
14106 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14107 (the_low_target): New.
14108
141092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14110
14111 * Makefile.in: Add stamp-h target.
14112 * configure.in: Create stamp-h.
14113 * configure: Regenerated.
14114
141152002-04-09 Daniel Jacobowitz <drow@mvista.com>
14116
14117 * inferiors.c: New file.
14118 * target.c: New file.
14119 * target.h: New file.
14120 * Makefile.in: Add target.o and inferiors.o. Update
14121 dependencies.
14122 * linux-low.c (inferior_pid): New static variable,
14123 moved from server.c.
14124 (linux_create_inferior): Renamed from create_inferior.
14125 Call add_inferior. Return 0 on success instead of a PID.
14126 (linux_attach): Renamed from myattach.
14127 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14128 (linux_thread_alive): Renamed from mythread_alive.
14129 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14130 child dies.
14131 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14132 (regsets_store_inferior_registers): Correct error message.
14133 Add missing ``return 0''.
14134 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14135 (linux_store_registers): Renamed from store_inferior_registers.
14136 (linux_read_memory): Renamed from read_inferior_memory.
14137 (linux_write_memory): Renamed from write_inferior_memory.
14138 (linux_target_ops): New structure.
14139 (initialize_low): Call set_target_ops ().
14140 * remote-utils.c (unhexify): New function.
14141 (hexify): New function.
14142 (input_interrupt): Send signals to ``signal_pid''.
14143 * server.c (inferior_pid): Remove.
14144 (start_inferior): Update create_inferior call.
14145 (attach_inferior): Call add_inferior.
14146 (handle_query): New function.
14147 (main): Call handle_query for `q' packets.
14148 * server.h: Include "target.h". Remove obsolete prototypes.
14149 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14150
141512002-04-09 Daniel Jacobowitz <drow@mvista.com>
14152
14153 * Makefile.in: Add WARN_CFLAGS. Update configury
14154 dependencies.
14155 * configure.in: Check for <string.h>
14156 * configure: Regenerate.
14157 * config.in: Regenerate.
14158 * gdbreplay.c: Include needed system headers.
14159 (remote_open): Remove strchr prototype.
14160 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14161 * regcache.c (supply_register): Change buf argument to const void *.
14162 (supply_register_by_name): Likewise.
14163 (collect_register): Change buf argument to void *.
14164 (collect_register_by_name): Likewise.
14165 * regcache.h: Add missing prototypes.
14166 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14167 * server.c (handle_query): New function.
14168 (attached): New static variable, moved out of main.
14169 (main): Quiet longjmp clobber warnings.
14170 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14171 * utils.c (error): Remove NORETURN.
14172 (fatal): Likewise.
This page took 2.037279 seconds and 4 git commands to generate.