LD/testsuite: Add STB_GNU_UNIQUE cross-linker test
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
35fd2deb
PO
12016-04-28 Par Olsson <par.olsson@windriver.com>
22016-04-28 Simon Marchi <simon.marchi@ericsson.com>
3
4 * tracepoint.c (write_inferior_int8): New function.
5 (cmd_qtenable_disable): Write enable flag using
6 write_inferior_int8.
7
484b3c32
YQ
82016-04-25 Yao Qi <yao.qi@linaro.org>
9
10 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
11 (need_step_over_p): Return zero if the LWP has pending signals
12 can be delivered on software single step target.
13
85ba7d86
YQ
142016-04-25 Yao Qi <yao.qi@linaro.org>
15
16 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
17 return instead of error.
18
3539aa13
YQ
192016-04-22 Yao Qi <yao.qi@linaro.org>
20
21 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
22 to 23.
23
5b061e98
YQ
242016-04-22 Yao Qi <yao.qi@linaro.org>
25
26 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
27 signal when stepping over breakpoint with software single
28 step.
29
3451269c
PA
302016-04-21 Pedro Alves <palves@redhat.com>
31
32 * linux-s390-low.c (s390_collect_ptrace_register)
33 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
34 add casts.
35 (s390_check_regset): Use void * instead of gdb_byte *.
36
a2358508
PA
372016-04-20 Pedro Alves <palves@redhat.com>
38
39 * configure: Renegerate.
40
6885166d
YQ
412016-04-20 Yao Qi <yao.qi@linaro.org>
42
43 * linux-aarch32-low.c: Include "arch/arm-linux.h".
44 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
45 number 16.
46 (arm_store_gregset): Likewise.
47
2b863f51
WT
482016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
49
50 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
51 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
52 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
53 (amd64-avx-mpx-linux.c): New rules.
54 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
55 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
56 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
57 (srv_amd64_regobj): Add amd64-avx-mpx.o.
58 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
59 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
60 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
61 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
62 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
63 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
64 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
65 * linux-x86-low.c (x86_linux_read_description): Add case for
66 X86_XSTATE_AVX_MPX_MASK.
67 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
68 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
69 init_registers_i386_avx_mpx_linux.
70 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
71 (initialize_low_tracepoint): Call
72 init_registers_i386_avx_mpx_linux.
73 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
74 (initialize_low_tracepoint): Call
75 init_registers_amd64_avx_mpx_linux.
76 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
77 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
78 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
79 declarations.
80
9b30624b
PA
812016-04-18 Pedro Alves <palves@redhat.com>
82
83 * configure: Regenerate.
84
45e3745e
AT
852016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
86
87 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
88 (aarch64_emit_sub): Likewise.
89
2afc13ff
PA
902016-04-12 Pedro Alves <palves@redhat.com>
91
92 * utils.c (prepare_to_throw_exception): Delete.
93
6e774b13
SM
942016-04-05 Simon Marchi <simon.marchi@ericsson.com>
95
96 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
97
4dca19f8
MK
982016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
99
100 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
101
d0a9981f
MK
1022016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
103
104 * linux-aarch64-ipa.c: Add <elf.h> include.
105 * linux-ppc-ipa.c: Add <elf.h> include.
106 * linux-s390-ipa.c: Add <elf.h> include.
107
252db07e
MK
1082016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
109
110 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
111 (get_raw_reg_ptr): Likewise.
112 (get_trace_state_variable_value_ptr): Likewise.
113 (set_trace_state_variable_value_ptr): Likewise.
114 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
115 char *.
116
14e2b6d9
MK
1172016-03-31 Wei-cheng Wang <cole945@gmail.com>
118 Marcin Kościelnicki <koriakin@0x04.net>
119
120 PR/17221
121 * linux-ppc-low.c (emit_insns): New function.
122 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
123 (ppc_emit_prologue): New function.
124 (ppc_emit_epilogue): New function.
125 (ppc_emit_add): New function.
126 (ppc_emit_sub): New function.
127 (ppc_emit_mul): New function.
128 (ppc_emit_lsh): New function.
129 (ppc_emit_rsh_signed): New function.
130 (ppc_emit_rsh_unsigned): New function.
131 (ppc_emit_ext): New function.
132 (ppc_emit_zero_ext): New function.
133 (ppc_emit_log_not): New function.
134 (ppc_emit_bit_and): New function.
135 (ppc_emit_bit_or): New function.
136 (ppc_emit_bit_xor): New function.
137 (ppc_emit_bit_not): New function.
138 (ppc_emit_equal): New function.
139 (ppc_emit_less_signed): New function.
140 (ppc_emit_less_unsigned): New function.
141 (ppc_emit_ref): New function.
142 (ppc_emit_const): New function.
143 (ppc_emit_reg): New function.
144 (ppc_emit_pop): New function.
145 (ppc_emit_stack_flush): New function.
146 (ppc_emit_swap): New function.
147 (ppc_emit_stack_adjust): New function.
148 (ppc_emit_call): New function.
149 (ppc_emit_int_call_1): New function.
150 (ppc_emit_void_call_2): New function.
151 (ppc_emit_if_goto): New function.
152 (ppc_emit_goto): New function.
153 (ppc_emit_eq_goto): New function.
154 (ppc_emit_ne_goto): New function.
155 (ppc_emit_lt_goto): New function.
156 (ppc_emit_le_goto): New function.
157 (ppc_emit_gt_goto): New function.
158 (ppc_emit_ge_goto): New function.
159 (ppc_write_goto_address): New function.
160 (ppc_emit_ops_impl): New static variable.
161 (ppc64v1_emit_prologue): New function.
162 (ppc64v2_emit_prologue): New function.
163 (ppc64_emit_epilogue): New function.
164 (ppc64_emit_add): New function.
165 (ppc64_emit_sub): New function.
166 (ppc64_emit_mul): New function.
167 (ppc64_emit_lsh): New function.
168 (ppc64_emit_rsh_signed): New function.
169 (ppc64_emit_rsh_unsigned): New function.
170 (ppc64_emit_ext): New function.
171 (ppc64_emit_zero_ext): New function.
172 (ppc64_emit_log_not): New function.
173 (ppc64_emit_bit_and): New function.
174 (ppc64_emit_bit_or): New function.
175 (ppc64_emit_bit_xor): New function.
176 (ppc64_emit_bit_not): New function.
177 (ppc64_emit_equal): New function.
178 (ppc64_emit_less_signed): New function.
179 (ppc64_emit_less_unsigned): New function.
180 (ppc64_emit_ref): New function.
181 (ppc64_emit_const): New function.
182 (ppc64v1_emit_reg): New function.
183 (ppc64v2_emit_reg): New function.
184 (ppc64_emit_pop): New function.
185 (ppc64_emit_stack_flush): New function.
186 (ppc64_emit_swap): New function.
187 (ppc64v1_emit_call): New function.
188 (ppc64v2_emit_call): New function.
189 (ppc64v1_emit_int_call_1): New function.
190 (ppc64v2_emit_int_call_1): New function.
191 (ppc64v1_emit_void_call_2): New function.
192 (ppc64v2_emit_void_call_2): New function.
193 (ppc64_emit_if_goto): New function.
194 (ppc64_emit_eq_goto): New function.
195 (ppc64_emit_ne_goto): New function.
196 (ppc64_emit_lt_goto): New function.
197 (ppc64_emit_le_goto): New function.
198 (ppc64_emit_gt_goto): New function.
199 (ppc64_emit_ge_goto): New function.
200 (ppc64v1_emit_ops_impl): New static variable.
201 (ppc64v2_emit_ops_impl): New static variable.
202 (ppc_emit_ops): New function.
203 (linux_low_target): Wire in ppc_emit_ops.
204
a2174ba4
MK
2052016-03-31 Wei-cheng Wang <cole945@gmail.com>
206 Marcin Kościelnicki <koriakin@0x04.net>
207
208 PR/17221
209 * Makefile.in: Add powerpc-*-ipa.o
210 * configure.srv: Add ipa_obj for powerpc*-linux.
211 * linux-ppc-ipa.c: New file.
212 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
213 includes.
214 (PPC_FIELD): New macro.
215 (PPC_SEXT): New macro.
216 (PPC_OP6): New macro.
217 (PPC_BO): New macro.
218 (PPC_LI): New macro.
219 (PPC_BD): New macro.
220 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
221 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
222 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
223 (ppc_get_thread_area): New function.
224 (is_elfv2_inferior): New function.
225 (gen_ds_form): New function.
226 (GEN_STD): New macro.
227 (GEN_STDU): New macro.
228 (GEN_LD): New macro.
229 (GEN_LDU): New macro.
230 (gen_d_form): New function.
231 (GEN_ADDI): New macro.
232 (GEN_ADDIS): New macro.
233 (GEN_LI): New macro.
234 (GEN_LIS): New macro.
235 (GEN_ORI): New macro.
236 (GEN_ORIS): New macro.
237 (GEN_LWZ): New macro.
238 (GEN_STW): New macro.
239 (GEN_STWU): New macro.
240 (gen_xfx_form): New function.
241 (GEN_MFSPR): New macro.
242 (GEN_MTSPR): New macro.
243 (GEN_MFCR): New macro.
244 (GEN_MTCR): New macro.
245 (GEN_SYNC): New macro.
246 (GEN_LWSYNC): New macro.
247 (gen_x_form): New function.
248 (GEN_OR): New macro.
249 (GEN_MR): New macro.
250 (GEN_LWARX): New macro.
251 (GEN_STWCX): New macro.
252 (GEN_CMPW): New macro.
253 (gen_md_form): New function.
254 (GEN_RLDICL): New macro.
255 (GEN_RLDICR): New macro.
256 (gen_i_form): New function.
257 (GEN_B): New macro.
258 (GEN_BL): New macro.
259 (gen_b_form): New function.
260 (GEN_BNE): New macro.
261 (GEN_LOAD): New macro.
262 (GEN_STORE): New macro.
263 (gen_limm): New function.
264 (gen_atomic_xchg): New function.
265 (gen_call): New function.
266 (ppc_relocate_instruction): New function.
267 (ppc_install_fast_tracepoint_jump_pad): New function.
268 (ppc_get_min_fast_tracepoint_insn_len): New function.
269 (ppc_get_ipa_tdesc_idx): New function.
270 (the_low_target): Wire in the new functions.
271 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
272 tdescs.
273 * linux-ppc-tdesc.h: New file.
274
a13c4696
MK
2752016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
276
277 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
278 (alloc_jump_pad_buffer): New function.
279 * linux-amd64-ipa.c: Add <sys/mman.h> include.
280 (alloc_jump_pad_buffer): New function.
281 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
282 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
283 (alloc_jump_pad_buffer): New function.
284 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
285 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
286 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
287 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
288
1cda1512
MK
2892016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
290
291 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
292 * linux-amd64-ipa.c: Likewise.
293 * linux-i386-ipa.c: Likewise.
294 * linux-s390-ipa.c: Likewise.
295 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
296 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
297 set_trace_state_variable_value_ptr.
298 (struct ipa_sym_addresses): Likewise.
299 (symbol_list): Likewise.
300 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
301 accessing gdb_collect directly.
302 (gdb_collect_ptr_type): New typedef.
303 (get_raw_reg_ptr_type): New typedef.
304 (get_trace_state_variable_value_ptr_type): New typedef.
305 (set_trace_state_variable_value_ptr_type): New typedef.
306 (gdb_collect_ptr): New global.
307 (get_raw_reg_ptr): New global.
308 (get_trace_state_variable_value_ptr): New global.
309 (set_trace_state_variable_value_ptr): New global.
310 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
311 accessing get_raw_reg directly.
312 (get_get_tsv_func_addr): Likewise for
313 get_trace_state_variable_value_ptr.
314 (get_set_tsv_func_addr): Likewise for
315 set_trace_state_variable_value_ptr.
316 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
317
72fb5488
SM
3182016-03-30 Simon Marchi <simon.marchi@ericsson.com>
319
320 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
321
28170b88
MK
3222016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
323
324 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
325 packets.
326 (relocate_instruction): Remove own_buf.
327 * server.c (own_buf): Make global.
328 (handle_v_requests): Make global.
329 * server.h (own_buf): New declaration.
330 (handle_v_requests): New prototype.
331
f39e8743
MK
3322016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
333
334 PR 18377
335 * linux-s390-low.c (add_insns): New function.
336 (s390_emit_prologue): New function.
337 (s390_emit_epilogue): New function.
338 (s390_emit_add): New function.
339 (s390_emit_sub): New function.
340 (s390_emit_mul): New function.
341 (s390_emit_lsh): New function.
342 (s390_emit_rsh_signed): New function.
343 (s390_emit_rsh_unsigned): New function.
344 (s390_emit_ext): New function.
345 (s390_emit_log_not): New function.
346 (s390_emit_bit_and): New function.
347 (s390_emit_bit_or): New function.
348 (s390_emit_bit_xor): New function.
349 (s390_emit_bit_not): New function.
350 (s390_emit_equal): New function.
351 (s390_emit_less_signed): New function.
352 (s390_emit_less_unsigned): New function.
353 (s390_emit_ref): New function.
354 (s390_emit_if_goto): New function.
355 (s390_emit_goto): New function.
356 (s390_write_goto_address): New function.
357 (s390_emit_litpool): New function.
358 (s390_emit_const): New function.
359 (s390_emit_call): New function.
360 (s390_emit_reg): New function.
361 (s390_emit_pop): New function.
362 (s390_emit_stack_flush): New function.
363 (s390_emit_zero_ext): New function.
364 (s390_emit_swap): New function.
365 (s390_emit_stack_adjust): New function.
366 (s390_emit_set_r2): New function.
367 (s390_emit_int_call_1): New function.
368 (s390_emit_void_call_2): New function.
369 (s390_emit_eq_goto): New function.
370 (s390_emit_ne_goto): New function.
371 (s390_emit_lt_goto): New function.
372 (s390_emit_le_goto): New function.
373 (s390_emit_gt_goto): New function.
374 (s390_emit_ge_goto): New function.
375 (s390x_emit_prologue): New function.
376 (s390x_emit_epilogue): New function.
377 (s390x_emit_add): New function.
378 (s390x_emit_sub): New function.
379 (s390x_emit_mul): New function.
380 (s390x_emit_lsh): New function.
381 (s390x_emit_rsh_signed): New function.
382 (s390x_emit_rsh_unsigned): New function.
383 (s390x_emit_ext): New function.
384 (s390x_emit_log_not): New function.
385 (s390x_emit_bit_and): New function.
386 (s390x_emit_bit_or): New function.
387 (s390x_emit_bit_xor): New function.
388 (s390x_emit_bit_not): New function.
389 (s390x_emit_equal): New function.
390 (s390x_emit_less_signed): New function.
391 (s390x_emit_less_unsigned): New function.
392 (s390x_emit_ref): New function.
393 (s390x_emit_if_goto): New function.
394 (s390x_emit_const): New function.
395 (s390x_emit_call): New function.
396 (s390x_emit_reg): New function.
397 (s390x_emit_pop): New function.
398 (s390x_emit_stack_flush): New function.
399 (s390x_emit_zero_ext): New function.
400 (s390x_emit_swap): New function.
401 (s390x_emit_stack_adjust): New function.
402 (s390x_emit_int_call_1): New function.
403 (s390x_emit_void_call_2): New function.
404 (s390x_emit_eq_goto): New function.
405 (s390x_emit_ne_goto): New function.
406 (s390x_emit_lt_goto): New function.
407 (s390x_emit_le_goto): New function.
408 (s390x_emit_gt_goto): New function.
409 (s390x_emit_ge_goto): New function.
410 (s390_emit_ops): New function.
411 (struct linux_target_ops): Fill in emit_ops hook.
412
abd9baf9
MK
4132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
414
415 PR 18377
416 * Makefile.in: Add s390 IPA files.
417 * configure.srv: Build IPA for s390.
418 * linux-s390-ipa.c: New file.
419 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
420 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
421 (tdesc_s390_linux32): Likewise.
422 (init_registers_s390_linux32v1): Likewise.
423 (tdesc_s390_linux32v1): Likewise.
424 (init_registers_s390_linux32v2): Likewise.
425 (tdesc_s390_linux32v2): Likewise.
426 (init_registers_s390_linux64): Likewise.
427 (tdesc_s390_linux64): Likewise.
428 (init_registers_s390_linux64v1): Likewise.
429 (tdesc_s390_linux64v1): Likewise.
430 (init_registers_s390_linux64v2): Likewise.
431 (tdesc_s390_linux64v2): Likewise.
432 (init_registers_s390_te_linux64): Likewise.
433 (tdesc_s390_te_linux64): Likewise.
434 (init_registers_s390_vx_linux64): Likewise.
435 (tdesc_s390_vx_linux64): Likewise.
436 (init_registers_s390_tevx_linux64): Likewise.
437 (tdesc_s390_tevx_linux64): Likewise.
438 (init_registers_s390x_linux64): Likewise.
439 (tdesc_s390x_linux64): Likewise.
440 (init_registers_s390x_linux64v1): Likewise.
441 (tdesc_s390x_linux64v1): Likewise.
442 (init_registers_s390x_linux64v2): Likewise.
443 (tdesc_s390x_linux64v2): Likewise.
444 (init_registers_s390x_te_linux64): Likewise.
445 (tdesc_s390x_te_linux64): Likewise.
446 (init_registers_s390x_vx_linux64): Likewise.
447 (tdesc_s390x_vx_linux64): Likewise.
448 (init_registers_s390x_tevx_linux64): Likewise.
449 (tdesc_s390x_tevx_linux64): Likewise.
450 (have_hwcap_s390_vx): New static variable.
451 (s390_arch_setup): Fill have_hwcap_s390_vx.
452 (s390_get_thread_area): New function.
453 (s390_ft_entry_gpr_esa): New const.
454 (s390_ft_entry_gpr_zarch): New const.
455 (s390_ft_entry_misc): New const.
456 (s390_ft_entry_fr): New const.
457 (s390_ft_entry_vr): New const.
458 (s390_ft_main_31): New const.
459 (s390_ft_main_64): New const.
460 (s390_ft_exit_fr): New const.
461 (s390_ft_exit_vr): New const.
462 (s390_ft_exit_misc): New const.
463 (s390_ft_exit_gpr_esa): New const.
464 (s390_ft_exit_gpr_zarch): New const.
465 (append_insns): New function.
466 (s390_relocate_instruction): New function.
467 (s390_install_fast_tracepoint_jump_pad): New function.
468 (s390_get_min_fast_tracepoint_insn_len): New function.
469 (s390_get_ipa_tdesc_idx): New function.
470 (struct linux_target_ops): Wire in the above functions.
471 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
472 * linux-s390-tdesc.h: New file.
473
a4105d04
MK
4742016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
475
476 * linux-s390-low.c (s390_supports_tracepoints): New function.
477 (struct linux_target_ops): Fill supports_tracepoints hook.
478
35ac8b3e
YQ
4792016-03-18 Yao Qi <yao.qi@linaro.org>
480
481 * linux-low.c (lwp_signal_can_be_delivered): New function.
482 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
483
94610ec4
YQ
4842016-03-18 Yao Qi <yao.qi@linaro.org>
485
486 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
487 0 if signal is enqueued. Remove 'signal' from one debugging
488 message. Move one debugging message to some lines below.
489 Remove code setting 'signal' to 0.
490
80aea927
YQ
4912016-03-18 Yao Qi <yao.qi@linaro.org>
492
493 * linux-low.c (linux_low_filter_event): Remove redundant
494 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
495
b04fd3be
MK
4962016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
497
498 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
499 (struct linux_target_ops): Wire in the above.
500
c40c8d4b
YQ
5012016-03-03 Yao Qi <yao.qi@linaro.org>
502
503 * linux-low.c: Update comments to start_step_over.
504
0f8288ae
YQ
5052016-03-03 Yao Qi <yao.qi@linaro.org>
506
507 PR server/19736
508 * linux-low.c (handle_extended_wait): Set child suspended
509 if event_lwp->bp_reinsert isn't zero.
510
fdbd04a8
YQ
5112016-03-02 Yao Qi <yao.qi@linaro.org>
512
513 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
514 enqueue_pending_signal.
515
6896a8fa
MK
5162016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
517
518 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
519 is actually loaded.
520
ab503087
MK
5212016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
522
523 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
524 (s390_regmap_3264) [!__s390x__]: New global.
525 (s390_collect_ptrace_register): Skip map entries containing -1.
526 (s390_supply_ptrace_register): Ditto.
527 (s390_fill_gprs_high): New function.
528 (s390_store_gprs_high): New function.
529 (s390_regsets): Add NT_S390_HIGH_GPRS.
530 (s390_get_hwcap): Enable on 31-bit.
531 (have_hwcap_s390_high_gprs): Enable on 31-bit.
532 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
533 Detect NT_S390_HIGH_GPRS.
534 (s390_usrregs_info_3264): Enable on 31-bit.
535 (s390_regs_info): Enable regs_info_3264 on 31-bit.
536 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
537
ae91f625
MK
5382016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
539
540 PR gdb/13808
541 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
542 * configure.srv: Ditto.
543 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
544 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
545 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
546 (init_registers_amd64_linux): Remove prototype.
547 (tdesc_amd64_linux): Remove declaration.
548 (get_ipa_tdesc): New function.
549 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
550 initialize remaining tdescs.
551 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
552 (init_registers_i386_linux): Remove prototype.
553 (tdesc_i386_linux): Remove declaration.
554 (get_ipa_tdesc): New function.
555 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
556 initialize remaining tdescs.
557 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
558 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
559 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
560 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
561 (x86_get_ipa_tdesc_idx): New function.
562 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
563 * linux-x86-tdesc.h: New file.
564 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
565 (target_get_ipa_tdesc_idx): New macro.
566 * tracepoint.c (ipa_tdesc_idx): New macro.
567 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
568 (symbol_list): Add ipa_tdesc_idx.
569 (cmd_qtstart): Write ipa_tdesc_idx in the target.
570 (ipa_tdesc): Remove.
571 (ipa_tdesc_idx): New variable.
572 (get_context_regcache): Use get_ipa_tdesc.
573 (gdb_collect): Ditto.
574 (gdb_probe): Ditto.
575 * tracepoint.h (get_ipa_tdesc): New prototype.
576 (ipa_tdesc): Remove.
577
e7ad2f14
PA
5782016-02-24 Pedro Alves <palves@redhat.com>
579
580 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
581 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
582 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
583 Factor out common code between the USE_SIGTRAP_SIGINFO and
584 !USE_SIGTRAP_SIGINFO blocks.
585 (linux_low_filter_event): Call save_stop_reason instead of
586 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
587 Update comments.
588 (linux_wait_1): Update comments.
589
657f9cde
WW
5902016-02-24 Wei-cheng Wang <cole945@gmail.com>
591
592 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
593 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
594 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
595 ppc_insert_point, ppc_remove_point.
596
b00b61e1
MK
5972016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
598
599 * linux-s390-low.c (s390_supports_z_point_type): New function.
600 (struct linux_target_ops): Wire s390_supports_z_point_type in.
601
553cb527
YQ
6022016-02-16 Yao Qi <yao.qi@linaro.org>
603
604 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
605 PC. Get pc from regcache_read_pc.
606
a5652c21
YQ
6072016-02-12 Yao Qi <yao.qi@linaro.org>
608
609 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
610 or linux_get_pc_32bit.
611 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
612
ed443b61
YQ
6132016-02-12 Yao Qi <yao.qi@linaro.org>
614
615 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
616 arm_linux_get_next_pcs_fixup.
617
020ecd38
MK
6182016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
619
620 * tracepoint.c (x_tracepoint_action_download): Change
621 write_inferior_data_ptr to write_inferior_data_pointer.
622 (cmd_qtstart): Likewise.
623 (write_inferior_data_ptr): Remove.
624 (download_agent_expr): Change write_inferior_data_ptr to
625 write_inferior_data_pointer.
626 (download_tracepoint_1): Likewise.
627 (download_tracepoint): Likewise.
628 (download_trace_state_variables): Likewise.
629
7cae9051
WW
6302016-02-11 Wei-cheng Wang <cole945@gmail.com>
631 Marcin Kościelnicki <koriakin@0x04.net>
632
633 * tracepoint.c (struct tracepoint_action_ops): Remove.
634 (struct tracepoint_action): Remove ops.
635 (m_tracepoint_action_download, r_tracepoint_action_download)
636 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
637 size and offset accordingly.
638 (m_tracepoint_action_ops, r_tracepoint_action_ops)
639 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
640 (tracepoint_action_send, tracepoint_action_download): New functions.
641 Helpers for trace action handlers.
642 (add_tracepoint_action): Remove setup actions ops.
643 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
644
9f6a71b4
YQ
6452016-02-10 Yao Qi <yao.qi@linaro.org>
646
647 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
648
1e94266c
SM
6492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
650
651 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
652 to AC_OUTPUT.
653 * configure: Regenerate.
654
8adce034
SM
6552016-02-09 Simon Marchi <simon.marchi@ericsson.com>
656
657 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
658 void * to gdb_byte *.
659 * linux-low.c (siginfo_fixup): Likewise.
660 (linux_xfer_siginfo): Likewise.
661 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
662 Likewise.
663 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
664
93813b37
WT
6652016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
666
667 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
668 to srv_tgtobj.
669 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
670 to srv_tgtobj.
671 * linux-x86-low.c [__x86_64__]: Include
672 "nat/amd64-linux-siginfo.h".
673 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
674 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
675 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
676 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
677 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
678 (cpt_si_fd, si_timerid, si_overrun): Move from
679 nat/amd64-linux-siginfo.c.
680 * Makefile.in (amd64-linux-siginfo.o:): New rule.
681
8424cc97
SM
6822016-01-28 Simon Marchi <simon.marchi@ericsson.com>
683
684 * server.c (skip_to_semicolon): Remove.
685 (process_point_options): Use strchrnul instead of
686 skip_to_semicolon.
687
4d18591b
YQ
6882016-01-26 Yao Qi <yao.qi@linaro.org>
689
690 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
691 * linux-low.c (install_software_single_step_breakpoints): Don't
692 call regcache_read_pc.
693 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
694 argument pc.
695
d8020970
YQ
6962016-01-26 Yao Qi <yao.qi@linaro.org>
697
698 * linux-low.c (install_software_single_step_breakpoints): Call
699 regcache_read_pc instead of get_pc.
700
8b207339
YQ
7012016-01-26 Yao Qi <yao.qi@linaro.org>
702
703 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
704 (unblock_async_io): Rename to ...
705 (block_unblock_async_io): ... it. New function.
706 (enable_async_io): Don't install SIGIO handler. Unblock it
707 instead.
708 (disable_async_io): Don't ignore SIGIO. Block it instead.
709 (initialize_async_io): Install SIGIO handler. Don't call
710 unblock_async_io.
711
18879fef
YQ
7122016-01-26 Yao Qi <yao.qi@linaro.org>
713
714 * remote-utils.c (getpkt): If the buffer isn't empty, and the
715 first character is '\003', call *the_target->request_interrupt.
716
a0f8e08a
YQ
7172016-01-25 Yao Qi <yao.qi@linaro.org>
718
719 * remote-utils.c (new_thread_notify): Remove.
720 (dead_thread_notify): Likewise.
721 * remote-utils.h (new_thread_notify): Remove declaration.
722 (dead_thread_notify): Likewise.
723
cc5fd9ab
MK
7242016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
725
726 * gdb.trace/pending.exp: Fix expected message on continue.
727
99e8eb11
MK
7282016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
729
730 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
731 it works properly on big-endian machines where sizeof (CORE_ADDR)
732 != sizeof (void *).
733
a994041d
PA
7342016-01-21 Pedro Alves <palves@redhat.com>
735
736 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
737 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
738 * configure: Regenerate.
739
f7a6a40d
YQ
7402016-01-21 Yao Qi <yao.qi@linaro.org>
741
742 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
743 is_thumb and set it according to CPSR saved on the stack.
744 (get_next_pcs_syscall_next_pc): Pass is_thumb to
745 arm_sigreturn_next_pc.
746
6f69e520
YQ
7472016-01-18 Yao Qi <yao.qi@linaro.org>
748
749 * linux-low.c (linux_set_pc_64bit): New function.
750 (linux_get_pc_64bit): New function.
751 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
752 Declare.
753 * linux-sparc-low.c (debug_threads): Remove declaration.
754 (sparc_get_pc): Remove.
755 (the_low_target): Use linux_get_pc_64bit instead of
756 sparc_get_pc.
757 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
758 (the_low_target): Use linux_get_pc_64bit and
759 linux_set_pc_64bit.
760
276d4552
YQ
7612016-01-18 Yao Qi <yao.qi@linaro.org>
762
763 * linux-arm-low.c (debug_threads): Remove declaration.
764 (arm_get_pc, arm_set_pc): Remove.
765 (the_low_target): Use linux_get_pc_32bit and
766 linux_set_pc_32bit.
767 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
768 (the_low_target): Use linux_get_pc_32bit and
769 linux_set_pc_32bit.
770 * linux-cris-low.c (debug_threads): Remove declaration.
771 (cris_get_pc, cris_set_pc,): Remove.
772 (the_low_target): Use linux_get_pc_32bit and
773 linux_set_pc_32bit.
774 * linux-crisv32-low.c (debug_threads): Remove declaration.
775 (cris_get_pc, cris_set_pc): Remove.
776 (the_low_target): Use linux_get_pc_32bit and
777 linux_set_pc_32bit.
778 * linux-low.c: Include inttypes.h.
779 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
780 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
781 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
782 (the_low_target): Use linux_get_pc_32bit and
783 linux_set_pc_32bit.
784 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
785 (the_low_target): Use linux_get_pc_32bit and
786 linux_set_pc_32bit.
787 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
788 (the_low_target): Use linux_get_pc_32bit and
789 linux_set_pc_32bit.
790 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
791 (the_low_target): Use linux_get_pc_32bit and
792 linux_set_pc_32bit.
793 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
794 (the_low_target): Use linux_get_pc_32bit and
795 linux_set_pc_32bit.
796
eb0edac8
GB
7972016-01-18 Gary Benson <gbenson@redhat.com>
798
799 * configure.ac (AC_FUNC_FORK): New check.
800 * config.in: Regenerate.
801 * configure: Likewise.
802
1b451dda
YQ
8032016-01-14 Yao Qi <yao.qi@linaro.org>
804
805 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
806 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
807 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
808 arm_get_next_pcs_ctor.
809
82075af2
JS
8102016-01-12 Josh Stone <jistone@redhat.com>
811 Philippe Waroquiers <philippe.waroquiers@skynet.be>
812
813 * inferiors.h: Include "gdb_vecs.h".
814 (struct process_info): Add syscalls_to_catch.
815 * inferiors.c (remove_process): Free syscalls_to_catch.
816 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
817 syscall_return stops.
818 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
819 * server.c (handle_general_set): Handle QCatchSyscalls.
820 (handle_query): Report support for QCatchSyscalls.
821 * target.h (struct target_ops): Add supports_catch_syscall.
822 (target_supports_catch_syscall): New macro.
823 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
824 (struct lwp_info): Add syscall_state.
825 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
826 Maintain syscall_state and syscalls_to_catch across exec.
827 (get_syscall_trapinfo): New function, proxy to the_low_target.
828 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
829 (linux_low_filter_event): Toggle syscall_state entry/return for
830 syscall traps, and set it ignored for all others.
831 (gdb_catching_syscalls_p): New function.
832 (gdb_catch_this_syscall_p): New function.
833 (linux_wait_1): Handle SYSCALL_SIGTRAP.
834 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
835 (linux_supports_catch_syscall): New function.
836 (linux_target_ops): Install it.
837 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
838 (the_low_target): Install it.
839
8f13a3ce
MF
8402016-01-12 Mike Frysinger <vapier@gentoo.org>
841
842 * acinclude.m4: Include new ../warning.m4 file.
843 * configure: Regenerated.
844 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
845
5b3da067
MF
8462016-01-12 Mike Frysinger <vapier@gentoo.org>
847
848 * ax.c (is_goto_target): Mark static.
849 * linux-low.c (register_addr): Likewise.
850 (linux_fetch_registers, linux_store_registers): Likewise.
851 * mem-break.c (any_persistent_commands): Fix old prototype.
852 (add_commands_to_breakpoint): Mark static.
853 * regcache.c (find_register_by_name): Delete unused func.
854 * remote-utils.c (hex_or_minus_one): Mark static.
855 * server.c (monitor_show_help): Mark static.
856 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
857 handle_v_requests): Likewise.
858
bc504a31
PA
8592016-01-12 Pedro Alves <palves@redhat.com>
860
861 Remove use of the registered trademark symbol throughout.
862
5a0dd67a
YQ
8632016-01-08 Yao Qi <yao.qi@linaro.org>
864
865 * remote-utils.c (getpkt): If c is '\003', call target hook
866 request_interrupt.
867
b2ca446f
YQ
8682016-01-06 Yao Qi <yao.qi@linaro.org>
869
870 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
871 linux-aarch32-low.c.
872 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
873 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
874 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
875 (thumb2_breakpoint): Declare.
876 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
877 linux-aarch32-low.h.
878 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
879 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
880 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
881
edd88788
JB
8822016-01-01 Joel Brobecker <brobecker@adacore.com>
883
884 * gdbreplay.c (gdbreplay_version): Change copyright year in
885 version message.
886 * server.c (gdbserver_version): Likewise.
887
65da7f14
PP
8882015-12-28 Patrick Palka <patrick@parcs.ath.cx>
889
890 * server.c (crc32_table): Delete.
891 (crc32): Use libiberty's xcrc32 function.
892
4abd5ed2
JB
8932015-12-22 Joel Brobecker <brobecker@adacore.com>
894
895 * lynx-low.c (lynx_delete_thread_callback): New function.
896 (lynx_mourn): Properly delete our process and all of its
897 threads. Remove call to clear_inferiors.
898
0e50fe5c
JB
8992015-12-22 Joel Brobecker <brobecker@adacore.com>
900
901 * target.c (thread_search_callback): Add check that
902 the thread_stopped target callback is not NULL before
903 calling it.
904
35adc03f
YQ
9052015-12-21 Yao Qi <yao.qi@linaro.org>
906
907 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
908 arm breakpoint.
909
bd2b2909
AT
9102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
911
912 * server.c (handle_query): Call target_supports_software_single_step.
913
7fe5e27e
AT
9142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
915
916 * linux-low.c (single_step): New function.
917 (linux_resume_one_lwp_throw): Call single_step.
918 (start_step_over): Likewise.
919
d9311bfa
AT
9202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
921
922 * Makefile.in (SFILES): Append arch/arm-linux.c,
923 arch/arm-get-next-pcs.c.
924 (arm-linux.o): New rule.
925 (arm-get-next-pcs.o): New rule.
926 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
927 arm-linux.o.
928 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
929 to linux-aarch32-low.c.
930 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
931 (arm_breakpoint_len, thumb_breakpoint): Likewise.
932 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
933 (thumb2_breakpoint_len): Likewise.
934 (arm_is_thumb_mode): Make non-static.
935 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
936 from linux-aarch32-low.c.
937 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
938 (arm_breakpoint_len, thumb_breakpoint): Likewise.
939 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
940 (thumb2_breakpoint_len): Likewise.
941 (arm_is_thumb_mode): New declaration.
942 * linux-arm-low.c: Include arch/arm-linux.h
943 aarch/arm-get-next-pcs.h, sys/syscall.h.
944 (get_next_pcs_ops): New struct.
945 (get_next_pcs_addr_bits_remove): New function.
946 (get_next_pcs_is_thumb): New function.
947 (get_next_pcs_read_memory_unsigned_integer): Likewise.
948 (arm_sigreturn_next_pc): Likewise.
949 (get_next_pcs_syscall_next_pc): Likewise.
950 (arm_gdbserver_get_next_pcs): Likewise.
951 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
952 Initialize.
953 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
954 * server.h: Include gdb_vecs.h.
955
68ce2059
AT
9562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
957
958 * Makefile.in (SFILES): Append common/common-regcache.c.
959 (OBS): Append common-regcache.o.
960 (common-regcache.o): New rule.
961 * regcache.c (init_register_cache): Initialize cache to
962 REG_UNAVAILABLE.
963 (regcache_raw_read_unsigned): New function.
964 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
965 register_status enum.
966
fa5308bd
AT
9672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
968
969 * linux-aarch64-low.c (the_low_targets): Rename
970 breakpoint_reinsert_addr to get_next_pcs.
971 * linux-arm-low.c (the_low_targets): Likewise.
972 * linux-bfin-low.c (the_low_targets): Likewise.
973 * linux-cris-low.c (the_low_targets): Likewise.
974 * linux-crisv32-low.c (the_low_targets): Likewise.
975 * linux-low.c (can_software_single_step): Likewise.
976 (install_software_single_step_breakpoints): New function.
977 (start_step_over): Use install_software_single_step_breakpoints.
978 * linux-low.h: New CORE_ADDR vector.
979 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
980 get_next_pcs.
981 * linux-mips-low.c (the_low_targets): Likewise.
982 * linux-nios2-low.c (the_low_targets): Likewise.
983 * linux-sparc-low.c (the_low_targets): Likewise.
984
4a6ed09b
PA
9852015-12-17 Pedro Alves <palves@redhat.com>
986
987 * linux-low.c (linux_kill_one_lwp): Remove references to
988 LinuxThreads.
989 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
990 to 'kill'.
991 (linux_init_signals): Delete.
992 (initialize_low): Adjust.
993 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
994
7544db95
PA
9952015-12-16 Pedro Alves <palves@redhat.com>
996
997 * configure.ac (compiler warning flags): When testing a
998 -Wno-foo option, check whether -Wfoo works instead.
999 * configure: Regenerate.
1000
8020350c
DB
10012015-12-11 Don Breazeal <donb@codesourcery.com>
1002
1003 * server.c (process_serial_event): Don't exit from gdbserver
1004 in remote mode if there are still active inferiors.
1005
db91f502
YQ
10062015-12-11 Yao Qi <yao.qi@linaro.org>
1007
1008 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1009 arm_breakpoint_at if the process is 32-bit.
1010
b37a6290
YQ
10112015-12-11 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1014 arm breakpoint.
1015
17b1509a
YQ
10162015-12-07 Yao Qi <yao.qi@linaro.org>
1017
1018 * configure.srv: Append arm.o to srv_tgtobj for
1019 aarch64*-*-linux* target.
1020 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1021 from linux-arm-low.c.
1022 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1023 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1024 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1025 (thumb2_breakpoint_len): Likewise.
1026 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1027 (arm_breakpoint_kinds): Likewise.
1028 (arm_breakpoint_kind_from_pc): Likewise.
1029 (arm_sw_breakpoint_from_kind): Likewise.
1030 (arm_breakpoint_kind_from_current_state): Likewise.
1031 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1032 (arm_sw_breakpoint_from_kind): Declare.
1033 (arm_breakpoint_kind_from_current_state): Declare.
1034 (arm_breakpoint_at): Declare.
1035 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1036 arm_sw_breakpoint_from_kind if process is 32-bit.
1037 (aarch64_breakpoint_kind_from_pc): New function.
1038 (aarch64_breakpoint_kind_from_current_state): New function.
1039 (the_low_target): Initialize fields breakpoint_kind_from_pc
1040 and breakpoint_kind_from_current_state.
1041 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1042 linux-aarch32-low.c.
1043 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1044 (arm_breakpoint, arm_breakpoint_len): Likewise.
1045 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1046 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1047 (arm_is_thumb_mode): Likewise.
1048 (arm_breakpoint_at): Likewise.
1049 (arm_breakpoint_kind_from_pc): Likewise.
1050 (arm_sw_breakpoint_from_kind): Likewise.
1051 (arm_breakpoint_kind_from_current_state): Likewise.
1052
1053 Revert:
1054 2015-08-04 Yao Qi <yao.qi@linaro.org>
1055
1056 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1057 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1058 * server.c (extended_protocol): Remove "static".
1059 * server.h (extended_protocol): Declare it.
1060
ece66d65
JS
10612015-12-04 Josh Stone <jistone@redhat.com>
1062
1063 * target.h (struct target_ops) <arch_setup>: Rename to ...
1064 (struct target_ops) <post_create_inferior>: ... this.
1065 (target_arch_setup): Rename to ...
1066 (target_post_create_inferior): ... this, calling post_create_inferior.
1067 * server.c (start_inferior): Update target_arch_setup calls to
1068 target_post_create_inferior.
1069 * linux-low.c (linux_low_ptrace_options): Forward declare.
1070 (linux_arch_setup): Update its comment for general use.
1071 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1072 (struct linux_target_ops): Use linux_post_create_inferior.
1073 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1074 to post_create_inferior.
1075 * nto-low.c (struct nto_target_ops): Likewise.
1076 * spu-low.c (struct spu_target_ops): Likewise.
1077 * win32-low.c (struct win32_target_ops): Likewise.
1078
e58c48b4
AT
10792015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1080
1081 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1082
fbec8956
AT
10832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1084
1085 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1086 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1087 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1088 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1089 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1090 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1091 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1092 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1093 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1094 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1095 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1096 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1097
9b4c5f87
AT
10982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1099
1100 * linux-low.c (linux_look_up_symbols): Don't call
1101 linux_supports_traceclone.
1102 * linux-low.h (thread_db_init): Remove use_events argument.
1103 * thread-db.c (thread_db_use_event): Remove global variable.
1104 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1105 (struct thread_db) <td_create_bp>: Remove field.
1106 (thread_db_create_event): Remove function.
1107 (thread_db_enable_reporting): Likewise.
1108 (find_one_thread): Don't check for thread_db_use_events.
1109 (attach_thread): Likewise.
1110 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1111 (try_thread_db_load_1): Don't check for thread_db_use_events.
1112 (thread_db_init): Remove use_events argument and thread events
1113 handling.
1114 (remove_thread_event_breakpoints): Remove function.
1115 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1116
7d00775e
AT
11172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1118
1119 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1120 New function.
1121 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1122 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1123 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1124 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1125 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1126 Initialize.
1127 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1128 New function.
1129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1130 * linux-low.c (can_hardware_single_step): Use
1131 supports_hardware_single_step.
1132 (can_software_single_step): New function.
1133 (start_step_over): Call can_software_single_step.
1134 (linux_supports_hardware_single_step): New function.
1135 (struct target_ops) <supports_software_single_step>: Initialize.
1136 * linux-low.h (struct linux_target_ops)
1137 <supports_hardware_single_step>: Initialize.
1138 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1139 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1140 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1141 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1142 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1144 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1145 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1146 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1147 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1148 Initialize.
1149 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1150 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1151 Initialize.
1152 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1153 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1154 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1155 New function.
1156 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1157 * target.h (struct target_ops): <supports_software_single_step>:
1158 New field.
1159 (target_supports_software_single_step): New macro.
1160
2d97cd35
AT
11612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1162
1163 * linux-low.c (linux_wait_1): Fix pc advance condition.
1164 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1165 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1166
769ef81f
AT
11672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1168
1169 * linux-arm-low.c (arm_is_thumb_mode): New function.
1170 (arm_breakpoint_at): Use arm_is_thumb_mode.
1171 (arm_breakpoint_kind_from_current_state): New function.
1172 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1173 Initialize.
1174 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1175 (linux_breakpoint_kind_from_current_state): New function.
1176 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1177 * linux-low.h (struct linux_target_ops)
1178 <breakpoint_kind_from_current_state>: New field.
1179 * target.h (struct target_ops): Likewise.
1180 (target_breakpoint_kind_from_current_state): New macro.
1181
1bebeeca
PA
11822015-11-30 Pedro Alves <palves@redhat.com>
1183
1184 * linux-low.c (linux_resume): Wake up the event loop before
1185 returning.
1186
a67a9fae
PA
11872015-11-30 Pedro Alves <palves@redhat.com>
1188
1189 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1190 check.
1191 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1192 to -1.
1193 * target.c (struct thread_search): New structure.
1194 (thread_search_callback): New function.
1195 (prev_general_thread): New global.
1196 (prepare_to_access_memory, done_accessing_memory): New functions.
1197 * target.h (prepare_to_access_memory, done_accessing_memory):
1198 Replace macros with function declarations.
1199
f2faf941
PA
12002015-11-30 Pedro Alves <palves@redhat.com>
1201
1202 PR 14618
1203 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1204 report TARGET_WAITKIND_NO_RESUMED.
1205 * remote-utils.c (prepare_resume_reply): Handle
1206 TARGET_WAITKIND_NO_RESUMED.
1207 * server.c (report_no_resumed): New global.
1208 (handle_query) <qSupported>: Handle "no-resumed+". Report
1209 "no-resumed+" support.
1210 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1211 return error if the client doesn't support no-resumed events.
1212 (push_stop_notification): New function.
1213 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1214 events if the client supports them.
1215
a681f9c9
PA
12162015-11-30 Pedro Alves <palves@redhat.com>
1217
1218 * linux-low.c (thread_still_has_status_pending_p): Don't check
1219 vCont;t here.
1220 (lwp_resumed): New function.
1221 (status_pending_p_callback): Return early if the LWP is not
1222 supposed to be resumed.
1223
65706a29
PA
12242015-11-30 Pedro Alves <palves@redhat.com>
1225
1226 * linux-low.c (handle_extended_wait): Assert that the LWP's
1227 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1228 thread create events, leave the new child's status pending.
1229 (linux_low_filter_event): If GDB wants to hear about thread exit
1230 events, leave the LWP marked dead and don't delete it.
1231 (linux_wait_for_event_filtered): Don't check for thread exit.
1232 (filter_exit_event): New function.
1233 (linux_wait_1): Use it, when returning an exit event.
1234 (linux_resume_one_lwp_throw): Assert that the LWP's
1235 waitstatus is TARGET_WAITKIND_IGNORE.
1236 * remote-utils.c (prepare_resume_reply): Handle
1237 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1238 * server.c (report_thread_events): New global.
1239 (handle_general_set): Handle QThreadEvents.
1240 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1241 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1242 TARGET_WAITKIND_THREAD_EXITED.
1243 * server.h (report_thread_events): Declare.
1244
56cf4bed
PA
12452015-11-30 Pedro Alves <palves@redhat.com>
1246
1247 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1248 the thread's last_resume_kind was resume_stop.
1249
500c1d85
PA
12502015-11-30 Pedro Alves <palves@redhat.com>
1251
1252 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1253 before returning.
1254
de979965
PA
12552015-11-30 Pedro Alves <palves@redhat.com>
1256
1257 * server.c (handle_v_requests): Handle vCtrlC.
1258
34c65914
PA
12592015-11-30 Pedro Alves <palves@redhat.com>
1260
1261 * gdbthread.h (find_any_thread_of_pid): Declare.
1262 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1263 functions.
1264 * server.c (handle_query): If current_thread is NULL, look for
1265 another thread of the selected process.
1266
79efa585 12672015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1268 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1269
1270 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1271 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1272 name in reply.
1273 * target.h (struct target_ops) <thread_name>: New field.
1274 (target_thread_name): New macro.
1275
80d82c19
JB
12762015-11-23 Joel Brobecker <brobecker@adacore.com>
1277
1278 * regcache.h (regcache_invalidate_pid): Add declaration.
1279 * regcache.c (regcache_invalidate_pid): New function, extracted
1280 from regcache_invalidate.
1281 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1282 Add trivial documentation comment.
1283 * lynx-low.c: Use regcache_invalidate_pid instead of
1284 regcache_invalidate.
1285
64da5dd5
JB
12862015-11-23 Joel Brobecker <brobecker@adacore.com>
1287
1288 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1289 and Elf64_auxv_t if the target is Android.
1290
37ce4055
DE
12912015-11-22 Doug Evans <xdje42@gmail.com>
1292
1293 * target.h: #include <sys/types.h>.
1294
06e03fff
PA
12952015-11-19 Pedro Alves <palves@redhat.com>
1296
1297 * linux-low.c (linux_process_qsupported): Change prototype.
1298 Adjust.
1299 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1300 Change prototype.
1301 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1302 and adjust to loop over all features.
1303 * server.c (handle_query) <qSupported>: Adjust to call
1304 target_process_qsupported once, passing it a vector of unprocessed
1305 features.
1306 * target.h (struct target_ops) <process_qsupported>: Change
1307 prototype.
1308 (target_process_qsupported): Adjust.
1309
9a084706
PA
13102015-11-19 Pedro Alves <palves@redhat.com>
1311
1312 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1313 mode.
1314 * configure: Regenerate.
1315
dad44a1f
PA
13162015-11-19 Pedro Alves <palves@redhat.com>
1317
1318 * configure: Regenerate.
1319
231c0592
YQ
13202015-11-19 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1323 type to uint32_t.
1324
6c1c9a8b
YQ
13252015-11-19 Yao Qi <yao.qi@linaro.org>
1326
1327 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1328 (struct aarch64_operand): Move enum out.
1329
9caa3311
YQ
13302015-11-19 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1333 struct user_fpsimd_state *.
1334 (aarch64_store_fpregset): Likewise.
1335
6a69a054
YQ
13362015-11-19 Yao Qi <yao.qi@linaro.org>
1337
1338 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1339 struct user_pt_regs *.
1340 (aarch64_store_gregset): Likewise.
1341
1798301e
PA
13422015-11-18 Pedro Alves <palves@redhat.com>
1343
1344 * Makefile.in (all_object_files): Add $IPA_OBJS.
1345
ce7715e2
PA
13462015-11-17 Pedro Alves <palves@redhat.com>
1347
1348 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1349 GDB_SIGNAL_0 and gdb_signal_to_string.
1350
c0879059
PA
13512015-11-17 Pedro Alves <palves@redhat.com>
1352
1353 * win32-low.c (handle_output_debug_string): Remove parameter.
1354 (win32_kill): Remove our_status local and adjust call to
1355 handle_output_debug_string.
1356 (get_child_debug_event): Adjust call to
1357 handle_output_debug_string.
1358
1996e237
SM
13592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * linux-mips-low.c (mips_fill_gregset): Add cast.
1362 (mips_store_gregset): Likewise.
1363 (mips_fill_fpregset): Likewise.
1364 (mips_store_fpregset): Likewise.
1365
cbec665b
SM
13662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1367
1368 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1369 priv.
1370
eb3e3c67
SM
13712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1372
1373 * linux-mips-low.c (mips_linux_new_thread): Change type of
1374 watch_type to enum target_hw_bp_type.
1375
171de4b8
SM
13762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1379 Change return type to arm_hwbp_type.
1380
04248ead
SM
13812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1384 (arm_store_gregset): Likewise.
1385 * linux-arm-low.c (arm_get_hwcap): Likewise.
1386 (arm_read_description): Likewise.
1387
04b3479c
SM
13882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1389
1390 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1391
2bc84e8a
SM
13922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1393
1394 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1395 (ppc_fill_vsxregset): Likewise.
1396 (ppc_store_vsxregset): Likewise.
1397 (ppc_fill_vrregset): Likewise.
1398 (ppc_store_vrregset): Likewise.
1399 (ppc_fill_evrregset): Likewise.
1400 (ppc_store_evrregset): Likewise.
1401
e6c5bb05
SM
14022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * linux-ppc-low.c (ppc_usrregs_info): Remove
1405 forward-declaration.
1406 (ppc_arch_setup): Move lower in file.
1407
7ea45d72
SM
14082015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1409
1410 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1411 (ps_pdwrite): Likewise.
1412
69291610
HW
14132015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1414
1415 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1416 to after assert checks.
1417
b42945fd
SM
14182015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1419
1420 * proc-service.c (ps_pdread): Add/adjust casts.
1421 (ps_pdwrite): Add/adjust casts.
1422
d6f85c84
SM
14232015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * server.c (handle_search_memory_1): Cast return value of
1426 memmem.
1427
f98cd059
SM
14282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1429
1430 * server.c (write_qxfer_response): Change type of data to
1431 gdb_byte *.
1432
d2412fa5
PA
14332015-10-29 Pedro Alves <palves@redhat.com>
1434
1435 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1436
c17414a2
PA
14372015-10-29 Pedro Alves <palves@redhat.com>
1438
1439 * tracepoint.c (clear_installed_tracepoints): Add casts.
1440
e053fbc4
PA
14412015-10-29 Pedro Alves <palves@redhat.com>
1442
1443 * server.c (handle_v_cont, process_serial_event): Add enum
1444 gdb_signal casts to signal parsing code.
1445
add67df8
PA
14462015-10-29 Pedro Alves <palves@redhat.com>
1447
1448 * linux-low.h (NULL_REGSET): Define.
1449 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1450 * linux-arm-low.c (arm_regsets): Likewise.
1451 * linux-crisv32-low.c (cris_regsets): Likewise.
1452 * linux-m68k-low.c (m68k_regsets): Likewise.
1453 * linux-mips-low.c (mips_regsets): Likewise.
1454 * linux-nios2-low.c (nios2_regsets): Likewise.
1455 * linux-ppc-low.c (ppc_regsets): Likewise.
1456 * linux-s390-low.c (s390_regsets): Likewise.
1457 * linux-sh-low.c (sh_regsets): Likewise.
1458 * linux-sparc-low.c (sparc_regsets): Likewise.
1459 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1460 * linux-tile-low.c (tile_regsets): Likewise.
1461 * linux-x86-low.c (x86_regsets): Likewise.
1462 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1463
50bc912a
PA
14642015-10-29 Pedro Alves <palves@redhat.com>
1465
1466 * linux-low.h (NULL_REGSET): Define.
1467 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1468 * linux-arm-low.c (arm_regsets): Likewise.
1469 * linux-crisv32-low.c (cris_regsets): Likewise.
1470 * linux-m68k-low.c (m68k_regsets): Likewise.
1471 * linux-mips-low.c (mips_regsets): Likewise.
1472 * linux-nios2-low.c (nios2_regsets): Likewise.
1473 * linux-ppc-low.c (ppc_regsets): Likewise.
1474 * linux-s390-low.c (s390_regsets): Likewise.
1475 * linux-sh-low.c (sh_regsets): Likewise.
1476 * linux-sparc-low.c (sparc_regsets): Likewise.
1477 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1478 * linux-tile-low.c (tile_regsets): Likewise.
1479 * linux-x86-low.c (x86_regsets): Likewise.
1480 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1481
682b2546
DE
14822015-10-26 Doug Evans <dje@google.com>
1483
1484 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1485
963843d4
DE
14862015-10-26 Doug Evans <dje@google.com>
1487
1488 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1489
d41401ac
DE
14902015-10-26 Doug Evans <dje@google.com>
1491
1492 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1493 for debug_printf.
1494 (attach_thread, find_new_threads_callback): Ditto.
1495
3db28855
AT
14962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1497
1498 * mem-break.h (set_breakpoint_data): Remove.
1499
fb78e89c
AT
15002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1501
1502 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1503 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1504 (initialize_low): Remove set_breakpoint_data call.
1505 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1506 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1507 (initialize_low): Remove set_breakpoint_data call.
1508 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1510 (initialize_low): Remove set_breakpoint_data call.
1511
2e6ee069
AT
15122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1513
1514 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1515 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1516 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1517 * target.h (target_breakpoint_kind_from_pc): New macro.
1518
1652a986
AT
15192015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1520
1521 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1522 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1523 the default breakpoint kind.
1524
abeead09
AT
15252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1526
1527 * linux-arm-low.c (arm_supports_z_point_type): Add software
1528 breakpoint support.
1529
b0b4b501
AT
15302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1531
1532 * linux-arm-low.c: Refactor breakpoint definitions.
1533 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1534 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1535
8689682c
AT
15362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1537
1538 * Makefile.in: Add arm.c/o.
1539 * configure.srv: Likewise.
1540 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1541 (arm_breakpoint_kind_from_pc): New function.
1542 (arm_sw_breakpoint_from_kind): Return proper kind.
1543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1544
27165294
AT
15452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1546
1547 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1548 removal.
1549 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1550 (struct raw_breakpoint) <size>: Remove.
1551 (struct raw_breakpoint) <kind>: Add.
1552 (bp_size): New function.
1553 (bp_opcode): Likewise.
1554 (find_raw_breakpoint_at): Adjust for kind.
1555 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1556 (remove_memory_breakpoint): Adjust for kind call bp_size.
1557 (set_raw_breakpoint_at): Adjust for kind.
1558 (set_breakpoint): Likewise.
1559 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1560 (delete_raw_breakpoint): Adjust for kind.
1561 (delete_breakpoint): Likewise.
1562 (find_gdb_breakpoint): Likewise.
1563 (set_gdb_breakpoint_1): Likewise.
1564 (set_gdb_breakpoint): Likewise.
1565 (delete_gdb_breakpoint_1): Likewise.
1566 (delete_gdb_breakpoint): Likewise.
1567 (uninsert_raw_breakpoint): Likewise.
1568 (reinsert_raw_breakpoint): Likewise.
1569 (set_breakpoint_data): Remove.
1570 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1571 (check_mem_read): Adjust for kind call bp_size.
1572 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1573 (clone_one_breakpoint): Adjust for kind.
1574 * mem-break.h (set_gdb_breakpoint): Likewise.
1575 (delete_gdb_breakpoint): Likewise.
1576 * server.c (process_serial_event): Likewise.
1577
dd373349
AT
15782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1579
1580 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1581 (struct linux_target_ops) <breakpoint>: Remove.
1582 (struct linux_target_ops) <breakpoint_len>: Remove.
1583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1585 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1586 (arm_sw_breakpoint_from_kind): New function.
1587 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1588 (struct linux_target_ops) <breakpoint>: Remove.
1589 (struct linux_target_ops) <breakpoint_len>: Remove.
1590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1592 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1593 (struct linux_target_ops) <breakpoint>: Remove.
1594 (struct linux_target_ops) <breakpoint_len>: Remove.
1595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1597 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1598 (struct linux_target_ops) <breakpoint>: Remove.
1599 (struct linux_target_ops) <breakpoint_len>: Remove.
1600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1602 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1603 and sw_breakpoint_from_kind to increment the pc.
1604 (linux_breakpoint_kind_from_pc): New function.
1605 (linux_sw_breakpoint_from_kind): New function.
1606 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1607 (initialize_low): Call breakpoint_kind_from_pc and
1608 sw_breakpoint_from_kind to replace breakpoint_data/len.
1609 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1610 New field.
1611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1612 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1613 (struct linux_target_ops) <breakpoint>: Remove.
1614 (struct linux_target_ops) <breakpoint_len>: Remove.
1615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1617 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1618 (struct linux_target_ops) <breakpoint>: Remove.
1619 (struct linux_target_ops) <breakpoint_len>: Remove.
1620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1622 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1623 (struct linux_target_ops) <breakpoint>: Remove.
1624 (struct linux_target_ops) <breakpoint_len>: Remove.
1625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1627 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1628 (struct linux_target_ops) <breakpoint>: Remove.
1629 (struct linux_target_ops) <breakpoint_len>: Remove.
1630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1632 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1633 (struct linux_target_ops) <breakpoint>: Remove.
1634 (struct linux_target_ops) <breakpoint_len>: Remove.
1635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1637 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1638 (struct linux_target_ops) <breakpoint>: Remove.
1639 (struct linux_target_ops) <breakpoint_len>: Remove.
1640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1642 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1643 (struct linux_target_ops) <breakpoint>: Remove.
1644 (struct linux_target_ops) <breakpoint_len>: Remove.
1645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1647 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1648 (struct linux_target_ops) <breakpoint>: Remove.
1649 (struct linux_target_ops) <breakpoint_len>: Remove.
1650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1652 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1653 (struct linux_target_ops) <breakpoint>: Remove.
1654 (struct linux_target_ops) <breakpoint_len>: Remove.
1655 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1656 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1657 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1658 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1659 (struct linux_target_ops) <breakpoint>: Remove.
1660 (struct linux_target_ops) <breakpoint_len>: Remove.
1661 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1662 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1663 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1664 (struct linux_target_ops) <breakpoint>: Remove.
1665 (struct linux_target_ops) <breakpoint_len>: Remove.
1666 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1667 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1668
4cd98a19
AT
16692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1670
1671 * linux-cris-low.c (cris_get_pc): Remove void arg.
1672
774ee6d2
AR
16732015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1674
1675 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1676 variable name.
1677
833dcd29
AR
16782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1679
1680 * inferiors.c (thread_pid_matches_callback): New function.
1681 (find_thread_process): New function.
1682 (remove_thread): Reset current_thread.
1683 (remove_process): Assert threads have been removed first.
1684
8d689ee5
YQ
16852015-10-15 Yao Qi <yao.qi@linaro.org>
1686
1687 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1688 if it is 3.
1689 (aarch64_remove_point): Likewise.
1690 * regcache.c (regcache_register_size): New function.
1691
1c2e1515
YQ
16922015-10-12 Yao Qi <yao.qi@linaro.org>
1693
1694 * linux-aarch64-low.c: Update all callers as emit_load_store
1695 is renamed to aarch64_emit_load_store.
1696
e1c587c3
YQ
16972015-10-12 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-aarch64-low.c: Update all callers of function renaming
1700 from emit_insn to aarch64_emit_insn.
1701
b6542f81
YQ
17022015-10-12 Yao Qi <yao.qi@linaro.org>
1703
1704 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1705 arch/aarch64-insn.h.
1706 (struct aarch64_memory_operand): Likewise.
1707 (ENCODE): Likewise.
1708 (emit_insn): Move to arch/aarch64-insn.c.
1709 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1710 (emit_load_store): Move to arch/aarch64-insn.c.
1711 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1712 (can_encode_int32): Remove.
1713
246994ce
YQ
17142015-10-12 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1717 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1718 (aarch64_relocate_instruction): Likewise.
1719 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1720 (struct aarch64_insn_visitor): Likewise.
1721
0badd99f
YQ
17222015-10-12 Yao Qi <yao.qi@linaro.org>
1723
1724 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1725 (struct aarch64_insn_visitor): New.
1726 (struct aarch64_insn_relocation_data): New.
1727 (aarch64_ftrace_insn_reloc_b): New function.
1728 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1729 (aarch64_ftrace_insn_reloc_cb): Likewise.
1730 (aarch64_ftrace_insn_reloc_tb): Likewise.
1731 (aarch64_ftrace_insn_reloc_adr): Likewise.
1732 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1733 (aarch64_ftrace_insn_reloc_others): Likewise.
1734 (visitor): New.
1735 (aarch64_relocate_instruction): Use visitor.
1736
dfaffe9d
YQ
17372015-10-12 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1740 int. Add argument buf.
1741 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1742 aarch64_relocate_instruction.
1743
70b439f0
YQ
17442015-10-12 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1747 argument insn. Remove local variable insn. Don't call
1748 target_read_uint32.
1749 (aarch64_install_fast_tracepoint_jump_pad): Call
1750 target_read_uint32.
1751
7781c06f
YQ
17522015-09-30 Yao Qi <yao.qi@linaro.org>
1753
1754 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1755 (emit_load_store_pair): Likewise.
1756
9a3c8263
SM
17572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1758
1759 * dll.c (match_dll): Add cast(s).
1760 (unloaded_dll): Likewise.
1761 * linux-low.c (second_thread_of_pid_p): Likewise.
1762 (delete_lwp_callback): Likewise.
1763 (count_events_callback): Likewise.
1764 (select_event_lwp_callback): Likewise.
1765 (linux_set_resume_request): Likewise.
1766 * server.c (accumulate_file_name_length): Likewise.
1767 (emit_dll_description): Likewise.
1768 (handle_qxfer_threads_worker): Likewise.
1769 (visit_actioned_threads): Likewise.
1770 * thread-db.c (any_thread_of): Likewise.
1771 * tracepoint.c (same_process_p): Likewise.
1772 (match_blocktype): Likewise.
1773 (build_traceframe_info_xml): Likewise.
1774
224c3ddb
SM
17752015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1776
1777 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1778 assignment.
1779 (gdb_unparse_agent_expr): Likewise.
1780 * hostio.c (require_data): Likewise.
1781 (handle_pread): Likewise.
1782 * linux-low.c (disable_regset): Likewise.
1783 (fetch_register): Likewise.
1784 (store_register): Likewise.
1785 (get_dynamic): Likewise.
1786 (linux_qxfer_libraries_svr4): Likewise.
1787 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1788 (set_fast_tracepoint_jump): Likewise.
1789 (uninsert_fast_tracepoint_jumps_at): Likewise.
1790 (reinsert_fast_tracepoint_jumps_at): Likewise.
1791 (validate_inserted_breakpoint): Likewise.
1792 (clone_agent_expr): Likewise.
1793 * regcache.c (init_register_cache): Likewise.
1794 * remote-utils.c (putpkt_binary_1): Likewise.
1795 (decode_M_packet): Likewise.
1796 (decode_X_packet): Likewise.
1797 (look_up_one_symbol): Likewise.
1798 (relocate_instruction): Likewise.
1799 (monitor_output): Likewise.
1800 * server.c (handle_search_memory): Likewise.
1801 (handle_qxfer_exec_file): Likewise.
1802 (handle_qxfer_libraries): Likewise.
1803 (handle_qxfer): Likewise.
1804 (handle_query): Likewise.
1805 (handle_v_cont): Likewise.
1806 (handle_v_run): Likewise.
1807 (captured_main): Likewise.
1808 * target.c (write_inferior_memory): Likewise.
1809 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1810 * tracepoint.c (init_trace_buffer): Likewise.
1811 (add_tracepoint_action): Likewise.
1812 (add_traceframe): Likewise.
1813 (add_traceframe_block): Likewise.
1814 (cmd_qtdpsrc): Likewise.
1815 (cmd_qtdv): Likewise.
1816 (cmd_qtstatus): Likewise.
1817 (response_source): Likewise.
1818 (response_tsv): Likewise.
1819 (cmd_qtnotes): Likewise.
1820 (gdb_collect): Likewise.
1821 (initialize_tracepoint): Likewise.
1822
afbe19f8
PL
18232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1824
1825 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1826 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1827 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1828 <NOP>: New.
1829 (enum aarch64_condition_codes): New enum.
1830 (w0): New static global.
1831 (fp): Likewise.
1832 (lr): Likewise.
1833 (struct aarch64_memory_operand) <type>: New
1834 MEMORY_OPERAND_POSTINDEX type.
1835 (postindex_memory_operand): New helper function.
1836 (emit_ret): New function.
1837 (emit_load_store_pair): New function, factored out of emit_stp
1838 with support for MEMORY_OPERAND_POSTINDEX.
1839 (emit_stp): Rewrite using emit_load_store_pair.
1840 (emit_ldp): New function.
1841 (emit_load_store): Likewise.
1842 (emit_ldr): Mention post-index instruction in comment.
1843 (emit_ldrh): New function.
1844 (emit_ldrb): New function.
1845 (emit_ldrsw): Mention post-index instruction in comment.
1846 (emit_str): Likewise.
1847 (emit_subs): New function.
1848 (emit_cmp): Likewise.
1849 (emit_and): Likewise.
1850 (emit_orr): Likewise.
1851 (emit_orn): Likewise.
1852 (emit_eor): Likewise.
1853 (emit_mvn): Likewise.
1854 (emit_lslv): Likewise.
1855 (emit_lsrv): Likewise.
1856 (emit_asrv): Likewise.
1857 (emit_mul): Likewise.
1858 (emit_sbfm): Likewise.
1859 (emit_sbfx): Likewise.
1860 (emit_ubfm): Likewise.
1861 (emit_ubfx): Likewise.
1862 (emit_csinc): Likewise.
1863 (emit_cset): Likewise.
1864 (emit_nop): Likewise.
1865 (emit_ops_insns): New helper function.
1866 (emit_pop): Likewise.
1867 (emit_push): Likewise.
1868 (aarch64_emit_prologue): New function.
1869 (aarch64_emit_epilogue): Likewise.
1870 (aarch64_emit_add): Likewise.
1871 (aarch64_emit_sub): Likewise.
1872 (aarch64_emit_mul): Likewise.
1873 (aarch64_emit_lsh): Likewise.
1874 (aarch64_emit_rsh_signed): Likewise.
1875 (aarch64_emit_rsh_unsigned): Likewise.
1876 (aarch64_emit_ext): Likewise.
1877 (aarch64_emit_log_not): Likewise.
1878 (aarch64_emit_bit_and): Likewise.
1879 (aarch64_emit_bit_or): Likewise.
1880 (aarch64_emit_bit_xor): Likewise.
1881 (aarch64_emit_bit_not): Likewise.
1882 (aarch64_emit_equal): Likewise.
1883 (aarch64_emit_less_signed): Likewise.
1884 (aarch64_emit_less_unsigned): Likewise.
1885 (aarch64_emit_ref): Likewise.
1886 (aarch64_emit_if_goto): Likewise.
1887 (aarch64_emit_goto): Likewise.
1888 (aarch64_write_goto_address): Likewise.
1889 (aarch64_emit_const): Likewise.
1890 (aarch64_emit_call): Likewise.
1891 (aarch64_emit_reg): Likewise.
1892 (aarch64_emit_pop): Likewise.
1893 (aarch64_emit_stack_flush): Likewise.
1894 (aarch64_emit_zero_ext): Likewise.
1895 (aarch64_emit_swap): Likewise.
1896 (aarch64_emit_stack_adjust): Likewise.
1897 (aarch64_emit_int_call_1): Likewise.
1898 (aarch64_emit_void_call_2): Likewise.
1899 (aarch64_emit_eq_goto): Likewise.
1900 (aarch64_emit_ne_goto): Likewise.
1901 (aarch64_emit_lt_goto): Likewise.
1902 (aarch64_emit_le_goto): Likewise.
1903 (aarch64_emit_gt_goto): Likewise.
1904 (aarch64_emit_ge_got): Likewise.
1905 (aarch64_emit_ops_impl): New static global variable.
1906 (aarch64_emit_ops): New target function, return
1907 &aarch64_emit_ops_impl.
1908 (struct linux_target_ops): Install it.
1909
bb903df0
PL
19102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1911
1912 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1913 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1914 aarch64-ipa.o.
1915 * linux-aarch64-ipa.c: New file.
1916 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1917 and endian.h.
1918 (aarch64_get_thread_area): New target method.
1919 (extract_signed_bitfield): New helper function.
1920 (aarch64_decode_ldr_literal): New function.
1921 (enum aarch64_opcodes): New enum.
1922 (struct aarch64_register): New struct.
1923 (struct aarch64_operand): New struct.
1924 (x0): New static global.
1925 (x1): Likewise.
1926 (x2): Likewise.
1927 (x3): Likewise.
1928 (x4): Likewise.
1929 (w2): Likewise.
1930 (ip0): Likewise.
1931 (sp): Likewise.
1932 (xzr): Likewise.
1933 (aarch64_register): New helper function.
1934 (register_operand): Likewise.
1935 (immediate_operand): Likewise.
1936 (struct aarch64_memory_operand): New struct.
1937 (offset_memory_operand): New helper function.
1938 (preindex_memory_operand): Likewise.
1939 (enum aarch64_system_control_registers): New enum.
1940 (ENCODE): New macro.
1941 (emit_insn): New helper function.
1942 (emit_b): New function.
1943 (emit_bcond): Likewise.
1944 (emit_cb): Likewise.
1945 (emit_tb): Likewise.
1946 (emit_blr): Likewise.
1947 (emit_stp): Likewise.
1948 (emit_ldp_q_offset): Likewise.
1949 (emit_stp_q_offset): Likewise.
1950 (emit_load_store): Likewise.
1951 (emit_ldr): Likewise.
1952 (emit_ldrsw): Likewise.
1953 (emit_str): Likewise.
1954 (emit_ldaxr): Likewise.
1955 (emit_stxr): Likewise.
1956 (emit_stlr): Likewise.
1957 (emit_data_processing_reg): Likewise.
1958 (emit_data_processing): Likewise.
1959 (emit_add): Likewise.
1960 (emit_sub): Likewise.
1961 (emit_mov): Likewise.
1962 (emit_movk): Likewise.
1963 (emit_mov_addr): Likewise.
1964 (emit_mrs): Likewise.
1965 (emit_msr): Likewise.
1966 (emit_sevl): Likewise.
1967 (emit_wfe): Likewise.
1968 (append_insns): Likewise.
1969 (can_encode_int32_in): New helper function.
1970 (aarch64_relocate_instruction): New function.
1971 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1972 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1973 (struct linux_target_ops): Install aarch64_get_thread_area,
1974 aarch64_install_fast_tracepoint_jump_pad and
1975 aarch64_get_min_fast_tracepoint_insn_len.
1976
787749ea
PL
19772015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1978
1979 * Makefile.in (aarch64-insn.o): New rule.
1980 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1981
9812b2e6
YQ
19822015-09-21 Yao Qi <yao.qi@linaro.org>
1983
1984 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1985
18fe412b
YQ
19862015-09-21 Yao Qi <yao.qi@linaro.org>
1987
1988 * tracepoint.c (max_jump_pad_size): Remove.
1989
a0cc84cd
YQ
19902015-09-18 Yao Qi <yao.qi@linaro.org>
1991
1992 * linux-aarch64-low.c: Don't include sys/uio.h.
1993 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1994
d78908cf
WW
19952015-09-16 Wei-cheng Wang <cole945@gmail.com>
1996
1997 * tracepoint.c (eval_result_type): Change prototype.
1998 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1999
d57e0d50
PA
20002015-09-15 Pedro Alves <palves@redhat.com>
2001
2002 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2003 Check whether to report exec events instead of checking whether
2004 multiprocess is enabled.
2005
5a676acc
PA
20062015-09-15 Pedro Alves <palves@redhat.com>
2007
2008 PR remote/18965
2009 * remote-utils.c (prepare_resume_reply): Merge
2010 TARGET_WAITKIND_VFORK_DONE switch case with the
2011 TARGET_WAITKIND_FORKED case.
2012
7c5d0fad
YQ
20132015-09-15 Yao Qi <yao.qi@linaro.org>
2014
2015 * server.c (handle_query): Check string comparison using
2016 "else if" instead of "if".
2017
750ce8d1
YQ
20182015-09-15 Yao Qi <yao.qi@linaro.org>
2019
2020 * server.c (vCont_supported): New global variable.
2021 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2022 matches. Append ";vContSupported+" to own_buf.
2023 (handle_v_requests): Append ";s;S" to own_buf if target supports
2024 hardware single step or vCont_supported is false.
2025 (capture_main): Set vCont_supported to zero.
2026
70b90b91
YQ
20272015-09-15 Yao Qi <yao.qi@linaro.org>
2028
2029 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2030 it to ...
2031 (linux_supports_hardware_single_step): ... New function.
2032 (linux_target_ops): Update.
2033 * lynx-low.c (lynx_target_ops): Set field
2034 supports_hardware_single_step to target_can_do_hardware_single_step.
2035 * nto-low.c (nto_target_ops): Likewise.
2036 * spu-low.c (spu_target_ops): Likewise.
2037 * win32-low.c (win32_target_ops): Likewise.
2038 * target.c (target_can_do_hardware_single_step): New function.
2039 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2040 Remove. <supports_hardware_single_step>: New field.
2041 (target_supports_conditional_breakpoints): Remove.
2042 (target_supports_hardware_single_step): New macro.
2043 (target_can_do_hardware_single_step): Declare.
2044 * server.c (handle_query): Use target_supports_hardware_single_step
2045 instead of target_supports_conditional_breakpoints.
2046
ade90bde
YQ
20472015-09-15 Yao Qi <yao.qi@linaro.org>
2048
2049 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2050 function.
2051 (struct linux_target_ops the_low_target): Install
2052 aarch64_linux_siginfo_fixup.
2053
94585166
DB
20542015-09-11 Don Breazeal <donb@codesourcery.com>
2055 Luis Machado <lgustavo@codesourcery.com>
2056
2057 * linux-low.c (linux_mourn): Static declaration.
2058 (linux_arch_setup): Move in front of
2059 handle_extended_wait.
2060 (linux_arch_setup_thread): New function.
2061 (handle_extended_wait): Handle exec events. Call
2062 linux_arch_setup_thread. Make event_lwp argument a
2063 pointer-to-a-pointer.
2064 (check_zombie_leaders): Do not check stopped threads.
2065 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2066 (linux_low_filter_event): Add lwp and thread for exec'ing
2067 non-leader thread if leader thread has been deleted.
2068 Refactor code into linux_arch_setup_thread and call it.
2069 Pass child lwp pointer by reference to handle_extended_wait.
2070 (linux_wait_for_event_filtered): Update comment.
2071 (linux_wait_1): Prevent clobbering exec event status.
2072 (linux_supports_exec_events): New function.
2073 (linux_target_ops) <supports_exec_events>: Initialize new member.
2074 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2075 new member.
2076 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2077 * server.c (report_exec_events): New global variable.
2078 (handle_query): Handle qSupported query for exec-events feature.
2079 (captured_main): Initialize report_exec_events.
2080 * server.h (report_exec_events): Declare new global variable.
2081 * target.h (struct target_ops) <supports_exec_events>: New
2082 member.
2083 (target_supports_exec_events): New macro.
2084 * win32-low.c (win32_target_ops) <supports_exec_events>:
2085 Initialize new member.
2086
0568462b
MM
20872015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2088
2089 * linux-low.c (linux_low_enable_btrace): Remove.
2090 (linux_target_ops): Replace linux_low_enable_btrace with
2091 linux_enable_btrace.
2092
39edd165
YQ
20932015-09-03 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (aarch64_insert_point): Call
2096 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2097 returns true.
2098
1db33b5a
UW
20992015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2100
2101 * linux-low.c (check_stopped_by_breakpoint): Use
2102 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2103
ab290430
PA
21042015-08-27 Pedro Alves <palves@redhat.com>
2105
2106 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2107
8d749320
SM
21082015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2109
6711b7f8
SM
2110 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2111 the XNEW-family equivalent.
8d749320
SM
2112 (compile_bytecodes): Likewise.
2113 * dll.c (loaded_dll): Likewise.
2114 * event-loop.c (append_callback_event): Likewise.
2115 (create_file_handler): Likewise.
2116 (create_file_event): Likewise.
2117 * hostio.c (handle_open): Likewise.
2118 * inferiors.c (add_thread): Likewise.
2119 (add_process): Likewise.
2120 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2121 * linux-arm-low.c (arm_new_process): Likewise.
2122 (arm_new_thread): Likewise.
2123 * linux-low.c (add_to_pid_list): Likewise.
2124 (linux_add_process): Likewise.
2125 (handle_extended_wait): Likewise.
2126 (add_lwp): Likewise.
2127 (enqueue_one_deferred_signal): Likewise.
2128 (enqueue_pending_signal): Likewise.
2129 (linux_resume_one_lwp_throw): Likewise.
2130 (linux_resume_one_thread): Likewise.
2131 (linux_read_memory): Likewise.
2132 (linux_write_memory): Likewise.
2133 * linux-mips-low.c (mips_linux_new_process): Likewise.
2134 (mips_linux_new_thread): Likewise.
2135 (mips_add_watchpoint): Likewise.
2136 * linux-x86-low.c (initialize_low_arch): Likewise.
2137 * lynx-low.c (lynx_add_process): Likewise.
2138 * mem-break.c (set_raw_breakpoint_at): Likewise.
2139 (set_breakpoint): Likewise.
2140 (add_condition_to_breakpoint): Likewise.
2141 (add_commands_to_breakpoint): Likewise.
2142 (clone_agent_expr): Likewise.
2143 (clone_one_breakpoint): Likewise.
2144 * regcache.c (new_register_cache): Likewise.
2145 * remote-utils.c (look_up_one_symbol): Likewise.
2146 * server.c (queue_stop_reply): Likewise.
2147 (start_inferior): Likewise.
2148 (queue_stop_reply_callback): Likewise.
2149 (handle_target_event): Likewise.
2150 * spu-low.c (fetch_ppc_memory): Likewise.
2151 (store_ppc_memory): Likewise.
2152 * target.c (set_target_ops): Likewise.
2153 * thread-db.c (thread_db_load_search): Likewise.
2154 (try_thread_db_load_1): Likewise.
2155 * tracepoint.c (add_tracepoint): Likewise.
2156 (add_tracepoint_action): Likewise.
2157 (create_trace_state_variable): Likewise.
2158 (cmd_qtdpsrc): Likewise.
2159 (cmd_qtro): Likewise.
2160 (add_while_stepping_state): Likewise.
2161 * win32-low.c (child_add_thread): Likewise.
2162 (get_image_name): Likewise.
2163
ed8b7b42
YQ
21642015-08-25 Yao Qi <yao.qi@linaro.org>
2165
2166 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2167
db3cb7cb
YQ
21682015-08-25 Yao Qi <yao.qi@linaro.org>
2169
2170 * Makefile.in (aarch64-linux.o): New rule.
2171 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2172 srv_tgtobj.
2173 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2174 (aarch64_init_debug_reg_state): Make it extern.
2175 (aarch64_linux_prepare_to_resume): Remove.
2176
f6011a1c
YQ
21772015-08-25 Yao Qi <yao.qi@linaro.org>
2178
2179 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2180 lwp_arch_private_info and ptid_of_lwp.
2181
88e2cf7e
YQ
21822015-08-25 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2185 Find proc_info by find_process_pid. All callers updated.
2186
5e35436e
YQ
21872015-08-25 Yao Qi <yao.qi@linaro.org>
2188
2189 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2190 Remove.
2191 (debug_reg_change_callback): Remove.
2192 (aarch64_notify_debug_reg_change): Remove.
2193
4a8a7965
YQ
21942015-08-25 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2197 Call current_lwp_ptid.
2198
32a271ee
YQ
21992015-08-25 Yao Qi <yao.qi@linaro.org>
2200
2201 * linux-aarch64-low.c (debug_reg_change_callback): Use
2202 debug_printf.
2203
0d51c8d7
YQ
22042015-08-25 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2207
31a43dd5
YQ
22082015-08-25 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2211
8ee52567
YQ
22122015-08-25 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2215 the code.
2216
ff3f0f45
YQ
22172015-08-25 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2220 Remove.
2221 (debug_reg_change_callback): Remove argument entry and add argument
2222 lwp. Remove local variable thread. Don't print thread id in the
2223 debugging output. Don't check whether pid of thread equals to pid.
2224 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2225 iterate_over_lwps instead find_inferior.
2226
3d40fbb5
PA
22272015-08-24 Pedro Alves <palves@redhat.com>
2228
2229 * inferiors.c (get_first_process): New function.
2230 * inferiors.h (get_first_process): New declaration.
2231 * remote-utils.c (read_ptid): Default to the first process in the
2232 list, instead of to the current thread's process.
2233
438e1e42
PA
22342015-08-24 Pedro Alves <palves@redhat.com>
2235
2236 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2237 * event-loop.c: Likewise.
2238 * remote-utils.c: Likewise.
2239 * tracepoint.c: Likewise.
2240
a8c6d4fc
PA
22412015-08-24 Pedro Alves <palves@redhat.com>
2242
2243 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2244 ptid_get_lwp.
2245
99b0bb12
PA
22462015-08-21 Pedro Alves <palves@redhat.com>
2247
2248 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2249 instead of literal 1.
2250
f8904751
PA
22512015-08-21 Pedro Alves <palves@redhat.com>
2252
2253 * tdesc.c (default_description): Explicitly zero-initialize.
2254
465a859e
PA
22552015-08-21 Pedro Alves <palves@redhat.com>
2256
2257 PR gdb/18749
2258 * inferiors.c (remove_thread): Discard any pending stop reply for
2259 this thread.
2260 * server.c (remove_all_on_match_pid): Rename to ...
2261 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2262 instead of a pid.
2263 (discard_queued_stop_replies): Change parameter to a ptid. Now
2264 extern.
2265 (handle_v_kill, kill_inferior_callback, captured_main)
2266 (process_serial_event): Adjust.
2267 * server.h (discard_queued_stop_replies): Declare.
2268
f0db101d
PA
22692015-08-21 Pedro Alves <palves@redhat.com>
2270
2271 * linux-low.c (wait_for_sigstop): Always switch to no thread
2272 selected if the previously current thread dies.
2273 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2274 process instead of the current thread's.
2275 * remote-utils.c (input_interrupt): Don't check if there's no
2276 current thread.
2277 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2278 current thread to the general thread fails, error out.
2279 (handle_qxfer_auxv, handle_qxfer_libraries)
2280 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2281 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2282 (handle_query): Check if there's a thread selected instead of
2283 checking whether there's any thread in the thread list.
2284 (handle_qxfer_threads, handle_qxfer_btrace)
2285 (handle_qxfer_btrace_conf): Don't error out early if there's no
2286 thread in the thread list.
2287 (handle_v_cont, myresume): Don't set the current thread to the
2288 continue thread.
2289 (process_serial_event) <Hg handling>: Also set thread_id if the
2290 previous general thread is still alive.
2291 (process_serial_event) <g/G handling>: If setting the current
2292 thread to the general thread fails, error out.
2293 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2294 thread's lwp instead of the current thread's.
2295 * target.c (set_desired_thread): If the desired thread was not
2296 found, leave the current thread pointing to NULL. Return an int
2297 (boolean) indicating success.
2298 * target.h (set_desired_thread): Change return type to int.
2299
40045d91
MF
23002015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2301
2302 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2303 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2304 #includes.
2305 (ps_get_thread_area): New function.
2306
45face3b
GB
23072015-08-19 Gary Benson <gbenson@redhat.com>
2308
2309 * hostio.c (handle_pread): Do not attempt to read more data
2310 than hostio_reply_with_data can fit in a packet.
2311
16d5f642
JB
23122015-08-18 Joel Brobecker <brobecker@adacore.com>
2313
2314 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2315
a738da3a
MF
23162015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2317
2318 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2319
33ebda9d
PA
23202015-08-06 Pedro Alves <palves@redhat.com>
2321
2322 * tracepoint.c (expr_eval_result): Now an int.
2323
a44892be
PA
23242015-08-06 Pedro Alves <palves@redhat.com>
2325
2326 * gdbthread.h (struct regcache): Forward declare.
2327 (struct thread_info) <regcache_data>: Now a struct regcache
2328 pointer.
2329 * inferiors.c (inferior_regcache_data)
2330 (set_inferior_regcache_data): Now work with struct regcache
2331 pointers.
2332 * inferiors.h (struct regcache): Forward declare.
2333 (inferior_regcache_data, set_inferior_regcache_data): Now work
2334 with struct regcache pointers.
2335 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2336 (free_register_cache_thread): Remove struct regcache pointer
2337 casts.
2338
608a1e46
PA
23392015-08-06 Pedro Alves <palves@redhat.com>
2340
2341 * server.c (captured_main): On error, print the exception message
2342 to stderr, and if run_once is set, throw a quit.
2343
f0ce0d3a
PA
23442015-08-06 Pedro Alves <palves@redhat.com>
2345
2346 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2347 the current thread.
2348
bf47e248
PA
23492015-08-06 Pedro Alves <palves@redhat.com>
2350
2351 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2352 reading beyond the passed in buffer length.
2353
b6b9ffcc
PL
23542015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2355
2356 * tracepoint.c (symbol_list) <required>: Remove.
2357
863d01bd
PA
23582015-08-06 Pedro Alves <palves@redhat.com>
2359
2360 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2361 count if stopping and suspending threads.
2362 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2363 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2364 (linux_detach): Complete an ongoing step-over.
2365 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2366 throughout.
2367 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2368 (linux_wait_1): If passing a signal to the inferior after
2369 finishing a step-over, unsuspend and re-resume all lwps. If we
2370 see a single-step event but the thread should be continuing, don't
2371 pass the trap to gdb.
2372 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2373 internal_error instead of gdb_assert.
2374 (enqueue_pending_signal): New function.
2375 (check_ptrace_stopped_lwp_gone): Add debug output.
2376 (start_step_over): Use internal_error instead of gdb_assert.
2377 (complete_ongoing_step_over): New function.
2378 (linux_resume_one_thread): Don't resume a suspended thread.
2379 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2380 it stepping.
2381
00db26fa
PA
23822015-08-06 Pedro Alves <palves@redhat.com>
2383
2384 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2385 (linux_thread_alive): Use lwp_is_marked_dead.
2386 (extended_event_reported): Delete.
2387 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2388 instead of extended_event_reported.
2389 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2390 as well.
2391 (lwp_is_marked_dead): New function.
2392 (lwp_running): Use lwp_is_marked_dead.
2393 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2394 comment.
2395
ad071a30
PA
23962015-08-06 Pedro Alves <palves@redhat.com>
2397
2398 * linux-low.c (linux_wait_1): Move fork event output out of the
2399 !report_to_gdb check. Pass event_child->waitstatus to
2400 target_waitstatus_to_string instead of ourstatus.
2401
524b57e6
YQ
24022015-08-04 Yao Qi <yao.qi@linaro.org>
2403
2404 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2405 if current_thread is 32 bit.
2406
6085d6f6
YQ
24072015-08-04 Yao Qi <yao.qi@linaro.org>
2408
2409 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2410 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2411 * server.c (extended_protocol): Remove "static".
2412 * server.h (extended_protocol): Declare it.
2413
8a7e4587
YQ
24142015-08-04 Yao Qi <yao.qi@linaro.org>
2415
2416 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2417 both aarch64 and aarch32.
2418 (aarch64_set_pc): Likewise.
2419
3b53ae99
YQ
24202015-08-04 Yao Qi <yao.qi@linaro.org>
2421
2422 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2423 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2424 arm-with-neon.xml to srv_xmlfiles.
2425 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2426 (is_64bit_tdesc): New function.
2427 (aarch64_linux_read_description): New function.
2428 (aarch64_arch_setup): Call aarch64_linux_read_description.
2429 (regs_info): Rename to regs_info_aarch64.
2430 (aarch64_regs_info): Return right regs_info.
2431 (initialize_low_arch): Call initialize_low_arch_aarch32.
2432
bd9e6534
YQ
24332015-08-04 Yao Qi <yao.qi@linaro.org>
2434
2435 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2436 * linux-aarch32-low.c: New file.
2437 * linux-aarch32-low.h: New file.
2438 * linux-arm-low.c (arm_fill_gregset): Move it to
2439 linux-aarch32-low.c.
2440 (arm_store_gregset): Likewise.
2441 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2442 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2443 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2444 (regs_info): Rename to regs_info_arm.
2445 (arm_regs_info): Return regs_info_aarch32 if
2446 have_ptrace_getregset is 1 and target description is
2447 arm_with_neon or arm_with_vfpv3.
2448 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2449 Call initialize_low_arch_aarch32 instead.
2450
ded48a5e
YQ
24512015-08-04 Yao Qi <yao.qi@linaro.org>
2452
2453 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2454 * linux-low.c: ... here.
2455 * linux-low.h (have_ptrace_getregset): Declare it.
2456
96e9210f
PA
24572015-08-04 Pedro Alves <palves@redhat.com>
2458
2459 * thread-db.c (struct thread_db): Use new typedefs.
2460 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2461 CHK calls.
2462 (disable_thread_event_reporting): Cast result of dlsym to
2463 destination function pointer type.
2464 (thread_db_mourn): Use td_ta_delete_ftype.
2465
af60a1ef
SL
24662015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2467
2468 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2469 arch variant.
2470 (CDX_BREAKPOINT): Define for R2.
2471 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2472 (the_low_target): Add comments.
2473
e8b41681
YQ
24742015-07-30 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-arm-low.c (arm_hwcap): Remove it.
2477 (arm_read_description): New local variable arm_hwcap. Don't
2478 set arm_hwcap to zero.
2479
89abb039
YQ
24802015-07-30 Yao Qi <yao.qi@linaro.org>
2481
2482 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2483 Use regcache->tdesc instead.
2484 (arm_store_wmmxregset): Likewise.
2485 (arm_fill_vfpregset): Likewise.
2486 (arm_store_vfpregset): Likewise.
2487
deca266c
YQ
24882015-07-30 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-arm-low.c: Include arch/arm.h.
2491 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2492 (arm_store_gregset): Likewise.
2493
aa58a496
SM
24942015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2497 ptrace's 4th parameter.
2498
50904b25
YQ
24992015-07-27 Yao Qi <yao.qi@linaro.org>
2500
2501 * configure.srv (case aarch64*-*-linux*): Don't set
2502 srv_linux_usrregs.
2503
5826e159
PA
25042015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2505
2506 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2507 sys/ptrace.h.
2508 * linux-arm-low.c: Likewise.
2509 * linux-cris-low.c: Likewise.
2510 * linux-crisv32-low.c: Likewise.
2511 * linux-low.c: Likewise.
2512 * linux-m68k-low.c: Likewise.
2513 * linux-mips-low.c: Likewise.
2514 * linux-nios2-low.c: Likewise.
2515 * linux-s390-low.c: Likewise.
2516 * linux-sparc-low.c: Likewise.
2517 * linux-tic6x-low.c: Likewise.
2518 * linux-tile-low.c: Likewise.
2519 * linux-x86-low.c: Likewise.
2520
54019719
PA
25212015-07-24 Pedro Alves <palves@redhat.com>
2522
2523 * config.in: Regenerate.
2524 * configure: Regenerate.
2525
eb7aa561
PA
25262015-07-24 Pedro Alves <palves@redhat.com>
2527
2528 * acinclude.m4: Include ../ptrace.m4.
2529 * configure.ac: Call GDB_AC_PTRACE.
2530 * config.in, configure: Regenerate.
2531
55d7b841
YQ
25322015-07-24 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-low.c (linux_create_inferior): Remove setting to
2535 proc->priv->new_inferior.
2536 (linux_attach): Likewise.
2537 (linux_low_filter_event): Likewise.
2538 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2539
c06cbd92
YQ
25402015-07-24 Yao Qi <yao.qi@linaro.org>
2541
2542 * linux-low.c (linux_arch_setup): New function.
2543 (linux_low_filter_event): If proc->tdesc is NULL and
2544 proc->attached is true, call the_low_target.arch_setup.
2545 Otherwise, keep status pending, and return.
2546 (linux_resume_one_lwp_throw): Don't call get_pc if
2547 thread->while_stepping isn't NULL. Don't call
2548 get_thread_regcache if proc->tdesc is NULL.
2549 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2550 (linux_target_ops): Install arch_setup.
2551 * server.c (start_inferior): Call the_target->arch_setup.
2552 * target.h (struct target_ops) <arch_setup>: New field.
2553 (target_arch_setup): New marco.
2554 * lynx-low.c (lynx_target_ops): Update.
2555 * nto-low.c (nto_target_ops): Update.
2556 * spu-low.c (spu_target_ops): Update.
2557 * win32-low.c (win32_target_ops): Update.
2558
5ae3ebba
YQ
25592015-07-24 Yao Qi <yao.qi@linaro.org>
2560
2561 * linux-low.c (linux_add_process): Don't set
2562 proc->priv->new_inferior.
2563 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2564 (linux_attach): Likewise.
2565
eb97750b
YQ
25662015-07-24 Yao Qi <yao.qi@linaro.org>
2567
2568 * server.c (start_inferior): Code refactor.
2569
51aee833
YQ
25702015-07-24 Yao Qi <yao.qi@linaro.org>
2571
2572 * server.c (process_serial_event): Set general_thread.
2573
af1b22f3
YQ
25742015-07-21 Yao Qi <yao.qi@linaro.org>
2575
2576 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2577 aarch64_linux_get_debug_reg_capacity.
2578
554717a3
YQ
25792015-07-17 Yao Qi <yao.qi@linaro.org>
2580
2581 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2582 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2583 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2584 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2585 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2586 (AARCH64_HWP_ALIGNMENT): Likewise.
2587 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2588 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2589 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2590 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2591 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2592 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2593 (struct aarch64_debug_reg_state): Likewise.
2594 (struct arch_lwp_info): Likewise.
2595 (aarch64_align_watchpoint): Likewise.
2596 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2597 (aarch64_watchpoint_length): Likewise.
2598 (aarch64_point_encode_ctrl_reg): Likewise
2599 (aarch64_point_is_aligned): Likewise.
2600 (aarch64_align_watchpoint): Likewise.
2601 (aarch64_linux_set_debug_regs):
2602 (aarch64_dr_state_insert_one_point): Likewise.
2603 (aarch64_dr_state_remove_one_point): Likewise.
2604 (aarch64_handle_breakpoint): Likewise.
2605 (aarch64_handle_aligned_watchpoint): Likewise.
2606 (aarch64_handle_unaligned_watchpoint): Likewise.
2607 (aarch64_handle_watchpoint): Likewise.
2608
c67ca4de
YQ
26092015-07-17 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2612 and don't aarch64_get_debug_reg_state. All callers update.
2613 (aarch64_handle_aligned_watchpoint): Likewise.
2614 (aarch64_handle_unaligned_watchpoint): Likewise.
2615 (aarch64_handle_watchpoint): Likewise.
2616 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2617 (aarch64_remove_point): Likewise.
2618
25abf979
YQ
26192015-07-17 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2622 debug_printf.
2623 (aarch64_handle_unaligned_watchpoint): Likewise.
2624
db1ff28b
JK
26252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2626
2627 Revert the previous 3 commits:
2628 Move gdb_regex* to common/
2629 Move linux_find_memory_regions_full & co.
2630 gdbserver build-id attribute generator
2631
700ca40f
JK
26322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2633 Jan Kratochvil <jan.kratochvil@redhat.com>
2634
2635 gdbserver build-id attribute generator.
2636 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2637 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2638 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2639 (find_phdr): New.
2640 (get_dynamic): Use find_pdhr to traverse program headers.
2641 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2642 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2643 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2644 (get_hex_build_id): New.
2645 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2646 to reply XML document.
2647
9904185c
JK
26482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2649 Jan Kratochvil <jan.kratochvil@redhat.com>
2650
2651 * target.c: Include target/target-utils.h and fcntl.h.
2652 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2653 (target_fileio_read_stralloc): New functions.
2654
6e5b4429
JK
26552015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2656
2657 * Makefile.in (OBS): Add gdb_regex.o.
2658 (gdb_regex.o): New.
2659 * config.in: Rebuilt.
2660 * configure: Rebuilt.
2661
ddc98fbf
JK
26622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2663 Jan Kratochvil <jan.kratochvil@redhat.com>
2664
2665 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2666 * Makefile.in (OBS): Add target-utils.o.
2667 (linux-maps.o, target-utils.o): New.
2668 * configure.srv (srv_linux_obj): Add linux-maps.o.
2669
e57bb7a0
PL
26702015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2671
2672 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2673 function, return 1.
2674 (the_low_target): Install it.
2675
586b02a9
PA
26762015-07-14 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2679 Instead, ignore ECHILD, and throw an error for other errnos.
2680
58c1b36c
PA
26812015-07-10 Pedro Alves <palves@redhat.com>
2682
2683 * event-loop.c (struct callback_event) <data>: Change type to
2684 gdb_client_data instance instead of gdb_client_data pointer.
2685 (append_callback_event): Adjust.
2686
421530db
PL
26872015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2688
2689 * linux-aarch64-low.c: Add comments for each linux_target_ops
2690 method. Remove comments already covered in target_ops and
2691 linux_target_ops definitions.
2692 (the_low_target): Add comments for each unimplemented method.
2693
c2d65f38
YQ
26942015-07-09 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (aarch64_regmap): Remove.
2697 (aarch64_usrregs_info): Remove.
2698 (regs_info): Set field usrregs to NULL.
2699
b20a6524
MM
27002015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2701
2702 * linux-low.c: Include "rsp-low.h"
2703 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2704 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2705 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2706 (handle_btrace_enable_pt): New.
2707 (handle_btrace_general_set): Support "pt".
2708 (handle_btrace_conf_general_set): Support "pt:size".
2709
96c97461
PL
27102015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2711
2712 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2713 Z_PACKET_SW_BP.
2714
37d66942
PL
27152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2716
2717 * linux-aarch64-low.c: Remove comment about endianness.
2718 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2719 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2720 memcmp.
2721
dc06243f
GB
27222015-06-24 Gary Benson <gbenson@redhat.com>
2723
2724 * linux-i386-ipa.c (stdint.h): Do not include.
2725 * lynx-i386-low.c (stdint.h): Likewise.
2726 * lynx-ppc-low.c (stdint.h): Likewise.
2727 * mem-break.c (stdint.h): Likewise.
2728 * thread-db.c (stdint.h): Likewise.
2729 * tracepoint.c (stdint.h): Likewise.
2730 * win32-low.c (stdint.h): Likewise.
2731
124e13d9
SM
27322015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2733
2734 * server.c (write_qxfer_response): Update call to
2735 remote_escape_output.
2736
909c2cda
JK
27372015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2738 Jan Kratochvil <jan.kratochvil@redhat.com>
2739
2740 Merge multiple hex conversions.
2741 * gdbreplay.c (tohex): Rename to 'fromhex'.
2742 (logchar): Use fromhex.
2743
24c05f46
JK
27442015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2745
2746 * server.c (handle_qxfer_libraries): Set `version' attribute for
2747 <library-list>.
2748
14d2069a
GB
27492015-06-10 Gary Benson <gbenson@redhat.com>
2750
2751 * target.h (struct target_ops) <multifs_open>: New field.
2752 <multifs_unlink>: Likewise.
2753 <multifs_readlink>: Likewise.
2754 * linux-low.c (nat/linux-namespaces.h): New include.
2755 (linux_target_ops): Initialize the_target->multifs_open,
2756 the_target->multifs_unlink and the_target->multifs_readlink.
2757 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2758 * hostio.c (hostio_fs_pid): New static variable.
2759 (hostio_handle_new_gdb_connection): New function.
2760 (handle_setfs): Likewise.
2761 (handle_open): Use the_target->multifs_open as appropriate.
2762 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2763 (handle_readlink): Use the_target->multifs_readlink as
2764 appropriate.
2765 (handle_vFile): Handle vFile:setfs packets.
2766 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2767 after target_handle_new_gdb_connection.
2768
4b8b5e72
GB
27692015-06-10 Gary Benson <gbenson@redhat.com>
2770
2771 * configure.ac (AC_CHECK_FUNCS): Add setns.
2772 * config.in: Regenerate.
2773 * configure: Likewise.
2774 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2775 (linux-namespaces.o): New rule.
2776 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2777
3ac2e371
GB
27782015-06-09 Gary Benson <gbenson@redhat.com>
2779
2780 * hostio.c (handle_open): Process mode argument with
2781 fileio_to_host_mode.
2782
ca9b78ce
YQ
27832015-06-01 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2786 * linux-x86-low.c: Likewise.
2787
bfacd19d
DB
27882015-05-28 Don Breazeal <donb@codesourcery.com>
2789
2790 * linux-low.c (handle_extended_wait): Initialize
2791 thread_info.last_resume_kind for new fork children.
2792
452003ef
PA
27932015-05-15 Pedro Alves <palves@redhat.com>
2794
2795 * target.h (target_handle_new_gdb_connection): Rewrite using if
2796 wrapped in do/while.
2797
1041a03c
JB
27982015-05-14 Joel Brobecker <brobecker@adacore.com>
2799
2800 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2801 * configure, config.in: Regenerate.
2802 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2803 Declare typedef.
2804
c269dbdb
DB
28052015-05-12 Don Breazeal <donb@codesourcery.com>
2806
2807 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2808 PTRACE_EVENT_VFORK_DONE.
2809 (linux_low_ptrace_options, extended_event_reported): Add vfork
2810 events.
2811 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2812 and "vforkdone" for RSP 'T' Stop Reply Packet.
2813 * server.h (report_vfork_events): Declare
2814 global variable.
2815
3a8a0396
DB
28162015-05-12 Don Breazeal <donb@codesourcery.com>
2817
2818 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2819 (the_low_target) <new_fork>: Initialize new member.
2820 * linux-arm-low.c (arm_new_fork): New function.
2821 (the_low_target) <new_fork>: Initialize new member.
2822 * linux-low.c (handle_extended_wait): Call new target function
2823 new_fork.
2824 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2825 * linux-mips-low.c (mips_add_watchpoint): New function
2826 extracted from mips_insert_point.
2827 (the_low_target) <new_fork>: Initialize new member.
2828 (mips_linux_new_fork): New function.
2829 (mips_insert_point): Call mips_add_watchpoint.
2830 * linux-x86-low.c (x86_linux_new_fork): New function.
2831 (the_low_target) <new_fork>: Initialize new member.
2832
de0d863e
DB
28332015-05-12 Don Breazeal <donb@codesourcery.com>
2834
2835 * linux-low.c (handle_extended_wait): Implement return value,
2836 rename argument 'event_child' to 'event_lwp', handle
2837 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2838 (linux_low_ptrace_options): New function.
2839 (linux_low_filter_event): Call linux_low_ptrace_options,
2840 use different argument fo linux_enable_event_reporting,
2841 use return value from handle_extended_wait.
2842 (extended_event_reported): New function.
2843 (linux_wait_1): Call extended_event_reported and set
2844 status to report fork events.
2845 (linux_write_memory): Add pid to debug message.
2846 (reset_lwp_ptrace_options_callback): New function.
2847 (linux_handle_new_gdb_connection): New function.
2848 (linux_target_ops): Initialize new structure member.
2849 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2850 * lynx-low.c: Initialize new structure member.
2851 * remote-utils.c (prepare_resume_reply): Implement stop reason
2852 "fork" for "T" stop message.
2853 * server.c (handle_query): Call handle_new_gdb_connection.
2854 * server.h (report_fork_events): Declare global flag.
2855 * target.h (struct target_ops) <handle_new_gdb_connection>:
2856 New member.
2857 (target_handle_new_gdb_connection): New macro.
2858 * win32-low.c: Initialize new structure member.
2859
ddcbc397
DB
28602015-05-12 Don Breazeal <donb@codesourcery.com>
2861
2862 * mem-break.c (APPEND_TO_LIST): Define macro.
2863 (clone_agent_expr): New function.
2864 (clone_one_breakpoint): New function.
2865 (clone_all_breakpoints): New function.
2866 * mem-break.h: Declare new functions.
2867
89245bc0
DB
28682015-05-12 Don Breazeal <donb@codesourcery.com>
2869
2870 * linux-low.c (linux_supports_fork_events): New function.
2871 (linux_supports_vfork_events): New function.
2872 (linux_target_ops): Initialize new structure members.
2873 (initialize_low): Call linux_check_ptrace_features.
2874 * lynx-low.c (lynx_target_ops): Initialize new structure
2875 members.
2876 * server.c (report_fork_events, report_vfork_events):
2877 New global flags.
2878 (handle_query): Add new features to qSupported packet and
2879 response.
2880 (captured_main): Initialize new global variables.
2881 * target.h (struct target_ops) <supports_fork_events>:
2882 New member.
2883 <supports_vfork_events>: New member.
2884 (target_supports_fork_events): New macro.
2885 (target_supports_vfork_events): New macro.
2886 * win32-low.c (win32_target_ops): Initialize new structure
2887 members.
2888
835205d0
GB
28892015-05-12 Gary Benson <gbenson@redhat.com>
2890
2891 * server.c (handle_qxfer_exec_file): Use current process
2892 if annex is empty.
2893
21e94bd9
SL
28942015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2895
2896 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2897 Remove HAVE_PTRACE_GETREGS conditionals.
2898 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2899 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2900
45614f15
YQ
29012015-05-08 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-low.c (linux_supports_conditional_breakpoints): New
2904 function.
2905 (linux_target_ops): Install new target method.
2906 * lynx-low.c (lynx_target_ops): Install NULL hook for
2907 supports_conditional_breakpoints.
2908 * nto-low.c (nto_target_ops): Likewise.
2909 * spu-low.c (spu_target_ops): Likewise.
2910 * win32-low.c (win32_target_ops): Likewise.
2911 * server.c (handle_query): Check
2912 target_supports_conditional_breakpoints.
2913 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2914 New field.
2915 (target_supports_conditional_breakpoints): New macro.
2916
80ad801e
PA
29172015-05-06 Pedro Alves <palves@redhat.com>
2918
2919 PR server/18081
2920 * server.c (start_inferior): If the process exits, mourn it.
2921
819843c7
GB
29222015-04-21 Gary Benson <gbenson@redhat.com>
2923
2924 * hostio.c (fileio_open_flags_to_host): Factored out to
2925 fileio_to_host_openflags in common/fileio.c. Single use
2926 updated.
2927
a2d5a9d7
MF
29282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2929
2930 * linux-xtensa-low.c (xtensa_fill_gregset)
2931 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2932 XCHAL_HAVE_LOOP.
2933
deb44829
MF
29342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2935
2936 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2937 (regs_info): Replace usrregs pointer with NULL.
2938
e57f1de3
GB
29392015-04-17 Gary Benson <gbenson@redhat.com>
2940
2941 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2942 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2943 * server.c (handle_qxfer_exec_file): New function.
2944 (qxfer_packets): Add exec-file entry.
2945 (handle_query): Report qXfer:exec-file:read as supported packet.
2946
62828379
RN
29472015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2948
2949 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2950
b88bb450
GB
29512015-04-09 Gary Benson <gbenson@redhat.com>
2952
2953 * hostio-errno.c (errno_to_fileio_error): Remove function.
2954 Update caller to use remote_fileio_to_fio_error.
2955
c8f4bfdd
YQ
29562015-04-09 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-low.c (linux_insert_point): Call
2959 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2960 (linux_remove_point): Call remove_memory_breakpoint if type is
2961 raw_bkpt_type_sw.
2962 * linux-x86-low.c (x86_insert_point): Don't call
2963 insert_memory_breakpoint.
2964 (x86_remove_point): Don't call remove_memory_breakpoint.
2965
41f98f02
PA
29662015-04-01 Pedro Alves <palves@redhat.com>
2967 Cleber Rosa <crosa@redhat.com>
2968
2969 * server.c (gdbserver_usage): Reorganize and extend the usage
2970 message.
2971
2bf6fb9d
PA
29722015-03-24 Pedro Alves <palves@redhat.com>
2973
2974 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2975 output. Also dump TRAP_TRACE.
2976 (linux_low_filter_event): In debug output, distinguish a
2977 resume_stop SIGSTOP from a delayed SIGSTOP.
2978
369f6daa
GB
29792015-03-24 Gary Benson <gbenson@redhat.com>
2980
2981 * linux-x86-low.c (x86_linux_new_thread): Moved to
2982 nat/x86-linux.c.
2983 (x86_linux_prepare_to_resume): Likewise.
2984
8e5d4070
GB
29852015-03-24 Gary Benson <gbenson@redhat.com>
2986
2987 * Makefile.in (x86-linux-dregs.o): New rule.
2988 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2989 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2990 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2991 (x86_linux_dr_get): Likewise.
2992 (x86_linux_dr_set): Likewise.
2993 (update_debug_registers_callback): Likewise.
2994 (x86_linux_dr_set_addr): Likewise.
2995 (x86_linux_dr_get_addr): Likewise.
2996 (x86_linux_dr_set_control): Likewise.
2997 (x86_linux_dr_get_control): Likewise.
2998 (x86_linux_dr_get_status): Likewise.
2999 (x86_linux_update_debug_registers): Likewise.
3000
2b95d440
GB
30012015-03-24 Gary Benson <gbenson@redhat.com>
3002
3003 * linux-x86-low.c (x86_linux_update_debug_registers):
3004 New function, factored out from...
3005 (x86_linux_prepare_to_resume): ...this.
3006
14b0bc68
GB
30072015-03-24 Gary Benson <gbenson@redhat.com>
3008
3009 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3010 (x86_linux_dr_set): Likewise.
3011 (update_debug_registers_callback): Likewise.
3012 (x86_linux_dr_set_addr): Likewise.
3013 (x86_linux_dr_get_addr): Likewise.
3014 (x86_linux_dr_set_control): Likewise.
3015 (x86_linux_dr_get_control): Likewise.
3016 (x86_linux_dr_get_status): Likewise.
3017 (x86_linux_prepare_to_resume): Likewise.
3018
5dfe6ca8
GB
30192015-03-24 Gary Benson <gbenson@redhat.com>
3020
3021 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3022 Use perror_with_name. Pass string through gettext.
3023 (x86_linux_dr_set): Likewise.
3024
d33472ad
GB
30252015-03-24 Gary Benson <gbenson@redhat.com>
3026
3027 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3028 (x86_linux_dr_set_addr): ...this.
3029 (x86_dr_low_get_addr): Rename to...
3030 (x86_linux_dr_get_addr): ...this.
3031 (x86_dr_low_set_control): Rename to...
3032 (x86_linux_dr_set_control): ...this.
3033 (x86_dr_low_get_control): Rename to...
3034 (x86_linux_dr_get_control): ...this.
3035 (x86_dr_low_get_status): Rename to...
3036 (x86_linux_dr_get_status): ...this.
3037 (x86_dr_low): Update with new function names.
3038
4b134ca1
GB
30392015-03-24 Gary Benson <gbenson@redhat.com>
3040
3041 * Makefile.in (x86-linux.o): New rule.
3042 * configure.srv: Add x86-linux.o to relevant targets.
3043 * linux-low.c (lwp_set_arch_private_info): New function.
3044 (lwp_arch_private_info): Likewise.
3045 * linux-x86-low.c: Include nat/x86-linux.h.
3046 (arch_lwp_info): Removed structure.
3047 (update_debug_registers_callback):
3048 Use lwp_set_debug_registers_changed.
3049 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3050 and lwp_set_debug_registers_changed.
3051 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3052
34c703da
GB
30532015-03-24 Gary Benson <gbenson@redhat.com>
3054
3055 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3056 * linux-arm-low.c (arm_new_thread): Likewise.
3057 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3058 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3059 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3060 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3061
cff068da
GB
30622015-03-24 Gary Benson <gbenson@redhat.com>
3063
3064 * linux-low.c (ptid_of_lwp): New function.
3065 (lwp_is_stopped): Likewise.
3066 (lwp_stop_reason): Likewise.
3067 * linux-x86-low.c (update_debug_registers_callback):
3068 Use lwp_is_stopped.
3069 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3070 lwp_stop_reason.
3071
b2f7c7e8
GB
30722015-03-24 Gary Benson <gbenson@redhat.com>
3073
3074 * linux-low.h (linux_stop_lwp): Remove declaration.
3075
6d4ee8c6
GB
30762015-03-24 Gary Benson <gbenson@redhat.com>
3077
3078 * linux-low.h: Include nat/linux-nat.h.
3079 * linux-low.c (iterate_over_lwps_args): New structure.
3080 (iterate_over_lwps_filter): New function.
3081 (iterate_over_lwps): Likewise.
3082 * linux-x86-low.c (update_debug_registers_callback):
3083 Update signature to what iterate_over_lwps expects.
3084 Remove PID check that iterate_over_lwps now performs.
3085 (x86_dr_low_set_addr): Use iterate_over_lwps.
3086 (x86_dr_low_set_control): Likewise.
3087
70a0bb6b
GB
30882015-03-24 Gary Benson <gbenson@redhat.com>
3089
3090 * linux-x86-low.c (x86_debug_reg_state): New function.
3091 (x86_linux_prepare_to_resume): Use the above.
3092
7b669087
GB
30932015-03-24 Gary Benson <gbenson@redhat.com>
3094
3095 * linux-low.c (current_lwp_ptid): New function.
3096 * linux-x86-low.c: Include nat/linux-nat.h.
3097 (x86_dr_low_get_addr): Use current_lwp_ptid.
3098 (x86_dr_low_get_control): Likewise.
3099 (x86_dr_low_get_status): Likewise.
3100
eef49a3d
PA
31012015-03-20 Pedro Alves <palves@redhat.com>
3102
3103 * tracepoint.c (cmd_qtstatus): Make "str" const.
3104
b2333d22
PA
31052015-03-20 Pedro Alves <palves@redhat.com>
3106
3107 * server.c (handle_general_set): Make "req_str" const.
3108
23f238d3
PA
31092015-03-19 Pedro Alves <palves@redhat.com>
3110
3111 * linux-low.c (linux_resume_one_lwp): Rename to ...
3112 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3113 instead call perror_with_name.
3114 (check_ptrace_stopped_lwp_gone): New function.
3115 (linux_resume_one_lwp): Reimplement as wrapper around
3116 linux_resume_one_lwp_throw that swallows errors if the LWP is
3117 gone.
3118
91baf43f
PA
31192015-03-19 Pedro Alves <palves@redhat.com>
3120
3121 * linux-low.c (count_events_callback, select_event_lwp_callback):
3122 No longer check whether the thread has resume_stop as last resume
3123 kind.
3124
8bf3b159
PA
31252015-03-19 Pedro Alves <palves@redhat.com>
3126
3127 * linux-low.c (count_events_callback, select_event_lwp_callback):
3128 Use the lwp's status_pending_p field, not the thread's.
3129
b90fc188
PA
31302015-03-19 Pedro Alves <palves@redhat.com>
3131
3132 * linux-low.c (select_event_lwp_callback): Update comments to
3133 no longer mention SIGTRAP.
3134
464b0089
GB
31352015-03-18 Gary Benson <gbenson@redhat.com>
3136
3137 * server.c (handle_query): Do not report vFile:fstat as supported.
3138
aa9e327f
GB
31392015-03-11 Gary Benson <gbenson@redhat.com>
3140
3141 * hostio.c (sys/types.h): New include.
3142 (sys/stat.h): Likewise.
3143 (common-remote-fileio.h): Likewise.
3144 (handle_fstat): New function.
3145 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3146
791c0056
GB
31472015-03-11 Gary Benson <gbenson@redhat.com>
3148
3149 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3150 struct stat.st_blocks and struct stat.st_blksize.
3151 * configure: Regenerate.
3152 * config.in: Likewise.
3153 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3154 (OBS): Add common-remote-fileio.o.
3155 (common-remote-fileio.o): New rule.
3156
9a9df970
PA
31572015-03-09 Pedro Alves <palves@redhat.com>
3158
3159 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3160 'struct sockaddr' pointer in 'accept' call.
3161
9eb1356e
PA
31622015-03-09 Pedro Alves <palves@redhat.com>
3163
3164 Revert:
3165 2015-03-07 Pedro Alves <palves@redhat.com>
3166 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3167 or <winsock2.h> here. Instead include "gdb_socket.h".
3168 (remote_open): Use union gdb_sockaddr_u.
3169 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3170 or <winsock2.h> here. Instead include "gdb_socket.h".
3171 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3172 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3173 or <sys/un.h>.
3174 (init_named_socket, gdb_agent_helper_thread): Use union
3175 gdb_sockaddr_u.
3176
aac331e4
PA
31772015-03-07 Pedro Alves <palves@redhat.com>
3178
3179 * configure.ac (build_warnings): Move
3180 -Wdeclaration-after-statement to the C-specific set.
3181 * configure: Regenerate.
3182
366c75fc
PA
31832015-03-07 Pedro Alves <palves@redhat.com>
3184
3185 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3186 or <winsock2.h> here. Instead include "gdb_socket.h".
3187 (remote_open): Use union gdb_sockaddr_u.
3188 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3189 or <winsock2.h> here. Instead include "gdb_socket.h".
3190 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3191 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3192 or <sys/un.h>.
3193 (init_named_socket, gdb_agent_helper_thread): Use union
3194 gdb_sockaddr_u.
3195
492d29ea
PA
31962015-03-07 Pedro Alves <palves@redhat.com>
3197
3198 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3199 instead.
3200
60a191ed
YQ
32012015-03-06 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch64-low.c (aarch64_insert_point): Use
3204 show_debug_regs as a boolean.
3205 (aarch64_remove_point): Likewise.
3206
f5771b1d
PA
32072015-03-05 Pedro Alves <palves@redhat.com>
3208
3209 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3210 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3211 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3212 * nto-low.c (nto_target_ops): Likewise.
3213 * spu-low.c (spu_target_ops): Likewise.
3214 * win32-low.c (win32_target_ops): Likewise.
3215
3e572f71
PA
32162015-03-04 Pedro Alves <palves@redhat.com>
3217
72f4393d 3218 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3219 Decide whether a breakpoint triggered based on the SIGTRAP's
3220 siginfo.si_code.
72f4393d
L
3221 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3222 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3223 (linux_low_filter_event): Check for breakpoints before checking
3224 watchpoints.
3225 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3226 siginfo.si_code.
72f4393d
L
3227 (linux_stopped_by_sw_breakpoint)
3228 (linux_supports_stopped_by_sw_breakpoint)
3229 (linux_stopped_by_hw_breakpoint)
3230 (linux_supports_stopped_by_hw_breakpoint): New functions.
3231 (linux_target_ops): Install new target methods.
3e572f71 3232
1ec68e26
PA
32332015-03-04 Pedro Alves <palves@redhat.com>
3234
3235 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3236 * server.c (swbreak_feature, hwbreak_feature): New globals.
3237 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3238 (captured_main): Clear swbreak_feature and hwbreak_feature.
3239 * server.h (swbreak_feature, hwbreak_feature): Declare.
3240 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3241 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3242 supports_stopped_by_hw_breakpoint>: New fields.
3243 (target_supports_stopped_by_sw_breakpoint)
3244 (target_stopped_by_sw_breakpoint)
3245 (target_supports_stopped_by_hw_breakpoint)
3246 (target_stopped_by_hw_breakpoint): Declare.
3247
15c66dd6
PA
32482015-03-04 Pedro Alves <palves@redhat.com>
3249
3250 enum lwp_stop_reason -> enum target_stop_reason
3251 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3252 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3253 (linux_wait_1, stuck_in_jump_pad_callback)
3254 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3255 (linux_stopped_by_watchpoint):
3256 * linux-low.h (enum lwp_stop_reason): Delete.
3257 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3258 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3259
98fc70d6
YQ
32602015-03-04 Yao Qi <yao.qi@linaro.org>
3261
3262 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3263
dd2ac174
GB
32642015-03-03 Gary Benson <gbenson@redhat.com>
3265
3266 * hostio.c (handle_vFile): Fix prefix lengths.
3267
d68e53f4
MM
32682015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3269
3270 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3271 ptr_bits.
3272
bf2d68ab
AA
32732015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3274
3275 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3276 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3277 (clean): Add "rm -f" for above C files.
3278 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3279 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3280 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3281 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3282 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3283 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3284 (init_registers_s390x_vx_linux64)
3285 (init_registers_s390x_tevx_linux64)
3286 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3287 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3288 declarations.
3289 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3290 (s390_store_vxrs_high): New functions.
3291 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3292 NT_S390_VXRS_HIGH.
3293 (s390_arch_setup): Add logic for selecting one of the new target
3294 descriptions. Activate the new vector regsets if applicable.
3295 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3296 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3297 and init_registers_s390x_tevx_linux64.
3298
c966a859
PA
32992015-03-01 Pedro Alves <palves@redhat.com>
3300
3301 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3302 parameter.
3303
4180215b
PA
33042015-02-27 Pedro Alves <palves@redhat.com>
3305
3306 * linux-x86-low.c (u_debugreg_offset): New function.
3307 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3308
749bab01
PA
33092015-02-27 Pedro Alves <palves@redhat.com>
3310
3311 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3312 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3313 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3314 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3315 (ps_lsetfpregs, ps_getpid)
3316 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3317 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3318 (ps_lsetxregs, ps_plog): Declare.
3319
3c14e5a3
PA
33202015-02-27 Pedro Alves <palves@redhat.com>
3321
3322 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3323 IP_AGENT_EXPORT_FUNC.
3324 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3325 IP_AGENT_EXPORT_FUNC.
3326 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3327 (IP_AGENT_EXPORT): Delete.
3328 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3329 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3330 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3331 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3332 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3333 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3334 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3335 (traceframe_read_count, traceframe_write_count)
3336 (traceframes_created, trace_state_variables, get_raw_reg)
3337 (get_trace_state_variable_value, set_trace_state_variable_value)
3338 (ust_loaded, helper_thread_id, cmd_buf): Use
3339 IPA_SYM_EXPORTED_NAME.
3340 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3341 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3342 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3343 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3344 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3345 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3346 EXTERN_C_PUSH/EXTERN_C_POP.
3347 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3348 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3349 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3350 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3351 (traceframe_write_count, traceframe_read_count)
3352 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3353 (about_to_request_buffer_space, get_trace_state_variable_value)
3354 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3355 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3356 EXTERN_C_PUSH/EXTERN_C_POP.
3357 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3358 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3359 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3360 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3361 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3362 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3363 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3364 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3365 Define.
3366 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3367 (IP_AGENT_EXPORT_VAR_DECL): Define.
3368 (tracing): Declare.
3369 (gdb_agent_get_raw_reg): Declare.
3370
fe978cb0
PA
33712015-02-27 Tom Tromey <tromey@redhat.com>
3372 Pedro Alves <palves@redhat.com>
3373
3374 Rename symbols whose names are reserved C++ keywords throughout.
3375
3bc3d82a
PA
33762015-02-27 Pedro Alves <palves@redhat.com>
3377
3378 * Makefile.in (COMPILER): New, get it from autoconf.
3379 (CXX): Get from autoconf instead.
3380 (COMPILE.pre): Use COMPILER.
3381 (CC-LD): Rename to ...
3382 (CC_LD): ... this. Use COMPILER.
3383 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3384 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3385 * acinclude.m4: Include build-with-cxx.m4.
3386 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3387 Disable -Werror by default if building in C++ mode.
3388 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3389 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3390 the C++ compiler. Save/restore CXXFLAGS too.
3391 * configure: Regenerate.
3392
07697489
PA
33932015-02-27 Pedro Alves <palves@redhat.com>
3394
3395 * acinclude.m4: Include libiberty.m4.
3396 * configure.ac: Call libiberty_INIT.
3397 * config.in, configure: Regenerate.
3398
9beb7c4e
PA
33992015-02-26 Pedro Alves <palves@redhat.com>
3400
3401 * linux-low.c (linux_wait_1): When incrementing the PC past a
3402 program breakpoint always use the_low_target.breakpoint_len as
3403 increment, rather than the maximum between that and
3404 the_low_target.decr_pc_after_break.
3405
8090aef2
PA
34062015-02-23 Pedro Alves <palves@redhat.com>
3407
3408 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3409 thread was doing a step-over; always adjust the PC if
3410 we stepped over a permanent breakpoint.
3411 (linux_wait_1): If we stepped over breakpoint that was on top of a
3412 permanent breakpoint, manually advance the PC past it.
3413
bc9540e8
PA
34142015-02-23 Pedro Alves <palves@redhat.com>
3415
3416 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3417 modes.
3418 (x86_fill_gregset, x86_store_gregset): Use it when handling
3419 $orig_eax.
3420
2db9a427
PA
34212015-02-20 Pedro Alves <palves@redhat.com>
3422
3423 * thread-db.c: Include "nat/linux-procfs.h".
3424 (thread_db_init): Skip listing new threads if the kernel supports
3425 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3426
afa8d396
PA
34272015-02-20 Pedro Alves <palves@redhat.com>
3428
3429 * linux-low.c (status_pending_p_callback): Use ptid_match.
3430
c9587f88
AT
34312015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3432
3433 PR breakpoints/16812
3434 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3435 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3436 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3437
b05ec7a5
AT
34382015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439
3440 PR breakpoints/15956
3441 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3442
d33501a5
MM
34432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3444
3445 * linux-low.c (linux_low_btrace_conf): Print size.
3446 * server.c (handle_btrace_conf_general_set): New.
3447 (hanle_general_set): Call handle_btrace_conf_general_set.
3448 (handle_query): Report Qbtrace-conf:bts:size as supported.
3449
f4abbc16
MM
34502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3451
3452 * linux-low.c (linux_low_enable_btrace): Update parameters.
3453 (linux_low_btrace_conf): New.
3454 (linux_target_ops)<to_btrace_conf>: Initialize.
3455 * server.c (current_btrace_conf): New.
3456 (handle_btrace_enable): Rename to ...
3457 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3458 to target_enable_btrace. Update comment. Update users.
3459 (handle_qxfer_btrace_conf): New.
3460 (qxfer_packets): Add btrace-conf entry.
3461 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3462 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3463 (target_ops)<read_btrace_conf>: New.
3464 (target_enable_btrace): Update parameters.
3465 (target_read_btrace_conf): New.
3466
043c3577
MM
34672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3468
3469 * server.c (handle_btrace_general_set): Remove call to
3470 target_supports_btrace.
3471 (supported_btrace_packets): New.
3472 (handle_query): Call supported_btrace_packets.
3473 * target.h: include btrace-common.h.
3474 (btrace_target_info): Removed.
3475 (supports_btrace, target_supports_btrace): Update parameters.
3476
734b0e4b
MM
34772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3478
3479 * Makefile.in (SFILES): Add common/btrace-common.c.
3480 (OBS): Add common/btrace-common.o.
3481 (btrace-common.o): Add build rules.
3482 * linux-low: Include btrace-common.h.
3483 (linux_low_read_btrace): Use struct btrace_data. Call
3484 btrace_data_init and btrace_data_fini.
3485
d6c146e9
PA
34862015-02-06 Pedro Alves <palves@redhat.com>
3487
3488 * thread-db.c (find_new_threads_callback): Add debug output.
3489
20ba1ce6
PA
34902015-02-04 Pedro Alves <palves@redhat.com>
3491
3492 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3493 (resume_stopped_resumed_lwps): New function.
3494 (linux_wait_for_event_filtered): Use it.
3495
8cc73a39
SDJ
34962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3497
3498 * Makefile.in (SFILES): Add linux-personality.c.
3499 (linux-personality.o): New rule.
3500 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3501 list of objects to be built.
3502 * linux-low.c: Include nat/linux-personality.h.
3503 (linux_create_inferior): Remove code to disable address space
3504 randomization (moved to ../nat/linux-personality.c). Create
3505 cleanup to disable address space randomization.
3506
fb23d554
SDJ
35072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3508
3509 * Makefile.in (posix-strerror.o): New rule.
3510 (mingw-strerror.o): Likewise.
3511 * configure: Regenerated.
3512 * configure.ac: Source file ../common/common.host. Initialize new
3513 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3514
cdf43629
YQ
35152015-01-14 Yao Qi <yao@codesourcery.com>
3516
3517 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3518 (ppc-linux.o): New rule.
3519 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3520 * configure.ac: AC_CHECK_FUNCS(getauxval).
3521 * config.in: Re-generated.
3522 * configure: Re-generated.
3523 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3524 ppc64_64bit_inferior_p
3525
514c5338
YQ
35262015-01-14 Yao Qi <yao@codesourcery.com>
3527
3528 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3529 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3530 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3531 (PT_ORIG_R3, PT_TRAP): Likewise.
3532 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3533 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3534 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3535
3368c1e5
JB
35362015-01-10 Joel Brobecker <brobecker@adacore.com>
3537
3538 * i387-fp.c (i387_cache_to_xsave): In look over
3539 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3540 zmmh_low_space field by use of zmmh_high_space.
3541
582511be
PA
35422015-01-09 Pedro Alves <palves@redhat.com>
3543
3544 * linux-low.c (step_over_bkpt): Move higher up in the file.
3545 (handle_extended_wait): Don't store the stop_pc here.
3546 (get_stop_pc): Adjust comments and rename to ...
3547 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3548 stopped for a software breakpoint or hardware breakpoint.
3549 (thread_still_has_status_pending_p): New function.
3550 (status_pending_p_callback): Use
3551 thread_still_has_status_pending_p. If the event is no longer
3552 interesting, resume the LWP.
3553 (handle_tracepoints): Add assert.
3554 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3555 (wstatus_maybe_breakpoint): New function.
3556 (cancel_breakpoint): Delete function.
3557 (check_stopped_by_watchpoint): New function, factored out from
3558 linux_low_filter_event.
3559 (lp_status_maybe_breakpoint): Delete function.
3560 (linux_low_filter_event): Remove filter_ptid argument.
3561 Leave thread group exits pending here. Store the LWP's stop PC.
3562 Always leave events pending.
3563 (linux_wait_for_event_filtered): Pull all events out of the
3564 kernel, and leave them all pending.
3565 (count_events_callback, select_event_lwp_callback): Consider all
3566 events.
3567 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3568 (select_event_lwp): Only give preference to the stepping LWP in
3569 all-stop mode. Adjust comments.
3570 (ignore_event): New function.
3571 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3572 references to cancel_breakpoints. Adjust to renames. Also give
3573 equal priority to all LWPs that have had events in non-stop mode.
3574 If reporting a software breakpoint event, unadjust the LWP's PC.
3575 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3576 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3577 Adjust.
3578 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3579 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3580 (linux_stopped_by_watchpoint): Adjust.
3581 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3582 * linux-low.h (enum lwp_stop_reason): New.
3583 (struct lwp_info) <stop_pc>: Adjust comment.
3584 <stopped_by_watchpoint>: Delete field.
3585 <stop_reason>: New field.
3586 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3587 * mem-break.c (software_breakpoint_inserted_here)
3588 (hardware_breakpoint_inserted_here): New function.
3589 * mem-break.h (software_breakpoint_inserted_here)
3590 (hardware_breakpoint_inserted_here): Declare.
3591 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3592 (cancel_breakpoints): Delete.
3593 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3594 (upload_fast_traceframes): Remove references to
3595 cancel_breakpoints.
3596
a33e3959
PA
35972015-01-09 Pedro Alves <palves@redhat.com>
3598
3599 * thread-db.c (find_new_threads_callback): Ignore thread if the
3600 kernel thread ID is -1.
3601
8784d563
PA
36022015-01-09 Pedro Alves <palves@redhat.com>
3603
3604 * linux-low.c (linux_attach_fail_reason_string): Move to
3605 nat/linux-ptrace.c, and rename.
3606 (linux_attach_lwp): Update comment.
3607 (attach_proc_task_lwp_callback): New function.
3608 (linux_attach): Adjust to rename and use
3609 linux_proc_attach_tgid_threads.
3610 (linux_attach_fail_reason_string): Delete declaration.
3611
76f2b779
JB
36122015-01-01 Joel Brobecker <brobecker@adacore.com>
3613
3614 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3615 * server.c (gdbserver_version): Likewise.
3616
fafcc06a
SDJ
36172014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3618
3619 * remote-utils.c: Include ctype.h.
3620 (input_interrupt): Explicitly handle the case when the char
3621 received is the NUL byte. Improve the printing of non-ASCII
3622 characters.
3623
beed38b8
JB
36242014-12-16 Joel Brobecker <brobecker@adacore.com>
3625
3626 * linux-low.c (linux_low_filter_event): Update call to
3627 linux_enable_event_reporting following the addition of
3628 a new parameter to that function.
3629
bf330350
CU
36302014-12-16 Catalin Udma <catalin.udma@freescale.com>
3631
3632 PR server/17457
3633 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3634 (AARCH64_FPCR_REGNO): Likewise.
3635 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3636 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3637 (aarch64_store_fpregset): Likewise.
3638
5227d625
JB
36392014-12-15 Joel Brobecker <brobecker@adacore.com>
3640
3641 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3642 Remove FIXME comment about assumption about N.
3643
f93b65a0
JB
36442014-12-13 Joel Brobecker <brobecker@adacore.com>
3645
3646 * configure.ac: If large-file support is disabled in GDBserver,
3647 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3648 * configure: Regenerate.
3649
e5a9158d
AA
36502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3651
3652 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3653 warning upon ENODATA from ptrace.
3654 * linux-s390-low.c (s390_store_tdb): New.
3655 (s390_regsets): Add regset for NT_S390_TDB.
3656
feea5f36
AA
36572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3658
3659 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3660 without a fill_function.
3661 * linux-s390-low.c (s390_fill_last_break): Remove.
3662 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3663 (s390_arch_setup): Use regset's size instead of fill_function for
3664 loop end condition.
3665
098dbe61
AA
36662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3667
3668 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3669 the regset's store function when ptrace returned an error.
3670 * regcache.c (get_thread_regcache): Invalidate register cache
3671 before fetching inferior's registers.
3672
28eef672
AA
36732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3674
3675 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3676 while-loop as for-loop.
3677 (regsets_store_inferior_registers): Likewise.
3678
bdca27a2
YQ
36792014-11-28 Yao Qi <yao@codesourcery.com>
3680
3681 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3682 * config.in, configure: Re-generate.
3683 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3684 is defined.
3685
9c232dda
YQ
36862014-11-21 Yao Qi <yao@codesourcery.com>
3687
3688 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3689 (AC_CHECK_HEADERS): Remove malloc.h.
3690 * configure: Re-generated.
3691 * config.in: Re-generated.
3692 * server.h: Don't include alloca.h and malloc.h.
3693 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3694 Don't include malloc.h.
3695
43968415
JB
36962014-11-17 Joel Brobecker <brobecker@adacore.com>
3697
3698 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3699 corresponding ERRNO check in same block.
3700
40e91bc7
PA
37012014-11-12 Pedro Alves <palves@redhat.com>
3702
3703 * server.c (cont_thread): Update comment.
3704 (start_inferior, attach_inferior): No longer clear cont_thread.
3705 (handle_v_cont): No longer set cont_thread.
3706 (captured_main): Clear cont_thread each time a GDB connects.
3707
c2c118cf
PA
37082014-11-12 Pedro Alves <palves@redhat.com>
3709
3710 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3711 thread, and don't resume all threads if the Hc thread has exited.
3712
78708b7c
PA
37132014-11-12 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3716 the process group instead of to a specific LWP.
3717
a2abc7de
PA
37182014-10-15 Pedro Alves <palves@redhat.com>
3719
3720 PR server/17487
3721 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3722 parameter.
3723 (arm_set_thread_context): Delete.
3724 (the_low_target): Adjust.
3725 * win32-i386-low.c (debug_registers_changed)
3726 (debug_registers_used): Delete.
3727 (update_debug_registers_callback): New function.
3728 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3729 needing to update their debug registers.
3730 (win32_get_current_dr): New function.
3731 (x86_dr_low_get_addr, x86_dr_low_get_control)
3732 (x86_dr_low_get_status): Fetch the debug register from the thread
3733 record's context.
3734 (i386_initial_stuff): Adjust.
3735 (i386_get_thread_context): Remove current_event parameter. Don't
3736 clear debug_registers_changed nor copy DR values to
3737 debug_reg_state.
3738 (i386_set_thread_context): Delete.
3739 (i386_prepare_to_resume): New function.
3740 (i386_thread_added): Mark the thread as needing to update irs
3741 debug registers.
3742 (the_low_target): Remove i386_set_thread_context and install
3743 i386_prepare_to_resume.
3744 * win32-low.c (win32_get_thread_context): Adjust.
3745 (win32_set_thread_context): Use SetThreadContext
3746 directly.
3747 (win32_prepare_to_resume): New function.
3748 (win32_require_context): New function, factored out from ...
3749 (thread_rec): ... this.
3750 (continue_one_thread): Call win32_prepare_to_resume on each thread
3751 we're about to continue.
3752 (win32_resume): Call win32_prepare_to_resume on the event thread.
3753 * win32-low.h (struct win32_thread_info)
3754 <debug_registers_changed>: New field.
3755 (struct win32_target_ops): Change prototype of set_thread_context,
3756 delete set_thread_context and add prepare_to_resume.
3757 (win32_require_context): New declaration.
3758
a442d071
GB
37592014-10-08 Gary Benson <gbenson@redhat.com>
3760
3761 * server.h: Do not include common-exceptions.h.
3762
6f1947e8
GB
37632014-10-08 Gary Benson <gbenson@redhat.com>
3764
3765 * server.h: Do not include cleanups.h.
3766
63b434a4
JH
37672014-09-30 James Hogan <james.hogan@imgtec.com>
3768
3769 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3770 mips64-dsp-linux.c.
3771
c4d9ceb6
YQ
37722014-09-23 Yao Qi <yao@codesourcery.com>
3773
3774 * linux-low.c (lp_status_maybe_breakpoint): New function.
3775 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3776 (count_events_callback): Likewise.
3777 (select_event_lwp_callback): Likewise.
3778 (cancel_breakpoints_callback): Likewise.
3779
89a5711c
DB
37802014-09-19 Don Breazeal <donb@codesourcery.com>
3781
3782 * linux-low.c (handle_extended_wait): Call
3783 linux_ptrace_get_extended_event.
3784 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3785 linux_is_extended_waitstatus.
3786
bffc0964
JB
37872014-09-16 Joel Brobecker <brobecker@adacore.com>
3788
3789 * Makefile.in (CPPFLAGS): Define.
3790 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3791 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3792
0bfdf32f
GB
37932014-09-16 Gary Benson <gbenson@redhat.com>
3794
3795 * inferiors.h (current_inferior): Renamed as...
3796 (current_thread): New variable. All uses updated.
3797 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3798 (maybe_move_out_of_jump_pad): Likewise.
3799 (cancel_breakpoint): Likewise.
3800 (linux_low_filter_event): Likewise.
3801 (wait_for_sigstop): Likewise.
3802 (linux_resume_one_lwp): Likewise.
3803 (need_step_over_p): Likewise.
3804 (start_step_over): Likewise.
3805 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3806 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3807 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3808 and save_inferior as saved_thread.
3809 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3810 saved_thread.
3811 (regcache_invalidate_thread): Likewise.
3812 * remote-utils.c (prepare_resume_reply): Likewise.
3813 * thread-db.c (thread_db_get_tls_address): Likewise.
3814 (disable_thread_event_reporting): Likewise.
3815 (remove_thread_event_breakpoints): Likewise.
3816 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3817 as saved_thread.
3818 * target.h (set_desired_inferior): Renamed as...
3819 (set_desired_thread): New declaration. All uses updated.
3820 * server.c (myresume): Updated comment to reference thread instead
3821 of inferior.
3822 (handle_serial_event): Likewise.
3823 (handle_target_event): Likewise.
3824
361c8ade
GB
38252014-09-12 Tom Tromey <tromey@redhat.com>
3826 Gary Benson <gbenson@redhat.com>
3827
3828 * regcache.h: Include common-regcache.h.
3829 (regcache_read_pc): Don't declare.
3830 * regcache.c (get_thread_regcache_for_ptid): New function.
3831
bd9269f7
GB
38322014-09-11 Tom Tromey <tromey@redhat.com>
3833 Gary Benson <gbenson@redhat.com>
3834
3835 * symbol.c: New file.
3836 * Makefile.in (SFILES): Add symbol.c.
3837 (OBS): Add symbol.o.
3838
f8c1d06b
GB
38392014-09-11 Gary Benson <gbenson@redhat.com>
3840
3841 * target.c (target_stop_ptid, target_continue_ptid): New
3842 functions.
3843
721ec300
GB
38442014-09-11 Tom Tromey <tromey@redhat.com>
3845 Gary Benson <gbenson@redhat.com>
3846
3847 * target.h: Include target/target.h.
3848 * target.c (target_read_memory, target_read_uint32)
3849 (target_write_memory): New functions.
3850
c5e92cca
GB
38512014-09-11 Gary Benson <gbenson@redhat.com>
3852
3853 * server.h (debug_hw_points): Don't declare.
3854 * server.c (debug_hw_points): Don't define. Replace all uses
3855 with show_debug_regs.
3856 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3857 all uses with show_debug_regs.
3858
2e4bb98a
EBM
38592014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3860
3861 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3862 endianness into account.
3863 (ppc_supply_ptrace_register): Likewise.
3864
ac740bc7
JH
38652014-09-03 James Hogan <james.hogan@imgtec.com>
3866
3867 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3868 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3869
97ea6506
GB
38702014-09-03 Gary Benson <gbenson@redhat.com>
3871
3872 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3873 ALL_DEBUG_ADDRESS_REGISTERS.
3874
df7e5265
GB
38752014-09-02 Gary Benson <gbenson@redhat.com>
3876
3877 * i386-low.h: Renamed as...
3878 * x86-low.h: New file. All type, function and variable name
3879 prefixes changed from "i386_" to "x86_". All references updated.
3880 * i386-low.c: Renamed as...
3881 * x86-low.c: New file. All type, function and variable name
3882 prefixes changed from "i386_" to "x86_". All references updated.
3883
ed859da7
GB
38842014-09-02 Gary Benson <gbenson@redhat.com>
3885
3886 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3887 (x86_linux_new_thread): Likewise.
3888
860789c7
GB
38892014-08-29 Gary Benson <gbenson@redhat.com>
3890
3891 * server.h (setjmp.h): Do not include.
3892 (toplevel): Do not declare.
3893 (common-exceptions.h): Include.
3894 (cleanups.h): Likewise.
3895 * server.c (toplevel): Do not define.
3896 (exit_code): New static global.
3897 (detach_or_kill_for_exit_cleanup): New function.
3898 (main): New function. Original main renamed to...
3899 (captured_main): New function.
3900 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3901
ff55e1b5
GB
39022014-08-29 Gary Benson <gbenson@redhat.com>
3903
3904 * Makefile.in (SFILES): Add common/common-exceptions.c.
3905 (OBS): Add common-exceptions.o.
3906 (common-exceptions.o): New rule.
3907 * utils.c (prepare_to_throw_exception): New function.
3908
e9bcb658
GB
39092014-08-29 Gary Benson <gbenson@redhat.com>
3910
3911 * config.in: Regenerate.
3912 * configure: Likewise.
3913
e3180625
GB
39142014-08-29 Gary Benson <gbenson@redhat.com>
3915
3916 * Makefile.in (SFILES): Add common/cleanups.c.
3917 (OBS): cleanups.o.
3918 (cleanups.o): New rule.
3919
e3d6ba5d
GB
39202014-08-29 Gary Benson <gbenson@redhat.com>
3921
3922 * utils.c (internal_vwarning): New function.
3923
7096e886
GB
39242014-08-28 Gary Benson <gbenson@redhat.com>
3925
3926 * utils.h (fatal): Remove declaration.
3927 * utils.c (fatal): Remove function.
3928
14ce3192
GB
39292014-08-28 Gary Benson <gbenson@redhat.com>
3930
3931 * tracepoint.c (gdb_agent_init): Replace fatal with
3932 perror_with_name.
3933 (initialize_tracepoint): Likewise.
3934
50278d59
GB
39352014-08-28 Gary Benson <gbenson@redhat.com>
3936
3937 * remote-utils.c (remote_prepare): Replace fatal with error.
3938
aa96c426
GB
39392014-08-28 Gary Benson <gbenson@redhat.com>
3940
3941 * linux-low.c (linux_async): Replace fatal with warning.
3942 Tidy up and return.
3943 (linux_start_non_stop): Return -1 if linux_async failed.
3944
f7160e97
GB
39452014-08-28 Gary Benson <gbenson@redhat.com>
3946
3947 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3948 gdb_assert.
3949 (i386_dr_low_get_addr): Remove vague comment.
3950 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3951 gdb_assert.
3952
38e08fca
GB
39532014-08-28 Gary Benson <gbenson@redhat.com>
3954
3955 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3956 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3957 internal_error.
3958 (linux_resume_one_lwp): Likewise.
3959 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3960 gdb_assert.
3961 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3962 with internal_error.
3963 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3964 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3965 (find_register_by_name): Replace fatal with internal_error.
3966 (find_regno): Likewise.
3967 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3968 * thread-db.c (thread_db_create_event): Likewise.
3969 (thread_db_load_search): Likewise.
3970 (try_thread_db_load_1): Likewise.
3971 * tracepoint.c (get_jump_space_head): Replace fatal with
3972 internal_error.
3973 (claim_trampoline_space): Likewise.
3974 (have_fast_tracepoint_trampoline_buffer): Likewise.
3975 (cmd_qtstart): Likewise.
3976 (stop_tracing): Likewise.
3977 (fast_tracepoint_collecting): Likewise.
3978 (target_malloc): Likewise.
3979 (download_tracepoint): Likewise.
3980 (download_trace_state_variables): Replace check with gdb_assert.
3981 (upload_fast_traceframes): Replace fatal with internal_error.
3982
34abf635
GB
39832014-08-19 Tom Tromey <tromey@redhat.com>
3984 Gary Benson <gbenson@redhat.com>
3985
3986 * Makefile.in (SFILES): Add common/common-debug.c.
3987 (OBS): Add common-debug.o.
3988 (common-debug.o): New rule.
3989 * debug.h (debug_printf): Don't declare.
3990 * debug.c (debug_printf): Renamed and rewritten as...
3991 (debug_vprintf): New function.
3992
f6e94d78
GB
39932014-08-19 Gary Benson <gbenson@redhat.com>
3994
3995 * utils.h: Do not include print-utils.h.
3996
9239eeab
GB
39972014-08-19 Tom Tromey <tromey@redhat.com>
3998 Gary Benson <gbenson@redhat.com>
3999
4000 * server.h: Add static assertion.
4001 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4002
ef87c8bb
GB
40032014-08-19 Tom Tromey <tromey@redhat.com>
4004 Gary Benson <gbenson@redhat.com>
4005
4006 * Makefile.in (SFILES): Add common/errors.c.
4007 (OBS): Add errors.o.
4008 (IPA_OBS): Add errors-ipa.o.
4009 (errors.o): New rule.
4010 (errors-ipa.o): Likewise.
4011 * utils.h (perror_with_name, error, warning): Don't declare.
4012 * utils.c (warning): Renamed and rewritten as...
4013 (vwarning): New function.
4014 (error): Renamed and rewritten as...
4015 (verror): New function.
4016 (internal_error): Renamed and rewritten as...
4017 (internal_verror): New function.
4018
bb974a24
GB
40192014-08-07 Gary Benson <gbenson@redhat.com>
4020
4021 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4022 * configure: Regenerate.
4023 * config.in: Likewise.
4024 * server.h: Do not include errno.h.
4025 * event-loop.c: Likewise.
4026 * hostio-errno.c: Likewise.
4027 * linux-low.c: Likewise.
4028 * remote-utils.c: Likewise.
4029 * spu-low.c: Likewise.
4030 * utils.c: Likewise.
4031 * gdbreplay.c: Unconditionally include errno.h.
4032
6d3d12eb
GB
40332014-08-07 Gary Benson <gbenson@redhat.com>
4034
4035 * server.h: Do not include string.h.
4036 * event-loop.c: Likewise.
4037 * linux-low.c: Likewise.
4038 * regcache.c: Likewise.
4039 * remote-utils.c: Likewise.
4040 * spu-low.c: Likewise.
4041 * utils.c: Likewise.
4042
dccbb609
GB
40432014-08-07 Gary Benson <gbenson@redhat.com>
4044
4045 * server.h: Do not include gdb_assert.h.
4046
e76df0d0
GB
40472014-08-07 Gary Benson <gbenson@redhat.com>
4048
4049 * server.h: Do not include common-utils.h.
4050
4cb9c816
GB
40512014-08-07 Gary Benson <gbenson@redhat.com>
4052
4053 * server.h: Do not include ptid.h.
4054 * notif.h: Likewise.
4055
3995eeee
GB
40562014-08-07 Gary Benson <gbenson@redhat.com>
4057
4058 * server.h: Do not include gdb_locale.h.
4059
cb9f1a9b
GB
40602014-08-07 Gary Benson <gbenson@redhat.com>
4061
4062 * server.h: Do not include gdb/signals.h.
4063 * win32-low.c: Likewise.
4064
a5fceff8
GB
40652014-08-07 Gary Benson <gbenson@redhat.com>
4066
4067 * server.h: Do not include pathmax.h.
4068
b9391142
GB
40692014-08-07 Gary Benson <gbenson@redhat.com>
4070
4071 * server.h: Do not include libiberty.h.
4072 * linux-bfin-low.c: Likewise.
4073
0e443c87
GB
40742014-08-07 Gary Benson <gbenson@redhat.com>
4075
4076 * server.h: Do not include ansidecl.h.
4077
8ebb3f56
GB
40782014-08-07 Gary Benson <gbenson@redhat.com>
4079
4080 * linux-x86-low.c: Do not include stddef.h.
4081 * lynx-ppc-low.c: Likewise.
4082 * tracepoint.c: Likewise.
4083
8980bdf6
GB
40842014-08-07 Gary Benson <gbenson@redhat.com>
4085
4086 * server.h: Do not include stdarg.h.
4087 * nto-low.c: Likewise.
4088
d7096f71
GB
40892014-08-07 Gary Benson <gbenson@redhat.com>
4090
4091 * server.h: Do not include stdlib.h.
4092 * inferiors.c: Likewise.
4093 * linux-low.c: Likewise.
4094 * regcache.c: Likewise.
4095 * spu-low.c: Likewise.
4096 * tracepoint.c: Likewise.
4097 * utils.c: Likewise.
4098
d02f550d
GB
40992014-08-07 Gary Benson <gbenson@redhat.com>
4100
4101 * server.h: Do not include stdio.h.
4102 * linux-low.c: Likewise.
4103 * remote-utils.c: Likewise.
4104 * spu-low.c: Likewise.
4105 * utils.c: Likewise.
4106 * wincecompat.c: Likewise.
4107
87f6c4e3
GB
41082014-08-06 Gary Benson <gbenson@redhat.com>
4109
4110 * regcache.c (init_register_cache): Move conditionals inside if.
4111
7089dca4
GB
41122014-08-06 Gary Benson <gbenson@redhat.com>
4113
4114 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4115
462f517e
GB
41162014-07-31 Gary Benson <gbenson@redhat.com>
4117
4118 * ax.h: Do not include server.h.
4119 * gdbthread.h: Likewise.
4120 * lynx-low.h: Likewise.
4121 * notif.h: Likewise.
4122
976411d6
GB
41232014-07-30 Gary Benson <gbenson@redhat.com>
4124
4125 * server.h: Include common-defs.h.
4126 Do not include config.h or build-gnulib-gdbserver/config.h.
4127
d41f6d8e
GB
41282014-07-30 Gary Benson <gbenson@redhat.com>
4129
4130 * hostio-errno.c: Move server.h to top of includes list.
4131 * inferiors.c: Likewise.
4132 * linux-x86-low.c: Likewise.
4133 * notif.c: Include server.h.
4134
314c6a35
TT
41352014-07-24 Tom Tromey <tromey@redhat.com>
4136 Gary Benson <gbenson@redhat.com>
4137
4138 * server.h (CORE_ADDR): Now unsigned.
4139
69ff6be5
PA
41402014-07-16 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4143
ce9e3fe7
PA
41442014-07-15 Pedro Alves <palves@redhat.com>
4145
4146 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4147 copy.
4148
e76126e8
PA
41492014-07-11 Pedro Alves <palves@redhat.com>
4150
4151 * linux-low.c (kill_wait_lwp): New function, based on
4152 kill_one_lwp_callback, but use my_waitpid directly.
4153 (kill_one_lwp_callback, linux_kill): Use it.
4154
8e9db26e
PA
41552014-06-23 Pedro Alves <palves@redhat.com>
4156
4157 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4158 before setting DR0..DR3.
4159
698b3e08
GB
41602014-06-20 Gary Benson <gbenson@redhat.com>
4161
4162 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4163 * configure: Regenerated.
4164 * config.in: Likewise.
4165
125f8a3d
GB
41662014-06-20 Gary Benson <gbenson@redhat.com>
4167
4168 * Makefile.in (SFILES): Update locations for files moved
4169 from common to nat.
4170 (object file files): Reordered.
4171
42995dbd
GB
41722014-06-20 Gary Benson <gbenson@redhat.com>
4173
4174 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4175 (i386_dr_low_set_addr): Likewise.
4176 (i386_dr_low_get_addr): Likewise.
4177 (i386_dr_low_can_set_control): Likewise.
4178 (i386_dr_low_set_control): Likewise.
4179 (i386_dr_low_get_control): Likewise.
4180 (i386_dr_low_get_status): Likewise.
4181 (i386_get_debug_register_length): Likewise.
4182 * linux-x86-low.c (i386_dr_low_set_addr):
4183 Changed signature. Made static.
4184 (i386_dr_low_get_addr): Likewise.
4185 (i386_dr_low_set_control): Likewise.
4186 (i386_dr_low_get_control): Likewise.
4187 (i386_dr_low_get_status): Likewise.
4188 (i386_dr_low): New global variable.
4189 * win32-i386-low.c (i386_dr_low_set_addr):
4190 Changed signature. Made static.
4191 (i386_dr_low_get_addr): Likewise.
4192 (i386_dr_low_set_control): Likewise.
4193 (i386_dr_low_get_control): Likewise.
4194 (i386_dr_low_get_status): Likewise.
4195 (i386_dr_low): New global variable.
4196
e1d2394b
MS
41972014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4198
4199 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4200 * Makefile.in (AR, AR_FLAGS): Define.
4201 * configure: Regenerate.
4202
3a8ee006
GB
42032014-06-19 Gary Benson <gbenson@redhat.com>
4204
4205 * Makefile.in (i386-dregs.o): New rule.
4206 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4207 * i386-low.c (target.h): Remove include.
4208 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4209 (DR_CONTROL_SHIFT): Likewise.
4210 (DR_CONTROL_SIZE): Likewise.
4211 (DR_RW_EXECUTE): Likewise.
4212 (DR_RW_WRITE): Likewise.
4213 (DR_RW_READ): Likewise.
4214 (DR_RW_IORW): Likewise.
4215 (DR_LEN_1): Likewise.
4216 (DR_LEN_2): Likewise.
4217 (DR_LEN_4): Likewise.
4218 (DR_LEN_8): Likewise.
4219 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4220 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4221 (DR_ENABLE_SIZE): Likewise.
4222 (DR_LOCAL_SLOWDOWN): Likewise.
4223 (DR_GLOBAL_SLOWDOWN): Likewise.
4224 (DR_CONTROL_RESERVED): Likewise.
4225 (I386_DR_CONTROL_MASK): Likewise.
4226 (I386_DR_VACANT): Likewise.
4227 (I386_DR_LOCAL_ENABLE): Likewise.
4228 (I386_DR_GLOBAL_ENABLE): Likewise.
4229 (I386_DR_DISABLE): Likewise.
4230 (I386_DR_SET_RW_LEN): Likewise.
4231 (I386_DR_GET_RW_LEN): Likewise.
4232 (I386_DR_WATCH_HIT): Likewise.
4233 (i386_wp_op_t): Likewise.
4234 (i386_show_dr): Likewise.
4235 (i386_length_and_rw_bits): Likewise.
4236 (i386_insert_aligned_watchpoint): Likewise.
4237 (i386_remove_aligned_watchpoint): Likewise.
4238 (i386_handle_nonaligned_watchpoint): Likewise.
4239 i386_update_inferior_debug_regs(): Likewise.
4240 (i386_dr_insert_watchpoint): Likewise.
4241 (i386_dr_remove_watchpoint): Likewise.
4242 (i386_dr_region_ok_for_watchpoint): Likewise.
4243 (i386_dr_stopped_data_address): Likewise.
4244 (i386_dr_stopped_by_watchpoint): Likewise.
4245
8f26655c
GB
42462014-06-19 Gary Benson <gbenson@redhat.com>
4247
4248 * i386-low.c (i386_dr_show): Renamed to
4249 i386_show_dr and made static. All uses updated.
4250 (i386_dr_length_and_rw_bits): Renamed to
4251 i386_length_and_rw_bits and made static.
4252 All uses updated.
4253 (i386_dr_insert_aligned_watchpoint): Renamed to
4254 i386_insert_aligned_watchpoint and made static.
4255 All uses updated.
4256 (i386_dr_remove_aligned_watchpoint): Renamed to
4257 i386_remove_aligned_watchpoint and made static.
4258 All uses updated.
4259 (i386_dr_update_inferior_debug_regs): Renamed to
4260 i386_update_inferior_debug_regs and made static.
4261 All uses updated.
4262
b9228891
GB
42632014-06-18 Gary Benson <gbenson@redhat.com>
4264
5171def3
GB
4265 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4266 (i386_dr_low_can_set_control): Likewise.
4267 (i386_get_debug_register_length): Likewise.
4268 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4269 (i386_dr_low_can_set_control): Likewise.
4270 (i386_get_debug_register_length): Likewise.
4271
42722014-06-17 Gary Benson <gbenson@redhat.com>
4273
b9228891
GB
4274 * i386-low.h (i386-dregs.h): New include.
4275 (DR_FIRSTADDR): Now in i386-dregs.h.
4276 (DR_LASTADDR): Likewise.
4277 (DR_NADDR): Likewise.
4278 (DR_STATUS): Likewise.
4279 (DR_CONTROL): Likewise.
4280 (i386_debug_reg_state): Likewise.
4281 (i386_dr_insert_watchpoint): Likewise.
4282 (i386_dr_remove_watchpoint): Likewise.
4283 (i386_dr_region_ok_for_watchpoint): Likewise.
4284 (i386_dr_stopped_data_address): Likewise.
4285 (i386_dr_stopped_by_watchpoint): Likewise.
4286 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4287
4be83cc2
GB
42882014-06-18 Gary Benson <gbenson@redhat.com>
4289
4290 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4291 i386_dr_insert_watchpoint.
4292 (i386_low_remove_watchpoint): Renamed to
4293 i386_dr_remove_watchpoint.
4294 (i386_low_region_ok_for_watchpoint): Renamed to
4295 i386_dr_region_ok_for_watchpoint.
4296 (i386_low_stopped_data_address): Renamed to
4297 i386_dr_stopped_data_address.
4298 (i386_low_stopped_by_watchpoint): Renamed to
4299 i386_dr_stopped_by_watchpoint.
4300 * i386-low.c (i386_show_dr): Renamed to
4301 i386_dr_show and made nonstatic. All uses updated.
4302 (i386_length_and_rw_bits): Renamed to
4303 i386_dr_length_and_rw_bits and made nonstatic.
4304 All uses updated.
4305 (i386_insert_aligned_watchpoint): Renamed to
4306 i386_dr_insert_aligned_watchpoint and made nonstatic.
4307 All uses updated.
4308 (i386_remove_aligned_watchpoint): Renamed to
4309 i386_dr_remove_aligned_watchpoint and made nonstatic.
4310 All uses updated.
4311 (i386_update_inferior_debug_regs): Renamed to
4312 i386_dr_update_inferior_debug_regs and made nonstatic.
4313 All uses updated.
4314 (i386_low_insert_watchpoint): Renamed to
4315 i386_dr_insert_watchpoint. All uses updated.
4316 (i386_low_remove_watchpoint): Renamed to
4317 i386_dr_remove_watchpoint. All uses updated.
4318 (i386_low_region_ok_for_watchpoint): Renamed to
4319 i386_dr_region_ok_for_watchpoint. All uses updated.
4320 (i386_low_stopped_data_address): Renamed to
4321 i386_dr_stopped_data_address. All uses updated.
4322 (i386_low_stopped_by_watchpoint): Renamed to
4323 i386_dr_stopped_by_watchpoint. All uses updated.
4324
131aa0d4
GB
43252014-06-18 Gary Benson <gbenson@redhat.com>
4326
4327 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4328 (i386_dr_low_can_set_control): Likewise.
4329 (i386_insert_aligned_watchpoint): New check.
4330
d9305f7f
GB
43312014-06-18 Gary Benson <gbenson@redhat.com>
4332
4333 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4334 Renamed to state.
4335
e927c9fc
GB
43362014-06-18 Gary Benson <gbenson@redhat.com>
4337
4338 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4339 instead of fatal and error.
4340 (i386_handle_nonaligned_watchpoint): Likewise.
4341
1b6d4134
GB
43422014-06-18 Gary Benson <gbenson@redhat.com>
4343
4344 * i386-low.c (i386_get_debug_register_length): New macro.
4345 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4346 (i386_show_dr): Use debug_printf instead of fprintf. Use
4347 phex to format values.
4348
6e62758f
GB
43492014-06-18 Gary Benson <gbenson@redhat.com>
4350
4351 * i386-low.h: Comment changes.
4352 * i386-low.c: Likewise.
4353
fc6e2f03
GB
43542014-06-18 Gary Benson <gbenson@redhat.com>
4355
4356 * i386-low.c: Whitespace changes.
4357
f9d1eeed
TT
43582014-06-12 Tom Tromey <tromey@redhat.com>
4359
4360 * utils.c (freeargv): Remove.
4361
0b04e523
TT
43622014-06-12 Tom Tromey <tromey@redhat.com>
4363
4364 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4365 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4366 (parse_debug_format_options): Likewise.
4367 (gdbserver_usage): Likewise.
4368 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4369 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4370 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4371 against libiberty.
4372 ($(LIBGNU)): Depend on libiberty.
4373 (all-lib): Recurse into all subdirs.
4374 (install-only): Invoke "install" target in subdirs.
4375 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4376 targets.
4377 * configure: Rebuild.
4378 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4379 for vasprintf, vsnprintf, or gettimeofday.
4380 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4381 srv_tgtobj.
4382
270c9937
JB
43832014-06-05 Joel Brobecker <brobecker@adacore.com>
4384
4385 * development.sh: Delete.
4386 * Makefile.in (config.status): Adjust dependency on development.sh.
4387 * configure.ac: Adjust development.sh source call.
4388 * configure: Regenerate.
4389
0a261ed8
PA
43902014-06-02 Pedro Alves <palves@redhat.com>
4391
4392 * ax.c (gdb_free_agent_expr): New function.
4393 * ax.h (gdb_free_agent_expr): New declaration.
4394 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4395 list.
4396 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4397 static.
4398 (clear_breakpoint_conditions_and_commands): New function.
4399 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4400 (clear_breakpoint_conditions_and_commands): New declaration.
4401
e9dae05e
RR
44022014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4403
4404 * linux-aarch64-low.c (asm/ptrace.h): Include.
4405
5876f503
JK
44062014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4407
4408 Fix TLS access for -static -pthread.
4409 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4410 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4411 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4412
802e8e6d
PA
44132014-05-20 Pedro Alves <palves@redhat.com>
4414
4415 * linux-aarch64-low.c (aarch64_insert_point)
4416 (aarch64_remove_point): No longer check whether the type is
4417 supported here. Adjust to new interface.
4418 (the_low_target): Install aarch64_supports_z_point_type as
4419 supports_z_point_type method.
4420 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4421 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4422 instead of a Z packet char. Adjust.
4423 (arm_supports_z_point_type): New function.
4424 (arm_insert_point, arm_remove_point): Adjust to new interface.
4425 (the_low_target): Install arm_supports_z_point_type.
4426 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4427 (cris_insert_point, cris_remove_point): Adjust to new interface.
4428 Don't check whether the type is supported here.
4429 (the_low_target): Install cris_supports_z_point_type.
4430 * linux-low.c (linux_supports_z_point_type): New function.
4431 (linux_insert_point, linux_remove_point): Adjust to new interface.
4432 * linux-low.h (struct linux_target_ops) <insert_point,
4433 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4434 raw_breakpoint pointer parameter.
4435 <supports_z_point_type>: New method.
4436 * linux-mips-low.c (mips_supports_z_point_type): New function.
4437 (mips_insert_point, mips_remove_point): Adjust to new interface.
4438 Use mips_supports_z_point_type.
4439 (the_low_target): Install mips_supports_z_point_type.
4440 * linux-ppc-low.c (the_low_target): Install NULL as
4441 supports_z_point_type method.
4442 * linux-s390-low.c (the_low_target): Install NULL as
4443 supports_z_point_type method.
4444 * linux-sparc-low.c (the_low_target): Install NULL as
4445 supports_z_point_type method.
4446 * linux-x86-low.c (x86_supports_z_point_type): New function.
4447 (x86_insert_point): Adjust to new insert_point interface. Use
4448 insert_memory_breakpoint. Adjust to new
4449 i386_low_insert_watchpoint interface.
4450 (x86_remove_point): Adjust to remove_point interface. Use
4451 remove_memory_breakpoint. Adjust to new
4452 i386_low_remove_watchpoint interface.
4453 (the_low_target): Install x86_supports_z_point_type.
4454 * lynx-low.c (lynx_target_ops): Install NULL as
4455 supports_z_point_type callback.
4456 * nto-low.c (nto_supports_z_point_type): New.
4457 (nto_insert_point, nto_remove_point): Adjust to new interface.
4458 (nto_target_ops): Install nto_supports_z_point_type.
4459 * mem-break.c: Adjust intro comment.
4460 (struct raw_breakpoint) <raw_type, size>: New fields.
4461 <inserted>: Update comment.
4462 <shlib_disabled>: Delete field.
4463 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4464 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4465 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4466 (raw_bkpt_type_to_target_hw_bp_type): New function.
4467 (find_enabled_raw_code_breakpoint_at): New function.
4468 (find_raw_breakpoint_at): New type and size parameters. Use them.
4469 (insert_memory_breakpoint): New function, based off
4470 set_raw_breakpoint_at.
4471 (remove_memory_breakpoint): New function.
4472 (set_raw_breakpoint_at): Reimplement.
4473 (set_breakpoint): New, based on set_breakpoint_at.
4474 (set_breakpoint_at): Reimplement.
4475 (delete_raw_breakpoint): Go through the_target->remove_point
4476 instead of assuming memory breakpoints.
4477 (find_gdb_breakpoint_at): Delete.
4478 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4479 (find_gdb_breakpoint): New function.
4480 (set_gdb_breakpoint_at): Delete.
4481 (z_type_supported): New function.
4482 (set_gdb_breakpoint_1): New function, loosely based off
4483 set_gdb_breakpoint_at.
4484 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4485 (delete_gdb_breakpoint_at): Delete.
4486 (delete_gdb_breakpoint_1): New function, loosely based off
4487 delete_gdb_breakpoint_at.
4488 (delete_gdb_breakpoint): New function.
4489 (clear_gdb_breakpoint_conditions): Rename to ...
4490 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4491 breakpoint.
4492 (add_condition_to_breakpoint): Make static.
4493 (add_breakpoint_condition): Take a struct breakpoint pointer
4494 instead of an address. Adjust.
4495 (gdb_condition_true_at_breakpoint): Rename to ...
4496 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4497 z_type parameter.
4498 (gdb_condition_true_at_breakpoint): Reimplement.
4499 (add_breakpoint_commands): Take a struct breakpoint pointer
4500 instead of an address. Adjust.
4501 (gdb_no_commands_at_breakpoint): Rename to ...
4502 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4503 parameter. Return true if no breakpoint was found. Change debug
4504 output.
4505 (gdb_no_commands_at_breakpoint): Reimplement.
4506 (run_breakpoint_commands): Rename to ...
4507 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4508 and change return type to boolean.
4509 (run_breakpoint_commands): New function.
4510 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4511 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4512 breakpoint. Go through the_target->remove_point instead of
4513 assuming memory breakpoint.
4514 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4515 software and hardware breakpoints.
4516 (reinsert_raw_breakpoint): Go through the_target->insert_point
4517 instead of assuming memory breakpoint.
4518 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4519 software and hardware breakpoints.
4520 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4521 Check both software and hardware breakpoints.
4522 (validate_inserted_breakpoint): Assert the breakpoint is a
4523 software breakpoint. Set the inserted flag to -1 instead of
4524 setting shlib_disabled.
4525 (delete_disabled_breakpoints): Adjust.
4526 (validate_breakpoints): Only validate software breakpoints.
4527 Adjust to inserted flag change.
4528 (check_mem_read, check_mem_write): Skip breakpoint types other
4529 than software breakpoints. Adjust to inserted flag change.
4530 * mem-break.h (enum raw_bkpt_type): New enum.
4531 (raw_breakpoint, struct process_info): Forward declare.
4532 (Z_packet_to_target_hw_bp_type): Delete declaration.
4533 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4534 (set_gdb_breakpoint, delete_gdb_breakpoint)
4535 (clear_breakpoint_conditions): New declarations.
4536 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4537 (breakpoint_inserted_here): Update comment.
4538 (add_breakpoint_condition, add_breakpoint_commands): Replace
4539 address parameter with a breakpoint pointer parameter.
4540 (gdb_breakpoint_here): Update comment.
4541 (delete_gdb_breakpoint_at): Delete.
4542 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4543 * server.c (process_point_options): Take a struct breakpoint
4544 pointer instead of an address. Adjust.
4545 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4546 delete_gdb_breakpoint.
4547 * spu-low.c (spu_target_ops): Install NULL as
4548 supports_z_point_type method.
4549 * target.h: Include mem-break.h.
4550 (struct target_ops) <prepare_to_access_memory>: Update comment.
4551 <supports_z_point_type>: New field.
4552 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4553 instead of a char. Also take a raw breakpoint pointer.
4554 * win32-arm-low.c (the_low_target): Install NULL as
4555 supports_z_point_type.
4556 * win32-i386-low.c (i386_supports_z_point_type): New function.
4557 (i386_insert_point, i386_remove_point): Adjust to new interface.
4558 (the_low_target): Install i386_supports_z_point_type.
4559 * win32-low.c (win32_supports_z_point_type): New function.
4560 (win32_insert_point, win32_remove_point): Adjust to new interface.
4561 (win32_target_ops): Install win32_supports_z_point_type.
4562 * win32-low.h (struct win32_target_ops):
4563 <supports_z_point_type>: New method.
4564 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4565 instead of a char. Also take a raw breakpoint pointer.
4566
932539e3
PA
45672014-05-20 Pedro Alves <palves@redhat.com>
4568
4569 * mem-break.h: Include break-common.h.
4570 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4571 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4572 (Z_packet_to_target_hw_bp_type): New declaration.
4573 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4574 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4575 (Z_PACKET_ACCESS_WP): Delete macros.
4576 (Z_packet_to_hw_type): Delete function.
4577 * i386-low.h: Don't include break-common.h here.
4578 (Z_packet_to_hw_type): Delete declaration.
4579 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4580 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4581 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4582 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4583 * linux-aarch64-low.c: Don't include break-common.h here.
4584 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4585 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4586 (Z_packet_to_target_hw_bp_type): Delete function.
4587 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4588 function.
4589 (mips_insert_point, mips_remove_point): Use
4590 Z_packet_to_target_hw_bp_type.
4591
4ff0d3d8
PA
45922014-05-20 Pedro Alves <palves@redhat.com>
4593
4594 * linux-aarch64-low.c: Include break-common.h.
4595 (enum target_point_type): Delete.
4596 (Z_packet_to_point_type): Rename to ...
4597 (Z_packet_to_target_hw_bp_type): ... this, and return a
4598 target_hw_bp_type instead.
4599 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4600 instead of an enum target_point_type.
4601 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4602 breakpoint type.
4603 (aarch64_dr_state_insert_one_point)
4604 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4605 (aarch64_handle_aligned_watchpoint)
4606 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4607 Take an enum target_hw_bp_type instead of an enum
4608 target_point_type.
4609 (aarch64_supports_z_point_type): New function.
4610 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4611 use Z_packet_to_target_hw_bp_type.
4612
786dc519
JB
46132014-05-20 Joel Brobecker <brobecker@adacore.com>
4614
4615 * configure.ac: Only use -Werror by default when DEVELOPMENT
4616 is true.
4617 * configure: Regenerate.
4618
9e0aa64f
JK
46192014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4620
4621 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4622 * linux-x86-low.c (X86_64_USER_REGS): New.
4623 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4624
2b577b92
YQ
46252014-04-28 Yao Qi <yao@codesourcery.com>
4626
4627 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4628 name.
4629
94611da2
PA
46302014-04-25 Pedro Alves <palves@redhat.com>
4631
4632 PR server/16255
4633 * linux-low.c (linux_attach_fail_reason_string): New function.
4634 (linux_attach_lwp): Delete.
4635 (linux_attach_lwp_1): Rename to ...
4636 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4637 argument. Remove "initial" parameter. Return int instead of
4638 void. Don't error or warn here.
4639 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4640 failure to attach to the tgid. Call warning when failing to
4641 attach to an lwp.
4642 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4643 argument. Remove "initial" parameter. Return int instead of
4644 void. Don't error or warn here.
4645 (linux_attach_fail_reason_string): New declaration.
4646 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4647 interface change. Use linux_attach_fail_reason_string.
4648
01f9f808
MS
46492014-04-24 Michael Sturm <michael.sturm@mintel.com>
4650 Walfred Tedeschi <walfred.tedeschi@intel.com>
4651
4652 * Makefile.in: Added rules to handle new files
4653 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4654 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4655 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4656 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4657 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4658 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4659 x32-avx512-linux.o.
4660 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4661 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4662 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4663 i386/x32-avx512.xml.
4664 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4665 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4666 i386/x32-avx512-linux.xml.
4667 * i387-fp.c (num_avx512_k_registers): New constant for number
4668 of K registers.
4669 (num_avx512_zmmh_low_registers): New constant for number of
4670 lower ZMM registers (0-15).
4671 (num_avx512_zmmh_high_registers): New constant for number of
4672 higher ZMM registers (16-31).
4673 (num_avx512_ymmh_registers): New contant for number of higher
4674 YMM registers (ymm16-31 added by avx521 on x86_64).
4675 (num_avx512_xmm_registers): New constant for number of higher
4676 XMM registers (xmm16-31 added by AVX512 on x86_64).
4677 (struct i387_xsave): Add space for AVX512 registers.
4678 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4679 Add code to handle AVX512 registers.
4680 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4681 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4682 prototypei from generated file.
4683 (tdesc_amd64_avx512_linux): Likewise.
4684 (init_registers_x32_avx512_linux): Likewise.
4685 (tdesc_x32_avx512_linux): Likewise.
4686 (init_registers_i386_avx512_linux): Likewise.
4687 (tdesc_i386_avx512_linux): Likewise.
4688 (x86_64_regmap): Add AVX512 registers.
4689 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4690 mask.
4691 (initialize_low_arch): Add code to initialize AVX512 registers.
4692
51aa91f9
PA
46932014-04-23 Pedro Alves <palves@redhat.com>
4694
4695 * mem-break.c (find_gdb_breakpoint_at): Make static.
4696 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4697
a4165e94
PA
46982014-04-23 Pedro Alves <palves@redhat.com>
4699
4700 * i386-low.c: Don't include break-common.h here.
4701 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4702 prototype to take target_hw_bp_type as argument instead of a Z
4703 packet char.
4704 * i386-low.h: Include break-common.h here.
4705 (Z_packet_to_hw_type): Declare.
4706 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4707 prototypes.
4708 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4709 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4710 (x86_remove_point): Convert the packet number to a
4711 target_hw_bp_type before calling i386_low_remove_watchpoint.
4712 * win32-i386-low.c (i386_insert_point): Convert the packet number
4713 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4714 (i386_remove_point): Convert the packet number to a
4715 target_hw_bp_type before calling i386_low_remove_watchpoint.
4716
b8acf843
PA
47172014-04-23 Pedro Alves <palves@redhat.com>
4718
4719 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4720
d708bcd1
PA
47212014-04-10 Pedro Alves <palves@redhat.com>
4722
4723 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4724 Check if the condition or command is NULL before checking if the
4725 breakpoint is known. On success, return true.
4726 * mem-break.h (add_breakpoint_condition): Document return.
4727 (add_breakpoint_commands): Add describing comment.
4728 * server.c (skip_to_semicolon): New function.
4729 (process_point_options): Use it.
4730
2eec7d5b
PA
47312014-04-09 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4734 to lwpid_of.
4735
fa96cb38
PA
47362014-02-27 Pedro Alves <palves@redhat.com>
4737
4738 PR 12702
4739 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4740 macros.
4741 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4742 output.
4743 (last_thread_of_process_p): Take a PID argument instead of a
4744 thread pointer.
4745 (linux_wait_for_lwp): Delete.
4746 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4747 functions.
4748 (linux_low_filter_event): New function, party factored out from
4749 linux_wait_for_event.
4750 (linux_wait_for_event): Rename to ...
4751 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4752 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4753 sigsuspend. Check for zombie leaders.
4754 (linux_wait_for_event): Reimplement as wrapper around
4755 linux_wait_for_event_filtered.
4756 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4757 a normal or signal exit is seen, it's the whole process exiting.
4758 (wait_for_sigstop): No longer a for_each_inferior callback.
4759 Rewrite on top of linux_wait_for_event_filtered.
4760 (stop_all_lwps): Call wait_for_sigstop directly.
4761 * server.c (resume, handle_target_event): Handle
4762 TARGET_WAITKIND_NO_RESUMED.
4763
d763de10
JB
47642014-02-26 Joel Brobecker <brobecker@adacore.com>
4765
4766 * win32-low.c (psapi_get_dll_name,
4767 * win32_CreateToolhelp32Snapshot): Delete.
4768 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4769 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4770 Delete.
4771 (handle_load_dll): Add function description.
4772 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4773
850a0f76
JB
47742014-02-26 Joel Brobecker <brobecker@adacore.com>
4775
4776 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4777 Add comment.
4778 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4779 base address when calling win32_add_one_solib.
4780 (handle_load_dll): Delete local variable load_addr.
4781 Remove 0x1000 offset applied to DLL base address when calling
4782 win32_add_one_solib.
4783 (handle_unload_dll): Add comment.
4784
f25b3fc3
JB
47852014-02-26 Joel Brobecker <brobecker@adacore.com>
4786
4787 * win32-low.c (win32_add_all_dlls): Renames
4788 win32_ensure_ntdll_loaded. Rewrite function documentation.
4789 Adjust implementation to always load all DLLs.
4790 Add 0x1000 offset to DLL base address when calling
4791 win32_add_one_solib.
4792 (child_initialization_done): New static global.
4793 (do_initial_child_stuff): Set child_initialization_done to
4794 zero during child initialization, and 1 after. Replace call
4795 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4796 Add comment.
4797 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4798 (handle_unload_dll): Add function documentation.
4799 (get_child_debug_event): Ignore load and unload DLL events
4800 during child initialization.
4801
d86d4aaf
DE
48022014-02-20 Doug Evans <dje@google.com>
4803
3bc32da3 4804 Remove global all_lwps.
d86d4aaf
DE
4805 * inferiors.h (ptid_of): Move here from linux-low.h.
4806 (pid_of, lwpid_of): Ditto.
4807 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4808 parameter is a struct thread_info * now.
4809 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4810 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4811 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4812 directly.
4813 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4814 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4815 * linux-arm-low.c (update_registers_callback): Update, "entry"
4816 parameter is a struct thread_info * now.
4817 Fetch lwpid from current_inferior directly.
4818 (arm_insert_point): Pass &all_threads to find_inferior instead of
4819 &all_lwps.
4820 (arm_remove_point): Ditto.
4821 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4822 (arm_prepare_to_resume): Fetch pid from thread.
4823 (arm_read_description): Fetch lwpid from current_inferior directly.
4824 * linux-low.c (all_lwps): Delete.
4825 (delete_lwp): Delete call to remove_inferior.
4826 (handle_extended_wait): Fetch lwpid from thread.
4827 (add_lwp): Don't set lwp->entry.id. Remove call to
4828 add_inferior_to_list.
4829 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4830 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4831 (kill_one_lwp_callback): Ditto.
4832 (linux_kill): Don't dereference NULL pointer.
4833 Fetch ptid,lwpid from thread.
4834 (get_detach_signal): Fetch ptid from thread.
4835 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4836 Simplify call to regcache_invalidate_thread.
4837 (delete_lwp_callback): Update, "entry" parameter is a
4838 struct thread_info * now. Fetch pid from thread.
4839 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4840 (status_pending_p_callback): Update, "entry" parameter is a
4841 struct thread_info * now. Fetch ptid from thread.
4842 (find_lwp_pid): Update, "entry" parameter is a
4843 struct thread_info * now.
4844 (linux_wait_for_lwp): Fetch pid from thread.
4845 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4846 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4847 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4848 (dequeue_one_deferred_signal): Ditto.
4849 (cancel_breakpoint): Fetch ptid from current_inferior.
4850 (linux_wait_for_event): Pass &all_threads to find_inferior,
4851 not &all_lwps. Fetch ptid, lwpid from thread.
4852 (count_events_callback): Update, "entry" parameter is a
4853 struct thread_info * now.
4854 (select_singlestep_lwp_callback): Ditto.
4855 (select_event_lwp_callback): Ditto.
4856 (cancel_breakpoints_callback): Ditto.
4857 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4858 not &all_lwps.
4859 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4860 (unsuspend_one_lwp): Update, "entry" parameter is a
4861 struct thread_info * now.
4862 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4863 not &all_lwps.
4864 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4865 Fetch lwpid from thread, not lwp.
4866 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4867 Pass &all_threads to find_inferior, not &all_lwps.
4868 (send_sigstop): Fetch lwpid from thread, not lwp.
4869 (send_sigstop_callback): Update, "entry" parameter is a
4870 struct thread_info * now.
4871 (suspend_and_send_sigstop_callback): Ditto.
4872 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4873 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4874 struct thread_info * now.
4875 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4876 from thread, lwp.
4877 (lwp_running): Update, "entry" parameter is a
4878 struct thread_info * now.
4879 (stop_all_lwps): Fetch ptid from thread.
4880 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4881 (linux_resume_one_lwp): Fetch lwpid from thread.
4882 (linux_set_resume_request): Update, "entry" parameter is a
4883 struct thread_info * now. Fetch pid, lwpid from thread.
4884 (resume_status_pending_p): Update, "entry" parameter is a
4885 struct thread_info * now.
4886 (need_step_over_p): Ditto. Fetch lwpid from thread.
4887 (start_step_over): Fetch lwpid from thread.
4888 (linux_resume_one_thread): Update, "entry" parameter is a
4889 struct thread_info * now. Fetch lwpid from thread.
4890 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4891 (proceed_one_lwp): Update, "entry" parameter is a
4892 struct thread_info * now. Fetch lwpid from thread.
4893 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4894 struct thread_info * now.
4895 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4896 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4897 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4898 directly.
4899 (regsets_store_inferior_registers): Ditto.
4900 (fetch_register, store_register): Ditto.
4901 (linux_read_memory, linux_write_memory): Ditto.
4902 (linux_request_interrupt): Ditto.
4903 (linux_read_auxv): Ditto.
4904 (linux_xfer_siginfo): Ditto.
4905 (linux_qxfer_spu): Ditto.
4906 (linux_qxfer_libraries_svr4): Ditto.
4907 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4908 moved to inferiors.h.
4909 (get_lwp): Delete.
4910 (get_thread_lwp): Update.
4911 (struct lwp_info): Delete member "entry". Simplify comment for
4912 member "thread".
4913 (all_lwps): Delete.
4914 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4915 current_inferior directly.
4916 (update_watch_registers_callback): Update, "entry" parameter is a
4917 struct thread_info * now. Fetch pid from thread.
4918 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4919 (mips_insert_point): Fetch lwpid from current_inferior.
4920 Pass &all_threads to find_inferior, not &all_lwps.
4921 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4922 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4923 directly.
4924 (mips_stopped_data_address): Ditto.
4925 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4926 directly.
4927 * linux-tile-low.c (tile_arch_setup): Ditto.
4928 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4929 (update_debug_registers_callback): Update, "entry" parameter is a
4930 struct thread_info * now. Fetch pid from thread.
4931 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4932 Pass &all_threads to find_inferior, not &all_lwps.
4933 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4934 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4935 Pass &all_threads to find_inferior, not &all_lwps.
4936 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4937 (i386_dr_low_get_status): Ditto.
4938 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4939 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4940 (x86_linux_read_description): Ditto.
4941 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4942
3b8361aa
DE
49432014-02-20 Doug Evans <dje@google.com>
4944
4945 * inferiors.c (get_first_inferior): Fix buglet.
4946
f7667f0d
DE
49472014-02-19 Doug Evans <dje@google.com>
4948
4949 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4950 * inferiors.c (add_thread): Change result type to struct thread_info *.
4951 All callers updated.
4952 (add_lwp): Call add_thread here instead of in callers.
4953 All callers updated.
4954 * linux-low.h (get_lwp_thread): Rewrite.
4955 (struct lwp_info): New member "thread".
4956
b3312d80
DE
49572014-02-19 Doug Evans <dje@google.com>
4958
4959 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4960 All callers updated.
4961
ecc6f45c
DE
49622014-02-19 Doug Evans <dje@google.com>
4963
4964 * inferiors.c (add_thread): Fix whitespace.
4965
649ebbca
DE
49662014-02-19 Doug Evans <dje@google.com>
4967
4968 * dll.c (clear_dlls): Replace accessing list implemention details
4969 with API function.
4970 * gdbthread.h (get_first_thread): Declare.
4971 * inferiors.c (for_each_inferior_with_data): New function.
4972 (get_first_thread): New function.
4973 (find_thread_ptid): Simplify.
4974 (get_first_inferior): New function.
4975 (clear_list): Delete.
4976 (one_inferior_p): New function.
4977 (clear_inferior_list): New function.
4978 (clear_inferiors): Update.
4979 * inferiors.h (for_each_inferior_with_data): Declare.
4980 (clear_inferior_list): Declare.
4981 (one_inferior_p): Declare.
4982 (get_first_inferior): Declare.
4983 * linux-low.c (linux_wait_for_event): Replace accessing list
4984 implemention details with API function.
4985 * server.c (target_running): Ditto.
4986 (accumulate_file_name_length): New function.
4987 (emit_dll_description): New function.
4988 (handle_qxfer_libraries): Replace accessing list implemention
4989 details with API function.
4990 (handle_qxfer_threads_worker): New function.
4991 (handle_qxfer_threads_proper): Replace accessing list implemention
4992 details with API function.
4993 (handle_query): Ditto.
4994 (visit_actioned_threads_callback_ftype): New typedef.
4995 (visit_actioned_threads_data): New struct.
4996 (visit_actioned_threads): Rewrite to be find_inferior callback.
4997 (resume): Call find_inferior.
4998 (handle_status): Replace accessing list implemention
4999 details with API function.
5000 (process_serial_event): Replace accessing list implemention details
5001 with API function.
5002 * target.c (set_desired_inferior): Replace accessing list implemention
5003 details with API function.
5004 * tracepoint.c (same_process_p): New function.
5005 (gdb_agent_about_to_close): Replace accessing list implemention
5006 details with API function.
5007 * win32-low.c (child_delete_thread): Replace accessing list
5008 implemention details with API function.
5009 (match_dll_by_basename): New function.
5010 (dll_is_loaded_by_basename): New function.
5011 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5012 details call to dll_is_loaded_by_basename.
5013
80894984
DE
50142014-02-19 Doug Evans <dje@google.com>
5015
5016 * dll.h (struct dll_info): Add comment.
5017 * gdbthread.h (struct thread_info): Add comment.
5018 (current_ptid): Simplify.
5019 * inferiors.c (add_process): Update.
5020 (remove_process): Update.
5021 * inferiors.h (struct process_info): Rename member "head" to "entry".
5022 * linux-low.c (delete_lwp): Update.
5023 (add_lwp): Update.
5024 (last_thread_of_process_p): Update.
5025 (kill_one_lwp_callback, linux_kill): Update.
5026 (status_pending_p_callback): Update.
5027 (wait_for_sigstop): Update. Simplify read of ptid.
5028 (start_step_over): Update.
5029 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5030 (get_lwp_thread): Update.
5031 (struct lwp_info): Rename member "head" to "entry".
5032 * regcache.h (inferior_list_entry): Delete.
5033 * server.c (kill_inferior_callback): Update.
5034 (detach_or_kill_inferior_callback): Update.
5035 (print_started_pid): Update.
5036 (print_attached_pid): Update.
5037 (process_serial_event): Simplify read of ptid.
5038 * thread-db.c (thread_db_create_event): Update.
5039 (thread_db_get_tls_address): Update.
5040 * win32-low.c (current_inferior_ptid): Simplify.
5041
46917d26
TT
50422014-02-19 Tom Tromey <tromey@redhat.com>
5043
5044 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5045 argument.
5046 (target_supports_btrace): Update.
5047
0759a81e
YQ
50482014-02-14 Yao Qi <yao@codesourcery.com>
5049
5050 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5051 (rsp-low-ipa.o): New target.
5052
a7191e8b
TT
50532014-02-12 Tom Tromey <tromey@redhat.com>
5054
5055 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5056 convert_ascii_to_int.
5057 * regcache.c (registers_to_string): Likewise.
5058 * remote-utils.c (decode_M_packet): Likewise.
5059 * server.c (process_serial_event): Likewise.
5060
ff0e980e
TT
50612014-02-12 Tom Tromey <tromey@redhat.com>
5062
5063 * server.c (handle_query, handle_v_run): Use hex2bin, not
5064 unhexify.
5065 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5066
e9371aff
TT
50672014-02-12 Tom Tromey <tromey@redhat.com>
5068
5069 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5070 convert_int_to_ascii.
5071 * regcache.c (registers_to_string, collect_register_as_string):
5072 Likewise.
5073 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5074 Likewise.
5075 * server.c (process_serial_event): Likewise.
5076 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5077 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5078
971dc0b8
TT
50792014-02-12 Tom Tromey <tromey@redhat.com>
5080
5081 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5082 bin2hex, not hexify.
5083 * tracepoint.c (cmd_qtstatus): Likewise.
5084
0a822afb
TT
50852014-02-12 Tom Tromey <tromey@redhat.com>
5086
5087 * remote-utils.c (monitor_output): Pass explicit length to
5088 hexify.
5089
9c3d6531
TT
50902014-02-12 Tom Tromey <tromey@redhat.com>
5091
5092 * tracepoint.c: Include rsp-low.h.
5093 * server.c: Include rsp-low.h.
5094 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5095 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5096 declare.
5097 * remote-utils.c: Include rsp-low.h.
5098 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5099 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5100 (convert_int_to_ascii, convert_ascii_to_int): Move to
5101 common/rsp-low.c.
5102 * regcache.c: Include rsp-low.h.
5103 * ax.c: Include rsp-low.h.
5104 * Makefile.in (SFILES): Add common/rsp-low.c.
5105 (OBS): Add rsp-low.o.
5106 (rsp-low.o): New target.
5107
01fd3ea5
TT
51082014-02-12 Tom Tromey <tromey@redhat.com>
5109
5110 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5111 Include print-utils.h.
5112 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5113 (plongest, thirty_two, phex_nz): Remove.
5114 * Makefile.in (SFILES): Add common/print-utils.c.
5115 (OBS): Add print-utils.o.
5116 (print-utils-ipa.o): New target.
5117 (print-utils.o): New target.
5118 (IPA_OBJS): Add print-utils-ipa.o.
5119
e99dc820
TT
51202014-02-06 Tom Tromey <tromey@redhat.com>
5121
5122 * Makefile.in (SFILES): Fix indentation.
5123
ee1e2d4f
DE
51242014-02-05 Doug Evans <dje@google.com>
5125
5126 * linux-low.c (linux_wait_for_event): Improve comment.
5127 (linux_wait_1): Keep current_inferior in sync with event_child.
5128
f5a02773
DE
51292014-01-22 Doug Evans <dje@google.com>
5130
5131 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5132
87ce2a04
DE
51332014-01-22 Doug Evans <dje@google.com>
5134
5135 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5136 * configure: Regenerate.
5137 * config.in: Regenerate.
5138 * Makefile.in (SFILES): Add debug.c.
5139 (OBS): Add debug.o.
5140 * debug.c: New file.
5141 * debug.h: New file.
5142 * linux-aarch64-low.c (*): Update all debugging printfs to use
5143 debug_printf instead of fprintf.
5144 * linux-arm-low.c (*): Ditto.
5145 * linux-cris-low.c (*): Ditto.
5146 * linux-crisv32-low.c (*): Ditto.
5147 * linux-m32r-low.c (*): Ditto.
5148 * linux-sparc-low.c (*): Ditto.
5149 * linux-x86.c (*): Ditto.
5150 * linux-low.c (*): Ditto.
5151 (linux_wait_1): Add calls to debug_enter, debug_exit.
5152 (linux_wait): Remove redundant debugging printf.
5153 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5154 (linux_resume, unstop_all_lwps): Ditto.
5155 * mem-break.c (*): Update all debugging printfs to use
5156 debug_printf instead of fprintf.
5157 * remote-utils.c (*): Ditto.
5158 * thread-db.c (*): Ditto.
5159 * server.c #include <ctype.h>, "gdb_vecs.h".
5160 (debug_threads): Moved to debug.c.
5161 (*): Update all debugging printfs to use debug_printf instead of
5162 fprintf.
5163 (start_inferior): Replace call to fflush with call to debug_flush.
5164 (monitor_show_help): Mention set debug-format.
5165 (parse_debug_format_options): New function.
5166 (handle_monitor_command): Handle "monitor set debug-format".
5167 (gdbserver_usage): Mention --debug-format.
5168 (main): Parse --debug-format.
5169 * server.h (debug_threads): Declaration moved to debug.h.
5170 #include "debug.h".
5171 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5172 trace_debug_1 that uses debug_printf.
5173 (tracepoint_look_up_symbols): Update all debugging printfs to use
5174 debug_printf instead of fprintf.
5175
e671835b
BS
51762014-01-20 Baruch Siach <baruch@tkos.co.il>
5177
5178 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5179 sys/ptrace.h.
5180
b5737fa9
PA
51812014-01-17 Pedro Alves <palves@redhat.com>
5182
ea38d2a9 5183 PR build/16445
c7faa97a
PA
5184 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5185 defined after including gdb_proc_service.h.
b5737fa9 5186
40ed484e
DE
51872014-01-16 Doug Evans <dje@google.com>
5188
5189 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5190 (match_dll): Use it.
5191
969c39fb
MM
51922014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5193
5194 * target.h (target_ops) <read_btrace>: Change parameters and
5195 return type to allow error reporting.
5196 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5197 trace reading errors on.
5198 * linux-low.c (linux_low_read_btrace): Pass trace reading
5199 errors on.
5200 (linux_low_disable_btrace): New.
5201
ab7f45ba
DE
52022014-01-15 Doug Evans <dje@google.com>
5203
5204 * inferiors.c (thread_id_to_gdb_id): Delete.
5205 * inferiors.h (thread_id_to_gdb_id): Delete.
5206
66af0f44
EZ
52072014-01-13 Eli Zaretskii <eliz@gnu.org>
5208
5209 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5210 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5211 versions.
5212
9939e131
PA
52132014-01-08 Pedro Alves <palves@redhat.com>
5214
5215 * server.c (handle_status): Don't discard previous queued stop
5216 replies or thread's pending status here.
5217 (main) <disconnection>: Do it here instead.
5218
b7ea362b
PA
52192014-01-08 Pedro Alves <palves@redhat.com>
5220
5221 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5222 * server.c (visit_actioned_threads, handle_pending_status): New
5223 function.
5224 (handle_v_cont): Factor out parts to ...
5225 (resume): ... this new function. If in all-stop, and a thread
5226 being resumed has a pending status, report it without actually
5227 resuming.
5228 (myresume): Adjust to use the new 'resume' function.
5229 (clear_pending_status_callback, set_pending_status_callback)
5230 (find_status_pending_thread_callback): New functions.
5231 (handle_status): Handle the case of multiple threads having
5232 interesting statuses to report. Report threads' real last signal
5233 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5234 with an interesting thread to report the status for, instead of
5235 always reporting the status of the first thread.
5236
28498c42
JB
52372014-01-01 Joel Brobecker <brobecker@adacore.com>
5238
5239 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5240 * gdbreplay.c (gdbreplay_version): Likewise.
5241
f45c82da
YZ
52422013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5243
5244 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5245 iov.iov_len with the real length in use.
5246
379a5e2d
JB
52472013-12-13 Joel Brobecker <brobecker@adacore.com>
5248
5249 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5250 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5251 for all targets that use win32-low.c.
5252 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5253 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5254
4210d83e
PA
52552013-12-13 Pedro Alves <palves@redhat.com>
5256
5257 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5258 if equal to TARGET_WAITKIND_LOADED.
5259 * win32-low.c (cached_status): New static global.
5260 (win32_wait): Add declaration.
5261 (do_initial_child_stuff): Flush all initial pending debug events
5262 up to the initial breakpoint.
5263 (win32_wait): If CACHED_STATUS was set, return that instead
5264 of doing a real wait. Remove the code resuming the execution
5265 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5266 during the initial phase. Also remove the code changing
5267 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5268 TARGET_WAITKIND_STOPPED.
5269
e7f0d979
YQ
52702013-12-11 Yao Qi <yao@codesourcery.com>
5271
5272 * notif.c (handle_notif_ack): Return 0 if no notification
5273 matches.
5274
ebcf782c
DE
52752013-11-20 Doug Evans <dje@google.com>
5276
5277 * linux-low.c (linux_set_resume_request): Fix comment.
5278
20ad9378
DE
52792013-11-20 Doug Evans <dje@google.com>
5280
5281 * linux-low.c (resume_status_pending_p): Tweak comment.
5282
a196ebeb
WT
52832013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5284
5285 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5286 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5287 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5288 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5289 (srv_amd64_regobj): Add amd64-mpx.o.
5290 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5291 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5292 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5293 * i387-fp.c (num_pl_bnd_register) Added constant.
5294 (num_pl_bnd_cfg_registers) Added constant.
5295 (struct i387_xsave) Added reserved area and MPX fields.
5296 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5297 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5298 function.
5299 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5300 (init_registers_amd64_mpx_linux): Declare new function.
5301 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5302 (x86_64_regmap): Add MPX registers.
5303 (x86_linux_read_description): Add MPX case.
5304 (initialize_low_arch): Initialize MPX targets.
5305
0080a2f6
TT
53062013-11-18 Tom Tromey <tromey@redhat.com>
5307
5308 * configure: Rebuild.
5309 * configure.ac: Don't check for stdlib.h.
5310 * gdbreplay.c: Unconditionally include stdlib.h.
5311
2978b111
TT
53122013-11-18 Tom Tromey <tromey@redhat.com>
5313
5314 * config.in: Rebuild.
5315 * configure: Rebuild.
5316 * configure.ac: Don't use AC_HEADER_DIRENT.
5317
a3d08894
TT
53182013-11-18 Tom Tromey <tromey@redhat.com>
5319
5320 * server.h: Don't check HAVE_STRING_H.
5321 * gdbreplay.c: Don't check HAVE_STRING_H.
5322 * configure: Rebuild.
5323
0a5dd17d
TT
53242013-11-18 Tom Tromey <tromey@redhat.com>
5325
5326 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5327 LIBGNU.
5328
1bd2f0ba
TT
53292013-11-08 Tom Tromey <tromey@redhat.com>
5330
5331 * configure, config.in: Rebuild.
5332 * configure.ac: Remove unused configury.
5333
3266f10b
TT
53342013-11-08 Tom Tromey <tromey@redhat.com>
5335
5336 * acinclude.m4: Include common.m4, codeset.m4.
5337 * configure, config.in: Rebuild.
5338 * configure.ac: Use GDB_AC_COMMON.
5339
6682d959
AA
53402013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5341
5342 * linux-s390-low.c (HWCAP_S390_TE): New define.
5343 (s390_arch_setup): Consider the TE field in the HWCAP for
5344 determining 'have_regset_tdb'.
5345
fd0a4d76
SDJ
53462013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5347
5348 PR gdb/16014
5349 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5350 call to sizeof.
5351
1a3d890b
PA
53522013-10-02 Pedro Alves <palves@redhat.com>
5353
5354 * server.c (process_serial_event): Don't output "GDBserver
5355 exiting" if GDB is connected through stdio.
5356 * target.c (mywait): Likewise, be silent if GDB is connected
5357 through stdio.
5358
97ad4581
JB
53592013-10-01 Joel Brobecker <brobecker@adacore.com>
5360
5361 * lynx-low.c (lynx_add_threads_after_attach): New function.
5362 (lynx_attach): Remove call to add_thread. Add call to
5363 lynx_add_threads_after_attach instead.
5364
5b4e221c
MF
53652013-09-28 Mike Frysinger <vapier@gentoo.org>
5366
5367 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5368 * config.in, configure: Regenerated.
5369
ee47b2f8
YQ
53702013-09-18 Yao Qi <yao@codesourcery.com>
5371
5372 PR server/15959
5373 * server.c (start_inferior): Clear 'resume_info'.
5374
d6707650 53752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5376
d6707650
JW
5377 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5378 for each register.
5379
9243dd0e 53802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5381
9243dd0e
JW
5382 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5383 linux-tile-low.o to srv_tgtobj.
5384
c623a6ef
WN
53852013-09-16 Will Newton <will.newton@linaro.org>
5386
5387 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5388 out regs.
5389
fb71d39e
PA
53902013-09-06 Pedro Alves <palves@redhat.com>
5391
5392 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5393 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5394 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5395 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5396 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5397 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5398
8e7e9910
PA
53992013-09-06 Pedro Alves <palves@redhat.com>
5400
5401 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5402 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5403
7c3a12ca
PA
54042013-09-06 Pedro Alves <palves@redhat.com>
5405
5406 * linux-amd64-ipa.c: Include tracepoint.h.
5407 * linux-i386-ipa.c: Include tracepoint.h.
5408
8eb3d7b6
RW
54092013-09-06 Ricard Wanderlof <ricardw@axis.com>
5410
5411 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5412 (ps_get_thread_area): New function.
5413
eddddb9d
RW
54142013-09-06 Ricard Wanderlof <ricardw@axis.com>
5415
5416 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5417 (initialize_low_arch): Call init_registers_crisv32 rather than
5418 init_register_crisv32.
5419
533b0600
PA
54202013-09-05 Pedro Alves <palves@redhat.com>
5421
5422 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5423 to ...
5424 * hostio.h: ... this new file.
5425 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5426 win32-low.c: Include hostio.h.
5427
0ce3d3b5
PA
54282013-09-05 Pedro Alves <palves@redhat.com>
5429
5430 * server.h (gdb_client_data, handler_func, callback_handler_func)
5431 (delete_file_handler, add_file_handler, append_callback_event)
5432 (delete_callback_event, start_event_loop, initialize_event_loop):
5433 Move to event-loop.h and include it.
5434 * event-loop.h: New file.
5435
799cdc37
PA
54362013-09-05 Pedro Alves <palves@redhat.com>
5437
5438 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5439 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5440 (loaded_dll, unloaded_dll): Move to ...
5441 * dll.h: ... this new file.
5442 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5443
6a6bbd9d
PA
54442013-09-05 Pedro Alves <palves@redhat.com>
5445
5446 * server.h (current_process, get_thread_process, all_processes)
5447 (add_inferior_to_list, for_each_inferior, current_inferior)
5448 (remove_inferior, add_process, remove_process, find_process_pid)
5449 (have_started_inferiors_p, have_attached_inferiors_p)
5450 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5451 (clear_inferiors, find_inferior, find_inferior_id)
5452 (inferior_target_data, set_inferior_target_data)
5453 (inferior_regcache_data, set_inferior_regcache_data): Move to
5454 inferiors.h, and include it.
5455 * inferiors.h: New file.
5456
f699aaba
PA
54572013-09-05 Pedro Alves <palves@redhat.com>
5458
5459 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5460 Move ...
72f4393d 5461 * ax.h: ... here.
f699aaba 5462
c144c7a0
PA
54632013-09-05 Pedro Alves <palves@redhat.com>
5464
5465 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5466 tracepoint.h.
5467 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5468 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5469 (handle_tracepoint_general_set, handle_tracepoint_query)
5470 (tracepoint_finished_step, tracepoint_was_hit)
5471 (release_while_stepping_state_list, current_traceframe)
5472 (in_readonly_region, traceframe_read_mem)
5473 (fetch_traceframe_registers, traceframe_read_sdata)
5474 (traceframe_read_info, struct fast_tpoint_collect_status)
5475 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5476 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5477 (supply_fast_tracepoint_registers)
5478 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5479 (ipa_tdesc, claim_trampoline_space)
5480 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5481 (agent_mem_read, agent_get_trace_state_variable_value)
5482 (agent_set_trace_state_variable_value, agent_tsv_read)
5483 (agent_mem_read_string, get_raw_reg_func_addr)
5484 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5485 * tracepoint.h: ... this new file.
5486
ff42e6ab
PA
54872013-09-05 Pedro Alves <palves@redhat.com>
5488
5489 * server.h (perror_with_name, error, fatal, warning, paddress)
5490 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5491 include it.
5492 * utils.h: New file.
5493
541af0f4
PA
54942013-09-05 Pedro Alves <palves@redhat.com>
5495
5496 * server.h (remote_debug, noack_mode, transport_is_reliable)
5497 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5498 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5499 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5500 (write_enn, initialize_async_io, enable_async_io)
5501 (disable_async_io, check_remote_input_interrupt_request)
5502 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5503 (dead_thread_notify, prepare_resume_reply)
5504 (decode_address_to_semicolon, decode_address, decode_m_packet)
5505 (decode_M_packet, decode_X_packet, decode_xfer_write)
5506 (decode_search_memory_packet, unhexify, hexify)
5507 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5508 (look_up_one_symbol, relocate_instruction)
5509 (monitor_output): Move to remote-utils.h, and include it.
5510 * remote-utils.h: New file.
5511
eebdf26b
PA
55122013-09-05 Pedro Alves <palves@redhat.com>
5513
5514 * server.h (_): Delete.
5515
3aafd2ff
PA
55162013-09-02 Pedro Alves <palves@redhat.com>
5517
5518 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5519 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5520 allocated.
5521 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5522
cee83bcb
PM
55232013-09-02 Pierre Muller <muller@sourceware.org>
5524
5525 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5526 or WriteProcessMemory complete successfully and handle
5527 ERROR_PARTIAL_COPY error.
5528
9a13b2fa
PA
55292013-09-02 Pedro Alves <palves@redhat.com>
5530
5531 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5532 error instead of EIO.
5533
602e3198
JK
55342013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5535
5536 PR server/15604
5537 * linux-low.c: Include filestuff.h.
5538 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5539 * lynx-low.c: Include filestuff.h.
5540 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5541 * server.c: Include filestuff.h.
5542 (main): Call notice_open_fds.
5543 * spu-low.c: Include filestuff.h.
5544 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5545
96d7229d
LM
55462013-08-22 Luis Machado <lgustavo@codesourcery.com>
5547
5548 * Makefile.in: Explain why ../target and ../nat are not
5549 listed as include file search paths.
5550 (linux-waitpid.o): New object file rule.
5551 * configure.srv (srv_native_linux_obj): New variable.
5552 Replace all occurrences of linux native object files with
5553 $srv_native_linux_obj.
5554 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5555 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5556 (linux_enable_event_reporting): Remove declaration.
5557 (my_waitpid): Moved to common/linux-waitpid.c.
5558 (linux_wait_for_event): Pass ptid when calling
5559 linux_enable_event_reporting.
5560 (linux_supports_tracefork_flag): Remove.
5561 (linux_enable_event_reporting): Likewise.
5562 (linux_tracefork_grandchild): Remove.
5563 (STACK_SIZE): Moved to common/linux-ptrace.c.
5564 (linux_tracefork_child): Remove.
5565 (linux_test_for_tracefork): Remove.
5566 (linux_look_up_symbols): Call linux_supports_traceclone.
5567 (initialize_low): Remove call to linux_test_for_tracefork.
5568 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5569 common/linux-ptrace.h.
5570 (PTRACE_TYPE_ARG4): Likewise.
5571 Include linux-ptrace.h.
5572
32940073
PA
55732013-08-21 Pedro Alves <palves@redhat.com>
5574
5575 * config.in: Renegerate.
5576
33b60d58 55772013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5578
33b60d58
LM
5579 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5580 (SFILES): Remove $(srcdir)/common/target-common.c and
5581 add $(srcdir)/target/waitstatus.c.
5582 (OBS): Remove target-common.o and add waitstatus.o.
5583 (server_h): Remove $(srcdir)/../common/target-common.h and
5584 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5585 and $(srcdir)/../target/waitstatus.h.
5586 (target-common.o): Remove.
5587 (waitstatus.o): New target object file.
5588 * target.h: Do not include target-common.h and
5589 include target/resume.h, target/wait.h and
5590 target/waitstatus.h.
5591
b8e1b30e
LM
55922013-08-13 Luis Machado <lgustavo@codesourcery.com>
5593
5594 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5595 to PTRACE_TYPE_ARG3.
5596 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5597 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5598 PTRACE_TYPE_ARG4.
5599 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5600 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5601
7a60ad40
YQ
56022013-07-27 Jie Zhang <jie@codesourcery.com>
5603 Daniel Jacobowitz <dan@codesourcery.com>
5604 Yao Qi <yao@codesourcery.com>
5605
5606 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5607 (mips-linux-watch.o): New rule.
5608 (mips_linux_watch_h): New variable.
5609 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5610 srv_tgtobj.
5611 * linux-mips-low.c: Include mips-linux-watch.h.
5612 (struct arch_process_info, struct arch_lwp_info): New.
5613 (update_watch_registers_callback): New function.
5614 (mips_linux_new_process, mips_linux_new_thread) New functions.
5615 (mips_linux_prepare_to_resume, mips_insert_point): New
5616 functions.
5617 (mips_remove_point, mips_stopped_by_watchpoint): New
5618 functions.
5619 (rsp_bp_type_to_target_hw_bp_type): New function.
5620 (mips_stopped_data_address): New function.
5621 (the_low_target): Add watchpoint support functions.
5622
de6f69ad
YQ
56232013-07-27 Yao Qi <yao@codesourcery.com>
5624
5625 * i386-low.c: Include break-common.h.
5626 (enum target_hw_bp_type): Remove.
5627
3360c0bf
LM
56282013-07-24 Luis Machado <lgustavo@codesourcery.com>
5629
5630 * Makefile.in (SFILES): /common/target-common.c.
5631 (OBS): Add target-common.o.
5632 (server_h): Add $(srcdir)/../common/target-common.h.
5633 (target-common.o): New target.
5634 * server.c (queue_stop_reply_callback): Free
5635 status string after use.
5636 * target.c (target_waitstatus_to_string): Remove.
5637 * target.h: Include target-common.h.
5638 (resume_kind): Likewise.
5639 (target_waitkind): Likewise.
5640 (target_waitstatus): Likewise.
5641 (TARGET_WNOHANG): Likewise.
5642
bd885420
YQ
56432013-07-04 Yao Qi <yao@codesourcery.com>
5644
5645 * Makefile.in (host_alias): Use @host_noncanonical@.
5646 (target_alias): Use @target_noncanonical@.
5647 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5648 ACX_NONCANONICAL_HOST.
5649 * configure: Regenerated.
5650
5651 Revert:
5652 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5653
5654 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5655 * configure: Rebuild.
5656 * Makefile.in (version_host, version_target): Get from configure.
5657 (version.c): Use $(version_host) and $(version_target).
5658
17ef446e
PA
56592013-07-03 Pedro Alves <palves@redhat.com>
5660
5661 * Makefile.in (config.status): Depend on development.sh.
5662 * acinclude.m4: Include libmcheck.m4.
5663 * configure: Regenerate.
5664
7a9a7487
MG
56652013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5666
5667 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5668 attribute inside the parentheses.
5669 (winapi_DebugSetProcessKillOnExit): Ditto.
5670 (winapi_DebugBreakProcess): Ditto.
5671 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5672
49b64de6
MG
56732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5674
5675 * notif.h (notif_event): Add a dummy member to avoid compiler
5676 errors.
5677
d5749ee7
PA
56782013-07-01 Pedro Alves <palves@redhat.com>
5679
5680 * hostio.c (HOSTIO_PATH_MAX): Define.
5681 (require_filename, handle_open, handle_unlink, handle_readlink):
5682 Use it.
5683
d8d2a3ee
PA
56842013-07-01 Pedro Alves <palves@redhat.com>
5685
5686 * server.h: Include "pathmax.h".
5687 * linux-low.c: Don't include sys/param.h.
5688 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5689 MAXPATHLEN.
5690 * win32-low.c: Don't include sys/param.h.
5691 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5692
bc7dea8d
PA
56932013-07-01 Pedro Alves <palves@redhat.com>
5694
5695 * event-loop.c: Don't check HAVE_UNISTD_H before including
5696 <unistd.h>.
5697 * gdbreplay.c: Likewise.
5698 * remote-utils.c: Likewise.
5699 * server.c: Likewise.
5700 * configure.ac: Don't check for unistd.h.
5701 * configure: Regenerate.
5702
d6c2da54
TT
57032013-06-28 Tom Tromey <tromey@redhat.com>
5704
5705 * Makefile.in (version.c): Use version.in, not
5706 common/version.in.
5707
257b6bec
MG
57082013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5709
5710 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5711 * configure: Rebuild.
5712 * Makefile.in (version_host, version_target): Get from configure.
5713 (version.c): Use $(version_host) and $(version_target).
5714
86ebe149
DK
57152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5716
5717 Fix trace-status to output user name without trailing colon.
5718 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5719
f30aa5af
DK
57202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5721
5722 Fix trace-status to output proper start-time and stop-time.
5723 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5724 output start time and stop time in hex as gdb expects.
5725
28a93511
YQ
57262013-06-26 Pedro Alves <pedro@codesourcery.com>
5727
5728 * tracepoint.c (build_traceframe_info_xml): Output trace state
5729 variables present in the trace buffer.
5730
01208463
TT
57312013-06-24 Tom Tromey <tromey@redhat.com>
5732
5733 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5734 create-version.sh.
5735 (version.o): Remove.
5736 * gdbreplay.c: Include version.h.
5737 (version, host_name): Don't declare.
5738 * server.h: Include version.h.
5739 (version, host_name): Don't declare.
5740
760256f9
PA
57412013-06-12 Pedro Alves <palves@redhat.com>
5742
5743 * linux-x86-low.c (linux_is_elf64): Delete global.
5744 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5745 with local linux_pid_exe_is_elf_64_file use.
5746
030031ee
PA
57472013-06-11 Pedro Alves <palves@redhat.com>
5748
5749 * linux-low.c (regset_disabled, disable_regset): New functions.
5750 (regsets_fetch_inferior_registers)
5751 (regsets_store_inferior_registers): Use them.
5752 (initialize_regsets_info); Don't allocate the disabled_regsets
5753 array here.
5754 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5755 comment.
5756
5da6eb0a
PA
57572013-06-11 Pedro Alves <palves@redhat.com>
5758
5759 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5760 xmalloc.
5761
7e5aaa09
PA
57622013-06-11 Pedro Alves <palves@redhat.com>
5763
5764 * linux-x86-low.c (initialize_low_arch): Call
5765 init_registers_x32_avx_linux.
5766
d878444c
JK
57672013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5768
5769 Fix compatibility with Android Bionic.
5770 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5771 it is not empty.
5772
3aee8918
PA
57732013-06-07 Pedro Alves <palves@redhat.com>
5774
5f2b57b5 5775 PR server/14823
3aee8918
PA
5776 * Makefile.in (OBS): Add tdesc.o.
5777 (IPA_OBJS): Add tdesc-ipa.o.
5778 (tdesc-ipa.o): New rule.
5779 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5780 interface.
5781 * linux-low.c (new_inferior): Delete.
5782 (disabled_regsets, num_regsets): Delete.
5783 (linux_add_process): Adjust to set the new per-process
5784 new_inferior flag.
5785 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5786 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5787 was a stop. When calling arch_setup, switch the current inferior
5788 to the thread that got an event.
5789 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5790 (regsets_fetch_inferior_registers)
5791 (regsets_store_inferior_registers): New regsets_info parameter.
5792 Adjust to use it.
5793 (linux_register_in_regsets): New regs_info parameter. Adjust to
5794 use it.
5795 (register_addr, fetch_register, store_register): New usrregs_info
5796 parameter. Adjust to use it.
5797 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5798 parameter regs_info. Adjust to use it.
5799 (linux_fetch_registers): Get the current inferior's regs_info, and
5800 adjust to use it.
5801 (linux_store_registers): Ditto.
5802 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5803 (initialize_low): Don't initialize the target_regsets here. Call
5804 initialize_low_arch.
5805 * linux-low.h (target_regsets): Delete declaration.
5806 (struct regsets_info): New.
5807 (struct usrregs_info): New.
5808 (struct regs_info): New.
5809 (struct process_info_private) <new_inferior>: New field.
5810 (struct linux_target_ops): Delete the num_regs, regmap, and
5811 regset_bitmap fields. New field regs_info.
5812 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5813 * i387-fp.c (num_xmm_registers): Delete.
5814 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5815 calls to new interface.
5816 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5817 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5818 Infer the number of xmm registers from the regcache's target
5819 description.
5820 * i387-fp.h (num_xmm_registers): Delete.
5821 * inferiors.c (add_thread): Don't install the thread's regcache
5822 here.
5823 * proc-service.c (gregset_info): Fetch the current inferior's
5824 regs_info. Adjust to use it.
5825 * regcache.c: Include tdesc.h.
5826 (register_bytes, reg_defs, num_registers)
5827 (gdbserver_expedite_regs): Delete.
5828 (get_thread_regcache): If the thread doesn't have a regcache yet,
5829 create one, instead of aborting gdbserver.
5830 (regcache_invalidate_one): Rename to ...
5831 (regcache_invalidate_thread): ... this.
5832 (regcache_invalidate_one): New.
5833 (regcache_invalidate): Only invalidate registers of the current
5834 process.
5835 (init_register_cache): Add target_desc parameter, and use it.
5836 (new_register_cache): Ditto. Assert the target description has a
5837 non zero registers_size.
5838 (regcache_cpy): Add assertions. Adjust.
5839 (realloc_register_cache, set_register_cache): Delete.
5840 (registers_to_string, registers_from_string): Adjust.
5841 (find_register_by_name, find_regno, find_register_by_number)
5842 (register_cache_size): Add target_desc parameter, and use it.
5843 (free_register_cache_thread, free_register_cache_thread_one)
5844 (regcache_release, register_cache_size): New.
5845 (register_size): Add target_desc parameter, and use it.
5846 (register_data, supply_register, supply_register_zeroed)
5847 (supply_regblock, supply_register_by_name, collect_register)
5848 (collect_register_as_string, collect_register_by_name): Adjust.
5849 * regcache.h (struct target_desc): Forward declare.
5850 (struct regcache) <tdesc>: New field.
5851 (init_register_cache, new_register_cache): Add target_desc
5852 parameter.
5853 (regcache_invalidate_thread): Declare.
5854 (regcache_invalidate_one): Delete declaration.
5855 (regcache_release): Declare.
5856 (find_register_by_number, register_cache_size, register_size)
5857 (find_regno): Add target_desc parameter.
5858 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5859 declarations.
5860 * remote-utils.c: Include tdesc.h.
5861 (outreg, prepare_resume_reply): Adjust.
5862 * server.c: Include tdesc.h.
5863 (gdbserver_xmltarget): Delete declaration.
5864 (get_features_xml, process_serial_event): Adjust.
5865 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5866 declare.
5867 (struct process_info) <tdesc>: New field.
5868 (ipa_tdesc): Declare.
5869 * tdesc.c: New file.
5870 * tdesc.h: New file.
5871 * tracepoint.c: Include tdesc.h.
5872 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5873 (get_context_regcache): Adjust to pass ipa_tdesc down.
5874 (do_action_at_tracepoint): Adjust to get the register cache size
5875 from the context regcache's description.
5876 (traceframe_walk_blocks): Adjust to get the register cache size
5877 from the current trace frame's description.
5878 (traceframe_get_pc): Adjust to get current trace frame's
5879 description and pass it down.
5880 (gdb_collect): Adjust to get the register cache size from the
5881 IPA's description.
5882 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5883 (gdbserver_xmltarget): Delete.
5884 (initialize_low_tracepoint): Set the ipa's target description.
5885 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5886 (initialize_low_tracepoint): Set the ipa's target description.
5887 * linux-x86-low.c: Include tdesc.h.
5888 [__x86_64__] (is_64bit_tdesc): New.
5889 (ps_get_thread_area, x86_get_thread_area): Use it.
5890 (i386_cannot_store_register): Rename to ...
5891 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5892 (i386_cannot_fetch_register): Rename to ...
5893 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5894 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5895 to new interface.
5896 (target_regsets): Rename to ...
5897 (x86_regsets): ... this.
5898 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5899 interface.
5900 (x86_siginfo_fixup): Use is_64bit_tdesc.
5901 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5902 (tdesc_x32_avx_linux, tdesc_x32_linux)
5903 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5904 Declare.
5905 (x86_linux_update_xmltarget): Delete.
5906 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5907 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5908 (AMD64_LINUX_USER64_CS): New.
5909 (x86_linux_read_description): New, based on
5910 x86_linux_update_xmltarget.
5911 (same_process_callback): New.
5912 (x86_arch_setup_process_callback): New.
5913 (x86_linux_update_xmltarget): New.
5914 (x86_regsets_info): New.
5915 (amd64_linux_regs_info): New.
5916 (i386_linux_usrregs_info): New.
5917 (i386_linux_regs_info): New.
5918 (x86_linux_regs_info): New.
5919 (x86_arch_setup): Reimplement.
5920 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5921 (x86_emit_ops): Ditto.
5922 (the_low_target): Adjust. Install x86_linux_regs_info,
5923 x86_cannot_fetch_register, and x86_cannot_store_register.
5924 (initialize_low_arch): New.
5925 * linux-ia64-low.c (tdesc_ia64): Declare.
5926 (ia64_fetch_register): Adjust.
5927 (ia64_usrregs_info, regs_info): New globals.
5928 (ia64_regs_info): New function.
5929 (the_low_target): Adjust.
5930 (initialize_low_arch): New function.
5931 * linux-sparc-low.c (tdesc_sparc64): Declare.
5932 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5933 Adjust.
5934 (sparc_arch_setup): New function.
5935 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5936 (the_low_target): Adjust.
5937 (initialize_low_arch): New function.
5938 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5939 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5940 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5941 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5942 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5943 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5944 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5945 (tdesc_powerpc_isa205_vsx64l): Declare.
5946 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5947 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5948 (ppc_set_pc, ppc_get_hwcap): Adjust.
5949 (ppc_usrregs_info): Forward declare.
5950 (!__powerpc64__) ppc_regmap_adjusted: New global.
5951 (ppc_arch_setup): Adjust to the current process'es target
5952 description.
5953 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5954 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5955 (ppc_store_evrregset): Adjust.
5956 (target_regsets): Rename to ...
5957 (ppc_regsets): ... this, and make static.
5958 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5959 (ppc_regs_info): New function.
5960 (the_low_target): Adjust.
5961 (initialize_low_arch): New function.
5962 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5963 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5964 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5965 (tdesc_s390x_linux64v2): Declare.
5966 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5967 (s390_fill_gregset, s390_store_last_break): Adjust.
5968 (target_regsets): Rename to ...
5969 (s390_regsets): ... this, and make static.
5970 (s390_get_pc, s390_set_pc): Adjust.
5971 (s390_get_hwcap): New target_desc parameter, and use it.
5972 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5973 (s390_arch_setup): Adjust to set the current process'es target
5974 description. Don't adjust the regmap.
5975 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5976 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5977 (regs_info_3264): New globals.
5978 (s390_regs_info): New function.
5979 (the_low_target): Adjust.
5980 (initialize_low_arch): New function.
5981 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5982 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5983 [__mips64] (init_registers_mips_linux)
5984 (init_registers_mips_dsp_linux): Delete defines.
5985 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5986 (have_dsp): New global.
5987 (mips_read_description): New, based on mips_arch_setup.
5988 (mips_arch_setup): Reimplement.
5989 (get_usrregs_info): New function.
5990 (mips_cannot_fetch_register, mips_cannot_store_register)
5991 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5992 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5993 (target_regsets): Rename to ...
5994 (mips_regsets): ... this, and make static.
5995 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5996 (dsp_regs_info, regs_info): New globals.
5997 (mips_regs_info): New function.
5998 (the_low_target): Adjust.
5999 (initialize_low_arch): New function.
6000 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6001 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6002 Declare.
6003 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6004 (arm_read_description): New, with bits factored from
6005 arm_arch_setup.
6006 (arm_arch_setup): Reimplement.
6007 (target_regsets): Rename to ...
6008 (arm_regsets): ... this, and make static.
6009 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6010 (arm_regs_info): New function.
6011 (the_low_target): Adjust.
6012 (initialize_low_arch): New function.
6013 * linux-m68k-low.c (tdesc_m68k): Declare.
6014 (target_regsets): Rename to ...
6015 (m68k_regsets): ... this, and make static.
6016 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6017 (m68k_regs_info): New function.
6018 (m68k_arch_setup): New function.
6019 (the_low_target): Adjust.
6020 (initialize_low_arch): New function.
6021 * linux-sh-low.c (tdesc_sharch): Declare.
6022 (target_regsets): Rename to ...
6023 (sh_regsets): ... this, and make static.
6024 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6025 (sh_regs_info, sh_arch_setup): New functions.
6026 (the_low_target): Adjust.
6027 (initialize_low_arch): New function.
6028 * linux-bfin-low.c (tdesc_bfin): Declare.
6029 (bfin_arch_setup): New function.
6030 (bfin_usrregs_info, regs_info): New globals.
6031 (bfin_regs_info): New function.
6032 (the_low_target): Adjust.
6033 (initialize_low_arch): New function.
6034 * linux-cris-low.c (tdesc_cris): Declare.
6035 (cris_arch_setup): New function.
6036 (cris_usrregs_info, regs_info): New globals.
6037 (cris_regs_info): New function.
6038 (the_low_target): Adjust.
6039 (initialize_low_arch): New function.
6040 * linux-cris-low.c (tdesc_crisv32): Declare.
6041 (cris_arch_setup): New function.
6042 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6043 (cris_regs_info): New function.
6044 (the_low_target): Adjust.
6045 (initialize_low_arch): New function.
6046 * linux-m32r-low.c (tdesc_m32r): Declare.
6047 (m32r_arch_setup): New function.
6048 (m32r_usrregs_info, regs_info): New globals.
6049 (m32r_regs_info): Adjust.
6050 (initialize_low_arch): New function.
6051 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6052 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6053 (tic6x_usrregs_info): Forward declare.
6054 (tic6x_read_description): New function, based on ...
6055 (tic6x_arch_setup): ... this. Reimplement.
6056 (target_regsets): Rename to ...
6057 (tic6x_regsets): ... this, and make static.
6058 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6059 (tic6x_regs_info): New function.
6060 (the_low_target): Adjust.
6061 (initialize_low_arch): New function.
6062 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6063 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6064 (target_regsets): Rename to ...
6065 (xtensa_regsets): ... this, and make static.
6066 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6067 globals.
6068 (xtensa_arch_setup, xtensa_regs_info): New functions.
6069 (the_low_target): Adjust.
6070 (initialize_low_arch): New function.
6071 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6072 (nios2_arch_setup): Set the current process'es tdesc.
6073 (target_regsets): Rename to ...
6074 (nios2_regsets): ... this.
6075 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6076 (nios2_regs_info): New function.
6077 (the_low_target): Adjust.
6078 (initialize_low_arch): New function.
a261b8f5
PA
6079 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6080 (aarch64_arch_setup): Set the current process'es tdesc.
6081 (target_regsets): Rename to ...
6082 (aarch64_regsets): ... this.
6083 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6084 (aarch64_regs_info): New function.
6085 (the_low_target): Adjust.
6086 (initialize_low_arch): New function.
3aee8918
PA
6087 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6088 globals.
6089 (target_regsets): Rename to ...
6090 (tile_regsets): ... this.
6091 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6092 (tile_regs_info): New function.
6093 (tile_arch_setup): Set the current process'es tdesc.
6094 (the_low_target): Adjust.
6095 (initialize_low_arch): New function.
6096 * spu-low.c (tdesc_spu): Declare.
6097 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6098 * win32-arm-low.c (tdesc_arm): Declare.
6099 (arm_arch_setup): New function.
6100 (the_low_target): Install arm_arch_setup instead of
6101 init_registers_arm.
6102 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6103 (init_windows_x86): Rename to ...
6104 (i386_arch_setup): ... this. Set `win32_tdesc'.
6105 (the_low_target): Adjust.
6106 * win32-low.c (win32_tdesc): New global.
6107 (child_add_thread): Don't create the thread cache here.
6108 (do_initial_child_stuff): Set the new process'es tdesc.
6109 * win32-low.h (struct target_desc): Forward declare.
6110 (win32_tdesc): Declare.
6111 * lynx-i386-low.c (tdesc_i386): Declare global.
6112 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6113 * lynx-low.c (lynx_tdesc): New global.
6114 (lynx_add_process): Set the new process'es tdesc.
6115 * lynx-low.h (struct target_desc): Forward declare.
6116 (lynx_tdesc): Declare global.
6117 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6118 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6119 * nto-low.c (nto_tdesc): New global.
6120 (do_attach): Set the new process'es tdesc.
6121 * nto-low.h (struct target_desc): Forward declare.
6122 (nto_tdesc): Declare.
6123 * nto-x86-low.c (tdesc_i386): Declare.
6124 (nto_x86_arch_setup): Set `nto_tdesc'.
6125
b1fbec62
GB
61262013-06-04 Gary Benson <gbenson@redhat.com>
6127
6128 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6129 to qSupported response when appropriate.
6130 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6131 with nonzero-length annex.
6132 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6133 arguments supplied in annex.
6134
d1ec4ce7
DE
61352013-05-31 Doug Evans <dje@google.com>
6136
ac44adcb 6137 PR server/15594
d1ec4ce7
DE
6138 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6139 64 bits in 64-cross-32 environment.
6140
9b25f2d3
PA
61412013-05-28 Pedro Alves <palves@redhat.com>
6142
6143 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6144 (aarch64-without-fpu.c): Delete rule.
6145 * configure.srv (aarch64*-*-linux*): Remove references to
6146 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6147 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6148 declaration.
6149
6740dc9c
PA
61502013-05-24 Pedro Alves <palves@redhat.com>
6151
6152 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6153 instead of strchr/decode_address. Error if the range isn't split
6154 with a ','. Don't assume there's be a ':' in the action.
6155
c2d6af84
PA
61562013-05-23 Yao Qi <yao@codesourcery.com>
6157 Pedro Alves <palves@redhat.com>
6158
6159 * linux-low.c (lwp_in_step_range): New function.
6160 (linux_wait_1): If the thread was range stepping and stopped
6161 outside the stepping range, report the stop to GDB. Otherwise,
6162 continue stepping. Add range stepping debug output.
6163 (linux_set_resume_request): Copy the step range from the resume
6164 request to the lwp.
6165 (linux_supports_range_stepping): New.
6166 (linux_target_ops) <supports_range_stepping>: Set to
6167 linux_supports_range_stepping.
6168 * linux-low.h (struct linux_target_ops)
6169 <supports_range_stepping>: New field.
6170 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6171 * linux-x86-low.c (x86_supports_range_stepping): New.
6172 (the_low_target) <supports_range_stepping>: Set to
6173 x86_supports_range_stepping.
6174 * server.c (handle_v_cont): Handle 'r' action.
6175 (handle_v_requests): Append ";r" if the target supports range
6176 stepping.
6177 * target.h (struct thread_resume) <step_range_start,
6178 step_range_end>: New fields.
6179 (struct target_ops) <supports_range_stepping>:
6180 New field.
6181 (target_supports_range_stepping): New macro.
6182
58794e1a
JB
61832013-05-17 Joel Brobecker <brobecker@adacore.com>
6184
6185 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6186 confusion in comment.
6187
d631c5a7
JB
61882013-05-17 Joel Brobecker <brobecker@adacore.com>
6189
6190 * lynx-low.c (struct process_info_private): New type.
6191 (lynx_add_process): New function.
6192 (lynx_create_inferior, lynx_attach): Replace calls to
6193 add_process by calls to lynx_add_process.
6194 (lynx_resume): If PTID is null, then try using
6195 current_process()->private->last_wait_event_ptid.
6196 Add comments.
6197 (lynx_clear_inferiors): Delete. The contents of that function
6198 has been inlined in lynx_mourn;
6199 (lynx_wait_1): Save the ptid in the process's private data.
6200 (lynx_mourn): Free the process' private data. Replace call
6201 to lynx_clear_inferiors by call to clear_inferiors.
6202
96f7a20f
YQ
62032013-05-17 Yao Qi <yao@codesourcery.com>
6204
6205 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6206 the right place.
6207
db0dfaa0
LM
62082013-05-16 Luis Machado <lgustavo@codesourcery.com>
6209
6210 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6211 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6212 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6213 PT_TEXT_END_ADDR guards. Update comments.
6214 (linux_target_op) <read_offsets>: Conditionally define to
6215 linux_read_offsets if the target is UCLIBC and if it defines
6216 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6217
68f5f838
SL
62182013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6219 Andrew Jenner <andrew@codesourcery.com>
6220
6221 * Makefile.in (SFILES): Add linux-nios2-low.c.
6222 (clean): Add action to delete nios2-linux.c.
6223 (nios2-linux.c): New rule.
6224 * configure.srv: Add nios2*-*-linux*.
6225 * linux-nios2-low.c: New.
6226
1ebff1fd
HAQ
62272013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6228
6229 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6230
f6150862
HZ
62312013-04-25 Hui Zhu <hui@codesourcery.com>
6232
6233 PR gdb/15186
f6150862
HZ
6234 * ax.c (ax_printf): Add fflush.
6235
614c279d
TT
62362013-04-22 Tom Tromey <tromey@redhat.com>
6237
6238 * Makefile.in (SFILES): Add filestuff.c.
6239 (OBS): Add filestuff.o.
6240 (filestuff.o): New target.
6241 * config.in, configure: Rebuild.
6242 * configure.ac: Check for fdwalk, pipe2.
6243
7d4e5717
PA
62442013-04-17 Pedro Alves <palves@redhat.com>
6245
6246 * configure.ac (USE_THREAD_DB): Delete variable.
6247 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6248 Don't AC_SUBST USE_THREAD_DB.
6249 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6250 * config.in, configure: Regenerate.
6251
d5c93e41
PA
62522013-04-16 Pedro Alves <palves@redhat.com>
6253
6254 * linux-low.h (struct lwp_info) <thread_known>: Move under
6255 the USE_THREAD_DB #ifdef.
6256
04f5fe89
PA
62572013-04-16 Pedro Alves <palves@redhat.com>
6258
6259 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6260 (linux-low.o): Delete rule.
6261 * linux-low.h: Always include "gdb_thread_db.h" instead of
6262 conditionally including thread_db.h.
6263 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6264 HAVE_THREAD_DB_H.
6265
480b27bf
JK
62662013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6267
6268 * Makefile.in (install-only): Fix make install regression.
6269
43662968
JK
62702013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6271
6272 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6273 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6274 installation.
6275 * gdbserver.1: Remove.
6276
3e74e146
PA
62772013-03-22 Pedro Alves <palves@redhat.com>
6278
6279 * linux-low.c (handle_extended_wait): Don't call
6280 linux_enable_event_reporting.
6281
a8347a2a
TT
62822013-03-15 Tony Theodore <tonyt@logyst.com>
6283
6284 PR build/9098:
6285 * Makefile.in (SHELL): Use @SHELL@.
6286
eeb56fa7
SDJ
62872013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6288
6289 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6290 compiler warning.
6291
4fa7e2ff
JB
62922013-03-13 Joel Brobecker <brobecker@adacore.com>
6293
6294 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6295 Remove extraneous NULL element.
6296
8ddb1965
YQ
62972013-03-13 Yao Qi <yao@codesourcery.com>
6298
6299 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6300 'V' block in trace frame.
6301
9accd112
MM
63022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6303
6304 * target.h (struct target_ops): Add btrace ops.
6305 (target_supports_btrace): New macro.
6306 (target_enable_btrace): New macro.
6307 (target_disable_btrace): New macro.
6308 (target_read_btrace): New macro.
6309 * gdbthread.h (struct thread_info): Add btrace field.
6310 * server.c: Include btrace-common.h.
6311 (handle_btrace_general_set): New function.
6312 (handle_btrace_enable): New function.
6313 (handle_btrace_disable): New function.
6314 (handle_general_set): Call handle_btrace_general_set.
6315 (handle_qxfer_btrace): New function.
6316 (struct qxfer qxfer_packets[]): Add btrace entry.
6317 * inferiors.c (remove_thread): Disable btrace.
6318 * linux-low: Include linux-btrace.h.
6319 (linux_low_enable_btrace): New function.
6320 (linux_low_read_btrace): New function.
6321 (linux_target_ops): Add btrace ops.
6322 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6323 Add srv_linux_btrace=yes.
6324 (x86_64-*-linux*): Add linux-btrace.o.
6325 Add srv_linux_btrace=yes.
6326 * configure.ac: Define HAVE_LINUX_BTRACE.
6327 * config.in: Regenerated.
6328 * configure: Regenerated.
6329
5cc22e4c
MM
63302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6331
6332 * server.c (handle_qxfer): Preserve error message if -3 is
6333 returned.
6334 (qxfer): Document the -3 return value.
6335
7c97f91e
MM
63362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6337
6338 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6339 (linux_btrace_h): New variable.
6340 (linux-btrace.o): New rule.
6341
be9a119c 63422013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6343 Hafiz Abid Qadeer <abidh@codesourcery.com>
6344
6345 * tracepoint.c (trace_buffer_size): New global.
6346 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6347 (init_trace_buffer): Change to one-argument function. Allocate
6348 trace buffer memory.
6349 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6350 handle QTBuffer:size packet.
6351 (cmd_bigqtbuffer_size): New function.
6352 (initialize_tracepoint): Call init_trace_buffer with
6353 DEFAULT_TRACE_BUFFER_SIZE.
6354 * server.c (handle_query): Add QTBuffer:size in the
6355 supported packets.
6356
e64f7499
YQ
63572013-03-07 Yao Qi <yao@codesourcery.com>
6358
6359 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6360 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6361 of -1.
6362 (cmd_qtsp): Adjust condition. Do post increment.
6363 Set cur_action and cur_step_action back to 0.
6364
f0ae6fc3
PA
63652013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6366
6367 PR server/15236
6368 * linux-low.c (linux_write_memory): Return early success if LEN is
6369 zero.
6370
b5b0b0af
CV
63712013-03-05 Corinna Vinschen <vinschen@redhat.de>
6372
334ad4a8 6373 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6374
589bc927
TT
63752013-02-28 Tom Tromey <tromey@redhat.com>
6376
6377 * configure.ac: Invoke AC_SYS_LARGEFILE.
6378 * configure, config.in: Rebuild.
6379
dfe07582
CV
63802013-02-28 Corinna Vinschen <vinschen@redhat.com>
6381
6382 * win32-low.c: Throughout, fix format strings and casts of
6383 printf-like functions to avoid type related warnings on all
6384 platforms.
6385 (get_child_debug_event): Print dwDebugEventCode as hex since
6386 that's how it's usually documented.
6387
736cd585
YQ
63882013-02-28 Yao Qi <yao@codesourcery.com>
6389
6390 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6391 pulongest.
6392
e1f58301
JW
63932013-02-27 Jiong Wang <jiwang@tilera.com>
6394
6395 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6396 (reg-tilegx32.c): New rule.
6397 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6398 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6399 different register info initializer according to elf class.
6400 (init_registers_tilgx32): New function. The tilegx32 register info
6401 initializer.
6402 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6403 (tile_store_gregset): Likewise.
6404
d171ca78
YQ
64052013-02-27 Yao Qi <yao@codesourcery.com>
6406
6407 * server.c (process_point_options): Print debug message when
6408 debug_threads is true.
6409
282bbdf3
YQ
64102013-02-26 Yao Qi <yao@codesourcery.com>
6411
6412 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6413
aca22551
PA
64142013-02-19 Pedro Alves <palves@redhat.com>
6415 Kai Tietz <ktietz@redhat.com>
6416
6417 PR gdb/15161
6418
6419 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6420 instead of strtoul to extract address from packet.
6421 (process_serial_event) <'z'>: Likewise.
6422
4f3cee1c
YQ
64232013-02-18 Yao Qi <yao@codesourcery.com>
6424
6425 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6426
8e1d55a3
PA
64272013-02-14 Pedro Alves <palves@redhat.com>
6428
6429 Plug memory leak.
6430
6431 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6432 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6433
458820da
PA
64342013-02-14 Pedro Alves <palves@redhat.com>
6435
6436 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6437
baea0dae
PA
64382013-02-14 Pedro Alves <palves@redhat.com>
6439
6440 * tracepoint.c (save_string): Delete.
6441 (add_tracepoint_action): Use savestring instead of save_string.
6442
0b1afbb3
PA
64432013-02-12 Pedro Alves <palves@redhat.com>
6444
6445 * linux-xtensa-low.c: Ditto.
6446 * xtensa-xtregs.c: Ditto.
6447
8a4ac37e
PA
64482013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6449
6450 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6451 thread_db.
6452
148de6bb
MS
64532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6454
6455 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6456 aarch64_num_wp_regs and aarch64_num_bp_regs to
6457 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6458
55fac6e0
MS
64592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6460
6461 * linux-aarch64-low.c (ps_get_thread_area): Replace
6462 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6463
176eb98c
MS
64642013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6465 Marcus Shawcroft <marcus.shawcroft@arm.com>
6466 Nigel Stephens <nigel.stephens@arm.com>
6467 Yufeng Zhang <yufeng.zhang@arm.com>
6468
6469 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6470 (aarch64.c, aarch64-without-fpu.c): New targets.
6471 * configure.srv (aarch64*-*-linux*): New.
6472 * linux-aarch64-low.c: New file.
6473
56f7af9c
MS
64742013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6475
43aaf8b6 6476 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6477 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6478 (dequeue_one_deferred_signal, linux_resume_one_thread)
6479 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6480 (linux_tracefork_grandchild, linux_test_for_tracefork)
6481 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6482 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6483 where the argument is 0.
6484
60f662b0
YQ
64852013-01-25 Yao Qi <yao@codesourcery.com>
6486
6487 * event-loop.c: Include "queue.h".
6488 (gdb_event_p): New typedef.
6489 (struct gdb_event) <next_event>: Remove.
6490 (event_queue): Change to QUEUE(gdb_event_p).
6491 (async_queue_event): Remove.
6492 (gdb_event_xfree): New.
6493 (initialize_event_loop): New.
6494 (process_event): Use API from QUEUE.
6495 (wait_for_event): Likewise.
6496 * server.c (main): Call initialize_event_loop.
6497 * server.h (initialize_event_loop): Declare.
6498
5ae4861a
YQ
64992013-01-18 Yao Qi <yao@codesourcery.com>
6500
6501 * ax.h (struct eval_agent_expr_context): New.
6502 (gdb_eval_agent_expr): Update declaration.
6503 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6504 TFRAME. Add new argument CTX.
6505 * server.h (struct eval_agent_expr_context): Declare.
6506 (agent_mem_read, agent_tsv_read): Update declaration.
6507 (agent_mem_read_string): Likewise.
6508 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6509 (add_traceframe_block): Add new argument TPOINT.
6510 Increase TPOINT->traceframe_usage.
6511 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6512 eval_tracepoint_agent_expr.
6513 (condition_true_at_tracepoint): Likewise.
6514 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6515 (agent_mem_read_string, agent_tsv_read): Likewise.
6516
85e00e85
YQ
65172013-01-16 Yao Qi <yao@codesourcery.com>
6518
6519 * linux-low.c (linux_resume_one_lwp): Don't check
6520 'lwp->bp_reinsert != 0'.
6521
4039cf45
JB
65222013-01-07 Joel Brobecker <brobecker@adacore.com>
6523 Pedro Alves <palves@redhat.com>
6524
6525 * lynx-low.c (ptrace_request_to_str): Define a temporary
6526 macro and use it to simplify this function's implementation.
6527
9044dee2
JB
65282013-01-07 Joel Brobecker <brobecker@adacore.com>
6529
6530 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6531 sets errno.
6532
e6352c8f
JB
65332013-01-07 Joel Brobecker <brobecker@adacore.com>
6534
6535 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6536
50681a27
JB
65372013-01-07 Joel Brobecker <brobecker@adacore.com>
6538
6539 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6540
3f6e77ef
JB
65412013-01-07 Joel Brobecker <brobecker@adacore.com>
6542
6543 * lynx-low.c (lynx_resume): Use the resume_info parameter
6544 to determine the ptid for the lynx_ptrace call, unless
6545 it is equal to minus_one_ptid, in which case we use the
6546 ptid of the current_inferior.
6547 (lynx_wait_1): After having received a thread create/exit
6548 event, resume the inferior's execution using the signaling
6549 thread's ptid, rather than the old ptid.
6550
7fda33ae
JB
65512013-01-07 Joel Brobecker <brobecker@adacore.com>
6552
6553 * lynx-low.c (lynx_resume): Delete variable ret.
6554
b9786c74
JB
65552013-01-01 Joel Brobecker <brobecker@adacore.com>
6556
6557 * gdbreplay.c (gdbreplay_version): Update copyright year.
6558 * server.c (gdbserver_version): Likewise.
6559
8b93d60f
JB
65602012-12-17 Joel Brobecker <brobecker@adacore.com>
6561
6562 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6563 new thread.
6564
037335a7
JB
65652012-12-17 Joel Brobecker <brobecker@adacore.com>
6566
6567 * lynx-low.c (ptrace_request_to_str): Add handling for
6568 PTRACE_GETTRACESIG.
6569
52d4cbd8
JB
65702012-12-17 Joel Brobecker <brobecker@adacore.com>
6571
6572 * lynx-low.c (lynx_attach): Delete variable new_process.
6573
ab8f6ca9
JB
65742012-12-17 Joel Brobecker <brobecker@adacore.com>
6575
6576 * lynx-low.c (lynx_create_inferior): Delete variable
6577 new_process.
6578
78cbc024
JB
65792012-12-17 Joel Brobecker <brobecker@adacore.com>
6580
6581 * lynx-low.c (ptrace_request_to_str): Do not handle
6582 PTRACE_GETTHREADLIST if this macro does not exist.
6583
14a00470
YQ
65842012-12-15 Yao Qi <yao@codesourcery.com>
6585
6586 * Makefile.in (OBS): Add notif.o.
6587 * notif.c, notif.h: New.
6588 * server.c: Include "notif.h".
6589 (struct vstop_notif) <next>: Remove.
6590 <base>: New field.
6591 (queue_stop_reply): Update.
6592 (push_event, send_next_stop_reply): Remove.
6593 (discard_queued_stop_replies): Update.
6594 (notif_stop): New variable.
6595 (handle_v_stopped): Remove.
6596 (handle_v_requests): Don't call handle_v_stopped. Call
6597 handle_ack_notif instead.
6598 (queue_stop_reply_callback): Call notif_event_enque instead
6599 of queue_stop_reply.
6600 (handle_status): Don't call send_next_stop_reply, call
6601 notif_write_event instead.
6602 (kill_inferior_callback): Likewise.
6603 (detach_or_kill_inferior_callback): Likewise.
6604 (main): Call initialize_notif.
6605 (process_serial_event): Call QUEUE_is_empty.
6606 (handle_target_event): Call notif_push instead of push event.
6607 * server.h (push_event): Remove declaration.
6608
61c125b9
TT
66092012-12-10 Tom Tromey <tromey@redhat.com>
6610
6611 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6612 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6613 macros.
6614 (.c.o): Rewrite.
6615 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6616 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6617 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6618 (amd64-linux-ipa.o, ax.o): Rewrite.
6619 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6620 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6621 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6622 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6623 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6624 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6625 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6626 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6627 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6628 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6629 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6630 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6631 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6632 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6633 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6634 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6635 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6636 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6637 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6638 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6639 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6640 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6641 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6642 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6643 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6644 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6645 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6646 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6647 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6648 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6649 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6650 (reg-tilegx.o): Remove.
6651 (all_object_files): New macro.
6652 Include .deps files.
6653 * aclocal.m4, configure: Rebuild.
6654 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6655 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6656 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6657
e90e9ad9
TT
66582012-12-05 Tom Tromey <tromey@redhat.com>
6659
6660 PR gdb/14917:
6661 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6662
02d403bf 66632012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6664
6665 * configure.ac: Check for linux/perf_event.h.
6666 * config.in: Regenerated.
6667 * configure: Regenerated.
6668
0270a750
PA
66692012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6670
6671 * hostio.c (handle_readlink): Decrease buffer size
6672 parameter passed to readlink by one byte.
6673
8c29b58e
YQ
66742012-11-26 Yao Qi <yao@codesourcery.com>
6675
6676 * configure.ac (build_warnings): Append '-Wempty-body'.
6677 * configure: Regenerated.
6678 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6679 body.
6680
8bdce1ff
PM
66812012-11-15 Pierre Muller <muller@sourceware.org>
6682
6683 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6684 * config.in: Regenerate.
6685 * configure: Regenerate.
6686 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6687 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6688 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6689 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6690 header.
6691 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6692 instead of <sys/wait.h> header.
6693 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6694
02d403bf 66952012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6696
6697 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6698 (various make rules): Remove -DGDBSERVER
6699
fbd5db48
YQ
67002012-11-09 Yao Qi <yao@codesourcery.com>
6701
6702 * spu-low.c (current_ptid): Move it to ..
6703 * gdbthread.h: ... here. New.
6704 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6705 * server.c (myresume, process_serial_event): Likewise.
6706 * thread-db.c (thread_db_find_new_threads): Likewise.
6707 * tracepoint.c (run_inferior_command): Likewise.
6708
b3dc46ff
AB
67092012-10-01 Andrew Burgess <aburgess@broadcom.com>
6710
6711 * server.c (handle_search_memory_1): Include access length in
6712 warning message.
6713
07c04788
HPN
67142012-09-05 Michael Brandt <michael.brandt@axis.com>
6715
6716 * linux-crisv32-low.c: Fix compile errors.
6717
918d227b
YQ
67182012-09-04 Yao Qi <yao@codesourcery.com>
6719
6720 * tracepoint.c (cmd_qtsv): Adjust debug message.
6721 Don't check CUR_TPOINT.
6722
18c1b81a
YQ
67232012-08-28 Yao Qi <yao@codesourcery.com>
6724
6725 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6726 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6727 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6728 Remove declarations of xmalloc, xreallloc, xstrdup and
6729 freeargv.
6730 * Makefile.in (libiberty_h): New.
6731 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6732 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6733
dc82f37b
YQ
67342012-08-23 Yao Qi <yao@codesourcery.com>
6735
6736 * server.h: Remove declaration of 'xsnprintf'.
6737
406b1477
KS
67382012-08-22 Keith Seitz <keiths@redhat.com>
6739
6740 * server.h: Include build-gnulib-gbserver/config.h.
6741 * gdbreplay.c: Likewise.
6742
e6712ff1
DE
67432012-08-08 Doug Evans <dje@google.com>
6744
6745 * Makefile.in (SFILES): Add gdb_vecs.c.
6746 (OBS): Add gdb_vecs.o.
6747 (gdb_vecs_h, host_defs_h): New variables.
6748 (thread-db.o): Add $(gdb_vecs_h) dependency.
6749 (gdb_vecs.o): New rule.
6750 * thread-db.c: #include "gdb_vecs.h".
6751 (thread_db_load_search): Use a vector to iterate over path elements.
6752 Handle text appearing after "$pdir".
6753
6754 * configure.ac: Add check for strstr.
6755 * config.in: Regenerate.
6756 * configure: Regenerate.
6757
7c3270ae
UW
67582012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6759
6760 * hostio.c (handle_pread): If pread fails, fall back to attempting
6761 lseek/read.
6762 (handle_pwrite): Likewise for pwrite.
6763
b62e2b27
UW
67642012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6765
6766 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6767 between unsupported TYPE and unimplementable ADDR/LEN combination.
6768 (arm_insert_point): Act on new return value.
6769
78a99e91
PA
67702012-07-31 Pedro Alves <palves@redhat.com>
6771
6772 * server.c (process_point_options): Only skip tokens if we find
6773 one that is unrecognized. Don't treat 'X' specially while
6774 skipping unrecognized tokens.
6775
fcf303ab
UW
67762012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6777
6778 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6779 to 4-byte-align HW breakpoint addresses for Thumb.
6780
7255706c
YQ
67812012-07-27 Yao Qi <yao@codesourcery.com>
6782
6783 PR remote/14161.
6784
6785 * server.h: Declare gdb_agent_about_to_close.
6786 * target.c (kill_inferior): Include "agent.h".
6787 New. Send command 'kill'.
6788 * target.h (kill_inferior): Removed macro.
6789 * tracepoint.c (gdb_agent_about_to_close): New.
6790 (gdb_agent_helper_thread): Handle command 'close'.
6791 Wait endlessly until the inferior stops.
6792 Install gdb_agent_remove_socket to atexit hook.
6793 (agent_socket_name): New static variable.
6794 (gdb_agent_socket_init): Replace local variable 'name' with
6795 'agent_socket_name'.
6796 (gdb_agent_remove_socket): New.
6797
5a3f286f
YQ
67982012-07-27 Yao Qi <yao@codesourcery.com>
6799
6800 * server.c (process_point_options): Stop at 'X' when parsing.
6801
961bd387
ME
68022012-07-19 Michael Eager <eager@eagercon.com>
6803
a261b8f5 6804 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6805 to hw_execute.
6806 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6807 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6808 hardware breakpoint.
6809
aa7c7447
JK
68102012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6811
6812 * gdbserver/linux-low.c (initialize_low): Call
6813 linux_ptrace_init_warnings.
6814
7f216e7c
DE
68152012-07-02 Doug Evans <dje@google.com>
6816
6817 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6818 pointer to int.
6819
d3ce09f5
SS
68202012-07-02 Stan Shebs <stan@codesourcery.com>
6821
6822 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6823 (ax.o): Add it to build rule.
6824 (ax-ipa.o): Ditto.
6825 (OBS): Add format.o.
6826 (IPA_OBS): Add format.o.
6827 * server.c (handle_query): Claim support for breakpoint commands.
6828 (process_point_options): Add command case.
6829 (process_serial_event): Leave running if there are printfs in
6830 effect.
6831 * mem-break.h (any_persistent_commands): Declare.
6832 (add_breakpoint_commands): Declare.
6833 (gdb_no_commands_at_breakpoint): Declare.
6834 (run_breakpoint_commands): Declare.
6835 * mem-break.c (struct point_command_list): New struct.
6836 (struct breakpoint): New field command_list.
6837 (any_persistent_commands): New function.
6838 (add_commands_to_breakpoint): New function.
6839 (add_breakpoint_commands): New function.
6840 (gdb_no_commands_at_breakpoint): New function.
6841 (run_breakpoint_commands): New function.
6842 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6843 locally.
6844 * ax.c: Include format.h.
6845 (ax_printf): New function.
6846 (gdb_eval_agent_expr): Add printf opcode.
6847
2f8f6aed
YQ
68482012-06-13 Yao Qi <yao@codesourcery.com>
6849
6850 * server.c (start_inferior): Remove duplicated writes to fields
6851 'last_resume_kind' and 'last_status' of 'current_inferior'.
6852
0c9070b3
YQ
68532012-06-12 Yao Qi <yao@codesourcery.com>
6854 Pedro Alves <palves@redhat.com>
6855
6856 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6857 comment.
6858 * server.c (handle_v_cont): Extend comment.
6859
c52daf70
YQ
68602012-06-11 Yao Qi <yao@codesourcery.com>
6861
6862 * linux-low.c (linux_attach): Add 'static'.
6863
d38bbb0a
YQ
68642012-06-06 Yao Qi <yao@codesourcery.com>
6865
6866 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6867
89dc0afd
JK
68682012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6869
6870 Fix gcc -flto compilation warning.
6871 * server.c (main): Make variable multi_mode and attach volatile.
6872
75f62ce7
TJB
68732012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6874
6875 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6876 if the platform doesn't know about it.
6877
65f479b6
PA
68782012-05-30 Jeff Kenton <jkenton@tilera.com>
6879
6880 * Makefile.in (SFILES): Add linux-tile-low.c.
6881 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6882 * configure.srv: Handle tilegx-*-linux*.
6883 * linux-tile-low.c: New file.
6884
0c5bf5a9
JK
68852012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6886
6887 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6888
a493e3e2
PA
68892012-05-24 Pedro Alves <palves@redhat.com>
6890
6891 PR gdb/7205
6892
43aaf8b6 6893 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6894
2ea28649
PA
68952012-05-24 Pedro Alves <palves@redhat.com>
6896
6897 PR gdb/7205
6898
6899 Replace target_signal with gdb_signal throughout.
6900
8d409d16
MR
69012012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6902
6903 * linux-low.c (linux_store_registers): Avoid the copying sequence
6904 when no data has been retrieved by ptrace.
6905
23512c01
MGD
69062012-05-22 Will Deacon <will.deacon@arm.com>
6907
6908 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6909 Include asm/ptrace.h.
6910 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6911 already defined.
6912
4934b29e
MR
69132012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6914
6915 * linux-low.c (linux_store_registers): Don't re-retrieve data
6916 with ptrace that has already been obtained from /proc. Always
6917 copy any data retrieved with ptrace to the buffer supplied.
6918
bde24c0a
PA
69192012-05-11 Yao Qi <yao@codesourcery.com>
6920 Pedro Alves <palves@redhat.com>
6921
6922 * linux-low.c (enum stopping_threads_kind): New.
6923 (stopping_threads): Change type to `enum stopping_threads_kind'.
6924 (handle_extended_wait): If stopping and suspending threads, leave
6925 the new_lwp suspended too.
6926 (linux_wait_for_event): Adjust.
6927 (stop_all_lwps): Set `stopping_threads' to
6928 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6929 whether we're suspending threads or just stopping them. Assert no
6930 recursion happens.
6931
623b6bdf
YQ
69322012-04-29 Yao Qi <yao@codesourcery.com>
6933
6934 * server.h: Move some code to ...
6935 * gdbthread.h: ... here. New.
6936 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6937 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6938 (nto-low.o, win32-low.o): Likewise.
6939 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6940 * regcache.c, remote-utils.c, server.c: Likewise.
6941 * target.c, tracepoint.c, win32-low.c: Likewise.
6942
f15f9948
TJB
69432012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6944
6945 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6946 (PTRACE_ARG4_TYPE): Likewise.
6947 (PTRACE_XFER_TYPE): Likewise.
6948 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6949 ptrace to PTRACE_ARG3_TYPE.
6950 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6951 (PTRACE_ARG4_TYPE): Likewise.
6952 (PTRACE_XFER_TYPE): Likewise.
6953 (linux_detach_one_lwp): Cast fourth argument of
6954 ptrace to long then PTRACE_ARG4_TYPE.
6955 (regsets_fetch_inferior_registers): Cast third argument of
6956 ptrace to long then PTRACE_ARG3_TYPE.
6957 (regsets_store_inferior_registers): Likewise.
6958
38ea300a
PA
69592012-04-20 Pedro Alves <palves@redhat.com>
6960
6961 * configure: Regenerate.
6962
c971b7fa
PA
69632012-04-19 Pedro Alves <palves@redhat.com>
6964
43aaf8b6 6965 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6966 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6967 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6968 (all, install-only, uninstall, clean-info, all-lib, clean): No
6969 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6970 (maintainer-clean realclean distclean): Use subdir_do.
6971 (subdir_do): New.
6972 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6973 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6974 * acinclude.m4: Include acx_configure_dir.m4.
6975 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6976 calls. Call AC_PROG_RANLIB. Configure gnulib using
6977 ACX_CONFIGURE_DIR.
6978 (GNULIB): New.
6979 (GNULIB_STDINT_H): Adjust.
6980 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6981 * gdbreplay.c: Include build-gnulib/config.h.
6982 * server.h: Likewise.
6983 * aclocal.m4: Regenerate.
6984 * config.in: Regenerate.
6985 * configure: Regenerate.
c971b7fa 6986
809277f8
PA
69872012-04-19 Pedro Alves <palves@redhat.com>
6988
6989 * Makefile.in (LIBGNU, INCGNU): Adjust.
6990 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6991 (all, install-only, uninstall, clean-info, all-lib, clean)
6992 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6993 * configure.ac: Adjust AC_OUTPUT output.
6994 * aclocal.m4: Regenerate.
6995 * configure: Regenerate.
6996
fd9bb8b8
PA
69972012-04-19 Pedro Alves <palves@redhat.com>
6998
6999 * Makefile.in (generated_files): New.
7000 (server_h): Remove the explicit dependency on config.h, and depend
7001 on $generated_files.
7002
1c298c66
PA
70032012-04-19 Pedro Alves <palves@redhat.com>
7004
7005 * Makefile.in (INCGNU): Add -Ignulib.
7006
57c4b50b
PA
70072012-04-19 Pedro Alves <palves@redhat.com>
7008
7009 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7010 (INCGNU): ... this, and spell out -I here.
7011 (GNULIB_LIB): Rename to ...
7012 (LIBGNU): ... this.
7013 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7014
1030e047
PA
70152012-04-19 Pedro Alves <palves@redhat.com>
7016
7017 * config.in: Regenerate.
7018
447d4319
PA
70192012-04-19 Pedro Alves <palves@redhat.com>
7020
7021 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7022 * server.h (memmem): Remove declaration.
7023 * config.in: Regenerate.
7024 * configure: Regenerate.
7025
aad9eab9
YQ
70262012-04-19 Yao Qi <yao@codesourcery.com>
7027
7028 * Makefile.in (SFILES): Add common/vec.c.
7029 (OBS): Add vec.o.
7030 (vec.o): New rule.
7031
3e10640f
YQ
70322012-04-19 Yao Qi <yao@codesourcery.com>
7033
7034 * remote-utils.c (prepare_resume_reply): Replace with macro
7035 target_core_of_thread.
7036 * server.c (handle_qxfer_threads_proper): Likewise.
7037 * target.h (traget_core_of_thread): New macro.
7038
71622373
PA
70392012-04-18 Pedro Alves <palves@redhat.com>
7040
7041 * aclocal.m4: Regenerate.
7042 * configure: Regenerate.
7043
80d26939
YQ
70442012-04-16 Yao Qi <yao@codesourcery.com>
7045
7046 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7047 duplicated on address.
7048
42476b70
YQ
70492012-04-16 Yao Qi <yao@codesourcery.com>
7050
7051 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7052 (struct tracepoint_action_ops) <send>: New field.
7053 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7054 (agent_expr_send, x_tracepoint_action_send): New.
7055 (l_tracepoint_action_send): New.
7056 (cmd_qtdp): Download and install tracepoint
7057 according to `use_agent'.
7058 (run_inferior_command): Add one more parameter `len'.
7059 Update callers.
7060 (tracepoint_send_agent): New.
7061 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7062
7bc83639
YQ
70632012-04-16 Yao Qi <yao@codesourcery.com>
7064
7065 * tracepoint.c (download_tracepoints): Moved to ...
7066 (cmd_qtstart): ... here.
7067
5f18041e
YQ
70682012-04-14 Yao Qi <yao@codesourcery.com>
7069
7070 * tracepoint.c: Include inttypes.h.
7071 (struct collect_memory_action): Use sized types.
7072 (struct tracepoint): Likewise.
7073 (cmd_qtdp, stop_tracing): Update print specifiers.
7074 (cmd_qtp, response_tracepoint): Likewise.
7075 (collect_data_at_tracepoint): Likewise.
7076 (collect_data_at_step): Likewise.
7077
55a8c076
YQ
70782012-04-14 Yao Qi <yao@codesourcery.com>
7079
7080 Import gnulib module inttypes.
7081 * aclocal.m4, config.in, configure: Regenerated.
7082
dc750257
YQ
70832012-04-14 Yao Qi <yao@codesourcery.com>
7084
7085 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7086 Makefile and config.status at last.
7087
0ab5faf9
YQ
70882012-04-13 Yao Qi <yao@codesourcery.com>
7089
7090 * tracepoint.c: Include stdint.h unconditionally.
7091
18f5fd81
TJB
70922012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7093
7094 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7095 on BFD_HAVE_SYS_PROCFS_TYPE.
7096 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7097 * configure: Regenerate.
7098 * config.in: Likewise.
7099
4d47af5c
L
71002012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7101
7102 * Makefile.in (clean): Also remove x32.c x32-linux.c
7103 x32-avx.c x32-avx-linux.c.
7104 (x32.o): New target.
7105 (x32.c): Likewise.
7106 (x32-linux.o): Likewise.
7107 (x32-linux.c): Likewise.
7108 (x32-avx.o): Likewise.
7109 (x32-avx.c): Likewise.
7110 (x32-avx-linux.o): Likewise.
7111 (x32-avx-linux.c): Likewise.
7112
7113 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7114 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7115 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7116 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7117 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7118 i386/x32-avx-linux.xml.
7119
7120 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7121 (init_registers_x32_avx_linux): Likwise.
7122 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7123 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7124
ecedbe58
PA
71252012-04-13 Pedro Alves <palves@redhat.com>
7126
7127 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7128 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7129 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7130 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7131 the sub-make.
7132
c92b5177
L
71332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7134
7135 * linux-x86-low.c (compat_x32_clock_t): New.
7136 (compat_x32_siginfo_t): Likewise.
7137 (compat_x32_siginfo_from_siginfo): Likewise.
7138 (siginfo_from_compat_x32_siginfo): Likewise.
7139 (linux_is_elf64): Likewise.
7140 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7141 and siginfo_from_compat_x32_siginfo for x32.
7142 (x86_arch_setup): Set linux_is_elf64.
7143
214d508e
L
71442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7145
7146 PR gdb/13969
7147 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7148 e_machine field.
7149 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7150 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7151 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7152 compatible with process.
7153
c9a1864a
YQ
71542012-04-12 Yao Qi <yao@codesourcery.com>
7155
7156 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7157 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7158 (install-only, install-info, clean): Handle sub dir gnulib.
7159 (all-lib, am--refresh): New targets.
7160 (memmem.o): Remove target.
7161 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7162 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7163 (AC_REPLACE_FUNCS): Remove memmem.
7164 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7165 (AC_OUTPUT): Generate Makefile in gnulib/.
7166 * aclocal.m4, config.in, configure: Regenerated.
7167
367ba2c2
MR
71682012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7169
7170 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7171
9d236627
PA
71722012-04-05 Pedro Alves <palves@redhat.com>
7173
7174 -Werror=strict-aliasing
7175
7176 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7177 pointer.
7178
111217b3
PA
71792012-04-04 Pedro Alves <palves@redhat.com>
7180
7181 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7182 (sparc_store_gregset_from_stack, sparc_store_gregset)
7183 (sparc_breakpoint_at): Fix formatting.
7184
8365dcf5
TJB
71852012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7186
7187 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7188 are available.
7189 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7190 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7191 * config.in: Regenerate.
7192 * configure: Likewise.
7193
689cc2ae
PA
71942012-03-29 Pedro Alves <palves@redhat.com>
7195
7196 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7197 Correct ptrace arguments.
7198
c14dfd32
PA
71992012-03-28 Pedro Alves <palves@redhat.com>
7200
7201 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7202 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7203 (IA64_FR1_REGNUM): New defines.
7204 (ia64_fetch_register): New.
7205 (the_low_target): Install it.
7206 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7207 field.
7208 * linux-low.c (linux_fetch_registers): Try the
7209 the_low_target.fetch_register hook first.
7210
7211 * linux-arm-low.c (the_low_target): Adjust.
7212 * linux-bfin-low.c (the_low_target): Adjust.
7213 * linux-cris-low.c (the_low_target): Adjust.
7214 * linux-crisv32-low.c (the_low_target): Adjust.
7215 * linux-m32r-low.c (the_low_target): Adjust.
7216 * linux-m68k-low.c (the_low_target): Adjust.
7217 * linux-mips-low.c (the_low_target): Adjust.
7218 * linux-ppc-low.c (the_low_target): Adjust.
7219 * linux-s390-low.c (the_low_target): Adjust.
7220 * linux-sh-low.c (the_low_target): Adjust.
7221 * linux-sparc-low.c (the_low_target): Adjust.
7222 * linux-tic6x-low.c (the_low_target): Adjust.
7223 * linux-x86-low.c (the_low_target): Adjust.
7224 * linux-xtensa-low.c (the_low_target): Adjust.
7225
63c88e13
PA
72262012-03-26 Pedro Alves <palves@redhat.com>
7227
7228 * server.c (handle_qxfer_libraries): Don't bail early if
7229 the_target->qxfer_libraries_svr4 is not NULL.
7230
fb723180
PA
72312012-03-26 Pedro Alves <palves@redhat.com>
7232
7233 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7234
0afae3cf
PA
72352012-03-23 Pedro Alves <palves@redhat.com>
7236
7237 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7238 "library-list-svr4" element's start tag when the the DSO list is
7239 empty.
7240
485f1ee4
PA
72412012-03-23 Pedro Alves <palves@redhat.com>
7242
7243 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7244 a variable whose type size is the same as the inferior's pointer
7245 size.
7246
a5362b9a
TS
72472012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7248
7249 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7250 struct siginfo.
7251 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7252 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7253 * linux-low.h: Include <signal.h>.
7254 (struct siginfo): Remove forward declaration.
7255 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7256 struct siginfo.
7257
d226c142
MF
72582012-03-21 Mike Frysinger <vapier@gentoo.org>
7259
7260 * .gitignore: Ignore more files.
7261
122f36ef
PA
72622012-03-19 Pedro Alves <palves@redhat.com>
7263 Jan Kratochvil <jan.kratochvil@redhat.com>
7264
7265 * server.c (cont_thread, general_thread): Add describing comments.
7266 (start_inferior): Clear `cont_thread'.
7267 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7268 of a process.
7269
fc3e5175
YQ
72702012-03-15 Yao Qi <yao@codesourcery.com>
7271
7272 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7273 handling to ...
7274 (cmd_qtdp): ... here.
7275
8d0d92cd
YQ
72762012-03-15 Yao Qi <yao@codesourcery.com>
7277
7278 * tracepoint.c (struct tracepoint_action_ops): New.
7279 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7280 (m_tracepoint_action_download): New.
7281 (r_tracepoint_action_download): New.
7282 (x_tracepoint_action_download): New.
7283 (l_tracepoint_action_download): New.
7284 (add_tracepoint_action): Install `action->ops' according type.
7285 (download_tracepoint_1): Move code `download' function pointer
7286 of various tracepoint_action_ops.
7287
87b0bb13
JK
72882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7289
7290 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7291 linux_ptrace_attach_warnings.
7292
5f572dec
JK
72932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7294
7295 * Makefile.in (linux-ptrace.o): New.
7296 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7297 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7298 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7299 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7300 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7301 of these targets.
7302 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7303
f4647387
YQ
73042012-03-08 Yao Qi <yao@codesourcery.com>
7305 Pedro Alves <palves@redhat.com>
7306
7307 Fix PR server/13392.
7308 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7309 offset of JMP insn.
7310 * tracepoint.c (remove_tracepoint): New.
7311 (cmd_qtdp): Call remove_tracepoint when failed to install.
7312
9b224c5e
PA
73132012-03-07 Pedro Alves <palves@redhat.com>
7314
7315 * linux-low.c (get_detach_signal): New.
7316 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7317 Pass on pending signals to PTRACE_DETACH. Check the result of the
7318 ptrace call.
7319 * server.c (program_signals, program_signals_p): New.
7320 (handle_general_set): Handle QProgramSignals.
7321 * server.h (program_signals, program_signals_p): Declare.
7322
e237a7e2
JK
73232012-03-05 Pedro Alves <palves@redhat.com>
7324 Jan Kratochvil <jan.kratochvil@redhat.com>
7325
7326 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7327 New comment why.
7328
5808517f
YQ
73292012-03-03 Yao Qi <yao@codesourcery.com>
7330
7331 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7332 agent_look_up_symbols.
7333
58b4daa5
YQ
73342012-03-03 Yao Qi <yao@codesourcery.com>
7335
7336 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7337 (linux-x86-low.o): Likewise.
7338 * server.h: Remove in_process_agent_loaded.
7339 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7340 common/agent.c.
7341 Update callers.
7342
8ffcbaaf
YQ
73432012-03-03 Yao Qi <yao@codesourcery.com>
7344
7345 * tracepoint.c (gdb_agent_capability): New global.
7346 (in_process_agent_loaded_ust): Renamed to
7347 `in_process_agent_supports_ust'.
7348 Update callers.
7349 (in_process_agent_supports_ust): Call agent_capability_check.
7350 (clear_installed_tracepoints): Assert that agent supports
7351 agent.
7352
d1feda86
YQ
73532012-03-03 Yao Qi <yao@codesourcery.com>
7354
7355 * linux-low.c (linux_supports_agent): New.
7356 (linux_target_ops): Initialize field `supports_agent' with
7357 linux_supports_agent.
7358 * target.h (struct target_ops) <supports_agent>: New.
7359 (target_supports_agent): New macro.
7360 * server.c (handle_general_set): Handle packet 'QAgent'.
7361 (handle_query): Send `QAgent+'.
7362 * Makefile.in (server.o): Depends on agent.h.
7363
2fa291ac
YQ
73642012-03-03 Yao Qi <yao@codesourcery.com>
7365
7366 * Makefile.in (OBS): Add agent.o.
7367 Add new rule for agent.o.
7368 Track dependence of tracepoint.c on agent.h.
7369 * tracepoint.c (run_inferior_command_1):
7370 (run_inferior_command): Call agent_run_command.
7371 (gdb_ust_connect_sync_socket): Deleted. Move it to
7372 common/agent.c.
7373 (resume_thread, stop_thread): Likewise.
7374 (gdb_ust_socket_init): Renamed to ...
7375 (gdb_agent_socket_init): ... New.
7376 (gdb_ust_thread): Renamed to ...
7377 (gdb_agent_helper_thread): ... New.
7378 (gdb_ust_init): Move some code to ...
7379 (gdb_agent_init): ... here. New.
7380 [HAVE_UST]: Call gdb_ust_init.
7381 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7382 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7383 * config.in, configure: Regenerated.
7384
05044653
PA
73852012-03-02 Pedro Alves <palves@redhat.com>
7386
7387 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7388 * linux-low.c (struct simple_pid_list): New.
7389 (stopped_pids): New a struct simple_pid_list pointer.
7390 (add_to_pid_list, pull_pid_from_list): New.
7391 (handle_extended_wait): Don't assume the first signal new children
7392 report is SIGSTOP. Adjust call to pull_pid_from_list.
7393 (linux_wait_for_lwp): Adjust.
7394
8d00225b
YQ
73952012-03-02 Yao Qi <yao@codesourcery.com>
7396
7397 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7398 debug log.
7399
19560ba5
YQ
74002012-03-02 Yao Qi <yao@codesourcery.com>
7401
7402 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7403 `stop_pc' and `tpoint'. Update caller.
7404
1faeff08
MR
74052012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7406
7407 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7408 * linux-low.c (use_linux_regsets): New macro.
7409 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7410 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7411 (linux_register_in_regsets): New function.
7412 (usr_fetch_inferior_registers): Skip registers covered by
7413 regsets.
7414 (usr_store_inferior_registers): Likewise.
7415 (usr_fetch_inferior_registers): New macro.
7416 (usr_store_inferior_registers): Likewise.
7417 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7418 (linux_store_registers): Likewise.
7419 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7420 prototype.
7421 (init_registers_mips64_dsp_linux): Likewise.
7422 (init_registers_mips_linux): New macro.
7423 (init_registers_mips_dsp_linux): Likewise.
7424 (mips_dsp_num_regs): Likewise.
7425 (DSP_BASE, DSP_CONTROL): New fallback macros.
7426 (mips_base_regs): New macro.
7427 (mips_regmap): Use it. Fix the size.
7428 (mips_dsp_regmap): New variable.
7429 (mips_dsp_regset_bitmap): Likewise.
7430 (mips_arch_setup): New function.
7431 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7432 than mips_regmap.
7433 (mips_cannot_store_register): Likewise.
7434 (the_low_target): Update .arch_setup, .num_regs and .regmap
7435 initializers. Add .regset_bitmap initializer.
7436 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7437 initializer.
7438 * linux-bfin-low.c (the_low_target): Likewise.
7439 * linux-cris-low.c (the_low_target): Likewise.
7440 * linux-crisv32-low.c (the_low_target): Likewise.
7441 * linux-ia64-low.c (the_low_target): Likewise.
7442 * linux-m32r-low.c (the_low_target): Likewise.
7443 * linux-m68k-low.c (the_low_target): Likewise.
7444 * linux-ppc-low.c (the_low_target): Likewise.
7445 * linux-s390-low.c (the_low_target): Likewise.
7446 * linux-sh-low.c (the_low_target): Likewise.
7447 * linux-sparc-low.c (the_low_target): Likewise.
7448 * linux-tic6x-low.c (the_low_target): Likewise.
7449 * linux-x86-low.c (the_low_target): Likewise.
7450 * linux-xtensa-low.c (the_low_target): Likewise.
7451 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7452 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7453 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7454 srv_xmlfiles.
7455 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7456 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7457
c03e6ccc
YQ
74582012-02-29 Yao Qi <yao@codesourcery.com>
7459 Pedro Alves <palves@redhat.com>
7460
7461 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7462 `step_over_finished' is true.
7463
644cebc9
PA
74642012-02-27 Pedro Alves <palves@redhat.com>
7465
7466 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7467 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7468
c14d7ab2
PA
74692012-02-27 Pedro Alves <palves@redhat.com>
7470
7471 PR server/9684
7472 * linux-low.c (pid_is_stopped): New.
7473 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7474
412c89dd
LM
74752012-02-25 Luis Machado <lgustavo@codesourcery.com>
7476
7477 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7478 of conditions.
7479
b745defe
MR
74802012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7481
7482 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7483
9f3a5c85
LM
74842012-02-24 Luis Machado <lgustavo@codesourcery>
7485
7486 * server.c (handle_query): Advertise support for target-side
7487 breakpoint condition evaluation.
7488 (process_point_options): New function.
7489 (process_serial_event): When inserting a breakpoint, check for
7490 a target-side condition that should be evaluated.
7491
7492 * mem-break.c: Include regcache.h and ax.h.
7493 (point_cond_list_t): New data structure.
7494 (breakpoint) <cond_list>: New field.
7495 (find_gdb_breakpoint_at): Make non-static.
7496 (delete_gdb_breakpoint_at): Clear any target-side
7497 conditions.
7498 (clear_gdb_breakpoint_conditions): New function.
7499 (add_condition_to_breakpoint): Likewise.
7500 (add_breakpoint_condition): Likewise.
7501 (gdb_condition_true_at_breakpoint): Likewise.
7502 (gdb_breakpoint_here): Return result directly instead
7503 of going through a local variable.
7504
7505 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7506 (clear_gdb_breakpoint_conditions): Likewise.
7507 (add_breakpoint_condition): Likewise.
7508 (gdb_condition_true_at_breakpoint): Likewise.
7509
7510 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7511 (need_step_over_p): Take target-side breakpoint condition into
7512 consideration.
7513
5e1dc496
LM
75142012-02-24 Luis Machado <lgustavo@codesourcery>
7515
7516 * server.h: Include tracepoint.h.
7517 (agent_mem_read, agent_get_trace_state_variable_value,
7518 agent_set_trace_state_variable_value,
7519 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7520 get_set_tsv_func_addr): New prototypes.
7521
7522 * ax.h: New include file.
7523 * ax.c: New source file.
7524
7525 * tracepoint.c: Include ax.h.
7526 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7527 agent_expr, eval_result_type): Move to ax.h.
7528 (parse_agent_expr): Rename to ...
7529 (gdb_parse_agent_expr): ... this, make it non-static and move
7530 to ax.h.
7531 (unparse_agent_expr) Rename to ...
7532 (gdb_unparse_agent_expr): ... this, make it non-static and move
7533 to ax.h.
7534 (eval_agent_expr): Rename to ...
7535 (eval_tracepoint_agent_expr): ... this.
7536 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7537 forward declarations.
7538 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7539 (agent_get_trace_state_variable_value): New function.
7540 (agent_set_trace_state_variable_value): New function.
7541 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7542 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7543 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7544 (condition_true_at_tracepoint): Likewise.
7545 (parse_agent_expr): Rename to ...
7546 (gdb_parse_agent_expr): ... this and move to ax.c.
7547 (unparse_agent_expr): Rename to ...
7548 (gdb_unparse_agent_expr): ... this and move to ax.c.
7549 (gdb_agent_op_name): Move to ax.c.
7550 (eval_agent_expr): Rename to ...
7551 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7552 and move to ax.c.
7553 (eval_tracepoint_agent_expr): New function.
7554 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7555 non-static.
5e1dc496
LM
7556 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7557 ax.c.
7558 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7559 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7560 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7561 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7562 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7563 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7564 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7565 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7566 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7567 (compile_bytecodes): Remove forward declaration.
7568 (is_goto_target): Move to ax.c.
7569 (compile_bytecodes): Move to ax.c and call
7570 agent_get_trace_state_variable_value (...) and
7571 agent_set_trace_state_variable_value (...).
7572
7573 * Makefile.in: Update ax.c and IPA dependencies.
7574
277e4e52
PA
75752012-02-24 Pedro Alves <palves@redhat.com>
7576
7577 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7578 (cmd_bigqtbuffer_circular): ... this. Only handle
7579 'QTBuffer:circular:'.
7580 (handle_tracepoint_general_set): Adjust.
7581
bf4c19f7
YQ
75822012-02-16 Yao Qi <yao@codesourcery.com>
7583
7584 * inferiors.c: Move code to ...
7585 * dll.c: .... here. New.
7586 * server.h: Declare clear_dlls.
7587 * Makefile.in (SFILES): Add dll.c.
7588 (OBS): Add dll.o
7589 (dll.o): New rule.
7590
d73f2619
YQ
75912012-02-11 Yao Qi <yao@codesourcery.com>
7592
7593 * server.c: (handle_monitor_command): Add a new parameter
7594 `own_buf'.
7595 (handle_query): Update caller.
7596
f8255c2a
JB
75972012-02-09 Joel Brobecker <brobecker@adacore.com>
7598
7599 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7600 * configure, config.in: Regenerate.
7601 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7602 is not defined.
7603
da84f473
PA
76042012-02-02 Pedro Alves <palves@redhat.com>
7605
7606 Try SIGKILL first, then PTRACE_KILL.
7607 * linux-low.c (linux_kill_one_lwp): New.
7608 (linux_kill_one_lwp): Rename to ...
7609 (kill_one_lwp_callback): ... this. Use the new
7610 linux_kill_one_lwp.
7611
e886a173
PA
76122012-02-02 Pedro Alves <palves@redhat.com>
7613
7614 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7615 inferior.
7616
be07f1a2
PA
76172012-01-27 Pedro Alves <palves@redhat.com>
7618
7619 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7620 (elf_64_file_p): Make static.
7621 (linux_pid_exe_is_elf_64_file): New.
7622 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7623 Delete declarations.
7624 (linux_pid_exe_is_elf_64_file): Declare.
7625 * linux-x86-low.c (x86_arch_setup): Use
7626 linux_pid_exe_is_elf_64_file.
7627
d8301ad1
JK
76282012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7629
7630 * linux-low.c (linux_wait_for_event_1): Rename to ...
7631 (linux_wait_for_event): ... here and merge it with former
7632 linux_wait_for_event - new variable wait_ptid, use it.
7633 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7634
01b17894
PA
76352012-01-23 Pedro Alves <palves@redhat.com>
7636
7637 * server.c (main): Avoid yet another case of infinite loop while
7638 detaching/killing after a longjmp.
7639
e825046f
JK
76402012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7641
7642 Code cleanup.
7643 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7644
b9e7b9c3
UW
76452012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7646
7647 * hostio.c (handle_readlink): New function.
7648 (handle_vFile): Call it to handle "vFile:readlink" packets.
7649
901f9912
UW
76502012-01-20 Pedro Alves <palves@redhat.com>
7651 Ulrich Weigand <ulrich.weigand@linaro.org>
7652
7653 * server.c (handle_v_requests): Only support vAttach and vRun to
7654 start multiple processes when in extended protocol mode.
7655
fc1ab1a0
PA
76562012-01-17 Pedro Alves <palves@redhat.com>
7657
7658 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7659 memalign plus mprotect to allocate the scratch buffer.
7660
7d5d4e98
PA
76612012-01-13 Pedro Alves <palves@redhat.com>
7662
7663 * server.c (attach_inferior): Clear `cont_thread'.
7664
f128d5e9
PA
76652012-01-13 Pedro Alves <palves@redhat.com>
7666
7667 * server.c (main): Avoid infinite loop while detaching/killing
7668 after a longjmp.
7669
06db92f0
DE
76702012-01-09 Doug Evans <dje@google.com>
7671
7672 * server.c (start_inferior): Set last_ptid in --wrapper case.
7673
32d92999
YQ
76742012-01-06 Yao Qi <yao@codesourcery.com>
7675
7676 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7677 defined.
7678 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7679
5e0a92a9
YQ
76802012-01-04 Yao Qi <yao@codesourcery.com>
7681
7682 * tracepoint.c (cmd_qtdp): Print debug message
7683 for static tracepoint.
7684
ae639e8c
YQ
76852012-01-04 Yao Qi <yao@codesourcery.com>
7686
7687 * tracepoint.c (trace_vdebug): Differentiate debug message
7688 between gdbserver and IPA.
7689
f72429c5
YQ
76902012-01-03 Yao Qi <yao@codesourcery.com>
7691
7692 * tracepoint.c (tracepoint_was_hit): Don't collect for
7693 static tracepoint.
7694
12c3e59c
JB
76952012-01-02 Joel Brobecker <brobecker@adacore.com>
7696
7697 * terminal.h: Reformat copyright header.
7698
67827812
JB
76992012-01-02 Joel Brobecker <brobecker@adacore.com>
7700
7701 * server.c (gdbserver_version): Update copyright year.
7702 * gdbreplay.c (gdbreplay_version): Likewise.
7703
3e52c33d
JK
77042011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7705
7706 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7707
7708 Revert:
7709 2011-12-18 Hui Zhu <teawater@gmail.com>
7710 * linux-low.c (linux_create_inferior): Save return value to ret.
7711
66f1260e
HZ
77122011-12-18 Hui Zhu <teawater@gmail.com>
7713
7714 * linux-low.c (linux_create_inferior): Save return value to ret.
7715
e77616d7
DE
77162011-12-16 Doug Evans <dje@google.com>
7717
e7b06c57
DE
7718 * linux-low.c (linux_create_inferior): If stdio connection,
7719 redirect stdin from /dev/null, stdout to stderr.
7720 * remote-utils.c (remote_is_stdio): New static global.
7721 (remote_connection_is_stdio): New function.
7722 (remote_prepare): Handle stdio connection.
7723 (remote_open): Ditto.
7724 (remote_close): Don't close stdin for stdio connections.
7725 (read_prim,write_prim): New functions. Replace all calls to
7726 read/write to these.
7727 * server.c (main): Watch for "-" argument. Move call to
7728 remote_prepare before start_inferior.
7729 * server.h (STDIO_CONNECTION_NAME): New macro.
7730 (remote_connection_is_stdio): Declare.
7731
e77616d7
DE
7732 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7733 in debugging output.
7734
82067193
YQ
77352011-12-15 Yao Qi <yao@codesourcery.com>
7736
7737 * tracepoint.c: Include sys/syscall.h.
7738 (gdb_ust_thread): Remove preprocessor conditional.
7739
82bfbe7e
PA
77402011-12-14 Pedro Alves <pedro@codesourcery.com>
7741
7742 * linux-low.c (linux_detach_one_lwp): Call
7743 the_low_target.prepare_to_resume before detaching.
7744
712c6575
YQ
77452011-12-14 Yao Qi <yao@codesourcery.com>
7746
7747 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7748 of write.
7749
d54d1edf
YQ
77502011-12-14 Yao Qi <yao@codesourcery.com>
7751
7752 * i386-low.c (i386_low_stopped_data_address): Initialize local
7753 variable `control'.
7754
6210a125
PA
77552011-12-13 Pedro Alves <pedro@codesourcery.com>
7756
7757 PR remote/13492
7758
7759 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7760 DR_CONTROL unless necessary. Extend comments.
7761 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7762 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7763
2ece8244
YQ
77642011-12-13 Yao Qi <yao@codesourcery.com>
7765
7766 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7767 macros.
7768 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7769
784867a5
JK
77702011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7771
7772 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7773 Print new debug message for such case.
7774
6bf36717
JK
77752011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7776
7777 Fix overlapping memcpy.
7778 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7779 the read_inferior_memory transfer.
7780 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7781 write_inferior_memory transfer.
7782 (set_fast_tracepoint_jump): New variable buf. Use it for the
7783 read_inferior_memory and write_inferior_memory transfers.
7784 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7785 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7786 Use it for the write_inferior_memory transfer.
7787 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7788 buffers.
7789
50275556
MR
77902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7791
7792 * linux-low.c (fetch_register, store_register): Make code
7793 consistent, fix formatting.
7794
7325beb4
MR
77952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7796
7797 * linux-low.c (usr_store_inferior_registers): Factor out code
7798 to handle individual registers into...
7799 (store_register): ... this new function.
7800
c642a434
UW
78012011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7802
7803 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7804 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7805 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7806 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7807 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7808 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7809 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7810 (srv_xmlfiles): Add new XML files.
7811
7812 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7813 and <sys/uio.h>.
7814 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7815 (init_registers_s390_linux32v1): Add prototype.
7816 (init_registers_s390_linux32v2): Likewise.
7817 (init_registers_s390_linux64v1): Likewise.
7818 (init_registers_s390_linux64v2): Likewise.
7819 (init_registers_s390x_linux64v1): Likewise.
7820 (init_registers_s390x_linux64v2): Likewise.
7821 (s390_num_regs): Increment to 52.
7822 (s390_regmap): Add orig_r2 register.
7823 (s390_num_regs_3264): Increment to 68.
7824 (s390_regmap_3264): Add orig_r2 register.
7825 (s390_collect_ptrace_register): Handle orig_r2 register.
7826 (s390_supply_ptrace_register): Likewise.
7827 (s390_fill_last_break): New function.
7828 (s390_store_last_break): Likewise.
7829 (s390_fill_system_call): New function.
7830 (s390_store_system_call): Likewise.
7831 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7832 register sets.
7833 (s390_check_regset): New function.
7834 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7835 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7836 Update target_regsets for available register sets.
7837
2268b414
JK
78382011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7839 Jan Kratochvil <jan.kratochvil@redhat.com>
7840
7841 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7842 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7843 New.
7844 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7845 * linux-low.h (struct process_info_private): New member r_debug.
7846 * server.c (handle_qxfer_libraries): Call
7847 the_target->qxfer_libraries_svr4.
7848 (handle_qxfer_libraries_svr4): New function.
7849 (qxfer_packets): New entry "libraries-svr4".
7850 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7851 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7852 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7853 PACKET_qXfer_libraries_svr4.
7854
d6db1fab
UW
78552011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7856
7857 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7858 PSW address/mask between 8-byte and 16-byte formats.
7859 (s390_supply_ptrace_register): Likewise.
7860 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7861 basic addressing mode bit.
7862
242f5f1c
SS
78632011-11-24 Stan Shebs <stan@codesourcery.com>
7864
7865 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7866
f196051f
SS
78672011-11-17 Stan Shebs <stan@codesourcery.com>
7868
7869 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7870 (tracing_start_time): New global.
7871 (tracing_stop_time): New global.
7872 (tracing_user_name): New global.
7873 (tracing_notes): New global.
7874 (tracing_stop_note): New global.
7875 (cmd_qtstart): Set traceframe_usage, start_time.
7876 (stop_tracing): Set stop_time.
7877 (cmd_qtstatus): Report additional status.
7878 (cmd_qtp): New function.
7879 (handle_tracepoint_query): Call it.
7880 (cmd_qtnotes): New function.
7881 (handle_tracepoint_general_set): Call it.
7882 (get_timestamp): Rename from tsv_get_timestamp.
7883
405f8e94
SS
78842011-11-14 Stan Shebs <stan@codesourcery.com>
7885 Kwok Cheung Yeung <kcy@codesourcery.com>
7886
7887 * linux-x86-low.c (small_jump_insn): New.
7888 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7889 trampoline and error message, build a trampoline and issue a small
7890 jump instruction to it.
7891 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7892 trampoline and error message.
7893 (x86_get_min_fast_tracepoint_insn_len): New.
7894 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7895 * linux-low.h (struct linux_target_ops): Add arguments to
7896 install_fast_tracepoint_jump_pad operation, add new operation.
7897 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7898 arguments.
7899 (linux_get_min_fast_tracepoint_insn_len): New function.
7900 (linux_target_op): Add new operation.
7901 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7902 (gdb_trampoline_buffer_end): Ditto.
7903 (gdb_trampoline_buffer_error): Ditto.
7904 (struct ipa_sym_addresses): Add fields for new IPA variables.
7905 (symbol_list): Add entries for new IPA variables.
7906 (struct tracepoint): Add fields to hold the address range of the
7907 trampoline used by the tracepoint.
7908 (trampoline_buffer_head): New static variable.
7909 (trampoline_buffer_tail): Ditto.
7910 (claim_trampoline_space): New function.
7911 (have_fast_tracepoint_trampoline_buffer): New function.
7912 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7913 structure.
7914 (install_fast_tracepoint): Ditto, also add error buffer argument.
7915 (cmd_qtminftpilen): New function.
7916 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7917 (fast_tracepoint_from_trampoline_address): New function.
7918 (fast_tracepoint_collecting): Handle trampoline as part of jump
7919 pad space.
7920 (set_trampoline_buffer_space): New function.
7921 (initialize_tracepoint): Initialize new IPA variables.
7922 * target.h (struct target_ops): Add arguments to
7923 install_fast_tracepoint_jump_pad operation, add new
7924 get_min_fast_tracepoint_insn_len operation.
7925 (target_get_min_fast_tracepoint_insn_len): New.
7926 (install_fast_tracepoint_jump_pad): Add arguments.
7927 * server.h (IPA_BUFSIZ): Define.
7928 * linux-i386-ipa.c: Include extra header files.
7929 (initialize_fast_tracepoint_trampoline_buffer): New function.
7930 (initialize_low_tracepoint): Call it.
7931 * server.h (set_trampoline_buffer_space): Declare.
7932 (claim_trampoline_space): Ditto.
7933 (have_fast_tracepoint_trampoline_buffer): Ditto.
7934
1e4d1764
YQ
79352011-11-14 Yao Qi <yao@codesourcery.com>
7936
7937 * server.c (handle_query): Handle InstallInTrace for qSupported.
7938 * tracepoint.c (add_tracepoint): Sort list.
7939 (install_tracepoint, download_tracepoint): New.
7940 (cmd_qtdp): Call them to install and download tracepoints.
7941 (sort_tracepoints): Removed.
7942 (cmd_qtstart): Update.
7943
5c73ff4e
YQ
79442011-11-14 Yao Qi <yao@codesourcery.com>
7945
7946 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7947 * mem-break.h: Declare.
7948 * tracepoint.c (cmd_qtstart): Move some code to ...
7949 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7950 New.
7951 (download_tracepoints): Move some code to ...
7952 (download_tracepoint_1): ... here. New.
7953
86a30030
YQ
79542011-11-08 Yao Qi <yao@codesourcery.com>
7955
7956 * remote-utils.c (relocate_instruction): A comment fix.
7957
8d26e50c
JB
79582011-11-07 Joel Brobecker <brobecker@adacore.com>
7959
7960 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7961 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7962 dr_status_mirror and dr_control_mirror from debug_reg_state.
7963 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7964 (i386_initial_stuff): Remove use of deleted globals.
7965 (i386_get_thread_context, i386_set_thread_context,
7966 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7967 from debug_reg_state.
7968
a59306a3
YQ
79692011-11-05 Yao Qi <yao@codesourcery.com>
7970
7971 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7972 address as TPOINT's.
7973
3065dfb6
SS
79742011-11-02 Stan Shebs <stan@codesourcery.com>
7975
7976 * tracepoint.c (agent_mem_read_string): New function.
7977 (eval_agent_expr): Call it for tracenz.
7978 * server.c (handle_query): Report support for tracenz.
7979
fd0d8c7c
YQ
79802011-11-02 Yao Qi <yao@codesourcery.com>
7981
7982 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7983
609086b1
YQ
79842011-11-02 Yao Qi <yao@codesourcery.com>
7985
7986 * target.h: Fix a typo in comment.
7987
b9fd1791
PA
79882011-10-31 Pedro Alves <pedro@codesourcery.com>
7989
7990 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7991 clobber the breakpoints' shadows with fast tracepoint jumps.
7992 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7993 * target.c (write_inferior_memory): Also pass MYADDR down to
7994 check_mem_write.
7995
03583c20
UW
79962011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7997
7998 * configure.ac: Check support for personality routine.
7999 * configure: Regenerate.
8000 * config.in: Likewise.
8001 * linux-low.c: Include <sys/personality.h>.
8002 Define ADDR_NO_RANDOMIZE if necessary.
8003 (linux_create_inferior): Disable address space randomization when
8004 forking inferior, if requested.
8005 (linux_supports_disable_randomization): New function.
8006 (linux_target_ops): Install it.
8007 * server.h (disable_randomization): Declare.
8008 * server.c (disable_randomization): New global variable.
8009 (handle_general_set): Handle QDisableRandomization.
8010 (handle_query): Likewise for qSupported.
8011 (main): Support --disable-randomization and --no-disable-randomization
8012 command line arguments.
8013 * target.h (struct target_ops): Add supports_disable_randomization.
8014 (target_supports_disable_randomization): New macro.
8015
723b724b
MF
80162011-09-29 Mike Frysinger <vapier@gentoo.org>
8017
8018 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8019 ifdef check.
8020 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8021 [!PT_GETDSBT] (target_loadmap): New definition.
8022 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8023 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8024 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8025 and PT_GETDSBT to LINUX_LOADMAP.
8026 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8027 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8028
55329a5c 80292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8030
8031 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8032 (arm_linux_hwbp_cap): New static variable.
8033 (arm_linux_get_hwbp_cap): Replace by ...
8034 (arm_linux_init_hwbp_cap): ... this new function.
8035 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8036 (arm_linux_get_hw_watchpoint_count): Likewise.
8037 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8038 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8039 (arm_prepare_to_resume): Use perror_with_name instead of error.
8040
55329a5c 80412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8042
8043 * linux-arm-low.c: Include <signal.h>.
8044 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8045 (struct arm_linux_hwbp_cap): New data type.
8046 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8047 (struct arm_linux_hw_breakpoint): New data type.
8048 (MAX_BPTS, MAX_WPTS): Define.
8049 (struct arch_process_info, struct arch_lwp_info): New data types.
8050 (arm_linux_get_hwbp_cap): New function.
8051 (arm_linux_get_hw_breakpoint_count): Likewise.
8052 (arm_linux_get_hw_watchpoint_count): Likewise.
8053 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8054 (arm_hwbp_control_initialize): Likewise.
8055 (arm_hwbp_control_is_enabled): Likewise.
8056 (arm_hwbp_control_is_initialized): Likewise.
8057 (arm_hwbp_control_disable): Likewise.
8058 (arm_linux_hw_breakpoint_equal): Likewise.
8059 (arm_linux_hw_point_initialize): Likewise.
8060 (struct update_registers_data): New data structure.
8061 (update_registers_callback: New function.
8062 (arm_insert_point): Likewise.
8063 (arm_remove_point): Likewise.
8064 (arm_stopped_by_watchpoint): Likewise.
8065 (arm_stopped_data_address): Likewise.
8066 (arm_new_process): Likewise.
8067 (arm_new_thread): Likewise.
8068 (arm_prepare_to_resume): Likewise.
8069 (the_low_target): Register arm_insert_point, arm_remove_point,
8070 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8071 arm_new_thread, and arm_prepare_to_resume.
8072
6b9801d4
SS
80732011-09-15 Stan Shebs <stan@codesourcery.com>
8074
8075 * server.h (struct emit_ops): Add compare-goto fields.
8076 * tracepoint.c (gdb_agent_op_sizes): New table.
8077 (emit_eq_goto): New function.
8078 (emit_ne_goto): New function.
8079 (emit_lt_goto): New function.
8080 (emit_le_goto): New function.
8081 (emit_gt_goto): New function.
8082 (emit_ge_goto): New function.
8083 (is_goto_target): New function.
8084 (compile_bytecodes): Recognize special cases of compare-goto
8085 combinations and call specialized emitters for them.
8086 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8087 (amd64_emit_ne_goto): New function.
8088 (amd64_emit_lt_goto): New function.
8089 (amd64_emit_le_goto): New function.
8090 (amd64_emit_gt_goto): New function.
8091 (amd64_emit_ge_goto): New function.
8092 (amd64_emit_ops): Add the new functions.
8093 (i386_emit_eq_goto): New function.
8094 (i386_emit_ne_goto): New function.
8095 (i386_emit_lt_goto): New function.
8096 (i386_emit_le_goto): New function.
8097 (i386_emit_gt_goto): New function.
8098 (i386_emit_ge_goto): New function.
8099 (i386_emit_ops): Add the new functions.
8100
bf15cbda
SS
81012011-09-08 Stan Shebs <stan@codesourcery.com>
8102
8103 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8104 (i386_emit_epilogue): Restore %ebx.
8105
943ca1dd
JZ
81062011-08-31 Jie Zhang <jzhang918@gmail.com>
8107
8108 * server.c (step_thread): Remove definition.
8109 (process_serial_event): Don't handle Hs.
8110 * server.h (step_thread): Remove declaration.
8111 * target.c (set_desired_inferior): Remove use of step_thread.
8112
e3deef73
LM
81132011-08-24 Luis Machado <lgustavo@codesourcery.com>
8114
8115 * linux-low.c: Include linux-procfs.h.
8116 (linux_attach_lwp_1): Update comments.
8117 (linux_attach): Scan for existing threads when attaching to a
8118 process that is the tgid.
8119 * Makefile.in: Update dependencies.
8120
13da1c97
LM
81212011-08-24 Luis Machado <lgustavo@codesourcery.com>
8122
8123 * configure.srv: Add linux-procfs.o dependencies.
8124
881127c9
YQ
81252011-08-14 Yao Qi <yao@codesourcery.com>
8126
8127 * target.h (struct target_ops): Fix indent.
8128 * win32-low.c (win32_target_ops): Fix comment.
8129
58dbd541
YQ
81302011-08-14 Andrew Jenner <andrew@codesourcery.com>
8131 Yao Qi <yao@codesourcery.com>
8132
8133 * Makefile.in (clean): Remove tic6x-*.c files.
8134 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8135 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8136 (tic6x-c64xp-linux.c): Likewise.
8137 * configure.srv: Add support for tic6x-*-uclinux.
8138 * linux-tic6x-low.c: New.
8139 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8140
78d85199
YQ
81412011-08-14 Andrew Stubbs <ams@codesourcery.com>
8142 Yao Qi <yao@codesourcery.com>
8143
8144 * target.h (struct target_ops): Add read_loadmap.
8145 * linux-low.c (struct target_loadseg): New type.
8146 (struct target_loadmap): New type.
8147 (linux_read_loadmap): New function.
8148 (linux_target_ops): Add linux_read_loadmap.
8149 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8150 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8151 to NULL.
78d85199 8152
a959a88d
EZ
81532011-08-05 Eli Zaretskii <eliz@gnu.org>
8154
8155 * win32-low.c: Include <stdint.h>.
8156
1ced966e
PA
81572011-07-22 Pedro Alves <pedro@codesourcery.com>
8158
8159 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8160 to the inferior here.
8161 (i386_remove_aligned_watchpoint): Ditto.
8162 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8163 fit part of the watchpoint in the debug registers.
8164 (i386_update_inferior_debug_regs): New.
8165 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8166 registers, and only update the inferior on success.
8167 (i386_low_remove_watchpoint): Ditto.
8168
d26e3629
KY
81692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8170
8171 * linux-low.c (compare_ints, unique, list_threads, show_process,
8172 linux_core_of_thread): Delete.
8173 (linux_target_ops): Change linux_core_of_thread to
8174 linux_common_core_of_thread.
8175 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8176 * utils.c (malloc_failure): Change type of argument.
8177 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8178 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8179 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8180 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8181 (IPA_OBJS): Add common-utils-ipa.o.
8182 (ptid_h, linux_osdata_h): New macros.
8183 (server_h): Add common/common-utils.h, common/xml-utils.h,
8184 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8185 common/ptid.h.
8186 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8187 ptid.o, buffer.o): New rules.
8188 (linux-low.o): Add common/linux-osdata.h as a dependency.
8189 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8190 * configure.ac: Add AC_HEADER_DIRENT check.
8191 * config.in: Regenerate.
8192 * configure: Regenerate.
8193 * remote-utils.c (xml_escape_text): Delete.
8194 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8195 buffer_xml_printf): Move to common/buffer.c.
8196 * server.c (main): Remove call to initialize_inferiors.
8197 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8198 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8199 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8200 internal_error, gdb_assert, gdb_assert_fail): Delete.
8201 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8202 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8203 common/buffer.h.
8204 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8205 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8206 initialize_inferiors): Delete.
8207
2275a1a7
PA
82082011-07-20 Pedro Alves <pedro@codesourcery.com>
8209
8210 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8211 symbol error.
8212
0a5b1e09
PA
82132011-05-31 Pedro Alves <pedro@codesourcery.com>
8214
8215 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8216 assertion.
8217 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8218
6938fd34
YQ
82192011-05-26 Yao Qi <yao@codesourcery.com>
8220
8221 * Makefile.in (thread-db.o): Track dependence to
8222 common/gdb_thread_db.h.
8223 * thread-db.c: include gdb_thread_db.h from right place.
8224
b481f9e0
TT
82252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8226
8227 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8228 __FILE__ and __LINE__ to internal_error.
8229
98a5dd13
DE
82302011-05-13 Doug Evans <dje@google.com>
8231
8232 * thread-db.c (try_thread_db_load_from_sdir): New function.
8233 (try_thread_db_load_from_dir): New function.
8234 (thread_db_load_search): Handle $sdir, ignore $pdir.
8235 Remove trying of system directories if search of
8236 libthread-db-search-path fails, that is now done via $sdir.
8237
d248b706
KY
82382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8239
8240 * server.c (handle_query): Add EnableDisableTracepoints to the list
8241 of supported features.
43aaf8b6 8242 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8243 tracepoints.
43aaf8b6
PA
8244 (cmd_qtenable_disable): New.
8245 (cmd_qtstart): Install tracepoints even if disabled.
8246 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8247 receiving a QTEnable or QTDisable packet.
8248 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8249 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8250 tracepoints.
8251 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8252
84e578fb
DE
82532011-05-10 Doug Evans <dje@google.com>
8254
8255 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8256
71f55dd8
DE
82572011-05-04 Doug Evans <dje@google.com>
8258
8259 * linux-low.c (linux_join): Skip process lookup.
8260 * spu-low.c (spu_join): Ditto.
8261 * server.c (join_inferiors_callback): Delete.
8262 (process_serial_event): For 'D' packet (detach) call join_inferior
8263 directly.
8264
4d393d60
JM
82652011-05-04 Joseph Myers <joseph@codesourcery.com>
8266
8267 * README: Don't mention xscale*-*-linux*.
8268 * configure.srv (xscale*-*-linux*): Don't handle target.
8269
b00ad6ff
NF
82702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8271
8272 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8273 casting pointers.
8274 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8275 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8276 (i386_emit_void_call_2): Likewise.
8277
af96c192
YQ
82782011-04-26 Yao Qi <yao@codesourcery.com>
8279
43aaf8b6
PA
8280 * linux-low.c: Move common macros to linux-ptrace.h.
8281 Include linux-ptrace.h.
af96c192
YQ
8282 * Makefile.in (linux_ptrace_h): New.
8283 (linux-low.o): Depends on linux-ptrace.h.
8284
03f2bd59
JK
82852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8286
8287 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8288 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8289 (remote_prepare): New function with most of the TCP code from ...
8290 (remote_open): ... here. Detect PORT here unconditionally. Move also
8291 setting transport_is_reliable.
8292 * server.c (run_once): New variable.
8293 (gdbserver_usage): Document it.
8294 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8295 the first run if RUN_ONCE.
8296 * server.h (run_once, remote_prepare): New declarations.
8297
7a9dd1b2
TT
82982011-04-19 Tom Tromey <tromey@redhat.com>
8299
8300 * win32-low.c (handle_load_dll): Remove duplicate "the".
8301
81239425
PM
83022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8303
8304 Remove support for old Cygwin 1.5 versions.
8305 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8306 function to avoid warning.
8307 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8308 warning.
8309
9e0627f1
PM
83102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8311
8312 * gdbserver/server.h (Macro _): Define it if not available.
8313
588eebee
MS
83142011-03-14 Michael Snyder <msnyder@vmware.com>
8315
348af9f7 8316 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8317
43f70d4c
JB
83182011-03-10 Joel Brobecker <brobecker@adacore.com>
8319
8320 * Makefile.in (maintainer-clean realclean distclean): Remove
8321 "make ... subdir_do" command.
8322
348af9f7
MS
83232011-03-10 Michael Snyder <msnyder@vmware.com>
8324
8325 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8326
8327 * server.c (handle_v_run): Free alloced buffer on early return.
8328
e637a4f5
YQ
83292011-03-09 Yao Qi <yao@codesourcery.com>
8330
8331 Revert:
8332 2011-03-04 Yao Qi <yao@codesourcery.com>
8333
8334 * Makefile.in: Remove GNU make feature --directory.
8335
8336 2011-03-05 Yao Qi <yao@codesourcery.com>
8337
8338 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8339 (subdir_do): New make target. Copied from gdb/Makefile.
8340 (maintainer-clean, realclean, distclean, clean): Call corresponding
8341 make targets in common/Makefile.
8342
8343 2011-02-11 Yao Qi <yao@codesourcery.com>
8344
8345 * configure.ac: Call AC_PROG_RANLIB.
8346 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8347 * configure: Regenerate.
8348
e6edda56
JK
83492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8350
8351 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8352
e5141119
JB
83532011-03-06 Yao Qi <yao@codesourcery.com>
8354
8355 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8356
64794aa4
JB
83572011-03-05 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8360 (subdir_do): New make target. Copied from gdb/Makefile.
8361 (maintainer-clean, realclean, distclean, clean): Call corresponding
8362 make targets in common/Makefile.
8363
7a762829
YQ
83642011-03-04 Yao Qi <yao@codesourcery.com>
8365
8366 * Makefile.in: Remove GNU make feature --directory.
8367
348af9f7
MS
83682011-03-04 Michael Snyder <msnyder@vmware.com>
8369
8370 * server.c (queue_stop_reply): Call xmalloc not malloc.
8371
83722011-03-02 Michael Snyder <msnyder@vmware.com>
8373
8374 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8375
9f72fee2
MS
83762011-02-28 Michael Snyder <msnyder@vmware.com>
8377
588eebee
MS
8378 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8379 (cmd_qtframe): Ditto.
8380 (cmd_qtbuffer): Ditto.
8381 (cmd_bigqtbuffer): Ditto.
8382
9f72fee2
MS
8383 * utils.c (decimal2str): Initialize 'width' to nine, then
8384 don't mess with it.
8385
8040bd49
UW
83862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8387
8388 * hostio.c (require_data): Free *data, not data.
8389
7e52cbd0
JK
83902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8391
8392 * hostio.c (require_data): Use free, not xfree.
8393
9130f83e
MS
83942011-02-27 Michael Snyder <msnyder@vmware.com>
8395
4b812f4e
MS
8396 * server.c (handle_query): Discard unused value.
8397
9130f83e
MS
8398 * hostio.c (require_data): Free malloc memory before returning
8399 error.
8400
69d37113
MS
84012011-02-26 Michael Snyder <msnyder@vmware.com>
8402
8403 * linux-low.c (list_threads): Call closedir for dirent.
8404
35f5825a
MS
84052011-02-27 Michael Snyder <msnyder@vmware.com>
8406
2a589cef
MS
8407 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8408 a case statement falls through.
8409
0adea5f7
MS
8410 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8411
35f5825a
MS
8412 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8413 in comparison.
8414
238f1c74
MS
84152011-02-26 Michael Snyder <msnyder@vmware.com>
8416
8417 * utils.c (decimal2str): Eliminate dead code and dead param.
8418 (pulongest): Drop dead param from call to decimal2str.
8419 (plongest): Ditto.
8420
633ff500
JB
84212011-02-24 Joel Brobecker <brobecker@adacore.com>
8422
8423 Revert the following patch (not approved yet):
8424 2011-02-21 Hui Zhu <teawater@gmail.com>
8425 * tracepoint.c (tp_printf): New function.
8426 (eval_agent_expr): Handle gdb_agent_op_printf.
8427
f9c6ff72
HZ
84282011-02-21 Hui Zhu <teawater@gmail.com>
8429
8430 * tracepoint.c (tp_printf): New function.
8431 (eval_agent_expr): Handle gdb_agent_op_printf.
8432
94d5e490
TT
84332011-02-18 Tom Tromey <tromey@redhat.com>
8434
8435 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8436 (tracepoint.o): Likewise.
8437 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8438 (gdb_agent_op_names): Likewise.
8439
c7f96d2b
TT
84402011-02-18 Tom Tromey <tromey@redhat.com>
8441
8442 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8443 gdb_agent_op_rot>: New constants.
8444 (gdb_agent_op_names): Add pick and roll.
8445 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8446 cases.
8447
0feedb2c
JK
84482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8449
8450 * aclocal.m4: Regenerated with aclocal-1.11.1.
8451
b3b9301e
PA
84522011-02-14 Pedro Alves <pedro@codesourcery.com>
8453
8454 * server.c (handle_qxfer_traceframe_info): New.
8455 (qxfer_packets): Register "traceframe-info".
8456 (handle_query): Report support for qXfer:traceframe-info:read+.
8457 * tracepoint.c (match_blocktype): New.
8458 (traceframe_find_block_type): Rename to ...
8459 (traceframe_walk_blocks): ... this. Add callback filter argument,
8460 and use it.
8461 (traceframe_find_block_type): New, reimplemented on top of
8462 traceframe_walk_blocks.
8463 (build_traceframe_info_xml): New.
8464 (traceframe_read_info): New.
8465 * server.h (traceframe_read_info): Declare.
8466
4f3e6fb7
YQ
84672011-02-11 Yao Qi <yao@codesourcery.com>
8468
8469 * configure.ac: Call AC_PROG_RANLIB.
8470 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8471 * configure: Regenerate.
8472
764880b7
PA
84732011-02-07 Pedro Alves <pedro@codesourcery.com>
8474
8475 * server.c (gdb_read_memory): Change return semantics to allow
8476 partial transfers.
8477 (handle_search_memory_1): Adjust.
8478 (process_serial_event) <'m' packet>: Handle partial transfers.
8479 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8480
1c79eb8a
PA
84812011-01-28 Pedro Alves <pedro@codesourcery.com>
8482
8483 * regcache.c (init_register_cache): Initialize
8484 regcache->register_status.
8485 (free_register_cache): Release regcache->register_status.
8486 (regcache_cpy): Copy register_status.
8487 (registers_to_string): Print 'x's for unavailable registers.
8488 (supply_register): Mark the register's status valid or
8489 unavailable, depending on whether a buffer was passed in or not.
8490 (supply_register_zeroed): New.
8491 (supply_regblock): Mark the registers' status valid or
8492 unavailable, depending on whether a buffer was passed in or not.
8493 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8494 (struct regcache): New `register_status' field.
8495 (supply_register_zeroed): Declare.
8496 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8497 supply_register_zeroed, rather than passing a NULL buffer to
8498 supply_register.
8499 * tracepoint.c (fetch_traceframe_registers): Update comment.
8500
85724a0e
PA
85012011-01-28 Pedro Alves <pedro@codesourcery.com>
8502
8503 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8504 buffer explicit.
8505
d08aafef
PA
85062011-01-25 Pedro Alves <pedro@codesourcery.com>
8507
8508 * server.h (decode_xfer_write): Change prototype.
8509 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8510 and don't extract the annex here.
8511 * server.c (decode_xfer_read): Remove `annex' parameter,
8512 and don't extract the annex here.
8513 (decode_xfer): New.
8514 (struct qxfer): New.
8515 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8516 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8517 (handle_qxfer_statictrace): New functions, abstracted out from
8518 handle_query, and made to use the struct qxfer interface.
8519 (handle_threads_qxfer_proper): Rename to ...
8520 (handle_qxfer_threads_proper): ... this.
8521 (handle_threads_qxfer): Rename to ...
8522 (handle_qxfer_threads): ... this. Adjust.
8523 (qxfer_packets): New array.
8524 (handle_qxfer): New function.
8525 (handle_query): Use handle_qxfer.
8526
493e2a69
MS
85272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8528
8529 * gdbreplay.c: Shorten lines of >= 80 columns.
8530 * linux-low.c: Ditto.
8531 * linux-ppc-low.c: Ditto.
8532 * linux-s390-low.c: Ditto.
8533 * linux-sparc-low.c: Ditto.
8534 * linux-x86-low.c: Ditto.
8535 * linux-xtensa-low.c: Ditto.
8536 * mem-break.c: Ditto.
8537 * nto-low.c: Ditto.
8538 * regcache.h: Ditto.
8539 * remote-utils.c: Ditto.
8540 * server.c: Ditto.
8541 * server.h: Ditto.
8542 * thread-db.c: Ditto.
8543 * tracepoint.c: Ditto.
8544 * utils.c: Ditto.
8545 * win32-low.h: Ditto.
8546
44944448
JB
85472011-01-05 Joel Brobecker <brobecker@adacore.com>
8548
8549 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8550 update.
8551
71ce852c
JB
85522011-01-01 Joel Brobecker <brobecker@adacore.com>
8553
8554 * server.c (gdbserver_version): Update copyright year in version
8555 output.
8556 * gdbreplay.c (gdbreplay_version): Ditto.
8557
eb826dc6
MF
85582010-12-29 Jie Zhang <jie.zhang@analog.com>
8559
8560 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8561 * linux-bfin-low.c: New file.
8562 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8563 PT_DATA_ADDR for BFIN targets.
8564 * Makefile.in (SFILES): Add linux-bfin-low.c.
8565 (clean): Remove reg-bfin.c.
8566 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8567 * README: Mention supported Blackfin targets.
8568
39ab222a
MF
85692010-12-23 Mike Frysinger <vapier@gentoo.org>
8570
8571 * .gitignore: New file.
8572
a1f2ce7d
MF
85732010-11-16 Mike Frysinger <vapier@gentoo.org>
8574
8575 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8576
f474844c
JZ
85772010-10-22 Jie Zhang <jie@codesourcery.com>
8578
8579 * Makefile.in: Add FLAGS_TO_PASS variable.
8580 (install): Remove dependency of install-only and recursively
8581 invoke make for install-only.
8582
f1048712
DE
85832010-10-04 Doug Evans <dje@google.com>
8584
8585 * Makefile.in (uninstall): Use $(DESTDIR).
8586
b53a1623
PA
85872010-09-24 Pedro Alves <pedro@codesourcery.com>
8588
e6ee044d
PA
8589 PR gdb/11842
8590
b53a1623
PA
8591 * linux-x86-low.c (compat_siginfo_from_siginfo)
8592 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8593 si_code is < 0. Check for si_code == SI_TIMER before checking for
8594 si_code < 0.
8595
fa1bd1e4
JB
85962010-09-13 Joel Brobecker <brobecker@adacore.com>
8597
8598 * lynx-i386-low.c: New file.
8599 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8600
47fac8f8
JB
86012010-09-13 Joel Brobecker <brobecker@adacore.com>
8602
8603 * lynx-low.c (ptrace_request_to_str): Remove handling for
8604 request values that have been removed in LynxOS 5.x.
8605
1adfc54d
JB
86062010-09-13 Joel Brobecker <brobecker@adacore.com>
8607
8608 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8609 <ptrace.h>
8610
c2a66c29
NS
86112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8612
8613 * configure.ac: Add --enable-inprocess-agent option.
8614 * configure: Rebuilt.
8615
32fcada3
YQ
86162010-09-06 Yao Qi <yao@codesourcery.com>
8617
8618 * linux-low.c (linux_kill): Remove unused variable.
8619 (linux_stabilize_threads): Likewise.
8620 * server.c (start_inferior): Likewise.
8621 (queue_stop_reply_callback): Likewise.
8622 * tracepoint.c (do_action_at_tracepoint): Likewise.
8623
0cccb683
YQ
86242010-09-06 Yao Qi <yao@codesourcery.com>
8625
8626 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8627 on return.
8628
423ec54c
JK
86292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8630
8631 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8632
12ac6819
PA
86332010-09-06 Pedro Alves <pedro@codesourcery.com>
8634
8635 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8636 "$(IPA_DEPFILES)".
8637
8ed54b31
JB
86382010-09-01 Joel Brobecker <brobecker@adacore.com>
8639
8640 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8641 gdbserver/lynx-ppc-low.c: New files.
8642 * Makefile.in (lynx_low_h): New variable.
8643 (lynx-low.o, lynx-ppc-low.o): New rules.
8644 * configure.ac: On LynxOS, link with -lnetinet.
8645 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8646 * configure: regenerate.
8647
bb0116a4
JB
86482010-09-01 Joel Brobecker <brobecker@adacore.com>
8649
8650 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8651 * configure.ac: Add check for vasprintf and vsnprintf.
8652 * configure, config.in: Regenerate.
8653 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8654
a778ab81 86552010-09-01 Joel Brobecker <brobecker@adacore.com>
8656
8657 * gdbreplay.c: Move include of alloca.h up, next to include of
8658 malloc.h.
8659 * server.h: Add include of malloc.h.
8660 * mem-break.c: Remove include of malloc.h.
8661 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8662
8b034a19 86632010-09-01 Joel Brobecker <brobecker@adacore.com>
8664
8665 * Makefile.in (memmem.o): Build with -Wno-error.
8666
86672010-09-01 Joel Brobecker <brobecker@adacore.com>
8668
8669 * utils.c (xsnprintf): Make non-static.
8670 * server.h: Add xsnprintf declaration.
8671 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8672 replace calls to snprintf by calls to xsnprintf throughout.
8673
86742010-09-01 Joel Brobecker <brobecker@adacore.com>
8675
8676 * configure.ac: Add configure check for alloca.
8677 * configure, config.in: Regenerate.
8678 * server.h: Include alloca.h if it exists.
8679 * gdbreplay.c: Include alloca.h if it exists.
8680
1a981360
PA
86812010-08-28 Pedro Alves <pedro@codesourcery.com>
8682
8683 * linux-low.c (__SIGRTMIN): Define if not already defined.
8684 (linux_create_inferior): Check for __ANDROID__ rather than
8685 __SIGRTMIN.
8686 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8687 are already deferred.
8688 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8689 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8690 stopped and already has a pending signal to report.
8691 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8692 a pending signal to report or is moving out of a jump pad.
8693 (linux_init_signals): Check for __ANDROID__ rather than
8694 __SIGRTMIN.
8695
b4d51a55
PA
86962010-08-28 Pedro Alves <pedro@codesourcery.com>
8697
8698 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8699 debug_threads check. Avoid a linear search when not doing debug
8700 output.
8701
ec48365d
PA
87022010-08-27 Pedro Alves <pedro@codesourcery.com>
8703
8704 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8705 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8706 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8707 (process_event): Change local fd's type to gdb_fildes_t.
8708 (create_file_handler): Adjust prototype.
8709 (delete_file_handler): Adjust prototype.
8710 (handle_file_event): Adjust prototype. Use pfildes.
8711 (create_file_event): Adjsut prototype.
8712 * remote-utils.c (remote_desc, listen_desc): Change type to
8713 gdb_fildes_t.
8714 * server.h: New gdb_fildes_t typedef.
8715 [USE_WIN32API]: Include winsock2.h.
8716 (delete_file_handler, add_file_handler): Adjust prototypes.
8717 (pfildes): Declare.
8718 * utils.c (pfildes): New.
8719
854d88f0
PA
87202010-08-27 Pedro Alves <pedro@codesourcery.com>
8721
8722 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8723 * configure: Regenerate.
8724
0146f85b
PA
87252010-08-27 Pedro Alves <pedro@codesourcery.com>
8726
8727 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8728 (linux_done_accessing_memory): ... this.
8729 (linux_target_ops): Adjust.
8730 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8731 * nto-low.c (nto_target_ops): Adjust comment.
8732 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8733 * spu-low.c (spu_target_ops): Adjust comment.
8734 * target.h (target_ops): Rename unprepare_to_access_memory field
8735 to done_accessing_memory.
8736 (unprepare_to_access_memory): Rename to ...
8737 (done_accessing_memory): ... this.
8738
90d74c30
PA
87392010-08-26 Pedro Alves <pedro@codesourcery.com>
8740
8741 * linux-low.c (linux_prepare_to_access_memory): New.
8742 (linux_unprepare_to_access_memory): New.
8743 (linux_target_ops): Install them.
8744 * server.c (read_memory): Rename to ...
8745 (gdb_read_memory): ... this. Use
8746 prepare_to_access_memory/prepare_to_access_memory.
8747 (write_memory): Rename to ...
8748 (gdb_write_memory): ... this. Use
8749 prepare_to_access_memory/prepare_to_access_memory.
8750 (handle_search_memory_1): Adjust.
8751 (process_serial_event): Adjust.
8752 * target.h (struct target_ops): New fields
8753 prepare_to_access_memory and unprepare_to_access_memory.
8754 (prepare_to_access_memory, unprepare_to_access_memory): New.
8755 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8756 prepare_to_access_memory/prepare_to_access_memory.
8757 * nto-low.c (nto_target_ops): Adjust.
8758 * spu-low.c (spu_target_ops): Adjust.
8759 * win32-low.c (win32_target_ops): Adjust.
8760
fd467969
PA
87612010-08-26 Pedro Alves <pedro@codesourcery.com>
8762
8763 * Makefile.in (WARN_CFLAGS): Get it from configure.
8764 (WERROR_CFLAGS): New.
8765 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8766 * configure.ac: Introduce --enable-werror, which adds -Werror to
8767 the compiler command line. Enabled by default. Disable with
8768 --disable-werror. Add -Wdeclaration-after-statement
8769 Wpointer-arith and -Wformat-nonliteral to warning flags.
8770 * configure: Regenerate.
8771
331e2f5f
PA
87722010-08-26 Pedro Alves <pedro@codesourcery.com>
8773
8774 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8775
e581f2b4
PA
87762010-08-26 Pedro Alves <pedro@codesourcery.com>
8777
8778 * gdbreplay.c (remote_error): New.
8779 (gdbchar): New.
8780 (expect): Use gdbchar. Check for error reading from GDB.
8781 Clarify sync error output.
8782 (play): Check for errors writing to GDB.
8783 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8784 * remote-utils.c (getpkt): Check for errors writing to the remote
8785 descriptor.
8786
3c11dd79
PA
87872010-08-25 Pedro Alves <pedro@codesourcery.com>
8788
8789 * linux-low.c (linux_wait_1): Move non-debugging code out of
8790 `debug_threads' control.
8791
d20a8ad9
PA
87922010-08-25 Pedro Alves <pedro@codesourcery.com>
8793
8794 * linux-low.c (linux_wait_1): Don't set last_status here.
8795 * server.c (push_event, queue_stop_reply_callback): Assert we're
8796 not pushing a TARGET_WAITKIND_IGNORE event.
8797 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8798 (myresume, handle_target_event): Set the thread's last_resume_kind
8799 and last_status from the target returned status.
8800
964e4306
PA
88012010-08-25 Pedro Alves <pedro@codesourcery.com>
8802
8803 PR threads/10729
8804
8805 * linux-x86-low.c (update_debug_registers_callback): New.
8806 (i386_dr_low_set_addr): Use it.
8807 (i386_dr_low_get_addr): New.
8808 (i386_dr_low_set_control): Use update_debug_registers_callback.
8809 (i386_dr_low_get_control): New.
8810 (i386_dr_low_get_status): Adjust.
8811 * linux-low.c (linux_stop_lwp): New.
8812 * linux-low.h (linux_stop_lwp): Declare.
8813
8814 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8815 argument instead of a i386_debug_reg_state.
8816 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8817 a i386_debug_reg_state.
8818 (i386_insert_aligned_watchpoint): Adjust.
8819 (i386_remove_aligned_watchpoint): Adjust.
8820 (i386_low_stopped_data_address): Read the debug registers from the
8821 inferior instead of from the mirrors.
8822 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8823 (i386_dr_low_get_addr): Declare.
8824 (i386_dr_low_get_control): Declare.
8825 (i386_dr_low_get_status): Change prototype.
8826
8827 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8828 (i386_dr_low_get_addr): New.
8829 (i386_dr_low_get_control): New.
8830 (i386_dr_low_get_status): Adjust prototype. Return
8831 dr_status_mirror.
8832 (i386_initial_stuff): Clear dr_status_mirror and
8833 dr_control_mirror.
8834 (i386_get_thread_context): Adjust.
8835 (i386_set_thread_context): Adjust.
8836 (i386_thread_added): Adjust.
8837
5f21a75b
PA
88382010-08-24 Pedro Alves <pedro@codesourcery.com>
8839
8840 * linux-low.h (linux_thread_area): Delete declaration.
8841
3e4c1235
TS
88422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8843
8844 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8845 after its termination.
8846
1971b033
PA
88472010-08-09 Pedro Alves <pedro@codesourcery.com>
8848
8849 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8850 (gdb_wants_all_stopped): Delete.
8851 (linux_wait_1): Don't call them.
8852 * server.c (handle_v_cont): Tag all threads as want-stopped.
8853 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8854 stopped as "client-wants-stopped".
8855
310444ac
PA
88562010-07-31 Pedro Alves <pedro@codesourcery.com>
8857
8858 * Makefile.in (signals_h): New.
8859 (server_h): Depend on it.
8860 (server.o): Don't depend on $(signals_def).
8861 (signals.o): Depend on $(signals_def).
8862
a19cae16
JK
88632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8864
8865 * Makefile.in (signals_def): New.
8866 (server_h): Append include/gdb/signals.h and signals_def.
8867 (server.o): Append signals_def.
8868
30d50328
JK
88692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8870
8871 * server.c (handle_target_event): Use target_signal_to_host for
8872 resume_info.sig initialization.
8873 * target.h (struct thread_resume) <sig>: New comment.
8874
5c3216e2
OS
88752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8876
c6f46ca0
OS
8877 * server.c (handle_query): strcpy() the returned string from paddress()
8878 instead of sprintf().
5c3216e2
OS
8879 * utils.c (paddress): Return phex_nz().
8880
6bd31874
JB
88812010-07-07 Joel Brobecker <brobecker@adacore.com>
8882
8883 * server.c (handle_v_cont): Call mourn_inferior if process
8884 just exited.
8885 (myresume): Likewise.
8886
0fb4aa4b
PA
88872010-07-01 Pedro Alves <pedro@codesourcery.com>
8888
8889 Static tracepoints, and integration with UST.
8890
8891 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8892 * mem-break.c (uninsert_all_breakpoints)
8893 (reinsert_all_breakpoints): New.
8894 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8895 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8896 (gdb_agent_ust_loaded, helper_thread_id)
8897 (gdb_agent_helper_thread_id): New macros.
8898 (struct ipa_sym_addresses): Add addr_ust_loaded,
8899 addr_helper_thread_id, addr_cmd_buf.
8900 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8901 (in_process_agent_loaded_ust): New.
8902 (write_e_ust_not_loaded): New.
8903 (maybe_write_ipa_ust_not_loaded): New.
8904 (struct collect_static_trace_data_action): New.
8905 (enum tracepoint_type) <static_tracepoint>: New.
8906 (struct tracepoint) <handle>: Mention static tracepoints.
8907 (struct static_tracepoint_ctx): New.
8908 (CMD_BUF_SIZE): New.
8909 (add_tracepoint_action): Handle static tracepoint actions.
8910 (unprobe_marker_at): New.
8911 (clear_installed_tracepoints): Handle static tracepoints.
8912 (cmd_qtdp): Handle static tracepoints.
8913 (probe_marker_at): New.
8914 (cmd_qtstart): Handle static tracepoints.
8915 (response_tracepoint): Handle static tracepoints.
8916 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8917 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8918 (get_context_regcache): Handle static tracepoints.
8919 (do_action_at_tracepoint): Handle static tracepoint actions.
8920 (traceframe_find_block_type): Handle static trace data blocks.
8921 (traceframe_read_sdata): New.
8922 (download_tracepoints): Download static tracepoint actions.
8923 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8924 (GDB_PROBE_NAME): New.
8925 (ust_ops): New.
8926 (GET_UST_SYM): New.
8927 (USTF): New.
8928 (dlsym_ust): New.
8929 (ust_marker_to_static_tracepoint): New.
8930 (gdb_probe): New.
8931 (collect_ust_data_at_tracepoint): New.
8932 (gdb_ust_probe): New.
8933 (UNIX_PATH_MAX, SOCK_DIR): New.
8934 (gdb_ust_connect_sync_socket): New.
8935 (resume_thread, stop_thread): New.
8936 (run_inferior_command): New.
8937 (init_named_socket): New.
8938 (gdb_ust_socket_init): New.
8939 (cstr_to_hexstr): New.
8940 (next_st): New.
8941 (first_marker, next_marker): New.
8942 (response_ust_marker): New.
8943 (cmd_qtfstm, cmd_qtsstm): New.
8944 (unprobe_marker_at, probe_marker_at): New.
8945 (cmd_qtstmat, gdb_ust_thread): New.
8946 (gdb_ust_init): New.
8947 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8948 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8949 (ST_REGENTRY): New.
8950 (x86_64_st_collect_regmap): New.
8951 (X86_64_NUM_ST_COLLECT_GREGS): New.
8952 (AMD64_RIP_REGNUM): New.
8953 (supply_static_tracepoint_registers): New.
8954 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8955 (ST_REGENTRY): New.
8956 (i386_st_collect_regmap): New.
8957 (i386_NUM_ST_COLLECT_GREGS): New.
8958 (supply_static_tracepoint_registers): New.
8959 * server.c (handle_query): Handle qXfer:statictrace:read.
8960 <qSupported>: Report support for StaticTracepoints, and
8961 qXfer:statictrace:read features.
8962 * server.h (traceframe_read_sdata)
8963 (supply_static_tracepoint_registers): Declare.
8964 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8965 (unpack_varlen_hex): Include in IPA build.
8966 * Makefile.in (ustlibs, ustinc): New.
8967 (IPA_OBJS): Add remote-utils-ipa.o.
8968 ($(IPA_LIB)): Link -ldl and -lpthread.
8969 (UST_CFLAGS): New.
8970 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8971 * config.in, configure: Regenerate.
8972
9e4344e5
PA
89732010-06-20 Ian Lance Taylor <iant@google.com>
8974 Pedro Alves <pedro@codesourcery.com>
8975
8976 * linux-x86-low.c (always_true): Delete.
8977 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8978 trying to fool the compiler with always_true.
8979
c6beb2cb
PA
89802010-06-20 Pedro Alves <pedro@codesourcery.com>
8981
8982 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8983 conditions in gdbserver.
8984
d2ed6730
UW
89852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8986
8987 * spu-low.c (spu_read_memory): Wrap around local store limit.
8988 (spu_write_memory): Likewise.
8989
4e29fb54
PA
89902010-06-15 Pedro Alves <pedro@codesourcery.com>
8991
8992 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8993 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8994 LONGEST uses.
8995 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8996 uses.
8997 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8998 uses with LONGEST uses.
8999
6a271cae
PA
90002010-06-14 Stan Shebs <stan@codesourcery.com>
9001 Pedro Alves <pedro@codesourcery.com>
9002
9003 Bytecode compiler.
9004
9005 * linux-x86-low.c: Include limits.h.
9006 (add_insns): New.
9007 (always_true): New.
9008 (EMIT_ASM): New.
9009 (EMIT_ASM32): New.
9010 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9011 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9012 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9013 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9014 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9015 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9016 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9017 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9018 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9019 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9020 (amd64_emit_void_call_2): New.
9021 (amd64_emit_ops): New.
9022 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9023 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9024 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9025 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9026 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9027 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9028 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9029 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9030 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9031 (i386_emit_stack_adjust, i386_emit_int_call_1)
9032 (i386_emit_void_call_2): New.
9033 (i386_emit_ops): New.
9034 (x86_emit_ops): New.
9035 (the_low_target): Install x86_emit_ops.
9036 * server.h (struct emit_ops): New.
9037 (get_raw_reg_func_addr): Declare.
9038 (current_insn_ptr, emit_error): Declare.
9039 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9040 (set_trace_state_variable_value): New defines.
9041 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9042 addr_get_trace_state_variable_value and
9043 addr_set_trace_state_variable_value.
9044 (symbol_list): New fields for get_raw_reg,
9045 get_trace_state_variable_value and set_trace_state_variable_value.
9046 (condfn): New typedef.
9047 (struct tracepoint): New field `compiled_cond'.
9048 (do_action_at_tracepoint): Clear compiled_cond.
9049 (get_trace_state_variable_value, set_trace_state_variable_value):
9050 Export in the IPA.
9051 (condition_true_at_tracepoint): If there's a compiled condition,
9052 run that.
9053 (current_insn_ptr, emit_error): New globals.
9054 (struct bytecode_address): New.
9055 (get_raw_reg_func_addr): New.
9056 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9057 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9058 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9059 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9060 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9061 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9062 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9063 (compile_tracepoint_condition, compile_bytecodes): New.
9064 * target.h (emit_ops): Forward declare.
9065 (struct target_ops): New field emit_ops.
9066 (target_emit_ops): New.
9067 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9068 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9069 * linux-low.c (linux_emit_ops): New.
9070 (linux_target_ops): Install it.
9071 * linux-low.h (struct linux_target_ops): New field emit_ops.
9072
92b72907
UW
90732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9074
9075 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9076 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9077
fa593d66
PA
90782010-06-01 Pedro Alves <pedro@codesourcery.com>
9079 Stan Shebs <stan@codesourcery.com>
9080
9081 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9082 (all): Depend on $(extra_libraries).
9083 (install-only): Install the IPA.
9084 (IPA_OBJS, IPA_LIB): New.
9085 (clean): Remove the IPA lib.
9086 (IPAGENT_CFLAGS): New.
9087 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9088 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9089 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9090 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9091 * configure.ac: Check for atomic builtins support in the compiler.
9092 (IPA_DEPFILES, extra_libraries): Define.
9093 * configure.srv (ipa_obj): Add description.
9094 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9095 (i[34567]86-*-linux*): Set ipa_obj.
9096 (x86_64-*-linux*): Set ipa_obj.
9097 * linux-low.c (stabilizing_threads): New.
9098 (supports_fast_tracepoints): New.
9099 (linux_detach): Stabilize threads before detaching.
9100 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9101 the lwp is either not stabilizing, or is moving out of a jump pad.
9102 (linux_fast_tracepoint_collecting): New.
9103 (maybe_move_out_of_jump_pad): New.
9104 (enqueue_one_deferred_signal): New.
9105 (dequeue_one_deferred_signal): New.
9106 (linux_wait_for_event_1): If moving out of a jump pad, defer
9107 pending signals to later.
9108 (linux_stabilize_threads): New.
9109 (linux_wait_1): Check if threads need moving out of jump pads, and
9110 do it if so.
9111 (stuck_in_jump_pad_callback): New.
9112 (move_out_of_jump_pad_callback): New.
9113 (lwp_running): New.
9114 (linux_resume_one_lwp): Handle moving out of jump pads.
9115 (linux_set_resume_request): Dequeue deferred signals.
9116 (need_step_over_p): Also step over fast tracepoint jumps.
9117 (start_step_over): Also uninsert fast tracepoint jumps.
9118 (finish_step_over): Also reinsert fast tracepoint jumps.
9119 (linux_install_fast_tracepoint_jump): New.
9120 (linux_target_ops): Install linux_stabilize_threads and
9121 linux_install_fast_tracepoint_jump_pad.
9122 * linux-low.h (linux_target_ops) <get_thread_area,
9123 install_fast_tracepoint_jump_pad>: New fields.
9124 (struct lwp_info) <collecting_fast_tracepoint,
9125 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9126 (linux_get_thread_area): Declare.
9127 * linux-x86-low.c (jump_insn): New.
9128 (x86_get_thread_area): New.
9129 (append_insns): New.
9130 (push_opcode): New.
9131 (amd64_install_fast_tracepoint_jump_pad): New.
9132 (i386_install_fast_tracepoint_jump_pad): New.
9133 (x86_install_fast_tracepoint_jump_pad): New.
9134 (the_low_target): Install x86_get_thread_area and
9135 x86_install_fast_tracepoint_jump_pad.
9136 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9137 (struct fast_tracepoint_jump): New.
9138 (fast_tracepoint_jump_insn): New.
9139 (fast_tracepoint_jump_shadow): New.
9140 (find_fast_tracepoint_jump_at): New.
9141 (fast_tracepoint_jump_here): New.
9142 (delete_fast_tracepoint_jump): New.
9143 (set_fast_tracepoint_jump): New.
9144 (uninsert_fast_tracepoint_jumps_at): New.
9145 (reinsert_fast_tracepoint_jumps_at): New.
9146 (set_breakpoint_at): Use write_inferior_memory.
9147 (uninsert_raw_breakpoint): Use write_inferior_memory.
9148 (check_mem_read): Mask out fast tracepoint jumps.
9149 (check_mem_write): Mask out fast tracepoint jumps.
9150 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9151 (set_fast_tracepoint_jump): Declare.
9152 (delete_fast_tracepoint_jump)
9153 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9154 (reinsert_fast_tracepoint_jumps_at): Declare.
9155 * regcache.c: Don't compile many functions when building the
9156 in-process agent library.
9157 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9158 the register buffer in the heap.
9159 (free_register_cache): If the register buffer isn't owned by the
9160 regcache, don't free it.
9161 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9162 pre-existing register caches.
9163 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9164 type.
9165 (convert_ascii_to_int): : Constify `from' parameter type.
9166 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9167 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9168 the needed buffer in-place.
9169 (relocate_instruction): New.
9170 * server.c (handle_query) <qSymbols>: If the target supports
9171 tracepoints, give it a chance of looking up symbols. Report
9172 support for fast tracepoints.
9173 (handle_status): Stabilize threads.
9174 (process_serial_event): Adjust.
9175 * server.h (struct fast_tracepoint_jump): Forward declare.
9176 (struct process_info) <fast_tracepoint_jumps>: New field.
9177 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9178 (decode_X_packet, decode_M_packet): Adjust.
9179 (relocate_instruction): Declare.
9180 (in_process_agent_loaded): Declare.
9181 (tracepoint_look_up_symbols): Declare.
9182 (struct fast_tpoint_collect_status): Declare.
9183 (fast_tracepoint_collecting): Declare.
9184 (force_unlock_trace_buffer): Declare.
9185 (handle_tracepoint_bkpts): Declare.
9186 (initialize_low_tracepoint)
9187 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9188 * target.h (struct target_ops) <stabilize_threads,
9189 install_fast_tracepoint_jump_pad>: New fields.
9190 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9191 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9192 [HAVE_STDINT_H]: Include stdint.h.
9193 (trace_debug_1): Rename to ...
9194 (trace_vdebug): ... this.
9195 (trace_debug): Rename to ...
9196 (trace_debug_1): ... this. Add `level' parameter.
9197 (trace_debug): New.
9198 (ATTR_USED, ATTR_NOINLINE): New.
9199 (IP_AGENT_EXPORT): New.
9200 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9201 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9202 (about_to_request_buffer_space, trace_buffer_is_full)
9203 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9204 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9205 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9206 (traceframe_write_count, traceframes_created)
9207 (trace_state_variables)
9208 New renaming defines.
9209 (struct ipa_sym_addresses): New.
9210 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9211 (symbol_list): New.
9212 (ipa_sym_addrs): New.
9213 (all_tracepoint_symbols_looked_up): New.
9214 (in_process_agent_loaded): New.
9215 (write_e_ipa_not_loaded): New.
9216 (maybe_write_ipa_not_loaded): New.
9217 (tracepoint_look_up_symbols): New.
9218 (debug_threads) [IN_PROCESS_AGENT]: New.
9219 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9220 (UNKNOWN_SIDE_EFFECTS): New.
9221 (stop_tracing): New.
9222 (flush_trace_buffer): New.
9223 (stop_tracing_bkpt): New.
9224 (flush_trace_buffer_bkpt): New.
9225 (read_inferior_integer): New.
9226 (read_inferior_uinteger): New.
9227 (read_inferior_data_pointer): New.
9228 (write_inferior_data_pointer): New.
9229 (write_inferior_integer): New.
9230 (write_inferior_uinteger): New.
9231 (struct collect_static_trace_data_action): Delete.
9232 (enum tracepoint_type): New.
9233 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9234 <actions_str, step_actions, step_actions_str>: Only include in
9235 GDBserver.
fa593d66
PA
9236 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9237 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9238 (tracepoints): Use IP_AGENT_EXPORT.
9239 (last_tracepoint): Don't include in the IPA.
9240 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9241 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9242 (alloced_trace_state_variables): New.
9243 (trace_state_variables): Use IP_AGENT_EXPORT.
9244 (traceframe_t): Delete unused variable.
9245 (circular_trace_buffer): Don't include in the IPA.
9246 (trace_buffer_start): Delete.
9247 (struct trace_buffer_control): New.
9248 (trace_buffer_free): Delete.
9249 (struct ipa_trace_buffer_control): New.
9250 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9251 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9252 New.
9253 (trace_buffer_ctrl): New.
9254 (TRACE_BUFFER_CTRL_CURR): New.
9255 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9256 Reimplement as macros.
9257 (trace_buffer_wrap): Delete.
9258 (traceframe_write_count, traceframe_read_count)
9259 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9260 (struct tracepoint_hit_ctx) <type>: New field.
9261 (struct fast_tracepoint_ctx): New.
9262 (memory_barrier): New.
9263 (cmpxchg): New.
9264 (record_tracepoint_error): Update atomically in the IPA.
9265 (clear_inferior_trace_buffer): New.
9266 (about_to_request_buffer_space): New.
9267 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9268 updating the same buffer.
9269 (add_tracepoint): Default the tracepoint's type to trap
9270 tracepoint, and orig_size to -1.
9271 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9272 internal variables.
9273 (create_trace_state_variable): New parameter `gdb'. Handle it.
9274 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9275 (cmd_qtdp): Handle fast tracepoints.
9276 (cmd_qtdv): Adjust.
9277 (max_jump_pad_size): New.
9278 (gdb_jump_pad_head): New.
9279 (get_jump_space_head): New.
9280 (claim_jump_space): New.
9281 (sort_tracepoints): New.
9282 (MAX_JUMP_SIZE): New.
9283 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9284 IPA.
9285 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9286 support. Upload fast traceframes, and delete internal IPA
9287 breakpoints.
9288 (stop_tracing_handler): New.
9289 (flush_trace_buffer_handler): New.
9290 (cmd_qtstop): Upload fast tracepoints.
9291 (response_tracepoint): Handle fast tracepoints.
9292 (tracepoint_finished_step): Upload fast traceframes. Set the
9293 tracepoint hit context's tracepoint type.
9294 (handle_tracepoint_bkpts): New.
9295 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9296 type. Add comment about fast tracepoints.
9297 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9298 non-existing action_str field.
9299 (get_context_regcache): Handle fast tracepoints.
9300 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9301 to the regcache.
9302 (fast_tracepoint_from_jump_pad_address): New.
9303 (fast_tracepoint_from_ipa_tpoint_address): New.
9304 (collecting_t): New.
9305 (force_unlock_trace_buffer): New.
9306 (fast_tracepoint_collecting): New.
9307 (collecting): New.
9308 (gdb_collect): New.
9309 (write_inferior_data_ptr): New.
9310 (target_tp_heap): New.
9311 (target_malloc): New.
9312 (download_agent_expr): New.
9313 (UALIGN): New.
9314 (download_tracepoints): New.
9315 (download_trace_state_variables): New.
9316 (upload_fast_traceframes): New.
9317 (IPA_FIRST_TRACEFRAME): New.
9318 (IPA_NEXT_TRACEFRAME_1): New.
9319 (IPA_NEXT_TRACEFRAME): New.
9320 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9321 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9322 (gdb_jump_pad_buffer_end): New.
9323 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9324 (initialize_tracepoint): Adjust.
9325 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9326 buffer. Initialize the low module.
9327 * utils.c (PREFIX, TOOLNAME): New.
9328 (malloc_failure): Use PREFIX.
9329 (error): In the IPA, an error causes an exit.
9330 (fatal, warning): Use PREFIX.
9331 (internal_error): Use TOOLNAME.
9332 (NUMCELLS): Increase to 10.
9333 * configure, config.in: Regenerate.
9334
d149dd1d
PA
93352010-06-01 Pedro Alves <pedro@codesourcery.com>
9336
9337 * server.c (handle_query) <qSupported>: Do two passes over the
9338 qSupported string to avoid nesting strtok.
9339
f6528abd
JK
93402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9341
9342 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9343 (CDEPS): New.
9344 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9345 -Wl,--dynamic-list.
9346 * configure: Regenerate.
9347 * proc-service.list: New.
9348
ca2a87a0
JK
93492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9350
9351 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9352 New comment.
9353
363a6e9f
OS
93542010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9355
9356 * gdbreplay.c (remote_open): Check error return from socket() call by
9357 its equality to -1 not by it being negative.
9358 * remote-utils.c (remote_open): Likewise.
9359
d23b6cb1
PA
93602010-05-23 Pedro Alves <pedro@codesourcery.com>
9361
9362 * config.h: Regenerate.
9363
28d3cf85
MK
93642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9365
9366 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9367 doesn't provide PTRACE_GET_THREAD_AREA.
9368
fea36a59
MK
93692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9370
9371 * linux-m68k-low.c: Include <asm/ptrace.h>
9372 (ps_get_thread_area): Implement.
9373
24b066ba
DE
93742010-05-03 Doug Evans <dje@google.com>
9375
9376 * event-loop.c (struct callback_event): New struct.
9377 (callback_list): New global.
9378 (append_callback_event, delete_callback_event): New functions.
9379 (process_callback): New function.
9380 (start_event_loop): Call it.
9381 * remote-utils.c (NOT_SCHEDULED): Define.
9382 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9383 moved out of readchar.
9384 (readchar): Rewrite. Call reschedule before returning.
9385 (reset_readchar): New function.
9386 (remote_close): Call it.
9387 (process_remaining, reschedule): New functions.
9388 * server.h (callback_handler_func): New typedef.
9389 (append_callback_event, delete_callback_event): Declare.
9390
9836d6ea
PA
93912010-05-03 Pedro Alves <pedro@codesourcery.com>
9392
9393 * proc-service.c (ps_pglobal_lookup): Use
9394 thread_db_look_up_one_symbol.
9395 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9396 parameter. Use it instead of all_symbols_looked_up.
9397 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9398 field.
9399 (all_symbols_looked_up): Don't declare.
9400 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9401 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9402 field.
9403 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9404 Set all_symbols_looked_up here.
9405 (thread_db_look_up_one_symbol): New.
9406 (thread_db_get_tls_address): Adjust.
9407 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9408 thread_db object on the heap, and tentatively set it in the
9409 process structure.
9410 (thread_db_init): Don't set all_symbols_looked_up here.
9411 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9412
7984d532
PA
94132010-05-03 Pedro Alves <pedro@codesourcery.com>
9414
9415 * linux-low.c (linux_kill, linux_detach): Adjust.
9416 (status_pending_p_callback): Remove redundant statement. Check
9417 for !TARGET_WAITIKIND_IGNORE, instead of
9418 TARGET_WAITKIND_STOPPED.
9419 (handle_tracepoints): Make sure LWP is locked. Adjust.
9420 (linux_wait_for_event_1): Adjust.
9421 (linux_cancel_breakpoints): New.
9422 (unsuspend_one_lwp): New.
9423 (unsuspend_all_lwps): New.
9424 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9425 (send_sigstop_callback): Change return type to int, add new
9426 `except' parameter and handle it.
9427 (suspend_and_send_sigstop_callback): New.
9428 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9429 pass them down. If SUSPEND, also increment the lwp's suspend
9430 count.
9431 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9432 (need_step_over_p): Don't consider suspended LWPs.
9433 (start_step_over): Adjust.
9434 (proceed_one_lwp): Change return type to int, add new `except'
9435 parameter and handle it.
9436 (unsuspend_and_proceed_one_lwp): New.
9437 (proceed_all_lwps): Use find_inferior instead of
9438 for_each_inferior.
9439 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9440 also decrement the suspend count of LWPs. Pass `except' down,
9441 instead of hacking its suspend count.
9442 (linux_pause_all): Add `freeze' parameter. Adjust.
9443 (linux_unpause_all): New.
9444 (linux_target_ops): Install linux_unpause_all.
9445 * server.c (handle_status): Adjust.
9446 * target.h (struct target_ops): New fields `unpause_all' and
9447 `cancel_breakpoints'. Add new parameter to `pause_all'.
9448 (pause_all): Add new `freeze' parameter.
9449 (unpause_all): New.
9450 (cancel_breakpoints): New.
9451 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9452 cancel breakpoints.
9453 (cmd_qtstart): Pause threads.
9454 (stop_tracing): Pause threads, and cancel breakpoints.
9455 * win32-low.c (win32_target_ops): Adjust.
9456
e471f25b
PA
94572010-05-03 Pedro Alves <pedro@codesourcery.com>
9458
9459 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9460 the inferior right away from here...
9461 (linux_wait_1): ... to here, and adjust to check the thread's
9462 last_resume_kind instead of the lwp's step or stop_expected flags.
9463
1915ef4f
PA
94642010-05-02 Pedro Alves <pedro@codesourcery.com>
9465
9466 * README: Use consistent `GDB' and `GDBserver' spellings.
9467
f9e39928
PA
94682010-05-02 Pedro Alves <pedro@codesourcery.com>
9469
9470 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9471 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9472 (linux_detach_one_lwp): Assume the lwp is stopped.
9473 (any_thread_of): Delete.
9474 (linux_detach): Stop all lwps here. Don't blindly delete all
9475 breakpoints.
9476 (delete_lwp_callback): New.
9477 (linux_mourn): Delete all lwps of the process that is gone.
9478 (linux_wait_1): Don't delete the last lwp of the process here.
9479 * mem-break.h (mark_breakpoints_out): Declare.
9480 * mem-break.c (mark_breakpoints_out): New.
9481 (free_all_breakpoints): Use it.
9482 * server.c (handle_target_event): If the process is gone, mark
9483 breakpoints out.
9484 * thread-db.c (struct thread_db) <create_bp>: New field.
9485 (thread_db_enable_reporting): Fix prototype. Store a thread event
9486 breakpoint reference in the thread_db struct.
9487 (thread_db_load_search): Clear the thread_db object.
9488 (try_thread_db_load_1): Ditto.
9489 (switch_to_process): New.
9490 (disable_thread_event_reporting): Use it.
9491 (remove_thread_event_breakpoints): New.
9492 (thread_db_detach, thread_db_mourn): Use it.
9493
1e7fc18c
PA
94942010-05-01 Pedro Alves <pedro@codesourcery.com>
9495
9496 * linux-low.c (linux_enable_event_reporting): New.
9497 (linux_wait_for_event_1, handle_extended_wait): Use it.
9498
02fc4de7
PA
94992010-04-30 Pedro Alves <pedro@codesourcery.com>
9500
9501 * linux-low.c (linux_kill_one_lwp, linux_kill)
9502 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9503 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9504 SIGSTOP even if the LWP is stopped.
9505 (send_sigstop_callback): New.
9506 (stop_all_lwps): Use send_sigstop_callback instead.
9507 (linux_resume_one_thread): Adjust.
9508 (proceed_one_lwp): Still proceed an LWP that the client has
9509 requested to stop, if we haven't reported it as stopped yet. Make
9510 sure that LWPs the client want stopped, have a pending SIGSTOP.
9511
bc3b5632
DE
95122010-04-26 Doug Evans <dje@google.com>
9513
ae1ada35
DE
9514 * server.c (handle_general_set): Make static.
9515
bc3b5632
DE
9516 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9517 Print received char after testing for error/eof instead of before.
9518 (input_interrupt): Tweak comment.
9519
65730243
DE
95202010-04-23 Doug Evans <dje@google.com>
9521
9522 * server.c (start_inferior): Print inferior argv if --debug.
9523
a8ae7dc0
AR
95242010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9525
9526 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9527 * nto-x86-low.c: Include server.h
9528
1c07cc19
PM
95292010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9530
9531 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9532 be consistent with other sources of this directory.
9533 (init_registers_amd64): Correct name of source file of this function
9534 in the comment.
9535
e0a61e09
PM
95362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9537
9538 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9539 64-bit executables.
9540
54709339
PM
95412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9542
9543 * win32-i386-low.c: Add 64-bit support.
9544 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9545 (init_registers_amd64): Declare.
9546 (mappings): Add 64-bit version of array.
9547 (init_windows_x86): New function.
9548 (the_low_target): Change init_arch field to init_windows_x86.
9549
e8f0053d
PM
95502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9551
9552 * win32-low.c: Adapt to support also 64-bit architecture.
9553 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9554 (get_image_name): Use SIZE_T type for local variable `done'.
9555 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9556 (toolhelp_get_dll_name): Idem.
9557 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9558 Use uintptr_t typecast to avoid warning.
9559 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9560 (handle_exception): Use phex_nz to avoid warning.
9561 (win32_wait): Remove unused local variable `process'.
9562
c481e77e
PM
95632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9564
9565 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9566 `amd64-avx.o'.
9567
12ea4b69
PM
95682010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9569
9570 * configure.ac: Use `ws2_32' library for srv_mingw.
9571 * configure: Regenerate.
9572 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9573 * remote-utils.c: Likewise.
9574
f6d1620c
L
95752010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9576
9577 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9578 if __x86_64__ is defined.
9579
8e642873
PM
95802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9581
9582 * configure: Regenerate.
9583
711e434b
PM
95842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9585
9586 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9587 * target.h (target_ops): New get_tib_address field.
9588 * win32-low.h (win32_thread_info): Add thread_local_base field.
9589 * win32-low.c (child_add_thread): Add tlb argument.
9590 Set thread_local_base field to TLB.
9591 (get_child_debug_event): Adapt to child_add_thread change.
9592 (win32_get_tib_address): New function.
9593 (win32_target_ops): Set get_tib_address field to
9594 win32_get_tib_address.
9595 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9596
505106cd
PA
95972010-04-12 Pedro Alves <pedro@codesourcery.com>
9598
505106cd
PA
9599 * linux-low.c (linux_mourn): Also remove the process.
9600 * server.c (handle_target_event): Don't remove the process here.
9601 * nto-low.c (nto_mourn): New.
9602 (nto_target_ops): Install it.
9603 * spu-low.c (spu_mourn): New.
9604 (spu_target_ops): Install it.
9605 * win32-low.c (win32_mourn): New.
9606 (win32_target_ops): Install it.
9607
e8470a06
PA
96082010-04-12 Pedro Alves <pedro@codesourcery.com>
9609
9610 * server.h (buffer_xml_printf): Remove redundant `;'.
9611
45ba0d02
PA
96122010-04-12 Pedro Alves <pedro@codesourcery.com>
9613
9614 * regcache.c (set_register_cache): Invalidate regcaches before
9615 changing the register cache layout.
9616 (regcache_invalidate_one): Allow a NULL regcache.
9617 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9618 regcaches before changing the register cache layout or the target
9619 regsets.
9620
59e04013
L
96212010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9622
9623 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9624 variable warning on Linux/x86-64.
9625
8336d594
PA
96262010-04-11 Pedro Alves <pedro@codesourcery.com>
9627
9628 GDBserver disconnected tracing support.
9629
9630 * linux-low.c (linux_remove_process): Delete.
9631 (add_lwp): Don't set last_resume_kind here.
9632 (linux_kill): Use `mourn'.
9633 (linux_detach): Use `thread_db_detach', and `mourn'.
9634 (linux_mourn): New.
9635 (linux_attach_lwp_1): Adjust comment.
9636 (linux_attach): last_resume_kind moved the thread_info; adjust.
9637 (status_pending_p_callback): Adjust.
9638 (linux_wait_for_event_1): Adjust.
9639 (count_events_callback, select_singlestep_lwp_callback)
9640 (select_event_lwp_callback, cancel_breakpoints_callback)
9641 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9642 (proceed_one_lwp): Adjust.
9643 (linux_async): Add debug output.
9644 (linux_thread_stopped): New.
9645 (linux_pause_all): New.
9646 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9647 linux_pause_all.
9648 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9649 (thread_db_free): Delete declaration.
9650 (thread_db_detach, thread_db_mourn): Declare.
9651 * thread-db.c (thread_db_init): Use thread_db_mourn.
9652 (thread_db_free): Delete, split in two.
9653 (disable_thread_event_reporting): New.
9654 (thread_db_detach): New.
9655 (thread_db_mourn): New.
9656
9657 * server.h (struct thread_info) <last_resume_kind>: New field.
9658 <attached>: Add comment.
9659 <gdb_detached>: New field.
9660 (handler_func): Change return type to int.
9661 (handle_serial_event, handle_target_event): Ditto.
9662 (gdb_connected): Declare.
9663 (tracing): Delete.
9664 (disconnected_tracing): Declare.
9665 (stop_tracing): Declare.
9666
9667 * server.c (handle_query) <qSupported>: Report support for
9668 disconnected tracing.
9669 (queue_stop_reply_callback): Account for running threads.
9670 (gdb_wants_thread_stopped): New.
9671 (gdb_wants_all_threads_stopped): New.
9672 (gdb_reattached_process): New.
9673 (handle_status): Clear the `gdb_detached' flag of all processes.
9674 In all-stop, stop all threads.
9675 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9676 (process_serial_event): If the remote connection breaks, or if an
9677 exit was forced with "monitor exit", force an event loop exit.
9678 Handle disconnected tracing on detach.
9679 (handle_serial_event): Adjust.
9680 (handle_target_event): If GDB isn't connected, forward events back
9681 to the inferior, unless the last process exited, in which case,
9682 exit gdbserver. Adjust interface.
9683
9684 * remote-utils.c (remote_open): Don't block in accept. Instead
9685 register an event loop source on the listen socket file
9686 descriptor. Refactor bits into ...
9687 (listen_desc): ... this new global.
9688 (gdb_connected): ... this new function.
9689 (enable_async_notification): ... this new function.
9690 (handle_accept_event): ... this new function.
9691 (remote_close): Clear remote_desc.
9692
9693 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9694
9695 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9696 New fields.
9697 (mourn_inferior): Define.
9698 (target_process_qsupported): Avoid the dangling else problem.
9699 (thread_stopped): Define.
9700 (pause_all): Define.
9701 (target_waitstatus_to_string): Declare.
9702 * target.c (target_waitstatus_to_string): New.
9703
9704 * tracepoint.c (tracing): Make extern.
9705 (disconnected_tracing): New.
9706 (stop_tracing): Make extern. Handle tracing stops due to GDB
9707 disconnecting.
9708 (cmd_qtdisconnected): New.
9709 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9710 (handle_tracepoint_general_set): Handle QTDisconnected.
9711
9712 * event-loop.c (event_handler_func): Change return type to int.
9713 (process_event): Bail out if the event handler wants the event
9714 loop to stop.
9715 (handle_file_event): Ditto.
9716 (start_event_loop): Bail out if the event handler wants the event
9717 loop to stop.
9718
9719 * nto-low.c (nto_target_ops): Adjust.
9720 * spu-low.c (spu_wait): Don't remove the process here.
9721 (spu_target_ops): Adjust.
9722 * win32-low.c (win32_wait): Don't remove the process here.
9723 (win32_target_ops): Adjust.
9724
5d267c4c
PA
97252010-04-11 Pedro Alves <pedro@codesourcery.com>
9726
9727 * regcache.c (realloc_register_cache): Invalidate inferior's
9728 regcache before recreating it.
9729
623ccd72
PA
97302010-04-09 Pedro Alves <pedro@codesourcery.com>
9731
9732 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9733
219f2f23
PA
97342010-04-09 Stan Shebs <stan@codesourcery.com>
9735 Pedro Alves <pedro@codesourcery.com>
9736
9737 * server.h (LONGEST): New.
9738 (struct thread_info) <while_stepping>: New field.
9739 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9740 Declare.
9741 (initialize_tracepoint, handle_tracepoint_general_set)
9742 (handle_tracepoint_query, tracepoint_finished_step)
9743 (tracepoint_was_hit, release_while_stepping_state_list):
9744 (current_traceframe): Declare.
9745 * server.c (handle_general_set): Handle tracepoint packets.
9746 (read_memory): New.
9747 (write_memory): New.
9748 (handle_search_memory_1): Use read_memory.
9749 (handle_query): Report support for conditional tracepoints, trace
9750 state variables, and tracepoint sources. Handle tracepoint
9751 queries.
9752 (main): Initialize the tracepoints module.
9753 (process_serial_event): Handle traceframe reads/writes.
9754
9755 * linux-low.c (handle_tracepoints): New.
9756 (linux_wait_1): Call it.
9757 (linux_resume_one_lwp): Handle while-stepping.
9758 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9759 (linux_target_ops): Install them.
9760 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9761 New field.
9762 * linux-x86-low.c (x86_supports_tracepoints): New.
9763 (the_low_target). Install it.
9764
9765 * mem-break.h (delete_breakpoint): Declare.
9766 * mem-break.c (delete_breakpoint): Make external.
9767
9768 * target.h (struct target_ops): Add `supports_tracepoints',
9769 `read_pc', and `write_pc' fields.
9770 (target_supports_tracepoints): Define.
9771 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9772 (phex_nz): New.
9773
9774 * regcache.h (struct regcache) <registers_owned>: New field.
9775 (init_register_cache, regcache_cpy): Declare.
9776 (regcache_read_pc, regcache_write_pc): Declare.
9777 (register_cache_size): Declare.
9778 (supply_regblock): Declare.
9779 * regcache.c (init_register_cache): New.
9780 (new_register_cache): Use it.
9781 (regcache_cpy): New.
9782 (register_cache_size): New.
9783 (supply_regblock): New.
9784 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9785
219f2f23
PA
9786 * tracepoint.c: New.
9787
9788 * Makefile.in (OBS): Add tracepoint.o.
9789 (tracepoint.o): New rule.
9790
3a13a53b
L
97912010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9792
9793 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9794 (i386-mmx.o): New.
9795 (i386-mmx.c): Likewise.
9796 (i386-mmx-linux.o): Likewise.
9797 (i386-mmx-linux.c): Likewise.
9798
9799 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9800 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9801 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9802 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9803
9804 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9805 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9806 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9807
1570b33e
L
98082010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9809
9810 * Makefile.in (clean): Updated.
9811 (i386-avx.o): New.
9812 (i386-avx.c): Likewise.
9813 (i386-avx-linux.o): Likewise.
9814 (i386-avx-linux.c): Likewise.
9815 (amd64-avx.o): Likewise.
9816 (amd64-avx.c): Likewise.
9817 (amd64-avx-linux.o): Likewise.
9818 (amd64-avx-linux.c): Likewise.
9819
9820 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9821 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9822 (srv_amd64_regobj): Add amd64-avx.o.
9823 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9824 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9825 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9826 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9827 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9828 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9829 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9830
9831 * i387-fp.c: Include "i386-xstate.h".
9832 (i387_xsave): New.
9833 (i387_cache_to_xsave): Likewise.
9834 (i387_xsave_to_cache): Likewise.
9835 (x86_xcr0): Likewise.
9836
9837 * i387-fp.h (i387_cache_to_xsave): Likewise.
9838 (i387_xsave_to_cache): Likewise.
9839 (x86_xcr0): Likewise.
9840
9841 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9842 * linux-crisv32-low.c (target_regsets): Likewise.
9843 * linux-m68k-low.c (target_regsets): Likewise.
9844 * linux-mips-low.c (target_regsets): Likewise.
9845 * linux-ppc-low.c (target_regsets): Likewise.
9846 * linux-s390-low.c (target_regsets): Likewise.
9847 * linux-sh-low.c (target_regsets): Likewise.
9848 * linux-sparc-low.c (target_regsets): Likewise.
9849 * linux-xtensa-low.c (target_regsets): Likewise.
9850
9851 * linux-low.c: Include <sys/uio.h>.
9852 (regsets_fetch_inferior_registers): Support nt_type.
9853 (regsets_store_inferior_registers): Likewise.
9854 (linux_process_qsupported): New.
9855 (linux_target_ops): Add linux_process_qsupported.
9856
9857 * linux-low.h (regset_info): Add nt_type.
9858 (linux_target_ops): Add process_qsupported.
9859
9860 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9861 and <sys/uio.h>.
9862 (init_registers_i386_avx_linux): New.
9863 (init_registers_amd64_avx_linux): Likewise.
9864 (xmltarget_i386_linux_no_xml): Likewise.
9865 (xmltarget_amd64_linux_no_xml): Likewise.
9866 (PTRACE_GETREGSET): Likewise.
9867 (PTRACE_SETREGSET): Likewise.
9868 (x86_fill_xstateregset): Likewise.
9869 (x86_store_xstateregset): Likewise.
9870 (use_xml): Likewise.
9871 (x86_linux_update_xmltarget): Likewise.
9872 (x86_linux_process_qsupported): Likewise.
9873 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9874 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9875 init_registers_i386_linux here. Call
9876 x86_linux_update_xmltarget.
9877 (the_low_target): Add x86_linux_process_qsupported.
9878
9879 * server.c (handle_query): Call target_process_qsupported.
9880
9881 * target.h (target_ops): Add process_qsupported.
9882 (target_process_qsupported): New.
9883
fc7238bb
PA
98842010-04-03 Pedro Alves <pedro@codesourcery.com>
9885
9886 * inferiors.c (add_thread): Set last_status kind to
9887 TARGET_WAITKIND_IGNORE.
9888 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9889 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9890 (linux_wait_1): Move `thread' local definition to block that uses
9891 it. Don't NULL initialize `event_child'.
9892 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9893 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9894 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9895
bdabb078
PA
98962010-04-01 Pedro Alves <pedro@codesourcery.com>
9897
9898 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9899 an extended waitstatus, or by a watchpoint.
9900 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9901 thread was stepping or has been stopped by a watchpoint.
9902
d3bbe7a0
PA
99032010-04-01 Pedro Alves <pedro@codesourcery.com>
9904
9905 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9906 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9907 of another, then delete the previous, and validate all
9908 breakpoints.
9909 (validate_inserted_breakpoint): New.
9910 (delete_disabled_breakpoints): New.
9911 (validate_breakpoints): New.
9912 (check_mem_read): Validate breakpoints before trusting their
9913 shadow. Delete disabled breakpoints.
9914 (check_mem_write): Validate breakpoints before trusting they
9915 should be inserted. Delete disabled breakpoints.
9916 * mem-break.h (validate_breakpoints):
9917 * server.c (handle_query): Validate breakpoints when we see a
9918 qSymbol query.
9919
8b07ae33
PA
99202010-04-01 Pedro Alves <pedro@codesourcery.com>
9921
9922 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9923 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9924 if we could tell there's a GDB breakpoint at stop_pc.
9925 (need_step_over_p): Don't do a step over if we find a GDB
9926 breakpoint at the resume PC.
9927
9928 * mem-break.c (struct raw_breakpoint): New.
9929 (enum bkpt_type): New type `gdb_breakpoint'.
9930 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9931 fields. New field `raw'.
9932 (find_raw_breakpoint_at): New.
9933 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9934 breakpoint instead.
9935 (set_breakpoint_at): Adjust.
9936 (delete_raw_breakpoint): New.
9937 (release_breakpoint): New.
9938 (delete_breakpoint): Rename to...
9939 (delete_breakpoint_1): ... this. Add proc parameter. Use
9940 release_breakpoint. Return ENOENT.
9941 (delete_breakpoint): Reimplement.
9942 (find_breakpoint_at): Delete.
9943 (find_gdb_breakpoint_at): New.
9944 (delete_breakpoint_at): Delete.
9945 (set_gdb_breakpoint_at): New.
9946 (delete_gdb_breakpoint_at): New.
9947 (gdb_breakpoint_here): New.
9948 (set_reinsert_breakpoint): Use release_breakpoint.
9949 (uninsert_breakpoint): Rename to ...
9950 (uninsert_raw_breakpoint): ... this.
9951 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9952 (reinsert_raw_breakpoint): Change parameter type to
9953 raw_breakpoint.
9954 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9955 instead.
9956 (check_breakpoints): Adjust. Use release_breakpoint.
9957 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9958 (breakpoint_inserted_here): Ditto.
9959 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9960 Don't trust the breakpoint's shadow if it is not inserted.
9961 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9962 (delete_all_breakpoints): Adjust.
9963 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9964 use delete_breakpoint_1.
9965
9966 * mem-break.h (breakpoints_supported): Delete declaration.
9967 (set_gdb_breakpoint_at): Declare.
9968 (gdb_breakpoint_here): Declare.
9969 (delete_breakpoint_at): Delete.
9970 (delete_gdb_breakpoint_at): Declare.
9971
9972 * server.h (struct raw_breakpoint): Forward declare.
9973 (struct process_info): New field `raw_breakpoints'.
9974
9975 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9976 breakpoints.
9977
6bf5e0ba
PA
99782010-03-24 Pedro Alves <pedro@codesourcery.com>
9979
9980 * linux-low.c (status_pending_p_callback): Fix comment.
9981 (linux_wait_for_event_1): Move most of the internal breakpoint
9982 handling from here...
9983 (linux_wait_1): ... to here.
9984 (count_events_callback): New.
9985 (select_singlestep_lwp_callback): New.
9986 (select_event_lwp_callback): New.
9987 (cancel_breakpoints_callback): New.
9988 (select_event_lwp): New.
9989 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9990 priority to all LWPs that have had events that should be reported
9991 to the client. Cancel breakpoints when about to reporting the
9992 event to the client, not while stopping lwps. No longer cancel
9993 finished single-steps here.
9994 (cancel_finished_single_step): Delete.
9995 (cancel_finished_single_steps): Delete.
9996
414a389f
PA
99972010-03-24 Pedro Alves <pedro@codesourcery.com>
9998
9999 * mem-break.c (enum bkpt_type): New.
10000 (struct breakpoint): New field `type'.
10001 (set_breakpoint_at): Change return type to struct breakpoint
10002 pointer. Set type to `other_breakpoint' by default.
10003 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10004 in the breakpoint list.
10005 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10006 (reinsert_breakpoint): Rename to ...
10007 (reinsert_raw_breakpoint): ... this.
10008 (reinsert_breakpoints_at): Adjust.
10009 * mem-break.h (struct breakpoint): Declare.
10010 (set_breakpoint_at): Change return type to struct breakpoint
10011 pointer.
10012
2280c721
PA
100132010-03-24 Pedro Alves <pedro@codesourcery.com>
10014
10015 * server.c (handle_query): Assign, not compare.
10016
d50171e4
PA
100172010-03-24 Pedro Alves <pedro@codesourcery.com>
10018
10019 Teach linux gdbserver to step-over-breakpoints.
10020
10021 * linux-low.c (can_hardware_single_step): New.
10022 (supports_breakpoints): New.
10023 (handle_extended_wait): If stopping threads, read the stop pc of
10024 the new cloned LWP.
10025 (get_pc): New.
10026 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10027 low target doesn't support retrieving the PC.
10028 (add_lwp): Set last_resume_kind to resume_continue.
10029 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10030 (linux_attach): Don't clear stop_expected. Set the lwp's
10031 last_resume_kind to resume_stop.
10032 (linux_detach_one_lwp): Don't check for removed breakpoints.
10033 (check_removed_breakpoint): Delete.
10034 (status_pending_p): Rename to ...
10035 (status_pending_p_callback): ... this. Don't check for removed
10036 breakpoints. Don't consider threads that are stopped from GDB's
10037 perspective.
10038 (linux_wait_for_lwp): Always read the stop_pc here.
10039 (cancel_breakpoint): New.
10040 (step_over_bkpt): New global.
10041 (linux_wait_for_event_1): Implement stepping over breakpoints.
10042 (gdb_wants_lwp_stopped): New.
10043 (gdb_wants_all_stopped): New.
10044 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10045 single-step traps here. Store the thread's last reported target
10046 wait status.
10047 (send_sigstop): Don't clear stop_expected. Always set it,
10048 instead.
10049 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10050 (cancel_finished_single_step): New.
10051 (cancel_finished_single_steps): New.
10052 (wait_for_sigstop): Don't cancel finished single-step traps here.
10053 (linux_resume_one_lwp): Don't check for removed breakpoints.
10054 Don't set `step' on non-hardware step archs.
10055 (linux_set_resume_request): Ignore resume_stop requests if already
10056 stopping or stopped. Set the lwp's last_resume_kind.
10057 (resume_status_pending_p): Don't check for removed breakpoints.
10058 (need_step_over_p): New.
10059 (start_step_over): New.
10060 (finish_step_over): New.
10061 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10062 requests. Clear the thread's last reported target waitstatus.
10063 Don't use the `suspended' flag. Don't consider pending breakpoints.
10064 (linux_resume): Start a step-over if necessary.
10065 (proceed_one_lwp): New.
10066 (proceed_all_lwps): New.
10067 (unstop_all_lwps): New.
10068 * linux-low.h (struct lwp_info): Rewrite comment for the
10069 `suspended' flag. Add the `stop_pc' field. Delete the
10070 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10071 Add `'last_resume_kind' and `need_step_over' fields.
10072 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10073 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10074 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10075 (set_raw_breakpoint_at): New.
10076 (set_breakpoint_at): Rewrite to use it.
10077 (reinsert_breakpoint_handler): Delete.
10078 (set_reinsert_breakpoint): New.
10079 (reinsert_breakpoint_by_bp): Delete.
10080 (delete_reinsert_breakpoints): New.
10081 (uninsert_breakpoint): Rewrite.
10082 (uninsert_breakpoints_at): New.
10083 (reinsert_breakpoint): Rewrite.
10084 (reinsert_breakpoints_at): New.
10085 (check_breakpoints): Rewrite.
10086 (breakpoint_here): New.
10087 (breakpoint_inserted_here): New.
10088 (check_mem_read): Adjust.
10089 * mem-break.h (breakpoints_supported, breakpoint_here)
10090 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10091 (reinsert_breakpoint_by_bp): Delete declaration.
10092 (delete_reinsert_breakpoints): Declare.
10093 (reinsert_breakpoint): Delete declaration.
10094 (reinsert_breakpoints_at): Declare.
10095 (uninsert_breakpoint): Delete declaration.
10096 (uninsert_breakpoints_at): Declare.
10097 (check_breakpoints): Adjust prototype.
10098 * server.h: Adjust include order.
10099 (struct thread_info): Declare here. Add a `last_status' field.
10100
30ba68cb
MS
101012010-03-23 Michael Snyder <msnyder@vmware.com>
10102
10103 * server.c (crc32): New function.
10104 (handle_query): Add handling for 'qCRC:' request.
10105
b9a881c2
PA
101062010-03-23 Pedro Alves <pedro@codesourcery.com>
10107
10108 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10109 lwp had been stopped by a watchpoint.
10110
e92d13d5
PA
101112010-03-16 Pedro Alves <pedro@codesourcery.com>
10112
10113 * server.h (internal_error): Declare.
10114 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10115 * utils.c (internal_error): New function.
10116
64daa791
AS
101172010-03-15 Andreas Schwab <schwab@redhat.com>
10118
10119 * configure.srv: Fix typo setting srv_regobj.
10120
f52cd8cd
PA
101212010-03-15 Pedro Alves <pedro@codesourcery.com>
10122
10123 * linux-low.c (fetch_register): Avoid passing a non string literal
10124 format to `error'.
10125 (usr_store_inferior_registers): Ditto.
10126
93ae6fdc
PA
101272010-03-14 Pedro Alves <pedro@codesourcery.com>
10128
10129 * linux-low.c (linux_write_memory): Bail out early if peeking
10130 memory failed.
10131
c3adc08c
PA
101322010-03-14 Pedro Alves <pedro@codesourcery.com>
10133
10134 * linux-low.h (struct lwp_info): New fields
10135 `stopped_by_watchpoint' and `stopped_data_address'.
10136 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10137 here, and cache them in the lwp object.
10138 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10139 directly.
10140 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10141 field.
10142 (linux_stopped_by_watchpoint): Rewrite.
10143 (linux_stopped_data_address): Rewrite.
10144
bce522a2
PA
101452010-03-06 Simo Melenius <simo.melenius@iki.fi>
10146
10147 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10148 switching the current inferior, not before.
10149
90884b2b
L
101502010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10151
10152 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10153 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10154 i386-linux.c and amd64-linux.c.
10155 (reg-i386.o): Removed.
10156 (reg-i386.c): Likewise.
10157 (reg-i386-linux.o): Likewise.
10158 (reg-i386-linux.c): Likewise.
10159 (reg-x86-64.o): Likewise.
10160 (reg-x86-64.c): Likewise.
10161 (reg-x86-64-linux.o): Likewise.
10162 (reg-x86-64-linux.c): Likewise.
10163 (i386.o): New.
10164 (i386.c): Likewise.
10165 (i386-linux.o): Likewise.
10166 (i386-linux.c): Likewise.
10167 (amd64.o): Likewise.
10168 (amd64.c): Likewise.
10169 (amd64-linux.o): Likewise.
10170 (amd64-linux.c): Likewise.
10171
10172 * configure.srv (srv_i386_regobj): New.
10173 (srv_i386_linux_regobj): Likewise.
10174 (srv_amd64_regobj): Likewise.
10175 (srv_amd64_linux_regobj): Likewise.
10176 (srv_i386_32bit_xmlfiles): Likewise.
10177 (srv_i386_64bit_xmlfiles): Likewise.
10178 (srv_i386_xmlfiles): Likewise.
10179 (srv_amd64_xmlfiles): Likewise.
10180 (srv_i386_linux_xmlfiles): Likewise.
10181 (srv_amd64_linux_xmlfiles): Likewise.
10182 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10183 srv_xmlfiles to $srv_i386_xmlfiles.
10184 (i[34567]86-*-mingw32ce*): Likewise.
10185 (i[34567]86-*-mingw*): Likewise.
10186 (i[34567]86-*-nto*): Likewise.
10187 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10188 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10189 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10190 (x86_64-*-linux*): Likewise.
10191
10192 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10193 (init_registers_amd64_linux): New.
10194 (x86_arch_setup): Replace init_registers_x86_64_linux with
10195 init_registers_amd64_linux.
10196
193f13e6
MK
101972010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10198
10199 * configure.ac: Check for libdl. If it is not available link against
10200 static libthread_db.
10201 * configure: Regenerate.
10202
85d721b8
PA
102032010-02-22 Pedro Alves <pedro@codesourcery.com>
10204
10205 PR9605
10206
10207 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10208 handing a read watchpoint.
10209 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10210
6076632b
DE
102112010-02-12 Doug Evans <dje@google.com>
10212
10213 * linux-low.c (linux_supports_tracefork_flag): Document.
10214 (linux_look_up_symbols): Add comment.
10215
3327ccf7
L
102162010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10217
10218 * regcache.c (supply_register): Clear regcache if buf is NULL.
10219
0718675c 102202010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10221 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10222
10223 * inferiors.c (find_inferior): Add function documentation.
10224 (unloaded_dll): Handle the case where the unloaded dll has not
10225 been previously registered in the dll list.
10226
177321bd
DJ
102272010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10230 (thumb2_breakpoint): New.
10231 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10232
2b009048
DJ
102332010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10236 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10237 breakpoints.
10238
3be029c7
PA
102392010-01-21 Pedro Alves <pedro@codesourcery.com>
10240
10241 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10242
18f5de3b
JK
102432010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10244
10245 * linux-s390-low.c (s390_collect_ptrace_register)
10246 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10247
3743bb4f
DE
102482010-01-21 Doug Evans <dje@google.com>
10249
14ce3065
DE
10250 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10251 (PTRACE_ARG4_TYPE): New macro.
10252 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10253 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10254 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10255 (usr_store_inferior_registers): Ditto.
10256 (linux_read_memory, linux_write_memory): Ditto.
10257 (linux_test_for_tracefork): Ditto.
10258
3743bb4f
DE
10259 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10260 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10261
8b315be5
PA
102622010-01-21 Pedro Alves <pedro@codesourcery.com>
10263
10264 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10265 target.
10266
85492558
PA
102672010-01-21 Pedro Alves <pedro@codesourcery.com>
10268
10269 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10270 prototype to take a regcache. Adjust.
10271
442ea881
PA
102722010-01-20 Pedro Alves <pedro@codesourcery.com>
10273
10274 * regcache.h (struct thread_info): Forward declare.
10275 (struct regcache): New.
10276 (new_register_cache): Adjust prototype.
10277 (get_thread_regcache): Declare.
10278 (free_register_cache): Adjust prototype.
10279 (registers_to_string, registers_from_string): Ditto.
10280 (supply_register, supply_register_by_name, collect_register)
10281 (collect_register_as_string, collect_register_by_name): Ditto.
10282 * regcache.c (struct inferior_regcache_data): Delete.
10283 (get_regcache): Rename to ...
10284 (get_thread_regcache): ... this. Adjust. Switch inferior before
10285 fetching registers.
10286 (regcache_invalidate_one): Adjust.
10287 (regcache_invalidate): Fix prototype.
10288 (new_register_cache): Return the new register cache.
10289 (free_register_cache): Change prototype.
10290 (realloc_register_cache): Adjust.
10291 (registers_to_string): Change prototype to take a regcache. Adjust.
10292 (registers_from_string): Ditto.
10293 (register_data): Ditto.
10294 (supply_register): Ditto.
10295 (supply_register_by_name): Ditto.
10296 (collect_register): Ditto.
10297 (collect_register_as_string): Ditto.
10298 (collect_register_by_name): Ditto.
10299 * server.c (process_serial_event): Adjust.
10300 * linux-low.h (regset_fill_func, regset_store_func): Change
10301 prototype.
10302 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10303 Change prototype.
10304 * linux-low.c (get_stop_pc): Adjust.
10305 (check_removed_breakpoint): Adjust.
10306 (linux_wait_for_event): Adjust.
10307 (linux_resume_one_lwp): Adjust.
10308 (fetch_register): Add regcache parameter. Adjust.
10309 (usr_store_inferior_registers): Ditto.
10310 (regsets_fetch_inferior_registers): Ditto.
10311 (regsets_store_inferior_registers): Ditto.
10312 (linux_fetch_registers, linux_store_registers): Ditto.
10313 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10314 regcache. Adjust.
43aaf8b6
PA
10315 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10316 Ditto.
442ea881
PA
10317 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10318 prototype to take a regcache.
10319 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10320 * remote-utils.c (convert_ascii_to_int, outreg)
10321 (prepare_resume_reply): Change prototype to take a regcache.
10322 Adjust.
10323 * target.h (struct target_ops) <fetch_registers, store_registers>:
10324 Change prototype to take a regcache.
10325 (fetch_inferior_registers, store_inferior_registers): Change
10326 prototype to take a regcache. Adjust.
10327 * proc-service.c (ps_lgetregs): Adjust.
10328 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10329 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10330 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10331 take a regcache. Adjust.
10332 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10333 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10334 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10335 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10336 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10337 (cris_cannot_fetch_register):
10338 (cris_breakpoint_at): Change prototype to take a regcache.
10339 Adjust.
10340 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10341 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10342 to take a regcache. Adjust.
10343 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10344 Adjust.
10345 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10346 take a regcache. Adjust.
10347 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10348 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10349 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10350 * linux-mips-low.c (mips_get_pc):
10351 (mips_set_pc): Change prototype to take a regcache. Adjust.
10352 (mips_reinsert_addr): Adjust.
10353 (mips_collect_register): Change prototype to take a regcache.
10354 Adjust.
10355 (mips_supply_register):
10356 (mips_collect_register_32bit, mips_supply_register_32bit)
10357 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10358 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10359 * linux-ppc-low.c (ppc_supply_ptrace_register)
10360 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10361 (parse_spufs_run): Adjust.
10362 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10363 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10364 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10365 take a regcache. Adjust.
10366 * linux-s390-low.c (s390_collect_ptrace_register)
10367 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10368 (s390_set_pc): Change prototype to take a regcache. Adjust.
10369 (s390_arch_setup): Adjust.
10370 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10371 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10372 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10373 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10374 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10375 regcache. Adjust.
10376 (sparc_breakpoint_at): Adjust.
10377 * linux-xtensa-low.c (xtensa_fill_gregset):
10378 (xtensa_store_gregset):
10379 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10380 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10381 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10382 prototype to take a regcache. Adjust.
10383 * win32-arm-low.c (arm_fetch_inferior_register)
10384 (arm_store_inferior_register): Change prototype to take a
10385 regcache. Adjust.
10386 * win32-i386-low.c (i386_fetch_inferior_register)
10387 (i386_store_inferior_register): Change prototype to take a
10388 regcache. Adjust.
10389 * win32-low.c (child_fetch_inferior_registers)
10390 (child_store_inferior_registers): Change prototype to take a
10391 regcache. Adjust.
10392 (win32_wait): Adjust.
10393 (win32_fetch_inferior_registers): Change prototype to take a
10394 regcache. Adjust.
10395 (win32_store_inferior_registers): Adjust.
10396 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10397 store_inferior_register>: Change prototype to take a regcache.
10398
60c3d7b0
DE
103992010-01-20 Doug Evans <dje@google.com>
10400
10401 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10402 #ifdef.
10403 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10404 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10405
dc146f7c
VP
104062010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10407
10408 * linux-low.c (linux_core_of_thread): New.
10409 (compare_ints, show_process, list_threads): New.
10410 (linux_qxfer_osdata): Report threads and cores.
10411 (linux_target_op): Register linux_core_of_thread.
10412 * remote-utils.c (prepare_resume_reply): Report the core.
10413 (buffer_xml_printf): Support %d specifier.
10414 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10415 New.
10416 (handle_query): Handle qXfer:threads. Announce availability
10417 thereof.
10418 * target.h (struct target_ops): New field core_of_thread.
10419
7803799a
UW
104202010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10421
10422 * Makefile.in (clean): Remove new generated files.
10423 (reg-s390.o, reg-s390.c): Remove rules.
10424 (reg-s390x.o, reg-s390x.c): Likewise.
10425 (s390-linux32.o, s390-linux32.c): Add rules.
10426 (s390-linux64.o, s390-linux64.c): Likewise.
10427 (s390x-linux64.o, s390x-linux64.c): Likewise.
10428 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10429 * linux-s390-low.c: Include <elf.h>.
10430 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10431 (init_registers_s390): Remove prototype.
10432 (init_registers_s390x): Likewise.
10433 (init_registers_s390_linux32): Add prototype.
10434 (init_registers_s390_linux64): Likewise.
10435 (init_registers_s390x_linux64): Likewise.
10436 (s390_num_regs_3264): New define.
10437 (s390_regmap_3264): New global variable.
10438 (s390_cannot_fetch_register): Remove obsolete check.
10439 (s390_cannot_store_register): Likewise.
10440 (s390_collect_ptrace_register): Handle upper/lower register halves.
10441 (s390_supply_ptrace_register): Likewise.
10442 (s390_fill_gregset): Update to register number changes.
10443 (s390_get_hwcap): New routine.
10444 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10445 Install appropriate regmap and register set.
10446
6e7ffa39
JB
104472010-01-01 Joel Brobecker <brobecker@adacore.com>
10448
10449 * server.c (gdbserver_version): Update copyright year to 2010.
10450 * gdbreplay.c (gdbreplay_version): Likewise.
10451
957f3f49
DE
104522009-12-28 Doug Evans <dje@google.com>
10453
10454 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10455 elf/external.h. Include <elf.h> instead but only if necessary.
10456
ca5c370d
PA
104572009-12-28 Pedro Alves <pedro@codesourcery.com>
10458
10459 * linux-low.c (linux_remove_process): Remove `detaching'
10460 parameter. Don't release/detach from thread_db here.
10461 (linux_kill): Release/detach from thread_db here, ...
10462 (linux_detach): ... and here, before actually detaching.
10463 (linux_wait_1): ... and here, when a process exits.
10464 * thread-db.c (any_thread_of): New.
10465 (thread_db_free): Switch the current inferior to a thread of the
10466 passed in process.
10467
4ee62156
DE
104682009-12-21 Doug Evans <dje@google.com>
10469
d90e6a88
DE
10470 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10471
c5f62d5f
DE
10472 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10473 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10474 warning ifndef __NR_tkill. Move setting of errno there too.
10475 Delete unnecessary resetting of errno after syscall.
10476 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10477
10e86dd7
DE
10478 * configure.ac: Check for dladdr.
10479 * config.in: Regenerate.
10480 * configure: Regenerate.
10481 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10482 (try_thread_db_load): Update.
10483
4ee62156
DE
10484 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10485
00f515da
DE
104862009-12-18 Doug Evans <dje@google.com>
10487
e9464885
DE
10488 * event-loop.c: Include unistd.h if it exists.
10489
07d4f67e
DE
10490 * linux-low.c (my_waitpid): Move definition away from being in
10491 between linux_tracefork_child/linux_test_for_tracefork.
10492
00f515da
DE
10493 * gdb_proc_service.h (psaddr_t): Fix type.
10494 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10495 signature to match glibc.
10496
1de1badb
DE
104972009-12-16 Doug Evans <dje@google.com>
10498
10499 * linux-low.c (linux_read_memory): Fix argument to read.
10500
aeeb81d1
PA
105012009-11-26 Pedro Alves <pedro@codesourcery.com>
10502
10503 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10504 events, don't leave current_inferior pointing at null.
10505
10357975
PA
105062009-11-26 Pedro Alves <pedro@codesourcery.com>
10507
10508 * win32-low.c (LOG): Delete.
10509 (OUTMSG): Output to stderr.
10510 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10511 on compile time LOG macro.
10512 (win32_wait): Fix debug output.
10513
cf6e3471
PA
105142009-11-26 Pedro Alves <pedro@codesourcery.com>
10515
10516 * win32-low.c (win32_add_one_solib): If the dll name is
10517 "ntdll.dll", prepend the system directory to the dll path.
10518
0c85e18e
MK
105192009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10520
10521 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10522
9ac544ce 105232009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10524 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10525
10526 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10527 * configure.ac: Check for __mcoldfire__ and set
10528 gdb_cv_m68k_is_coldfire.
10529 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10530 reg-cf.o and reg-m68k.o.
10531 * configure: Regenerated.
10532
fd7dd3e6
PA
105332009-11-16 Pedro Alves <pedro@codesourcery.com>
10534
10535 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10536 Pass it to thread_db_free.
10537 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10538 proper `detaching' argument to linux_remove_process.
10539 * linux-low.h (thread_db_free): Add `detaching' parameter.
10540 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10541 to thread_db_free.
10542 (thread_db_free): Add `detaching' parameter. Only
10543 call td_ta_clear_event if detaching from process.
10544
75aa492e
MK
105452009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10546
10547 * thread-db.c (thread_db_free): Fix typo.
10548
21e1bee4
PP
105492009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10550
10551 PR gdb/10838
10552 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10553
8838b45e
NS
105542009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10555
10556 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10557 with an i686 compiler.
10558 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10559 needed.
10560 * configure: Rebuilt.
10561
8a35fb51
SL
105622009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10563
10564 PR gdb/10783
10565
10566 * server.c (handle_search_memory_1): Correct read_addr initialization
10567 in loop for searching subsequent chunks.
10568
96f15937
PP
105692009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10570
10571 * configure.ac: New --with-libthread-db option.
10572 * thread-db.c: Allow direct dependence on libthread_db.
10573 (thread_db_free): Adjust.
10574 * config.in: Regenerate.
10575 * configure: Likewise.
889bf7c5 10576
5f7d1694
PP
105772009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10578
10579 PR gdb/10757
10580 * thread-db.c (attach_thread): New function.
10581 (maybe_attach_thread): Return success/failure.
10582 (find_new_threads_callback): Adjust.
889bf7c5
PA
10583 (thread_db_find_new_threads): Loop until no new threads.
10584
88e3b899
PA
105852009-10-13 Pedro Alves <pedro@codesourcery.com>
10586
10587 * proc-service.c (ps_lgetregs): Formatting.
10588
cdbfd419
PP
105892009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10590
10591 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10592 * configure.ac: Adjust.
10593 * linux-low.h (struct process_info_private): Move members to struct
10594 thread_db.
10595 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10596 * linux-low.c (linux_remove_process): Adjust.
10597 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10598 * server.c (handle_query): Move code ...
10599 (handle_monitor_command): ... here. New function.
10600 * target.h (struct target_ops): New member.
10601 * thread-db.c (struct thread_db): New.
10602 (libthread_db_search_path): New variable.
10603 (thread_db_create_event, thread_db_enable_reporting)
10604 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10605 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10606 (try_thread_db_load_1, dladdr_to_soname): New functions.
10607 (try_thread_db_load, thread_db_load_search): New functions.
10608 (thread_db_init): Search for libthread_db.
10609 (thread_db_free): New function.
10610 (thread_db_handle_monitor_command): Likewise.
10611 * config.in: Regenerate.
10612 * configure: Regenerate.
889bf7c5 10613
4168d2d6
UW
106142009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10615
10616 * spu-low.c (spu_kill): Wait for inferior to terminate.
10617 Call clear_inferiors.
10618 (spu_detach): Call clear_inferiors.
10619
81ecdfbb
RW
106202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10621
10622 * aclocal.m4: Regenerate.
10623 * config.in: Likewise.
10624 * configure: Likewise.
10625
0b9ff2c0
UW
106262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10627
10628 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10629 (parse_spufs_run): New function.
10630 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10631 (ppc_breakpoint_at): Handle SPU breakpoints.
10632
efcbbd14
UW
106332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10634
10635 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10636 (SPUFS_MAGIC): Define.
10637 (spu_enumerate_spu_ids): New function.
10638 (linux_qxfer_spu): New function.
10639 (linux_target_ops): Install linux_qxfer_spu.
10640
f4d9bade
UW
106412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10642
10643 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10644 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10645 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10646 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10647 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10648 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10649 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10650 (init_registers_powerpc_cell32l): Add prototype.
10651 (init_registers_powerpc_cell64l): Likewise.
10652 (ppc_arch_setup): Detect Cell/B.E. architecture.
10653
96e946ca
RW
106542009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10655
10656 * Makefile.in (datarootdir): New variable.
10657
58d6951d
DJ
106582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * linux-low.c (linux_write_memory): Update debugging output.
10661 * Makefile.in (clean): Add new descriptions.
10662 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10663 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10664 * configure.srv: Add new files for arm*-*-linux*.
10665 * linux-arm-low.c: Add new declarations.
10666 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10667 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10668 (HWCAP_VFPv3D16): New.
10669 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10670 instead of __IWMMXT__.
10671 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10672 (arm_arch_setup): New.
10673 (target_regsets): Remove #ifdef. Add VFP regset.
10674 (the_low_target): Use arm_arch_setup.
10675
12b42a12
DJ
106762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10679 the main thread again.
10680
ac8c974e
AR
106812009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10682
10683 Adding Neutrino gdbserver.
10684 * configure: Regenerated.
10685 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10686 * configure.srv (i[34567]86-*-nto*): New target.
10687 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10688 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10689 (nto_comctrl) [__QNX__]: New function.
10690 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10691
4424e0c3 106922009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10693
10694 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10695 srv_tgtobj.
10696
912cf4ba
PA
106972009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10698 Pedro Alves <pedro@codesourcery.com>
10699
10700 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10701 don't support CONTEXT_EXTENDED_REGISTERS.
10702 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10703 (the_low_target): Install them.
10704 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10705 failing with ERROR_PIPE_NOT_CONNECTED.
10706
aa5ca48f
DE
107072009-06-30 Doug Evans <dje@google.com>
10708 Pierre Muller <muller@ics.u-strasbg.fr>
10709
10710 Add h/w watchpoint support to x86-linux, win32-i386.
10711 * Makefile.in (SFILES): Add i386-low.c
10712 (i386_low_h): Define.
10713 (i386-low.o): Add dependencies.
10714 (linux-x86-low.o): Add i386-low.h dependency.
10715 (win32-i386-low.o): Ditto.
10716 * i386-low.c: New file.
10717 * i386-low.h: New file.
10718 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10719 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10720 * linux-low.c (linux_add_process): Initialize arch_private.
10721 (linux_remove_process): Free arch_private.
10722 (add_lwp): Initialize arch_private.
10723 (delete_lwp): Free arch_private.
10724 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10725 provided.
10726 * linux-low.h (process_info_private): New member arch_private.
10727 (lwp_info): New member arch_private.
10728 (linux_target_ops): New members new_process, new_thread,
10729 prepare_to_resume.
10730 (ptid_of): New macro.
10731 * linux-x86-low.c: Include stddef.h, i386-low.h.
10732 (arch_process_info): New struct.
10733 (arch_lwp_info): New struct.
10734 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10735 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10736 (i386_dr_low_get_status): New function.
10737 (x86_insert_point, x86_remove_point): New functions.
10738 (x86_stopped_by_watchpoint): New function.
10739 (x86_stopped_data_address): New function.
10740 (x86_linux_new_process, x86_linux_new_thread): New functions.
10741 (x86_linux_prepare_to_resume): New function.
10742 (the_low_target): Add entries for insert_point, remove_point,
10743 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10744 prepare_to_resume.
10745 * server.c (debug_hw_points): New global.
10746 (monitor_show_help): Document set debug-hw-points.
10747 (handle_query): Process "set debug-hw-points".
10748 * server.h (debug_hw_points): Declare.
10749 (paddress): Declare.
10750 * utils.c (NUMCELLS, CELLSIZE): New macros.
10751 (get_sell, xsnprintf, paddress): New functions.
10752 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10753 remove_point, stopped_by_watchpoint, stopped_data_address.
10754 * win32-i386-low.c: Include i386-low.h.
10755 (debug_reg_state): Replaces dr.
10756 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10757 (i386_dr_low_get_status): New function.
10758 (i386_insert_point, i386_remove_point): New functions.
10759 (i386_stopped_by_watchpoint): New function.
10760 (i386_stopped_data_address): New function.
10761 (i386_initial_stuff): Update.
10762 (get_thread_context,set_thread_context,i386_thread_added): Update.
10763 (the_low_target): Add entries for insert_point,
10764 remove_point, stopped_by_watchpoint, stopped_data_address.
10765 * win32-low.c (win32_insert_watchpoint): New function.
10766 (win32_remove_watchpoint): New function.
10767 (win32_stopped_by_watchpoint): New function.
10768 (win32_stopped_data_address): New function.
10769 (win32_target_ops): Add entries for insert_watchpoint,
10770 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10771 * win32-low.h (win32_target_ops): New members insert_point,
10772 remove_point, stopped_by_watchpoint, stopped_data_address.
10773
d993e290
PA
107742009-06-25 Pedro Alves <pedro@codesourcery.com>
10775
10776 * server.c (process_serial_event): Re-return unsupported, not
10777 error, if the type isn't recognized. Re-allow supporting only
10778 insert or remove packets. Also call require_running for
10779 breakpoints. Add missing break statement to default case. Tidy.
10780 * target.h (struct target_ops): Rename insert_watchpoint to
10781 insert_point, and remove_watchpoint to remove_point.
10782
10783 * linux-low.h (struct linux_target_ops): Likewise.
10784 * linux-low.c (linux_insert_watchpoint): Rename to ...
10785 (linux_insert_point): ... this. Adjust.
10786 (linux_remove_watchpoint): Rename to ...
10787 (linux_remove_point): ... this. Adjust.
10788 (linux_target_ops): Adjust.
10789 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10790 (cris_insert_point): ... this.
10791 (cris_remove_watchpoint): Rename to ...
10792 (cris_remove_point): ... this.
10793 (the_low_target): Adjust.
10794
0f54c268
PM
107952009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10796
10797 * server.c (handle_v_kill): Pass signal_pid to
10798 kill_inferior if multi_process is zero.
10799
c6314022
AR
108002009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10801
10802 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10803 * target.h (target_ops): Comment for *_watchpoint to make it clear
10804 the functions can get types '0' and '1'.
10805
4463ce24
AR
108062009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10807
10808 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10809 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10810 * regcache.c (get_regcache): Likewise.
10811 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10812 * win32-low.c (child_fetch_inferior_registers): Remove check for
10813 regno 0.
10814
cf8fd78b
PA
108152009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10816 Pedro Alves <pedro@codesourcery.com>
10817
10818 * target.h (struct target_ops) <supports_multi_process>: New
10819 callback.
10820 (target_supports_multi_process): New.
10821 * server.c (handle_query): Even if GDB reports support, only
10822 enable multi-process if the target also supports it. Report
10823 multi-process support only if the target backend supports it.
10824 * linux-low.c (linux_supports_multi_process): New function.
10825 (linux_target_ops): Install it as target_supports_multi_process
10826 callback.
10827
47c0c975
DE
108282009-05-24 Doug Evans <dje@google.com>
10829
e09875d4
DE
10830 Global renaming of find_thread_pid to find_thread_ptid.
10831 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10832 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10833 All callers updated.
10834
e27d73f6
DE
10835 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10836 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10837 directly.
10838
47c0c975
DE
10839 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10840 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10841 (linux_resume_one_lwp): Ditto.
10842
2acc282a
DE
108432009-05-23 Doug Evans <dje@google.com>
10844
10845 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10846 from struct inferior_list_entry * to struct lwp_info *.
10847 All callers updated.
10848
9f1036c1
DE
108492009-05-13 Doug Evans <dje@google.com>
10850
10851 * linux-x86-low.c: Don't include assert.h.
10852 (x86_siginfo_fixup): Use fatal, not assert.
10853 (x86_arch_setup): Fix comment.
10854
d0722149
DE
108552009-05-12 Doug Evans <dje@google.com>
10856
10857 Biarch support for i386/amd64 gdbserver.
10858 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10859 Add linux-x86-low.c.
10860 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10861 (linux-x86-low.o): Add.
10862 * linux-x86-64-low.c: Delete.
10863 * linux-i386-low.c: Delete.
10864 * linux-x86-low.c: New file.
10865 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10866 linux-x86-low.o.
10867 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10868 linux-x86-low.o.
10869 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10870 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10871 (linux_child_pid_to_exec_file): New function.
10872 (elf_64_header_p, elf_64_file_p): New functions.
10873 (siginfo_fixup): New function.
10874 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10875 give target a chance to convert layout.
10876 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10877 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10878
fdeb2a12
DE
108792009-05-07 Doug Evans <dje@google.com>
10880
10881 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10882 (regsets_store_inferior_registers): Ditto.
10883
a6dbe5df
PA
108842009-05-06 Pedro Alves <pedro@codesourcery.com>
10885
10886 PR server/10048
10887
10888 * linux-low.c (must_set_ptrace_flags): Delete.
10889 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10890 of the global.
10891 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10892 `lwp->must_set_ptrace_flags' instead.
ba42693b 10893 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10894 (linux_wait_1): ... not here.
10895
5091eb23
DE
108962009-04-30 Doug Evans <dje@google.com>
10897
9f767825
DE
10898 * inferiors.c (started_inferior_callback): New function.
10899 (attached_inferior_callback): New function.
10900 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10901 * server.c (print_started_pid, print_attached_pid): New functions.
10902 (detach_or_kill_for_exit): New function.
10903 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10904 * server.h (have_started_inferiors_p): Declare.
10905 (have_attached_inferiors_p): Declare.
10906
5091eb23
DE
10907 * inferiors.c (remove_process): Fix memory leak, free process.
10908 * linux-low.c (linux_remove_process): New function.
10909 (linux_kill): Call it instead of remove_process.
10910 (linux_detach, linux_wait_1): Ditto.
10911
155c8968
PA
109122009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10913
10914 * configure.srv: Add x86 Windows CE target.
10915
7fe519cb
UW
109162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10917
10918 * inferiors.c (get_thread_process): Make global.
10919 * server.h (get_thread_process): Add prototype.
10920 * thread-db.c (find_one_thread): Use get_thread_process
10921 instead of current_process.
10922 (thread_db_get_tls_address): Do not crash if called when
10923 thread layer is not yet initialized.
10924
5472f405
UW
109252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10926
10927 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10928 * spu-low.c (current_tid): Rename to ...
10929 (current_ptid): ... this.
10930 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10931 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10932 ptid_get_lwp (current_ptid) instead of current_tid.
10933 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10934 instead of current_tid. Use find_process_pid to verify pid
10935 argument is valid. Pass proper argument to remove_process.
10936 (spu_thread_alive): Compare current_ptid instead of current_tid.
10937 (spu_resume): Likewise.
10938
55ac2b99
PA
109392009-04-02 Pedro Alves <pedro@codesourcery.com>
10940
10941 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10942 variable.
10943
95954743
PA
109442009-04-01 Pedro Alves <pedro@codesourcery.com>
10945
10946 Implement the multiprocess extensions, and add linux multiprocess
10947 support.
10948
10949 * server.h (ULONGEST): Declare.
10950 (struct ptid, ptid_t): New.
10951 (minus_one_ptid, null_ptid): Declare.
10952 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10953 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10954 (struct inferior_list_entry): Change `id' type from unsigned from
10955 to ptid_t.
10956 (struct sym_cache, struct breakpoint, struct
10957 process_info_private): Forward declare.
10958 (struct process_info): Declare.
10959 (current_process): Declare.
10960 (all_processes): Declare.
10961 (initialize_inferiors): Declare.
10962 (add_thread): Adjust to use ptid_t.
10963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10964 (add_process, remove_process, find_thread_pid): Declare.
10965 (find_inferior_id): Adjust to use ptid_t.
10966 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10967 (multi_process): Declare.
10968 (push_event): Adjust to use ptid_t.
10969 (read_ptid, write_ptid): Declare.
10970 (prepare_resume_reply): Adjust to use ptid_t.
10971 (clear_symbol_cache): Declare.
10972 * inferiors.c (all_processes): New.
10973 (null_ptid, minus_one_ptid): New.
10974 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10975 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10976 (add_thread): Change unsigned long to ptid. Remove gdb_id
10977 parameter. Adjust.
10978 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10979 (gdb_id_to_thread): Rename to ...
10980 (find_thread_pid): ... this. Change unsigned long to ptid.
10981 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10982 (loaded_dll, pull_pid_from_list): Adjust.
10983 (add_process, remove_process, find_process_pid)
10984 (get_thread_process, current_process, initialize_inferiors): New.
10985 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10986 (struct target_waitstatus) <related_pid>: Ditto.
10987 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10988 return type to int.
10989 (struct target_ops) <join>: Add `pid' argument.
10990 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10991 (struct target_ops) <wait>: Add `ptid' field. Change return type
10992 to ptid.
10993 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10994 (mywait): Add `ptid' argument. Change return type to ptid_t.
10995 (target_pid_to_str): Declare.
10996 * target.c (set_desired_inferior): Adjust to use ptids.
10997 (mywait): Add new `ptid' argument. Adjust.
10998 (target_pid_to_str): New.
10999 * mem-break.h (free_all_breakpoints): Declare.
11000 * mem-break.c (breakpoints): Delelete.
11001 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11002 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11003 to use per-process breakpoint list.
11004 (free_all_breakpoints): New.
11005 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11006 (symbol_cache, all_symbols_looked_up): Delete.
11007 (hexchars): New.
11008 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11009 read_ptid): New.
11010 (prepare_resume_reply): Change ptid argument's type from unsigned
11011 long to ptid_t. Adjust. Implement W;process and X;process.
11012 (free_sym_cache, clear_symbol_cache): New.
11013 (look_up_one_symbol): Adjust to per-process symbol cache. *
11014 * server.c (cont_thread, general_thread, step_thread): Change type
11015 to ptid_t.
11016 (attached): Delete.
11017 (multi_process): New.
11018 (last_ptid): Change type to ptid_t.
11019 (struct vstop_notif) <ptid>: Change type to ptid_t.
11020 (queue_stop_reply, push_event): Change `ptid' argument's type to
11021 ptid_t.
11022 (discard_queued_stop_replies): Add `pid' argument.
11023 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11024 changes. Don't reference the `attached' global.
11025 (attach_inferior): Adjust to mywait interface changes.
11026 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11027 features. Handle and report "multiprocess+". Handle
11028 "qAttached:PID".
11029 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11030 changes.
11031 (handle_v_kill): New.
11032 (handle_v_stopped): Adjust to use target_pid_to_str.
11033 (handle_v_requests): Allow multiple attaches and runs when
11034 multiprocess extensions are in effect. Handle "vKill".
11035 (myresume): Adjust to use ptids.
11036 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11037 (handle_status): Adjust to discard_queued_stop_replies interface
11038 change.
11039 (first_thread_of, kill_inferior_callback)
11040 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11041 (main): Call initialize_inferiors. Adjust to use ptids, killing
11042 and detaching from all inferiors. Handle multiprocess packet
11043 variants.
11044 * linux-low.h: Include gdb_proc_service.h.
11045 (struct process_info_private): New.
11046 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11047 <lwpid_of>: Use ptid_get_lwp.
11048 (get_lwp_thread): Adjust.
11049 (struct lwp_info): Add `dead' member.
11050 (find_lwp_pid): Declare.
11051 * linux-low.c (thread_db_active): Delete.
11052 (new_inferior): Adjust comment.
11053 (inferior_pid): Delete.
11054 (linux_add_process): New.
11055 (handle_extended_wait): Adjust.
11056 (add_lwp): Change unsigned long to ptid.
11057 (linux_create_inferior): Add process to processes table. Adjust
11058 to use ptids. Don't set new_inferior here.
11059 (linux_attach_lwp): Rename to ...
11060 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11061 it. Adjust to use ptids.
11062 (linux_attach_lwp): New.
11063 (linux_attach): Add process to processes table. Don't set
11064 new_inferior here.
11065 (struct counter): New.
11066 (second_thread_of_pid_p, last_thread_of_process_p): New.
11067 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11068 multiple processes.
11069 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11070 processes. Remove process from process table.
11071 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11072 to multiple processes.
11073 (any_thread_of): New.
11074 (linux_detach): Add `pid' argument, and handle it. Remove process
11075 from processes table.
11076 (linux_join): Add `pid' argument. Handle it.
11077 (linux_thread_alive): Change unsighed long argument to ptid_t.
11078 Consider dead lwps as not being alive.
11079 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11080 threads we're not interested in.
11081 (same_lwp, find_lwp_pid): New.
11082 (linux_wait_for_lwp): Change `pid' argument's type from int to
11083 ptid_t. Adjust.
11084 (linux_wait_for_event): Rename to ...
11085 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11086 from int to ptid_t. Adjust.
11087 (linux_wait_for_event): New.
11088 (linux_wait_1): Add `ptid' argument. Change return type to
11089 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11090 that exit from the process table.
11091 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11092 Adjust.
11093 (mark_lwp_dead): New.
11094 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11095 stopping all threads, mark its main lwp as dead.
11096 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11097 ptids.
11098 (fetch_register, usr_store_inferior_registers)
11099 (regsets_fetch_inferior_registers)
11100 (regsets_store_inferior_registers, linux_read_memory)
11101 (linux_write_memory): Inline `inferior_pid'.
11102 (linux_look_up_symbols): Adjust to use per-process
11103 `thread_db_active'.
11104 (linux_request_interrupt): Adjust to use ptids.
11105 (linux_read_auxv): Inline `inferior_pid'.
11106 (initialize_low): Don't reference thread_db_active.
11107 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11108 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11109 (ps_getpid): Return the pid of the current inferior.
11110 * thread-db.c (proc_handle, thread_agent): Delete.
11111 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11112 per-process data.
11113 (find_one_thread): Change argument type to ptid_t. Adjust to
11114 per-process data.
11115 (maybe_attach_thread): Adjust to per-process data and ptids.
11116 (thread_db_find_new_threads): Ditto.
11117 (thread_db_init): Ditto.
11118 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11119 processes table. Adjust to use ptids.
11120 (spu_kill, spu_detach): Adjust interface. Remove process from
11121 processes table.
11122 (spu_join, spu_thread_alive): Adjust interface.
11123 (spu_wait): Adjust interface. Remove process from processes
11124 table. Adjust to use ptids.
11125 * win32-low.c (current_inferior_tid): Delete.
11126 (current_inferior_ptid): New.
11127 (debug_event_ptid): New.
11128 (thread_rec): Take a ptid. Adjust.
11129 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11130 (child_delete_thread): Ditto.
11131 (do_initial_child_stuff): Add `attached' argument. Add process to
11132 processes table.
11133 (child_fetch_inferior_registers, child_store_inferior_registers):
11134 Adjust.
11135 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11136 (win32_attach): Pass 1 to do_initial_child_stuff.
11137 (win32_kill): Adjust interface. Remove process from processes
11138 table.
11139 (win32_detach): Ditto.
11140 (win32_join): Adjust interface.
11141 (win32_thread_alive): Take a ptid.
11142 (win32_resume): Adjust to use ptids.
11143 (get_child_debug_event): Ditto.
11144 (win32_wait): Adjust interface. Remove exiting process from
11145 processes table.
11146
bd99dc85
PA
111472009-04-01 Pedro Alves <pedro@codesourcery.com>
11148
11149 Non-stop mode support.
11150
11151 * server.h (non_stop): Declare.
11152 (gdb_client_data, handler_func): Declare.
11153 (delete_file_handler, add_file_handler, start_event_loop):
11154 Declare.
11155 (handle_serial_event, handle_target_event, push_event)
11156 (putpkt_notif): Declare.
11157 * target.h (enum resume_kind): New.
11158 (struct thread_resume): Replace `step' field by `kind' field.
11159 (TARGET_WNOHANG): Define.
11160 (struct target_ops) <wait>: Add `options' argument.
11161 <supports_non_stop, async, start_non_stop>: New fields.
11162 (target_supports_non_stop, target_async): New.
11163 (start_non_stop): Declare.
11164 (mywait): Add `options' argument.
11165 * target.c (mywait): Add `options' argument. Print child exit
11166 notifications here.
11167 (start_non_stop): New.
11168 * server.c (non_stop, own_buf, mem_buf): New globals.
11169 (struct vstop_notif): New.
11170 (notif_queue): New global.
11171 (queue_stop_reply, push_event, discard_queued_stop_replies)
11172 (send_next_stop_reply): New.
11173 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11174 interface changes.
11175 (attach_inferior): In non-stop mode, don't wait for the target
11176 here.
11177 (handle_general_set): Handle QNonStop.
11178 (handle_query): When handling qC, return the current general
11179 thread, instead of the first thread of the list.
11180 (handle_query): If the backend supports non-stop mode, include
11181 QNonStop+ in the qSupported query response.
11182 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11183 and non-stop mode.
11184 (handle_v_attach, handle_v_run): Handle non-stop mode.
11185 (handle_v_stopped): New.
11186 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11187 (myresume): Adjust to use resume_kind. Handle non-stop.
11188 (queue_stop_reply_callback): New.
11189 (handle_status): Handle non-stop mode.
11190 (main): Clear non_stop flag on reconnection. Use the event-loop.
11191 Refactor serial protocol handling from here ...
11192 (process_serial_event): ... to this new function. When GDB
11193 selects any thread, select one here. In non-stop mode, wait until
11194 GDB acks all pending events before exiting.
11195 (handle_serial_event, handle_target_event): New.
11196 * remote-utils.c (remote_open): Install remote_desc in the event
11197 loop.
11198 (remote_close): Remove remote_desc from the event loop.
11199 (putpkt_binary): Rename to...
11200 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11201 (putpkt_binary): New as wrapper around putpkt_binary_1.
11202 (putpkt_notif): New.
11203 (prepare_resume_reply): In non-stop mode, don't change the
11204 general_thread.
11205 * event-loop.c: New.
11206 * Makefile.in (OBJ): Add event-loop.o.
11207 (event-loop.o): New rule.
11208
11209 * linux-low.h (pid_of): Moved here.
11210 (lwpid_of): New.
11211 (get_lwp_thread): Use lwpid_of.
11212 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11213 * linux-low.c (pid_of): Delete.
11214 (inferior_pid): Use lwpid_of.
11215 (linux_event_pipe): New.
11216 (target_is_async_p): New.
11217 (delete_lwp): New.
11218 (handle_extended_wait): Use lwpid_of.
11219 (add_lwp): Don't set lwpid field.
11220 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11221 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11222 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11223 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11224 first. Adjust to linux_wait_for_event interface changes. Use
11225 lwpid_of.
11226 (linux_detach): Don't delete the main lwp here.
11227 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11228 (status_pending_p): Don't consider explicitly suspended lwps.
11229 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11230 pointer. Add OPTIONS argument. Change return type to int. Use
11231 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11232 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11233 pointer. Add status pointer argument. Return a pid instead of a
11234 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11235 changes. In non-stop mode, don't switch to a random thread.
11236 (linux_wait): Rename to...
11237 (linux_wait_1): ... this. Add target_options argument, and handle
11238 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11239 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11240 clean exit and signal exit code. Don't stop all threads in
11241 non-stop mode. In all-stop mode, only stop all threads when
11242 reporting a stop to GDB. Handle explicit thread stop requests.
11243 (async_file_flush, async_file_mark): New.
11244 (linux_wait): New.
11245 (send_sigstop): Use lwpid_of.
11246 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11247 interface changes. In non-stop mode, don't switch to a random
11248 thread.
11249 (linux_resume_one_lwp): Use lwpid_of.
11250 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11251 (linux_resume_one_thread): ... this. Handle resume_stop. In
11252 non-stop mode, don't look for pending flag in all threads.
11253 (resume_status_pending_p): Don't consider explicitly suspended
11254 threads.
11255 (my_waitpid): Reimplement. Emulate __WALL.
11256 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11257 Use lwpid_of.
11258 (sigchld_handler, linux_supports_non_stop, linux_async)
11259 (linux_start_non_stop): New.
11260 (linux_target_ops): Register linux_supports_non_stop, linux_async
11261 and linux_start_non_stop.
11262 (initialize_low): Install SIGCHLD handler.
11263 * thread-db.c (thread_db_create_event, find_one_thread)
11264 (thread_db_get_tls_address): Use lwpid_of.
11265 * win32-low.c (win32_detach): Adjust to use resume_kind.
11266 (win32_wait): Add `options' argument.
11267 * spu-low.c (spu_resume): Adjust to use resume_kind.
11268 (spu_wait): Add `options' argument.
11269
5b1c542e
PA
112702009-04-01 Pedro Alves <pedro@codesourcery.com>
11271
11272 Decouple target code from remote protocol.
11273
11274 * target.h (enum target_waitkind): New.
11275 (struct target_waitstatus): New.
11276 (struct target_ops) <wait>: Return an unsigned long. Take a
11277 target_waitstatus pointer instead of a char pointer.
11278 (mywait): Likewise.
11279 * target.c (mywait): Change prototype to return an unsigned long.
11280 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11281 * server.h (thread_from_wait, old_thread_from_wait): Delete
11282 declarations.
11283 (prepare_resume_reply): Change prototype to take a
11284 target_waitstatus.
11285 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11286 (last_status, last_ptid): New.
11287 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11288 pid instead of a signal.
11289 (attach_inferior): Remove "status" and "signal" parameters.
11290 Adjust.
11291 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11292 not as an address.
11293 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11294 (handle_v_requests, myresume): Remove "status" and "signal"
11295 parameters. Adjust.
11296 (handle_status): New.
11297 (main): Delete local `status'. Adjust.
11298 * remote-utils.c: Include target.h.
11299 (prepare_resume_reply): Change prototype to take a
11300 target_waitstatus. Adjust.
11301
11302 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11303 interface.
11304 * spu-low.c (spu_wait): Adjust.
11305 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11306 Delete.
11307 (win32_wait): Adjust.
11308
2bd7c093
PA
113092009-04-01 Pedro Alves <pedro@codesourcery.com>
11310
11311 * target.h (struct thread_resume): Delete leave_stopped member.
11312 (struct target_ops): Add a `n' argument to the `resume' callback.
11313 * server.c (start_inferior): Adjust.
11314 (handle_v_cont, myresume): Adjust.
11315 * linux-low.c (check_removed_breakpoint): Adjust to resume
11316 interface change, and to removed leave_stopped field.
11317 (resume_ptr): Delete.
11318 (struct thread_resume_array): New.
11319 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11320 resume interface change.
11321 (linux_continue_one_thread, linux_queue_one_thread)
11322 (resume_status_pending_p): Check if the resume field is NULL
11323 instead of checking the leave_stopped member.
11324 (linux_resume): Adjust to the target resume interface change.
11325 * spu-low.c (spu_resume): Adjust to the target resume interface
11326 change.
11327 * win32-low.c (win32_detach, win32_resume): Ditto.
11328
c35fafde
PA
113292009-04-01 Pedro Alves <pedro@codesourcery.com>
11330
11331 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11332 flag.
11333 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11334 pending.
11335 (linux_continue_one_thread): Only preserve the stepping flag if
11336 there's a pending breakpoint.
11337
0a59d50b
PA
113382009-03-31 Pedro Alves <pedro@codesourcery.com>
11339
11340 * server.c (main): After the inferior having exited, call
11341 remote_close before exiting gdbserver.
11342
f04c6d38
TJB
113432009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11344
11345 Fix size of FPSCR in Power 7 processors.
11346 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11347 (PPC_FEATURE_HAS_DFP): New #define.
11348 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11349 size of the FPSCR.
11350
78e5cee6
PA
113512009-03-23 Pedro Alves <pedro@codesourcery.com>
11352
11353 * server.c (handle_query) Whitespace and formatting.
11354
1b3f6016
PA
113552009-03-22 Pedro Alves <pedro@codesourcery.com>
11356
11357 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11358 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11359 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11360 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11361 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11362 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11363 Makefile.in, configure.ac: Fix whitespace throughout.
11364 * configure: Regenerate.
11365
a07b2135
PA
113662009-03-22 Pedro Alves <pedro@codesourcery.com>
11367
11368 * inferiors.c (find_inferior): Make it safe for the callback
11369 function to delete the currently iterated inferior.
11370
67cc2626
PA
113712009-03-22 Pedro Alves <pedro@codesourcery.com>
11372
11373 * Makefile.in (linuw_low_h): Move higher.
11374 (thread-db.o): Depend on $(linux_low_h).
11375
54a0b537
PA
113762009-03-17 Pedro Alves <pedro@codesourcery.com>
11377
11378 Rename "process" to "lwp" throughout.
11379
11380 * linux-low.c (all_processes): Rename to...
11381 (all_lwps): ... this.
11382 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11383 (add_process): Rename to ...
11384 (add_lwp): ... this. Adjust.
11385 (linux_create_inferior): Adjust.
11386 (linux_attach_lwp): Adjust.
11387 (linux_attach): Adjust.
11388 (linux_kill_one_process): Rename to ...
11389 (linux_kill_one_lwp): ... this. Adjust.
11390 (linux_kill): Adjust.
11391 (linux_detach_one_process): Rename to ...
11392 (linux_detach_one_lwp): ... this. Adjust.
11393 (linux_detach): Adjust.
11394 (check_removed_breakpoint): Adjust.
11395 (status_pending_p): Adjust.
11396 (linux_wait_for_process): Rename to ...
11397 (linux_wait_for_lwp): ... this. Adjust.
11398 (linux_wait_for_event): Adjust.
11399 (send_sigstop): Adjust.
11400 (wait_for_sigstop): Adjust.
11401 (stop_all_processes): Rename to ...
11402 (stop_all_lwps): ... this.
11403 (linux_resume_one_process): Rename to ...
11404 (linux_resume_one_lwp): ... this. Adjust.
11405 (linux_set_resume_request, linux_continue_one_thread)
11406 (linux_queue_one_thread, resume_status_pending_p)
11407 (usr_store_inferior_registers, regsets_store_inferior_registers)
11408 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11409 Adjust.
11410 * linux-low.h (get_process): Rename to ...
11411 (get_lwp): ... this. Adjust.
11412 (get_thread_process): Rename to ...
11413 (get_thread_lwp): ... this. Adjust.
11414 (get_process_thread): Rename to ...
11415 (get_lwp_thread): ... this. Adjust.
11416 (struct process_info): Rename to ...
11417 (struct lwp_info): ... this.
11418 (all_processes): Rename to ...
11419 (all_lwps): ... this.
11420 * proc-service.c (ps_lgetregs): Adjust.
11421 * thread-db.c (thread_db_create_event, find_one_thread)
11422 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11423
0b16c5cf
PA
114242009-03-14 Pedro Alves <pedro@codesourcery.com>
11425
11426 * server.c (handle_query): Handle "qAttached".
11427
32de4b9d
NS
114282009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11429
11430 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11431 GPLv3, update license URL.
11432
2aecd87f
DE
114332009-03-01 Doug Evans <dje@google.com>
11434
93efd302 11435 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11436 (server_h): Add gdb_signals.h.
11437 (signals.o): Update.
11438 * server.h (target_signal_from_host,target_signal_to_host_p)
11439 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11440
86b1f9c5
PM
114412009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11442
11443 * remote-utils.c (getpkt): Also generate remote-debug
11444 information if noack_mode is set.
11445
4aa995e1
PA
114462009-02-06 Pedro Alves <pedro@codesourcery.com>
11447
11448 * server.c (handle_query): Report qXfer:siginfo:read and
11449 qXfer:siginfo:write as supported and handle them.
11450 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11451 * linux-low.c (linux_xfer_siginfo): New.
11452 (linux_target_ops): Set it.
11453
62709adf
PA
114542009-01-26 Pedro Alves <pedro@codesourcery.com>
11455
11456 * server.c (gdbserver_usage): Mention --remote-debug.
11457 (main): Accept '--remote-debug' switch.
11458
aef93bd7
DE
114592009-01-18 Doug Evans <dje@google.com>
11460
11461 * regcache.c (new_register_cache): No need to check result of xcalloc.
11462 * server.c (handle_search_memory): Back out calls to xmalloc,
11463 result is checked and error is returned to user upon failure.
11464 (handle_query): Ditto. Add more checks for result of malloc.
11465 (handle_v_cont): Check result of malloc, report error back to
11466 user upon failure.
11467 (handle_v_run): Ditto. Call freeargv.
11468 * server.h (freeargv): Declare.
11469 * utils.c (freeargv): New fn.
11470
54363045
DE
114712009-01-15 Doug Evans <dje@google.com>
11472
f626972c
DE
11473 * gdbreplay.c (perror_with_name): Make arg const char *.
11474 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11475 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11476 * utils.c (perror_with_name): Make arg const char *.
54363045 11477
18aae699
PA
114782009-01-14 Pedro Alves <pedro@codesourcery.com>
11479
11480 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11481 when handling a EXIT_PROCESS_DEBUG_EVENT.
11482
ff703abe
JB
114832009-01-06 Joel Brobecker <brobecker@adacore.com>
11484
11485 * gdbreplay.c (gdbreplay_version): Update copyright year.
11486 * server.c (gdbserver_version): Likewise.
11487
f21cc1a2 114882009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11489
11490 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11491 (handle_extended_wait): Improve comment.
0e21c1ec 11492
bca929d3
DE
114932008-12-13 Doug Evans <dje@google.com>
11494
11495 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11496 * server.h (ATTR_MALLOC): New macro.
11497 (xmalloc,xcalloc,xstrdup): Declare.
11498 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11499 * inferiors.c: Ditto.
11500 * linux-low.c: Ditto.
11501 * mem-break.c: Ditto.
11502 * regcache.c: Ditto.
11503 * remote-utils.c: Ditto.
11504 * server.c: Ditto.
11505 * target.c: Ditto.
11506 * win32-low.c: Ditto.
11507
97438e3f
DE
115082008-12-12 Doug Evans <dje@google.com>
11509
896c7fbb
DE
11510 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11511 in debugging printf.
11512
97438e3f
DE
11513 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11514
e3b886f8
DE
115152008-12-09 Doug Evans <dje@google.com>
11516
11517 * linux-low.h (struct process_info): Delete member tid, unused.
11518 * thread-db.c (find_one_thread): Update.
11519 (maybe_attach_thread): Update.
11520
07e059b5
VP
115212008-12-02 Pedro Alves <pedro@codesourcery.com>
11522
889bf7c5
PA
11523 * target.h (struct target_ops): Add qxfer_osdata member.
11524 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11525 and dirent.h.
11526 (linux_qxfer_osdata): New functions.
11527 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11528 callback.
11529 * server.c (handle_query): Handle "qXfer:osdata:read:".
11530 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11531 (buffer_xml_printf): New functions.
11532 * server.h (struct buffer): New.
11533 (buffer_grow_str, buffer_grow_str0): New macros.
11534 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11535 (buffer_xml_printf): Declare.
07e059b5 11536
4cab47ab
DE
115372008-11-24 Doug Evans <dje@google.com>
11538
11539 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11540
f142445f
DJ
115412008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11542
11543 * server.c (handle_v_run): Always use the supplied argument list.
11544
d0107bb6 115452008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11546
d0107bb6
BW
11547 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11548 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11549
2c4ad781
TJB
115502008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11551
11552 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11553 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11554 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11555 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11556 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11557 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11558 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11559 XML target descriptions.
11560 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11561 when inferior is running on an ISA 2.05 or later processor. Add
11562 special case to return offset for full 64-bit slot of FPSCR when
11563 in 32-bits.
11564
dfb64f85
DJ
115652008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11566
11567 * Makefile.in (SFILES, clean): Added sparc64 files.
11568 (reg-sparc64.o, reg-sparc64.c): New.
11569 * configure.srv (sparc*-*-linux*): New configuration.
11570 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11571 syscall arguments for SPARC.
11572 (regsets_store_inferior_registers): Likewise.
11573 * linux-sparc-low.c: New file.
11574
66b6e1dd
DE
115752008-10-21 Doug Evans <dje@google.com>
11576
11577 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11578 (READLINE_DIR,READLINE_DEP): Delete.
11579 (INTERNAL_CFLAGS): Update.
11580 (LINTFLAGS): Update.
11581
9b710a42
PA
115822008-10-10 Pedro Alves <pedro@codesourcery.com>
11583
11584 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11585 whole argv from the last run, not just argv[0].
11586
5822d809
PA
115872008-09-08 Pedro Alves <pedro@codesourcery.com>
11588
11589 * regcache.c (new_register_cache): Return NULL if the register
11590 cache size isn't known yet.
11591 (free_register_cache): Avoid dereferencing a NULL regcache.
11592
74aac56f
DJ
115932008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11594
11595 * configure.srv: Merge MIPS and MIPS64.
11596
400b20f5
MR
115972008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11598
11599 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11600
677c5bb1
LM
116012008-08-18 Luis Machado <luisgpm@br.ibm.com>
11602
11603 * Makefile.in: Add required vsx dependencies.
11604
11605 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11606 Declare init_registers_powerpc_vsx32l.
11607 Declare init_registers_powerpc_vsx64l.
11608 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11609 (ppc_arch_setup): Check for VSX in hwcap.
11610 (ppc_fill_vsxregset): New function.
11611 (ppc_store_vsxregset): New function.
11612 Add new VSX entry in regset_info target_regsets.
11613
11614 * configure.srv: Add new VSX dependencies.
11615
a6f3e723
SL
116162008-08-12 Pedro Alves <pedro@codesourcery.com>
11617
11618 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11619 (remote_open): Set or clear transport_is_reliable.
11620 (putpkt_binary): Don't expect acks in noack mode.
11621 (getpkt): Don't send ack/nac in noack mode.
11622 * server.c (handle_general_set): Handle QStartNoAckMode.
11623 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11624 qSupported.
11625 (main): Reset noack_mode on every connection.
11626 * server.h (noack_mode): Declare.
11627
a417dc56
RW
116282008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11629
11630 * Makefile.in (GDBREPLAY_OBS): New variable.
11631 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11632
3221518c
UW
116332008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11634 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11637 (usr_store_inferior_registers): Likewise.
11638 (regsets_store_inferior_registers): Likewise.
11639
ec56be1b
PA
116402008-07-31 Rolf Jansen <rj@surtec.com>
11641 Pedro Alves <pedro@codesourcery.com>
11642
11643 * configure.ac: Check for memmem declaration.
11644 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11645 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11646 (disable_packet_qfThreadInfo): Unconditionally compile.
11647 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11648 * configure, config.in: Regenerate.
11649
2fe5e3ff
DE
116502008-07-28 Doug Kwan <dougkwan@google.com>
11651
11652 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11653 (linux_write_memory): Remove declaration of errno.
11654
836acd6d
UW
116552008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11656
11657 * linux-low.c (handle_extended_wait): Do not use "status"
11658 variable uninitialized.
11659
aeba519e
PA
116602008-07-07 Pedro Alves <pedro@codesourcery.com>
11661
11662 * server.c (handle_v_attach): Inhibit reporting dll changes.
11663
db42f210
PA
116642008-06-27 Pedro Alves <pedro@codesourcery.com>
11665
11666 * remote-utils.c (prepare_resume_reply): If requested, don't
11667 output "thread:TID" in the T stop reply.
11668
11669 * server.c (disable_packet_vCont, disable_packet_Tthread)
11670 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11671 (handle_query): If requested, disable support for qC, qfThreadInfo
11672 and qsThreadInfo.
11673 (handle_v_requests): If requested, disable support for vCont.
11674 (gdbserver_show_disableable): New.
11675 (main): Handle --disable-packet and --disable-packet=LIST.
11676
11677 * server.h (disable_packet_vCont, disable_packet_Tthread)
11678 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11679
8e4c5421
CD
116802008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11681
11682 * server.c (gdbserver_usage): Mention --version.
11683
6e23a804
DJ
116842008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11685
11686 * Makefile.in (gdbreplay.o): New rule.
11687
90aa6a40
JM
116882008-06-06 Joseph Myers <joseph@codesourcery.com>
11689
11690 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11691 message, not gdbserver.
11692
c16158bc 116932008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11694 Nathan Sidwell <nathan@codesourcery.com>
11695 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11696
11697 * acinclude.m4: Include ../../config/acx.m4.
11698 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11699 * configure, config.in: Regenerate.
11700 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11701 * server.c (gdbserver_version): Print PKGVERSION.
11702 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11703 (main): Adjust gdbserver_usage calls.
11704 * gdbreplay.c (version, host_name): Add declarations.
11705 (gdbreplay_version, gdbreplay_usage): New.
11706 (main): Accept --version and --help options.
11707
aeb75bf5
DJ
117082008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11711 (arm_breakpoint_at): Handle Thumb.
11712 (the_low_target): Add comment.
11713
76b233dd
UW
117142008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11715
11716 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11717
08388c79
DE
117182008-05-09 Doug Evans <dje@google.com>
11719
a3c83fae
DE
11720 * server.h (decode_search_memory_packet): Declare.
11721 * remote-utils.c (decode_search_memory_packet): New fn.
11722 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11723 (handle_search_memory): New fn.
11724 (handle_query): Process qSearch:memory packets.
11725
bb9c3d36
UW
117262008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11727
11728 * regcache.c (registers_length): Remove.
11729 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11730 full register packet.
11731 * regcache.h (registers_length): Remove prototype.
11732 * server.h (PBUFSIZ): Define to 16384.
11733
7284e1be
UW
117342008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11735
11736 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11737 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11738 powerpc-64l.o, and powerpc-altivec64l.o.
11739 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11740 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11741 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11742 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11743 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11744 to srv_xmlfiles.
11745
11746 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11747 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11748 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11749 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11750 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11751 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11752 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11753 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11754 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11755 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11756 (clean): Update.
11757
11758 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11759 (init_registers_powerpc_32l): ... this new prototype.
11760 (init_registers_powerpc_32): Remove, replace by ...
11761 (init_registers_powerpc_altivec32l): ... this new prototype.
11762 (init_registers_powerpc_e500): Remove, replace by ...
11763 (init_registers_powerpc_e500l): ... this new prototype.
11764 (init_registers_ppc64): Remove, replace by ...
11765 (init_registers_powerpc_64l): ... this new prototype.
11766 (init_registers_powerpc_64): Remove, replace by ...
11767 (init_registers_powerpc_altivec64l): ... this new prototype.
11768 (ppc_num_regs): Set to 73.
11769 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11770 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11771 (ppc_cannot_store_register): Handle orig_r3 and trap.
11772 (ppc_arch_setup): Update init_registers_... calls.
11773 (ppc_fill_gregset): Handle orig_r3 and trap.
11774
11775 * inferiors.c (clear_inferiors): Reset current_inferior.
11776
fdc59709
PB
117772008-04-23 Paolo Bonzini <bonzini@gnu.org>
11778
889bf7c5
PA
11779 * acinclude.m4: Add override.m4.
11780 * configure: Regenerate.
fdc59709 11781
c9b2f845
UW
117822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11783
11784 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11785 initial call to init_register_ppc64.
11786
550512b8
UW
117872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11788
43aaf8b6
PA
11789 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11790 single powerpc*-*-linux* case.
550512b8
UW
11791 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11792
b6430ec3
UW
117932008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11794
11795 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11796 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11797 from reg_xmlfiles.
11798 * linux-ppc-low.c: Include <elf.h>.
11799 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11800 (ppc_hwcap): New global variable.
11801 (ppc_regmap): Remove __SPE__ #ifdef sections.
11802 (ppc_regmap_e500): New global variable.
11803 (ppc_cannot_store_register): Update __SPE__ special case.
11804 (ppc_get_hwcap): New function.
11805 (ppc_arch_setup): Use it to determine whether inferior supports
11806 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11807 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11808 Do not access registers if target does not support AltiVec.
11809 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11810 Do not access registers if target does not support SPE.
11811 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11812
52fa2412
UW
118132008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11814
11815 * linux-low.c (disabled_regsets, num_regsets): New.
11816 (use_regsets_p): Delete.
11817 (linux_wait_for_process): Clear disabled_regsets.
11818 (regsets_fetch_inferior_registers): Check and set it.
11819 (regsets_store_inferior_registers): Likewise.
11820 (linux_fetch_registers, linux_store_registers): Do not use
11821 use_regsets_p.
11822 (initialize_low): Allocate disabled_regsets.
11823
e28b3332
DJ
118242008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11825
11826 * Makefile.in (LIBOBJS): New.
11827 (OBS): Use LIBOBJS.
11828 (memmem.o): New rule.
11829 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11830 * configure: Regenerated.
11831
4536995d
UW
118322008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11833
11834 * server.c (handle_query): Never return "unsupported" for
11835 qXfer:features:read queries.
11836
221c031f
UW
118372008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11838
11839 * server.c (get_features_xml): Fix inverted condition.
11840 (handle_query): Always support qXfer:feature:read.
11841
ccd213ac
DJ
118422008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11843
11844 * server.c (wrapper_argv): New.
11845 (start_inferior): Handle wrapper_argv. If set, expect an extra
11846 trap.
11847 (gdbserver_usage): Document --wrapper.
11848 (main): Parse --wrapper.
11849
6fe305f7
UW
118502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11851
11852 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11853 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11854 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11855 (ppc_set_pc): Likewise.
11856 (ppc_arch_setup): New function.
11857 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11858 of collect_register.
889bf7c5 11859 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11860
5b0a002e
UW
118612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11862
11863 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11864 instead of linux-ppc64-low.o.
11865 * linux-ppc64-low.c: Remove file.
11866 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11867 (linux-ppc64-low.o): Remove rule.
11868
11869 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11870 (init_registers_powerpc_64): Likewise.
11871 (ppc_regmap): Conditionally define depending on __powerpc64__.
11872 (ppc_cannot_store_register): Do not special-case "fpscr" when
11873 compiled on __powerpc64__.
11874 (ppc_collect_ptrace_register): New function.
11875 (ppc_supply_ptrace_register): New function.
11876 (ppc_breakpoint): Change type to "unsigned int".
11877 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11878 (the_low_target): Conditionally provide initializers for the
889bf7c5 11879 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11880 collect_ptrace_register and supply_ptrace_register members.
11881
9b4b61c8
UW
118822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11883
11884 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11885 * server.c (gdbserver_xmltarget): Define.
11886 (get_features_xml): Use it to replace "target.xml" and arch_string.
11887
11888 * configure.srv: Remove srv_xmltarget. Add XML files that were
11889 mentioned there to srv_xmlfiles instead. Remove conditional tests
11890 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11891 srv_xmlfiles and srv_regobj to include all possible choices.
11892 * configure.ac (srv_xmltarget): Remove.
11893 (srv_xmlfiles): Do not add "target.xml".
11894 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11895 checks for supplementary target information.
11896 * configure: Regenerate.
11897 * Makefile.in (XML_TARGET): Remove.
11898 (target.xml): Remove rule.
11899 (clean): Do not clean up target.xml.
11900 (.PRECIOUS): Do not mention target.xml.
11901
11902 * target.h (struct target_ops): Remove arch_string member.
11903 * linux-low.c (linux_arch_string): Remove.
11904 (linux_target_ops): Remove arch_string initializer.
11905 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11906 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11907 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11908 * spu-low.c (spu_arch_string): Remove.
11909 (spu_target_ops): Remove arch_string initializer.
11910 * win32-low.c (win32_arch_string): Remove.
11911 (win32_target_ops): Remove arch_string initializer.
11912 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11913 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11914 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11915
ee1a7ae4
UW
119162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11917
11918 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11919 by collect_ptrace_register and supply_ptrace_register hooks.
11920 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11921 instead of checking for the_low_target.left_pad_xfer.
11922 (usr_store_inferior_registers): Use collect_ptrace_register callback
11923 instead of checking for the_low_target.left_pad_xfer.
11924
11925 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11926 (s390_supply_ptrace_register): Likewise.
11927 (s390_fill_gregset): Call s390_collect_ptrace_register.
11928 (the_low_target): Update.
11929
11930 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11931 (ppc_supply_ptrace_register): Likewise.
11932 (the_low_target): Update.
11933
11934 * linux-i386-low.c (the_low_target): Update.
11935 * linux-x86-64-low.c (the_low_target): Update.
11936
d61ddec4
UW
119372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11938
11939 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11940 reg-s390.o and reg-s390x.o.
11941
11942 * linux-low.c (new_inferior): New global variable.
11943 (linux_create_inferior, linux_attach): Set it.
11944 (linux_wait_for_process): Call the_low_target.arch_setup after the
11945 target has stopped for the first time.
11946 (initialize_low): Do not call the_low_target.arch_setup.
11947
11948 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11949 (s390_set_pc): Likewise.
11950 (s390_arch_setup): New function.
11951 (the_low_target): Use s390_arch_setup as arch_setup routine.
11952
11953 * regcache.c (realloc_register_cache): New function.
11954 (set_register_cache): Call it for each existing regcache.
11955
d05b4ac3
UW
119562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11957
11958 * server.h (init_registers): Remove prototype.
11959
11960 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11961 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11962 instead of init_registers ().
11963 * linux-arm-low.c (init_registers_arm): Add prototype.
11964 (init_registers_arm_with_iwmmxt): Likewise.
11965 (the_low_target): Add initializer for arch_setup field.
11966 * linux-cris-low.c (init_registers_cris): Add prototype.
11967 (the_low_target): Add initializer for arch_setup field.
11968 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11969 (the_low_target): Add initializer for arch_setup field.
11970 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11971 (the_low_target): Add initializer for arch_setup field.
11972 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11973 (the_low_target): Add initializer for arch_setup field.
11974 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11975 (the_low_target): Add initializer for arch_setup field.
11976 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11977 (the_low_target): Add initializer for arch_setup field.
11978 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11979 (init_registers_mips64_linux): Likewise.
11980 (the_low_target): Add initializer for arch_setup field.
11981 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11982 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11983 (the_low_target): Add initializer for arch_setup field.
11984 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11985 (init_registers_powerpc_64): Likewise.
11986 (the_low_target): Add initializer for arch_setup field.
11987 * linux-s390-low.c (init_registers_s390): Add prototype.
11988 (init_registers_s390x): Likewise.
11989 (the_low_target): Add initializer for arch_setup field.
11990 * linux-sh-low.c (init_registers_sh): Add prototype.
11991 (the_low_target): Add initializer for arch_setup field.
11992 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11993 (the_low_target): Add initializer for arch_setup field.
11994 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11995 (the_low_target): Add initializer for arch_setup field.
11996
11997 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11998 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11999 instead of init_registers ().
12000 * win32-arm-low.c (init_registers_arm): Add prototype.
12001 (the_low_target): Add initializer for arch_setup field.
12002 * win32-i386-low.c (init_registers_i386): Add prototype.
12003 (the_low_target): Add initializer for arch_setup field.
12004
12005 * spu-low.c (init_registers_spu): Add prototype.
12006 (initialize_low): Call initialie_registers_spu () instead of
12007 initialize_registers ().
12008
fd96d250
PA
120092008-02-19 Pedro Alves <pedro@codesourcery.com>
12010
12011 * server.c (handle_v_requests): When handling the vRun and vAttach
12012 packets, if already debugging a process, don't kill it. Return an
12013 error instead.
12014
d41b6bb4
DJ
120152008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12016
12017 * server.c (handle_query): Correct length check.
12018
5ac588cf
PA
120192008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12020
12021 * win32-low.c (do_initial_child_stuff): Add process handle
12022 parameter. Set current_process_handle and current_process_id from the
12023 parameters. Clear globals.
12024 (win32_create_inferior): Don't set current_process_handle and
12025 current_process_id here. Instead pass them on the call to
12026 do_initial_child_stuff.
12027 (win32_attach): Likewise.
12028 (win32_clear_inferiors): New.
12029 (win32_kill): Don't close the current process handle or the
12030 current thread handle here. Instead call win32_clear_inferiors.
12031 (win32_detach): Don't open a new handle to the process. Call
12032 win32_clear_inferiors.
12033 (win32_join): Don't rely on current_process_handle; open a new
12034 handle using the process id.
12035 (win32_wait): Call win32_clear_inferiors when the inferior process
12036 has exited.
12037
ecd7ecbc
DJ
120382008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12039
12040 * server.c (monitor_show_help): Add "exit".
12041
1525d545
MG
120422008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12043
ecd7ecbc 12044 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12045 (clean): Add reg-xtensa.c.
12046 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12047 * configure.srv (xtensa*-*-linux*) New target.
12048 * linux-xtensa-low.c: New.
12049 * xtensa-xtregs.c: New.
1525d545 12050
59a016f0
PA
120512008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12052
12053 * hostio.c: Don't include errno.h.
12054 (errno_to_fileio_errno): Move to hostio-errno.
12055 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12056 error number outputting to the target->hostio_last_error callback.
12057 (hostio_packet_error): Use FILEIO_EINVAL directly.
12058 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12059 calls to hostio_error.
12060 * hostio-errno.c: New.
12061 * server.h (hostio_last_error_from_errno): Declare.
12062 * target.h (target_ops): Add hostio_last_error member.
12063 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12064 as hostio_last_error handler.
889bf7c5 12065 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12066 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12067 (wince_hostio_last_error): New functions.
12068 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12069 as hostio_last_error handler.
12070 (win32_target_ops) [!_WIN32_WCE]: Register
12071 hostio_last_error_from_errno as hostio_last_error handler.
12072 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12073 (hostio-errno.o): New rule.
12074 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12075 * configure.srv (srv_hostio_err_objs): New variable. Default to
12076 hostio-errno.o.
12077 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12078 * configure: Regenerate.
12079
2d717e4f
DJ
120802008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12081
12082 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12083 (linux_kill, linux_detach): Clean up the process list.
12084 * remote-utils.c (remote_open): Improve port number parsing.
12085 (putpkt_binary, input_interrupt): Only send interrupts if the target
12086 is running.
12087 * server.c (extended_protocol): Make static.
12088 (attached): Define earlier.
12089 (exit_requested, response_needed, program_argv): New variables.
12090 (target_running): New.
12091 (start_inferior): Clear attached here.
12092 (attach_inferior): Set attached here.
12093 (require_running): Define.
12094 (handle_query): Use require_running and target_running. Implement
12095 "monitor exit".
12096 (handle_v_attach, handle_v_run): New.
12097 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12098 (gdbserver_usage): Update.
12099 (main): Redo argument parsing. Handle --debug and --multi. Handle
12100 --attach along with other options or after the port. Save
12101 program_argv. Support no initial program. Resynchronize
12102 communication with GDB after an error. Handle "monitor exit".
12103 Use require_running and target_running. Always allow the extended
12104 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12105 restart in extended mode.
12106 * README: Refer to the GDB manual. Update --attach usage.
12107
7407e2de
AS
121082007-12-20 Andreas Schwab <schwab@suse.de>
12109
12110 * linux-low.c (STACK_SIZE): Define.
12111 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12112 (linux_test_for_tracefork): Likewise.
12113
b65d95c5
DJ
121142007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12115
12116 * linux-low.c (linux_wait_for_event): Update messages. Do not
12117 reinsert auto-delete breakpoints.
12118 * mem-break.c (struct breakpoint): Change return type of handler to
12119 int.
12120 (set_breakpoint_at): Update handler type.
12121 (reinsert_breakpoint_handler): Return 1 instead of calling
12122 delete_breakpoint.
12123 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12124 setting a new one.
12125 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12126 * mem-break.h (set_breakpoint_at): Update handler type.
12127 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12128 * win32-low.c (auto_delete_breakpoint): New.
12129 (get_child_debug_event): Use it.
12130
4e799345
DJ
121312007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12132
12133 * configure.ac: Check for pread and pwrite.
12134 * hostio.c (handle_pread): Fall back to lseek and read.
12135 (handle_pwrite): Fall back to lseek and write.
12136 * config.in, configure: Regenerated.
12137
27524b67
DJ
121382007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12139
12140 * server.c (myresume): Add own_buf argument.
12141 (main): Update calls.
12142
a20d5e98
DJ
121432007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12144
12145 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12146 * remote-utils.c (remote_open): Do not call disable_async_io.
12147 (block_async_io): Delete.
12148 (unblock_async_io): Make static.
12149 (initialize_async_io): New.
12150 * server.c (handle_v_cont): Handle async I/O here.
12151 (myresume): Likewise. Move other common resume tasks here...
12152 (main): ... from here. Call initialize_async_io. Disable async
12153 I/O before the main loop.
12154 * server.h (initialize_async_io): Declare.
12155 (block_async_io, unblock_async_io): Delete prototypes.
12156 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12157
b79d787e
DJ
121582007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12159
12160 * remote-utils.c (readchar): Allow binary data in received messages.
12161
d97903b2
PA
121622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12163
12164 * win32-low.c (attaching): New global.
12165 (win32_create_inferior): Clear the `attaching' global.
12166 (win32_attach): Set the `attaching' global.
12167 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12168 attaching. Only set a breakpoint at the entry point if not
12169 attaching.
12170
311de423
PA
121712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12172
12173 * server.c (main): Don't report dll events on the initial
12174 connection on attaches.
12175
6c2d16d2
PA
121762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12177
12178 * server.c (main): Relax numerical bases supported for the pid of
12179 the --attach command line argument.
12180
5ca906e6
PA
121812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12182
12183 * win32-low.c (win32_attach): Call OpenProcess before
12184 DebugActiveProcess, not after. Add last error output to error
12185 call.
12186
9c6c8194
PA
121872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12188
12189 * win32-low.c (win32_get_thread_context)
12190 (win32_set_thread_context): New functions.
12191 (thread_rec): Use win32_get_thread_context.
12192 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12193 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12194 field.
12195
4d5d1aaa
PA
121962007-12-03 Leo Zayas
12197 Pedro Alves <pedro_alves@portugalmail.pt>
12198
12199 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12200 global variables.
12201 (child_add_thread): Minor cleanup.
12202 (child_continue): Resume artificially suspended threads before
12203 calling ContinueDebugEvent.
12204 (suspend_one_thread): New.
12205 (fake_breakpoint_event): New.
12206 (get_child_debug_event): Change return type to int. Check here if
12207 gdb sent an interrupt request. If a soft interrupt was requested,
12208 fake a breakpoint event. Return 0 if there is no event to handle,
12209 and 1 otherwise.
12210 (win32_wait): Don't check here if gdb sent an interrupt request.
12211 Ensure there is a valid event to handle.
12212 (win32_request_interrupt): Add soft interruption method as last
12213 resort.
12214
c436e841
PA
122152007-12-03 Leo Zayas
12216 Pedro Alves <pedro_alves@portugalmail.pt>
12217
12218 * win32-low.h (win32_thread_info): Add descriptions to the
12219 structure members. Replace `suspend_count' counter by a
12220 `suspended' flag.
12221 * win32-low.c (thread_rec): Update condition of when to get the
12222 context from the inferior. Rely on ContextFlags being set if it
12223 has already been retrieved. Only suspend the inferior thread if
12224 we haven't already. Warn if that fails.
12225 (continue_one_thread): s/suspend_count/suspended/. Only call
12226 ResumeThread once. Warn if that fails.
12227
e7b5fa67
PA
122282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12229
12230 * win32-low.c (win32_wait): Don't read from the inferior when it
12231 has already exited.
12232
a385171d
PA
122332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12234
12235 * Makefile.in (win32_low_h): New variable.
12236 (win32-low.o): Add dependency on $(win32_low_h).
12237 (win32-arm-low.o, win32-i386-low.o): New rules.
12238
f80c84b3
DJ
122392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12240
12241 * hostio.c: Correct copyright year.
12242
a6b151f1
DJ
122432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12244
12245 * Makefile.in (OBS): Add hostio.o.
12246 (hostio.o): New rule.
12247 * server.h (handle_vFile): Declare.
12248 * hostio.c: New file.
12249 * server.c (handle_v_requests): Take packet_len and new_packet_len
12250 for binary packets. Call handle_vFile.
12251 (main): Update call to handle_v_requests.
12252
f9387fc3
DJ
122532007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12254
12255 * linux-low.c: Include <sched.h>.
12256
51c2684e
DJ
122572007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12258
12259 * linux-low.c (linux_tracefork_grandchild): New.
12260 (linux_tracefork_child): Use clone.
12261 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12262
75f83163
JB
122632007-10-31 Joel Brobecker <brobecker@adacore.com>
12264
12265 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12266
da5898ce
DJ
122672007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12268
12269 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12270
24a09b5f
DJ
122712007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12272
12273 * inferiors.c (change_inferior_id): Delete.
12274 (add_pid_to_list, pull_pid_from_list): New.
12275 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12276 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12277 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12278 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12279 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12280 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12281 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12282 (using_threads): Always set to 1.
12283 (handle_extended_wait): New.
12284 (add_process): Do not set TID.
12285 (linux_create_inferior): Set must_set_ptrace_flags.
12286 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12287 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12288 (linux_thread_alive): Rename TID argument to LWPID.
12289 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12290 (linux_wait_for_event): Do not use TID or check using_threads. Update
12291 call to dead_thread_notify. Call handle_extended_wait.
12292 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12293 (send_sigstop): Delete sigstop_sent.
12294 (wait_for_sigstop): Avoid TID.
12295 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12296 (linux_test_for_tracefork): New.
12297 (linux_lookup_signals): Use thread_db_active and
12298 linux_supports_tracefork_flag.
12299 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12300 * linux-low.h (get_process_thread): Avoid TID.
12301 (struct process_ifo): Move thread_known and tid to the end. Remove
12302 sigstop_sent.
12303 (linux_attach_lwp, thread_db_init): Update prototypes.
12304 * server.h (change_inferior_id): Delete prototype.
12305 (add_pid_to_list, pull_pid_from_list): New prototypes.
12306 * thread-db.c (thread_db_use_events): New.
12307 (find_first_thread): Rename to...
12308 (find_one_thread): ...this. Update callers and messages. Do not
12309 call fatal. Check thread_db_use_events. Do not call
12310 change_inferior_id or new_thread_notify.
12311 (maybe_attach_thread): Update. Do not call new_thread_notify.
12312 (thread_db_init): Set thread_db_use_events. Check use_events.
12313 * utils.c (fatal, warning): Correct message prefix.
12314
30ed0a8f
DJ
123152007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12316
12317 * Makefile.in (clean): Remove new files.
12318 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12319 (powerpc-64.o, powerpc-64.c): New rules.
12320 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12321 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12322 with SPE.
12323 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12324 SPE targets.
12325 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12326 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12327 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12328 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12329 (target_regsets): Add AltiVec and SPE register sets.
12330 * configure.ac: Check for AltiVec and SPE.
12331 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12332 (ppc_fill_vrregset, ppc_store_vrregset): New.
12333 (target_regsets): Add AltiVec register set.
12334 * configure: Regenerated.
12335
fd462a61
DJ
123362007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12337
12338 * linux-low.c (O_LARGEFILE): Define.
12339 (linux_read_memory): Use /proc/PID/mem.
12340 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12341 * configure, config.in: Regenerated.
12342
69f223ed
DJ
123432007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * linux-low.c (linux_wait_for_event): Do not pass signals while
12346 single-stepping.
12347
aec18585
PA
123482007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12349
12350 * win32-low.c (create_process): New.
12351 (win32_create_inferior): Use create_process instead of
12352 CreateProcess. If create_process failed retry appending an ".exe"
12353 suffix. Store the GetLastError result immediatelly after
12354 create_process calls and use it on the call to error.
12355
34d86ddd
PA
123562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12357
12358 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12359
5a0e3bd0
JB
123602007-08-23 Joel Brobecker <brobecker@adacore.com>
12361
12362 * configure.ac: Switch license to GPLv3.
12363
f88c79e6
MS
123642007-08-01 Michael Snyder <msnyder@access-company.com>
12365
12366 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12367
6b3d9b83
PA
123682007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12369
12370 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12371 typedef.
12372 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12373 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12374 CloseToolhelp32Snapshot.
12375 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12376 CloseToolhelp32Snapshot.
12377
c588c53c
MS
123782007-07-27 Michael Snyder <michael.snyder@access-company.com>
12379
12380 * server.c (main): Check for inferior exit before main loop.
12381
aa0403d9
PA
123822007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12383
12384 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12385 instead of on tmp_desc.
12386
255e7678
DJ
123872007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12388 Daniel Jacobowitz <dan@codesourcery.com>
12389
12390 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12391 (add_thread): Minor cleanups.
12392 (clear_inferiors): Move lower in the file. Clear the DLL
12393 list.
12394 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12395 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12396 (xml_escape_text): New.
12397 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12398 for qSupported.
12399 (handle_v_cont): Report errors.
12400 (gdbserver_version): Update.
12401 (main): Correct size of own_buf. Do not report initial DLL events.
12402 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12403 (unloaded_dll, xml_escape_text): New.
12404 * win32-low.c (enum target_waitkind): Update comments.
12405 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12406 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12407 (win32_EnumProcessModules, win32_GetModuleInformation)
12408 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12409 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12410 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12411 (win32_Module32First, win32_Module32Next, load_toolhelp)
12412 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12413 (get_child_debug_event): Handle DLL events.
12414 (win32_wait): Likewise.
12415
0d37add9
DJ
124162007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12417
12418 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12419 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12420
45e2715e
PA
124212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12422
12423 * win32-low.c (handle_output_debug_string): Ignore event if not
12424 waiting.
12425
c5674cf1
PA
124262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12427
12428 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12429
2bbe3cc1
DJ
124302007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12431
12432 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12433
ae13219e
DJ
124342007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12435
12436 * inferiors.c (change_inferior_id): Add comment.
12437 * linux-low.c (check_removed_breakpoint): Add an early
12438 prototype. Improve debug output.
12439 (linux_attach): Doc update.
12440 (linux_detach_one_process, linux_detach): Clean up before releasing
12441 each process.
12442 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12443 * linux-low.h (struct process_info): Doc improvement.
12444 * mem-break.c (delete_all_breakpoints): New.
12445 * mem-break.h (delete_all_breakpoints): New prototype.
12446 * thread-db.c (find_first_thread): New.
12447 (thread_db_create_event): Call it instead of
12448 thread_db_find_new_threads. Clean up unused variables.
12449 (maybe_attach_thread): Remove first thread handling.
12450 (thread_db_find_new_threads): Use find_first_thread.
12451 (thread_db_get_tls_address): Likewise.
12452
4105de34
DJ
124532007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12454
12455 * thread-db.c (thread_db_find_new_threads): Add prototype.
12456 (thread_db_create_event): Check for the main thread before adding
12457 a new thread.
12458 (maybe_attach_thread): Only enable event reporting if TID == 0.
12459 (thread_db_get_tls_address): Check for new threads.
12460
2b876972
DJ
124612007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12462
12463 * linux-low.c (linux_create_inferior): Try execv before execvp.
12464 * spu-low.c (spu_create_inferior): Likewise.
12465
7a245884
DJ
124662007-06-13 Mike Frysinger <vapier@gentoo.org>
12467
12468 * linux-low.c (linux_create_inferior): Change execv to execvp.
12469 * spu-low.c (spu_create_inferior): Likewies.
12470
117ce543
DJ
124712007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12472
12473 * Makefile.in (clean): Clean new files instead of deleted ones.
12474 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12475 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12476 rules.
12477 * configure.srv: Specify XML files and new regformats for MIPS and
12478 MIPS64 GNU/Linux.
12479 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12480 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12481 an entry for the restart register.
12482 (mips_cannot_fetch_register, mips_cannot_store_register)
12483 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12484 register names to match the XML descriptions.
12485 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12486 restart register instead of $0.
12487
0e7f50da
UW
124882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12489 Markus Deuling <deuling@de.ibm.com>
12490
12491 * remote-utils.c (decode_xfer_write): New function.
12492 * server.h (decode_xfer_write): Add prototype.
12493 * server.c (handle_query): Add PACKET_LEN argument. Support
12494 qXfer:spu:read and qXfer:spu:write packets.
12495 (main): Pass packet_len to handle_query.
12496 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12497 * target.h (target_ops): Add qxfer_spu.
12498
374c1d38
UW
124992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12500
12501 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12502 accessing non-seekable spufs files.
12503
bb63802a
UW
125042007-05-16 Markus Deuling <deuling@de.ibm.com>
12505
889bf7c5 12506 * server.c (handle_query): Add reply for qC packet.
bb63802a 12507
7390519e
PA
125082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12509 Leo Zayas <lerele@champenstudios@com>
12510
12511 * server.h (check_remote_input_interrupt_request): New function.
12512 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12513 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12514 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12515 (check_remote_input_interrupt_request): New function.
12516 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12517 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12518 winapi_GenerateConsoleCtrlEvent): New typedefs.
12519 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12520 to 250 ms.
12521 (win32_wait): Check for remote interrupt request
12522 with check_remote_input_interrupt_request.
12523 (win32_request_interrupt): New function.
12524 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12525
34b34921
PA
125262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12527
12528 * win32-low.c (debug_registers_changed,
12529 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12530 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12531 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12532 (thread_rec): Get context using the low target.
12533 (child_add_thread): Call thread_added on the low target,
12534 which does the same thing.
12535 (regptr): Delete.
12536 (do_initial_child_stuff): Remove debug registers references.
12537 Set context using the low target. Resume threads after
12538 setting the contexts.
12539 (child_continue): Remove dead variable. Remove debug
12540 registers references.
12541 (child_fetch_inferior_registers): Go through the low target.
12542 (do_child_store_inferior_registers): Remove.
12543 (child_store_inferior_registers): Go through the low target.
12544 (win32_resume): Remove debug registers references.
12545 Set context using the low target.
12546 (handle_exception): Change return type to void. Don't record
12547 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12548 first chance exception.
889bf7c5 12549 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12550 goto loop. Always return after waiting for debug event.
12551 (win32_wait): Convert to switch statement. Handle spurious
12552 events.
12553
12554 * win32-i386-low.c (debug_registers_changed,
12555 debug_registers_used): New.
12556 (initial_stuff): Rename to ...
12557 (i386_initial_stuff): ... this. Clear debug registers
12558 state variables.
12559 (store_debug_registers): Delete.
12560 (i386_get_thread_context): New.
12561 (load_debug_registers): Delete.
12562 (i386_set_thread_context): New.
12563 (i386_thread_added): New.
12564 (single_step): Rename to ...
12565 (i386_single_step): ... this.
12566 (do_fetch_inferior_registers): Rename to ...
12567 (i386_fetch_inferior_register): ... this.
12568 (i386_store_inferior_register): New.
12569 (the_low_target): Adapt to new interface.
12570
12571 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12572 (arm_get_thread_context): New.
12573 (arm_set_thread_context): New.
12574 (regptr): New.
12575 (do_fetch_inferior_registers): Rename to ...
12576 (arm_fetch_inferior_register): ... this.
12577 (arm_store_inferior_register): New.
12578 (arm_wince_breakpoint): Reimplement as unsigned long.
12579 (arm_wince_breakpoint_len): Define.
12580 (the_low_target): Adapt to new interface.
12581
12582 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12583 load_debug_registers. Add get_thread_context, set_thread_context,
12584 thread_added and store_inferior_register. Rename
12585 fetch_inferior_registers to fetch_inferior_register.
12586 (regptr): Remove declaration.
12587
dd6953e1
PA
125882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12589
12590 * linux-low.c (linux_detach): Change return type to int. Return 0.
12591 * spu-low.c (spu_detach): Likewise.
12592
444d6139
PA
125932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12594
12595 * target.h (target_ops): Change return type of detach to int.
12596 Add join.
12597 (join_inferior): New.
12598 * server.c (main): Don't skip detach support on mingw32.
12599 If the inferior doesn't support detaching return error.
12600 Call join_inferior instead of using waitpid.
12601 * linux-low.c (linux_join): New.
12602 (linux_target_op): Add linux_join.
12603 * spu-low.c (spu_join): New.
12604 (spu_target_ops): Add spu_join.
12605 * win32-low.c (win32_detach): Adapt to new interface.
12606 Reopen current_process_handle before detaching. Issue a child
12607 resume before detaching.
12608 (win32_join): New.
12609 (win32_target_op): Add win32_join.
12610
1d5315fe
PA
126112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12612
12613 * win32-low.c (win32-attach): Fix return value.
12614 * target.h (target_ops): Describe ATTACH return values.
12615
bf914831
PA
126162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12617
12618 * win32-low.c (GETPROCADDRESS): Define.
12619 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12620 (winapi_DebugSetProcessKillOnExit): Likewise.
12621 (win32_create_inferior): Force usage of ansi CreateProcessA.
12622 (win32_attach): Use GETPROCADDRESS.
12623 (win32_detach): Likewise.
12624
f72f3e60
PA
126252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12626
12627 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12628
ed50f18f
PA
126292007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12630
12631 * win32-low.c: Commit leftover changes from 2007-03-29.
12632
0c2ead7e
DJ
126332007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12634
12635 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12636 fields short instead of int. Add explicit padding.
12637 (i387_cache_to_fsave): Remove unnecessary casts.
12638 (i387_fsave_to_cache): Doc fix.
12639 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12640
73725ff3
DJ
126412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12642
12643 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12644 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12645
d99f33d8
PA
126462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12647
12648 * configure.srv (arm*-*-mingw32ce*): Move near the other
12649 arm targets.
12650
68070c10
PA
126512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12652
2482afc6 12653 * configure.ac: Add errno checking.
68070c10
PA
12654 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12655 sys/file.h and malloc.h.
12656 (AC_CHECK_DECLS): Add perror.
12657 (srv_mingwce): Handle.
2482afc6 12658 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12659 win32-i386-low.o to srv_tgtobj.
12660 (i[34567]86-*-mingw*): Likewise.
12661 (arm*-*-mingw32ce*): Add case.
12662 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12663 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12664 [__MINGW32CE__] (strerror): New function.
12665 [__MINGW32CE__] (errno): Define to GetLastError.
12666 [__MINGW32CE__] (COUNTOF): New macro.
12667 (remote_open): Remove extra close call.
12668 * mem-break.c (delete_breakpoint_at): New function.
12669 * mem-break.h (delete_breakpoint_at): Declare.
12670 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12671 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12672 [USE_WIN32API] (read, write): Add char* casts.
12673 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12674 * server.h: Include wincecompat.h on Windows CE.
12675 [HAVE_ERRNO_H]: Check.
12676 (perror): Declare if not declared.
12677 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12678 (perror_with_name): Remove errno declaration.
12679 * wincecompat.h: New.
12680 * wincecompat.c: New.
12681 * win32-low.h: New.
12682 * win32-arm-low.c: New.
12683 * win32-i386-low.c: New.
12684 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12685 (OUTMSG2): Make it safe.
12686 (_T): New macro.
12687 (COUNTOF): New macro.
12688 (NUM_REGS): Get it from the low target.
12689 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12690 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12691 (thread_rec): Let low target handle debug registers.
12692 (child_add_thread): Likewise.
12693 (child_init_thread_list): Likewise.
12694 (continue_one_thread): Likewise.
12695 (regptr): New.
12696 (do_child_fetch_inferior_registers): Move to ...
12697 * win32-i386-low.c: ... here, and rename to ...
12698 (do_fetch_inferior_registers): ... this.
889bf7c5 12699 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12700 Go through the low target.
12701 (do_child_store_inferior_registers): Use regptr.
12702 (strwinerror): New function.
12703 (win32_create_inferior): Handle Windows CE.
12704 Use strwinerror instead of strerror on Windows error
12705 codes. Add program to the error output.
12706 Don't close the main thread handle on Windows CE.
12707 (win32_attach): Use coredll.dll on Windows CE.
12708 (win32_kill): Close current process and current
12709 thread handles.
12710 (win32_detach): Use coredll.dll on Windows CE.
12711 (win32_resume): Let low target handle debug registers, and
12712 step request.
12713 (handle_exception): Add/Remove initial breakpoint. Avoid
12714 non-existant WSTOPSIG on Windows CE.
12715 (win32_read_inferior_memory): Cast to remove warning.
12716 (win32_arch_string): Go through the low target.
12717 (initialize_low): Call set_breakpoint_data with the low
12718 target's breakpoint.
12719 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12720 FOP_REGNUM, mappings): Move to ...
12721 * win32-i386-low.c: ... here.
12722 * win32-low.c (win32_thread_info): Move to ...
12723 * win32-low.h: ... here.
12724 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12725 win32-arm-low.c and wincecompat.c.
12726 (all:): Add $EXEEXT.
12727 (install-only:): Likewise.
12728 (gdbserver:): Likewise.
12729 (gdbreplay:): Likewise.
12730 * config.in: Regenerate.
12731 * configure: Regenerate.
12732
41093d81
PA
127332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12734
12735 * win32-low.c: Rename typedef thread_info to
12736 win32_thread_info throughout.
12737
544afa54
PA
127382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12739
12740 * win32-i386-low.c: Rename to ...
12741 * win32-low.c: ... this.
12742 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12743 * Makefile.in: Likewise.
12744
bce7165d
PA
127452007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12746
12747 * remote-utils.c (monitor_output): Constify msg parameter.
12748 * server.h (monitor_output): Likewise.
12749 * win32-i386-low.c (handle_output_debug_string): New.
12750 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12751 handle_output_debug_string.
12752 (get_child_debug_event): Likewise.
12753
506c7aa0
DJ
127542007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12755
12756 * server.c (main): Correct strtoul check.
12757
42c81e2a
DJ
127582007-03-27 Jon Ringle <jon@ringle.org>
12759
12760 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12761
9453113a
DJ
127622007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12763
12764 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12765
64a69107
DJ
127662007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12767
12768 * terminal.h: Check HAVE_SGTTY_H.
12769
127702007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12771
12772 * remote-utils.c (remote_open): Print out the assigned port number.
12773
c74d0ad8
DJ
127742007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * remote-utils.c (monitor_output): New function.
12777 * server.c (debug_threads): Define here.
12778 (monitor_show_help): New function.
12779 (handle_query): Handle qRcmd.
12780 (main): Do not handle 'd' packet.
12781 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12782 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12783 of debug_threads.
12784
de7c3b4a
PA
127852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12786
12787 * Makefile.in (EXEEXT): New.
12788 (clean): Use $(EXEEXT).
12789
ef57601b
PA
127902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12791
12792 * target.h (target_ops): Rename send_signal to request_interrupt,
12793 and remove enum target_signal parameter.
12794 * linux-low.c (linux_request_interrupt): Rename from
12795 linux_send_signal, and always send SIGINT.
12796 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12797 and always send SIGINT.
12798 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12799 of send_signal.
12800 (input_interrupt): Likewise.
12801
820f2bda
PA
128022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12803
12804 * server.c (get_features_xml): Check if target implemented
12805 arch_string.
12806 * win32-i386-low.c (win32_arch_string): New.
12807 (win32_target_ops): Add win32_arch_string as arch_string member.
12808
ab39bf24
UW
128092007-02-22 Markus Deuling <deuling@de.ibm.com>
12810
12811 * spu-low.c (spu_arch_string): New.
12812 (spu_target_ops): Add spu_arch_string.
12813
61ff6e04
DJ
128142007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12815
12816 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12817 * configure.ac: Do not check for terminal.h.
12818 * configure, config.in: Regenerated.
12819
fb1e4ffc
DJ
128202007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12821
12822 * Makefile.in (OBS): Add $(XML_BUILTIN).
12823 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12824 (clean): Update.
12825 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12826 (arm-with-iwmmxt.c): New.
12827 * config.in, configure: Regenerate.
12828 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12829 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12830 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12831 (arm*-*-linux*): Add iWMMXt and regset support.
12832 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12833 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12834 (arm_store_wmmxregset, target_regsets): New.
12835 * server.c (get_features_xml): Take annex argument. Check builtin
12836 XML documents.
12837 (handle_query): Handle multiple annexes.
12838
0f48aa01
DJ
128392007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12840
12841 * remote-utils.c [USE_WIN32API] (read, write): Define.
12842 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12843 write.
12844
23181151
DJ
128452007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12846
12847 * linux-i386-low.c (the_low_target): Set arch_string.
12848 * linux-x86-64-low.c (the_low_target): Likewise.
12849 * linux-low.c (linux_arch_string): New.
12850 (linux_target_ops): Add it.
12851 * linux-low.h (struct linux_target_ops): Add arch_string.
12852 * server.c (write_qxfer_response): Use const void * for DATA.
12853 (get_features_xml): New.
12854 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12855 * target.h (struct target_ops): Add arch_string method.
12856
9d606399
DJ
128572007-01-03 Denis Pilat <denis.pilat@st.com>
12858 Daniel Jacobowitz <dan@codesourcery.com>
12859
12860 * linux-low.c (linux_kill): Handle being called with no threads.
12861 * win32-i386-low.c (win32_kill): Likewise.
12862 (get_child_debug_event): Clear current_process_handle.
12863
128642006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12865 Daniel Jacobowitz <dan@codesourcery.com>
12866
12867 * remote-utils.c (remote_open): Check the type of specified
12868 serial port devices before opening them.
12869 * server.c (main): Kill the inferior if an error occurs during
12870 the first remote_open.
12871
a5e13d24
DJ
128722006-12-05 Markus Deuling <deuling@de.ibm.com>
12873
12874 * README: Update supported targets.
12875
186947f7
DJ
128762006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * Makefile.in (clean): Remove reg-mips64.c.
12879 (reg-mips64.c, reg-mips64.o): New rules.
12880 * configure.srv: Handle mips64. Include regset support for mips.
12881 * linux-mips-low.c (union mips_register): New.
12882 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12883 (mips_breakpoint, mips_breakpoint_at): Use int.
12884 (mips_collect_register, mips_supply_register)
12885 (mips_collect_register_32bit, mips_supply_register_32bit)
12886 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12887 (mips_store_fpregset, target_regsets): New.
12888 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12889
a13e2c95
UW
128902006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12891
12892 * configure.srv: Add target "spu*-*-*".
12893 * Makefile.in (clean): Remove reg-spu.c.
12894 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12895 * spu-low.c: New file.
12896
cb7283db
DJ
128972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12898
12899 * configure.ac: Correct td_thr_tls_get_addr test.
12900 * configure: Regenerated.
12901
89be2091
DJ
129022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12903
12904 * linux-low.c (linux_wait_for_event): Reformat. Use the
12905 pass_signals array.
12906 * remote-utils.c (decode_address_to_semicolon): New.
12907 * server.c (pass_signals, handle_general_set): New.
12908 (handle_query): Mention QPassSignals for qSupported.
12909 (main): Call handle_general_set.
12910 * server.h (pass_signals, decode_address_to_semicolon): New.
12911
000ef4f0
DJ
129122006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12913
12914 * server.c (handle_query): Correct error handling for read_auxv.
12915
b7149293
UW
129162005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12917
12918 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12919 and srv_linux_thread_db to yes.
12920 * linux-s390-low.c (s390_fill_gregset): New function.
12921 (target_regsets): Define data structure.
12922
dae5f5cf
DJ
129232006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12924
12925 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12926 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12927 * config.in, configure: Regenerated.
12928 * inferiors.c (gdb_id_to_thread): New function.
12929 (gdb_id_to_thread_id): Use it.
12930 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12931 * linux-low.h (struct process_info): Add th member.
12932 (thread_db_get_tls_address): New prototype.
12933 * remote-utils.c (decode_address): Make non-static.
12934 * server.c (handle_query): Handle qGetTLSAddr.
12935 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12936 * target.h (struct target_ops): Add get_tls_address.
12937 * thread-db.c (maybe_attach_thread): Save the thread handle.
12938 (thread_db_get_tls_address): New.
12939
32ca6d61
DJ
129402006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12941
12942 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12943 (linux_resume_one_process): Take a siginfo_t *. Update all
12944 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12945 (struct pending_signals): Add a siginfo_t.
12946 (linux_wait_for_process): Always set last_status.
12947 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12948 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12949 * linux-low.h (struct process_info): Add last_status.
12950
5ffff7c1
DJ
129512006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12952
12953 * remote-utils.c (try_rle): New function.
12954 (putpkt_binary): Use it.
12955
8695c747
DJ
129562006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12957
12958 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12959 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12960 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12961 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12962 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12963 point registers.
12964
290fadea
RS
129652006-08-08 Richard Sandiford <richard@codesourcery.com>
12966
12967 * server.c (terminal_fd): New variable.
12968 (old_foreground_pgrp): Likewise.
12969 (restore_old_foreground_pgrp): New function.
12970 (start_inferior): Record the terminal file descriptor in terminal_fd
12971 and its original foreground group in old_foreground_pgrp. Register
12972 restore_old_foreground_pgrp with atexit().
12973
9f2e1e63
DJ
129742006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12975
12976 * server.c (handle_query): Correct qPart to qXfer.
12977
b80864fb
DJ
129782006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12979
12980 * configure.ac: Check for more headers which are missing on
12981 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12982 * configure.srv: Add Cygwin and mingw32.
12983 * remote-utils.c: Don't include headers unconditionally which
12984 are missing on mingw32. Include <winsock.h> for mingw32.
12985 (remote_open): Adjust for mingw32 support. Flush
12986 standard error after writing to it.
12987 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12988 (unblock_async_io, enable_async_io, disable_async_io)
12989 (readchar, getpkt): Update for Winsock support.
12990 (prepare_resume_reply): Expect a protocol signal number.
12991 * server.c: Disable <sys/wait.h> on mingw32.
12992 (start_inferior): Adjust for mingw32 support. Flush
12993 standard error after writing to it.
12994 (attach_inferior): Likewise. Use protocol signal
12995 numbers.
12996 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12997 and names.
12998 * win32-i386-low.c: New file.
12999 * Makefile.in (XM_CLIBS): Set.
13000 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13001 (win32-i386-low.o): New dependency rule.
13002 * linux-low.c (linux_wait): Use target signal numbers.
13003 * target.h (struct target_ops): Doc fix.
13004 * server.h (target_signal_to_name): New prototype.
13005 * gdbreplay.c: Don't include headers unconditionally which
13006 are missing on mingw32. Include <winsock.h> for mingw32.
13007 (remote_close, remote_open): Adjust for Winsock support.
13008 * configure, config.in: Regenerated.
13009
0876f84a
DJ
130102006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13011
13012 * server.c (decode_xfer_read, write_qxfer_response): New.
13013 (handle_query): Take a packet length argument. Handle
13014 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13015 the qSupported response.
13016 (main): Update call to handle_query.
13017
01f9e8fa
DJ
130182006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13019
13020 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13021 (putpkt_binary): Renamed from putpkt and adjusted for binary
13022 data.
13023 (putpkt): New wrapper for putpkt_binary.
13024 (readchar): Don't mask off the high bit.
13025 (decode_X_packet): New function.
13026 * server.c (main): Call putpkt_binary if a handler sets the packet
13027 length. Save the length of the incoming packet. Handle 'X'.
13028 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13029
be2a5f71
DJ
130302006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13031
13032 * server.c (handle_query): Handle qSupported.
13033
ea025f5f
DJ
130342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13035
13036 * remote-utils.c (all_symbols_looked_up): New variable.
13037 (look_up_one_symbol): Check it.
13038 * server.h (look_up_one_symbol): New declaration.
13039 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13040
9308fc88
DJ
130412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13042
13043 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13044 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13045 (PTRACE_GET_THREAD_AREA): Define.
13046 (ps_get_thread_area): New function.
13047
52fb6437
NS
130482006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13049
13050 * configure.srv (m68k*-*-uclinux*): New target.
13051 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13052 (linux_resume_one_process): Remove extraneous cast.
13053 (linux_read_offsets): New.
13054 (linux_target_op): Add linux_read_offsets on mmuless systems.
13055 * server.c (handle_query): Add qOffsets logic.
13056 * target.h (struct target_ops): Add read_offsets.
13057
21b0f40c
DJ
130582006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13059
13060 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13061 (PTRACE_GET_THREAD_AREA): Define.
13062 (ps_get_thread_area): New function.
13063 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13064 (linux-x86-64-low.o): Update.
13065
0050a760
DJ
130662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13067
13068 * configure.ac: Remove checks for prfpregset_t.
13069 * gdb_proc_service.h: New file.
13070 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13071 new "gdb_proc_service.h".
13072 * proc-service.c: Likewise.
13073 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13074 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13075 * Makefile.in (gdb_proc_service_h): Updated.
13076 * configure, config.in: Regenerated.
13077
b92a518e
DJ
130782006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13079
13080 * remote-utils.c (prepare_resume_reply): Move declaration
13081 of gdb_id_from_wait to the top of the block.
13082
545587ee
DJ
130832006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13084
13085 * linux-low.c (regsets_store_inferior_registers): Read the regset
13086 from the target before filling it.
13087
9db87ebd
DJ
130882006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13089
13090 * server.c (attach_inferior): Return SIGTRAP for a successful
13091 attach.
13092
dd24457d
DJ
130932006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13094
13095 * Makefile.in (OBS): Add version.o.
13096 (STAGESTUFF): Delete.
13097 (version.o): Add dependencies.
13098 (version.c): Replace rule.
13099 (clean): Remove version.c.
13100 * server.c (gdbserver_version): New.
13101 (gdbserver_usage): Use printf.
13102 (main): Handle --version and --help.
13103 * server.h (version, host_name): Add declarations.
13104
6f0f660e
EZ
131052005-12-23 Eli Zaretskii <eliz@gnu.org>
13106
889bf7c5
PA
13107 * linux-arm-low.c:
13108 * linux-arm-low.c:
13109 * inferiors.c:
13110 * i387-fp.h:
13111 * i387-fp.c:
13112 * gdbreplay.c:
13113 * regcache.c:
13114 * proc-service.c:
13115 * mem-break.h:
13116 * mem-break.c:
13117 * linux-x86-64-low.c:
13118 * linux-sh-low.c:
13119 * linux-s390-low.c:
13120 * linux-ppc64-low.c:
13121 * linux-ppc-low.c:
13122 * linux-mips-low.c:
13123 * linux-m68k-low.c:
13124 * linux-m32r-low.c:
13125 * linux-low.h:
13126 * linux-low.c:
13127 * linux-ia64-low.c:
13128 * linux-i386-low.c:
13129 * linux-crisv32-low.c:
13130 * thread-db.c:
13131 * terminal.h:
13132 * target.h:
13133 * target.c:
13134 * server.h:
13135 * server.c:
13136 * remote-utils.c:
13137 * regcache.h:
13138 * utils.c:
13139 * Makefile.in:
13140 * configure.ac:
6f0f660e
EZ
13141 * gdbserver.1: Add (C) after Copyright. Update the FSF
13142 address.
13143
9d1fb177
DJ
131442005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13145
13146 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13147 (arm_breakpoint_at): Recognize both breakpoints.
13148 (the_low_target): Use the correct breakpoint instruction.
13149
011a70c2
DJ
131502005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13151
13152 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13153 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13154 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13155 (the_low_target): Update.
13156
7fb85e41
AS
131572005-10-25 Andreas Schwab <schwab@suse.de>
13158
13159 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13160
13161 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13162 (ia64_num_regs): Reduce to 462.
13163
3db0444b
DJ
131642005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * acinclude.m4: Correct quoting.
13167 * aclocal.m4: Regenerated.
13168
13169 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13170 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13171 (thread_db_init): Call thread_db_err_str.
13172 * configure.ac: Check for TD_VERSION.
13173 * config.in, configure: Regenerated.
13174
bee0189a
DJ
131752005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13176
13177 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13178
e9d25b98
DJ
131792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13180
13181 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13182 is not available. Define HAVE_PTRACE_GETREGS if it is.
13183 * config.in, configure: Regenerated.
13184 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13185 * linux-i386-low.c, linux-m68k-low.c: Update to use
13186 HAVE_PTRACE_GETREGS.
13187 * linux-low.c (regsets_fetch_inferior_registers)
13188 (regsets_store_inferior_registers): Only return 0 if we processed
13189 GENERAL_REGS.
13190 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13191 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13192
a06660f7
DJ
131932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * inferiors.c (struct thread_info): Add gdb_id.
13196 (add_thread): Add gdb_id argument.
13197 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13198 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13199 calls to add_thread.
13200 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13201 * server.c (handle_query): Use thread_to_gdb_id.
13202 (handle_v_cont, main): Use gdb_id_to_thread_id.
13203 * server.h (add_thread): Update prototype.
13204 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13205 prototypes.
13206
5a1f5858
DJ
132072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13208
13209 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13210 left-padded registers.
13211 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13212 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13213
e122f1f5
SE
132142005-07-01 Steve Ellcey <sje@cup.hp.com>
13215
13216 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13217 * configure: Regenerate.
13218 * config.in: Regenerate.
13219 * server.h (NEED_DECLARATION_STRERROR):
13220 Replace with !HAVE_DECL_STRERROR.
13221
d592fa2f
DJ
132222005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13223
13224 * linux-low.c (linux_wait, linux_send_signal): Don't test
13225 an unsigned long variable for > 0 if it could be MAX_ULONG.
13226 * server.c (myresume): Likewise.
13227 * target.c (set_desired_inferior): Likewise.
13228
ccbd4912
MK
132292005-06-13 Mark Kettenis <kettenis@gnu.org>
13230
13231 * configure.ac: Simplify and improve check for socklen_t.
13232 * configure, config.in: Regenerate.
13233
f450004a
DJ
132342005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13235
13236 * acconfig.h: Remove.
13237 * configure.ac: Add a test for socklen_t. Use three-argument
13238 AC_DEFINE throughout.
13239 * config.in: Regenerated using autoheader 2.59.
13240 * configure: Regenerated.
13241
13242 * gdbreplay.c (socklen_t): Provide a default.
13243 (remote_open): Use socklen_t.
13244 * remote-utils.c (socklen_t): Provide a default.
13245 (remote_open): Use socklen_t.
13246 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13247 unsigned char.
13248
13249 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13250 char for buffers.
13251 * linux-low.c (linux_read_memory, linux_write_memory)
13252 (linux_read_auxv): Likewise.
13253 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13254 (check_mem_write): Likewise.
13255 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13256 Likewise.
13257 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13258 (registers_from_string, register_data): Likewise.
13259 * server.c (handle_query, main): Likewise.
13260 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13261 (decode_M_packet): Likewise.
13262 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13263 * target.h (struct target_ops): Update read_memory, write_memory,
13264 and read_auxv.
13265 (read_inferior_memory, write_inferior_memory): Update.
13266 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13267 to unsigned char *.
13268 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13269 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13270 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13271 linux-s390-low.c, linux-sh-low.c: Update for changes in
13272 read_inferior_memory and the_low_target->breakpoint.
13273
eee84df1
DJ
132742005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13277 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13278 * configure.srv: Add powerpc64-*-linux*.
13279 * linux-ppc64-low.c: New file.
13280
45b134e5
OF
132812005-05-23 Orjan Friberg <orjanf@axis.com>
13282
13283 * linux-cris-low.c: New file with support for CRIS.
13284 * linux-crisv32-low.c: Ditto for CRISv32.
13285 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13286 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13287 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13288 reg-crisv32.o, and reg-crisv32.c to make rules.
13289 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13290 recognized targets.
13291
48d93c75
UW
132922005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13293
13294 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13295 of sizeof (PTRACE_XFER_TYPE).
13296 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13297
e013ee27
OF
132982005-05-12 Orjan Friberg <orjanf@axis.com>
13299
889bf7c5 13300 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13301 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13302 pointers for hardware watchpoint support.
13303 * linux-low.h (struct linux_target_ops): Ditto.
13304 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13305 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13306 to linux_target_ops.
13307 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13308 reply packet.
13309 * server.c (main): Recognize 'Z' and 'z' packets.
13310
b0ded00b
UW
133112005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13312
13313 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13314 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13315 (the_low_target): Add new members.
13316
8643e2ad
DJ
133172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13318
13319 * proc-service.c (ps_lgetregs): Search all_processes instead of
13320 all_threads.
13321
fc620387
DJ
133222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13323
13324 * server.c (start_inferior): Change return type to int.
13325 (attach_inferior): Change sigptr to int *.
13326 (handle_v_cont, handle_v_requests): Change signal to int *.
13327 (main): Change signal to int.
13328
133292005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13330
13331 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13332 * configure.srv: Add m32r*-*-linux*.
13333 * linux-m32r-low.c: New file.
13334
e0e76420
DJ
133352005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13336
13337 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13338
a1928bad
DJ
133392005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13340
13341 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13342 Take unsigned long arguments for PIDs.
13343 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13344 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13345 (wait_for_sigstop, linux_resume_one_process)
13346 (regsets_fetch_inferior_registers, linux_send_signal)
13347 (linux_read_auxv): Likewise. Update the types of variables holding
13348 PIDs. Update format string specifiers.
13349 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13350 * remote-utils.c (prepare_resume_reply): Likewise.
13351 * server.c (cont_thread, general_thread, step_thread)
13352 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13353 unsigned long.
13354 (handle_query): Update format specifiers.
13355 (handle_v_cont, main): Use strtoul for thread IDs.
13356 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13357 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13358 (general_thread, step_thread, thread_from_wait)
13359 (old_thread_from_wait): Update.
13360 * target.h (struct thread_resume): Use unsigned long for THREAD.
13361 (struct target_ops): Use unsigned long for arguments to attach and
13362 thread_alive.
13363
dcdb98d2
DJ
133642005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13365
13366 * acinclude.m4: Include bfd/bfd.m4 directly.
13367 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13368 <agriffis@toolchain.org>.
13369 * aclocal.m4, configure: Regenerated.
13370
bec39cab
AC
133712005-01-07 Andrew Cagney <cagney@gnu.org>
13372
13373 * configure.ac: Rename configure.in, require autoconf 2.59.
13374 * configure: Re-generate.
13375
434c4c77
DJ
133762004-12-08 Daniel Jacobowitz <dan@debian.org>
13377
13378 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13379 LIBS when finished.
13380 * aclocal.m4: Regenerated.
13381 * configure: Regenerated.
13382
db1d3e1b
AS
133832004-11-21 Andreas Schwab <schwab@suse.de>
13384
13385 * linux-m68k-low.c (m68k_num_gregs): Define.
13386 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13387 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13388 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13389 (m68k_breakpoint_at): New. Add to the_low_target.
13390
13391 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13392 srv_linux_thread_db to yes.
13393
43360365
JB
133942004-10-20 Joel Brobecker <brobecker@gnat.com>
13395
13396 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13397 (ARCH_SET_FS): Likewise.
13398 (ARCH_GET_FS): Likewise.
13399 (ARCH_GET_GS): Likewise.
13400
fd500816
DJ
134012004-10-16 Daniel Jacobowitz <dan@debian.org>
13402
13403 * linux-i386-low.c (ps_get_thread_area): New.
13404 * linux-x86-64-low.c (ps_get_thread_area): New.
13405 * linux-low.c: Include <sys/syscall.h>.
13406 (linux_kill_one_process): Don't kill the first thread here.
13407 (linux_kill): Kill the first thread here.
13408 (kill_lwp): New function.
13409 (send_sigstop, linux_send_signal): Use it.
13410 * proc-service.c: Clean up #ifdefs.
13411 (fpregset_info): Delete.
13412 (ps_lgetregs): Update and enable implementation.
13413 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13414 implementations.
13415 * remote-utils.c (struct sym_cache, symbol_cache): New.
13416 (input_interrupt): Print a clearer message.
13417 (async_io_enabled): New variable.
13418 (enable_async_io, disable_async_io): Use it. Update comments.
13419 (look_up_one_symbol): Use the symbol cache.
13420 * thread-db.c (thread_db_look_up_symbols): New function.
13421 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13422
f6de3c42
DJ
134232004-10-16 Daniel Jacobowitz <dan@debian.org>
13424
13425 * configure.in: Test for -rdynamic.
13426 * configure: Regenerated.
13427 * Makefile (INTERNAL_LDFLAGS): New.
13428 (gdbserver, gdbreplay): Use it.
13429
2c0fc042
AC
134302004-09-02 Andrew Cagney <cagney@gnu.org>
13431
13432 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13433
075b3282
DJ
134342004-03-23 Daniel Jacobowitz <drow@mvista.com>
13435
13436 * linux-low.c (linux_wait): Clear all_processes list also.
13437
fa6a77dc
DJ
134382004-03-12 Daniel Jacobowitz <drow@mvista.com>
13439
13440 * linux-low.c: Include <errno.h>. Remove extern declaration of
13441 errno.
13442
6d782a97
DJ
134432004-03-12 Daniel Jacobowitz <drow@mvista.com>
13444
13445 * gdbreplay.c, server.h, utils.c: Update copyright years.
13446
3a7fb99b
DJ
134472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13448
13449 * server.c (main): Print child status or termination signal from
13450 variable 'signal', not 'sig'.
13451
c3e735a6
DJ
134522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13453
13454 * linux-low.c (linux_read_memory): Change return type to
13455 int. Check for and return error from ptrace().
13456 * target.c (read_inferior_memory): Change return type to int. Pass
13457 back return status from the_target->read_memory().
13458 * target.h (struct target_ops): Adapt *read_memory() prototype.
13459 Update comment.
13460 (read_inferior_memory): Adapt prototype.
13461 * server.c (main): Return an error packet if
13462 read_inferior_memory() returns an error.
13463
a59d1c82
DJ
134642004-03-04 Daniel Jacobowitz <drow@mvista.com>
13465
13466 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13467 Unify with other clean targets.
13468
dc3f8883
DJ
134692004-02-29 Daniel Jacobowitz <drow@mvista.com>
13470
13471 * server.c (handle_v_cont): Call set_desired_inferior.
13472
89a208da
DJ
134732004-02-29 Daniel Jacobowitz <drow@mvista.com>
13474
13475 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13476
62ea82f5
DJ
134772004-02-29 Daniel Jacobowitz <drow@mvista.com>
13478
13479 * linux-low.c (linux_wait): Unblock async I/O.
13480 (linux_resume): Block and enable async I/O.
13481 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13482 * server.h (block_async_io, unblock_async_io): Add prototypes.
13483
6910d122
DJ
134842004-02-29 Daniel Jacobowitz <drow@mvista.com>
13485
13486 * remote-utils.c (remote_open): Print a status notice after
13487 opening a TCP port.
13488 * server.c (attach_inferior): Print a status notice after
13489 attaching.
13490
134912004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13492
13493 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13494
c89dc5d4
DJ
134952004-02-26 Daniel Jacobowitz <drow@mvista.com>
13496
13497 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13498 error packet.
13499 * server.c, target.h: Update copyright years.
13500
4b8dad4a
RM
135012004-02-25 Roland McGrath <roland@redhat.com>
13502
13503 * target.h (struct target_ops): New member `read_auxv'.
13504 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13505 * linux-low.c (linux_read_auxv): New function.
13506 (linux_target_ops): Initialize `read_auxv' member to that.
13507
d7446758
JB
135082004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13509
13510 Committed by Jim Blandy <jimb@redhat.com>.
13511
13512 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13513 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13514 instead of GPR_SIZE to distiguish s390 and s390x targets.
13515
5544ad89
DJ
135162004-01-31 Daniel Jacobowitz <drow@mvista.com>
13517
13518 * linux-low.c: Update copyright year.
13519 (check_removed_breakpoint): Clear pending_is_breakpoint.
13520 (linux_set_resume_request, linux_queue_one_thread)
13521 (resume_status_pending_p): New functions.
13522 (linux_continue_one_thread): Use process->resume.
13523 (linux_resume): Only resume threads if there are no pending events.
13524 * linux-low.h (struct process_info): Add resume request
13525 pointer.
13526
2a68b70e
DJ
135272004-01-30 Daniel Jacobowitz <drow@mvista.com>
13528
13529 * regcache.c (new_register_cache): Clear the allocated register
13530 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13531
64386c31
DJ
135322003-10-13 Daniel Jacobowitz <drow@mvista.com>
13533
13534 * linux-low.c (linux_resume): Take a struct thread_resume *
13535 argument.
13536 (linux_wait): Update call.
13537 (resume_ptr): New static variable.
13538 (linux_continue_one_thread): Renamed from
13539 linux_continue_one_process. Use resume_ptr.
13540 (linux_resume): Use linux_continue_one_thread.
13541 * server.c (handle_v_cont, handle_v_requests): New functions.
13542 (myresume): New function.
13543 (main): Handle 'v' case.
13544 * target.h (struct thread_resume): New type.
13545 (struct target_ops): Change argument of "resume" to struct
13546 thread_resume *.
13547 (myresume): Delete macro.
13548
c938e9b0
L
135492003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13550
13551 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13552 (uninstall): Support DESTDIR.
13553
7f313d07
BC
13554Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13555
13556 * configure.srv: Add xscale*linux copy of arm*linux entry.
13557
3b2fc2ea
DJ
135582003-07-24 Daniel Jacobowitz <drow@mvista.com>
13559
13560 * linux-arm-low.c (arm_reinsert_addr): New function.
13561 (the_low_target): Add arm_reinsert_addr.
13562
1c0a559e
MK
135632003-07-08 Mark Kettenis <kettenis@gnu.org>
13564
13565 * mem-break.c: Remove whitespace at end of file.
13566
43d5792c
DJ
135672003-06-28 Daniel Jacobowitz <drow@mvista.com>
13568
13569 * configure.in: Check whether we need to prototype strerror.
13570 * server.h: Optionally prototype strerror.
13571 * gdbreplay.c (perror_with_name): Use strerror.
13572 * linux-low.c (linux_attach_lwp): Use strerror.
13573 * utils.c (perror_with_name): Use strerror.
13574 * config.in, configure: Regenerated.
13575
c8a86edf
DJ
135762003-06-28 Daniel Jacobowitz <drow@mvista.com>
13577
13578 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13579 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13580
73d37363
DJ
135812003-06-20 Daniel Jacobowitz <drow@mvista.com>
13582
13583 * Makefile.in (SFILES): Update.
13584 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13585 low-sun3.c: Remove files.
13586
6ad8ae5c
DJ
135872003-06-17 Daniel Jacobowitz <drow@mvista.com>
13588
13589 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13590 (linux_detach_one_process, linux_detach): New functions.
13591 (linux_target_ops): Add linux_detach.
13592 * server.c (main): Handle 'D' packet.
13593 * target.h (struct target_ops): Add "detach" member.
13594 (detach_inferior): Define.
13595
1581182a
MK
135962003-06-13 Mark Kettenis <kettenis@gnu.org>
13597
13598 From Kelley Cook <kelleycook@wideopenwest.com>:
13599 * configure.srv: Accept i[34567]86 variants.
13600
e5379b03
DJ
136012003-06-05 Daniel Jacobowitz <drow@mvista.com>
13602
13603 * linux-low.c (linux_wait_for_event): Correct comment typos.
13604 (linux_resume_one_process): Call check_removed_breakpoint.
13605 (linux_send_signal): New function.
13606 (linux_target_ops): Add linux_send_signal.
13607 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13608 of kill.
13609 * target.h (struct target_ops): Add send_signal.
13610
2ff29de4
JB
136112003-05-29 Jim Blandy <jimb@redhat.com>
13612
13613 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13614 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13615 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13616 away part of the register's value.
13617
254787d4
DJ
136182003-03-26 Daniel Jacobowitz <drow@mvista.com>
13619
13620 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13621 (linux_wait_for_event, linux_init_signals): Likewise.
13622
94e10508
DJ
136232003-03-17 Daniel Jacobowitz <drow@mvista.com>
13624
13625 * configure.in: Check for stdlib.h.
13626 * configure: Regenerated.
13627 * config.in: Regenerated.
13628
4c0711e0
DJ
136292003-01-04 Andreas Schwab <schwab@suse.de>
13630
13631 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13632
ef66e766
AC
136332003-01-02 Andrew Cagney <ac131313@redhat.com>
13634
13635 * Makefile.in: Remove obsolete code.
13636
a1358604
DJ
136372002-11-20 Daniel Jacobowitz <drow@mvista.com>
13638
13639 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13640 defined(PT_FPR0_HI).
13641
23ce3b1c
DJ
136422002-11-17 Stuart Hughes <seh@zee2.com>
13643
13644 * linux-arm-low.c (arm_num_regs): Increase.
13645 (arm_regmap): Include status register.
13646
136472002-11-17 Daniel Jacobowitz <drow@mvista.com>
13648
13649 * linux-low.c (register_addr): Remove incorrect -1 check.
13650
a9fa9f7d
DJ
136512002-08-29 Daniel Jacobowitz <drow@mvista.com>
13652
13653 * linux-low.c (linux_create_inferior): Call setpgid. Return
13654 the new PID.
13655 (unstopped_p, linux_signal_pid): Remove.
13656 (linux_target_ops): Remove linux_signal_pid.
13657 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13658 global instead of target method.
13659 * target.h (struct target_ops): Remove signal_pid. Update comment
13660 for create_inferior.
13661 * server.c (signal_pid): New variable.
13662 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13663 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13664 (attach_inferior): Set signal_pid.
13665
17574093
DJ
136662002-08-23 Daniel Jacobowitz <drow@mvista.com>
13667
13668 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13669
136702002-08-20 Jim Blandy <jimb@redhat.com>
13671
13672 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13673 default for this.
13674
136752002-08-01 Andrew Cagney <cagney@redhat.com>
13676
13677 * Makefile.in: Make chill references obsolete.
13678
136792002-07-24 Kevin Buettner <kevinb@redhat.com>
13680
13681 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13682 * configure: Regenerate.
13683 * config.in: Regenerate.
13684
136852002-07-09 David O'Brien <obrien@FreeBSD.org>
13686
13687 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13688 (perror_with_name, remote_close, remote_open, expect, play): Static.
13689
136902002-07-04 Michal Ludvig <mludvig@suse.cz>
13691
4b8dad4a 13692 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13693 byte offsets instead of an array of indexes.
13694 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13695
136962002-06-13 Daniel Jacobowitz <drow@mvista.com>
13697
13698 * regcache.c: Add comment.
13699
137002002-06-11 Daniel Jacobowitz <drow@mvista.com>
13701
13702 * thread-db.c: New file.
13703 * proc-service.c: New file.
13704 * acinclude.m4: New file.
13705 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13706 proc-service.o, and thread-db.o.
13707 (linux-low.o): Add USE_THREAD_DB.
13708 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13709 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13710 * aclocal.m4: Regenerated.
13711 * config.in: Regenerated.
13712 * configure: Regenerated.
13713 * configure.in: Check for proc_service.h, sys/procfs.h,
13714 thread_db.h, and linux/elf.h headrs.
13715 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13716 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13717 Check for -lthread_db and thread support.
13718 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13719 PowerPC, and SuperH.
13720 * i387-fp.c: Constify arguments.
13721 * i387-fp.h: Likewise.
13722 * inferiors.c: (struct thread_info): Renamed from
13723 `struct inferior_info'. Remove PID member. Use generic inferior
13724 list header. All uses updated.
13725 (inferiors, signal_pid): Removed.
13726 (all_threads): New variable.
13727 (get_thread): Define.
13728 (add_inferior_to_list): New function.
13729 (for_each_inferior): New function.
13730 (change_inferior_id): New function.
13731 (add_inferior): Removed.
13732 (remove_inferior): New function.
13733 (add_thread): New function.
13734 (free_one_thread): New function.
13735 (remove_thread): New function.
13736 (clear_inferiors): Use for_each_inferior and free_one_thread.
13737 (find_inferior): New function.
13738 (find_inferior_id): New function.
13739 (inferior_target_data): Update argument type.
13740 (set_inferior_target_data): Likewise.
13741 (inferior_regcache_data): Likewise.
13742 (set_inferior_regcache_data): Likewise.
13743 * linux-low.c (linux_bp_reinsert): Remove.
13744 (all_processes, stopping_threads, using_thrads)
13745 (struct pending_signals, debug_threads, pid_of): New.
13746 (inferior_pid): Replace with macro.
13747 (struct inferior_linux_data): Remove.
13748 (get_stop_pc, add_process): New functions.
13749 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13750 Use add_process and add_thread.
13751 (linux_attach_lwp): New function, based on old linux_attach. Use
13752 add_process and add_thread. Set stop_expected for new threads.
13753 (linux_attach): New function.
13754 (linux_kill_one_process): New function.
13755 (linux_kill): Kill all LWPs.
13756 (linux_thread_alive): Use find_inferior_id.
13757 (check_removed_breakpoints, status_pending_p): New functions.
13758 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13759 Update. Use WNOHANG. Wait for cloned processes also. Update process
13760 struct for the found process.
13761 (linux_wait_for_event): New function.
13762 (linux_wait): Use it. Support LWPs.
13763 (send_sigstop, wait_for_sigstop, stop_all_processes)
13764 (linux_resume_one_process, linux_continue_one_process): New functions.
13765 (linux_resume): Support LWPs.
13766 (REGISTER_RAW_SIZE): Remove.
13767 (fetch_register): Use register_size instead. Call supply_register.
13768 (usr_store_inferior_registers): Likewise. Call collect_register.
13769 Fix recursive case.
13770 (regsets_fetch_inferior_registers): Improve error message.
13771 (regsets_store_inferior_registers): Add debugging.
13772 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13773 (unstopped_p, linux_signal_pid): New functions.
13774 (linux_target_ops): Add linux_signal_pid.
13775 (linux_init_signals): New function.
13776 (initialize_low): Call it. Initialize using_threads.
13777 * regcache.c (inferior_regcache_data): Add valid
13778 flag.
13779 (get_regcache): Fetch registers lazily. Add fetch argument
13780 and update all callers.
13781 (regcache_invalidate_one, regcache_invalidate): New
13782 functions.
13783 (new_register_cache): Renamed from create_register_cache.
13784 Return the new regcache.
13785 (free_register_cache): Change argument to a void *.
13786 (registers_to_string, registers_from_string): Call get_regcache
13787 with fetch flag set.
13788 (register_data): Make static. Pass fetch flag to get_regcache.
13789 (supply_register): Call get_regcache with fetch flag clear.
13790 (collect_register): Call get_regcache with fetch flag set.
13791 (collect_register_as_string): New function.
13792 * regcache.h: Update.
13793 * remote-utils.c (putpkt): Flush after debug output and use
13794 stderr.
13795 Handle input interrupts while waiting for an ACK.
13796 (input_interrupt): Use signal_pid method.
13797 (getpkt): Flush after debug output and use stderr.
13798 (outreg): Use collect_register_as_string.
13799 (new_thread_notify, dead_thread_notify): New functions.
13800 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13801 and general_thread.
13802 (look_up_one_symbol): Flush after debug output.
13803 * server.c (step_thread, server_waiting): New variables.
13804 (start_inferior): Don't use signal_pid. Update call to mywait.
13805 (attach_inferior): Update call to mywait.
13806 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13807 (main): Don't fetch/store registers explicitly. Use
13808 set_desired_inferior. Support proposed ``Hs'' packet. Update
13809 calls to mywait.
13810 * server.h: Update.
13811 (struct inferior_list, struct_inferior_list_entry): New.
13812 * target.c (set_desired_inferior): New.
13813 (write_inferior_memory): Constify.
13814 (mywait): New function.
13815 * target.h: Update.
13816 (struct target_ops): New signal_pid method.
13817 (mywait): Removed macro, added prototype.
13818
13819 * linux-low.h (regset_func): Removed.
13820 (regset_fill_func, regset_store_func): New.
13821 (enum regset_type): New.
13822 (struct regset_info): Add type field. Use new operation types.
13823 (struct linux_target_ops): stop_pc renamed to get_pc.
13824 Add decr_pc_after_break and breakpoint_at.
13825 (get_process, get_thread_proess, get_process_thread)
13826 (strut process_info, all_processes, linux_attach_lwp)
13827 (thread_db_init): New.
13828
13829 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13830 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13831 (the_low_target): Add new members.
13832 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13833 (i386_store_fpxregset): Constify.
13834 (target_regsets): Add new kind identifier.
13835 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13836 (i386_set_pc): Add debugging.
13837 (i386_breakpoint_at): New function.
13838 (the_low_target): Add new members.
13839 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13840 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13841 (mips_breakpoint_at): New.
13842 (the_low_target): Add new members.
13843 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13844 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13845 (the_low_target): Add new members.
13846 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13847 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13848 (the_low_target): Add new members.
13849 * linux-x86-64-low.c (target_regsets): Add new kind
13850 identifier.
13851
138522002-05-15 Daniel Jacobowitz <drow@mvista.com>
13853
13854 From Martin Pool <mbp@samba.org>:
13855 * server.c (gdbserver_usage): New function.
13856 (main): Call it.
13857
138582002-05-14 Daniel Jacobowitz <drow@mvista.com>
13859
13860 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13861 stop_at -> stop_pc.
13862
138632002-05-04 Andrew Cagney <ac131313@redhat.com>
13864
13865 * Makefile.in: Remove obsolete code.
13866
138672002-04-24 Michal Ludvig <mludvig@suse.cz>
13868
13869 * linux-low.c (regsets_fetch_inferior_registers),
13870 (regsets_store_inferior_registers): Removed cast to int from
13871 ptrace() calls.
13872 * regcache.h: Added declaration of struct inferior_info.
13873
138742002-04-20 Daniel Jacobowitz <drow@mvista.com>
13875
13876 * inferiors.c (struct inferior_info): Add regcache_data.
13877 (add_inferior): Call create_register_cache.
13878 (clear_inferiors): Call free_register_cache.
13879 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13880 * regcache.c (struct inferior_regcache_data): New.
13881 (registers): Remove.
13882 (get_regcache): New function.
13883 (create_register_cache, free_register_cache): New functions.
13884 (set_register_cache): Don't initialize the register cache here.
13885 (registers_to_string, registers_from_string, register_data): Call
13886 get_regcache.
13887 * regcache.h: Add prototypes.
13888 * server.h: Likewise.
13889
138902002-04-20 Daniel Jacobowitz <drow@mvista.com>
13891
13892 * mem-break.c: New file.
13893 * mem-break.h: New file.
13894 * Makefile.in: Add mem-break.o rule; update server.h
13895 dependencies.
13896 * inferiors.c (struct inferior_info): Add target_data
13897 member.
13898 (clear_inferiors): Free target_data member if set.
13899 (inferior_target_data, set_inferior_target_data): New functions.
13900 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13901 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13902 * linux-low.c (linux_bp_reinsert): New variable.
13903 (struct inferior_linux_data): New.
13904 (linux_create_inferior): Use set_inferior_target_data.
13905 (linux_attach): Likewise. Call add_inferior.
13906 (linux_wait_for_one_inferior): New function.
13907 (linux_wait): Call it.
13908 (linux_write_memory): Add const.
13909 (initialize_low): Call set_breakpoint_data.
13910 * linux-low.h (struct linux_target_ops): Add breakpoint
13911 handling members.
13912 * server.c (attach_inferior): Remove extra add_inferior
13913 call.
13914 * server.h: Include mem-break.h. Update inferior.c
13915 prototypes.
13916 * target.c (read_inferior_memory)
13917 (write_inferior_memory): New functions.
13918 * target.h (read_inferior_memory)
13919 (write_inferior_memory): Change macros to prototypes.
13920 (struct target_ops): Update comments. Add const to write_memory
13921 definition.
13922
139232002-04-11 Daniel Jacobowitz <drow@mvista.com>
13924
13925 * linux-low.c (usr_store_inferior_registers): Support
13926 registers which are allowed to fail to store.
13927 * linux-low.h (linux_target_ops): Likewise.
13928 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13929 (ppc_cannot_store_register): FPSCR may not be storable.
13930
139312002-04-09 Daniel Jacobowitz <drow@mvista.com>
13932
13933 * server.h: Include <string.h> if HAVE_STRING_H.
13934 * ChangeLog: Correct paths in last ChangeLog entry.
13935
139362002-04-09 Daniel Jacobowitz <drow@mvista.com>
13937
13938 * linux-low.h: Remove obsolete prototypes.
13939 (struct linux_target_ops): New.
13940 (extern the_low_target): New.
13941 * linux-low.c (num_regs, regmap): Remove declarations.
13942 (register_addr): Use the_low_target explicitly.
13943 (fetch_register): Likewise.
13944 (usr_fetch_inferior_registers): Likewise.
13945 (usr_store_inferior_registers): Likewise.
13946 * linux-arm-low.c (num_regs): Remove.
13947 (arm_num_regs): Define.
13948 (arm_regmap): Renamed from regmap, made static.
13949 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13950 made static.
13951 (arm_cannot_store_register): Renamed from cannot_store_register,
13952 made static.
13953 (the_low_target): New.
13954 * linux-i386-low.c (num_regs): Remove.
13955 (i386_num_regs): Define.
13956 (i386_regmap): Renamed from regmap, made static.
13957 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13958 made static.
13959 (i386_cannot_store_register): Renamed from cannot_store_register,
13960 made static.
13961 (the_low_target): New.
13962 * linux-ia64-low.c (num_regs): Remove.
13963 (ia64_num_regs): Define.
13964 (ia64_regmap): Renamed from regmap, made static.
13965 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13966 made static.
13967 (ia64_cannot_store_register): Renamed from cannot_store_register,
13968 made static.
13969 (the_low_target): New.
13970 * linux-m68k-low.c (num_regs): Remove.
13971 (m68k_num_regs): Define.
13972 (m68k_regmap): Renamed from regmap, made static.
13973 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13974 made static.
13975 (m68k_cannot_store_register): Renamed from cannot_store_register,
13976 made static.
13977 (the_low_target): New.
13978 * linux-mips-low.c (num_regs): Remove.
13979 (mips_num_regs): Define.
13980 (mips_regmap): Renamed from regmap, made static.
13981 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13982 made static.
13983 (mips_cannot_store_register): Renamed from cannot_store_register,
13984 made static.
13985 (the_low_target): New.
13986 * linux-ppc-low.c (num_regs): Remove.
13987 (ppc_num_regs): Define.
13988 (ppc_regmap): Renamed from regmap, made static.
13989 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13990 made static.
13991 (ppc_cannot_store_register): Renamed from cannot_store_register,
13992 made static.
13993 (the_low_target): New.
13994 * linux-s390-low.c (num_regs): Remove.
13995 (s390_num_regs): Define.
13996 (s390_regmap): Renamed from regmap, made static.
13997 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13998 made static.
13999 (s390_cannot_store_register): Renamed from cannot_store_register,
14000 made static.
14001 (the_low_target): New.
14002 * linux-sh-low.c (num_regs): Remove.
14003 (sh_num_regs): Define.
14004 (sh_regmap): Renamed from regmap, made static.
14005 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14006 made static.
14007 (sh_cannot_store_register): Renamed from cannot_store_register,
14008 made static.
14009 (the_low_target): New.
14010 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14011 (the_low_target): New.
14012
140132002-04-09 Daniel Jacobowitz <drow@mvista.com>
14014
14015 * Makefile.in: Add stamp-h target.
14016 * configure.in: Create stamp-h.
14017 * configure: Regenerated.
14018
140192002-04-09 Daniel Jacobowitz <drow@mvista.com>
14020
14021 * inferiors.c: New file.
14022 * target.c: New file.
14023 * target.h: New file.
14024 * Makefile.in: Add target.o and inferiors.o. Update
14025 dependencies.
14026 * linux-low.c (inferior_pid): New static variable,
14027 moved from server.c.
14028 (linux_create_inferior): Renamed from create_inferior.
14029 Call add_inferior. Return 0 on success instead of a PID.
14030 (linux_attach): Renamed from myattach.
14031 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14032 (linux_thread_alive): Renamed from mythread_alive.
14033 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14034 child dies.
14035 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14036 (regsets_store_inferior_registers): Correct error message.
14037 Add missing ``return 0''.
14038 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14039 (linux_store_registers): Renamed from store_inferior_registers.
14040 (linux_read_memory): Renamed from read_inferior_memory.
14041 (linux_write_memory): Renamed from write_inferior_memory.
14042 (linux_target_ops): New structure.
14043 (initialize_low): Call set_target_ops ().
14044 * remote-utils.c (unhexify): New function.
14045 (hexify): New function.
14046 (input_interrupt): Send signals to ``signal_pid''.
14047 * server.c (inferior_pid): Remove.
14048 (start_inferior): Update create_inferior call.
14049 (attach_inferior): Call add_inferior.
14050 (handle_query): New function.
14051 (main): Call handle_query for `q' packets.
14052 * server.h: Include "target.h". Remove obsolete prototypes.
14053 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14054
140552002-04-09 Daniel Jacobowitz <drow@mvista.com>
14056
14057 * Makefile.in: Add WARN_CFLAGS. Update configury
14058 dependencies.
14059 * configure.in: Check for <string.h>
14060 * configure: Regenerate.
14061 * config.in: Regenerate.
14062 * gdbreplay.c: Include needed system headers.
14063 (remote_open): Remove strchr prototype.
14064 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14065 * regcache.c (supply_register): Change buf argument to const void *.
14066 (supply_register_by_name): Likewise.
14067 (collect_register): Change buf argument to void *.
14068 (collect_register_by_name): Likewise.
14069 * regcache.h: Add missing prototypes.
14070 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14071 * server.c (handle_query): New function.
14072 (attached): New static variable, moved out of main.
14073 (main): Quiet longjmp clobber warnings.
14074 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14075 * utils.c (error): Remove NORETURN.
14076 (fatal): Likewise.
This page took 3.010143 seconds and 4 git commands to generate.