1 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7 2016-04-28 Par Olsson <par.olsson@windriver.com>
8 2016-04-28 Simon Marchi <simon.marchi@ericsson.com>
10 * tracepoint.c (write_inferior_int8): New function.
11 (cmd_qtenable_disable): Write enable flag using
14 2016-04-25 Yao Qi <yao.qi@linaro.org>
16 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
17 (need_step_over_p): Return zero if the LWP has pending signals
18 can be delivered on software single step target.
20 2016-04-25 Yao Qi <yao.qi@linaro.org>
22 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
23 return instead of error.
25 2016-04-22 Yao Qi <yao.qi@linaro.org>
27 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
30 2016-04-22 Yao Qi <yao.qi@linaro.org>
32 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
33 signal when stepping over breakpoint with software single
36 2016-04-21 Pedro Alves <palves@redhat.com>
38 * linux-s390-low.c (s390_collect_ptrace_register)
39 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
41 (s390_check_regset): Use void * instead of gdb_byte *.
43 2016-04-20 Pedro Alves <palves@redhat.com>
45 * configure: Renegerate.
47 2016-04-20 Yao Qi <yao.qi@linaro.org>
49 * linux-aarch32-low.c: Include "arch/arm-linux.h".
50 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
52 (arm_store_gregset): Likewise.
54 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
56 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
57 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
58 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
59 (amd64-avx-mpx-linux.c): New rules.
60 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
61 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
62 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
63 (srv_amd64_regobj): Add amd64-avx-mpx.o.
64 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
65 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
66 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
67 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
68 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
69 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
70 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
71 * linux-x86-low.c (x86_linux_read_description): Add case for
72 X86_XSTATE_AVX_MPX_MASK.
73 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
74 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
75 init_registers_i386_avx_mpx_linux.
76 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
77 (initialize_low_tracepoint): Call
78 init_registers_i386_avx_mpx_linux.
79 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
80 (initialize_low_tracepoint): Call
81 init_registers_amd64_avx_mpx_linux.
82 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
83 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
84 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
87 2016-04-18 Pedro Alves <palves@redhat.com>
89 * configure: Regenerate.
91 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
93 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
94 (aarch64_emit_sub): Likewise.
96 2016-04-12 Pedro Alves <palves@redhat.com>
98 * utils.c (prepare_to_throw_exception): Delete.
100 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
102 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
104 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
106 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
108 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
110 * linux-aarch64-ipa.c: Add <elf.h> include.
111 * linux-ppc-ipa.c: Add <elf.h> include.
112 * linux-s390-ipa.c: Add <elf.h> include.
114 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
116 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
117 (get_raw_reg_ptr): Likewise.
118 (get_trace_state_variable_value_ptr): Likewise.
119 (set_trace_state_variable_value_ptr): Likewise.
120 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
123 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
124 Marcin Kościelnicki <koriakin@0x04.net>
127 * linux-ppc-low.c (emit_insns): New function.
128 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
129 (ppc_emit_prologue): New function.
130 (ppc_emit_epilogue): New function.
131 (ppc_emit_add): New function.
132 (ppc_emit_sub): New function.
133 (ppc_emit_mul): New function.
134 (ppc_emit_lsh): New function.
135 (ppc_emit_rsh_signed): New function.
136 (ppc_emit_rsh_unsigned): New function.
137 (ppc_emit_ext): New function.
138 (ppc_emit_zero_ext): New function.
139 (ppc_emit_log_not): New function.
140 (ppc_emit_bit_and): New function.
141 (ppc_emit_bit_or): New function.
142 (ppc_emit_bit_xor): New function.
143 (ppc_emit_bit_not): New function.
144 (ppc_emit_equal): New function.
145 (ppc_emit_less_signed): New function.
146 (ppc_emit_less_unsigned): New function.
147 (ppc_emit_ref): New function.
148 (ppc_emit_const): New function.
149 (ppc_emit_reg): New function.
150 (ppc_emit_pop): New function.
151 (ppc_emit_stack_flush): New function.
152 (ppc_emit_swap): New function.
153 (ppc_emit_stack_adjust): New function.
154 (ppc_emit_call): New function.
155 (ppc_emit_int_call_1): New function.
156 (ppc_emit_void_call_2): New function.
157 (ppc_emit_if_goto): New function.
158 (ppc_emit_goto): New function.
159 (ppc_emit_eq_goto): New function.
160 (ppc_emit_ne_goto): New function.
161 (ppc_emit_lt_goto): New function.
162 (ppc_emit_le_goto): New function.
163 (ppc_emit_gt_goto): New function.
164 (ppc_emit_ge_goto): New function.
165 (ppc_write_goto_address): New function.
166 (ppc_emit_ops_impl): New static variable.
167 (ppc64v1_emit_prologue): New function.
168 (ppc64v2_emit_prologue): New function.
169 (ppc64_emit_epilogue): New function.
170 (ppc64_emit_add): New function.
171 (ppc64_emit_sub): New function.
172 (ppc64_emit_mul): New function.
173 (ppc64_emit_lsh): New function.
174 (ppc64_emit_rsh_signed): New function.
175 (ppc64_emit_rsh_unsigned): New function.
176 (ppc64_emit_ext): New function.
177 (ppc64_emit_zero_ext): New function.
178 (ppc64_emit_log_not): New function.
179 (ppc64_emit_bit_and): New function.
180 (ppc64_emit_bit_or): New function.
181 (ppc64_emit_bit_xor): New function.
182 (ppc64_emit_bit_not): New function.
183 (ppc64_emit_equal): New function.
184 (ppc64_emit_less_signed): New function.
185 (ppc64_emit_less_unsigned): New function.
186 (ppc64_emit_ref): New function.
187 (ppc64_emit_const): New function.
188 (ppc64v1_emit_reg): New function.
189 (ppc64v2_emit_reg): New function.
190 (ppc64_emit_pop): New function.
191 (ppc64_emit_stack_flush): New function.
192 (ppc64_emit_swap): New function.
193 (ppc64v1_emit_call): New function.
194 (ppc64v2_emit_call): New function.
195 (ppc64v1_emit_int_call_1): New function.
196 (ppc64v2_emit_int_call_1): New function.
197 (ppc64v1_emit_void_call_2): New function.
198 (ppc64v2_emit_void_call_2): New function.
199 (ppc64_emit_if_goto): New function.
200 (ppc64_emit_eq_goto): New function.
201 (ppc64_emit_ne_goto): New function.
202 (ppc64_emit_lt_goto): New function.
203 (ppc64_emit_le_goto): New function.
204 (ppc64_emit_gt_goto): New function.
205 (ppc64_emit_ge_goto): New function.
206 (ppc64v1_emit_ops_impl): New static variable.
207 (ppc64v2_emit_ops_impl): New static variable.
208 (ppc_emit_ops): New function.
209 (linux_low_target): Wire in ppc_emit_ops.
211 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
212 Marcin Kościelnicki <koriakin@0x04.net>
215 * Makefile.in: Add powerpc-*-ipa.o
216 * configure.srv: Add ipa_obj for powerpc*-linux.
217 * linux-ppc-ipa.c: New file.
218 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
220 (PPC_FIELD): New macro.
221 (PPC_SEXT): New macro.
222 (PPC_OP6): New macro.
226 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
227 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
228 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
229 (ppc_get_thread_area): New function.
230 (is_elfv2_inferior): New function.
231 (gen_ds_form): New function.
232 (GEN_STD): New macro.
233 (GEN_STDU): New macro.
235 (GEN_LDU): New macro.
236 (gen_d_form): New function.
237 (GEN_ADDI): New macro.
238 (GEN_ADDIS): New macro.
240 (GEN_LIS): New macro.
241 (GEN_ORI): New macro.
242 (GEN_ORIS): New macro.
243 (GEN_LWZ): New macro.
244 (GEN_STW): New macro.
245 (GEN_STWU): New macro.
246 (gen_xfx_form): New function.
247 (GEN_MFSPR): New macro.
248 (GEN_MTSPR): New macro.
249 (GEN_MFCR): New macro.
250 (GEN_MTCR): New macro.
251 (GEN_SYNC): New macro.
252 (GEN_LWSYNC): New macro.
253 (gen_x_form): New function.
256 (GEN_LWARX): New macro.
257 (GEN_STWCX): New macro.
258 (GEN_CMPW): New macro.
259 (gen_md_form): New function.
260 (GEN_RLDICL): New macro.
261 (GEN_RLDICR): New macro.
262 (gen_i_form): New function.
265 (gen_b_form): New function.
266 (GEN_BNE): New macro.
267 (GEN_LOAD): New macro.
268 (GEN_STORE): New macro.
269 (gen_limm): New function.
270 (gen_atomic_xchg): New function.
271 (gen_call): New function.
272 (ppc_relocate_instruction): New function.
273 (ppc_install_fast_tracepoint_jump_pad): New function.
274 (ppc_get_min_fast_tracepoint_insn_len): New function.
275 (ppc_get_ipa_tdesc_idx): New function.
276 (the_low_target): Wire in the new functions.
277 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
279 * linux-ppc-tdesc.h: New file.
281 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
283 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
284 (alloc_jump_pad_buffer): New function.
285 * linux-amd64-ipa.c: Add <sys/mman.h> include.
286 (alloc_jump_pad_buffer): New function.
287 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
288 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
289 (alloc_jump_pad_buffer): New function.
290 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
291 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
292 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
293 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
295 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
297 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
298 * linux-amd64-ipa.c: Likewise.
299 * linux-i386-ipa.c: Likewise.
300 * linux-s390-ipa.c: Likewise.
301 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
302 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
303 set_trace_state_variable_value_ptr.
304 (struct ipa_sym_addresses): Likewise.
305 (symbol_list): Likewise.
306 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
307 accessing gdb_collect directly.
308 (gdb_collect_ptr_type): New typedef.
309 (get_raw_reg_ptr_type): New typedef.
310 (get_trace_state_variable_value_ptr_type): New typedef.
311 (set_trace_state_variable_value_ptr_type): New typedef.
312 (gdb_collect_ptr): New global.
313 (get_raw_reg_ptr): New global.
314 (get_trace_state_variable_value_ptr): New global.
315 (set_trace_state_variable_value_ptr): New global.
316 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
317 accessing get_raw_reg directly.
318 (get_get_tsv_func_addr): Likewise for
319 get_trace_state_variable_value_ptr.
320 (get_set_tsv_func_addr): Likewise for
321 set_trace_state_variable_value_ptr.
322 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
324 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
326 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
328 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
330 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
332 (relocate_instruction): Remove own_buf.
333 * server.c (own_buf): Make global.
334 (handle_v_requests): Make global.
335 * server.h (own_buf): New declaration.
336 (handle_v_requests): New prototype.
338 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
341 * linux-s390-low.c (add_insns): New function.
342 (s390_emit_prologue): New function.
343 (s390_emit_epilogue): New function.
344 (s390_emit_add): New function.
345 (s390_emit_sub): New function.
346 (s390_emit_mul): New function.
347 (s390_emit_lsh): New function.
348 (s390_emit_rsh_signed): New function.
349 (s390_emit_rsh_unsigned): New function.
350 (s390_emit_ext): New function.
351 (s390_emit_log_not): New function.
352 (s390_emit_bit_and): New function.
353 (s390_emit_bit_or): New function.
354 (s390_emit_bit_xor): New function.
355 (s390_emit_bit_not): New function.
356 (s390_emit_equal): New function.
357 (s390_emit_less_signed): New function.
358 (s390_emit_less_unsigned): New function.
359 (s390_emit_ref): New function.
360 (s390_emit_if_goto): New function.
361 (s390_emit_goto): New function.
362 (s390_write_goto_address): New function.
363 (s390_emit_litpool): New function.
364 (s390_emit_const): New function.
365 (s390_emit_call): New function.
366 (s390_emit_reg): New function.
367 (s390_emit_pop): New function.
368 (s390_emit_stack_flush): New function.
369 (s390_emit_zero_ext): New function.
370 (s390_emit_swap): New function.
371 (s390_emit_stack_adjust): New function.
372 (s390_emit_set_r2): New function.
373 (s390_emit_int_call_1): New function.
374 (s390_emit_void_call_2): New function.
375 (s390_emit_eq_goto): New function.
376 (s390_emit_ne_goto): New function.
377 (s390_emit_lt_goto): New function.
378 (s390_emit_le_goto): New function.
379 (s390_emit_gt_goto): New function.
380 (s390_emit_ge_goto): New function.
381 (s390x_emit_prologue): New function.
382 (s390x_emit_epilogue): New function.
383 (s390x_emit_add): New function.
384 (s390x_emit_sub): New function.
385 (s390x_emit_mul): New function.
386 (s390x_emit_lsh): New function.
387 (s390x_emit_rsh_signed): New function.
388 (s390x_emit_rsh_unsigned): New function.
389 (s390x_emit_ext): New function.
390 (s390x_emit_log_not): New function.
391 (s390x_emit_bit_and): New function.
392 (s390x_emit_bit_or): New function.
393 (s390x_emit_bit_xor): New function.
394 (s390x_emit_bit_not): New function.
395 (s390x_emit_equal): New function.
396 (s390x_emit_less_signed): New function.
397 (s390x_emit_less_unsigned): New function.
398 (s390x_emit_ref): New function.
399 (s390x_emit_if_goto): New function.
400 (s390x_emit_const): New function.
401 (s390x_emit_call): New function.
402 (s390x_emit_reg): New function.
403 (s390x_emit_pop): New function.
404 (s390x_emit_stack_flush): New function.
405 (s390x_emit_zero_ext): New function.
406 (s390x_emit_swap): New function.
407 (s390x_emit_stack_adjust): New function.
408 (s390x_emit_int_call_1): New function.
409 (s390x_emit_void_call_2): New function.
410 (s390x_emit_eq_goto): New function.
411 (s390x_emit_ne_goto): New function.
412 (s390x_emit_lt_goto): New function.
413 (s390x_emit_le_goto): New function.
414 (s390x_emit_gt_goto): New function.
415 (s390x_emit_ge_goto): New function.
416 (s390_emit_ops): New function.
417 (struct linux_target_ops): Fill in emit_ops hook.
419 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
422 * Makefile.in: Add s390 IPA files.
423 * configure.srv: Build IPA for s390.
424 * linux-s390-ipa.c: New file.
425 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
426 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
427 (tdesc_s390_linux32): Likewise.
428 (init_registers_s390_linux32v1): Likewise.
429 (tdesc_s390_linux32v1): Likewise.
430 (init_registers_s390_linux32v2): Likewise.
431 (tdesc_s390_linux32v2): Likewise.
432 (init_registers_s390_linux64): Likewise.
433 (tdesc_s390_linux64): Likewise.
434 (init_registers_s390_linux64v1): Likewise.
435 (tdesc_s390_linux64v1): Likewise.
436 (init_registers_s390_linux64v2): Likewise.
437 (tdesc_s390_linux64v2): Likewise.
438 (init_registers_s390_te_linux64): Likewise.
439 (tdesc_s390_te_linux64): Likewise.
440 (init_registers_s390_vx_linux64): Likewise.
441 (tdesc_s390_vx_linux64): Likewise.
442 (init_registers_s390_tevx_linux64): Likewise.
443 (tdesc_s390_tevx_linux64): Likewise.
444 (init_registers_s390x_linux64): Likewise.
445 (tdesc_s390x_linux64): Likewise.
446 (init_registers_s390x_linux64v1): Likewise.
447 (tdesc_s390x_linux64v1): Likewise.
448 (init_registers_s390x_linux64v2): Likewise.
449 (tdesc_s390x_linux64v2): Likewise.
450 (init_registers_s390x_te_linux64): Likewise.
451 (tdesc_s390x_te_linux64): Likewise.
452 (init_registers_s390x_vx_linux64): Likewise.
453 (tdesc_s390x_vx_linux64): Likewise.
454 (init_registers_s390x_tevx_linux64): Likewise.
455 (tdesc_s390x_tevx_linux64): Likewise.
456 (have_hwcap_s390_vx): New static variable.
457 (s390_arch_setup): Fill have_hwcap_s390_vx.
458 (s390_get_thread_area): New function.
459 (s390_ft_entry_gpr_esa): New const.
460 (s390_ft_entry_gpr_zarch): New const.
461 (s390_ft_entry_misc): New const.
462 (s390_ft_entry_fr): New const.
463 (s390_ft_entry_vr): New const.
464 (s390_ft_main_31): New const.
465 (s390_ft_main_64): New const.
466 (s390_ft_exit_fr): New const.
467 (s390_ft_exit_vr): New const.
468 (s390_ft_exit_misc): New const.
469 (s390_ft_exit_gpr_esa): New const.
470 (s390_ft_exit_gpr_zarch): New const.
471 (append_insns): New function.
472 (s390_relocate_instruction): New function.
473 (s390_install_fast_tracepoint_jump_pad): New function.
474 (s390_get_min_fast_tracepoint_insn_len): New function.
475 (s390_get_ipa_tdesc_idx): New function.
476 (struct linux_target_ops): Wire in the above functions.
477 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
478 * linux-s390-tdesc.h: New file.
480 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
482 * linux-s390-low.c (s390_supports_tracepoints): New function.
483 (struct linux_target_ops): Fill supports_tracepoints hook.
485 2016-03-18 Yao Qi <yao.qi@linaro.org>
487 * linux-low.c (lwp_signal_can_be_delivered): New function.
488 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
490 2016-03-18 Yao Qi <yao.qi@linaro.org>
492 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
493 0 if signal is enqueued. Remove 'signal' from one debugging
494 message. Move one debugging message to some lines below.
495 Remove code setting 'signal' to 0.
497 2016-03-18 Yao Qi <yao.qi@linaro.org>
499 * linux-low.c (linux_low_filter_event): Remove redundant
500 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
502 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
504 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
505 (struct linux_target_ops): Wire in the above.
507 2016-03-03 Yao Qi <yao.qi@linaro.org>
509 * linux-low.c: Update comments to start_step_over.
511 2016-03-03 Yao Qi <yao.qi@linaro.org>
514 * linux-low.c (handle_extended_wait): Set child suspended
515 if event_lwp->bp_reinsert isn't zero.
517 2016-03-02 Yao Qi <yao.qi@linaro.org>
519 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
520 enqueue_pending_signal.
522 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
524 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
527 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
529 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
530 (s390_regmap_3264) [!__s390x__]: New global.
531 (s390_collect_ptrace_register): Skip map entries containing -1.
532 (s390_supply_ptrace_register): Ditto.
533 (s390_fill_gprs_high): New function.
534 (s390_store_gprs_high): New function.
535 (s390_regsets): Add NT_S390_HIGH_GPRS.
536 (s390_get_hwcap): Enable on 31-bit.
537 (have_hwcap_s390_high_gprs): Enable on 31-bit.
538 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
539 Detect NT_S390_HIGH_GPRS.
540 (s390_usrregs_info_3264): Enable on 31-bit.
541 (s390_regs_info): Enable regs_info_3264 on 31-bit.
542 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
544 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
547 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
548 * configure.srv: Ditto.
549 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
550 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
551 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
552 (init_registers_amd64_linux): Remove prototype.
553 (tdesc_amd64_linux): Remove declaration.
554 (get_ipa_tdesc): New function.
555 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
556 initialize remaining tdescs.
557 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
558 (init_registers_i386_linux): Remove prototype.
559 (tdesc_i386_linux): Remove declaration.
560 (get_ipa_tdesc): New function.
561 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
562 initialize remaining tdescs.
563 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
564 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
565 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
566 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
567 (x86_get_ipa_tdesc_idx): New function.
568 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
569 * linux-x86-tdesc.h: New file.
570 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
571 (target_get_ipa_tdesc_idx): New macro.
572 * tracepoint.c (ipa_tdesc_idx): New macro.
573 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
574 (symbol_list): Add ipa_tdesc_idx.
575 (cmd_qtstart): Write ipa_tdesc_idx in the target.
577 (ipa_tdesc_idx): New variable.
578 (get_context_regcache): Use get_ipa_tdesc.
579 (gdb_collect): Ditto.
581 * tracepoint.h (get_ipa_tdesc): New prototype.
584 2016-02-24 Pedro Alves <palves@redhat.com>
586 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
587 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
588 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
589 Factor out common code between the USE_SIGTRAP_SIGINFO and
590 !USE_SIGTRAP_SIGINFO blocks.
591 (linux_low_filter_event): Call save_stop_reason instead of
592 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
594 (linux_wait_1): Update comments.
596 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
598 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
599 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
600 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
601 ppc_insert_point, ppc_remove_point.
603 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
605 * linux-s390-low.c (s390_supports_z_point_type): New function.
606 (struct linux_target_ops): Wire s390_supports_z_point_type in.
608 2016-02-16 Yao Qi <yao.qi@linaro.org>
610 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
611 PC. Get pc from regcache_read_pc.
613 2016-02-12 Yao Qi <yao.qi@linaro.org>
615 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
616 or linux_get_pc_32bit.
617 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
619 2016-02-12 Yao Qi <yao.qi@linaro.org>
621 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
622 arm_linux_get_next_pcs_fixup.
624 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
626 * tracepoint.c (x_tracepoint_action_download): Change
627 write_inferior_data_ptr to write_inferior_data_pointer.
628 (cmd_qtstart): Likewise.
629 (write_inferior_data_ptr): Remove.
630 (download_agent_expr): Change write_inferior_data_ptr to
631 write_inferior_data_pointer.
632 (download_tracepoint_1): Likewise.
633 (download_tracepoint): Likewise.
634 (download_trace_state_variables): Likewise.
636 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
637 Marcin Kościelnicki <koriakin@0x04.net>
639 * tracepoint.c (struct tracepoint_action_ops): Remove.
640 (struct tracepoint_action): Remove ops.
641 (m_tracepoint_action_download, r_tracepoint_action_download)
642 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
643 size and offset accordingly.
644 (m_tracepoint_action_ops, r_tracepoint_action_ops)
645 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
646 (tracepoint_action_send, tracepoint_action_download): New functions.
647 Helpers for trace action handlers.
648 (add_tracepoint_action): Remove setup actions ops.
649 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
651 2016-02-10 Yao Qi <yao.qi@linaro.org>
653 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
655 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
657 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
659 * configure: Regenerate.
661 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
663 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
664 void * to gdb_byte *.
665 * linux-low.c (siginfo_fixup): Likewise.
666 (linux_xfer_siginfo): Likewise.
667 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
669 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
671 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
673 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
675 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
677 * linux-x86-low.c [__x86_64__]: Include
678 "nat/amd64-linux-siginfo.h".
679 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
680 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
681 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
682 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
683 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
684 (cpt_si_fd, si_timerid, si_overrun): Move from
685 nat/amd64-linux-siginfo.c.
686 * Makefile.in (amd64-linux-siginfo.o:): New rule.
688 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
690 * server.c (skip_to_semicolon): Remove.
691 (process_point_options): Use strchrnul instead of
694 2016-01-26 Yao Qi <yao.qi@linaro.org>
696 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
697 * linux-low.c (install_software_single_step_breakpoints): Don't
698 call regcache_read_pc.
699 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
702 2016-01-26 Yao Qi <yao.qi@linaro.org>
704 * linux-low.c (install_software_single_step_breakpoints): Call
705 regcache_read_pc instead of get_pc.
707 2016-01-26 Yao Qi <yao.qi@linaro.org>
709 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
710 (unblock_async_io): Rename to ...
711 (block_unblock_async_io): ... it. New function.
712 (enable_async_io): Don't install SIGIO handler. Unblock it
714 (disable_async_io): Don't ignore SIGIO. Block it instead.
715 (initialize_async_io): Install SIGIO handler. Don't call
718 2016-01-26 Yao Qi <yao.qi@linaro.org>
720 * remote-utils.c (getpkt): If the buffer isn't empty, and the
721 first character is '\003', call *the_target->request_interrupt.
723 2016-01-25 Yao Qi <yao.qi@linaro.org>
725 * remote-utils.c (new_thread_notify): Remove.
726 (dead_thread_notify): Likewise.
727 * remote-utils.h (new_thread_notify): Remove declaration.
728 (dead_thread_notify): Likewise.
730 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
732 * gdb.trace/pending.exp: Fix expected message on continue.
734 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
736 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
737 it works properly on big-endian machines where sizeof (CORE_ADDR)
740 2016-01-21 Pedro Alves <palves@redhat.com>
742 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
743 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
744 * configure: Regenerate.
746 2016-01-21 Yao Qi <yao.qi@linaro.org>
748 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
749 is_thumb and set it according to CPSR saved on the stack.
750 (get_next_pcs_syscall_next_pc): Pass is_thumb to
751 arm_sigreturn_next_pc.
753 2016-01-18 Yao Qi <yao.qi@linaro.org>
755 * linux-low.c (linux_set_pc_64bit): New function.
756 (linux_get_pc_64bit): New function.
757 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
759 * linux-sparc-low.c (debug_threads): Remove declaration.
760 (sparc_get_pc): Remove.
761 (the_low_target): Use linux_get_pc_64bit instead of
763 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
764 (the_low_target): Use linux_get_pc_64bit and
767 2016-01-18 Yao Qi <yao.qi@linaro.org>
769 * linux-arm-low.c (debug_threads): Remove declaration.
770 (arm_get_pc, arm_set_pc): Remove.
771 (the_low_target): Use linux_get_pc_32bit and
773 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
774 (the_low_target): Use linux_get_pc_32bit and
776 * linux-cris-low.c (debug_threads): Remove declaration.
777 (cris_get_pc, cris_set_pc,): Remove.
778 (the_low_target): Use linux_get_pc_32bit and
780 * linux-crisv32-low.c (debug_threads): Remove declaration.
781 (cris_get_pc, cris_set_pc): Remove.
782 (the_low_target): Use linux_get_pc_32bit and
784 * linux-low.c: Include inttypes.h.
785 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
786 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
787 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
788 (the_low_target): Use linux_get_pc_32bit and
790 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
791 (the_low_target): Use linux_get_pc_32bit and
793 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
794 (the_low_target): Use linux_get_pc_32bit and
796 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
797 (the_low_target): Use linux_get_pc_32bit and
799 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
800 (the_low_target): Use linux_get_pc_32bit and
803 2016-01-18 Gary Benson <gbenson@redhat.com>
805 * configure.ac (AC_FUNC_FORK): New check.
806 * config.in: Regenerate.
807 * configure: Likewise.
809 2016-01-14 Yao Qi <yao.qi@linaro.org>
811 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
812 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
813 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
814 arm_get_next_pcs_ctor.
816 2016-01-12 Josh Stone <jistone@redhat.com>
817 Philippe Waroquiers <philippe.waroquiers@skynet.be>
819 * inferiors.h: Include "gdb_vecs.h".
820 (struct process_info): Add syscalls_to_catch.
821 * inferiors.c (remove_process): Free syscalls_to_catch.
822 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
823 syscall_return stops.
824 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
825 * server.c (handle_general_set): Handle QCatchSyscalls.
826 (handle_query): Report support for QCatchSyscalls.
827 * target.h (struct target_ops): Add supports_catch_syscall.
828 (target_supports_catch_syscall): New macro.
829 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
830 (struct lwp_info): Add syscall_state.
831 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
832 Maintain syscall_state and syscalls_to_catch across exec.
833 (get_syscall_trapinfo): New function, proxy to the_low_target.
834 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
835 (linux_low_filter_event): Toggle syscall_state entry/return for
836 syscall traps, and set it ignored for all others.
837 (gdb_catching_syscalls_p): New function.
838 (gdb_catch_this_syscall_p): New function.
839 (linux_wait_1): Handle SYSCALL_SIGTRAP.
840 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
841 (linux_supports_catch_syscall): New function.
842 (linux_target_ops): Install it.
843 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
844 (the_low_target): Install it.
846 2016-01-12 Mike Frysinger <vapier@gentoo.org>
848 * acinclude.m4: Include new ../warning.m4 file.
849 * configure: Regenerated.
850 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
852 2016-01-12 Mike Frysinger <vapier@gentoo.org>
854 * ax.c (is_goto_target): Mark static.
855 * linux-low.c (register_addr): Likewise.
856 (linux_fetch_registers, linux_store_registers): Likewise.
857 * mem-break.c (any_persistent_commands): Fix old prototype.
858 (add_commands_to_breakpoint): Mark static.
859 * regcache.c (find_register_by_name): Delete unused func.
860 * remote-utils.c (hex_or_minus_one): Mark static.
861 * server.c (monitor_show_help): Mark static.
862 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
863 handle_v_requests): Likewise.
865 2016-01-12 Pedro Alves <palves@redhat.com>
867 Remove use of the registered trademark symbol throughout.
869 2016-01-08 Yao Qi <yao.qi@linaro.org>
871 * remote-utils.c (getpkt): If c is '\003', call target hook
874 2016-01-06 Yao Qi <yao.qi@linaro.org>
876 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
878 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
879 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
880 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
881 (thumb2_breakpoint): Declare.
882 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
884 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
885 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
886 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
888 2016-01-01 Joel Brobecker <brobecker@adacore.com>
890 * gdbreplay.c (gdbreplay_version): Change copyright year in
892 * server.c (gdbserver_version): Likewise.
894 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
896 * server.c (crc32_table): Delete.
897 (crc32): Use libiberty's xcrc32 function.
899 2015-12-22 Joel Brobecker <brobecker@adacore.com>
901 * lynx-low.c (lynx_delete_thread_callback): New function.
902 (lynx_mourn): Properly delete our process and all of its
903 threads. Remove call to clear_inferiors.
905 2015-12-22 Joel Brobecker <brobecker@adacore.com>
907 * target.c (thread_search_callback): Add check that
908 the thread_stopped target callback is not NULL before
911 2015-12-21 Yao Qi <yao.qi@linaro.org>
913 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
916 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
918 * server.c (handle_query): Call target_supports_software_single_step.
920 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
922 * linux-low.c (single_step): New function.
923 (linux_resume_one_lwp_throw): Call single_step.
924 (start_step_over): Likewise.
926 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
928 * Makefile.in (SFILES): Append arch/arm-linux.c,
929 arch/arm-get-next-pcs.c.
930 (arm-linux.o): New rule.
931 (arm-get-next-pcs.o): New rule.
932 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
934 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
935 to linux-aarch32-low.c.
936 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
937 (arm_breakpoint_len, thumb_breakpoint): Likewise.
938 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
939 (thumb2_breakpoint_len): Likewise.
940 (arm_is_thumb_mode): Make non-static.
941 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
942 from linux-aarch32-low.c.
943 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
944 (arm_breakpoint_len, thumb_breakpoint): Likewise.
945 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
946 (thumb2_breakpoint_len): Likewise.
947 (arm_is_thumb_mode): New declaration.
948 * linux-arm-low.c: Include arch/arm-linux.h
949 aarch/arm-get-next-pcs.h, sys/syscall.h.
950 (get_next_pcs_ops): New struct.
951 (get_next_pcs_addr_bits_remove): New function.
952 (get_next_pcs_is_thumb): New function.
953 (get_next_pcs_read_memory_unsigned_integer): Likewise.
954 (arm_sigreturn_next_pc): Likewise.
955 (get_next_pcs_syscall_next_pc): Likewise.
956 (arm_gdbserver_get_next_pcs): Likewise.
957 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
959 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
960 * server.h: Include gdb_vecs.h.
962 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
964 * Makefile.in (SFILES): Append common/common-regcache.c.
965 (OBS): Append common-regcache.o.
966 (common-regcache.o): New rule.
967 * regcache.c (init_register_cache): Initialize cache to
969 (regcache_raw_read_unsigned): New function.
970 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
971 register_status enum.
973 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
975 * linux-aarch64-low.c (the_low_targets): Rename
976 breakpoint_reinsert_addr to get_next_pcs.
977 * linux-arm-low.c (the_low_targets): Likewise.
978 * linux-bfin-low.c (the_low_targets): Likewise.
979 * linux-cris-low.c (the_low_targets): Likewise.
980 * linux-crisv32-low.c (the_low_targets): Likewise.
981 * linux-low.c (can_software_single_step): Likewise.
982 (install_software_single_step_breakpoints): New function.
983 (start_step_over): Use install_software_single_step_breakpoints.
984 * linux-low.h: New CORE_ADDR vector.
985 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
987 * linux-mips-low.c (the_low_targets): Likewise.
988 * linux-nios2-low.c (the_low_targets): Likewise.
989 * linux-sparc-low.c (the_low_targets): Likewise.
991 2015-12-17 Pedro Alves <palves@redhat.com>
993 * linux-low.c (linux_kill_one_lwp): Remove references to
995 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
997 (linux_init_signals): Delete.
998 (initialize_low): Adjust.
999 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1001 2015-12-16 Pedro Alves <palves@redhat.com>
1003 * configure.ac (compiler warning flags): When testing a
1004 -Wno-foo option, check whether -Wfoo works instead.
1005 * configure: Regenerate.
1007 2015-12-11 Don Breazeal <donb@codesourcery.com>
1009 * server.c (process_serial_event): Don't exit from gdbserver
1010 in remote mode if there are still active inferiors.
1012 2015-12-11 Yao Qi <yao.qi@linaro.org>
1014 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1015 arm_breakpoint_at if the process is 32-bit.
1017 2015-12-11 Yao Qi <yao.qi@linaro.org>
1019 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1022 2015-12-07 Yao Qi <yao.qi@linaro.org>
1024 * configure.srv: Append arm.o to srv_tgtobj for
1025 aarch64*-*-linux* target.
1026 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1027 from linux-arm-low.c.
1028 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1029 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1030 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1031 (thumb2_breakpoint_len): Likewise.
1032 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1033 (arm_breakpoint_kinds): Likewise.
1034 (arm_breakpoint_kind_from_pc): Likewise.
1035 (arm_sw_breakpoint_from_kind): Likewise.
1036 (arm_breakpoint_kind_from_current_state): Likewise.
1037 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1038 (arm_sw_breakpoint_from_kind): Declare.
1039 (arm_breakpoint_kind_from_current_state): Declare.
1040 (arm_breakpoint_at): Declare.
1041 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1042 arm_sw_breakpoint_from_kind if process is 32-bit.
1043 (aarch64_breakpoint_kind_from_pc): New function.
1044 (aarch64_breakpoint_kind_from_current_state): New function.
1045 (the_low_target): Initialize fields breakpoint_kind_from_pc
1046 and breakpoint_kind_from_current_state.
1047 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1048 linux-aarch32-low.c.
1049 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1050 (arm_breakpoint, arm_breakpoint_len): Likewise.
1051 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1052 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1053 (arm_is_thumb_mode): Likewise.
1054 (arm_breakpoint_at): Likewise.
1055 (arm_breakpoint_kind_from_pc): Likewise.
1056 (arm_sw_breakpoint_from_kind): Likewise.
1057 (arm_breakpoint_kind_from_current_state): Likewise.
1060 2015-08-04 Yao Qi <yao.qi@linaro.org>
1062 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1063 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1064 * server.c (extended_protocol): Remove "static".
1065 * server.h (extended_protocol): Declare it.
1067 2015-12-04 Josh Stone <jistone@redhat.com>
1069 * target.h (struct target_ops) <arch_setup>: Rename to ...
1070 (struct target_ops) <post_create_inferior>: ... this.
1071 (target_arch_setup): Rename to ...
1072 (target_post_create_inferior): ... this, calling post_create_inferior.
1073 * server.c (start_inferior): Update target_arch_setup calls to
1074 target_post_create_inferior.
1075 * linux-low.c (linux_low_ptrace_options): Forward declare.
1076 (linux_arch_setup): Update its comment for general use.
1077 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1078 (struct linux_target_ops): Use linux_post_create_inferior.
1079 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1080 to post_create_inferior.
1081 * nto-low.c (struct nto_target_ops): Likewise.
1082 * spu-low.c (struct spu_target_ops): Likewise.
1083 * win32-low.c (struct win32_target_ops): Likewise.
1085 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1087 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1089 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1091 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1092 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1093 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1094 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1095 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1096 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1097 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1098 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1099 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1100 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1101 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1102 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1104 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1106 * linux-low.c (linux_look_up_symbols): Don't call
1107 linux_supports_traceclone.
1108 * linux-low.h (thread_db_init): Remove use_events argument.
1109 * thread-db.c (thread_db_use_event): Remove global variable.
1110 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1111 (struct thread_db) <td_create_bp>: Remove field.
1112 (thread_db_create_event): Remove function.
1113 (thread_db_enable_reporting): Likewise.
1114 (find_one_thread): Don't check for thread_db_use_events.
1115 (attach_thread): Likewise.
1116 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1117 (try_thread_db_load_1): Don't check for thread_db_use_events.
1118 (thread_db_init): Remove use_events argument and thread events
1120 (remove_thread_event_breakpoints): Remove function.
1121 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1123 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1125 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1128 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1130 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1131 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1133 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1136 * linux-low.c (can_hardware_single_step): Use
1137 supports_hardware_single_step.
1138 (can_software_single_step): New function.
1139 (start_step_over): Call can_software_single_step.
1140 (linux_supports_hardware_single_step): New function.
1141 (struct target_ops) <supports_software_single_step>: Initialize.
1142 * linux-low.h (struct linux_target_ops)
1143 <supports_hardware_single_step>: Initialize.
1144 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1145 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1146 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1147 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1148 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1150 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1151 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1152 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1153 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1155 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1156 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1158 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1160 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1163 * target.h (struct target_ops): <supports_software_single_step>:
1165 (target_supports_software_single_step): New macro.
1167 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1169 * linux-low.c (linux_wait_1): Fix pc advance condition.
1170 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1171 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1173 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1175 * linux-arm-low.c (arm_is_thumb_mode): New function.
1176 (arm_breakpoint_at): Use arm_is_thumb_mode.
1177 (arm_breakpoint_kind_from_current_state): New function.
1178 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1180 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1181 (linux_breakpoint_kind_from_current_state): New function.
1182 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1183 * linux-low.h (struct linux_target_ops)
1184 <breakpoint_kind_from_current_state>: New field.
1185 * target.h (struct target_ops): Likewise.
1186 (target_breakpoint_kind_from_current_state): New macro.
1188 2015-11-30 Pedro Alves <palves@redhat.com>
1190 * linux-low.c (linux_resume): Wake up the event loop before
1193 2015-11-30 Pedro Alves <palves@redhat.com>
1195 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1197 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1199 * target.c (struct thread_search): New structure.
1200 (thread_search_callback): New function.
1201 (prev_general_thread): New global.
1202 (prepare_to_access_memory, done_accessing_memory): New functions.
1203 * target.h (prepare_to_access_memory, done_accessing_memory):
1204 Replace macros with function declarations.
1206 2015-11-30 Pedro Alves <palves@redhat.com>
1209 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1210 report TARGET_WAITKIND_NO_RESUMED.
1211 * remote-utils.c (prepare_resume_reply): Handle
1212 TARGET_WAITKIND_NO_RESUMED.
1213 * server.c (report_no_resumed): New global.
1214 (handle_query) <qSupported>: Handle "no-resumed+". Report
1215 "no-resumed+" support.
1216 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1217 return error if the client doesn't support no-resumed events.
1218 (push_stop_notification): New function.
1219 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1220 events if the client supports them.
1222 2015-11-30 Pedro Alves <palves@redhat.com>
1224 * linux-low.c (thread_still_has_status_pending_p): Don't check
1226 (lwp_resumed): New function.
1227 (status_pending_p_callback): Return early if the LWP is not
1228 supposed to be resumed.
1230 2015-11-30 Pedro Alves <palves@redhat.com>
1232 * linux-low.c (handle_extended_wait): Assert that the LWP's
1233 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1234 thread create events, leave the new child's status pending.
1235 (linux_low_filter_event): If GDB wants to hear about thread exit
1236 events, leave the LWP marked dead and don't delete it.
1237 (linux_wait_for_event_filtered): Don't check for thread exit.
1238 (filter_exit_event): New function.
1239 (linux_wait_1): Use it, when returning an exit event.
1240 (linux_resume_one_lwp_throw): Assert that the LWP's
1241 waitstatus is TARGET_WAITKIND_IGNORE.
1242 * remote-utils.c (prepare_resume_reply): Handle
1243 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1244 * server.c (report_thread_events): New global.
1245 (handle_general_set): Handle QThreadEvents.
1246 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1247 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1248 TARGET_WAITKIND_THREAD_EXITED.
1249 * server.h (report_thread_events): Declare.
1251 2015-11-30 Pedro Alves <palves@redhat.com>
1253 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1254 the thread's last_resume_kind was resume_stop.
1256 2015-11-30 Pedro Alves <palves@redhat.com>
1258 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1261 2015-11-30 Pedro Alves <palves@redhat.com>
1263 * server.c (handle_v_requests): Handle vCtrlC.
1265 2015-11-30 Pedro Alves <palves@redhat.com>
1267 * gdbthread.h (find_any_thread_of_pid): Declare.
1268 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1270 * server.c (handle_query): If current_thread is NULL, look for
1271 another thread of the selected process.
1273 2015-11-26 Daniel Colascione <dancol@dancol.org>
1274 Simon Marchi <simon.marchi@ericsson.com>
1276 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1277 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1279 * target.h (struct target_ops) <thread_name>: New field.
1280 (target_thread_name): New macro.
1282 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1284 * regcache.h (regcache_invalidate_pid): Add declaration.
1285 * regcache.c (regcache_invalidate_pid): New function, extracted
1286 from regcache_invalidate.
1287 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1288 Add trivial documentation comment.
1289 * lynx-low.c: Use regcache_invalidate_pid instead of
1290 regcache_invalidate.
1292 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1294 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1295 and Elf64_auxv_t if the target is Android.
1297 2015-11-22 Doug Evans <xdje42@gmail.com>
1299 * target.h: #include <sys/types.h>.
1301 2015-11-19 Pedro Alves <palves@redhat.com>
1303 * linux-low.c (linux_process_qsupported): Change prototype.
1305 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1307 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1308 and adjust to loop over all features.
1309 * server.c (handle_query) <qSupported>: Adjust to call
1310 target_process_qsupported once, passing it a vector of unprocessed
1312 * target.h (struct target_ops) <process_qsupported>: Change
1314 (target_process_qsupported): Adjust.
1316 2015-11-19 Pedro Alves <palves@redhat.com>
1318 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1320 * configure: Regenerate.
1322 2015-11-19 Pedro Alves <palves@redhat.com>
1324 * configure: Regenerate.
1326 2015-11-19 Yao Qi <yao.qi@linaro.org>
1328 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1331 2015-11-19 Yao Qi <yao.qi@linaro.org>
1333 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1334 (struct aarch64_operand): Move enum out.
1336 2015-11-19 Yao Qi <yao.qi@linaro.org>
1338 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1339 struct user_fpsimd_state *.
1340 (aarch64_store_fpregset): Likewise.
1342 2015-11-19 Yao Qi <yao.qi@linaro.org>
1344 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1345 struct user_pt_regs *.
1346 (aarch64_store_gregset): Likewise.
1348 2015-11-18 Pedro Alves <palves@redhat.com>
1350 * Makefile.in (all_object_files): Add $IPA_OBJS.
1352 2015-11-17 Pedro Alves <palves@redhat.com>
1354 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1355 GDB_SIGNAL_0 and gdb_signal_to_string.
1357 2015-11-17 Pedro Alves <palves@redhat.com>
1359 * win32-low.c (handle_output_debug_string): Remove parameter.
1360 (win32_kill): Remove our_status local and adjust call to
1361 handle_output_debug_string.
1362 (get_child_debug_event): Adjust call to
1363 handle_output_debug_string.
1365 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1367 * linux-mips-low.c (mips_fill_gregset): Add cast.
1368 (mips_store_gregset): Likewise.
1369 (mips_fill_fpregset): Likewise.
1370 (mips_store_fpregset): Likewise.
1372 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1374 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1377 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1379 * linux-mips-low.c (mips_linux_new_thread): Change type of
1380 watch_type to enum target_hw_bp_type.
1382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1384 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1385 Change return type to arm_hwbp_type.
1387 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1389 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1390 (arm_store_gregset): Likewise.
1391 * linux-arm-low.c (arm_get_hwcap): Likewise.
1392 (arm_read_description): Likewise.
1394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1396 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1398 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1400 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1401 (ppc_fill_vsxregset): Likewise.
1402 (ppc_store_vsxregset): Likewise.
1403 (ppc_fill_vrregset): Likewise.
1404 (ppc_store_vrregset): Likewise.
1405 (ppc_fill_evrregset): Likewise.
1406 (ppc_store_evrregset): Likewise.
1408 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1410 * linux-ppc-low.c (ppc_usrregs_info): Remove
1411 forward-declaration.
1412 (ppc_arch_setup): Move lower in file.
1414 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1416 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1417 (ps_pdwrite): Likewise.
1419 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1421 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1422 to after assert checks.
1424 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1426 * proc-service.c (ps_pdread): Add/adjust casts.
1427 (ps_pdwrite): Add/adjust casts.
1429 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1431 * server.c (handle_search_memory_1): Cast return value of
1434 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1436 * server.c (write_qxfer_response): Change type of data to
1439 2015-10-29 Pedro Alves <palves@redhat.com>
1441 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1443 2015-10-29 Pedro Alves <palves@redhat.com>
1445 * tracepoint.c (clear_installed_tracepoints): Add casts.
1447 2015-10-29 Pedro Alves <palves@redhat.com>
1449 * server.c (handle_v_cont, process_serial_event): Add enum
1450 gdb_signal casts to signal parsing code.
1452 2015-10-29 Pedro Alves <palves@redhat.com>
1454 * linux-low.h (NULL_REGSET): Define.
1455 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1456 * linux-arm-low.c (arm_regsets): Likewise.
1457 * linux-crisv32-low.c (cris_regsets): Likewise.
1458 * linux-m68k-low.c (m68k_regsets): Likewise.
1459 * linux-mips-low.c (mips_regsets): Likewise.
1460 * linux-nios2-low.c (nios2_regsets): Likewise.
1461 * linux-ppc-low.c (ppc_regsets): Likewise.
1462 * linux-s390-low.c (s390_regsets): Likewise.
1463 * linux-sh-low.c (sh_regsets): Likewise.
1464 * linux-sparc-low.c (sparc_regsets): Likewise.
1465 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1466 * linux-tile-low.c (tile_regsets): Likewise.
1467 * linux-x86-low.c (x86_regsets): Likewise.
1468 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1470 2015-10-29 Pedro Alves <palves@redhat.com>
1472 * linux-low.h (NULL_REGSET): Define.
1473 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1474 * linux-arm-low.c (arm_regsets): Likewise.
1475 * linux-crisv32-low.c (cris_regsets): Likewise.
1476 * linux-m68k-low.c (m68k_regsets): Likewise.
1477 * linux-mips-low.c (mips_regsets): Likewise.
1478 * linux-nios2-low.c (nios2_regsets): Likewise.
1479 * linux-ppc-low.c (ppc_regsets): Likewise.
1480 * linux-s390-low.c (s390_regsets): Likewise.
1481 * linux-sh-low.c (sh_regsets): Likewise.
1482 * linux-sparc-low.c (sparc_regsets): Likewise.
1483 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1484 * linux-tile-low.c (tile_regsets): Likewise.
1485 * linux-x86-low.c (x86_regsets): Likewise.
1486 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1488 2015-10-26 Doug Evans <dje@google.com>
1490 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1492 2015-10-26 Doug Evans <dje@google.com>
1494 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1496 2015-10-26 Doug Evans <dje@google.com>
1498 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1500 (attach_thread, find_new_threads_callback): Ditto.
1502 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1504 * mem-break.h (set_breakpoint_data): Remove.
1506 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1508 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1510 (initialize_low): Remove set_breakpoint_data call.
1511 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1512 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1513 (initialize_low): Remove set_breakpoint_data call.
1514 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1515 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1516 (initialize_low): Remove set_breakpoint_data call.
1518 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1520 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1521 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1522 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1523 * target.h (target_breakpoint_kind_from_pc): New macro.
1525 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1527 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1528 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1529 the default breakpoint kind.
1531 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1533 * linux-arm-low.c (arm_supports_z_point_type): Add software
1536 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1538 * linux-arm-low.c: Refactor breakpoint definitions.
1539 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1540 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1542 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1544 * Makefile.in: Add arm.c/o.
1545 * configure.srv: Likewise.
1546 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1547 (arm_breakpoint_kind_from_pc): New function.
1548 (arm_sw_breakpoint_from_kind): Return proper kind.
1549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1551 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1553 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1555 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1556 (struct raw_breakpoint) <size>: Remove.
1557 (struct raw_breakpoint) <kind>: Add.
1558 (bp_size): New function.
1559 (bp_opcode): Likewise.
1560 (find_raw_breakpoint_at): Adjust for kind.
1561 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1562 (remove_memory_breakpoint): Adjust for kind call bp_size.
1563 (set_raw_breakpoint_at): Adjust for kind.
1564 (set_breakpoint): Likewise.
1565 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1566 (delete_raw_breakpoint): Adjust for kind.
1567 (delete_breakpoint): Likewise.
1568 (find_gdb_breakpoint): Likewise.
1569 (set_gdb_breakpoint_1): Likewise.
1570 (set_gdb_breakpoint): Likewise.
1571 (delete_gdb_breakpoint_1): Likewise.
1572 (delete_gdb_breakpoint): Likewise.
1573 (uninsert_raw_breakpoint): Likewise.
1574 (reinsert_raw_breakpoint): Likewise.
1575 (set_breakpoint_data): Remove.
1576 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1577 (check_mem_read): Adjust for kind call bp_size.
1578 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1579 (clone_one_breakpoint): Adjust for kind.
1580 * mem-break.h (set_gdb_breakpoint): Likewise.
1581 (delete_gdb_breakpoint): Likewise.
1582 * server.c (process_serial_event): Likewise.
1584 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1586 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1587 (struct linux_target_ops) <breakpoint>: Remove.
1588 (struct linux_target_ops) <breakpoint_len>: Remove.
1589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1591 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1592 (arm_sw_breakpoint_from_kind): New function.
1593 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1594 (struct linux_target_ops) <breakpoint>: Remove.
1595 (struct linux_target_ops) <breakpoint_len>: Remove.
1596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1598 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1599 (struct linux_target_ops) <breakpoint>: Remove.
1600 (struct linux_target_ops) <breakpoint_len>: Remove.
1601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1603 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1604 (struct linux_target_ops) <breakpoint>: Remove.
1605 (struct linux_target_ops) <breakpoint_len>: Remove.
1606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1608 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1609 and sw_breakpoint_from_kind to increment the pc.
1610 (linux_breakpoint_kind_from_pc): New function.
1611 (linux_sw_breakpoint_from_kind): New function.
1612 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1613 (initialize_low): Call breakpoint_kind_from_pc and
1614 sw_breakpoint_from_kind to replace breakpoint_data/len.
1615 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1618 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1619 (struct linux_target_ops) <breakpoint>: Remove.
1620 (struct linux_target_ops) <breakpoint_len>: Remove.
1621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1623 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1624 (struct linux_target_ops) <breakpoint>: Remove.
1625 (struct linux_target_ops) <breakpoint_len>: Remove.
1626 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1628 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1629 (struct linux_target_ops) <breakpoint>: Remove.
1630 (struct linux_target_ops) <breakpoint_len>: Remove.
1631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1633 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1634 (struct linux_target_ops) <breakpoint>: Remove.
1635 (struct linux_target_ops) <breakpoint_len>: Remove.
1636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1638 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1639 (struct linux_target_ops) <breakpoint>: Remove.
1640 (struct linux_target_ops) <breakpoint_len>: Remove.
1641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1643 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1644 (struct linux_target_ops) <breakpoint>: Remove.
1645 (struct linux_target_ops) <breakpoint_len>: Remove.
1646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1647 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1648 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1649 (struct linux_target_ops) <breakpoint>: Remove.
1650 (struct linux_target_ops) <breakpoint_len>: Remove.
1651 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1652 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1653 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1654 (struct linux_target_ops) <breakpoint>: Remove.
1655 (struct linux_target_ops) <breakpoint_len>: Remove.
1656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1657 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1658 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1664 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1665 (struct linux_target_ops) <breakpoint>: Remove.
1666 (struct linux_target_ops) <breakpoint_len>: Remove.
1667 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1668 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1669 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1670 (struct linux_target_ops) <breakpoint>: Remove.
1671 (struct linux_target_ops) <breakpoint_len>: Remove.
1672 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1673 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1675 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1677 * linux-cris-low.c (cris_get_pc): Remove void arg.
1679 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1681 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1684 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1686 * inferiors.c (thread_pid_matches_callback): New function.
1687 (find_thread_process): New function.
1688 (remove_thread): Reset current_thread.
1689 (remove_process): Assert threads have been removed first.
1691 2015-10-15 Yao Qi <yao.qi@linaro.org>
1693 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1695 (aarch64_remove_point): Likewise.
1696 * regcache.c (regcache_register_size): New function.
1698 2015-10-12 Yao Qi <yao.qi@linaro.org>
1700 * linux-aarch64-low.c: Update all callers as emit_load_store
1701 is renamed to aarch64_emit_load_store.
1703 2015-10-12 Yao Qi <yao.qi@linaro.org>
1705 * linux-aarch64-low.c: Update all callers of function renaming
1706 from emit_insn to aarch64_emit_insn.
1708 2015-10-12 Yao Qi <yao.qi@linaro.org>
1710 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1711 arch/aarch64-insn.h.
1712 (struct aarch64_memory_operand): Likewise.
1714 (emit_insn): Move to arch/aarch64-insn.c.
1715 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1716 (emit_load_store): Move to arch/aarch64-insn.c.
1717 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1718 (can_encode_int32): Remove.
1720 2015-10-12 Yao Qi <yao.qi@linaro.org>
1722 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1723 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1724 (aarch64_relocate_instruction): Likewise.
1725 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1726 (struct aarch64_insn_visitor): Likewise.
1728 2015-10-12 Yao Qi <yao.qi@linaro.org>
1730 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1731 (struct aarch64_insn_visitor): New.
1732 (struct aarch64_insn_relocation_data): New.
1733 (aarch64_ftrace_insn_reloc_b): New function.
1734 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1735 (aarch64_ftrace_insn_reloc_cb): Likewise.
1736 (aarch64_ftrace_insn_reloc_tb): Likewise.
1737 (aarch64_ftrace_insn_reloc_adr): Likewise.
1738 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1739 (aarch64_ftrace_insn_reloc_others): Likewise.
1741 (aarch64_relocate_instruction): Use visitor.
1743 2015-10-12 Yao Qi <yao.qi@linaro.org>
1745 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1746 int. Add argument buf.
1747 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1748 aarch64_relocate_instruction.
1750 2015-10-12 Yao Qi <yao.qi@linaro.org>
1752 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1753 argument insn. Remove local variable insn. Don't call
1755 (aarch64_install_fast_tracepoint_jump_pad): Call
1758 2015-09-30 Yao Qi <yao.qi@linaro.org>
1760 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1761 (emit_load_store_pair): Likewise.
1763 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1765 * dll.c (match_dll): Add cast(s).
1766 (unloaded_dll): Likewise.
1767 * linux-low.c (second_thread_of_pid_p): Likewise.
1768 (delete_lwp_callback): Likewise.
1769 (count_events_callback): Likewise.
1770 (select_event_lwp_callback): Likewise.
1771 (linux_set_resume_request): Likewise.
1772 * server.c (accumulate_file_name_length): Likewise.
1773 (emit_dll_description): Likewise.
1774 (handle_qxfer_threads_worker): Likewise.
1775 (visit_actioned_threads): Likewise.
1776 * thread-db.c (any_thread_of): Likewise.
1777 * tracepoint.c (same_process_p): Likewise.
1778 (match_blocktype): Likewise.
1779 (build_traceframe_info_xml): Likewise.
1781 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1783 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1785 (gdb_unparse_agent_expr): Likewise.
1786 * hostio.c (require_data): Likewise.
1787 (handle_pread): Likewise.
1788 * linux-low.c (disable_regset): Likewise.
1789 (fetch_register): Likewise.
1790 (store_register): Likewise.
1791 (get_dynamic): Likewise.
1792 (linux_qxfer_libraries_svr4): Likewise.
1793 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1794 (set_fast_tracepoint_jump): Likewise.
1795 (uninsert_fast_tracepoint_jumps_at): Likewise.
1796 (reinsert_fast_tracepoint_jumps_at): Likewise.
1797 (validate_inserted_breakpoint): Likewise.
1798 (clone_agent_expr): Likewise.
1799 * regcache.c (init_register_cache): Likewise.
1800 * remote-utils.c (putpkt_binary_1): Likewise.
1801 (decode_M_packet): Likewise.
1802 (decode_X_packet): Likewise.
1803 (look_up_one_symbol): Likewise.
1804 (relocate_instruction): Likewise.
1805 (monitor_output): Likewise.
1806 * server.c (handle_search_memory): Likewise.
1807 (handle_qxfer_exec_file): Likewise.
1808 (handle_qxfer_libraries): Likewise.
1809 (handle_qxfer): Likewise.
1810 (handle_query): Likewise.
1811 (handle_v_cont): Likewise.
1812 (handle_v_run): Likewise.
1813 (captured_main): Likewise.
1814 * target.c (write_inferior_memory): Likewise.
1815 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1816 * tracepoint.c (init_trace_buffer): Likewise.
1817 (add_tracepoint_action): Likewise.
1818 (add_traceframe): Likewise.
1819 (add_traceframe_block): Likewise.
1820 (cmd_qtdpsrc): Likewise.
1821 (cmd_qtdv): Likewise.
1822 (cmd_qtstatus): Likewise.
1823 (response_source): Likewise.
1824 (response_tsv): Likewise.
1825 (cmd_qtnotes): Likewise.
1826 (gdb_collect): Likewise.
1827 (initialize_tracepoint): Likewise.
1829 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1831 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1832 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1833 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1835 (enum aarch64_condition_codes): New enum.
1836 (w0): New static global.
1839 (struct aarch64_memory_operand) <type>: New
1840 MEMORY_OPERAND_POSTINDEX type.
1841 (postindex_memory_operand): New helper function.
1842 (emit_ret): New function.
1843 (emit_load_store_pair): New function, factored out of emit_stp
1844 with support for MEMORY_OPERAND_POSTINDEX.
1845 (emit_stp): Rewrite using emit_load_store_pair.
1846 (emit_ldp): New function.
1847 (emit_load_store): Likewise.
1848 (emit_ldr): Mention post-index instruction in comment.
1849 (emit_ldrh): New function.
1850 (emit_ldrb): New function.
1851 (emit_ldrsw): Mention post-index instruction in comment.
1852 (emit_str): Likewise.
1853 (emit_subs): New function.
1854 (emit_cmp): Likewise.
1855 (emit_and): Likewise.
1856 (emit_orr): Likewise.
1857 (emit_orn): Likewise.
1858 (emit_eor): Likewise.
1859 (emit_mvn): Likewise.
1860 (emit_lslv): Likewise.
1861 (emit_lsrv): Likewise.
1862 (emit_asrv): Likewise.
1863 (emit_mul): Likewise.
1864 (emit_sbfm): Likewise.
1865 (emit_sbfx): Likewise.
1866 (emit_ubfm): Likewise.
1867 (emit_ubfx): Likewise.
1868 (emit_csinc): Likewise.
1869 (emit_cset): Likewise.
1870 (emit_nop): Likewise.
1871 (emit_ops_insns): New helper function.
1872 (emit_pop): Likewise.
1873 (emit_push): Likewise.
1874 (aarch64_emit_prologue): New function.
1875 (aarch64_emit_epilogue): Likewise.
1876 (aarch64_emit_add): Likewise.
1877 (aarch64_emit_sub): Likewise.
1878 (aarch64_emit_mul): Likewise.
1879 (aarch64_emit_lsh): Likewise.
1880 (aarch64_emit_rsh_signed): Likewise.
1881 (aarch64_emit_rsh_unsigned): Likewise.
1882 (aarch64_emit_ext): Likewise.
1883 (aarch64_emit_log_not): Likewise.
1884 (aarch64_emit_bit_and): Likewise.
1885 (aarch64_emit_bit_or): Likewise.
1886 (aarch64_emit_bit_xor): Likewise.
1887 (aarch64_emit_bit_not): Likewise.
1888 (aarch64_emit_equal): Likewise.
1889 (aarch64_emit_less_signed): Likewise.
1890 (aarch64_emit_less_unsigned): Likewise.
1891 (aarch64_emit_ref): Likewise.
1892 (aarch64_emit_if_goto): Likewise.
1893 (aarch64_emit_goto): Likewise.
1894 (aarch64_write_goto_address): Likewise.
1895 (aarch64_emit_const): Likewise.
1896 (aarch64_emit_call): Likewise.
1897 (aarch64_emit_reg): Likewise.
1898 (aarch64_emit_pop): Likewise.
1899 (aarch64_emit_stack_flush): Likewise.
1900 (aarch64_emit_zero_ext): Likewise.
1901 (aarch64_emit_swap): Likewise.
1902 (aarch64_emit_stack_adjust): Likewise.
1903 (aarch64_emit_int_call_1): Likewise.
1904 (aarch64_emit_void_call_2): Likewise.
1905 (aarch64_emit_eq_goto): Likewise.
1906 (aarch64_emit_ne_goto): Likewise.
1907 (aarch64_emit_lt_goto): Likewise.
1908 (aarch64_emit_le_goto): Likewise.
1909 (aarch64_emit_gt_goto): Likewise.
1910 (aarch64_emit_ge_got): Likewise.
1911 (aarch64_emit_ops_impl): New static global variable.
1912 (aarch64_emit_ops): New target function, return
1913 &aarch64_emit_ops_impl.
1914 (struct linux_target_ops): Install it.
1916 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1918 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1919 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1921 * linux-aarch64-ipa.c: New file.
1922 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1924 (aarch64_get_thread_area): New target method.
1925 (extract_signed_bitfield): New helper function.
1926 (aarch64_decode_ldr_literal): New function.
1927 (enum aarch64_opcodes): New enum.
1928 (struct aarch64_register): New struct.
1929 (struct aarch64_operand): New struct.
1930 (x0): New static global.
1939 (aarch64_register): New helper function.
1940 (register_operand): Likewise.
1941 (immediate_operand): Likewise.
1942 (struct aarch64_memory_operand): New struct.
1943 (offset_memory_operand): New helper function.
1944 (preindex_memory_operand): Likewise.
1945 (enum aarch64_system_control_registers): New enum.
1946 (ENCODE): New macro.
1947 (emit_insn): New helper function.
1948 (emit_b): New function.
1949 (emit_bcond): Likewise.
1950 (emit_cb): Likewise.
1951 (emit_tb): Likewise.
1952 (emit_blr): Likewise.
1953 (emit_stp): Likewise.
1954 (emit_ldp_q_offset): Likewise.
1955 (emit_stp_q_offset): Likewise.
1956 (emit_load_store): Likewise.
1957 (emit_ldr): Likewise.
1958 (emit_ldrsw): Likewise.
1959 (emit_str): Likewise.
1960 (emit_ldaxr): Likewise.
1961 (emit_stxr): Likewise.
1962 (emit_stlr): Likewise.
1963 (emit_data_processing_reg): Likewise.
1964 (emit_data_processing): Likewise.
1965 (emit_add): Likewise.
1966 (emit_sub): Likewise.
1967 (emit_mov): Likewise.
1968 (emit_movk): Likewise.
1969 (emit_mov_addr): Likewise.
1970 (emit_mrs): Likewise.
1971 (emit_msr): Likewise.
1972 (emit_sevl): Likewise.
1973 (emit_wfe): Likewise.
1974 (append_insns): Likewise.
1975 (can_encode_int32_in): New helper function.
1976 (aarch64_relocate_instruction): New function.
1977 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1978 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1979 (struct linux_target_ops): Install aarch64_get_thread_area,
1980 aarch64_install_fast_tracepoint_jump_pad and
1981 aarch64_get_min_fast_tracepoint_insn_len.
1983 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1985 * Makefile.in (aarch64-insn.o): New rule.
1986 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1988 2015-09-21 Yao Qi <yao.qi@linaro.org>
1990 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1992 2015-09-21 Yao Qi <yao.qi@linaro.org>
1994 * tracepoint.c (max_jump_pad_size): Remove.
1996 2015-09-18 Yao Qi <yao.qi@linaro.org>
1998 * linux-aarch64-low.c: Don't include sys/uio.h.
1999 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2001 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2003 * tracepoint.c (eval_result_type): Change prototype.
2004 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2006 2015-09-15 Pedro Alves <palves@redhat.com>
2008 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2009 Check whether to report exec events instead of checking whether
2010 multiprocess is enabled.
2012 2015-09-15 Pedro Alves <palves@redhat.com>
2015 * remote-utils.c (prepare_resume_reply): Merge
2016 TARGET_WAITKIND_VFORK_DONE switch case with the
2017 TARGET_WAITKIND_FORKED case.
2019 2015-09-15 Yao Qi <yao.qi@linaro.org>
2021 * server.c (handle_query): Check string comparison using
2022 "else if" instead of "if".
2024 2015-09-15 Yao Qi <yao.qi@linaro.org>
2026 * server.c (vCont_supported): New global variable.
2027 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2028 matches. Append ";vContSupported+" to own_buf.
2029 (handle_v_requests): Append ";s;S" to own_buf if target supports
2030 hardware single step or vCont_supported is false.
2031 (capture_main): Set vCont_supported to zero.
2033 2015-09-15 Yao Qi <yao.qi@linaro.org>
2035 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2037 (linux_supports_hardware_single_step): ... New function.
2038 (linux_target_ops): Update.
2039 * lynx-low.c (lynx_target_ops): Set field
2040 supports_hardware_single_step to target_can_do_hardware_single_step.
2041 * nto-low.c (nto_target_ops): Likewise.
2042 * spu-low.c (spu_target_ops): Likewise.
2043 * win32-low.c (win32_target_ops): Likewise.
2044 * target.c (target_can_do_hardware_single_step): New function.
2045 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2046 Remove. <supports_hardware_single_step>: New field.
2047 (target_supports_conditional_breakpoints): Remove.
2048 (target_supports_hardware_single_step): New macro.
2049 (target_can_do_hardware_single_step): Declare.
2050 * server.c (handle_query): Use target_supports_hardware_single_step
2051 instead of target_supports_conditional_breakpoints.
2053 2015-09-15 Yao Qi <yao.qi@linaro.org>
2055 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2057 (struct linux_target_ops the_low_target): Install
2058 aarch64_linux_siginfo_fixup.
2060 2015-09-11 Don Breazeal <donb@codesourcery.com>
2061 Luis Machado <lgustavo@codesourcery.com>
2063 * linux-low.c (linux_mourn): Static declaration.
2064 (linux_arch_setup): Move in front of
2065 handle_extended_wait.
2066 (linux_arch_setup_thread): New function.
2067 (handle_extended_wait): Handle exec events. Call
2068 linux_arch_setup_thread. Make event_lwp argument a
2069 pointer-to-a-pointer.
2070 (check_zombie_leaders): Do not check stopped threads.
2071 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2072 (linux_low_filter_event): Add lwp and thread for exec'ing
2073 non-leader thread if leader thread has been deleted.
2074 Refactor code into linux_arch_setup_thread and call it.
2075 Pass child lwp pointer by reference to handle_extended_wait.
2076 (linux_wait_for_event_filtered): Update comment.
2077 (linux_wait_1): Prevent clobbering exec event status.
2078 (linux_supports_exec_events): New function.
2079 (linux_target_ops) <supports_exec_events>: Initialize new member.
2080 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2082 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2083 * server.c (report_exec_events): New global variable.
2084 (handle_query): Handle qSupported query for exec-events feature.
2085 (captured_main): Initialize report_exec_events.
2086 * server.h (report_exec_events): Declare new global variable.
2087 * target.h (struct target_ops) <supports_exec_events>: New
2089 (target_supports_exec_events): New macro.
2090 * win32-low.c (win32_target_ops) <supports_exec_events>:
2091 Initialize new member.
2093 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2095 * linux-low.c (linux_low_enable_btrace): Remove.
2096 (linux_target_ops): Replace linux_low_enable_btrace with
2097 linux_enable_btrace.
2099 2015-09-03 Yao Qi <yao.qi@linaro.org>
2101 * linux-aarch64-low.c (aarch64_insert_point): Call
2102 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2105 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2107 * linux-low.c (check_stopped_by_breakpoint): Use
2108 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2110 2015-08-27 Pedro Alves <palves@redhat.com>
2112 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2114 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2116 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2117 the XNEW-family equivalent.
2118 (compile_bytecodes): Likewise.
2119 * dll.c (loaded_dll): Likewise.
2120 * event-loop.c (append_callback_event): Likewise.
2121 (create_file_handler): Likewise.
2122 (create_file_event): Likewise.
2123 * hostio.c (handle_open): Likewise.
2124 * inferiors.c (add_thread): Likewise.
2125 (add_process): Likewise.
2126 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2127 * linux-arm-low.c (arm_new_process): Likewise.
2128 (arm_new_thread): Likewise.
2129 * linux-low.c (add_to_pid_list): Likewise.
2130 (linux_add_process): Likewise.
2131 (handle_extended_wait): Likewise.
2132 (add_lwp): Likewise.
2133 (enqueue_one_deferred_signal): Likewise.
2134 (enqueue_pending_signal): Likewise.
2135 (linux_resume_one_lwp_throw): Likewise.
2136 (linux_resume_one_thread): Likewise.
2137 (linux_read_memory): Likewise.
2138 (linux_write_memory): Likewise.
2139 * linux-mips-low.c (mips_linux_new_process): Likewise.
2140 (mips_linux_new_thread): Likewise.
2141 (mips_add_watchpoint): Likewise.
2142 * linux-x86-low.c (initialize_low_arch): Likewise.
2143 * lynx-low.c (lynx_add_process): Likewise.
2144 * mem-break.c (set_raw_breakpoint_at): Likewise.
2145 (set_breakpoint): Likewise.
2146 (add_condition_to_breakpoint): Likewise.
2147 (add_commands_to_breakpoint): Likewise.
2148 (clone_agent_expr): Likewise.
2149 (clone_one_breakpoint): Likewise.
2150 * regcache.c (new_register_cache): Likewise.
2151 * remote-utils.c (look_up_one_symbol): Likewise.
2152 * server.c (queue_stop_reply): Likewise.
2153 (start_inferior): Likewise.
2154 (queue_stop_reply_callback): Likewise.
2155 (handle_target_event): Likewise.
2156 * spu-low.c (fetch_ppc_memory): Likewise.
2157 (store_ppc_memory): Likewise.
2158 * target.c (set_target_ops): Likewise.
2159 * thread-db.c (thread_db_load_search): Likewise.
2160 (try_thread_db_load_1): Likewise.
2161 * tracepoint.c (add_tracepoint): Likewise.
2162 (add_tracepoint_action): Likewise.
2163 (create_trace_state_variable): Likewise.
2164 (cmd_qtdpsrc): Likewise.
2165 (cmd_qtro): Likewise.
2166 (add_while_stepping_state): Likewise.
2167 * win32-low.c (child_add_thread): Likewise.
2168 (get_image_name): Likewise.
2170 2015-08-25 Yao Qi <yao.qi@linaro.org>
2172 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2174 2015-08-25 Yao Qi <yao.qi@linaro.org>
2176 * Makefile.in (aarch64-linux.o): New rule.
2177 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2179 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2180 (aarch64_init_debug_reg_state): Make it extern.
2181 (aarch64_linux_prepare_to_resume): Remove.
2183 2015-08-25 Yao Qi <yao.qi@linaro.org>
2185 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2186 lwp_arch_private_info and ptid_of_lwp.
2188 2015-08-25 Yao Qi <yao.qi@linaro.org>
2190 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2191 Find proc_info by find_process_pid. All callers updated.
2193 2015-08-25 Yao Qi <yao.qi@linaro.org>
2195 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2197 (debug_reg_change_callback): Remove.
2198 (aarch64_notify_debug_reg_change): Remove.
2200 2015-08-25 Yao Qi <yao.qi@linaro.org>
2202 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2203 Call current_lwp_ptid.
2205 2015-08-25 Yao Qi <yao.qi@linaro.org>
2207 * linux-aarch64-low.c (debug_reg_change_callback): Use
2210 2015-08-25 Yao Qi <yao.qi@linaro.org>
2212 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2214 2015-08-25 Yao Qi <yao.qi@linaro.org>
2216 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2218 2015-08-25 Yao Qi <yao.qi@linaro.org>
2220 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2223 2015-08-25 Yao Qi <yao.qi@linaro.org>
2225 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2227 (debug_reg_change_callback): Remove argument entry and add argument
2228 lwp. Remove local variable thread. Don't print thread id in the
2229 debugging output. Don't check whether pid of thread equals to pid.
2230 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2231 iterate_over_lwps instead find_inferior.
2233 2015-08-24 Pedro Alves <palves@redhat.com>
2235 * inferiors.c (get_first_process): New function.
2236 * inferiors.h (get_first_process): New declaration.
2237 * remote-utils.c (read_ptid): Default to the first process in the
2238 list, instead of to the current thread's process.
2240 2015-08-24 Pedro Alves <palves@redhat.com>
2242 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2243 * event-loop.c: Likewise.
2244 * remote-utils.c: Likewise.
2245 * tracepoint.c: Likewise.
2247 2015-08-24 Pedro Alves <palves@redhat.com>
2249 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2252 2015-08-21 Pedro Alves <palves@redhat.com>
2254 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2255 instead of literal 1.
2257 2015-08-21 Pedro Alves <palves@redhat.com>
2259 * tdesc.c (default_description): Explicitly zero-initialize.
2261 2015-08-21 Pedro Alves <palves@redhat.com>
2264 * inferiors.c (remove_thread): Discard any pending stop reply for
2266 * server.c (remove_all_on_match_pid): Rename to ...
2267 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2269 (discard_queued_stop_replies): Change parameter to a ptid. Now
2271 (handle_v_kill, kill_inferior_callback, captured_main)
2272 (process_serial_event): Adjust.
2273 * server.h (discard_queued_stop_replies): Declare.
2275 2015-08-21 Pedro Alves <palves@redhat.com>
2277 * linux-low.c (wait_for_sigstop): Always switch to no thread
2278 selected if the previously current thread dies.
2279 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2280 process instead of the current thread's.
2281 * remote-utils.c (input_interrupt): Don't check if there's no
2283 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2284 current thread to the general thread fails, error out.
2285 (handle_qxfer_auxv, handle_qxfer_libraries)
2286 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2287 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2288 (handle_query): Check if there's a thread selected instead of
2289 checking whether there's any thread in the thread list.
2290 (handle_qxfer_threads, handle_qxfer_btrace)
2291 (handle_qxfer_btrace_conf): Don't error out early if there's no
2292 thread in the thread list.
2293 (handle_v_cont, myresume): Don't set the current thread to the
2295 (process_serial_event) <Hg handling>: Also set thread_id if the
2296 previous general thread is still alive.
2297 (process_serial_event) <g/G handling>: If setting the current
2298 thread to the general thread fails, error out.
2299 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2300 thread's lwp instead of the current thread's.
2301 * target.c (set_desired_thread): If the desired thread was not
2302 found, leave the current thread pointing to NULL. Return an int
2303 (boolean) indicating success.
2304 * target.h (set_desired_thread): Change return type to int.
2306 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2308 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2309 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2311 (ps_get_thread_area): New function.
2313 2015-08-19 Gary Benson <gbenson@redhat.com>
2315 * hostio.c (handle_pread): Do not attempt to read more data
2316 than hostio_reply_with_data can fit in a packet.
2318 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2320 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2322 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2324 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2326 2015-08-06 Pedro Alves <palves@redhat.com>
2328 * tracepoint.c (expr_eval_result): Now an int.
2330 2015-08-06 Pedro Alves <palves@redhat.com>
2332 * gdbthread.h (struct regcache): Forward declare.
2333 (struct thread_info) <regcache_data>: Now a struct regcache
2335 * inferiors.c (inferior_regcache_data)
2336 (set_inferior_regcache_data): Now work with struct regcache
2338 * inferiors.h (struct regcache): Forward declare.
2339 (inferior_regcache_data, set_inferior_regcache_data): Now work
2340 with struct regcache pointers.
2341 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2342 (free_register_cache_thread): Remove struct regcache pointer
2345 2015-08-06 Pedro Alves <palves@redhat.com>
2347 * server.c (captured_main): On error, print the exception message
2348 to stderr, and if run_once is set, throw a quit.
2350 2015-08-06 Pedro Alves <palves@redhat.com>
2352 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2355 2015-08-06 Pedro Alves <palves@redhat.com>
2357 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2358 reading beyond the passed in buffer length.
2360 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2362 * tracepoint.c (symbol_list) <required>: Remove.
2364 2015-08-06 Pedro Alves <palves@redhat.com>
2366 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2367 count if stopping and suspending threads.
2368 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2369 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2370 (linux_detach): Complete an ongoing step-over.
2371 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2373 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2374 (linux_wait_1): If passing a signal to the inferior after
2375 finishing a step-over, unsuspend and re-resume all lwps. If we
2376 see a single-step event but the thread should be continuing, don't
2377 pass the trap to gdb.
2378 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2379 internal_error instead of gdb_assert.
2380 (enqueue_pending_signal): New function.
2381 (check_ptrace_stopped_lwp_gone): Add debug output.
2382 (start_step_over): Use internal_error instead of gdb_assert.
2383 (complete_ongoing_step_over): New function.
2384 (linux_resume_one_thread): Don't resume a suspended thread.
2385 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2388 2015-08-06 Pedro Alves <palves@redhat.com>
2390 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2391 (linux_thread_alive): Use lwp_is_marked_dead.
2392 (extended_event_reported): Delete.
2393 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2394 instead of extended_event_reported.
2395 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2397 (lwp_is_marked_dead): New function.
2398 (lwp_running): Use lwp_is_marked_dead.
2399 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2402 2015-08-06 Pedro Alves <palves@redhat.com>
2404 * linux-low.c (linux_wait_1): Move fork event output out of the
2405 !report_to_gdb check. Pass event_child->waitstatus to
2406 target_waitstatus_to_string instead of ourstatus.
2408 2015-08-04 Yao Qi <yao.qi@linaro.org>
2410 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2411 if current_thread is 32 bit.
2413 2015-08-04 Yao Qi <yao.qi@linaro.org>
2415 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2416 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2417 * server.c (extended_protocol): Remove "static".
2418 * server.h (extended_protocol): Declare it.
2420 2015-08-04 Yao Qi <yao.qi@linaro.org>
2422 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2423 both aarch64 and aarch32.
2424 (aarch64_set_pc): Likewise.
2426 2015-08-04 Yao Qi <yao.qi@linaro.org>
2428 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2429 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2430 arm-with-neon.xml to srv_xmlfiles.
2431 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2432 (is_64bit_tdesc): New function.
2433 (aarch64_linux_read_description): New function.
2434 (aarch64_arch_setup): Call aarch64_linux_read_description.
2435 (regs_info): Rename to regs_info_aarch64.
2436 (aarch64_regs_info): Return right regs_info.
2437 (initialize_low_arch): Call initialize_low_arch_aarch32.
2439 2015-08-04 Yao Qi <yao.qi@linaro.org>
2441 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2442 * linux-aarch32-low.c: New file.
2443 * linux-aarch32-low.h: New file.
2444 * linux-arm-low.c (arm_fill_gregset): Move it to
2445 linux-aarch32-low.c.
2446 (arm_store_gregset): Likewise.
2447 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2448 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2449 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2450 (regs_info): Rename to regs_info_arm.
2451 (arm_regs_info): Return regs_info_aarch32 if
2452 have_ptrace_getregset is 1 and target description is
2453 arm_with_neon or arm_with_vfpv3.
2454 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2455 Call initialize_low_arch_aarch32 instead.
2457 2015-08-04 Yao Qi <yao.qi@linaro.org>
2459 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2460 * linux-low.c: ... here.
2461 * linux-low.h (have_ptrace_getregset): Declare it.
2463 2015-08-04 Pedro Alves <palves@redhat.com>
2465 * thread-db.c (struct thread_db): Use new typedefs.
2466 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2468 (disable_thread_event_reporting): Cast result of dlsym to
2469 destination function pointer type.
2470 (thread_db_mourn): Use td_ta_delete_ftype.
2472 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2474 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2476 (CDX_BREAKPOINT): Define for R2.
2477 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2478 (the_low_target): Add comments.
2480 2015-07-30 Yao Qi <yao.qi@linaro.org>
2482 * linux-arm-low.c (arm_hwcap): Remove it.
2483 (arm_read_description): New local variable arm_hwcap. Don't
2484 set arm_hwcap to zero.
2486 2015-07-30 Yao Qi <yao.qi@linaro.org>
2488 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2489 Use regcache->tdesc instead.
2490 (arm_store_wmmxregset): Likewise.
2491 (arm_fill_vfpregset): Likewise.
2492 (arm_store_vfpregset): Likewise.
2494 2015-07-30 Yao Qi <yao.qi@linaro.org>
2496 * linux-arm-low.c: Include arch/arm.h.
2497 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2498 (arm_store_gregset): Likewise.
2500 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2502 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2503 ptrace's 4th parameter.
2505 2015-07-27 Yao Qi <yao.qi@linaro.org>
2507 * configure.srv (case aarch64*-*-linux*): Don't set
2510 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2512 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2514 * linux-arm-low.c: Likewise.
2515 * linux-cris-low.c: Likewise.
2516 * linux-crisv32-low.c: Likewise.
2517 * linux-low.c: Likewise.
2518 * linux-m68k-low.c: Likewise.
2519 * linux-mips-low.c: Likewise.
2520 * linux-nios2-low.c: Likewise.
2521 * linux-s390-low.c: Likewise.
2522 * linux-sparc-low.c: Likewise.
2523 * linux-tic6x-low.c: Likewise.
2524 * linux-tile-low.c: Likewise.
2525 * linux-x86-low.c: Likewise.
2527 2015-07-24 Pedro Alves <palves@redhat.com>
2529 * config.in: Regenerate.
2530 * configure: Regenerate.
2532 2015-07-24 Pedro Alves <palves@redhat.com>
2534 * acinclude.m4: Include ../ptrace.m4.
2535 * configure.ac: Call GDB_AC_PTRACE.
2536 * config.in, configure: Regenerate.
2538 2015-07-24 Yao Qi <yao.qi@linaro.org>
2540 * linux-low.c (linux_create_inferior): Remove setting to
2541 proc->priv->new_inferior.
2542 (linux_attach): Likewise.
2543 (linux_low_filter_event): Likewise.
2544 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2546 2015-07-24 Yao Qi <yao.qi@linaro.org>
2548 * linux-low.c (linux_arch_setup): New function.
2549 (linux_low_filter_event): If proc->tdesc is NULL and
2550 proc->attached is true, call the_low_target.arch_setup.
2551 Otherwise, keep status pending, and return.
2552 (linux_resume_one_lwp_throw): Don't call get_pc if
2553 thread->while_stepping isn't NULL. Don't call
2554 get_thread_regcache if proc->tdesc is NULL.
2555 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2556 (linux_target_ops): Install arch_setup.
2557 * server.c (start_inferior): Call the_target->arch_setup.
2558 * target.h (struct target_ops) <arch_setup>: New field.
2559 (target_arch_setup): New marco.
2560 * lynx-low.c (lynx_target_ops): Update.
2561 * nto-low.c (nto_target_ops): Update.
2562 * spu-low.c (spu_target_ops): Update.
2563 * win32-low.c (win32_target_ops): Update.
2565 2015-07-24 Yao Qi <yao.qi@linaro.org>
2567 * linux-low.c (linux_add_process): Don't set
2568 proc->priv->new_inferior.
2569 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2570 (linux_attach): Likewise.
2572 2015-07-24 Yao Qi <yao.qi@linaro.org>
2574 * server.c (start_inferior): Code refactor.
2576 2015-07-24 Yao Qi <yao.qi@linaro.org>
2578 * server.c (process_serial_event): Set general_thread.
2580 2015-07-21 Yao Qi <yao.qi@linaro.org>
2582 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2583 aarch64_linux_get_debug_reg_capacity.
2585 2015-07-17 Yao Qi <yao.qi@linaro.org>
2587 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2588 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2589 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2590 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2591 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2592 (AARCH64_HWP_ALIGNMENT): Likewise.
2593 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2594 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2595 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2596 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2597 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2598 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2599 (struct aarch64_debug_reg_state): Likewise.
2600 (struct arch_lwp_info): Likewise.
2601 (aarch64_align_watchpoint): Likewise.
2602 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2603 (aarch64_watchpoint_length): Likewise.
2604 (aarch64_point_encode_ctrl_reg): Likewise
2605 (aarch64_point_is_aligned): Likewise.
2606 (aarch64_align_watchpoint): Likewise.
2607 (aarch64_linux_set_debug_regs):
2608 (aarch64_dr_state_insert_one_point): Likewise.
2609 (aarch64_dr_state_remove_one_point): Likewise.
2610 (aarch64_handle_breakpoint): Likewise.
2611 (aarch64_handle_aligned_watchpoint): Likewise.
2612 (aarch64_handle_unaligned_watchpoint): Likewise.
2613 (aarch64_handle_watchpoint): Likewise.
2615 2015-07-17 Yao Qi <yao.qi@linaro.org>
2617 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2618 and don't aarch64_get_debug_reg_state. All callers update.
2619 (aarch64_handle_aligned_watchpoint): Likewise.
2620 (aarch64_handle_unaligned_watchpoint): Likewise.
2621 (aarch64_handle_watchpoint): Likewise.
2622 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2623 (aarch64_remove_point): Likewise.
2625 2015-07-17 Yao Qi <yao.qi@linaro.org>
2627 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2629 (aarch64_handle_unaligned_watchpoint): Likewise.
2631 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2633 Revert the previous 3 commits:
2634 Move gdb_regex* to common/
2635 Move linux_find_memory_regions_full & co.
2636 gdbserver build-id attribute generator
2638 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2639 Jan Kratochvil <jan.kratochvil@redhat.com>
2641 gdbserver build-id attribute generator.
2642 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2643 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2644 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2646 (get_dynamic): Use find_pdhr to traverse program headers.
2647 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2648 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2649 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2650 (get_hex_build_id): New.
2651 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2652 to reply XML document.
2654 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2655 Jan Kratochvil <jan.kratochvil@redhat.com>
2657 * target.c: Include target/target-utils.h and fcntl.h.
2658 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2659 (target_fileio_read_stralloc): New functions.
2661 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2663 * Makefile.in (OBS): Add gdb_regex.o.
2665 * config.in: Rebuilt.
2666 * configure: Rebuilt.
2668 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2669 Jan Kratochvil <jan.kratochvil@redhat.com>
2671 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2672 * Makefile.in (OBS): Add target-utils.o.
2673 (linux-maps.o, target-utils.o): New.
2674 * configure.srv (srv_linux_obj): Add linux-maps.o.
2676 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2678 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2680 (the_low_target): Install it.
2682 2015-07-14 Pedro Alves <palves@redhat.com>
2684 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2685 Instead, ignore ECHILD, and throw an error for other errnos.
2687 2015-07-10 Pedro Alves <palves@redhat.com>
2689 * event-loop.c (struct callback_event) <data>: Change type to
2690 gdb_client_data instance instead of gdb_client_data pointer.
2691 (append_callback_event): Adjust.
2693 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2695 * linux-aarch64-low.c: Add comments for each linux_target_ops
2696 method. Remove comments already covered in target_ops and
2697 linux_target_ops definitions.
2698 (the_low_target): Add comments for each unimplemented method.
2700 2015-07-09 Yao Qi <yao.qi@linaro.org>
2702 * linux-aarch64-low.c (aarch64_regmap): Remove.
2703 (aarch64_usrregs_info): Remove.
2704 (regs_info): Set field usrregs to NULL.
2706 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2708 * linux-low.c: Include "rsp-low.h"
2709 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2710 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2711 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2712 (handle_btrace_enable_pt): New.
2713 (handle_btrace_general_set): Support "pt".
2714 (handle_btrace_conf_general_set): Support "pt:size".
2716 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2718 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2721 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2723 * linux-aarch64-low.c: Remove comment about endianness.
2724 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2725 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2728 2015-06-24 Gary Benson <gbenson@redhat.com>
2730 * linux-i386-ipa.c (stdint.h): Do not include.
2731 * lynx-i386-low.c (stdint.h): Likewise.
2732 * lynx-ppc-low.c (stdint.h): Likewise.
2733 * mem-break.c (stdint.h): Likewise.
2734 * thread-db.c (stdint.h): Likewise.
2735 * tracepoint.c (stdint.h): Likewise.
2736 * win32-low.c (stdint.h): Likewise.
2738 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2740 * server.c (write_qxfer_response): Update call to
2741 remote_escape_output.
2743 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2744 Jan Kratochvil <jan.kratochvil@redhat.com>
2746 Merge multiple hex conversions.
2747 * gdbreplay.c (tohex): Rename to 'fromhex'.
2748 (logchar): Use fromhex.
2750 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2752 * server.c (handle_qxfer_libraries): Set `version' attribute for
2755 2015-06-10 Gary Benson <gbenson@redhat.com>
2757 * target.h (struct target_ops) <multifs_open>: New field.
2758 <multifs_unlink>: Likewise.
2759 <multifs_readlink>: Likewise.
2760 * linux-low.c (nat/linux-namespaces.h): New include.
2761 (linux_target_ops): Initialize the_target->multifs_open,
2762 the_target->multifs_unlink and the_target->multifs_readlink.
2763 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2764 * hostio.c (hostio_fs_pid): New static variable.
2765 (hostio_handle_new_gdb_connection): New function.
2766 (handle_setfs): Likewise.
2767 (handle_open): Use the_target->multifs_open as appropriate.
2768 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2769 (handle_readlink): Use the_target->multifs_readlink as
2771 (handle_vFile): Handle vFile:setfs packets.
2772 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2773 after target_handle_new_gdb_connection.
2775 2015-06-10 Gary Benson <gbenson@redhat.com>
2777 * configure.ac (AC_CHECK_FUNCS): Add setns.
2778 * config.in: Regenerate.
2779 * configure: Likewise.
2780 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2781 (linux-namespaces.o): New rule.
2782 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2784 2015-06-09 Gary Benson <gbenson@redhat.com>
2786 * hostio.c (handle_open): Process mode argument with
2787 fileio_to_host_mode.
2789 2015-06-01 Yao Qi <yao.qi@linaro.org>
2791 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2792 * linux-x86-low.c: Likewise.
2794 2015-05-28 Don Breazeal <donb@codesourcery.com>
2796 * linux-low.c (handle_extended_wait): Initialize
2797 thread_info.last_resume_kind for new fork children.
2799 2015-05-15 Pedro Alves <palves@redhat.com>
2801 * target.h (target_handle_new_gdb_connection): Rewrite using if
2802 wrapped in do/while.
2804 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2806 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2807 * configure, config.in: Regenerate.
2808 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2811 2015-05-12 Don Breazeal <donb@codesourcery.com>
2813 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2814 PTRACE_EVENT_VFORK_DONE.
2815 (linux_low_ptrace_options, extended_event_reported): Add vfork
2817 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2818 and "vforkdone" for RSP 'T' Stop Reply Packet.
2819 * server.h (report_vfork_events): Declare
2822 2015-05-12 Don Breazeal <donb@codesourcery.com>
2824 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2825 (the_low_target) <new_fork>: Initialize new member.
2826 * linux-arm-low.c (arm_new_fork): New function.
2827 (the_low_target) <new_fork>: Initialize new member.
2828 * linux-low.c (handle_extended_wait): Call new target function
2830 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2831 * linux-mips-low.c (mips_add_watchpoint): New function
2832 extracted from mips_insert_point.
2833 (the_low_target) <new_fork>: Initialize new member.
2834 (mips_linux_new_fork): New function.
2835 (mips_insert_point): Call mips_add_watchpoint.
2836 * linux-x86-low.c (x86_linux_new_fork): New function.
2837 (the_low_target) <new_fork>: Initialize new member.
2839 2015-05-12 Don Breazeal <donb@codesourcery.com>
2841 * linux-low.c (handle_extended_wait): Implement return value,
2842 rename argument 'event_child' to 'event_lwp', handle
2843 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2844 (linux_low_ptrace_options): New function.
2845 (linux_low_filter_event): Call linux_low_ptrace_options,
2846 use different argument fo linux_enable_event_reporting,
2847 use return value from handle_extended_wait.
2848 (extended_event_reported): New function.
2849 (linux_wait_1): Call extended_event_reported and set
2850 status to report fork events.
2851 (linux_write_memory): Add pid to debug message.
2852 (reset_lwp_ptrace_options_callback): New function.
2853 (linux_handle_new_gdb_connection): New function.
2854 (linux_target_ops): Initialize new structure member.
2855 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2856 * lynx-low.c: Initialize new structure member.
2857 * remote-utils.c (prepare_resume_reply): Implement stop reason
2858 "fork" for "T" stop message.
2859 * server.c (handle_query): Call handle_new_gdb_connection.
2860 * server.h (report_fork_events): Declare global flag.
2861 * target.h (struct target_ops) <handle_new_gdb_connection>:
2863 (target_handle_new_gdb_connection): New macro.
2864 * win32-low.c: Initialize new structure member.
2866 2015-05-12 Don Breazeal <donb@codesourcery.com>
2868 * mem-break.c (APPEND_TO_LIST): Define macro.
2869 (clone_agent_expr): New function.
2870 (clone_one_breakpoint): New function.
2871 (clone_all_breakpoints): New function.
2872 * mem-break.h: Declare new functions.
2874 2015-05-12 Don Breazeal <donb@codesourcery.com>
2876 * linux-low.c (linux_supports_fork_events): New function.
2877 (linux_supports_vfork_events): New function.
2878 (linux_target_ops): Initialize new structure members.
2879 (initialize_low): Call linux_check_ptrace_features.
2880 * lynx-low.c (lynx_target_ops): Initialize new structure
2882 * server.c (report_fork_events, report_vfork_events):
2884 (handle_query): Add new features to qSupported packet and
2886 (captured_main): Initialize new global variables.
2887 * target.h (struct target_ops) <supports_fork_events>:
2889 <supports_vfork_events>: New member.
2890 (target_supports_fork_events): New macro.
2891 (target_supports_vfork_events): New macro.
2892 * win32-low.c (win32_target_ops): Initialize new structure
2895 2015-05-12 Gary Benson <gbenson@redhat.com>
2897 * server.c (handle_qxfer_exec_file): Use current process
2900 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2902 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2903 Remove HAVE_PTRACE_GETREGS conditionals.
2904 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2905 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2907 2015-05-08 Yao Qi <yao.qi@linaro.org>
2909 * linux-low.c (linux_supports_conditional_breakpoints): New
2911 (linux_target_ops): Install new target method.
2912 * lynx-low.c (lynx_target_ops): Install NULL hook for
2913 supports_conditional_breakpoints.
2914 * nto-low.c (nto_target_ops): Likewise.
2915 * spu-low.c (spu_target_ops): Likewise.
2916 * win32-low.c (win32_target_ops): Likewise.
2917 * server.c (handle_query): Check
2918 target_supports_conditional_breakpoints.
2919 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2921 (target_supports_conditional_breakpoints): New macro.
2923 2015-05-06 Pedro Alves <palves@redhat.com>
2926 * server.c (start_inferior): If the process exits, mourn it.
2928 2015-04-21 Gary Benson <gbenson@redhat.com>
2930 * hostio.c (fileio_open_flags_to_host): Factored out to
2931 fileio_to_host_openflags in common/fileio.c. Single use
2934 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2936 * linux-xtensa-low.c (xtensa_fill_gregset)
2937 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2940 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2942 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2943 (regs_info): Replace usrregs pointer with NULL.
2945 2015-04-17 Gary Benson <gbenson@redhat.com>
2947 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2948 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2949 * server.c (handle_qxfer_exec_file): New function.
2950 (qxfer_packets): Add exec-file entry.
2951 (handle_query): Report qXfer:exec-file:read as supported packet.
2953 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2955 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2957 2015-04-09 Gary Benson <gbenson@redhat.com>
2959 * hostio-errno.c (errno_to_fileio_error): Remove function.
2960 Update caller to use remote_fileio_to_fio_error.
2962 2015-04-09 Yao Qi <yao.qi@linaro.org>
2964 * linux-low.c (linux_insert_point): Call
2965 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2966 (linux_remove_point): Call remove_memory_breakpoint if type is
2968 * linux-x86-low.c (x86_insert_point): Don't call
2969 insert_memory_breakpoint.
2970 (x86_remove_point): Don't call remove_memory_breakpoint.
2972 2015-04-01 Pedro Alves <palves@redhat.com>
2973 Cleber Rosa <crosa@redhat.com>
2975 * server.c (gdbserver_usage): Reorganize and extend the usage
2978 2015-03-24 Pedro Alves <palves@redhat.com>
2980 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2981 output. Also dump TRAP_TRACE.
2982 (linux_low_filter_event): In debug output, distinguish a
2983 resume_stop SIGSTOP from a delayed SIGSTOP.
2985 2015-03-24 Gary Benson <gbenson@redhat.com>
2987 * linux-x86-low.c (x86_linux_new_thread): Moved to
2989 (x86_linux_prepare_to_resume): Likewise.
2991 2015-03-24 Gary Benson <gbenson@redhat.com>
2993 * Makefile.in (x86-linux-dregs.o): New rule.
2994 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2995 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2996 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2997 (x86_linux_dr_get): Likewise.
2998 (x86_linux_dr_set): Likewise.
2999 (update_debug_registers_callback): Likewise.
3000 (x86_linux_dr_set_addr): Likewise.
3001 (x86_linux_dr_get_addr): Likewise.
3002 (x86_linux_dr_set_control): Likewise.
3003 (x86_linux_dr_get_control): Likewise.
3004 (x86_linux_dr_get_status): Likewise.
3005 (x86_linux_update_debug_registers): Likewise.
3007 2015-03-24 Gary Benson <gbenson@redhat.com>
3009 * linux-x86-low.c (x86_linux_update_debug_registers):
3010 New function, factored out from...
3011 (x86_linux_prepare_to_resume): ...this.
3013 2015-03-24 Gary Benson <gbenson@redhat.com>
3015 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3016 (x86_linux_dr_set): Likewise.
3017 (update_debug_registers_callback): Likewise.
3018 (x86_linux_dr_set_addr): Likewise.
3019 (x86_linux_dr_get_addr): Likewise.
3020 (x86_linux_dr_set_control): Likewise.
3021 (x86_linux_dr_get_control): Likewise.
3022 (x86_linux_dr_get_status): Likewise.
3023 (x86_linux_prepare_to_resume): Likewise.
3025 2015-03-24 Gary Benson <gbenson@redhat.com>
3027 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3028 Use perror_with_name. Pass string through gettext.
3029 (x86_linux_dr_set): Likewise.
3031 2015-03-24 Gary Benson <gbenson@redhat.com>
3033 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3034 (x86_linux_dr_set_addr): ...this.
3035 (x86_dr_low_get_addr): Rename to...
3036 (x86_linux_dr_get_addr): ...this.
3037 (x86_dr_low_set_control): Rename to...
3038 (x86_linux_dr_set_control): ...this.
3039 (x86_dr_low_get_control): Rename to...
3040 (x86_linux_dr_get_control): ...this.
3041 (x86_dr_low_get_status): Rename to...
3042 (x86_linux_dr_get_status): ...this.
3043 (x86_dr_low): Update with new function names.
3045 2015-03-24 Gary Benson <gbenson@redhat.com>
3047 * Makefile.in (x86-linux.o): New rule.
3048 * configure.srv: Add x86-linux.o to relevant targets.
3049 * linux-low.c (lwp_set_arch_private_info): New function.
3050 (lwp_arch_private_info): Likewise.
3051 * linux-x86-low.c: Include nat/x86-linux.h.
3052 (arch_lwp_info): Removed structure.
3053 (update_debug_registers_callback):
3054 Use lwp_set_debug_registers_changed.
3055 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3056 and lwp_set_debug_registers_changed.
3057 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3059 2015-03-24 Gary Benson <gbenson@redhat.com>
3061 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3062 * linux-arm-low.c (arm_new_thread): Likewise.
3063 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3064 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3065 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3066 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3068 2015-03-24 Gary Benson <gbenson@redhat.com>
3070 * linux-low.c (ptid_of_lwp): New function.
3071 (lwp_is_stopped): Likewise.
3072 (lwp_stop_reason): Likewise.
3073 * linux-x86-low.c (update_debug_registers_callback):
3075 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3078 2015-03-24 Gary Benson <gbenson@redhat.com>
3080 * linux-low.h (linux_stop_lwp): Remove declaration.
3082 2015-03-24 Gary Benson <gbenson@redhat.com>
3084 * linux-low.h: Include nat/linux-nat.h.
3085 * linux-low.c (iterate_over_lwps_args): New structure.
3086 (iterate_over_lwps_filter): New function.
3087 (iterate_over_lwps): Likewise.
3088 * linux-x86-low.c (update_debug_registers_callback):
3089 Update signature to what iterate_over_lwps expects.
3090 Remove PID check that iterate_over_lwps now performs.
3091 (x86_dr_low_set_addr): Use iterate_over_lwps.
3092 (x86_dr_low_set_control): Likewise.
3094 2015-03-24 Gary Benson <gbenson@redhat.com>
3096 * linux-x86-low.c (x86_debug_reg_state): New function.
3097 (x86_linux_prepare_to_resume): Use the above.
3099 2015-03-24 Gary Benson <gbenson@redhat.com>
3101 * linux-low.c (current_lwp_ptid): New function.
3102 * linux-x86-low.c: Include nat/linux-nat.h.
3103 (x86_dr_low_get_addr): Use current_lwp_ptid.
3104 (x86_dr_low_get_control): Likewise.
3105 (x86_dr_low_get_status): Likewise.
3107 2015-03-20 Pedro Alves <palves@redhat.com>
3109 * tracepoint.c (cmd_qtstatus): Make "str" const.
3111 2015-03-20 Pedro Alves <palves@redhat.com>
3113 * server.c (handle_general_set): Make "req_str" const.
3115 2015-03-19 Pedro Alves <palves@redhat.com>
3117 * linux-low.c (linux_resume_one_lwp): Rename to ...
3118 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3119 instead call perror_with_name.
3120 (check_ptrace_stopped_lwp_gone): New function.
3121 (linux_resume_one_lwp): Reimplement as wrapper around
3122 linux_resume_one_lwp_throw that swallows errors if the LWP is
3125 2015-03-19 Pedro Alves <palves@redhat.com>
3127 * linux-low.c (count_events_callback, select_event_lwp_callback):
3128 No longer check whether the thread has resume_stop as last resume
3131 2015-03-19 Pedro Alves <palves@redhat.com>
3133 * linux-low.c (count_events_callback, select_event_lwp_callback):
3134 Use the lwp's status_pending_p field, not the thread's.
3136 2015-03-19 Pedro Alves <palves@redhat.com>
3138 * linux-low.c (select_event_lwp_callback): Update comments to
3139 no longer mention SIGTRAP.
3141 2015-03-18 Gary Benson <gbenson@redhat.com>
3143 * server.c (handle_query): Do not report vFile:fstat as supported.
3145 2015-03-11 Gary Benson <gbenson@redhat.com>
3147 * hostio.c (sys/types.h): New include.
3148 (sys/stat.h): Likewise.
3149 (common-remote-fileio.h): Likewise.
3150 (handle_fstat): New function.
3151 (handle_vFile): Handle vFile:fstat packets.
3153 2015-03-11 Gary Benson <gbenson@redhat.com>
3155 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3156 struct stat.st_blocks and struct stat.st_blksize.
3157 * configure: Regenerate.
3158 * config.in: Likewise.
3159 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3160 (OBS): Add common-remote-fileio.o.
3161 (common-remote-fileio.o): New rule.
3163 2015-03-09 Pedro Alves <palves@redhat.com>
3165 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3166 'struct sockaddr' pointer in 'accept' call.
3168 2015-03-09 Pedro Alves <palves@redhat.com>
3171 2015-03-07 Pedro Alves <palves@redhat.com>
3172 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3173 or <winsock2.h> here. Instead include "gdb_socket.h".
3174 (remote_open): Use union gdb_sockaddr_u.
3175 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3176 or <winsock2.h> here. Instead include "gdb_socket.h".
3177 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3178 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3180 (init_named_socket, gdb_agent_helper_thread): Use union
3183 2015-03-07 Pedro Alves <palves@redhat.com>
3185 * configure.ac (build_warnings): Move
3186 -Wdeclaration-after-statement to the C-specific set.
3187 * configure: Regenerate.
3189 2015-03-07 Pedro Alves <palves@redhat.com>
3191 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3192 or <winsock2.h> here. Instead include "gdb_socket.h".
3193 (remote_open): Use union gdb_sockaddr_u.
3194 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3195 or <winsock2.h> here. Instead include "gdb_socket.h".
3196 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3197 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3199 (init_named_socket, gdb_agent_helper_thread): Use union
3202 2015-03-07 Pedro Alves <palves@redhat.com>
3204 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3207 2015-03-06 Yao Qi <yao.qi@linaro.org>
3209 * linux-aarch64-low.c (aarch64_insert_point): Use
3210 show_debug_regs as a boolean.
3211 (aarch64_remove_point): Likewise.
3213 2015-03-05 Pedro Alves <palves@redhat.com>
3215 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3216 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3217 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3218 * nto-low.c (nto_target_ops): Likewise.
3219 * spu-low.c (spu_target_ops): Likewise.
3220 * win32-low.c (win32_target_ops): Likewise.
3222 2015-03-04 Pedro Alves <palves@redhat.com>
3224 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3225 Decide whether a breakpoint triggered based on the SIGTRAP's
3227 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3228 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3229 (linux_low_filter_event): Check for breakpoints before checking
3231 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3233 (linux_stopped_by_sw_breakpoint)
3234 (linux_supports_stopped_by_sw_breakpoint)
3235 (linux_stopped_by_hw_breakpoint)
3236 (linux_supports_stopped_by_hw_breakpoint): New functions.
3237 (linux_target_ops): Install new target methods.
3239 2015-03-04 Pedro Alves <palves@redhat.com>
3241 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3242 * server.c (swbreak_feature, hwbreak_feature): New globals.
3243 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3244 (captured_main): Clear swbreak_feature and hwbreak_feature.
3245 * server.h (swbreak_feature, hwbreak_feature): Declare.
3246 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3247 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3248 supports_stopped_by_hw_breakpoint>: New fields.
3249 (target_supports_stopped_by_sw_breakpoint)
3250 (target_stopped_by_sw_breakpoint)
3251 (target_supports_stopped_by_hw_breakpoint)
3252 (target_stopped_by_hw_breakpoint): Declare.
3254 2015-03-04 Pedro Alves <palves@redhat.com>
3256 enum lwp_stop_reason -> enum target_stop_reason
3257 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3258 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3259 (linux_wait_1, stuck_in_jump_pad_callback)
3260 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3261 (linux_stopped_by_watchpoint):
3262 * linux-low.h (enum lwp_stop_reason): Delete.
3263 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3264 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3266 2015-03-04 Yao Qi <yao.qi@linaro.org>
3268 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3270 2015-03-03 Gary Benson <gbenson@redhat.com>
3272 * hostio.c (handle_vFile): Fix prefix lengths.
3274 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3276 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3279 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3281 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3282 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3283 (clean): Add "rm -f" for above C files.
3284 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3285 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3286 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3287 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3288 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3289 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3290 (init_registers_s390x_vx_linux64)
3291 (init_registers_s390x_tevx_linux64)
3292 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3293 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3295 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3296 (s390_store_vxrs_high): New functions.
3297 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3299 (s390_arch_setup): Add logic for selecting one of the new target
3300 descriptions. Activate the new vector regsets if applicable.
3301 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3302 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3303 and init_registers_s390x_tevx_linux64.
3305 2015-03-01 Pedro Alves <palves@redhat.com>
3307 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3310 2015-02-27 Pedro Alves <palves@redhat.com>
3312 * linux-x86-low.c (u_debugreg_offset): New function.
3313 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3315 2015-02-27 Pedro Alves <palves@redhat.com>
3317 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3318 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3319 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3320 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3321 (ps_lsetfpregs, ps_getpid)
3322 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3323 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3324 (ps_lsetxregs, ps_plog): Declare.
3326 2015-02-27 Pedro Alves <palves@redhat.com>
3328 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3329 IP_AGENT_EXPORT_FUNC.
3330 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3331 IP_AGENT_EXPORT_FUNC.
3332 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3333 (IP_AGENT_EXPORT): Delete.
3334 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3335 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3336 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3337 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3338 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3339 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3340 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3341 (traceframe_read_count, traceframe_write_count)
3342 (traceframes_created, trace_state_variables, get_raw_reg)
3343 (get_trace_state_variable_value, set_trace_state_variable_value)
3344 (ust_loaded, helper_thread_id, cmd_buf): Use
3345 IPA_SYM_EXPORTED_NAME.
3346 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3347 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3348 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3349 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3350 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3351 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3352 EXTERN_C_PUSH/EXTERN_C_POP.
3353 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3354 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3355 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3356 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3357 (traceframe_write_count, traceframe_read_count)
3358 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3359 (about_to_request_buffer_space, get_trace_state_variable_value)
3360 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3361 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3362 EXTERN_C_PUSH/EXTERN_C_POP.
3363 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3364 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3365 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3366 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3367 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3368 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3369 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3370 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3372 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3373 (IP_AGENT_EXPORT_VAR_DECL): Define.
3375 (gdb_agent_get_raw_reg): Declare.
3377 2015-02-27 Tom Tromey <tromey@redhat.com>
3378 Pedro Alves <palves@redhat.com>
3380 Rename symbols whose names are reserved C++ keywords throughout.
3382 2015-02-27 Pedro Alves <palves@redhat.com>
3384 * Makefile.in (COMPILER): New, get it from autoconf.
3385 (CXX): Get from autoconf instead.
3386 (COMPILE.pre): Use COMPILER.
3387 (CC-LD): Rename to ...
3388 (CC_LD): ... this. Use COMPILER.
3389 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3390 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3391 * acinclude.m4: Include build-with-cxx.m4.
3392 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3393 Disable -Werror by default if building in C++ mode.
3394 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3395 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3396 the C++ compiler. Save/restore CXXFLAGS too.
3397 * configure: Regenerate.
3399 2015-02-27 Pedro Alves <palves@redhat.com>
3401 * acinclude.m4: Include libiberty.m4.
3402 * configure.ac: Call libiberty_INIT.
3403 * config.in, configure: Regenerate.
3405 2015-02-26 Pedro Alves <palves@redhat.com>
3407 * linux-low.c (linux_wait_1): When incrementing the PC past a
3408 program breakpoint always use the_low_target.breakpoint_len as
3409 increment, rather than the maximum between that and
3410 the_low_target.decr_pc_after_break.
3412 2015-02-23 Pedro Alves <palves@redhat.com>
3414 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3415 thread was doing a step-over; always adjust the PC if
3416 we stepped over a permanent breakpoint.
3417 (linux_wait_1): If we stepped over breakpoint that was on top of a
3418 permanent breakpoint, manually advance the PC past it.
3420 2015-02-23 Pedro Alves <palves@redhat.com>
3422 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3424 (x86_fill_gregset, x86_store_gregset): Use it when handling
3427 2015-02-20 Pedro Alves <palves@redhat.com>
3429 * thread-db.c: Include "nat/linux-procfs.h".
3430 (thread_db_init): Skip listing new threads if the kernel supports
3431 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3433 2015-02-20 Pedro Alves <palves@redhat.com>
3435 * linux-low.c (status_pending_p_callback): Use ptid_match.
3437 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439 PR breakpoints/16812
3440 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3441 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3442 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3444 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3446 PR breakpoints/15956
3447 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3449 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3451 * linux-low.c (linux_low_btrace_conf): Print size.
3452 * server.c (handle_btrace_conf_general_set): New.
3453 (hanle_general_set): Call handle_btrace_conf_general_set.
3454 (handle_query): Report Qbtrace-conf:bts:size as supported.
3456 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3458 * linux-low.c (linux_low_enable_btrace): Update parameters.
3459 (linux_low_btrace_conf): New.
3460 (linux_target_ops)<to_btrace_conf>: Initialize.
3461 * server.c (current_btrace_conf): New.
3462 (handle_btrace_enable): Rename to ...
3463 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3464 to target_enable_btrace. Update comment. Update users.
3465 (handle_qxfer_btrace_conf): New.
3466 (qxfer_packets): Add btrace-conf entry.
3467 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3468 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3469 (target_ops)<read_btrace_conf>: New.
3470 (target_enable_btrace): Update parameters.
3471 (target_read_btrace_conf): New.
3473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3475 * server.c (handle_btrace_general_set): Remove call to
3476 target_supports_btrace.
3477 (supported_btrace_packets): New.
3478 (handle_query): Call supported_btrace_packets.
3479 * target.h: include btrace-common.h.
3480 (btrace_target_info): Removed.
3481 (supports_btrace, target_supports_btrace): Update parameters.
3483 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3485 * Makefile.in (SFILES): Add common/btrace-common.c.
3486 (OBS): Add common/btrace-common.o.
3487 (btrace-common.o): Add build rules.
3488 * linux-low: Include btrace-common.h.
3489 (linux_low_read_btrace): Use struct btrace_data. Call
3490 btrace_data_init and btrace_data_fini.
3492 2015-02-06 Pedro Alves <palves@redhat.com>
3494 * thread-db.c (find_new_threads_callback): Add debug output.
3496 2015-02-04 Pedro Alves <palves@redhat.com>
3498 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3499 (resume_stopped_resumed_lwps): New function.
3500 (linux_wait_for_event_filtered): Use it.
3502 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3504 * Makefile.in (SFILES): Add linux-personality.c.
3505 (linux-personality.o): New rule.
3506 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3507 list of objects to be built.
3508 * linux-low.c: Include nat/linux-personality.h.
3509 (linux_create_inferior): Remove code to disable address space
3510 randomization (moved to ../nat/linux-personality.c). Create
3511 cleanup to disable address space randomization.
3513 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3515 * Makefile.in (posix-strerror.o): New rule.
3516 (mingw-strerror.o): Likewise.
3517 * configure: Regenerated.
3518 * configure.ac: Source file ../common/common.host. Initialize new
3519 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3521 2015-01-14 Yao Qi <yao@codesourcery.com>
3523 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3524 (ppc-linux.o): New rule.
3525 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3526 * configure.ac: AC_CHECK_FUNCS(getauxval).
3527 * config.in: Re-generated.
3528 * configure: Re-generated.
3529 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3530 ppc64_64bit_inferior_p
3532 2015-01-14 Yao Qi <yao@codesourcery.com>
3534 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3535 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3536 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3537 (PT_ORIG_R3, PT_TRAP): Likewise.
3538 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3539 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3540 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3542 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3544 * i387-fp.c (i387_cache_to_xsave): In look over
3545 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3546 zmmh_low_space field by use of zmmh_high_space.
3548 2015-01-09 Pedro Alves <palves@redhat.com>
3550 * linux-low.c (step_over_bkpt): Move higher up in the file.
3551 (handle_extended_wait): Don't store the stop_pc here.
3552 (get_stop_pc): Adjust comments and rename to ...
3553 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3554 stopped for a software breakpoint or hardware breakpoint.
3555 (thread_still_has_status_pending_p): New function.
3556 (status_pending_p_callback): Use
3557 thread_still_has_status_pending_p. If the event is no longer
3558 interesting, resume the LWP.
3559 (handle_tracepoints): Add assert.
3560 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3561 (wstatus_maybe_breakpoint): New function.
3562 (cancel_breakpoint): Delete function.
3563 (check_stopped_by_watchpoint): New function, factored out from
3564 linux_low_filter_event.
3565 (lp_status_maybe_breakpoint): Delete function.
3566 (linux_low_filter_event): Remove filter_ptid argument.
3567 Leave thread group exits pending here. Store the LWP's stop PC.
3568 Always leave events pending.
3569 (linux_wait_for_event_filtered): Pull all events out of the
3570 kernel, and leave them all pending.
3571 (count_events_callback, select_event_lwp_callback): Consider all
3573 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3574 (select_event_lwp): Only give preference to the stepping LWP in
3575 all-stop mode. Adjust comments.
3576 (ignore_event): New function.
3577 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3578 references to cancel_breakpoints. Adjust to renames. Also give
3579 equal priority to all LWPs that have had events in non-stop mode.
3580 If reporting a software breakpoint event, unadjust the LWP's PC.
3581 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3582 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3584 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3585 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3586 (linux_stopped_by_watchpoint): Adjust.
3587 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3588 * linux-low.h (enum lwp_stop_reason): New.
3589 (struct lwp_info) <stop_pc>: Adjust comment.
3590 <stopped_by_watchpoint>: Delete field.
3591 <stop_reason>: New field.
3592 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3593 * mem-break.c (software_breakpoint_inserted_here)
3594 (hardware_breakpoint_inserted_here): New function.
3595 * mem-break.h (software_breakpoint_inserted_here)
3596 (hardware_breakpoint_inserted_here): Declare.
3597 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3598 (cancel_breakpoints): Delete.
3599 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3600 (upload_fast_traceframes): Remove references to
3603 2015-01-09 Pedro Alves <palves@redhat.com>
3605 * thread-db.c (find_new_threads_callback): Ignore thread if the
3606 kernel thread ID is -1.
3608 2015-01-09 Pedro Alves <palves@redhat.com>
3610 * linux-low.c (linux_attach_fail_reason_string): Move to
3611 nat/linux-ptrace.c, and rename.
3612 (linux_attach_lwp): Update comment.
3613 (attach_proc_task_lwp_callback): New function.
3614 (linux_attach): Adjust to rename and use
3615 linux_proc_attach_tgid_threads.
3616 (linux_attach_fail_reason_string): Delete declaration.
3618 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3620 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3621 * server.c (gdbserver_version): Likewise.
3623 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3625 * remote-utils.c: Include ctype.h.
3626 (input_interrupt): Explicitly handle the case when the char
3627 received is the NUL byte. Improve the printing of non-ASCII
3630 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3632 * linux-low.c (linux_low_filter_event): Update call to
3633 linux_enable_event_reporting following the addition of
3634 a new parameter to that function.
3636 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3639 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3640 (AARCH64_FPCR_REGNO): Likewise.
3641 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3642 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3643 (aarch64_store_fpregset): Likewise.
3645 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3647 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3648 Remove FIXME comment about assumption about N.
3650 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3652 * configure.ac: If large-file support is disabled in GDBserver,
3653 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3654 * configure: Regenerate.
3656 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3658 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3659 warning upon ENODATA from ptrace.
3660 * linux-s390-low.c (s390_store_tdb): New.
3661 (s390_regsets): Add regset for NT_S390_TDB.
3663 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3665 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3666 without a fill_function.
3667 * linux-s390-low.c (s390_fill_last_break): Remove.
3668 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3669 (s390_arch_setup): Use regset's size instead of fill_function for
3672 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3674 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3675 the regset's store function when ptrace returned an error.
3676 * regcache.c (get_thread_regcache): Invalidate register cache
3677 before fetching inferior's registers.
3679 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3681 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3682 while-loop as for-loop.
3683 (regsets_store_inferior_registers): Likewise.
3685 2014-11-28 Yao Qi <yao@codesourcery.com>
3687 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3688 * config.in, configure: Re-generate.
3689 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3692 2014-11-21 Yao Qi <yao@codesourcery.com>
3694 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3695 (AC_CHECK_HEADERS): Remove malloc.h.
3696 * configure: Re-generated.
3697 * config.in: Re-generated.
3698 * server.h: Don't include alloca.h and malloc.h.
3699 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3700 Don't include malloc.h.
3702 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3704 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3705 corresponding ERRNO check in same block.
3707 2014-11-12 Pedro Alves <palves@redhat.com>
3709 * server.c (cont_thread): Update comment.
3710 (start_inferior, attach_inferior): No longer clear cont_thread.
3711 (handle_v_cont): No longer set cont_thread.
3712 (captured_main): Clear cont_thread each time a GDB connects.
3714 2014-11-12 Pedro Alves <palves@redhat.com>
3716 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3717 thread, and don't resume all threads if the Hc thread has exited.
3719 2014-11-12 Pedro Alves <palves@redhat.com>
3721 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3722 the process group instead of to a specific LWP.
3724 2014-10-15 Pedro Alves <palves@redhat.com>
3727 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3729 (arm_set_thread_context): Delete.
3730 (the_low_target): Adjust.
3731 * win32-i386-low.c (debug_registers_changed)
3732 (debug_registers_used): Delete.
3733 (update_debug_registers_callback): New function.
3734 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3735 needing to update their debug registers.
3736 (win32_get_current_dr): New function.
3737 (x86_dr_low_get_addr, x86_dr_low_get_control)
3738 (x86_dr_low_get_status): Fetch the debug register from the thread
3740 (i386_initial_stuff): Adjust.
3741 (i386_get_thread_context): Remove current_event parameter. Don't
3742 clear debug_registers_changed nor copy DR values to
3744 (i386_set_thread_context): Delete.
3745 (i386_prepare_to_resume): New function.
3746 (i386_thread_added): Mark the thread as needing to update irs
3748 (the_low_target): Remove i386_set_thread_context and install
3749 i386_prepare_to_resume.
3750 * win32-low.c (win32_get_thread_context): Adjust.
3751 (win32_set_thread_context): Use SetThreadContext
3753 (win32_prepare_to_resume): New function.
3754 (win32_require_context): New function, factored out from ...
3755 (thread_rec): ... this.
3756 (continue_one_thread): Call win32_prepare_to_resume on each thread
3757 we're about to continue.
3758 (win32_resume): Call win32_prepare_to_resume on the event thread.
3759 * win32-low.h (struct win32_thread_info)
3760 <debug_registers_changed>: New field.
3761 (struct win32_target_ops): Change prototype of set_thread_context,
3762 delete set_thread_context and add prepare_to_resume.
3763 (win32_require_context): New declaration.
3765 2014-10-08 Gary Benson <gbenson@redhat.com>
3767 * server.h: Do not include common-exceptions.h.
3769 2014-10-08 Gary Benson <gbenson@redhat.com>
3771 * server.h: Do not include cleanups.h.
3773 2014-09-30 James Hogan <james.hogan@imgtec.com>
3775 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3778 2014-09-23 Yao Qi <yao@codesourcery.com>
3780 * linux-low.c (lp_status_maybe_breakpoint): New function.
3781 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3782 (count_events_callback): Likewise.
3783 (select_event_lwp_callback): Likewise.
3784 (cancel_breakpoints_callback): Likewise.
3786 2014-09-19 Don Breazeal <donb@codesourcery.com>
3788 * linux-low.c (handle_extended_wait): Call
3789 linux_ptrace_get_extended_event.
3790 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3791 linux_is_extended_waitstatus.
3793 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3795 * Makefile.in (CPPFLAGS): Define.
3796 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3797 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3799 2014-09-16 Gary Benson <gbenson@redhat.com>
3801 * inferiors.h (current_inferior): Renamed as...
3802 (current_thread): New variable. All uses updated.
3803 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3804 (maybe_move_out_of_jump_pad): Likewise.
3805 (cancel_breakpoint): Likewise.
3806 (linux_low_filter_event): Likewise.
3807 (wait_for_sigstop): Likewise.
3808 (linux_resume_one_lwp): Likewise.
3809 (need_step_over_p): Likewise.
3810 (start_step_over): Likewise.
3811 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3812 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3813 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3814 and save_inferior as saved_thread.
3815 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3817 (regcache_invalidate_thread): Likewise.
3818 * remote-utils.c (prepare_resume_reply): Likewise.
3819 * thread-db.c (thread_db_get_tls_address): Likewise.
3820 (disable_thread_event_reporting): Likewise.
3821 (remove_thread_event_breakpoints): Likewise.
3822 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3824 * target.h (set_desired_inferior): Renamed as...
3825 (set_desired_thread): New declaration. All uses updated.
3826 * server.c (myresume): Updated comment to reference thread instead
3828 (handle_serial_event): Likewise.
3829 (handle_target_event): Likewise.
3831 2014-09-12 Tom Tromey <tromey@redhat.com>
3832 Gary Benson <gbenson@redhat.com>
3834 * regcache.h: Include common-regcache.h.
3835 (regcache_read_pc): Don't declare.
3836 * regcache.c (get_thread_regcache_for_ptid): New function.
3838 2014-09-11 Tom Tromey <tromey@redhat.com>
3839 Gary Benson <gbenson@redhat.com>
3841 * symbol.c: New file.
3842 * Makefile.in (SFILES): Add symbol.c.
3843 (OBS): Add symbol.o.
3845 2014-09-11 Gary Benson <gbenson@redhat.com>
3847 * target.c (target_stop_ptid, target_continue_ptid): New
3850 2014-09-11 Tom Tromey <tromey@redhat.com>
3851 Gary Benson <gbenson@redhat.com>
3853 * target.h: Include target/target.h.
3854 * target.c (target_read_memory, target_read_uint32)
3855 (target_write_memory): New functions.
3857 2014-09-11 Gary Benson <gbenson@redhat.com>
3859 * server.h (debug_hw_points): Don't declare.
3860 * server.c (debug_hw_points): Don't define. Replace all uses
3861 with show_debug_regs.
3862 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3863 all uses with show_debug_regs.
3865 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3867 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3868 endianness into account.
3869 (ppc_supply_ptrace_register): Likewise.
3871 2014-09-03 James Hogan <james.hogan@imgtec.com>
3873 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3874 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3876 2014-09-03 Gary Benson <gbenson@redhat.com>
3878 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3879 ALL_DEBUG_ADDRESS_REGISTERS.
3881 2014-09-02 Gary Benson <gbenson@redhat.com>
3883 * i386-low.h: Renamed as...
3884 * x86-low.h: New file. All type, function and variable name
3885 prefixes changed from "i386_" to "x86_". All references updated.
3886 * i386-low.c: Renamed as...
3887 * x86-low.c: New file. All type, function and variable name
3888 prefixes changed from "i386_" to "x86_". All references updated.
3890 2014-09-02 Gary Benson <gbenson@redhat.com>
3892 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3893 (x86_linux_new_thread): Likewise.
3895 2014-08-29 Gary Benson <gbenson@redhat.com>
3897 * server.h (setjmp.h): Do not include.
3898 (toplevel): Do not declare.
3899 (common-exceptions.h): Include.
3900 (cleanups.h): Likewise.
3901 * server.c (toplevel): Do not define.
3902 (exit_code): New static global.
3903 (detach_or_kill_for_exit_cleanup): New function.
3904 (main): New function. Original main renamed to...
3905 (captured_main): New function.
3906 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3908 2014-08-29 Gary Benson <gbenson@redhat.com>
3910 * Makefile.in (SFILES): Add common/common-exceptions.c.
3911 (OBS): Add common-exceptions.o.
3912 (common-exceptions.o): New rule.
3913 * utils.c (prepare_to_throw_exception): New function.
3915 2014-08-29 Gary Benson <gbenson@redhat.com>
3917 * config.in: Regenerate.
3918 * configure: Likewise.
3920 2014-08-29 Gary Benson <gbenson@redhat.com>
3922 * Makefile.in (SFILES): Add common/cleanups.c.
3924 (cleanups.o): New rule.
3926 2014-08-29 Gary Benson <gbenson@redhat.com>
3928 * utils.c (internal_vwarning): New function.
3930 2014-08-28 Gary Benson <gbenson@redhat.com>
3932 * utils.h (fatal): Remove declaration.
3933 * utils.c (fatal): Remove function.
3935 2014-08-28 Gary Benson <gbenson@redhat.com>
3937 * tracepoint.c (gdb_agent_init): Replace fatal with
3939 (initialize_tracepoint): Likewise.
3941 2014-08-28 Gary Benson <gbenson@redhat.com>
3943 * remote-utils.c (remote_prepare): Replace fatal with error.
3945 2014-08-28 Gary Benson <gbenson@redhat.com>
3947 * linux-low.c (linux_async): Replace fatal with warning.
3949 (linux_start_non_stop): Return -1 if linux_async failed.
3951 2014-08-28 Gary Benson <gbenson@redhat.com>
3953 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3955 (i386_dr_low_get_addr): Remove vague comment.
3956 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3959 2014-08-28 Gary Benson <gbenson@redhat.com>
3961 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3962 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3964 (linux_resume_one_lwp): Likewise.
3965 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3967 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3968 with internal_error.
3969 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3970 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3971 (find_register_by_name): Replace fatal with internal_error.
3972 (find_regno): Likewise.
3973 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3974 * thread-db.c (thread_db_create_event): Likewise.
3975 (thread_db_load_search): Likewise.
3976 (try_thread_db_load_1): Likewise.
3977 * tracepoint.c (get_jump_space_head): Replace fatal with
3979 (claim_trampoline_space): Likewise.
3980 (have_fast_tracepoint_trampoline_buffer): Likewise.
3981 (cmd_qtstart): Likewise.
3982 (stop_tracing): Likewise.
3983 (fast_tracepoint_collecting): Likewise.
3984 (target_malloc): Likewise.
3985 (download_tracepoint): Likewise.
3986 (download_trace_state_variables): Replace check with gdb_assert.
3987 (upload_fast_traceframes): Replace fatal with internal_error.
3989 2014-08-19 Tom Tromey <tromey@redhat.com>
3990 Gary Benson <gbenson@redhat.com>
3992 * Makefile.in (SFILES): Add common/common-debug.c.
3993 (OBS): Add common-debug.o.
3994 (common-debug.o): New rule.
3995 * debug.h (debug_printf): Don't declare.
3996 * debug.c (debug_printf): Renamed and rewritten as...
3997 (debug_vprintf): New function.
3999 2014-08-19 Gary Benson <gbenson@redhat.com>
4001 * utils.h: Do not include print-utils.h.
4003 2014-08-19 Tom Tromey <tromey@redhat.com>
4004 Gary Benson <gbenson@redhat.com>
4006 * server.h: Add static assertion.
4007 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4009 2014-08-19 Tom Tromey <tromey@redhat.com>
4010 Gary Benson <gbenson@redhat.com>
4012 * Makefile.in (SFILES): Add common/errors.c.
4013 (OBS): Add errors.o.
4014 (IPA_OBS): Add errors-ipa.o.
4015 (errors.o): New rule.
4016 (errors-ipa.o): Likewise.
4017 * utils.h (perror_with_name, error, warning): Don't declare.
4018 * utils.c (warning): Renamed and rewritten as...
4019 (vwarning): New function.
4020 (error): Renamed and rewritten as...
4021 (verror): New function.
4022 (internal_error): Renamed and rewritten as...
4023 (internal_verror): New function.
4025 2014-08-07 Gary Benson <gbenson@redhat.com>
4027 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4028 * configure: Regenerate.
4029 * config.in: Likewise.
4030 * server.h: Do not include errno.h.
4031 * event-loop.c: Likewise.
4032 * hostio-errno.c: Likewise.
4033 * linux-low.c: Likewise.
4034 * remote-utils.c: Likewise.
4035 * spu-low.c: Likewise.
4036 * utils.c: Likewise.
4037 * gdbreplay.c: Unconditionally include errno.h.
4039 2014-08-07 Gary Benson <gbenson@redhat.com>
4041 * server.h: Do not include string.h.
4042 * event-loop.c: Likewise.
4043 * linux-low.c: Likewise.
4044 * regcache.c: Likewise.
4045 * remote-utils.c: Likewise.
4046 * spu-low.c: Likewise.
4047 * utils.c: Likewise.
4049 2014-08-07 Gary Benson <gbenson@redhat.com>
4051 * server.h: Do not include gdb_assert.h.
4053 2014-08-07 Gary Benson <gbenson@redhat.com>
4055 * server.h: Do not include common-utils.h.
4057 2014-08-07 Gary Benson <gbenson@redhat.com>
4059 * server.h: Do not include ptid.h.
4060 * notif.h: Likewise.
4062 2014-08-07 Gary Benson <gbenson@redhat.com>
4064 * server.h: Do not include gdb_locale.h.
4066 2014-08-07 Gary Benson <gbenson@redhat.com>
4068 * server.h: Do not include gdb/signals.h.
4069 * win32-low.c: Likewise.
4071 2014-08-07 Gary Benson <gbenson@redhat.com>
4073 * server.h: Do not include pathmax.h.
4075 2014-08-07 Gary Benson <gbenson@redhat.com>
4077 * server.h: Do not include libiberty.h.
4078 * linux-bfin-low.c: Likewise.
4080 2014-08-07 Gary Benson <gbenson@redhat.com>
4082 * server.h: Do not include ansidecl.h.
4084 2014-08-07 Gary Benson <gbenson@redhat.com>
4086 * linux-x86-low.c: Do not include stddef.h.
4087 * lynx-ppc-low.c: Likewise.
4088 * tracepoint.c: Likewise.
4090 2014-08-07 Gary Benson <gbenson@redhat.com>
4092 * server.h: Do not include stdarg.h.
4093 * nto-low.c: Likewise.
4095 2014-08-07 Gary Benson <gbenson@redhat.com>
4097 * server.h: Do not include stdlib.h.
4098 * inferiors.c: Likewise.
4099 * linux-low.c: Likewise.
4100 * regcache.c: Likewise.
4101 * spu-low.c: Likewise.
4102 * tracepoint.c: Likewise.
4103 * utils.c: Likewise.
4105 2014-08-07 Gary Benson <gbenson@redhat.com>
4107 * server.h: Do not include stdio.h.
4108 * linux-low.c: Likewise.
4109 * remote-utils.c: Likewise.
4110 * spu-low.c: Likewise.
4111 * utils.c: Likewise.
4112 * wincecompat.c: Likewise.
4114 2014-08-06 Gary Benson <gbenson@redhat.com>
4116 * regcache.c (init_register_cache): Move conditionals inside if.
4118 2014-08-06 Gary Benson <gbenson@redhat.com>
4120 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4122 2014-07-31 Gary Benson <gbenson@redhat.com>
4124 * ax.h: Do not include server.h.
4125 * gdbthread.h: Likewise.
4126 * lynx-low.h: Likewise.
4127 * notif.h: Likewise.
4129 2014-07-30 Gary Benson <gbenson@redhat.com>
4131 * server.h: Include common-defs.h.
4132 Do not include config.h or build-gnulib-gdbserver/config.h.
4134 2014-07-30 Gary Benson <gbenson@redhat.com>
4136 * hostio-errno.c: Move server.h to top of includes list.
4137 * inferiors.c: Likewise.
4138 * linux-x86-low.c: Likewise.
4139 * notif.c: Include server.h.
4141 2014-07-24 Tom Tromey <tromey@redhat.com>
4142 Gary Benson <gbenson@redhat.com>
4144 * server.h (CORE_ADDR): Now unsigned.
4146 2014-07-16 Pedro Alves <palves@redhat.com>
4148 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4150 2014-07-15 Pedro Alves <palves@redhat.com>
4152 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4155 2014-07-11 Pedro Alves <palves@redhat.com>
4157 * linux-low.c (kill_wait_lwp): New function, based on
4158 kill_one_lwp_callback, but use my_waitpid directly.
4159 (kill_one_lwp_callback, linux_kill): Use it.
4161 2014-06-23 Pedro Alves <palves@redhat.com>
4163 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4164 before setting DR0..DR3.
4166 2014-06-20 Gary Benson <gbenson@redhat.com>
4168 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4169 * configure: Regenerated.
4170 * config.in: Likewise.
4172 2014-06-20 Gary Benson <gbenson@redhat.com>
4174 * Makefile.in (SFILES): Update locations for files moved
4176 (object file files): Reordered.
4178 2014-06-20 Gary Benson <gbenson@redhat.com>
4180 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4181 (i386_dr_low_set_addr): Likewise.
4182 (i386_dr_low_get_addr): Likewise.
4183 (i386_dr_low_can_set_control): Likewise.
4184 (i386_dr_low_set_control): Likewise.
4185 (i386_dr_low_get_control): Likewise.
4186 (i386_dr_low_get_status): Likewise.
4187 (i386_get_debug_register_length): Likewise.
4188 * linux-x86-low.c (i386_dr_low_set_addr):
4189 Changed signature. Made static.
4190 (i386_dr_low_get_addr): Likewise.
4191 (i386_dr_low_set_control): Likewise.
4192 (i386_dr_low_get_control): Likewise.
4193 (i386_dr_low_get_status): Likewise.
4194 (i386_dr_low): New global variable.
4195 * win32-i386-low.c (i386_dr_low_set_addr):
4196 Changed signature. Made static.
4197 (i386_dr_low_get_addr): Likewise.
4198 (i386_dr_low_set_control): Likewise.
4199 (i386_dr_low_get_control): Likewise.
4200 (i386_dr_low_get_status): Likewise.
4201 (i386_dr_low): New global variable.
4203 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4205 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4206 * Makefile.in (AR, AR_FLAGS): Define.
4207 * configure: Regenerate.
4209 2014-06-19 Gary Benson <gbenson@redhat.com>
4211 * Makefile.in (i386-dregs.o): New rule.
4212 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4213 * i386-low.c (target.h): Remove include.
4214 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4215 (DR_CONTROL_SHIFT): Likewise.
4216 (DR_CONTROL_SIZE): Likewise.
4217 (DR_RW_EXECUTE): Likewise.
4218 (DR_RW_WRITE): Likewise.
4219 (DR_RW_READ): Likewise.
4220 (DR_RW_IORW): Likewise.
4221 (DR_LEN_1): Likewise.
4222 (DR_LEN_2): Likewise.
4223 (DR_LEN_4): Likewise.
4224 (DR_LEN_8): Likewise.
4225 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4226 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4227 (DR_ENABLE_SIZE): Likewise.
4228 (DR_LOCAL_SLOWDOWN): Likewise.
4229 (DR_GLOBAL_SLOWDOWN): Likewise.
4230 (DR_CONTROL_RESERVED): Likewise.
4231 (I386_DR_CONTROL_MASK): Likewise.
4232 (I386_DR_VACANT): Likewise.
4233 (I386_DR_LOCAL_ENABLE): Likewise.
4234 (I386_DR_GLOBAL_ENABLE): Likewise.
4235 (I386_DR_DISABLE): Likewise.
4236 (I386_DR_SET_RW_LEN): Likewise.
4237 (I386_DR_GET_RW_LEN): Likewise.
4238 (I386_DR_WATCH_HIT): Likewise.
4239 (i386_wp_op_t): Likewise.
4240 (i386_show_dr): Likewise.
4241 (i386_length_and_rw_bits): Likewise.
4242 (i386_insert_aligned_watchpoint): Likewise.
4243 (i386_remove_aligned_watchpoint): Likewise.
4244 (i386_handle_nonaligned_watchpoint): Likewise.
4245 i386_update_inferior_debug_regs(): Likewise.
4246 (i386_dr_insert_watchpoint): Likewise.
4247 (i386_dr_remove_watchpoint): Likewise.
4248 (i386_dr_region_ok_for_watchpoint): Likewise.
4249 (i386_dr_stopped_data_address): Likewise.
4250 (i386_dr_stopped_by_watchpoint): Likewise.
4252 2014-06-19 Gary Benson <gbenson@redhat.com>
4254 * i386-low.c (i386_dr_show): Renamed to
4255 i386_show_dr and made static. All uses updated.
4256 (i386_dr_length_and_rw_bits): Renamed to
4257 i386_length_and_rw_bits and made static.
4259 (i386_dr_insert_aligned_watchpoint): Renamed to
4260 i386_insert_aligned_watchpoint and made static.
4262 (i386_dr_remove_aligned_watchpoint): Renamed to
4263 i386_remove_aligned_watchpoint and made static.
4265 (i386_dr_update_inferior_debug_regs): Renamed to
4266 i386_update_inferior_debug_regs and made static.
4269 2014-06-18 Gary Benson <gbenson@redhat.com>
4271 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4272 (i386_dr_low_can_set_control): Likewise.
4273 (i386_get_debug_register_length): Likewise.
4274 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4275 (i386_dr_low_can_set_control): Likewise.
4276 (i386_get_debug_register_length): Likewise.
4278 2014-06-17 Gary Benson <gbenson@redhat.com>
4280 * i386-low.h (i386-dregs.h): New include.
4281 (DR_FIRSTADDR): Now in i386-dregs.h.
4282 (DR_LASTADDR): Likewise.
4283 (DR_NADDR): Likewise.
4284 (DR_STATUS): Likewise.
4285 (DR_CONTROL): Likewise.
4286 (i386_debug_reg_state): Likewise.
4287 (i386_dr_insert_watchpoint): Likewise.
4288 (i386_dr_remove_watchpoint): Likewise.
4289 (i386_dr_region_ok_for_watchpoint): Likewise.
4290 (i386_dr_stopped_data_address): Likewise.
4291 (i386_dr_stopped_by_watchpoint): Likewise.
4292 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4294 2014-06-18 Gary Benson <gbenson@redhat.com>
4296 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4297 i386_dr_insert_watchpoint.
4298 (i386_low_remove_watchpoint): Renamed to
4299 i386_dr_remove_watchpoint.
4300 (i386_low_region_ok_for_watchpoint): Renamed to
4301 i386_dr_region_ok_for_watchpoint.
4302 (i386_low_stopped_data_address): Renamed to
4303 i386_dr_stopped_data_address.
4304 (i386_low_stopped_by_watchpoint): Renamed to
4305 i386_dr_stopped_by_watchpoint.
4306 * i386-low.c (i386_show_dr): Renamed to
4307 i386_dr_show and made nonstatic. All uses updated.
4308 (i386_length_and_rw_bits): Renamed to
4309 i386_dr_length_and_rw_bits and made nonstatic.
4311 (i386_insert_aligned_watchpoint): Renamed to
4312 i386_dr_insert_aligned_watchpoint and made nonstatic.
4314 (i386_remove_aligned_watchpoint): Renamed to
4315 i386_dr_remove_aligned_watchpoint and made nonstatic.
4317 (i386_update_inferior_debug_regs): Renamed to
4318 i386_dr_update_inferior_debug_regs and made nonstatic.
4320 (i386_low_insert_watchpoint): Renamed to
4321 i386_dr_insert_watchpoint. All uses updated.
4322 (i386_low_remove_watchpoint): Renamed to
4323 i386_dr_remove_watchpoint. All uses updated.
4324 (i386_low_region_ok_for_watchpoint): Renamed to
4325 i386_dr_region_ok_for_watchpoint. All uses updated.
4326 (i386_low_stopped_data_address): Renamed to
4327 i386_dr_stopped_data_address. All uses updated.
4328 (i386_low_stopped_by_watchpoint): Renamed to
4329 i386_dr_stopped_by_watchpoint. All uses updated.
4331 2014-06-18 Gary Benson <gbenson@redhat.com>
4333 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4334 (i386_dr_low_can_set_control): Likewise.
4335 (i386_insert_aligned_watchpoint): New check.
4337 2014-06-18 Gary Benson <gbenson@redhat.com>
4339 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4342 2014-06-18 Gary Benson <gbenson@redhat.com>
4344 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4345 instead of fatal and error.
4346 (i386_handle_nonaligned_watchpoint): Likewise.
4348 2014-06-18 Gary Benson <gbenson@redhat.com>
4350 * i386-low.c (i386_get_debug_register_length): New macro.
4351 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4352 (i386_show_dr): Use debug_printf instead of fprintf. Use
4353 phex to format values.
4355 2014-06-18 Gary Benson <gbenson@redhat.com>
4357 * i386-low.h: Comment changes.
4358 * i386-low.c: Likewise.
4360 2014-06-18 Gary Benson <gbenson@redhat.com>
4362 * i386-low.c: Whitespace changes.
4364 2014-06-12 Tom Tromey <tromey@redhat.com>
4366 * utils.c (freeargv): Remove.
4368 2014-06-12 Tom Tromey <tromey@redhat.com>
4370 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4371 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4372 (parse_debug_format_options): Likewise.
4373 (gdbserver_usage): Likewise.
4374 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4375 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4376 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4378 ($(LIBGNU)): Depend on libiberty.
4379 (all-lib): Recurse into all subdirs.
4380 (install-only): Invoke "install" target in subdirs.
4381 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4383 * configure: Rebuild.
4384 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4385 for vasprintf, vsnprintf, or gettimeofday.
4386 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4389 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4391 * development.sh: Delete.
4392 * Makefile.in (config.status): Adjust dependency on development.sh.
4393 * configure.ac: Adjust development.sh source call.
4394 * configure: Regenerate.
4396 2014-06-02 Pedro Alves <palves@redhat.com>
4398 * ax.c (gdb_free_agent_expr): New function.
4399 * ax.h (gdb_free_agent_expr): New declaration.
4400 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4402 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4404 (clear_breakpoint_conditions_and_commands): New function.
4405 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4406 (clear_breakpoint_conditions_and_commands): New declaration.
4408 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4410 * linux-aarch64-low.c (asm/ptrace.h): Include.
4412 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4414 Fix TLS access for -static -pthread.
4415 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4416 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4417 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4419 2014-05-20 Pedro Alves <palves@redhat.com>
4421 * linux-aarch64-low.c (aarch64_insert_point)
4422 (aarch64_remove_point): No longer check whether the type is
4423 supported here. Adjust to new interface.
4424 (the_low_target): Install aarch64_supports_z_point_type as
4425 supports_z_point_type method.
4426 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4427 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4428 instead of a Z packet char. Adjust.
4429 (arm_supports_z_point_type): New function.
4430 (arm_insert_point, arm_remove_point): Adjust to new interface.
4431 (the_low_target): Install arm_supports_z_point_type.
4432 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4433 (cris_insert_point, cris_remove_point): Adjust to new interface.
4434 Don't check whether the type is supported here.
4435 (the_low_target): Install cris_supports_z_point_type.
4436 * linux-low.c (linux_supports_z_point_type): New function.
4437 (linux_insert_point, linux_remove_point): Adjust to new interface.
4438 * linux-low.h (struct linux_target_ops) <insert_point,
4439 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4440 raw_breakpoint pointer parameter.
4441 <supports_z_point_type>: New method.
4442 * linux-mips-low.c (mips_supports_z_point_type): New function.
4443 (mips_insert_point, mips_remove_point): Adjust to new interface.
4444 Use mips_supports_z_point_type.
4445 (the_low_target): Install mips_supports_z_point_type.
4446 * linux-ppc-low.c (the_low_target): Install NULL as
4447 supports_z_point_type method.
4448 * linux-s390-low.c (the_low_target): Install NULL as
4449 supports_z_point_type method.
4450 * linux-sparc-low.c (the_low_target): Install NULL as
4451 supports_z_point_type method.
4452 * linux-x86-low.c (x86_supports_z_point_type): New function.
4453 (x86_insert_point): Adjust to new insert_point interface. Use
4454 insert_memory_breakpoint. Adjust to new
4455 i386_low_insert_watchpoint interface.
4456 (x86_remove_point): Adjust to remove_point interface. Use
4457 remove_memory_breakpoint. Adjust to new
4458 i386_low_remove_watchpoint interface.
4459 (the_low_target): Install x86_supports_z_point_type.
4460 * lynx-low.c (lynx_target_ops): Install NULL as
4461 supports_z_point_type callback.
4462 * nto-low.c (nto_supports_z_point_type): New.
4463 (nto_insert_point, nto_remove_point): Adjust to new interface.
4464 (nto_target_ops): Install nto_supports_z_point_type.
4465 * mem-break.c: Adjust intro comment.
4466 (struct raw_breakpoint) <raw_type, size>: New fields.
4467 <inserted>: Update comment.
4468 <shlib_disabled>: Delete field.
4469 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4470 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4471 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4472 (raw_bkpt_type_to_target_hw_bp_type): New function.
4473 (find_enabled_raw_code_breakpoint_at): New function.
4474 (find_raw_breakpoint_at): New type and size parameters. Use them.
4475 (insert_memory_breakpoint): New function, based off
4476 set_raw_breakpoint_at.
4477 (remove_memory_breakpoint): New function.
4478 (set_raw_breakpoint_at): Reimplement.
4479 (set_breakpoint): New, based on set_breakpoint_at.
4480 (set_breakpoint_at): Reimplement.
4481 (delete_raw_breakpoint): Go through the_target->remove_point
4482 instead of assuming memory breakpoints.
4483 (find_gdb_breakpoint_at): Delete.
4484 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4485 (find_gdb_breakpoint): New function.
4486 (set_gdb_breakpoint_at): Delete.
4487 (z_type_supported): New function.
4488 (set_gdb_breakpoint_1): New function, loosely based off
4489 set_gdb_breakpoint_at.
4490 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4491 (delete_gdb_breakpoint_at): Delete.
4492 (delete_gdb_breakpoint_1): New function, loosely based off
4493 delete_gdb_breakpoint_at.
4494 (delete_gdb_breakpoint): New function.
4495 (clear_gdb_breakpoint_conditions): Rename to ...
4496 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4498 (add_condition_to_breakpoint): Make static.
4499 (add_breakpoint_condition): Take a struct breakpoint pointer
4500 instead of an address. Adjust.
4501 (gdb_condition_true_at_breakpoint): Rename to ...
4502 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4504 (gdb_condition_true_at_breakpoint): Reimplement.
4505 (add_breakpoint_commands): Take a struct breakpoint pointer
4506 instead of an address. Adjust.
4507 (gdb_no_commands_at_breakpoint): Rename to ...
4508 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4509 parameter. Return true if no breakpoint was found. Change debug
4511 (gdb_no_commands_at_breakpoint): Reimplement.
4512 (run_breakpoint_commands): Rename to ...
4513 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4514 and change return type to boolean.
4515 (run_breakpoint_commands): New function.
4516 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4517 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4518 breakpoint. Go through the_target->remove_point instead of
4519 assuming memory breakpoint.
4520 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4521 software and hardware breakpoints.
4522 (reinsert_raw_breakpoint): Go through the_target->insert_point
4523 instead of assuming memory breakpoint.
4524 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4525 software and hardware breakpoints.
4526 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4527 Check both software and hardware breakpoints.
4528 (validate_inserted_breakpoint): Assert the breakpoint is a
4529 software breakpoint. Set the inserted flag to -1 instead of
4530 setting shlib_disabled.
4531 (delete_disabled_breakpoints): Adjust.
4532 (validate_breakpoints): Only validate software breakpoints.
4533 Adjust to inserted flag change.
4534 (check_mem_read, check_mem_write): Skip breakpoint types other
4535 than software breakpoints. Adjust to inserted flag change.
4536 * mem-break.h (enum raw_bkpt_type): New enum.
4537 (raw_breakpoint, struct process_info): Forward declare.
4538 (Z_packet_to_target_hw_bp_type): Delete declaration.
4539 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4540 (set_gdb_breakpoint, delete_gdb_breakpoint)
4541 (clear_breakpoint_conditions): New declarations.
4542 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4543 (breakpoint_inserted_here): Update comment.
4544 (add_breakpoint_condition, add_breakpoint_commands): Replace
4545 address parameter with a breakpoint pointer parameter.
4546 (gdb_breakpoint_here): Update comment.
4547 (delete_gdb_breakpoint_at): Delete.
4548 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4549 * server.c (process_point_options): Take a struct breakpoint
4550 pointer instead of an address. Adjust.
4551 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4552 delete_gdb_breakpoint.
4553 * spu-low.c (spu_target_ops): Install NULL as
4554 supports_z_point_type method.
4555 * target.h: Include mem-break.h.
4556 (struct target_ops) <prepare_to_access_memory>: Update comment.
4557 <supports_z_point_type>: New field.
4558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4559 instead of a char. Also take a raw breakpoint pointer.
4560 * win32-arm-low.c (the_low_target): Install NULL as
4561 supports_z_point_type.
4562 * win32-i386-low.c (i386_supports_z_point_type): New function.
4563 (i386_insert_point, i386_remove_point): Adjust to new interface.
4564 (the_low_target): Install i386_supports_z_point_type.
4565 * win32-low.c (win32_supports_z_point_type): New function.
4566 (win32_insert_point, win32_remove_point): Adjust to new interface.
4567 (win32_target_ops): Install win32_supports_z_point_type.
4568 * win32-low.h (struct win32_target_ops):
4569 <supports_z_point_type>: New method.
4570 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4571 instead of a char. Also take a raw breakpoint pointer.
4573 2014-05-20 Pedro Alves <palves@redhat.com>
4575 * mem-break.h: Include break-common.h.
4576 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4577 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4578 (Z_packet_to_target_hw_bp_type): New declaration.
4579 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4580 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4581 (Z_PACKET_ACCESS_WP): Delete macros.
4582 (Z_packet_to_hw_type): Delete function.
4583 * i386-low.h: Don't include break-common.h here.
4584 (Z_packet_to_hw_type): Delete declaration.
4585 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4586 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4587 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4588 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4589 * linux-aarch64-low.c: Don't include break-common.h here.
4590 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4591 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4592 (Z_packet_to_target_hw_bp_type): Delete function.
4593 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4595 (mips_insert_point, mips_remove_point): Use
4596 Z_packet_to_target_hw_bp_type.
4598 2014-05-20 Pedro Alves <palves@redhat.com>
4600 * linux-aarch64-low.c: Include break-common.h.
4601 (enum target_point_type): Delete.
4602 (Z_packet_to_point_type): Rename to ...
4603 (Z_packet_to_target_hw_bp_type): ... this, and return a
4604 target_hw_bp_type instead.
4605 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4606 instead of an enum target_point_type.
4607 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4609 (aarch64_dr_state_insert_one_point)
4610 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4611 (aarch64_handle_aligned_watchpoint)
4612 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4613 Take an enum target_hw_bp_type instead of an enum
4615 (aarch64_supports_z_point_type): New function.
4616 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4617 use Z_packet_to_target_hw_bp_type.
4619 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4621 * configure.ac: Only use -Werror by default when DEVELOPMENT
4623 * configure: Regenerate.
4625 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4627 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4628 * linux-x86-low.c (X86_64_USER_REGS): New.
4629 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4631 2014-04-28 Yao Qi <yao@codesourcery.com>
4633 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4636 2014-04-25 Pedro Alves <palves@redhat.com>
4639 * linux-low.c (linux_attach_fail_reason_string): New function.
4640 (linux_attach_lwp): Delete.
4641 (linux_attach_lwp_1): Rename to ...
4642 (linux_attach_lwp): ... this. 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): Adjust to call linux_attach_lwp. Call error on
4646 failure to attach to the tgid. Call warning when failing to
4648 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4649 argument. Remove "initial" parameter. Return int instead of
4650 void. Don't error or warn here.
4651 (linux_attach_fail_reason_string): New declaration.
4652 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4653 interface change. Use linux_attach_fail_reason_string.
4655 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4656 Walfred Tedeschi <walfred.tedeschi@intel.com>
4658 * Makefile.in: Added rules to handle new files
4659 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4660 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4661 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4662 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4663 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4664 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4666 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4667 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4668 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4669 i386/x32-avx512.xml.
4670 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4671 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4672 i386/x32-avx512-linux.xml.
4673 * i387-fp.c (num_avx512_k_registers): New constant for number
4675 (num_avx512_zmmh_low_registers): New constant for number of
4676 lower ZMM registers (0-15).
4677 (num_avx512_zmmh_high_registers): New constant for number of
4678 higher ZMM registers (16-31).
4679 (num_avx512_ymmh_registers): New contant for number of higher
4680 YMM registers (ymm16-31 added by avx521 on x86_64).
4681 (num_avx512_xmm_registers): New constant for number of higher
4682 XMM registers (xmm16-31 added by AVX512 on x86_64).
4683 (struct i387_xsave): Add space for AVX512 registers.
4684 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4685 Add code to handle AVX512 registers.
4686 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4687 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4688 prototypei from generated file.
4689 (tdesc_amd64_avx512_linux): Likewise.
4690 (init_registers_x32_avx512_linux): Likewise.
4691 (tdesc_x32_avx512_linux): Likewise.
4692 (init_registers_i386_avx512_linux): Likewise.
4693 (tdesc_i386_avx512_linux): Likewise.
4694 (x86_64_regmap): Add AVX512 registers.
4695 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4697 (initialize_low_arch): Add code to initialize AVX512 registers.
4699 2014-04-23 Pedro Alves <palves@redhat.com>
4701 * mem-break.c (find_gdb_breakpoint_at): Make static.
4702 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4704 2014-04-23 Pedro Alves <palves@redhat.com>
4706 * i386-low.c: Don't include break-common.h here.
4707 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4708 prototype to take target_hw_bp_type as argument instead of a Z
4710 * i386-low.h: Include break-common.h here.
4711 (Z_packet_to_hw_type): Declare.
4712 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4714 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4715 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4716 (x86_remove_point): Convert the packet number to a
4717 target_hw_bp_type before calling i386_low_remove_watchpoint.
4718 * win32-i386-low.c (i386_insert_point): Convert the packet number
4719 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4720 (i386_remove_point): Convert the packet number to a
4721 target_hw_bp_type before calling i386_low_remove_watchpoint.
4723 2014-04-23 Pedro Alves <palves@redhat.com>
4725 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4727 2014-04-10 Pedro Alves <palves@redhat.com>
4729 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4730 Check if the condition or command is NULL before checking if the
4731 breakpoint is known. On success, return true.
4732 * mem-break.h (add_breakpoint_condition): Document return.
4733 (add_breakpoint_commands): Add describing comment.
4734 * server.c (skip_to_semicolon): New function.
4735 (process_point_options): Use it.
4737 2014-04-09 Pedro Alves <palves@redhat.com>
4739 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4742 2014-02-27 Pedro Alves <palves@redhat.com>
4745 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4747 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4749 (last_thread_of_process_p): Take a PID argument instead of a
4751 (linux_wait_for_lwp): Delete.
4752 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4754 (linux_low_filter_event): New function, party factored out from
4755 linux_wait_for_event.
4756 (linux_wait_for_event): Rename to ...
4757 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4758 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4759 sigsuspend. Check for zombie leaders.
4760 (linux_wait_for_event): Reimplement as wrapper around
4761 linux_wait_for_event_filtered.
4762 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4763 a normal or signal exit is seen, it's the whole process exiting.
4764 (wait_for_sigstop): No longer a for_each_inferior callback.
4765 Rewrite on top of linux_wait_for_event_filtered.
4766 (stop_all_lwps): Call wait_for_sigstop directly.
4767 * server.c (resume, handle_target_event): Handle
4768 TARGET_WAITKIND_NO_RESUMED.
4770 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4772 * win32-low.c (psapi_get_dll_name,
4773 * win32_CreateToolhelp32Snapshot): Delete.
4774 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4775 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4777 (handle_load_dll): Add function description.
4778 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4780 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4782 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4784 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4785 base address when calling win32_add_one_solib.
4786 (handle_load_dll): Delete local variable load_addr.
4787 Remove 0x1000 offset applied to DLL base address when calling
4788 win32_add_one_solib.
4789 (handle_unload_dll): Add comment.
4791 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4793 * win32-low.c (win32_add_all_dlls): Renames
4794 win32_ensure_ntdll_loaded. Rewrite function documentation.
4795 Adjust implementation to always load all DLLs.
4796 Add 0x1000 offset to DLL base address when calling
4797 win32_add_one_solib.
4798 (child_initialization_done): New static global.
4799 (do_initial_child_stuff): Set child_initialization_done to
4800 zero during child initialization, and 1 after. Replace call
4801 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4803 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4804 (handle_unload_dll): Add function documentation.
4805 (get_child_debug_event): Ignore load and unload DLL events
4806 during child initialization.
4808 2014-02-20 Doug Evans <dje@google.com>
4810 Remove global all_lwps.
4811 * inferiors.h (ptid_of): Move here from linux-low.h.
4812 (pid_of, lwpid_of): Ditto.
4813 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4814 parameter is a struct thread_info * now.
4815 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4816 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4817 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4819 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4820 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4821 * linux-arm-low.c (update_registers_callback): Update, "entry"
4822 parameter is a struct thread_info * now.
4823 Fetch lwpid from current_inferior directly.
4824 (arm_insert_point): Pass &all_threads to find_inferior instead of
4826 (arm_remove_point): Ditto.
4827 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4828 (arm_prepare_to_resume): Fetch pid from thread.
4829 (arm_read_description): Fetch lwpid from current_inferior directly.
4830 * linux-low.c (all_lwps): Delete.
4831 (delete_lwp): Delete call to remove_inferior.
4832 (handle_extended_wait): Fetch lwpid from thread.
4833 (add_lwp): Don't set lwp->entry.id. Remove call to
4834 add_inferior_to_list.
4835 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4836 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4837 (kill_one_lwp_callback): Ditto.
4838 (linux_kill): Don't dereference NULL pointer.
4839 Fetch ptid,lwpid from thread.
4840 (get_detach_signal): Fetch ptid from thread.
4841 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4842 Simplify call to regcache_invalidate_thread.
4843 (delete_lwp_callback): Update, "entry" parameter is a
4844 struct thread_info * now. Fetch pid from thread.
4845 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4846 (status_pending_p_callback): Update, "entry" parameter is a
4847 struct thread_info * now. Fetch ptid from thread.
4848 (find_lwp_pid): Update, "entry" parameter is a
4849 struct thread_info * now.
4850 (linux_wait_for_lwp): Fetch pid from thread.
4851 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4852 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4853 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4854 (dequeue_one_deferred_signal): Ditto.
4855 (cancel_breakpoint): Fetch ptid from current_inferior.
4856 (linux_wait_for_event): Pass &all_threads to find_inferior,
4857 not &all_lwps. Fetch ptid, lwpid from thread.
4858 (count_events_callback): Update, "entry" parameter is a
4859 struct thread_info * now.
4860 (select_singlestep_lwp_callback): Ditto.
4861 (select_event_lwp_callback): Ditto.
4862 (cancel_breakpoints_callback): Ditto.
4863 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4865 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4866 (unsuspend_one_lwp): Update, "entry" parameter is a
4867 struct thread_info * now.
4868 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4870 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4871 Fetch lwpid from thread, not lwp.
4872 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4873 Pass &all_threads to find_inferior, not &all_lwps.
4874 (send_sigstop): Fetch lwpid from thread, not lwp.
4875 (send_sigstop_callback): Update, "entry" parameter is a
4876 struct thread_info * now.
4877 (suspend_and_send_sigstop_callback): Ditto.
4878 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4879 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4880 struct thread_info * now.
4881 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4883 (lwp_running): Update, "entry" parameter is a
4884 struct thread_info * now.
4885 (stop_all_lwps): Fetch ptid from thread.
4886 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4887 (linux_resume_one_lwp): Fetch lwpid from thread.
4888 (linux_set_resume_request): Update, "entry" parameter is a
4889 struct thread_info * now. Fetch pid, lwpid from thread.
4890 (resume_status_pending_p): Update, "entry" parameter is a
4891 struct thread_info * now.
4892 (need_step_over_p): Ditto. Fetch lwpid from thread.
4893 (start_step_over): Fetch lwpid from thread.
4894 (linux_resume_one_thread): Update, "entry" parameter is a
4895 struct thread_info * now. Fetch lwpid from thread.
4896 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4897 (proceed_one_lwp): Update, "entry" parameter is a
4898 struct thread_info * now. Fetch lwpid from thread.
4899 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4900 struct thread_info * now.
4901 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4902 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4903 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4905 (regsets_store_inferior_registers): Ditto.
4906 (fetch_register, store_register): Ditto.
4907 (linux_read_memory, linux_write_memory): Ditto.
4908 (linux_request_interrupt): Ditto.
4909 (linux_read_auxv): Ditto.
4910 (linux_xfer_siginfo): Ditto.
4911 (linux_qxfer_spu): Ditto.
4912 (linux_qxfer_libraries_svr4): Ditto.
4913 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4914 moved to inferiors.h.
4916 (get_thread_lwp): Update.
4917 (struct lwp_info): Delete member "entry". Simplify comment for
4920 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4921 current_inferior directly.
4922 (update_watch_registers_callback): Update, "entry" parameter is a
4923 struct thread_info * now. Fetch pid from thread.
4924 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4925 (mips_insert_point): Fetch lwpid from current_inferior.
4926 Pass &all_threads to find_inferior, not &all_lwps.
4927 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4928 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4930 (mips_stopped_data_address): Ditto.
4931 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4933 * linux-tile-low.c (tile_arch_setup): Ditto.
4934 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4935 (update_debug_registers_callback): Update, "entry" parameter is a
4936 struct thread_info * now. Fetch pid from thread.
4937 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4938 Pass &all_threads to find_inferior, not &all_lwps.
4939 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4940 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4941 Pass &all_threads to find_inferior, not &all_lwps.
4942 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4943 (i386_dr_low_get_status): Ditto.
4944 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4945 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4946 (x86_linux_read_description): Ditto.
4947 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4949 2014-02-20 Doug Evans <dje@google.com>
4951 * inferiors.c (get_first_inferior): Fix buglet.
4953 2014-02-19 Doug Evans <dje@google.com>
4955 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4956 * inferiors.c (add_thread): Change result type to struct thread_info *.
4957 All callers updated.
4958 (add_lwp): Call add_thread here instead of in callers.
4959 All callers updated.
4960 * linux-low.h (get_lwp_thread): Rewrite.
4961 (struct lwp_info): New member "thread".
4963 2014-02-19 Doug Evans <dje@google.com>
4965 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4966 All callers updated.
4968 2014-02-19 Doug Evans <dje@google.com>
4970 * inferiors.c (add_thread): Fix whitespace.
4972 2014-02-19 Doug Evans <dje@google.com>
4974 * dll.c (clear_dlls): Replace accessing list implemention details
4976 * gdbthread.h (get_first_thread): Declare.
4977 * inferiors.c (for_each_inferior_with_data): New function.
4978 (get_first_thread): New function.
4979 (find_thread_ptid): Simplify.
4980 (get_first_inferior): New function.
4981 (clear_list): Delete.
4982 (one_inferior_p): New function.
4983 (clear_inferior_list): New function.
4984 (clear_inferiors): Update.
4985 * inferiors.h (for_each_inferior_with_data): Declare.
4986 (clear_inferior_list): Declare.
4987 (one_inferior_p): Declare.
4988 (get_first_inferior): Declare.
4989 * linux-low.c (linux_wait_for_event): Replace accessing list
4990 implemention details with API function.
4991 * server.c (target_running): Ditto.
4992 (accumulate_file_name_length): New function.
4993 (emit_dll_description): New function.
4994 (handle_qxfer_libraries): Replace accessing list implemention
4995 details with API function.
4996 (handle_qxfer_threads_worker): New function.
4997 (handle_qxfer_threads_proper): Replace accessing list implemention
4998 details with API function.
4999 (handle_query): Ditto.
5000 (visit_actioned_threads_callback_ftype): New typedef.
5001 (visit_actioned_threads_data): New struct.
5002 (visit_actioned_threads): Rewrite to be find_inferior callback.
5003 (resume): Call find_inferior.
5004 (handle_status): Replace accessing list implemention
5005 details with API function.
5006 (process_serial_event): Replace accessing list implemention details
5008 * target.c (set_desired_inferior): Replace accessing list implemention
5009 details with API function.
5010 * tracepoint.c (same_process_p): New function.
5011 (gdb_agent_about_to_close): Replace accessing list implemention
5012 details with API function.
5013 * win32-low.c (child_delete_thread): Replace accessing list
5014 implemention details with API function.
5015 (match_dll_by_basename): New function.
5016 (dll_is_loaded_by_basename): New function.
5017 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5018 details call to dll_is_loaded_by_basename.
5020 2014-02-19 Doug Evans <dje@google.com>
5022 * dll.h (struct dll_info): Add comment.
5023 * gdbthread.h (struct thread_info): Add comment.
5024 (current_ptid): Simplify.
5025 * inferiors.c (add_process): Update.
5026 (remove_process): Update.
5027 * inferiors.h (struct process_info): Rename member "head" to "entry".
5028 * linux-low.c (delete_lwp): Update.
5030 (last_thread_of_process_p): Update.
5031 (kill_one_lwp_callback, linux_kill): Update.
5032 (status_pending_p_callback): Update.
5033 (wait_for_sigstop): Update. Simplify read of ptid.
5034 (start_step_over): Update.
5035 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5036 (get_lwp_thread): Update.
5037 (struct lwp_info): Rename member "head" to "entry".
5038 * regcache.h (inferior_list_entry): Delete.
5039 * server.c (kill_inferior_callback): Update.
5040 (detach_or_kill_inferior_callback): Update.
5041 (print_started_pid): Update.
5042 (print_attached_pid): Update.
5043 (process_serial_event): Simplify read of ptid.
5044 * thread-db.c (thread_db_create_event): Update.
5045 (thread_db_get_tls_address): Update.
5046 * win32-low.c (current_inferior_ptid): Simplify.
5048 2014-02-19 Tom Tromey <tromey@redhat.com>
5050 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5052 (target_supports_btrace): Update.
5054 2014-02-14 Yao Qi <yao@codesourcery.com>
5056 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5057 (rsp-low-ipa.o): New target.
5059 2014-02-12 Tom Tromey <tromey@redhat.com>
5061 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5062 convert_ascii_to_int.
5063 * regcache.c (registers_to_string): Likewise.
5064 * remote-utils.c (decode_M_packet): Likewise.
5065 * server.c (process_serial_event): Likewise.
5067 2014-02-12 Tom Tromey <tromey@redhat.com>
5069 * server.c (handle_query, handle_v_run): Use hex2bin, not
5071 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5073 2014-02-12 Tom Tromey <tromey@redhat.com>
5075 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5076 convert_int_to_ascii.
5077 * regcache.c (registers_to_string, collect_register_as_string):
5079 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5081 * server.c (process_serial_event): Likewise.
5082 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5083 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5085 2014-02-12 Tom Tromey <tromey@redhat.com>
5087 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5088 bin2hex, not hexify.
5089 * tracepoint.c (cmd_qtstatus): Likewise.
5091 2014-02-12 Tom Tromey <tromey@redhat.com>
5093 * remote-utils.c (monitor_output): Pass explicit length to
5096 2014-02-12 Tom Tromey <tromey@redhat.com>
5098 * tracepoint.c: Include rsp-low.h.
5099 * server.c: Include rsp-low.h.
5100 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5101 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5103 * remote-utils.c: Include rsp-low.h.
5104 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5105 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5106 (convert_int_to_ascii, convert_ascii_to_int): Move to
5108 * regcache.c: Include rsp-low.h.
5109 * ax.c: Include rsp-low.h.
5110 * Makefile.in (SFILES): Add common/rsp-low.c.
5111 (OBS): Add rsp-low.o.
5112 (rsp-low.o): New target.
5114 2014-02-12 Tom Tromey <tromey@redhat.com>
5116 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5117 Include print-utils.h.
5118 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5119 (plongest, thirty_two, phex_nz): Remove.
5120 * Makefile.in (SFILES): Add common/print-utils.c.
5121 (OBS): Add print-utils.o.
5122 (print-utils-ipa.o): New target.
5123 (print-utils.o): New target.
5124 (IPA_OBJS): Add print-utils-ipa.o.
5126 2014-02-06 Tom Tromey <tromey@redhat.com>
5128 * Makefile.in (SFILES): Fix indentation.
5130 2014-02-05 Doug Evans <dje@google.com>
5132 * linux-low.c (linux_wait_for_event): Improve comment.
5133 (linux_wait_1): Keep current_inferior in sync with event_child.
5135 2014-01-22 Doug Evans <dje@google.com>
5137 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5139 2014-01-22 Doug Evans <dje@google.com>
5141 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5142 * configure: Regenerate.
5143 * config.in: Regenerate.
5144 * Makefile.in (SFILES): Add debug.c.
5146 * debug.c: New file.
5147 * debug.h: New file.
5148 * linux-aarch64-low.c (*): Update all debugging printfs to use
5149 debug_printf instead of fprintf.
5150 * linux-arm-low.c (*): Ditto.
5151 * linux-cris-low.c (*): Ditto.
5152 * linux-crisv32-low.c (*): Ditto.
5153 * linux-m32r-low.c (*): Ditto.
5154 * linux-sparc-low.c (*): Ditto.
5155 * linux-x86.c (*): Ditto.
5156 * linux-low.c (*): Ditto.
5157 (linux_wait_1): Add calls to debug_enter, debug_exit.
5158 (linux_wait): Remove redundant debugging printf.
5159 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5160 (linux_resume, unstop_all_lwps): Ditto.
5161 * mem-break.c (*): Update all debugging printfs to use
5162 debug_printf instead of fprintf.
5163 * remote-utils.c (*): Ditto.
5164 * thread-db.c (*): Ditto.
5165 * server.c #include <ctype.h>, "gdb_vecs.h".
5166 (debug_threads): Moved to debug.c.
5167 (*): Update all debugging printfs to use debug_printf instead of
5169 (start_inferior): Replace call to fflush with call to debug_flush.
5170 (monitor_show_help): Mention set debug-format.
5171 (parse_debug_format_options): New function.
5172 (handle_monitor_command): Handle "monitor set debug-format".
5173 (gdbserver_usage): Mention --debug-format.
5174 (main): Parse --debug-format.
5175 * server.h (debug_threads): Declaration moved to debug.h.
5177 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5178 trace_debug_1 that uses debug_printf.
5179 (tracepoint_look_up_symbols): Update all debugging printfs to use
5180 debug_printf instead of fprintf.
5182 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5184 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5187 2014-01-17 Pedro Alves <palves@redhat.com>
5190 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5191 defined after including gdb_proc_service.h.
5193 2014-01-16 Doug Evans <dje@google.com>
5195 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5196 (match_dll): Use it.
5198 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5200 * target.h (target_ops) <read_btrace>: Change parameters and
5201 return type to allow error reporting.
5202 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5203 trace reading errors on.
5204 * linux-low.c (linux_low_read_btrace): Pass trace reading
5206 (linux_low_disable_btrace): New.
5208 2014-01-15 Doug Evans <dje@google.com>
5210 * inferiors.c (thread_id_to_gdb_id): Delete.
5211 * inferiors.h (thread_id_to_gdb_id): Delete.
5213 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5215 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5216 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5219 2014-01-08 Pedro Alves <palves@redhat.com>
5221 * server.c (handle_status): Don't discard previous queued stop
5222 replies or thread's pending status here.
5223 (main) <disconnection>: Do it here instead.
5225 2014-01-08 Pedro Alves <palves@redhat.com>
5227 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5228 * server.c (visit_actioned_threads, handle_pending_status): New
5230 (handle_v_cont): Factor out parts to ...
5231 (resume): ... this new function. If in all-stop, and a thread
5232 being resumed has a pending status, report it without actually
5234 (myresume): Adjust to use the new 'resume' function.
5235 (clear_pending_status_callback, set_pending_status_callback)
5236 (find_status_pending_thread_callback): New functions.
5237 (handle_status): Handle the case of multiple threads having
5238 interesting statuses to report. Report threads' real last signal
5239 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5240 with an interesting thread to report the status for, instead of
5241 always reporting the status of the first thread.
5243 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5245 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5246 * gdbreplay.c (gdbreplay_version): Likewise.
5248 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5250 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5251 iov.iov_len with the real length in use.
5253 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5255 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5256 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5257 for all targets that use win32-low.c.
5258 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5259 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5261 2013-12-13 Pedro Alves <palves@redhat.com>
5263 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5264 if equal to TARGET_WAITKIND_LOADED.
5265 * win32-low.c (cached_status): New static global.
5266 (win32_wait): Add declaration.
5267 (do_initial_child_stuff): Flush all initial pending debug events
5268 up to the initial breakpoint.
5269 (win32_wait): If CACHED_STATUS was set, return that instead
5270 of doing a real wait. Remove the code resuming the execution
5271 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5272 during the initial phase. Also remove the code changing
5273 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5274 TARGET_WAITKIND_STOPPED.
5276 2013-12-11 Yao Qi <yao@codesourcery.com>
5278 * notif.c (handle_notif_ack): Return 0 if no notification
5281 2013-11-20 Doug Evans <dje@google.com>
5283 * linux-low.c (linux_set_resume_request): Fix comment.
5285 2013-11-20 Doug Evans <dje@google.com>
5287 * linux-low.c (resume_status_pending_p): Tweak comment.
5289 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5291 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5292 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5293 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5294 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5295 (srv_amd64_regobj): Add amd64-mpx.o.
5296 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5297 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5298 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5299 * i387-fp.c (num_pl_bnd_register) Added constant.
5300 (num_pl_bnd_cfg_registers) Added constant.
5301 (struct i387_xsave) Added reserved area and MPX fields.
5302 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5303 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5305 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5306 (init_registers_amd64_mpx_linux): Declare new function.
5307 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5308 (x86_64_regmap): Add MPX registers.
5309 (x86_linux_read_description): Add MPX case.
5310 (initialize_low_arch): Initialize MPX targets.
5312 2013-11-18 Tom Tromey <tromey@redhat.com>
5314 * configure: Rebuild.
5315 * configure.ac: Don't check for stdlib.h.
5316 * gdbreplay.c: Unconditionally include stdlib.h.
5318 2013-11-18 Tom Tromey <tromey@redhat.com>
5320 * config.in: Rebuild.
5321 * configure: Rebuild.
5322 * configure.ac: Don't use AC_HEADER_DIRENT.
5324 2013-11-18 Tom Tromey <tromey@redhat.com>
5326 * server.h: Don't check HAVE_STRING_H.
5327 * gdbreplay.c: Don't check HAVE_STRING_H.
5328 * configure: Rebuild.
5330 2013-11-18 Tom Tromey <tromey@redhat.com>
5332 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5335 2013-11-08 Tom Tromey <tromey@redhat.com>
5337 * configure, config.in: Rebuild.
5338 * configure.ac: Remove unused configury.
5340 2013-11-08 Tom Tromey <tromey@redhat.com>
5342 * acinclude.m4: Include common.m4, codeset.m4.
5343 * configure, config.in: Rebuild.
5344 * configure.ac: Use GDB_AC_COMMON.
5346 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5348 * linux-s390-low.c (HWCAP_S390_TE): New define.
5349 (s390_arch_setup): Consider the TE field in the HWCAP for
5350 determining 'have_regset_tdb'.
5352 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5355 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5358 2013-10-02 Pedro Alves <palves@redhat.com>
5360 * server.c (process_serial_event): Don't output "GDBserver
5361 exiting" if GDB is connected through stdio.
5362 * target.c (mywait): Likewise, be silent if GDB is connected
5365 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5367 * lynx-low.c (lynx_add_threads_after_attach): New function.
5368 (lynx_attach): Remove call to add_thread. Add call to
5369 lynx_add_threads_after_attach instead.
5371 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5373 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5374 * config.in, configure: Regenerated.
5376 2013-09-18 Yao Qi <yao@codesourcery.com>
5379 * server.c (start_inferior): Clear 'resume_info'.
5381 2013-09-16 Jiong Wang <jiwang@tilera.com>
5383 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5386 2013-09-16 Jiong Wang <jiwang@tilera.com>
5388 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5389 linux-tile-low.o to srv_tgtobj.
5391 2013-09-16 Will Newton <will.newton@linaro.org>
5393 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5396 2013-09-06 Pedro Alves <palves@redhat.com>
5398 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5399 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5400 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5401 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5402 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5403 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5405 2013-09-06 Pedro Alves <palves@redhat.com>
5407 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5408 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5410 2013-09-06 Pedro Alves <palves@redhat.com>
5412 * linux-amd64-ipa.c: Include tracepoint.h.
5413 * linux-i386-ipa.c: Include tracepoint.h.
5415 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5417 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5418 (ps_get_thread_area): New function.
5420 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5422 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5423 (initialize_low_arch): Call init_registers_crisv32 rather than
5424 init_register_crisv32.
5426 2013-09-05 Pedro Alves <palves@redhat.com>
5428 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5430 * hostio.h: ... this new file.
5431 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5432 win32-low.c: Include hostio.h.
5434 2013-09-05 Pedro Alves <palves@redhat.com>
5436 * server.h (gdb_client_data, handler_func, callback_handler_func)
5437 (delete_file_handler, add_file_handler, append_callback_event)
5438 (delete_callback_event, start_event_loop, initialize_event_loop):
5439 Move to event-loop.h and include it.
5440 * event-loop.h: New file.
5442 2013-09-05 Pedro Alves <palves@redhat.com>
5444 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5445 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5446 (loaded_dll, unloaded_dll): Move to ...
5447 * dll.h: ... this new file.
5448 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5450 2013-09-05 Pedro Alves <palves@redhat.com>
5452 * server.h (current_process, get_thread_process, all_processes)
5453 (add_inferior_to_list, for_each_inferior, current_inferior)
5454 (remove_inferior, add_process, remove_process, find_process_pid)
5455 (have_started_inferiors_p, have_attached_inferiors_p)
5456 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5457 (clear_inferiors, find_inferior, find_inferior_id)
5458 (inferior_target_data, set_inferior_target_data)
5459 (inferior_regcache_data, set_inferior_regcache_data): Move to
5460 inferiors.h, and include it.
5461 * inferiors.h: New file.
5463 2013-09-05 Pedro Alves <palves@redhat.com>
5465 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5469 2013-09-05 Pedro Alves <palves@redhat.com>
5471 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5473 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5474 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5475 (handle_tracepoint_general_set, handle_tracepoint_query)
5476 (tracepoint_finished_step, tracepoint_was_hit)
5477 (release_while_stepping_state_list, current_traceframe)
5478 (in_readonly_region, traceframe_read_mem)
5479 (fetch_traceframe_registers, traceframe_read_sdata)
5480 (traceframe_read_info, struct fast_tpoint_collect_status)
5481 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5482 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5483 (supply_fast_tracepoint_registers)
5484 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5485 (ipa_tdesc, claim_trampoline_space)
5486 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5487 (agent_mem_read, agent_get_trace_state_variable_value)
5488 (agent_set_trace_state_variable_value, agent_tsv_read)
5489 (agent_mem_read_string, get_raw_reg_func_addr)
5490 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5491 * tracepoint.h: ... this new file.
5493 2013-09-05 Pedro Alves <palves@redhat.com>
5495 * server.h (perror_with_name, error, fatal, warning, paddress)
5496 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5498 * utils.h: New file.
5500 2013-09-05 Pedro Alves <palves@redhat.com>
5502 * server.h (remote_debug, noack_mode, transport_is_reliable)
5503 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5504 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5505 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5506 (write_enn, initialize_async_io, enable_async_io)
5507 (disable_async_io, check_remote_input_interrupt_request)
5508 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5509 (dead_thread_notify, prepare_resume_reply)
5510 (decode_address_to_semicolon, decode_address, decode_m_packet)
5511 (decode_M_packet, decode_X_packet, decode_xfer_write)
5512 (decode_search_memory_packet, unhexify, hexify)
5513 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5514 (look_up_one_symbol, relocate_instruction)
5515 (monitor_output): Move to remote-utils.h, and include it.
5516 * remote-utils.h: New file.
5518 2013-09-05 Pedro Alves <palves@redhat.com>
5520 * server.h (_): Delete.
5522 2013-09-02 Pedro Alves <palves@redhat.com>
5524 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5525 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5527 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5529 2013-09-02 Pierre Muller <muller@sourceware.org>
5531 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5532 or WriteProcessMemory complete successfully and handle
5533 ERROR_PARTIAL_COPY error.
5535 2013-09-02 Pedro Alves <palves@redhat.com>
5537 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5538 error instead of EIO.
5540 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5543 * linux-low.c: Include filestuff.h.
5544 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5545 * lynx-low.c: Include filestuff.h.
5546 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5547 * server.c: Include filestuff.h.
5548 (main): Call notice_open_fds.
5549 * spu-low.c: Include filestuff.h.
5550 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5552 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5554 * Makefile.in: Explain why ../target and ../nat are not
5555 listed as include file search paths.
5556 (linux-waitpid.o): New object file rule.
5557 * configure.srv (srv_native_linux_obj): New variable.
5558 Replace all occurrences of linux native object files with
5559 $srv_native_linux_obj.
5560 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5561 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5562 (linux_enable_event_reporting): Remove declaration.
5563 (my_waitpid): Moved to common/linux-waitpid.c.
5564 (linux_wait_for_event): Pass ptid when calling
5565 linux_enable_event_reporting.
5566 (linux_supports_tracefork_flag): Remove.
5567 (linux_enable_event_reporting): Likewise.
5568 (linux_tracefork_grandchild): Remove.
5569 (STACK_SIZE): Moved to common/linux-ptrace.c.
5570 (linux_tracefork_child): Remove.
5571 (linux_test_for_tracefork): Remove.
5572 (linux_look_up_symbols): Call linux_supports_traceclone.
5573 (initialize_low): Remove call to linux_test_for_tracefork.
5574 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5575 common/linux-ptrace.h.
5576 (PTRACE_TYPE_ARG4): Likewise.
5577 Include linux-ptrace.h.
5579 2013-08-21 Pedro Alves <palves@redhat.com>
5581 * config.in: Renegerate.
5583 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5585 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5586 (SFILES): Remove $(srcdir)/common/target-common.c and
5587 add $(srcdir)/target/waitstatus.c.
5588 (OBS): Remove target-common.o and add waitstatus.o.
5589 (server_h): Remove $(srcdir)/../common/target-common.h and
5590 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5591 and $(srcdir)/../target/waitstatus.h.
5592 (target-common.o): Remove.
5593 (waitstatus.o): New target object file.
5594 * target.h: Do not include target-common.h and
5595 include target/resume.h, target/wait.h and
5596 target/waitstatus.h.
5598 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5600 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5601 to PTRACE_TYPE_ARG3.
5602 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5603 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5605 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5606 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5608 2013-07-27 Jie Zhang <jie@codesourcery.com>
5609 Daniel Jacobowitz <dan@codesourcery.com>
5610 Yao Qi <yao@codesourcery.com>
5612 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5613 (mips-linux-watch.o): New rule.
5614 (mips_linux_watch_h): New variable.
5615 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5617 * linux-mips-low.c: Include mips-linux-watch.h.
5618 (struct arch_process_info, struct arch_lwp_info): New.
5619 (update_watch_registers_callback): New function.
5620 (mips_linux_new_process, mips_linux_new_thread) New functions.
5621 (mips_linux_prepare_to_resume, mips_insert_point): New
5623 (mips_remove_point, mips_stopped_by_watchpoint): New
5625 (rsp_bp_type_to_target_hw_bp_type): New function.
5626 (mips_stopped_data_address): New function.
5627 (the_low_target): Add watchpoint support functions.
5629 2013-07-27 Yao Qi <yao@codesourcery.com>
5631 * i386-low.c: Include break-common.h.
5632 (enum target_hw_bp_type): Remove.
5634 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5636 * Makefile.in (SFILES): /common/target-common.c.
5637 (OBS): Add target-common.o.
5638 (server_h): Add $(srcdir)/../common/target-common.h.
5639 (target-common.o): New target.
5640 * server.c (queue_stop_reply_callback): Free
5641 status string after use.
5642 * target.c (target_waitstatus_to_string): Remove.
5643 * target.h: Include target-common.h.
5644 (resume_kind): Likewise.
5645 (target_waitkind): Likewise.
5646 (target_waitstatus): Likewise.
5647 (TARGET_WNOHANG): Likewise.
5649 2013-07-04 Yao Qi <yao@codesourcery.com>
5651 * Makefile.in (host_alias): Use @host_noncanonical@.
5652 (target_alias): Use @target_noncanonical@.
5653 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5654 ACX_NONCANONICAL_HOST.
5655 * configure: Regenerated.
5658 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5660 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5661 * configure: Rebuild.
5662 * Makefile.in (version_host, version_target): Get from configure.
5663 (version.c): Use $(version_host) and $(version_target).
5665 2013-07-03 Pedro Alves <palves@redhat.com>
5667 * Makefile.in (config.status): Depend on development.sh.
5668 * acinclude.m4: Include libmcheck.m4.
5669 * configure: Regenerate.
5671 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5673 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5674 attribute inside the parentheses.
5675 (winapi_DebugSetProcessKillOnExit): Ditto.
5676 (winapi_DebugBreakProcess): Ditto.
5677 (winapi_GenerateConsoleCtrlEvent): Ditto.
5679 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5681 * notif.h (notif_event): Add a dummy member to avoid compiler
5684 2013-07-01 Pedro Alves <palves@redhat.com>
5686 * hostio.c (HOSTIO_PATH_MAX): Define.
5687 (require_filename, handle_open, handle_unlink, handle_readlink):
5690 2013-07-01 Pedro Alves <palves@redhat.com>
5692 * server.h: Include "pathmax.h".
5693 * linux-low.c: Don't include sys/param.h.
5694 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5696 * win32-low.c: Don't include sys/param.h.
5697 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5699 2013-07-01 Pedro Alves <palves@redhat.com>
5701 * event-loop.c: Don't check HAVE_UNISTD_H before including
5703 * gdbreplay.c: Likewise.
5704 * remote-utils.c: Likewise.
5705 * server.c: Likewise.
5706 * configure.ac: Don't check for unistd.h.
5707 * configure: Regenerate.
5709 2013-06-28 Tom Tromey <tromey@redhat.com>
5711 * Makefile.in (version.c): Use version.in, not
5714 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5716 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5717 * configure: Rebuild.
5718 * Makefile.in (version_host, version_target): Get from configure.
5719 (version.c): Use $(version_host) and $(version_target).
5721 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5723 Fix trace-status to output user name without trailing colon.
5724 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5726 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5728 Fix trace-status to output proper start-time and stop-time.
5729 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5730 output start time and stop time in hex as gdb expects.
5732 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5734 * tracepoint.c (build_traceframe_info_xml): Output trace state
5735 variables present in the trace buffer.
5737 2013-06-24 Tom Tromey <tromey@redhat.com>
5739 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5741 (version.o): Remove.
5742 * gdbreplay.c: Include version.h.
5743 (version, host_name): Don't declare.
5744 * server.h: Include version.h.
5745 (version, host_name): Don't declare.
5747 2013-06-12 Pedro Alves <palves@redhat.com>
5749 * linux-x86-low.c (linux_is_elf64): Delete global.
5750 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5751 with local linux_pid_exe_is_elf_64_file use.
5753 2013-06-11 Pedro Alves <palves@redhat.com>
5755 * linux-low.c (regset_disabled, disable_regset): New functions.
5756 (regsets_fetch_inferior_registers)
5757 (regsets_store_inferior_registers): Use them.
5758 (initialize_regsets_info); Don't allocate the disabled_regsets
5760 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5763 2013-06-11 Pedro Alves <palves@redhat.com>
5765 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5768 2013-06-11 Pedro Alves <palves@redhat.com>
5770 * linux-x86-low.c (initialize_low_arch): Call
5771 init_registers_x32_avx_linux.
5773 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5775 Fix compatibility with Android Bionic.
5776 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5779 2013-06-07 Pedro Alves <palves@redhat.com>
5782 * Makefile.in (OBS): Add tdesc.o.
5783 (IPA_OBJS): Add tdesc-ipa.o.
5784 (tdesc-ipa.o): New rule.
5785 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5787 * linux-low.c (new_inferior): Delete.
5788 (disabled_regsets, num_regsets): Delete.
5789 (linux_add_process): Adjust to set the new per-process
5791 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5792 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5793 was a stop. When calling arch_setup, switch the current inferior
5794 to the thread that got an event.
5795 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5796 (regsets_fetch_inferior_registers)
5797 (regsets_store_inferior_registers): New regsets_info parameter.
5799 (linux_register_in_regsets): New regs_info parameter. Adjust to
5801 (register_addr, fetch_register, store_register): New usrregs_info
5802 parameter. Adjust to use it.
5803 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5804 parameter regs_info. Adjust to use it.
5805 (linux_fetch_registers): Get the current inferior's regs_info, and
5807 (linux_store_registers): Ditto.
5808 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5809 (initialize_low): Don't initialize the target_regsets here. Call
5810 initialize_low_arch.
5811 * linux-low.h (target_regsets): Delete declaration.
5812 (struct regsets_info): New.
5813 (struct usrregs_info): New.
5814 (struct regs_info): New.
5815 (struct process_info_private) <new_inferior>: New field.
5816 (struct linux_target_ops): Delete the num_regs, regmap, and
5817 regset_bitmap fields. New field regs_info.
5818 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5819 * i387-fp.c (num_xmm_registers): Delete.
5820 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5821 calls to new interface.
5822 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5823 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5824 Infer the number of xmm registers from the regcache's target
5826 * i387-fp.h (num_xmm_registers): Delete.
5827 * inferiors.c (add_thread): Don't install the thread's regcache
5829 * proc-service.c (gregset_info): Fetch the current inferior's
5830 regs_info. Adjust to use it.
5831 * regcache.c: Include tdesc.h.
5832 (register_bytes, reg_defs, num_registers)
5833 (gdbserver_expedite_regs): Delete.
5834 (get_thread_regcache): If the thread doesn't have a regcache yet,
5835 create one, instead of aborting gdbserver.
5836 (regcache_invalidate_one): Rename to ...
5837 (regcache_invalidate_thread): ... this.
5838 (regcache_invalidate_one): New.
5839 (regcache_invalidate): Only invalidate registers of the current
5841 (init_register_cache): Add target_desc parameter, and use it.
5842 (new_register_cache): Ditto. Assert the target description has a
5843 non zero registers_size.
5844 (regcache_cpy): Add assertions. Adjust.
5845 (realloc_register_cache, set_register_cache): Delete.
5846 (registers_to_string, registers_from_string): Adjust.
5847 (find_register_by_name, find_regno, find_register_by_number)
5848 (register_cache_size): Add target_desc parameter, and use it.
5849 (free_register_cache_thread, free_register_cache_thread_one)
5850 (regcache_release, register_cache_size): New.
5851 (register_size): Add target_desc parameter, and use it.
5852 (register_data, supply_register, supply_register_zeroed)
5853 (supply_regblock, supply_register_by_name, collect_register)
5854 (collect_register_as_string, collect_register_by_name): Adjust.
5855 * regcache.h (struct target_desc): Forward declare.
5856 (struct regcache) <tdesc>: New field.
5857 (init_register_cache, new_register_cache): Add target_desc
5859 (regcache_invalidate_thread): Declare.
5860 (regcache_invalidate_one): Delete declaration.
5861 (regcache_release): Declare.
5862 (find_register_by_number, register_cache_size, register_size)
5863 (find_regno): Add target_desc parameter.
5864 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5866 * remote-utils.c: Include tdesc.h.
5867 (outreg, prepare_resume_reply): Adjust.
5868 * server.c: Include tdesc.h.
5869 (gdbserver_xmltarget): Delete declaration.
5870 (get_features_xml, process_serial_event): Adjust.
5871 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5873 (struct process_info) <tdesc>: New field.
5874 (ipa_tdesc): Declare.
5875 * tdesc.c: New file.
5876 * tdesc.h: New file.
5877 * tracepoint.c: Include tdesc.h.
5878 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5879 (get_context_regcache): Adjust to pass ipa_tdesc down.
5880 (do_action_at_tracepoint): Adjust to get the register cache size
5881 from the context regcache's description.
5882 (traceframe_walk_blocks): Adjust to get the register cache size
5883 from the current trace frame's description.
5884 (traceframe_get_pc): Adjust to get current trace frame's
5885 description and pass it down.
5886 (gdb_collect): Adjust to get the register cache size from the
5888 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5889 (gdbserver_xmltarget): Delete.
5890 (initialize_low_tracepoint): Set the ipa's target description.
5891 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5892 (initialize_low_tracepoint): Set the ipa's target description.
5893 * linux-x86-low.c: Include tdesc.h.
5894 [__x86_64__] (is_64bit_tdesc): New.
5895 (ps_get_thread_area, x86_get_thread_area): Use it.
5896 (i386_cannot_store_register): Rename to ...
5897 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5898 (i386_cannot_fetch_register): Rename to ...
5899 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5900 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5902 (target_regsets): Rename to ...
5903 (x86_regsets): ... this.
5904 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5906 (x86_siginfo_fixup): Use is_64bit_tdesc.
5907 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5908 (tdesc_x32_avx_linux, tdesc_x32_linux)
5909 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5911 (x86_linux_update_xmltarget): Delete.
5912 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5913 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5914 (AMD64_LINUX_USER64_CS): New.
5915 (x86_linux_read_description): New, based on
5916 x86_linux_update_xmltarget.
5917 (same_process_callback): New.
5918 (x86_arch_setup_process_callback): New.
5919 (x86_linux_update_xmltarget): New.
5920 (x86_regsets_info): New.
5921 (amd64_linux_regs_info): New.
5922 (i386_linux_usrregs_info): New.
5923 (i386_linux_regs_info): New.
5924 (x86_linux_regs_info): New.
5925 (x86_arch_setup): Reimplement.
5926 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5927 (x86_emit_ops): Ditto.
5928 (the_low_target): Adjust. Install x86_linux_regs_info,
5929 x86_cannot_fetch_register, and x86_cannot_store_register.
5930 (initialize_low_arch): New.
5931 * linux-ia64-low.c (tdesc_ia64): Declare.
5932 (ia64_fetch_register): Adjust.
5933 (ia64_usrregs_info, regs_info): New globals.
5934 (ia64_regs_info): New function.
5935 (the_low_target): Adjust.
5936 (initialize_low_arch): New function.
5937 * linux-sparc-low.c (tdesc_sparc64): Declare.
5938 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5940 (sparc_arch_setup): New function.
5941 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5942 (the_low_target): Adjust.
5943 (initialize_low_arch): New function.
5944 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5945 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5946 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5947 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5948 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5949 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5950 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5951 (tdesc_powerpc_isa205_vsx64l): Declare.
5952 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5953 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5954 (ppc_set_pc, ppc_get_hwcap): Adjust.
5955 (ppc_usrregs_info): Forward declare.
5956 (!__powerpc64__) ppc_regmap_adjusted: New global.
5957 (ppc_arch_setup): Adjust to the current process'es target
5959 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5960 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5961 (ppc_store_evrregset): Adjust.
5962 (target_regsets): Rename to ...
5963 (ppc_regsets): ... this, and make static.
5964 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5965 (ppc_regs_info): New function.
5966 (the_low_target): Adjust.
5967 (initialize_low_arch): New function.
5968 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5969 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5970 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5971 (tdesc_s390x_linux64v2): Declare.
5972 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5973 (s390_fill_gregset, s390_store_last_break): Adjust.
5974 (target_regsets): Rename to ...
5975 (s390_regsets): ... this, and make static.
5976 (s390_get_pc, s390_set_pc): Adjust.
5977 (s390_get_hwcap): New target_desc parameter, and use it.
5978 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5979 (s390_arch_setup): Adjust to set the current process'es target
5980 description. Don't adjust the regmap.
5981 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5982 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5983 (regs_info_3264): New globals.
5984 (s390_regs_info): New function.
5985 (the_low_target): Adjust.
5986 (initialize_low_arch): New function.
5987 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5988 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5989 [__mips64] (init_registers_mips_linux)
5990 (init_registers_mips_dsp_linux): Delete defines.
5991 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5992 (have_dsp): New global.
5993 (mips_read_description): New, based on mips_arch_setup.
5994 (mips_arch_setup): Reimplement.
5995 (get_usrregs_info): New function.
5996 (mips_cannot_fetch_register, mips_cannot_store_register)
5997 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5998 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5999 (target_regsets): Rename to ...
6000 (mips_regsets): ... this, and make static.
6001 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6002 (dsp_regs_info, regs_info): New globals.
6003 (mips_regs_info): New function.
6004 (the_low_target): Adjust.
6005 (initialize_low_arch): New function.
6006 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6007 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6009 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6010 (arm_read_description): New, with bits factored from
6012 (arm_arch_setup): Reimplement.
6013 (target_regsets): Rename to ...
6014 (arm_regsets): ... this, and make static.
6015 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6016 (arm_regs_info): New function.
6017 (the_low_target): Adjust.
6018 (initialize_low_arch): New function.
6019 * linux-m68k-low.c (tdesc_m68k): Declare.
6020 (target_regsets): Rename to ...
6021 (m68k_regsets): ... this, and make static.
6022 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6023 (m68k_regs_info): New function.
6024 (m68k_arch_setup): New function.
6025 (the_low_target): Adjust.
6026 (initialize_low_arch): New function.
6027 * linux-sh-low.c (tdesc_sharch): Declare.
6028 (target_regsets): Rename to ...
6029 (sh_regsets): ... this, and make static.
6030 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6031 (sh_regs_info, sh_arch_setup): New functions.
6032 (the_low_target): Adjust.
6033 (initialize_low_arch): New function.
6034 * linux-bfin-low.c (tdesc_bfin): Declare.
6035 (bfin_arch_setup): New function.
6036 (bfin_usrregs_info, regs_info): New globals.
6037 (bfin_regs_info): New function.
6038 (the_low_target): Adjust.
6039 (initialize_low_arch): New function.
6040 * linux-cris-low.c (tdesc_cris): Declare.
6041 (cris_arch_setup): New function.
6042 (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-cris-low.c (tdesc_crisv32): Declare.
6047 (cris_arch_setup): New function.
6048 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6049 (cris_regs_info): New function.
6050 (the_low_target): Adjust.
6051 (initialize_low_arch): New function.
6052 * linux-m32r-low.c (tdesc_m32r): Declare.
6053 (m32r_arch_setup): New function.
6054 (m32r_usrregs_info, regs_info): New globals.
6055 (m32r_regs_info): Adjust.
6056 (initialize_low_arch): New function.
6057 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6058 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6059 (tic6x_usrregs_info): Forward declare.
6060 (tic6x_read_description): New function, based on ...
6061 (tic6x_arch_setup): ... this. Reimplement.
6062 (target_regsets): Rename to ...
6063 (tic6x_regsets): ... this, and make static.
6064 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6065 (tic6x_regs_info): New function.
6066 (the_low_target): Adjust.
6067 (initialize_low_arch): New function.
6068 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6069 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6070 (target_regsets): Rename to ...
6071 (xtensa_regsets): ... this, and make static.
6072 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6074 (xtensa_arch_setup, xtensa_regs_info): New functions.
6075 (the_low_target): Adjust.
6076 (initialize_low_arch): New function.
6077 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6078 (nios2_arch_setup): Set the current process'es tdesc.
6079 (target_regsets): Rename to ...
6080 (nios2_regsets): ... this.
6081 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6082 (nios2_regs_info): New function.
6083 (the_low_target): Adjust.
6084 (initialize_low_arch): New function.
6085 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6086 (aarch64_arch_setup): Set the current process'es tdesc.
6087 (target_regsets): Rename to ...
6088 (aarch64_regsets): ... this.
6089 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6090 (aarch64_regs_info): New function.
6091 (the_low_target): Adjust.
6092 (initialize_low_arch): New function.
6093 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6095 (target_regsets): Rename to ...
6096 (tile_regsets): ... this.
6097 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6098 (tile_regs_info): New function.
6099 (tile_arch_setup): Set the current process'es tdesc.
6100 (the_low_target): Adjust.
6101 (initialize_low_arch): New function.
6102 * spu-low.c (tdesc_spu): Declare.
6103 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6104 * win32-arm-low.c (tdesc_arm): Declare.
6105 (arm_arch_setup): New function.
6106 (the_low_target): Install arm_arch_setup instead of
6108 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6109 (init_windows_x86): Rename to ...
6110 (i386_arch_setup): ... this. Set `win32_tdesc'.
6111 (the_low_target): Adjust.
6112 * win32-low.c (win32_tdesc): New global.
6113 (child_add_thread): Don't create the thread cache here.
6114 (do_initial_child_stuff): Set the new process'es tdesc.
6115 * win32-low.h (struct target_desc): Forward declare.
6116 (win32_tdesc): Declare.
6117 * lynx-i386-low.c (tdesc_i386): Declare global.
6118 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6119 * lynx-low.c (lynx_tdesc): New global.
6120 (lynx_add_process): Set the new process'es tdesc.
6121 * lynx-low.h (struct target_desc): Forward declare.
6122 (lynx_tdesc): Declare global.
6123 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6124 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6125 * nto-low.c (nto_tdesc): New global.
6126 (do_attach): Set the new process'es tdesc.
6127 * nto-low.h (struct target_desc): Forward declare.
6128 (nto_tdesc): Declare.
6129 * nto-x86-low.c (tdesc_i386): Declare.
6130 (nto_x86_arch_setup): Set `nto_tdesc'.
6132 2013-06-04 Gary Benson <gbenson@redhat.com>
6134 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6135 to qSupported response when appropriate.
6136 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6137 with nonzero-length annex.
6138 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6139 arguments supplied in annex.
6141 2013-05-31 Doug Evans <dje@google.com>
6144 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6145 64 bits in 64-cross-32 environment.
6147 2013-05-28 Pedro Alves <palves@redhat.com>
6149 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6150 (aarch64-without-fpu.c): Delete rule.
6151 * configure.srv (aarch64*-*-linux*): Remove references to
6152 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6153 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6156 2013-05-24 Pedro Alves <palves@redhat.com>
6158 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6159 instead of strchr/decode_address. Error if the range isn't split
6160 with a ','. Don't assume there's be a ':' in the action.
6162 2013-05-23 Yao Qi <yao@codesourcery.com>
6163 Pedro Alves <palves@redhat.com>
6165 * linux-low.c (lwp_in_step_range): New function.
6166 (linux_wait_1): If the thread was range stepping and stopped
6167 outside the stepping range, report the stop to GDB. Otherwise,
6168 continue stepping. Add range stepping debug output.
6169 (linux_set_resume_request): Copy the step range from the resume
6171 (linux_supports_range_stepping): New.
6172 (linux_target_ops) <supports_range_stepping>: Set to
6173 linux_supports_range_stepping.
6174 * linux-low.h (struct linux_target_ops)
6175 <supports_range_stepping>: New field.
6176 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6177 * linux-x86-low.c (x86_supports_range_stepping): New.
6178 (the_low_target) <supports_range_stepping>: Set to
6179 x86_supports_range_stepping.
6180 * server.c (handle_v_cont): Handle 'r' action.
6181 (handle_v_requests): Append ";r" if the target supports range
6183 * target.h (struct thread_resume) <step_range_start,
6184 step_range_end>: New fields.
6185 (struct target_ops) <supports_range_stepping>:
6187 (target_supports_range_stepping): New macro.
6189 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6191 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6192 confusion in comment.
6194 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6196 * lynx-low.c (struct process_info_private): New type.
6197 (lynx_add_process): New function.
6198 (lynx_create_inferior, lynx_attach): Replace calls to
6199 add_process by calls to lynx_add_process.
6200 (lynx_resume): If PTID is null, then try using
6201 current_process()->private->last_wait_event_ptid.
6203 (lynx_clear_inferiors): Delete. The contents of that function
6204 has been inlined in lynx_mourn;
6205 (lynx_wait_1): Save the ptid in the process's private data.
6206 (lynx_mourn): Free the process' private data. Replace call
6207 to lynx_clear_inferiors by call to clear_inferiors.
6209 2013-05-17 Yao Qi <yao@codesourcery.com>
6211 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6214 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6216 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6217 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6218 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6219 PT_TEXT_END_ADDR guards. Update comments.
6220 (linux_target_op) <read_offsets>: Conditionally define to
6221 linux_read_offsets if the target is UCLIBC and if it defines
6222 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6224 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6225 Andrew Jenner <andrew@codesourcery.com>
6227 * Makefile.in (SFILES): Add linux-nios2-low.c.
6228 (clean): Add action to delete nios2-linux.c.
6229 (nios2-linux.c): New rule.
6230 * configure.srv: Add nios2*-*-linux*.
6231 * linux-nios2-low.c: New.
6233 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6235 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6237 2013-04-25 Hui Zhu <hui@codesourcery.com>
6240 * ax.c (ax_printf): Add fflush.
6242 2013-04-22 Tom Tromey <tromey@redhat.com>
6244 * Makefile.in (SFILES): Add filestuff.c.
6245 (OBS): Add filestuff.o.
6246 (filestuff.o): New target.
6247 * config.in, configure: Rebuild.
6248 * configure.ac: Check for fdwalk, pipe2.
6250 2013-04-17 Pedro Alves <palves@redhat.com>
6252 * configure.ac (USE_THREAD_DB): Delete variable.
6253 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6254 Don't AC_SUBST USE_THREAD_DB.
6255 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6256 * config.in, configure: Regenerate.
6258 2013-04-16 Pedro Alves <palves@redhat.com>
6260 * linux-low.h (struct lwp_info) <thread_known>: Move under
6261 the USE_THREAD_DB #ifdef.
6263 2013-04-16 Pedro Alves <palves@redhat.com>
6265 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6266 (linux-low.o): Delete rule.
6267 * linux-low.h: Always include "gdb_thread_db.h" instead of
6268 conditionally including thread_db.h.
6269 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6272 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6274 * Makefile.in (install-only): Fix make install regression.
6276 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6278 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6279 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6281 * gdbserver.1: Remove.
6283 2013-03-22 Pedro Alves <palves@redhat.com>
6285 * linux-low.c (handle_extended_wait): Don't call
6286 linux_enable_event_reporting.
6288 2013-03-15 Tony Theodore <tonyt@logyst.com>
6291 * Makefile.in (SHELL): Use @SHELL@.
6293 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6295 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6298 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6300 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6301 Remove extraneous NULL element.
6303 2013-03-13 Yao Qi <yao@codesourcery.com>
6305 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6306 'V' block in trace frame.
6308 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6310 * target.h (struct target_ops): Add btrace ops.
6311 (target_supports_btrace): New macro.
6312 (target_enable_btrace): New macro.
6313 (target_disable_btrace): New macro.
6314 (target_read_btrace): New macro.
6315 * gdbthread.h (struct thread_info): Add btrace field.
6316 * server.c: Include btrace-common.h.
6317 (handle_btrace_general_set): New function.
6318 (handle_btrace_enable): New function.
6319 (handle_btrace_disable): New function.
6320 (handle_general_set): Call handle_btrace_general_set.
6321 (handle_qxfer_btrace): New function.
6322 (struct qxfer qxfer_packets[]): Add btrace entry.
6323 * inferiors.c (remove_thread): Disable btrace.
6324 * linux-low: Include linux-btrace.h.
6325 (linux_low_enable_btrace): New function.
6326 (linux_low_read_btrace): New function.
6327 (linux_target_ops): Add btrace ops.
6328 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6329 Add srv_linux_btrace=yes.
6330 (x86_64-*-linux*): Add linux-btrace.o.
6331 Add srv_linux_btrace=yes.
6332 * configure.ac: Define HAVE_LINUX_BTRACE.
6333 * config.in: Regenerated.
6334 * configure: Regenerated.
6336 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6338 * server.c (handle_qxfer): Preserve error message if -3 is
6340 (qxfer): Document the -3 return value.
6342 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6344 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6345 (linux_btrace_h): New variable.
6346 (linux-btrace.o): New rule.
6348 2013-03-08 Stan Shebs <stan@codesourcery.com>
6349 Hafiz Abid Qadeer <abidh@codesourcery.com>
6351 * tracepoint.c (trace_buffer_size): New global.
6352 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6353 (init_trace_buffer): Change to one-argument function. Allocate
6354 trace buffer memory.
6355 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6356 handle QTBuffer:size packet.
6357 (cmd_bigqtbuffer_size): New function.
6358 (initialize_tracepoint): Call init_trace_buffer with
6359 DEFAULT_TRACE_BUFFER_SIZE.
6360 * server.c (handle_query): Add QTBuffer:size in the
6363 2013-03-07 Yao Qi <yao@codesourcery.com>
6365 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6366 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6368 (cmd_qtsp): Adjust condition. Do post increment.
6369 Set cur_action and cur_step_action back to 0.
6371 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6374 * linux-low.c (linux_write_memory): Return early success if LEN is
6377 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6379 * configure.srv: Add x86_64-*-cygwin* as target.
6381 2013-02-28 Tom Tromey <tromey@redhat.com>
6383 * configure.ac: Invoke AC_SYS_LARGEFILE.
6384 * configure, config.in: Rebuild.
6386 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6388 * win32-low.c: Throughout, fix format strings and casts of
6389 printf-like functions to avoid type related warnings on all
6391 (get_child_debug_event): Print dwDebugEventCode as hex since
6392 that's how it's usually documented.
6394 2013-02-28 Yao Qi <yao@codesourcery.com>
6396 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6399 2013-02-27 Jiong Wang <jiwang@tilera.com>
6401 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6402 (reg-tilegx32.c): New rule.
6403 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6404 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6405 different register info initializer according to elf class.
6406 (init_registers_tilgx32): New function. The tilegx32 register info
6408 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6409 (tile_store_gregset): Likewise.
6411 2013-02-27 Yao Qi <yao@codesourcery.com>
6413 * server.c (process_point_options): Print debug message when
6414 debug_threads is true.
6416 2013-02-26 Yao Qi <yao@codesourcery.com>
6418 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6420 2013-02-19 Pedro Alves <palves@redhat.com>
6421 Kai Tietz <ktietz@redhat.com>
6425 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6426 instead of strtoul to extract address from packet.
6427 (process_serial_event) <'z'>: Likewise.
6429 2013-02-18 Yao Qi <yao@codesourcery.com>
6431 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6433 2013-02-14 Pedro Alves <palves@redhat.com>
6437 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6438 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6440 2013-02-14 Pedro Alves <palves@redhat.com>
6442 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6444 2013-02-14 Pedro Alves <palves@redhat.com>
6446 * tracepoint.c (save_string): Delete.
6447 (add_tracepoint_action): Use savestring instead of save_string.
6449 2013-02-12 Pedro Alves <palves@redhat.com>
6451 * linux-xtensa-low.c: Ditto.
6452 * xtensa-xtregs.c: Ditto.
6454 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6456 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6459 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6461 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6462 aarch64_num_wp_regs and aarch64_num_bp_regs to
6463 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6465 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6467 * linux-aarch64-low.c (ps_get_thread_area): Replace
6468 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6470 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6471 Marcus Shawcroft <marcus.shawcroft@arm.com>
6472 Nigel Stephens <nigel.stephens@arm.com>
6473 Yufeng Zhang <yufeng.zhang@arm.com>
6475 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6476 (aarch64.c, aarch64-without-fpu.c): New targets.
6477 * configure.srv (aarch64*-*-linux*): New.
6478 * linux-aarch64-low.c: New file.
6480 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6482 * linux-low.c (handle_extended_wait, linux_create_inferior)
6483 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6484 (dequeue_one_deferred_signal, linux_resume_one_thread)
6485 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6486 (linux_tracefork_grandchild, linux_test_for_tracefork)
6487 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6488 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6489 where the argument is 0.
6491 2013-01-25 Yao Qi <yao@codesourcery.com>
6493 * event-loop.c: Include "queue.h".
6494 (gdb_event_p): New typedef.
6495 (struct gdb_event) <next_event>: Remove.
6496 (event_queue): Change to QUEUE(gdb_event_p).
6497 (async_queue_event): Remove.
6498 (gdb_event_xfree): New.
6499 (initialize_event_loop): New.
6500 (process_event): Use API from QUEUE.
6501 (wait_for_event): Likewise.
6502 * server.c (main): Call initialize_event_loop.
6503 * server.h (initialize_event_loop): Declare.
6505 2013-01-18 Yao Qi <yao@codesourcery.com>
6507 * ax.h (struct eval_agent_expr_context): New.
6508 (gdb_eval_agent_expr): Update declaration.
6509 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6510 TFRAME. Add new argument CTX.
6511 * server.h (struct eval_agent_expr_context): Declare.
6512 (agent_mem_read, agent_tsv_read): Update declaration.
6513 (agent_mem_read_string): Likewise.
6514 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6515 (add_traceframe_block): Add new argument TPOINT.
6516 Increase TPOINT->traceframe_usage.
6517 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6518 eval_tracepoint_agent_expr.
6519 (condition_true_at_tracepoint): Likewise.
6520 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6521 (agent_mem_read_string, agent_tsv_read): Likewise.
6523 2013-01-16 Yao Qi <yao@codesourcery.com>
6525 * linux-low.c (linux_resume_one_lwp): Don't check
6526 'lwp->bp_reinsert != 0'.
6528 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6529 Pedro Alves <palves@redhat.com>
6531 * lynx-low.c (ptrace_request_to_str): Define a temporary
6532 macro and use it to simplify this function's implementation.
6534 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6536 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6539 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6541 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6543 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6545 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6547 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6549 * lynx-low.c (lynx_resume): Use the resume_info parameter
6550 to determine the ptid for the lynx_ptrace call, unless
6551 it is equal to minus_one_ptid, in which case we use the
6552 ptid of the current_inferior.
6553 (lynx_wait_1): After having received a thread create/exit
6554 event, resume the inferior's execution using the signaling
6555 thread's ptid, rather than the old ptid.
6557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6559 * lynx-low.c (lynx_resume): Delete variable ret.
6561 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6563 * gdbreplay.c (gdbreplay_version): Update copyright year.
6564 * server.c (gdbserver_version): Likewise.
6566 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6568 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6571 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6573 * lynx-low.c (ptrace_request_to_str): Add handling for
6576 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6578 * lynx-low.c (lynx_attach): Delete variable new_process.
6580 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6582 * lynx-low.c (lynx_create_inferior): Delete variable
6585 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6587 * lynx-low.c (ptrace_request_to_str): Do not handle
6588 PTRACE_GETTHREADLIST if this macro does not exist.
6590 2012-12-15 Yao Qi <yao@codesourcery.com>
6592 * Makefile.in (OBS): Add notif.o.
6593 * notif.c, notif.h: New.
6594 * server.c: Include "notif.h".
6595 (struct vstop_notif) <next>: Remove.
6597 (queue_stop_reply): Update.
6598 (push_event, send_next_stop_reply): Remove.
6599 (discard_queued_stop_replies): Update.
6600 (notif_stop): New variable.
6601 (handle_v_stopped): Remove.
6602 (handle_v_requests): Don't call handle_v_stopped. Call
6603 handle_ack_notif instead.
6604 (queue_stop_reply_callback): Call notif_event_enque instead
6605 of queue_stop_reply.
6606 (handle_status): Don't call send_next_stop_reply, call
6607 notif_write_event instead.
6608 (kill_inferior_callback): Likewise.
6609 (detach_or_kill_inferior_callback): Likewise.
6610 (main): Call initialize_notif.
6611 (process_serial_event): Call QUEUE_is_empty.
6612 (handle_target_event): Call notif_push instead of push event.
6613 * server.h (push_event): Remove declaration.
6615 2012-12-10 Tom Tromey <tromey@redhat.com>
6617 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6618 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6621 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6622 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6623 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6624 (amd64-linux-ipa.o, ax.o): Rewrite.
6625 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6626 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6627 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6628 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6629 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6630 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6631 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6632 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6633 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6634 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6635 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6636 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6637 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6638 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6639 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6640 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6641 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6642 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6643 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6644 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6645 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6646 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6647 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6648 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6649 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6650 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6651 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6652 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6653 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6654 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6655 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6656 (reg-tilegx.o): Remove.
6657 (all_object_files): New macro.
6658 Include .deps files.
6659 * aclocal.m4, configure: Rebuild.
6660 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6661 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6662 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6664 2012-12-05 Tom Tromey <tromey@redhat.com>
6667 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6669 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6671 * configure.ac: Check for linux/perf_event.h.
6672 * config.in: Regenerated.
6673 * configure: Regenerated.
6675 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6677 * hostio.c (handle_readlink): Decrease buffer size
6678 parameter passed to readlink by one byte.
6680 2012-11-26 Yao Qi <yao@codesourcery.com>
6682 * configure.ac (build_warnings): Append '-Wempty-body'.
6683 * configure: Regenerated.
6684 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6687 2012-11-15 Pierre Muller <muller@sourceware.org>
6689 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6690 * config.in: Regenerate.
6691 * configure: Regenerate.
6692 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6693 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6694 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6695 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6697 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6698 instead of <sys/wait.h> header.
6699 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6701 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6703 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6704 (various make rules): Remove -DGDBSERVER
6706 2012-11-09 Yao Qi <yao@codesourcery.com>
6708 * spu-low.c (current_ptid): Move it to ..
6709 * gdbthread.h: ... here. New.
6710 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6711 * server.c (myresume, process_serial_event): Likewise.
6712 * thread-db.c (thread_db_find_new_threads): Likewise.
6713 * tracepoint.c (run_inferior_command): Likewise.
6715 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6717 * server.c (handle_search_memory_1): Include access length in
6720 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6722 * linux-crisv32-low.c: Fix compile errors.
6724 2012-09-04 Yao Qi <yao@codesourcery.com>
6726 * tracepoint.c (cmd_qtsv): Adjust debug message.
6727 Don't check CUR_TPOINT.
6729 2012-08-28 Yao Qi <yao@codesourcery.com>
6731 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6732 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6733 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6734 Remove declarations of xmalloc, xreallloc, xstrdup and
6736 * Makefile.in (libiberty_h): New.
6737 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6738 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6740 2012-08-23 Yao Qi <yao@codesourcery.com>
6742 * server.h: Remove declaration of 'xsnprintf'.
6744 2012-08-22 Keith Seitz <keiths@redhat.com>
6746 * server.h: Include build-gnulib-gbserver/config.h.
6747 * gdbreplay.c: Likewise.
6749 2012-08-08 Doug Evans <dje@google.com>
6751 * Makefile.in (SFILES): Add gdb_vecs.c.
6752 (OBS): Add gdb_vecs.o.
6753 (gdb_vecs_h, host_defs_h): New variables.
6754 (thread-db.o): Add $(gdb_vecs_h) dependency.
6755 (gdb_vecs.o): New rule.
6756 * thread-db.c: #include "gdb_vecs.h".
6757 (thread_db_load_search): Use a vector to iterate over path elements.
6758 Handle text appearing after "$pdir".
6760 * configure.ac: Add check for strstr.
6761 * config.in: Regenerate.
6762 * configure: Regenerate.
6764 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6766 * hostio.c (handle_pread): If pread fails, fall back to attempting
6768 (handle_pwrite): Likewise for pwrite.
6770 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6772 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6773 between unsupported TYPE and unimplementable ADDR/LEN combination.
6774 (arm_insert_point): Act on new return value.
6776 2012-07-31 Pedro Alves <palves@redhat.com>
6778 * server.c (process_point_options): Only skip tokens if we find
6779 one that is unrecognized. Don't treat 'X' specially while
6780 skipping unrecognized tokens.
6782 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6784 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6785 to 4-byte-align HW breakpoint addresses for Thumb.
6787 2012-07-27 Yao Qi <yao@codesourcery.com>
6791 * server.h: Declare gdb_agent_about_to_close.
6792 * target.c (kill_inferior): Include "agent.h".
6793 New. Send command 'kill'.
6794 * target.h (kill_inferior): Removed macro.
6795 * tracepoint.c (gdb_agent_about_to_close): New.
6796 (gdb_agent_helper_thread): Handle command 'close'.
6797 Wait endlessly until the inferior stops.
6798 Install gdb_agent_remove_socket to atexit hook.
6799 (agent_socket_name): New static variable.
6800 (gdb_agent_socket_init): Replace local variable 'name' with
6801 'agent_socket_name'.
6802 (gdb_agent_remove_socket): New.
6804 2012-07-27 Yao Qi <yao@codesourcery.com>
6806 * server.c (process_point_options): Stop at 'X' when parsing.
6808 2012-07-19 Michael Eager <eager@eagercon.com>
6810 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6812 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6813 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6814 hardware breakpoint.
6816 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6818 * gdbserver/linux-low.c (initialize_low): Call
6819 linux_ptrace_init_warnings.
6821 2012-07-02 Doug Evans <dje@google.com>
6823 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6826 2012-07-02 Stan Shebs <stan@codesourcery.com>
6828 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6829 (ax.o): Add it to build rule.
6831 (OBS): Add format.o.
6832 (IPA_OBS): Add format.o.
6833 * server.c (handle_query): Claim support for breakpoint commands.
6834 (process_point_options): Add command case.
6835 (process_serial_event): Leave running if there are printfs in
6837 * mem-break.h (any_persistent_commands): Declare.
6838 (add_breakpoint_commands): Declare.
6839 (gdb_no_commands_at_breakpoint): Declare.
6840 (run_breakpoint_commands): Declare.
6841 * mem-break.c (struct point_command_list): New struct.
6842 (struct breakpoint): New field command_list.
6843 (any_persistent_commands): New function.
6844 (add_commands_to_breakpoint): New function.
6845 (add_breakpoint_commands): New function.
6846 (gdb_no_commands_at_breakpoint): New function.
6847 (run_breakpoint_commands): New function.
6848 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6850 * ax.c: Include format.h.
6851 (ax_printf): New function.
6852 (gdb_eval_agent_expr): Add printf opcode.
6854 2012-06-13 Yao Qi <yao@codesourcery.com>
6856 * server.c (start_inferior): Remove duplicated writes to fields
6857 'last_resume_kind' and 'last_status' of 'current_inferior'.
6859 2012-06-12 Yao Qi <yao@codesourcery.com>
6860 Pedro Alves <palves@redhat.com>
6862 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6864 * server.c (handle_v_cont): Extend comment.
6866 2012-06-11 Yao Qi <yao@codesourcery.com>
6868 * linux-low.c (linux_attach): Add 'static'.
6870 2012-06-06 Yao Qi <yao@codesourcery.com>
6872 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6874 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6876 Fix gcc -flto compilation warning.
6877 * server.c (main): Make variable multi_mode and attach volatile.
6879 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6881 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6882 if the platform doesn't know about it.
6884 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6886 * Makefile.in (SFILES): Add linux-tile-low.c.
6887 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6888 * configure.srv: Handle tilegx-*-linux*.
6889 * linux-tile-low.c: New file.
6891 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6893 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6895 2012-05-24 Pedro Alves <palves@redhat.com>
6899 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6901 2012-05-24 Pedro Alves <palves@redhat.com>
6905 Replace target_signal with gdb_signal throughout.
6907 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6909 * linux-low.c (linux_store_registers): Avoid the copying sequence
6910 when no data has been retrieved by ptrace.
6912 2012-05-22 Will Deacon <will.deacon@arm.com>
6914 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6915 Include asm/ptrace.h.
6916 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6919 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6921 * linux-low.c (linux_store_registers): Don't re-retrieve data
6922 with ptrace that has already been obtained from /proc. Always
6923 copy any data retrieved with ptrace to the buffer supplied.
6925 2012-05-11 Yao Qi <yao@codesourcery.com>
6926 Pedro Alves <palves@redhat.com>
6928 * linux-low.c (enum stopping_threads_kind): New.
6929 (stopping_threads): Change type to `enum stopping_threads_kind'.
6930 (handle_extended_wait): If stopping and suspending threads, leave
6931 the new_lwp suspended too.
6932 (linux_wait_for_event): Adjust.
6933 (stop_all_lwps): Set `stopping_threads' to
6934 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6935 whether we're suspending threads or just stopping them. Assert no
6938 2012-04-29 Yao Qi <yao@codesourcery.com>
6940 * server.h: Move some code to ...
6941 * gdbthread.h: ... here. New.
6942 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6943 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6944 (nto-low.o, win32-low.o): Likewise.
6945 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6946 * regcache.c, remote-utils.c, server.c: Likewise.
6947 * target.c, tracepoint.c, win32-low.c: Likewise.
6949 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6951 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6952 (PTRACE_ARG4_TYPE): Likewise.
6953 (PTRACE_XFER_TYPE): Likewise.
6954 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6955 ptrace to PTRACE_ARG3_TYPE.
6956 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6957 (PTRACE_ARG4_TYPE): Likewise.
6958 (PTRACE_XFER_TYPE): Likewise.
6959 (linux_detach_one_lwp): Cast fourth argument of
6960 ptrace to long then PTRACE_ARG4_TYPE.
6961 (regsets_fetch_inferior_registers): Cast third argument of
6962 ptrace to long then PTRACE_ARG3_TYPE.
6963 (regsets_store_inferior_registers): Likewise.
6965 2012-04-20 Pedro Alves <palves@redhat.com>
6967 * configure: Regenerate.
6969 2012-04-19 Pedro Alves <palves@redhat.com>
6971 * Makefile.in (GNULIB_BUILDDIR): New.
6972 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6973 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6974 (all, install-only, uninstall, clean-info, all-lib, clean): No
6975 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6976 (maintainer-clean realclean distclean): Use subdir_do.
6978 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6979 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6980 * acinclude.m4: Include acx_configure_dir.m4.
6981 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6982 calls. Call AC_PROG_RANLIB. Configure gnulib using
6985 (GNULIB_STDINT_H): Adjust.
6986 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6987 * gdbreplay.c: Include build-gnulib/config.h.
6988 * server.h: Likewise.
6989 * aclocal.m4: Regenerate.
6990 * config.in: Regenerate.
6991 * configure: Regenerate.
6993 2012-04-19 Pedro Alves <palves@redhat.com>
6995 * Makefile.in (LIBGNU, INCGNU): Adjust.
6996 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6997 (all, install-only, uninstall, clean-info, all-lib, clean)
6998 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6999 * configure.ac: Adjust AC_OUTPUT output.
7000 * aclocal.m4: Regenerate.
7001 * configure: Regenerate.
7003 2012-04-19 Pedro Alves <palves@redhat.com>
7005 * Makefile.in (generated_files): New.
7006 (server_h): Remove the explicit dependency on config.h, and depend
7007 on $generated_files.
7009 2012-04-19 Pedro Alves <palves@redhat.com>
7011 * Makefile.in (INCGNU): Add -Ignulib.
7013 2012-04-19 Pedro Alves <palves@redhat.com>
7015 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7016 (INCGNU): ... this, and spell out -I here.
7017 (GNULIB_LIB): Rename to ...
7019 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7021 2012-04-19 Pedro Alves <palves@redhat.com>
7023 * config.in: Regenerate.
7025 2012-04-19 Pedro Alves <palves@redhat.com>
7027 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7028 * server.h (memmem): Remove declaration.
7029 * config.in: Regenerate.
7030 * configure: Regenerate.
7032 2012-04-19 Yao Qi <yao@codesourcery.com>
7034 * Makefile.in (SFILES): Add common/vec.c.
7038 2012-04-19 Yao Qi <yao@codesourcery.com>
7040 * remote-utils.c (prepare_resume_reply): Replace with macro
7041 target_core_of_thread.
7042 * server.c (handle_qxfer_threads_proper): Likewise.
7043 * target.h (traget_core_of_thread): New macro.
7045 2012-04-18 Pedro Alves <palves@redhat.com>
7047 * aclocal.m4: Regenerate.
7048 * configure: Regenerate.
7050 2012-04-16 Yao Qi <yao@codesourcery.com>
7052 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7053 duplicated on address.
7055 2012-04-16 Yao Qi <yao@codesourcery.com>
7057 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7058 (struct tracepoint_action_ops) <send>: New field.
7059 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7060 (agent_expr_send, x_tracepoint_action_send): New.
7061 (l_tracepoint_action_send): New.
7062 (cmd_qtdp): Download and install tracepoint
7063 according to `use_agent'.
7064 (run_inferior_command): Add one more parameter `len'.
7066 (tracepoint_send_agent): New.
7067 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7069 2012-04-16 Yao Qi <yao@codesourcery.com>
7071 * tracepoint.c (download_tracepoints): Moved to ...
7072 (cmd_qtstart): ... here.
7074 2012-04-14 Yao Qi <yao@codesourcery.com>
7076 * tracepoint.c: Include inttypes.h.
7077 (struct collect_memory_action): Use sized types.
7078 (struct tracepoint): Likewise.
7079 (cmd_qtdp, stop_tracing): Update print specifiers.
7080 (cmd_qtp, response_tracepoint): Likewise.
7081 (collect_data_at_tracepoint): Likewise.
7082 (collect_data_at_step): Likewise.
7084 2012-04-14 Yao Qi <yao@codesourcery.com>
7086 Import gnulib module inttypes.
7087 * aclocal.m4, config.in, configure: Regenerated.
7089 2012-04-14 Yao Qi <yao@codesourcery.com>
7091 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7092 Makefile and config.status at last.
7094 2012-04-13 Yao Qi <yao@codesourcery.com>
7096 * tracepoint.c: Include stdint.h unconditionally.
7098 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7100 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7101 on BFD_HAVE_SYS_PROCFS_TYPE.
7102 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7103 * configure: Regenerate.
7104 * config.in: Likewise.
7106 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7108 * Makefile.in (clean): Also remove x32.c x32-linux.c
7109 x32-avx.c x32-avx-linux.c.
7110 (x32.o): New target.
7112 (x32-linux.o): Likewise.
7113 (x32-linux.c): Likewise.
7114 (x32-avx.o): Likewise.
7115 (x32-avx.c): Likewise.
7116 (x32-avx-linux.o): Likewise.
7117 (x32-avx-linux.c): Likewise.
7119 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7120 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7121 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7122 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7123 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7124 i386/x32-avx-linux.xml.
7126 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7127 (init_registers_x32_avx_linux): Likwise.
7128 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7129 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7131 2012-04-13 Pedro Alves <palves@redhat.com>
7133 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7134 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7135 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7136 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7139 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7141 * linux-x86-low.c (compat_x32_clock_t): New.
7142 (compat_x32_siginfo_t): Likewise.
7143 (compat_x32_siginfo_from_siginfo): Likewise.
7144 (siginfo_from_compat_x32_siginfo): Likewise.
7145 (linux_is_elf64): Likewise.
7146 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7147 and siginfo_from_compat_x32_siginfo for x32.
7148 (x86_arch_setup): Set linux_is_elf64.
7150 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7153 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7155 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7156 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7157 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7158 compatible with process.
7160 2012-04-12 Yao Qi <yao@codesourcery.com>
7162 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7163 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7164 (install-only, install-info, clean): Handle sub dir gnulib.
7165 (all-lib, am--refresh): New targets.
7166 (memmem.o): Remove target.
7167 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7168 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7169 (AC_REPLACE_FUNCS): Remove memmem.
7170 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7171 (AC_OUTPUT): Generate Makefile in gnulib/.
7172 * aclocal.m4, config.in, configure: Regenerated.
7174 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7176 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7178 2012-04-05 Pedro Alves <palves@redhat.com>
7180 -Werror=strict-aliasing
7182 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7185 2012-04-04 Pedro Alves <palves@redhat.com>
7187 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7188 (sparc_store_gregset_from_stack, sparc_store_gregset)
7189 (sparc_breakpoint_at): Fix formatting.
7191 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7193 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7195 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7196 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7197 * config.in: Regenerate.
7198 * configure: Likewise.
7200 2012-03-29 Pedro Alves <palves@redhat.com>
7202 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7203 Correct ptrace arguments.
7205 2012-03-28 Pedro Alves <palves@redhat.com>
7207 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7208 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7209 (IA64_FR1_REGNUM): New defines.
7210 (ia64_fetch_register): New.
7211 (the_low_target): Install it.
7212 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7214 * linux-low.c (linux_fetch_registers): Try the
7215 the_low_target.fetch_register hook first.
7217 * linux-arm-low.c (the_low_target): Adjust.
7218 * linux-bfin-low.c (the_low_target): Adjust.
7219 * linux-cris-low.c (the_low_target): Adjust.
7220 * linux-crisv32-low.c (the_low_target): Adjust.
7221 * linux-m32r-low.c (the_low_target): Adjust.
7222 * linux-m68k-low.c (the_low_target): Adjust.
7223 * linux-mips-low.c (the_low_target): Adjust.
7224 * linux-ppc-low.c (the_low_target): Adjust.
7225 * linux-s390-low.c (the_low_target): Adjust.
7226 * linux-sh-low.c (the_low_target): Adjust.
7227 * linux-sparc-low.c (the_low_target): Adjust.
7228 * linux-tic6x-low.c (the_low_target): Adjust.
7229 * linux-x86-low.c (the_low_target): Adjust.
7230 * linux-xtensa-low.c (the_low_target): Adjust.
7232 2012-03-26 Pedro Alves <palves@redhat.com>
7234 * server.c (handle_qxfer_libraries): Don't bail early if
7235 the_target->qxfer_libraries_svr4 is not NULL.
7237 2012-03-26 Pedro Alves <palves@redhat.com>
7239 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7241 2012-03-23 Pedro Alves <palves@redhat.com>
7243 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7244 "library-list-svr4" element's start tag when the the DSO list is
7247 2012-03-23 Pedro Alves <palves@redhat.com>
7249 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7250 a variable whose type size is the same as the inferior's pointer
7253 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7255 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7257 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7258 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7259 * linux-low.h: Include <signal.h>.
7260 (struct siginfo): Remove forward declaration.
7261 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7264 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7266 * .gitignore: Ignore more files.
7268 2012-03-19 Pedro Alves <palves@redhat.com>
7269 Jan Kratochvil <jan.kratochvil@redhat.com>
7271 * server.c (cont_thread, general_thread): Add describing comments.
7272 (start_inferior): Clear `cont_thread'.
7273 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7276 2012-03-15 Yao Qi <yao@codesourcery.com>
7278 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7280 (cmd_qtdp): ... here.
7282 2012-03-15 Yao Qi <yao@codesourcery.com>
7284 * tracepoint.c (struct tracepoint_action_ops): New.
7285 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7286 (m_tracepoint_action_download): New.
7287 (r_tracepoint_action_download): New.
7288 (x_tracepoint_action_download): New.
7289 (l_tracepoint_action_download): New.
7290 (add_tracepoint_action): Install `action->ops' according type.
7291 (download_tracepoint_1): Move code `download' function pointer
7292 of various tracepoint_action_ops.
7294 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7296 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7297 linux_ptrace_attach_warnings.
7299 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7301 * Makefile.in (linux-ptrace.o): New.
7302 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7303 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7304 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7305 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7306 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7308 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7310 2012-03-08 Yao Qi <yao@codesourcery.com>
7311 Pedro Alves <palves@redhat.com>
7313 Fix PR server/13392.
7314 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7316 * tracepoint.c (remove_tracepoint): New.
7317 (cmd_qtdp): Call remove_tracepoint when failed to install.
7319 2012-03-07 Pedro Alves <palves@redhat.com>
7321 * linux-low.c (get_detach_signal): New.
7322 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7323 Pass on pending signals to PTRACE_DETACH. Check the result of the
7325 * server.c (program_signals, program_signals_p): New.
7326 (handle_general_set): Handle QProgramSignals.
7327 * server.h (program_signals, program_signals_p): Declare.
7329 2012-03-05 Pedro Alves <palves@redhat.com>
7330 Jan Kratochvil <jan.kratochvil@redhat.com>
7332 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7335 2012-03-03 Yao Qi <yao@codesourcery.com>
7337 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7338 agent_look_up_symbols.
7340 2012-03-03 Yao Qi <yao@codesourcery.com>
7342 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7343 (linux-x86-low.o): Likewise.
7344 * server.h: Remove in_process_agent_loaded.
7345 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7349 2012-03-03 Yao Qi <yao@codesourcery.com>
7351 * tracepoint.c (gdb_agent_capability): New global.
7352 (in_process_agent_loaded_ust): Renamed to
7353 `in_process_agent_supports_ust'.
7355 (in_process_agent_supports_ust): Call agent_capability_check.
7356 (clear_installed_tracepoints): Assert that agent supports
7359 2012-03-03 Yao Qi <yao@codesourcery.com>
7361 * linux-low.c (linux_supports_agent): New.
7362 (linux_target_ops): Initialize field `supports_agent' with
7363 linux_supports_agent.
7364 * target.h (struct target_ops) <supports_agent>: New.
7365 (target_supports_agent): New macro.
7366 * server.c (handle_general_set): Handle packet 'QAgent'.
7367 (handle_query): Send `QAgent+'.
7368 * Makefile.in (server.o): Depends on agent.h.
7370 2012-03-03 Yao Qi <yao@codesourcery.com>
7372 * Makefile.in (OBS): Add agent.o.
7373 Add new rule for agent.o.
7374 Track dependence of tracepoint.c on agent.h.
7375 * tracepoint.c (run_inferior_command_1):
7376 (run_inferior_command): Call agent_run_command.
7377 (gdb_ust_connect_sync_socket): Deleted. Move it to
7379 (resume_thread, stop_thread): Likewise.
7380 (gdb_ust_socket_init): Renamed to ...
7381 (gdb_agent_socket_init): ... New.
7382 (gdb_ust_thread): Renamed to ...
7383 (gdb_agent_helper_thread): ... New.
7384 (gdb_ust_init): Move some code to ...
7385 (gdb_agent_init): ... here. New.
7386 [HAVE_UST]: Call gdb_ust_init.
7387 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7388 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7389 * config.in, configure: Regenerated.
7391 2012-03-02 Pedro Alves <palves@redhat.com>
7393 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7394 * linux-low.c (struct simple_pid_list): New.
7395 (stopped_pids): New a struct simple_pid_list pointer.
7396 (add_to_pid_list, pull_pid_from_list): New.
7397 (handle_extended_wait): Don't assume the first signal new children
7398 report is SIGSTOP. Adjust call to pull_pid_from_list.
7399 (linux_wait_for_lwp): Adjust.
7401 2012-03-02 Yao Qi <yao@codesourcery.com>
7403 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7406 2012-03-02 Yao Qi <yao@codesourcery.com>
7408 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7409 `stop_pc' and `tpoint'. Update caller.
7411 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7413 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7414 * linux-low.c (use_linux_regsets): New macro.
7415 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7416 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7417 (linux_register_in_regsets): New function.
7418 (usr_fetch_inferior_registers): Skip registers covered by
7420 (usr_store_inferior_registers): Likewise.
7421 (usr_fetch_inferior_registers): New macro.
7422 (usr_store_inferior_registers): Likewise.
7423 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7424 (linux_store_registers): Likewise.
7425 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7427 (init_registers_mips64_dsp_linux): Likewise.
7428 (init_registers_mips_linux): New macro.
7429 (init_registers_mips_dsp_linux): Likewise.
7430 (mips_dsp_num_regs): Likewise.
7431 (DSP_BASE, DSP_CONTROL): New fallback macros.
7432 (mips_base_regs): New macro.
7433 (mips_regmap): Use it. Fix the size.
7434 (mips_dsp_regmap): New variable.
7435 (mips_dsp_regset_bitmap): Likewise.
7436 (mips_arch_setup): New function.
7437 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7439 (mips_cannot_store_register): Likewise.
7440 (the_low_target): Update .arch_setup, .num_regs and .regmap
7441 initializers. Add .regset_bitmap initializer.
7442 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7444 * linux-bfin-low.c (the_low_target): Likewise.
7445 * linux-cris-low.c (the_low_target): Likewise.
7446 * linux-crisv32-low.c (the_low_target): Likewise.
7447 * linux-ia64-low.c (the_low_target): Likewise.
7448 * linux-m32r-low.c (the_low_target): Likewise.
7449 * linux-m68k-low.c (the_low_target): Likewise.
7450 * linux-ppc-low.c (the_low_target): Likewise.
7451 * linux-s390-low.c (the_low_target): Likewise.
7452 * linux-sh-low.c (the_low_target): Likewise.
7453 * linux-sparc-low.c (the_low_target): Likewise.
7454 * linux-tic6x-low.c (the_low_target): Likewise.
7455 * linux-x86-low.c (the_low_target): Likewise.
7456 * linux-xtensa-low.c (the_low_target): Likewise.
7457 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7458 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7459 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7461 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7462 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7464 2012-02-29 Yao Qi <yao@codesourcery.com>
7465 Pedro Alves <palves@redhat.com>
7467 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7468 `step_over_finished' is true.
7470 2012-02-27 Pedro Alves <palves@redhat.com>
7472 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7473 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7475 2012-02-27 Pedro Alves <palves@redhat.com>
7478 * linux-low.c (pid_is_stopped): New.
7479 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7481 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7483 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7486 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7488 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7490 2012-02-24 Luis Machado <lgustavo@codesourcery>
7492 * server.c (handle_query): Advertise support for target-side
7493 breakpoint condition evaluation.
7494 (process_point_options): New function.
7495 (process_serial_event): When inserting a breakpoint, check for
7496 a target-side condition that should be evaluated.
7498 * mem-break.c: Include regcache.h and ax.h.
7499 (point_cond_list_t): New data structure.
7500 (breakpoint) <cond_list>: New field.
7501 (find_gdb_breakpoint_at): Make non-static.
7502 (delete_gdb_breakpoint_at): Clear any target-side
7504 (clear_gdb_breakpoint_conditions): New function.
7505 (add_condition_to_breakpoint): Likewise.
7506 (add_breakpoint_condition): Likewise.
7507 (gdb_condition_true_at_breakpoint): Likewise.
7508 (gdb_breakpoint_here): Return result directly instead
7509 of going through a local variable.
7511 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7512 (clear_gdb_breakpoint_conditions): Likewise.
7513 (add_breakpoint_condition): Likewise.
7514 (gdb_condition_true_at_breakpoint): Likewise.
7516 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7517 (need_step_over_p): Take target-side breakpoint condition into
7520 2012-02-24 Luis Machado <lgustavo@codesourcery>
7522 * server.h: Include tracepoint.h.
7523 (agent_mem_read, agent_get_trace_state_variable_value,
7524 agent_set_trace_state_variable_value,
7525 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7526 get_set_tsv_func_addr): New prototypes.
7528 * ax.h: New include file.
7529 * ax.c: New source file.
7531 * tracepoint.c: Include ax.h.
7532 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7533 agent_expr, eval_result_type): Move to ax.h.
7534 (parse_agent_expr): Rename to ...
7535 (gdb_parse_agent_expr): ... this, make it non-static and move
7537 (unparse_agent_expr) Rename to ...
7538 (gdb_unparse_agent_expr): ... this, make it non-static and move
7540 (eval_agent_expr): Rename to ...
7541 (eval_tracepoint_agent_expr): ... this.
7542 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7543 forward declarations.
7544 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7545 (agent_get_trace_state_variable_value): New function.
7546 (agent_set_trace_state_variable_value): New function.
7547 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7548 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7549 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7550 (condition_true_at_tracepoint): Likewise.
7551 (parse_agent_expr): Rename to ...
7552 (gdb_parse_agent_expr): ... this and move to ax.c.
7553 (unparse_agent_expr): Rename to ...
7554 (gdb_unparse_agent_expr): ... this and move to ax.c.
7555 (gdb_agent_op_name): Move to ax.c.
7556 (eval_agent_expr): Rename to ...
7557 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7559 (eval_tracepoint_agent_expr): New function.
7560 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7562 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7564 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7565 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7566 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7567 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7568 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7569 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7570 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7571 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7572 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7573 (compile_bytecodes): Remove forward declaration.
7574 (is_goto_target): Move to ax.c.
7575 (compile_bytecodes): Move to ax.c and call
7576 agent_get_trace_state_variable_value (...) and
7577 agent_set_trace_state_variable_value (...).
7579 * Makefile.in: Update ax.c and IPA dependencies.
7581 2012-02-24 Pedro Alves <palves@redhat.com>
7583 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7584 (cmd_bigqtbuffer_circular): ... this. Only handle
7585 'QTBuffer:circular:'.
7586 (handle_tracepoint_general_set): Adjust.
7588 2012-02-16 Yao Qi <yao@codesourcery.com>
7590 * inferiors.c: Move code to ...
7591 * dll.c: .... here. New.
7592 * server.h: Declare clear_dlls.
7593 * Makefile.in (SFILES): Add dll.c.
7597 2012-02-11 Yao Qi <yao@codesourcery.com>
7599 * server.c: (handle_monitor_command): Add a new parameter
7601 (handle_query): Update caller.
7603 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7605 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7606 * configure, config.in: Regenerate.
7607 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7610 2012-02-02 Pedro Alves <palves@redhat.com>
7612 Try SIGKILL first, then PTRACE_KILL.
7613 * linux-low.c (linux_kill_one_lwp): New.
7614 (linux_kill_one_lwp): Rename to ...
7615 (kill_one_lwp_callback): ... this. Use the new
7618 2012-02-02 Pedro Alves <palves@redhat.com>
7620 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7623 2012-01-27 Pedro Alves <palves@redhat.com>
7625 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7626 (elf_64_file_p): Make static.
7627 (linux_pid_exe_is_elf_64_file): New.
7628 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7629 Delete declarations.
7630 (linux_pid_exe_is_elf_64_file): Declare.
7631 * linux-x86-low.c (x86_arch_setup): Use
7632 linux_pid_exe_is_elf_64_file.
7634 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7636 * linux-low.c (linux_wait_for_event_1): Rename to ...
7637 (linux_wait_for_event): ... here and merge it with former
7638 linux_wait_for_event - new variable wait_ptid, use it.
7639 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7641 2012-01-23 Pedro Alves <palves@redhat.com>
7643 * server.c (main): Avoid yet another case of infinite loop while
7644 detaching/killing after a longjmp.
7646 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7649 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7651 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7653 * hostio.c (handle_readlink): New function.
7654 (handle_vFile): Call it to handle "vFile:readlink" packets.
7656 2012-01-20 Pedro Alves <palves@redhat.com>
7657 Ulrich Weigand <ulrich.weigand@linaro.org>
7659 * server.c (handle_v_requests): Only support vAttach and vRun to
7660 start multiple processes when in extended protocol mode.
7662 2012-01-17 Pedro Alves <palves@redhat.com>
7664 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7665 memalign plus mprotect to allocate the scratch buffer.
7667 2012-01-13 Pedro Alves <palves@redhat.com>
7669 * server.c (attach_inferior): Clear `cont_thread'.
7671 2012-01-13 Pedro Alves <palves@redhat.com>
7673 * server.c (main): Avoid infinite loop while detaching/killing
7676 2012-01-09 Doug Evans <dje@google.com>
7678 * server.c (start_inferior): Set last_ptid in --wrapper case.
7680 2012-01-06 Yao Qi <yao@codesourcery.com>
7682 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7684 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7686 2012-01-04 Yao Qi <yao@codesourcery.com>
7688 * tracepoint.c (cmd_qtdp): Print debug message
7689 for static tracepoint.
7691 2012-01-04 Yao Qi <yao@codesourcery.com>
7693 * tracepoint.c (trace_vdebug): Differentiate debug message
7694 between gdbserver and IPA.
7696 2012-01-03 Yao Qi <yao@codesourcery.com>
7698 * tracepoint.c (tracepoint_was_hit): Don't collect for
7701 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7703 * terminal.h: Reformat copyright header.
7705 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7707 * server.c (gdbserver_version): Update copyright year.
7708 * gdbreplay.c (gdbreplay_version): Likewise.
7710 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7712 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7715 2011-12-18 Hui Zhu <teawater@gmail.com>
7716 * linux-low.c (linux_create_inferior): Save return value to ret.
7718 2011-12-18 Hui Zhu <teawater@gmail.com>
7720 * linux-low.c (linux_create_inferior): Save return value to ret.
7722 2011-12-16 Doug Evans <dje@google.com>
7724 * linux-low.c (linux_create_inferior): If stdio connection,
7725 redirect stdin from /dev/null, stdout to stderr.
7726 * remote-utils.c (remote_is_stdio): New static global.
7727 (remote_connection_is_stdio): New function.
7728 (remote_prepare): Handle stdio connection.
7729 (remote_open): Ditto.
7730 (remote_close): Don't close stdin for stdio connections.
7731 (read_prim,write_prim): New functions. Replace all calls to
7732 read/write to these.
7733 * server.c (main): Watch for "-" argument. Move call to
7734 remote_prepare before start_inferior.
7735 * server.h (STDIO_CONNECTION_NAME): New macro.
7736 (remote_connection_is_stdio): Declare.
7738 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7739 in debugging output.
7741 2011-12-15 Yao Qi <yao@codesourcery.com>
7743 * tracepoint.c: Include sys/syscall.h.
7744 (gdb_ust_thread): Remove preprocessor conditional.
7746 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7748 * linux-low.c (linux_detach_one_lwp): Call
7749 the_low_target.prepare_to_resume before detaching.
7751 2011-12-14 Yao Qi <yao@codesourcery.com>
7753 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7756 2011-12-14 Yao Qi <yao@codesourcery.com>
7758 * i386-low.c (i386_low_stopped_data_address): Initialize local
7761 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7765 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7766 DR_CONTROL unless necessary. Extend comments.
7767 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7768 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7770 2011-12-13 Yao Qi <yao@codesourcery.com>
7772 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7774 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7776 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7778 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7779 Print new debug message for such case.
7781 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7783 Fix overlapping memcpy.
7784 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7785 the read_inferior_memory transfer.
7786 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7787 write_inferior_memory transfer.
7788 (set_fast_tracepoint_jump): New variable buf. Use it for the
7789 read_inferior_memory and write_inferior_memory transfers.
7790 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7791 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7792 Use it for the write_inferior_memory transfer.
7793 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7796 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7798 * linux-low.c (fetch_register, store_register): Make code
7799 consistent, fix formatting.
7801 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7803 * linux-low.c (usr_store_inferior_registers): Factor out code
7804 to handle individual registers into...
7805 (store_register): ... this new function.
7807 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7809 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7810 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7811 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7812 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7813 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7814 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7815 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7816 (srv_xmlfiles): Add new XML files.
7818 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7820 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7821 (init_registers_s390_linux32v1): Add prototype.
7822 (init_registers_s390_linux32v2): Likewise.
7823 (init_registers_s390_linux64v1): Likewise.
7824 (init_registers_s390_linux64v2): Likewise.
7825 (init_registers_s390x_linux64v1): Likewise.
7826 (init_registers_s390x_linux64v2): Likewise.
7827 (s390_num_regs): Increment to 52.
7828 (s390_regmap): Add orig_r2 register.
7829 (s390_num_regs_3264): Increment to 68.
7830 (s390_regmap_3264): Add orig_r2 register.
7831 (s390_collect_ptrace_register): Handle orig_r2 register.
7832 (s390_supply_ptrace_register): Likewise.
7833 (s390_fill_last_break): New function.
7834 (s390_store_last_break): Likewise.
7835 (s390_fill_system_call): New function.
7836 (s390_store_system_call): Likewise.
7837 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7839 (s390_check_regset): New function.
7840 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7841 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7842 Update target_regsets for available register sets.
7844 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7845 Jan Kratochvil <jan.kratochvil@redhat.com>
7847 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7848 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7850 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7851 * linux-low.h (struct process_info_private): New member r_debug.
7852 * server.c (handle_qxfer_libraries): Call
7853 the_target->qxfer_libraries_svr4.
7854 (handle_qxfer_libraries_svr4): New function.
7855 (qxfer_packets): New entry "libraries-svr4".
7856 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7857 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7858 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7859 PACKET_qXfer_libraries_svr4.
7861 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7863 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7864 PSW address/mask between 8-byte and 16-byte formats.
7865 (s390_supply_ptrace_register): Likewise.
7866 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7867 basic addressing mode bit.
7869 2011-11-24 Stan Shebs <stan@codesourcery.com>
7871 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7873 2011-11-17 Stan Shebs <stan@codesourcery.com>
7875 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7876 (tracing_start_time): New global.
7877 (tracing_stop_time): New global.
7878 (tracing_user_name): New global.
7879 (tracing_notes): New global.
7880 (tracing_stop_note): New global.
7881 (cmd_qtstart): Set traceframe_usage, start_time.
7882 (stop_tracing): Set stop_time.
7883 (cmd_qtstatus): Report additional status.
7884 (cmd_qtp): New function.
7885 (handle_tracepoint_query): Call it.
7886 (cmd_qtnotes): New function.
7887 (handle_tracepoint_general_set): Call it.
7888 (get_timestamp): Rename from tsv_get_timestamp.
7890 2011-11-14 Stan Shebs <stan@codesourcery.com>
7891 Kwok Cheung Yeung <kcy@codesourcery.com>
7893 * linux-x86-low.c (small_jump_insn): New.
7894 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7895 trampoline and error message, build a trampoline and issue a small
7896 jump instruction to it.
7897 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7898 trampoline and error message.
7899 (x86_get_min_fast_tracepoint_insn_len): New.
7900 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7901 * linux-low.h (struct linux_target_ops): Add arguments to
7902 install_fast_tracepoint_jump_pad operation, add new operation.
7903 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7905 (linux_get_min_fast_tracepoint_insn_len): New function.
7906 (linux_target_op): Add new operation.
7907 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7908 (gdb_trampoline_buffer_end): Ditto.
7909 (gdb_trampoline_buffer_error): Ditto.
7910 (struct ipa_sym_addresses): Add fields for new IPA variables.
7911 (symbol_list): Add entries for new IPA variables.
7912 (struct tracepoint): Add fields to hold the address range of the
7913 trampoline used by the tracepoint.
7914 (trampoline_buffer_head): New static variable.
7915 (trampoline_buffer_tail): Ditto.
7916 (claim_trampoline_space): New function.
7917 (have_fast_tracepoint_trampoline_buffer): New function.
7918 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7920 (install_fast_tracepoint): Ditto, also add error buffer argument.
7921 (cmd_qtminftpilen): New function.
7922 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7923 (fast_tracepoint_from_trampoline_address): New function.
7924 (fast_tracepoint_collecting): Handle trampoline as part of jump
7926 (set_trampoline_buffer_space): New function.
7927 (initialize_tracepoint): Initialize new IPA variables.
7928 * target.h (struct target_ops): Add arguments to
7929 install_fast_tracepoint_jump_pad operation, add new
7930 get_min_fast_tracepoint_insn_len operation.
7931 (target_get_min_fast_tracepoint_insn_len): New.
7932 (install_fast_tracepoint_jump_pad): Add arguments.
7933 * server.h (IPA_BUFSIZ): Define.
7934 * linux-i386-ipa.c: Include extra header files.
7935 (initialize_fast_tracepoint_trampoline_buffer): New function.
7936 (initialize_low_tracepoint): Call it.
7937 * server.h (set_trampoline_buffer_space): Declare.
7938 (claim_trampoline_space): Ditto.
7939 (have_fast_tracepoint_trampoline_buffer): Ditto.
7941 2011-11-14 Yao Qi <yao@codesourcery.com>
7943 * server.c (handle_query): Handle InstallInTrace for qSupported.
7944 * tracepoint.c (add_tracepoint): Sort list.
7945 (install_tracepoint, download_tracepoint): New.
7946 (cmd_qtdp): Call them to install and download tracepoints.
7947 (sort_tracepoints): Removed.
7948 (cmd_qtstart): Update.
7950 2011-11-14 Yao Qi <yao@codesourcery.com>
7952 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7953 * mem-break.h: Declare.
7954 * tracepoint.c (cmd_qtstart): Move some code to ...
7955 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7957 (download_tracepoints): Move some code to ...
7958 (download_tracepoint_1): ... here. New.
7960 2011-11-08 Yao Qi <yao@codesourcery.com>
7962 * remote-utils.c (relocate_instruction): A comment fix.
7964 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7966 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7967 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7968 dr_status_mirror and dr_control_mirror from debug_reg_state.
7969 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7970 (i386_initial_stuff): Remove use of deleted globals.
7971 (i386_get_thread_context, i386_set_thread_context,
7972 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7973 from debug_reg_state.
7975 2011-11-05 Yao Qi <yao@codesourcery.com>
7977 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7978 address as TPOINT's.
7980 2011-11-02 Stan Shebs <stan@codesourcery.com>
7982 * tracepoint.c (agent_mem_read_string): New function.
7983 (eval_agent_expr): Call it for tracenz.
7984 * server.c (handle_query): Report support for tracenz.
7986 2011-11-02 Yao Qi <yao@codesourcery.com>
7988 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7990 2011-11-02 Yao Qi <yao@codesourcery.com>
7992 * target.h: Fix a typo in comment.
7994 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7996 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7997 clobber the breakpoints' shadows with fast tracepoint jumps.
7998 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7999 * target.c (write_inferior_memory): Also pass MYADDR down to
8002 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8004 * configure.ac: Check support for personality routine.
8005 * configure: Regenerate.
8006 * config.in: Likewise.
8007 * linux-low.c: Include <sys/personality.h>.
8008 Define ADDR_NO_RANDOMIZE if necessary.
8009 (linux_create_inferior): Disable address space randomization when
8010 forking inferior, if requested.
8011 (linux_supports_disable_randomization): New function.
8012 (linux_target_ops): Install it.
8013 * server.h (disable_randomization): Declare.
8014 * server.c (disable_randomization): New global variable.
8015 (handle_general_set): Handle QDisableRandomization.
8016 (handle_query): Likewise for qSupported.
8017 (main): Support --disable-randomization and --no-disable-randomization
8018 command line arguments.
8019 * target.h (struct target_ops): Add supports_disable_randomization.
8020 (target_supports_disable_randomization): New macro.
8022 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8024 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8026 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8027 [!PT_GETDSBT] (target_loadmap): New definition.
8028 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8029 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8030 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8031 and PT_GETDSBT to LINUX_LOADMAP.
8032 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8033 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8035 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8037 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8038 (arm_linux_hwbp_cap): New static variable.
8039 (arm_linux_get_hwbp_cap): Replace by ...
8040 (arm_linux_init_hwbp_cap): ... this new function.
8041 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8042 (arm_linux_get_hw_watchpoint_count): Likewise.
8043 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8044 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8045 (arm_prepare_to_resume): Use perror_with_name instead of error.
8047 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8049 * linux-arm-low.c: Include <signal.h>.
8050 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8051 (struct arm_linux_hwbp_cap): New data type.
8052 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8053 (struct arm_linux_hw_breakpoint): New data type.
8054 (MAX_BPTS, MAX_WPTS): Define.
8055 (struct arch_process_info, struct arch_lwp_info): New data types.
8056 (arm_linux_get_hwbp_cap): New function.
8057 (arm_linux_get_hw_breakpoint_count): Likewise.
8058 (arm_linux_get_hw_watchpoint_count): Likewise.
8059 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8060 (arm_hwbp_control_initialize): Likewise.
8061 (arm_hwbp_control_is_enabled): Likewise.
8062 (arm_hwbp_control_is_initialized): Likewise.
8063 (arm_hwbp_control_disable): Likewise.
8064 (arm_linux_hw_breakpoint_equal): Likewise.
8065 (arm_linux_hw_point_initialize): Likewise.
8066 (struct update_registers_data): New data structure.
8067 (update_registers_callback: New function.
8068 (arm_insert_point): Likewise.
8069 (arm_remove_point): Likewise.
8070 (arm_stopped_by_watchpoint): Likewise.
8071 (arm_stopped_data_address): Likewise.
8072 (arm_new_process): Likewise.
8073 (arm_new_thread): Likewise.
8074 (arm_prepare_to_resume): Likewise.
8075 (the_low_target): Register arm_insert_point, arm_remove_point,
8076 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8077 arm_new_thread, and arm_prepare_to_resume.
8079 2011-09-15 Stan Shebs <stan@codesourcery.com>
8081 * server.h (struct emit_ops): Add compare-goto fields.
8082 * tracepoint.c (gdb_agent_op_sizes): New table.
8083 (emit_eq_goto): New function.
8084 (emit_ne_goto): New function.
8085 (emit_lt_goto): New function.
8086 (emit_le_goto): New function.
8087 (emit_gt_goto): New function.
8088 (emit_ge_goto): New function.
8089 (is_goto_target): New function.
8090 (compile_bytecodes): Recognize special cases of compare-goto
8091 combinations and call specialized emitters for them.
8092 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8093 (amd64_emit_ne_goto): New function.
8094 (amd64_emit_lt_goto): New function.
8095 (amd64_emit_le_goto): New function.
8096 (amd64_emit_gt_goto): New function.
8097 (amd64_emit_ge_goto): New function.
8098 (amd64_emit_ops): Add the new functions.
8099 (i386_emit_eq_goto): New function.
8100 (i386_emit_ne_goto): New function.
8101 (i386_emit_lt_goto): New function.
8102 (i386_emit_le_goto): New function.
8103 (i386_emit_gt_goto): New function.
8104 (i386_emit_ge_goto): New function.
8105 (i386_emit_ops): Add the new functions.
8107 2011-09-08 Stan Shebs <stan@codesourcery.com>
8109 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8110 (i386_emit_epilogue): Restore %ebx.
8112 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8114 * server.c (step_thread): Remove definition.
8115 (process_serial_event): Don't handle Hs.
8116 * server.h (step_thread): Remove declaration.
8117 * target.c (set_desired_inferior): Remove use of step_thread.
8119 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8121 * linux-low.c: Include linux-procfs.h.
8122 (linux_attach_lwp_1): Update comments.
8123 (linux_attach): Scan for existing threads when attaching to a
8124 process that is the tgid.
8125 * Makefile.in: Update dependencies.
8127 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8129 * configure.srv: Add linux-procfs.o dependencies.
8131 2011-08-14 Yao Qi <yao@codesourcery.com>
8133 * target.h (struct target_ops): Fix indent.
8134 * win32-low.c (win32_target_ops): Fix comment.
8136 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8137 Yao Qi <yao@codesourcery.com>
8139 * Makefile.in (clean): Remove tic6x-*.c files.
8140 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8141 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8142 (tic6x-c64xp-linux.c): Likewise.
8143 * configure.srv: Add support for tic6x-*-uclinux.
8144 * linux-tic6x-low.c: New.
8145 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8147 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8148 Yao Qi <yao@codesourcery.com>
8150 * target.h (struct target_ops): Add read_loadmap.
8151 * linux-low.c (struct target_loadseg): New type.
8152 (struct target_loadmap): New type.
8153 (linux_read_loadmap): New function.
8154 (linux_target_ops): Add linux_read_loadmap.
8155 * server.c (handle_query): Support qXfer:fdpic:read packet.
8156 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8159 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8161 * win32-low.c: Include <stdint.h>.
8163 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8165 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8166 to the inferior here.
8167 (i386_remove_aligned_watchpoint): Ditto.
8168 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8169 fit part of the watchpoint in the debug registers.
8170 (i386_update_inferior_debug_regs): New.
8171 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8172 registers, and only update the inferior on success.
8173 (i386_low_remove_watchpoint): Ditto.
8175 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8177 * linux-low.c (compare_ints, unique, list_threads, show_process,
8178 linux_core_of_thread): Delete.
8179 (linux_target_ops): Change linux_core_of_thread to
8180 linux_common_core_of_thread.
8181 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8182 * utils.c (malloc_failure): Change type of argument.
8183 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8184 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8185 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8186 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8187 (IPA_OBJS): Add common-utils-ipa.o.
8188 (ptid_h, linux_osdata_h): New macros.
8189 (server_h): Add common/common-utils.h, common/xml-utils.h,
8190 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8192 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8193 ptid.o, buffer.o): New rules.
8194 (linux-low.o): Add common/linux-osdata.h as a dependency.
8195 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8196 * configure.ac: Add AC_HEADER_DIRENT check.
8197 * config.in: Regenerate.
8198 * configure: Regenerate.
8199 * remote-utils.c (xml_escape_text): Delete.
8200 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8201 buffer_xml_printf): Move to common/buffer.c.
8202 * server.c (main): Remove call to initialize_inferiors.
8203 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8204 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8205 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8206 internal_error, gdb_assert, gdb_assert_fail): Delete.
8207 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8208 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8210 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8211 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8212 initialize_inferiors): Delete.
8214 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8216 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8219 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8221 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8223 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8225 2011-05-26 Yao Qi <yao@codesourcery.com>
8227 * Makefile.in (thread-db.o): Track dependence to
8228 common/gdb_thread_db.h.
8229 * thread-db.c: include gdb_thread_db.h from right place.
8231 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8233 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8234 __FILE__ and __LINE__ to internal_error.
8236 2011-05-13 Doug Evans <dje@google.com>
8238 * thread-db.c (try_thread_db_load_from_sdir): New function.
8239 (try_thread_db_load_from_dir): New function.
8240 (thread_db_load_search): Handle $sdir, ignore $pdir.
8241 Remove trying of system directories if search of
8242 libthread-db-search-path fails, that is now done via $sdir.
8244 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8246 * server.c (handle_query): Add EnableDisableTracepoints to the list
8247 of supported features.
8248 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8250 (cmd_qtenable_disable): New.
8251 (cmd_qtstart): Install tracepoints even if disabled.
8252 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8253 receiving a QTEnable or QTDisable packet.
8254 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8255 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8257 (gdb_probe): Skip data collection if static tracepoint is disabled.
8259 2011-05-10 Doug Evans <dje@google.com>
8261 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8263 2011-05-04 Doug Evans <dje@google.com>
8265 * linux-low.c (linux_join): Skip process lookup.
8266 * spu-low.c (spu_join): Ditto.
8267 * server.c (join_inferiors_callback): Delete.
8268 (process_serial_event): For 'D' packet (detach) call join_inferior
8271 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8273 * README: Don't mention xscale*-*-linux*.
8274 * configure.srv (xscale*-*-linux*): Don't handle target.
8276 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8278 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8280 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8281 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8282 (i386_emit_void_call_2): Likewise.
8284 2011-04-26 Yao Qi <yao@codesourcery.com>
8286 * linux-low.c: Move common macros to linux-ptrace.h.
8287 Include linux-ptrace.h.
8288 * Makefile.in (linux_ptrace_h): New.
8289 (linux-low.o): Depends on linux-ptrace.h.
8291 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8293 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8294 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8295 (remote_prepare): New function with most of the TCP code from ...
8296 (remote_open): ... here. Detect PORT here unconditionally. Move also
8297 setting transport_is_reliable.
8298 * server.c (run_once): New variable.
8299 (gdbserver_usage): Document it.
8300 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8301 the first run if RUN_ONCE.
8302 * server.h (run_once, remote_prepare): New declarations.
8304 2011-04-19 Tom Tromey <tromey@redhat.com>
8306 * win32-low.c (handle_load_dll): Remove duplicate "the".
8308 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8310 Remove support for old Cygwin 1.5 versions.
8311 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8312 function to avoid warning.
8313 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8316 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8318 * gdbserver/server.h (Macro _): Define it if not available.
8320 2011-03-14 Michael Snyder <msnyder@vmware.com>
8322 * hostio.c (handle_close): Remove unnecessary null test.
8324 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8326 * Makefile.in (maintainer-clean realclean distclean): Remove
8327 "make ... subdir_do" command.
8329 2011-03-10 Michael Snyder <msnyder@vmware.com>
8331 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8333 * server.c (handle_v_run): Free alloced buffer on early return.
8335 2011-03-09 Yao Qi <yao@codesourcery.com>
8338 2011-03-04 Yao Qi <yao@codesourcery.com>
8340 * Makefile.in: Remove GNU make feature --directory.
8342 2011-03-05 Yao Qi <yao@codesourcery.com>
8344 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8345 (subdir_do): New make target. Copied from gdb/Makefile.
8346 (maintainer-clean, realclean, distclean, clean): Call corresponding
8347 make targets in common/Makefile.
8349 2011-02-11 Yao Qi <yao@codesourcery.com>
8351 * configure.ac: Call AC_PROG_RANLIB.
8352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8353 * configure: Regenerate.
8355 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8357 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8359 2011-03-06 Yao Qi <yao@codesourcery.com>
8361 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8363 2011-03-05 Yao Qi <yao@codesourcery.com>
8365 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8366 (subdir_do): New make target. Copied from gdb/Makefile.
8367 (maintainer-clean, realclean, distclean, clean): Call corresponding
8368 make targets in common/Makefile.
8370 2011-03-04 Yao Qi <yao@codesourcery.com>
8372 * Makefile.in: Remove GNU make feature --directory.
8374 2011-03-04 Michael Snyder <msnyder@vmware.com>
8376 * server.c (queue_stop_reply): Call xmalloc not malloc.
8378 2011-03-02 Michael Snyder <msnyder@vmware.com>
8380 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8382 2011-02-28 Michael Snyder <msnyder@vmware.com>
8384 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8385 (cmd_qtframe): Ditto.
8386 (cmd_qtbuffer): Ditto.
8387 (cmd_bigqtbuffer): Ditto.
8389 * utils.c (decimal2str): Initialize 'width' to nine, then
8392 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8394 * hostio.c (require_data): Free *data, not data.
8396 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8398 * hostio.c (require_data): Use free, not xfree.
8400 2011-02-27 Michael Snyder <msnyder@vmware.com>
8402 * server.c (handle_query): Discard unused value.
8404 * hostio.c (require_data): Free malloc memory before returning
8407 2011-02-26 Michael Snyder <msnyder@vmware.com>
8409 * linux-low.c (list_threads): Call closedir for dirent.
8411 2011-02-27 Michael Snyder <msnyder@vmware.com>
8413 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8414 a case statement falls through.
8416 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8418 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8421 2011-02-26 Michael Snyder <msnyder@vmware.com>
8423 * utils.c (decimal2str): Eliminate dead code and dead param.
8424 (pulongest): Drop dead param from call to decimal2str.
8427 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8429 Revert the following patch (not approved yet):
8430 2011-02-21 Hui Zhu <teawater@gmail.com>
8431 * tracepoint.c (tp_printf): New function.
8432 (eval_agent_expr): Handle gdb_agent_op_printf.
8434 2011-02-21 Hui Zhu <teawater@gmail.com>
8436 * tracepoint.c (tp_printf): New function.
8437 (eval_agent_expr): Handle gdb_agent_op_printf.
8439 2011-02-18 Tom Tromey <tromey@redhat.com>
8441 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8442 (tracepoint.o): Likewise.
8443 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8444 (gdb_agent_op_names): Likewise.
8446 2011-02-18 Tom Tromey <tromey@redhat.com>
8448 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8449 gdb_agent_op_rot>: New constants.
8450 (gdb_agent_op_names): Add pick and roll.
8451 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8454 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8456 * aclocal.m4: Regenerated with aclocal-1.11.1.
8458 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8460 * server.c (handle_qxfer_traceframe_info): New.
8461 (qxfer_packets): Register "traceframe-info".
8462 (handle_query): Report support for qXfer:traceframe-info:read+.
8463 * tracepoint.c (match_blocktype): New.
8464 (traceframe_find_block_type): Rename to ...
8465 (traceframe_walk_blocks): ... this. Add callback filter argument,
8467 (traceframe_find_block_type): New, reimplemented on top of
8468 traceframe_walk_blocks.
8469 (build_traceframe_info_xml): New.
8470 (traceframe_read_info): New.
8471 * server.h (traceframe_read_info): Declare.
8473 2011-02-11 Yao Qi <yao@codesourcery.com>
8475 * configure.ac: Call AC_PROG_RANLIB.
8476 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8477 * configure: Regenerate.
8479 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8481 * server.c (gdb_read_memory): Change return semantics to allow
8483 (handle_search_memory_1): Adjust.
8484 (process_serial_event) <'m' packet>: Handle partial transfers.
8485 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8487 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8489 * regcache.c (init_register_cache): Initialize
8490 regcache->register_status.
8491 (free_register_cache): Release regcache->register_status.
8492 (regcache_cpy): Copy register_status.
8493 (registers_to_string): Print 'x's for unavailable registers.
8494 (supply_register): Mark the register's status valid or
8495 unavailable, depending on whether a buffer was passed in or not.
8496 (supply_register_zeroed): New.
8497 (supply_regblock): Mark the registers' status valid or
8498 unavailable, depending on whether a buffer was passed in or not.
8499 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8500 (struct regcache): New `register_status' field.
8501 (supply_register_zeroed): Declare.
8502 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8503 supply_register_zeroed, rather than passing a NULL buffer to
8505 * tracepoint.c (fetch_traceframe_registers): Update comment.
8507 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8509 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8512 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8514 * server.h (decode_xfer_write): Change prototype.
8515 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8516 and don't extract the annex here.
8517 * server.c (decode_xfer_read): Remove `annex' parameter,
8518 and don't extract the annex here.
8520 (struct qxfer): New.
8521 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8522 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8523 (handle_qxfer_statictrace): New functions, abstracted out from
8524 handle_query, and made to use the struct qxfer interface.
8525 (handle_threads_qxfer_proper): Rename to ...
8526 (handle_qxfer_threads_proper): ... this.
8527 (handle_threads_qxfer): Rename to ...
8528 (handle_qxfer_threads): ... this. Adjust.
8529 (qxfer_packets): New array.
8530 (handle_qxfer): New function.
8531 (handle_query): Use handle_qxfer.
8533 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8535 * gdbreplay.c: Shorten lines of >= 80 columns.
8536 * linux-low.c: Ditto.
8537 * linux-ppc-low.c: Ditto.
8538 * linux-s390-low.c: Ditto.
8539 * linux-sparc-low.c: Ditto.
8540 * linux-x86-low.c: Ditto.
8541 * linux-xtensa-low.c: Ditto.
8542 * mem-break.c: Ditto.
8544 * regcache.h: Ditto.
8545 * remote-utils.c: Ditto.
8548 * thread-db.c: Ditto.
8549 * tracepoint.c: Ditto.
8551 * win32-low.h: Ditto.
8553 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8555 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8558 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8560 * server.c (gdbserver_version): Update copyright year in version
8562 * gdbreplay.c (gdbreplay_version): Ditto.
8564 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8566 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8567 * linux-bfin-low.c: New file.
8568 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8569 PT_DATA_ADDR for BFIN targets.
8570 * Makefile.in (SFILES): Add linux-bfin-low.c.
8571 (clean): Remove reg-bfin.c.
8572 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8573 * README: Mention supported Blackfin targets.
8575 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8577 * .gitignore: New file.
8579 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8581 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8583 2010-10-22 Jie Zhang <jie@codesourcery.com>
8585 * Makefile.in: Add FLAGS_TO_PASS variable.
8586 (install): Remove dependency of install-only and recursively
8587 invoke make for install-only.
8589 2010-10-04 Doug Evans <dje@google.com>
8591 * Makefile.in (uninstall): Use $(DESTDIR).
8593 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8597 * linux-x86-low.c (compat_siginfo_from_siginfo)
8598 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8599 si_code is < 0. Check for si_code == SI_TIMER before checking for
8602 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8604 * lynx-i386-low.c: New file.
8605 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8607 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8609 * lynx-low.c (ptrace_request_to_str): Remove handling for
8610 request values that have been removed in LynxOS 5.x.
8612 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8614 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8617 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8619 * configure.ac: Add --enable-inprocess-agent option.
8620 * configure: Rebuilt.
8622 2010-09-06 Yao Qi <yao@codesourcery.com>
8624 * linux-low.c (linux_kill): Remove unused variable.
8625 (linux_stabilize_threads): Likewise.
8626 * server.c (start_inferior): Likewise.
8627 (queue_stop_reply_callback): Likewise.
8628 * tracepoint.c (do_action_at_tracepoint): Likewise.
8630 2010-09-06 Yao Qi <yao@codesourcery.com>
8632 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8635 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8637 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8639 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8641 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8644 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8646 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8647 gdbserver/lynx-ppc-low.c: New files.
8648 * Makefile.in (lynx_low_h): New variable.
8649 (lynx-low.o, lynx-ppc-low.o): New rules.
8650 * configure.ac: On LynxOS, link with -lnetinet.
8651 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8652 * configure: regenerate.
8654 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8656 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8657 * configure.ac: Add check for vasprintf and vsnprintf.
8658 * configure, config.in: Regenerate.
8659 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8663 * gdbreplay.c: Move include of alloca.h up, next to include of
8665 * server.h: Add include of malloc.h.
8666 * mem-break.c: Remove include of malloc.h.
8667 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8669 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8671 * Makefile.in (memmem.o): Build with -Wno-error.
8673 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8675 * utils.c (xsnprintf): Make non-static.
8676 * server.h: Add xsnprintf declaration.
8677 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8678 replace calls to snprintf by calls to xsnprintf throughout.
8680 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8682 * configure.ac: Add configure check for alloca.
8683 * configure, config.in: Regenerate.
8684 * server.h: Include alloca.h if it exists.
8685 * gdbreplay.c: Include alloca.h if it exists.
8687 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8689 * linux-low.c (__SIGRTMIN): Define if not already defined.
8690 (linux_create_inferior): Check for __ANDROID__ rather than
8692 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8693 are already deferred.
8694 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8695 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8696 stopped and already has a pending signal to report.
8697 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8698 a pending signal to report or is moving out of a jump pad.
8699 (linux_init_signals): Check for __ANDROID__ rather than
8702 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8704 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8705 debug_threads check. Avoid a linear search when not doing debug
8708 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8710 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8711 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8712 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8713 (process_event): Change local fd's type to gdb_fildes_t.
8714 (create_file_handler): Adjust prototype.
8715 (delete_file_handler): Adjust prototype.
8716 (handle_file_event): Adjust prototype. Use pfildes.
8717 (create_file_event): Adjsut prototype.
8718 * remote-utils.c (remote_desc, listen_desc): Change type to
8720 * server.h: New gdb_fildes_t typedef.
8721 [USE_WIN32API]: Include winsock2.h.
8722 (delete_file_handler, add_file_handler): Adjust prototypes.
8724 * utils.c (pfildes): New.
8726 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8728 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8729 * configure: Regenerate.
8731 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8733 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8734 (linux_done_accessing_memory): ... this.
8735 (linux_target_ops): Adjust.
8736 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8737 * nto-low.c (nto_target_ops): Adjust comment.
8738 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8739 * spu-low.c (spu_target_ops): Adjust comment.
8740 * target.h (target_ops): Rename unprepare_to_access_memory field
8741 to done_accessing_memory.
8742 (unprepare_to_access_memory): Rename to ...
8743 (done_accessing_memory): ... this.
8745 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8747 * linux-low.c (linux_prepare_to_access_memory): New.
8748 (linux_unprepare_to_access_memory): New.
8749 (linux_target_ops): Install them.
8750 * server.c (read_memory): Rename to ...
8751 (gdb_read_memory): ... this. Use
8752 prepare_to_access_memory/prepare_to_access_memory.
8753 (write_memory): Rename to ...
8754 (gdb_write_memory): ... this. Use
8755 prepare_to_access_memory/prepare_to_access_memory.
8756 (handle_search_memory_1): Adjust.
8757 (process_serial_event): Adjust.
8758 * target.h (struct target_ops): New fields
8759 prepare_to_access_memory and unprepare_to_access_memory.
8760 (prepare_to_access_memory, unprepare_to_access_memory): New.
8761 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8762 prepare_to_access_memory/prepare_to_access_memory.
8763 * nto-low.c (nto_target_ops): Adjust.
8764 * spu-low.c (spu_target_ops): Adjust.
8765 * win32-low.c (win32_target_ops): Adjust.
8767 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8769 * Makefile.in (WARN_CFLAGS): Get it from configure.
8770 (WERROR_CFLAGS): New.
8771 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8772 * configure.ac: Introduce --enable-werror, which adds -Werror to
8773 the compiler command line. Enabled by default. Disable with
8774 --disable-werror. Add -Wdeclaration-after-statement
8775 Wpointer-arith and -Wformat-nonliteral to warning flags.
8776 * configure: Regenerate.
8778 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8780 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8782 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8784 * gdbreplay.c (remote_error): New.
8786 (expect): Use gdbchar. Check for error reading from GDB.
8787 Clarify sync error output.
8788 (play): Check for errors writing to GDB.
8789 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8790 * remote-utils.c (getpkt): Check for errors writing to the remote
8793 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8795 * linux-low.c (linux_wait_1): Move non-debugging code out of
8796 `debug_threads' control.
8798 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8800 * linux-low.c (linux_wait_1): Don't set last_status here.
8801 * server.c (push_event, queue_stop_reply_callback): Assert we're
8802 not pushing a TARGET_WAITKIND_IGNORE event.
8803 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8804 (myresume, handle_target_event): Set the thread's last_resume_kind
8805 and last_status from the target returned status.
8807 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8811 * linux-x86-low.c (update_debug_registers_callback): New.
8812 (i386_dr_low_set_addr): Use it.
8813 (i386_dr_low_get_addr): New.
8814 (i386_dr_low_set_control): Use update_debug_registers_callback.
8815 (i386_dr_low_get_control): New.
8816 (i386_dr_low_get_status): Adjust.
8817 * linux-low.c (linux_stop_lwp): New.
8818 * linux-low.h (linux_stop_lwp): Declare.
8820 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8821 argument instead of a i386_debug_reg_state.
8822 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8823 a i386_debug_reg_state.
8824 (i386_insert_aligned_watchpoint): Adjust.
8825 (i386_remove_aligned_watchpoint): Adjust.
8826 (i386_low_stopped_data_address): Read the debug registers from the
8827 inferior instead of from the mirrors.
8828 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8829 (i386_dr_low_get_addr): Declare.
8830 (i386_dr_low_get_control): Declare.
8831 (i386_dr_low_get_status): Change prototype.
8833 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8834 (i386_dr_low_get_addr): New.
8835 (i386_dr_low_get_control): New.
8836 (i386_dr_low_get_status): Adjust prototype. Return
8838 (i386_initial_stuff): Clear dr_status_mirror and
8840 (i386_get_thread_context): Adjust.
8841 (i386_set_thread_context): Adjust.
8842 (i386_thread_added): Adjust.
8844 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8846 * linux-low.h (linux_thread_area): Delete declaration.
8848 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8850 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8851 after its termination.
8853 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8855 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8856 (gdb_wants_all_stopped): Delete.
8857 (linux_wait_1): Don't call them.
8858 * server.c (handle_v_cont): Tag all threads as want-stopped.
8859 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8860 stopped as "client-wants-stopped".
8862 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8864 * Makefile.in (signals_h): New.
8865 (server_h): Depend on it.
8866 (server.o): Don't depend on $(signals_def).
8867 (signals.o): Depend on $(signals_def).
8869 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8871 * Makefile.in (signals_def): New.
8872 (server_h): Append include/gdb/signals.h and signals_def.
8873 (server.o): Append signals_def.
8875 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8877 * server.c (handle_target_event): Use target_signal_to_host for
8878 resume_info.sig initialization.
8879 * target.h (struct thread_resume) <sig>: New comment.
8881 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8883 * server.c (handle_query): strcpy() the returned string from paddress()
8884 instead of sprintf().
8885 * utils.c (paddress): Return phex_nz().
8887 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8889 * server.c (handle_v_cont): Call mourn_inferior if process
8891 (myresume): Likewise.
8893 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8895 Static tracepoints, and integration with UST.
8897 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8898 * mem-break.c (uninsert_all_breakpoints)
8899 (reinsert_all_breakpoints): New.
8900 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8901 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8902 (gdb_agent_ust_loaded, helper_thread_id)
8903 (gdb_agent_helper_thread_id): New macros.
8904 (struct ipa_sym_addresses): Add addr_ust_loaded,
8905 addr_helper_thread_id, addr_cmd_buf.
8906 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8907 (in_process_agent_loaded_ust): New.
8908 (write_e_ust_not_loaded): New.
8909 (maybe_write_ipa_ust_not_loaded): New.
8910 (struct collect_static_trace_data_action): New.
8911 (enum tracepoint_type) <static_tracepoint>: New.
8912 (struct tracepoint) <handle>: Mention static tracepoints.
8913 (struct static_tracepoint_ctx): New.
8914 (CMD_BUF_SIZE): New.
8915 (add_tracepoint_action): Handle static tracepoint actions.
8916 (unprobe_marker_at): New.
8917 (clear_installed_tracepoints): Handle static tracepoints.
8918 (cmd_qtdp): Handle static tracepoints.
8919 (probe_marker_at): New.
8920 (cmd_qtstart): Handle static tracepoints.
8921 (response_tracepoint): Handle static tracepoints.
8922 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8923 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8924 (get_context_regcache): Handle static tracepoints.
8925 (do_action_at_tracepoint): Handle static tracepoint actions.
8926 (traceframe_find_block_type): Handle static trace data blocks.
8927 (traceframe_read_sdata): New.
8928 (download_tracepoints): Download static tracepoint actions.
8929 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8930 (GDB_PROBE_NAME): New.
8935 (ust_marker_to_static_tracepoint): New.
8937 (collect_ust_data_at_tracepoint): New.
8938 (gdb_ust_probe): New.
8939 (UNIX_PATH_MAX, SOCK_DIR): New.
8940 (gdb_ust_connect_sync_socket): New.
8941 (resume_thread, stop_thread): New.
8942 (run_inferior_command): New.
8943 (init_named_socket): New.
8944 (gdb_ust_socket_init): New.
8945 (cstr_to_hexstr): New.
8947 (first_marker, next_marker): New.
8948 (response_ust_marker): New.
8949 (cmd_qtfstm, cmd_qtsstm): New.
8950 (unprobe_marker_at, probe_marker_at): New.
8951 (cmd_qtstmat, gdb_ust_thread): New.
8952 (gdb_ust_init): New.
8953 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8954 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8956 (x86_64_st_collect_regmap): New.
8957 (X86_64_NUM_ST_COLLECT_GREGS): New.
8958 (AMD64_RIP_REGNUM): New.
8959 (supply_static_tracepoint_registers): New.
8960 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8962 (i386_st_collect_regmap): New.
8963 (i386_NUM_ST_COLLECT_GREGS): New.
8964 (supply_static_tracepoint_registers): New.
8965 * server.c (handle_query): Handle qXfer:statictrace:read.
8966 <qSupported>: Report support for StaticTracepoints, and
8967 qXfer:statictrace:read features.
8968 * server.h (traceframe_read_sdata)
8969 (supply_static_tracepoint_registers): Declare.
8970 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8971 (unpack_varlen_hex): Include in IPA build.
8972 * Makefile.in (ustlibs, ustinc): New.
8973 (IPA_OBJS): Add remote-utils-ipa.o.
8974 ($(IPA_LIB)): Link -ldl and -lpthread.
8976 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8977 * config.in, configure: Regenerate.
8979 2010-06-20 Ian Lance Taylor <iant@google.com>
8980 Pedro Alves <pedro@codesourcery.com>
8982 * linux-x86-low.c (always_true): Delete.
8983 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8984 trying to fool the compiler with always_true.
8986 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8988 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8989 conditions in gdbserver.
8991 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8993 * spu-low.c (spu_read_memory): Wrap around local store limit.
8994 (spu_write_memory): Likewise.
8996 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8998 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8999 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9001 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9003 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9004 uses with LONGEST uses.
9006 2010-06-14 Stan Shebs <stan@codesourcery.com>
9007 Pedro Alves <pedro@codesourcery.com>
9011 * linux-x86-low.c: Include limits.h.
9016 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9017 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9018 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9019 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9020 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9021 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9022 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9023 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9024 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9025 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9026 (amd64_emit_void_call_2): New.
9027 (amd64_emit_ops): New.
9028 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9029 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9030 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9031 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9032 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9033 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9034 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9035 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9036 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9037 (i386_emit_stack_adjust, i386_emit_int_call_1)
9038 (i386_emit_void_call_2): New.
9039 (i386_emit_ops): New.
9040 (x86_emit_ops): New.
9041 (the_low_target): Install x86_emit_ops.
9042 * server.h (struct emit_ops): New.
9043 (get_raw_reg_func_addr): Declare.
9044 (current_insn_ptr, emit_error): Declare.
9045 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9046 (set_trace_state_variable_value): New defines.
9047 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9048 addr_get_trace_state_variable_value and
9049 addr_set_trace_state_variable_value.
9050 (symbol_list): New fields for get_raw_reg,
9051 get_trace_state_variable_value and set_trace_state_variable_value.
9052 (condfn): New typedef.
9053 (struct tracepoint): New field `compiled_cond'.
9054 (do_action_at_tracepoint): Clear compiled_cond.
9055 (get_trace_state_variable_value, set_trace_state_variable_value):
9057 (condition_true_at_tracepoint): If there's a compiled condition,
9059 (current_insn_ptr, emit_error): New globals.
9060 (struct bytecode_address): New.
9061 (get_raw_reg_func_addr): New.
9062 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9063 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9064 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9065 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9066 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9067 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9068 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9069 (compile_tracepoint_condition, compile_bytecodes): New.
9070 * target.h (emit_ops): Forward declare.
9071 (struct target_ops): New field emit_ops.
9072 (target_emit_ops): New.
9073 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9075 * linux-low.c (linux_emit_ops): New.
9076 (linux_target_ops): Install it.
9077 * linux-low.h (struct linux_target_ops): New field emit_ops.
9079 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9081 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9082 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9084 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9085 Stan Shebs <stan@codesourcery.com>
9087 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9088 (all): Depend on $(extra_libraries).
9089 (install-only): Install the IPA.
9090 (IPA_OBJS, IPA_LIB): New.
9091 (clean): Remove the IPA lib.
9092 (IPAGENT_CFLAGS): New.
9093 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9094 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9095 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9096 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9097 * configure.ac: Check for atomic builtins support in the compiler.
9098 (IPA_DEPFILES, extra_libraries): Define.
9099 * configure.srv (ipa_obj): Add description.
9100 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9101 (i[34567]86-*-linux*): Set ipa_obj.
9102 (x86_64-*-linux*): Set ipa_obj.
9103 * linux-low.c (stabilizing_threads): New.
9104 (supports_fast_tracepoints): New.
9105 (linux_detach): Stabilize threads before detaching.
9106 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9107 the lwp is either not stabilizing, or is moving out of a jump pad.
9108 (linux_fast_tracepoint_collecting): New.
9109 (maybe_move_out_of_jump_pad): New.
9110 (enqueue_one_deferred_signal): New.
9111 (dequeue_one_deferred_signal): New.
9112 (linux_wait_for_event_1): If moving out of a jump pad, defer
9113 pending signals to later.
9114 (linux_stabilize_threads): New.
9115 (linux_wait_1): Check if threads need moving out of jump pads, and
9117 (stuck_in_jump_pad_callback): New.
9118 (move_out_of_jump_pad_callback): New.
9120 (linux_resume_one_lwp): Handle moving out of jump pads.
9121 (linux_set_resume_request): Dequeue deferred signals.
9122 (need_step_over_p): Also step over fast tracepoint jumps.
9123 (start_step_over): Also uninsert fast tracepoint jumps.
9124 (finish_step_over): Also reinsert fast tracepoint jumps.
9125 (linux_install_fast_tracepoint_jump): New.
9126 (linux_target_ops): Install linux_stabilize_threads and
9127 linux_install_fast_tracepoint_jump_pad.
9128 * linux-low.h (linux_target_ops) <get_thread_area,
9129 install_fast_tracepoint_jump_pad>: New fields.
9130 (struct lwp_info) <collecting_fast_tracepoint,
9131 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9132 (linux_get_thread_area): Declare.
9133 * linux-x86-low.c (jump_insn): New.
9134 (x86_get_thread_area): New.
9135 (append_insns): New.
9137 (amd64_install_fast_tracepoint_jump_pad): New.
9138 (i386_install_fast_tracepoint_jump_pad): New.
9139 (x86_install_fast_tracepoint_jump_pad): New.
9140 (the_low_target): Install x86_get_thread_area and
9141 x86_install_fast_tracepoint_jump_pad.
9142 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9143 (struct fast_tracepoint_jump): New.
9144 (fast_tracepoint_jump_insn): New.
9145 (fast_tracepoint_jump_shadow): New.
9146 (find_fast_tracepoint_jump_at): New.
9147 (fast_tracepoint_jump_here): New.
9148 (delete_fast_tracepoint_jump): New.
9149 (set_fast_tracepoint_jump): New.
9150 (uninsert_fast_tracepoint_jumps_at): New.
9151 (reinsert_fast_tracepoint_jumps_at): New.
9152 (set_breakpoint_at): Use write_inferior_memory.
9153 (uninsert_raw_breakpoint): Use write_inferior_memory.
9154 (check_mem_read): Mask out fast tracepoint jumps.
9155 (check_mem_write): Mask out fast tracepoint jumps.
9156 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9157 (set_fast_tracepoint_jump): Declare.
9158 (delete_fast_tracepoint_jump)
9159 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9160 (reinsert_fast_tracepoint_jumps_at): Declare.
9161 * regcache.c: Don't compile many functions when building the
9162 in-process agent library.
9163 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9164 the register buffer in the heap.
9165 (free_register_cache): If the register buffer isn't owned by the
9166 regcache, don't free it.
9167 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9168 pre-existing register caches.
9169 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9171 (convert_ascii_to_int): : Constify `from' parameter type.
9172 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9173 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9174 the needed buffer in-place.
9175 (relocate_instruction): New.
9176 * server.c (handle_query) <qSymbols>: If the target supports
9177 tracepoints, give it a chance of looking up symbols. Report
9178 support for fast tracepoints.
9179 (handle_status): Stabilize threads.
9180 (process_serial_event): Adjust.
9181 * server.h (struct fast_tracepoint_jump): Forward declare.
9182 (struct process_info) <fast_tracepoint_jumps>: New field.
9183 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9184 (decode_X_packet, decode_M_packet): Adjust.
9185 (relocate_instruction): Declare.
9186 (in_process_agent_loaded): Declare.
9187 (tracepoint_look_up_symbols): Declare.
9188 (struct fast_tpoint_collect_status): Declare.
9189 (fast_tracepoint_collecting): Declare.
9190 (force_unlock_trace_buffer): Declare.
9191 (handle_tracepoint_bkpts): Declare.
9192 (initialize_low_tracepoint)
9193 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9194 * target.h (struct target_ops) <stabilize_threads,
9195 install_fast_tracepoint_jump_pad>: New fields.
9196 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9197 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9198 [HAVE_STDINT_H]: Include stdint.h.
9199 (trace_debug_1): Rename to ...
9200 (trace_vdebug): ... this.
9201 (trace_debug): Rename to ...
9202 (trace_debug_1): ... this. Add `level' parameter.
9204 (ATTR_USED, ATTR_NOINLINE): New.
9205 (IP_AGENT_EXPORT): New.
9206 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9207 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9208 (about_to_request_buffer_space, trace_buffer_is_full)
9209 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9210 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9211 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9212 (traceframe_write_count, traceframes_created)
9213 (trace_state_variables)
9214 New renaming defines.
9215 (struct ipa_sym_addresses): New.
9216 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9218 (ipa_sym_addrs): New.
9219 (all_tracepoint_symbols_looked_up): New.
9220 (in_process_agent_loaded): New.
9221 (write_e_ipa_not_loaded): New.
9222 (maybe_write_ipa_not_loaded): New.
9223 (tracepoint_look_up_symbols): New.
9224 (debug_threads) [IN_PROCESS_AGENT]: New.
9225 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9226 (UNKNOWN_SIDE_EFFECTS): New.
9227 (stop_tracing): New.
9228 (flush_trace_buffer): New.
9229 (stop_tracing_bkpt): New.
9230 (flush_trace_buffer_bkpt): New.
9231 (read_inferior_integer): New.
9232 (read_inferior_uinteger): New.
9233 (read_inferior_data_pointer): New.
9234 (write_inferior_data_pointer): New.
9235 (write_inferior_integer): New.
9236 (write_inferior_uinteger): New.
9237 (struct collect_static_trace_data_action): Delete.
9238 (enum tracepoint_type): New.
9239 (struct tracepoint) <type>: New field `type'.
9240 <actions_str, step_actions, step_actions_str>: Only include in
9242 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9243 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9244 (tracepoints): Use IP_AGENT_EXPORT.
9245 (last_tracepoint): Don't include in the IPA.
9246 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9247 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9248 (alloced_trace_state_variables): New.
9249 (trace_state_variables): Use IP_AGENT_EXPORT.
9250 (traceframe_t): Delete unused variable.
9251 (circular_trace_buffer): Don't include in the IPA.
9252 (trace_buffer_start): Delete.
9253 (struct trace_buffer_control): New.
9254 (trace_buffer_free): Delete.
9255 (struct ipa_trace_buffer_control): New.
9256 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9257 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9259 (trace_buffer_ctrl): New.
9260 (TRACE_BUFFER_CTRL_CURR): New.
9261 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9262 Reimplement as macros.
9263 (trace_buffer_wrap): Delete.
9264 (traceframe_write_count, traceframe_read_count)
9265 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9266 (struct tracepoint_hit_ctx) <type>: New field.
9267 (struct fast_tracepoint_ctx): New.
9268 (memory_barrier): New.
9270 (record_tracepoint_error): Update atomically in the IPA.
9271 (clear_inferior_trace_buffer): New.
9272 (about_to_request_buffer_space): New.
9273 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9274 updating the same buffer.
9275 (add_tracepoint): Default the tracepoint's type to trap
9276 tracepoint, and orig_size to -1.
9277 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9279 (create_trace_state_variable): New parameter `gdb'. Handle it.
9280 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9281 (cmd_qtdp): Handle fast tracepoints.
9283 (max_jump_pad_size): New.
9284 (gdb_jump_pad_head): New.
9285 (get_jump_space_head): New.
9286 (claim_jump_space): New.
9287 (sort_tracepoints): New.
9288 (MAX_JUMP_SIZE): New.
9289 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9291 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9292 support. Upload fast traceframes, and delete internal IPA
9294 (stop_tracing_handler): New.
9295 (flush_trace_buffer_handler): New.
9296 (cmd_qtstop): Upload fast tracepoints.
9297 (response_tracepoint): Handle fast tracepoints.
9298 (tracepoint_finished_step): Upload fast traceframes. Set the
9299 tracepoint hit context's tracepoint type.
9300 (handle_tracepoint_bkpts): New.
9301 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9302 type. Add comment about fast tracepoints.
9303 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9304 non-existing action_str field.
9305 (get_context_regcache): Handle fast tracepoints.
9306 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9308 (fast_tracepoint_from_jump_pad_address): New.
9309 (fast_tracepoint_from_ipa_tpoint_address): New.
9310 (collecting_t): New.
9311 (force_unlock_trace_buffer): New.
9312 (fast_tracepoint_collecting): New.
9315 (write_inferior_data_ptr): New.
9316 (target_tp_heap): New.
9317 (target_malloc): New.
9318 (download_agent_expr): New.
9320 (download_tracepoints): New.
9321 (download_trace_state_variables): New.
9322 (upload_fast_traceframes): New.
9323 (IPA_FIRST_TRACEFRAME): New.
9324 (IPA_NEXT_TRACEFRAME_1): New.
9325 (IPA_NEXT_TRACEFRAME): New.
9326 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9327 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9328 (gdb_jump_pad_buffer_end): New.
9329 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9330 (initialize_tracepoint): Adjust.
9331 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9332 buffer. Initialize the low module.
9333 * utils.c (PREFIX, TOOLNAME): New.
9334 (malloc_failure): Use PREFIX.
9335 (error): In the IPA, an error causes an exit.
9336 (fatal, warning): Use PREFIX.
9337 (internal_error): Use TOOLNAME.
9338 (NUMCELLS): Increase to 10.
9339 * configure, config.in: Regenerate.
9341 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9343 * server.c (handle_query) <qSupported>: Do two passes over the
9344 qSupported string to avoid nesting strtok.
9346 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9348 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9350 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9352 * configure: Regenerate.
9353 * proc-service.list: New.
9355 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9357 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9360 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9362 * gdbreplay.c (remote_open): Check error return from socket() call by
9363 its equality to -1 not by it being negative.
9364 * remote-utils.c (remote_open): Likewise.
9366 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9368 * config.h: Regenerate.
9370 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9372 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9373 doesn't provide PTRACE_GET_THREAD_AREA.
9375 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9377 * linux-m68k-low.c: Include <asm/ptrace.h>
9378 (ps_get_thread_area): Implement.
9380 2010-05-03 Doug Evans <dje@google.com>
9382 * event-loop.c (struct callback_event): New struct.
9383 (callback_list): New global.
9384 (append_callback_event, delete_callback_event): New functions.
9385 (process_callback): New function.
9386 (start_event_loop): Call it.
9387 * remote-utils.c (NOT_SCHEDULED): Define.
9388 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9389 moved out of readchar.
9390 (readchar): Rewrite. Call reschedule before returning.
9391 (reset_readchar): New function.
9392 (remote_close): Call it.
9393 (process_remaining, reschedule): New functions.
9394 * server.h (callback_handler_func): New typedef.
9395 (append_callback_event, delete_callback_event): Declare.
9397 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9399 * proc-service.c (ps_pglobal_lookup): Use
9400 thread_db_look_up_one_symbol.
9401 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9402 parameter. Use it instead of all_symbols_looked_up.
9403 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9405 (all_symbols_looked_up): Don't declare.
9406 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9407 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9409 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9410 Set all_symbols_looked_up here.
9411 (thread_db_look_up_one_symbol): New.
9412 (thread_db_get_tls_address): Adjust.
9413 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9414 thread_db object on the heap, and tentatively set it in the
9416 (thread_db_init): Don't set all_symbols_looked_up here.
9417 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9419 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9421 * linux-low.c (linux_kill, linux_detach): Adjust.
9422 (status_pending_p_callback): Remove redundant statement. Check
9423 for !TARGET_WAITIKIND_IGNORE, instead of
9424 TARGET_WAITKIND_STOPPED.
9425 (handle_tracepoints): Make sure LWP is locked. Adjust.
9426 (linux_wait_for_event_1): Adjust.
9427 (linux_cancel_breakpoints): New.
9428 (unsuspend_one_lwp): New.
9429 (unsuspend_all_lwps): New.
9430 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9431 (send_sigstop_callback): Change return type to int, add new
9432 `except' parameter and handle it.
9433 (suspend_and_send_sigstop_callback): New.
9434 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9435 pass them down. If SUSPEND, also increment the lwp's suspend
9437 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9438 (need_step_over_p): Don't consider suspended LWPs.
9439 (start_step_over): Adjust.
9440 (proceed_one_lwp): Change return type to int, add new `except'
9441 parameter and handle it.
9442 (unsuspend_and_proceed_one_lwp): New.
9443 (proceed_all_lwps): Use find_inferior instead of
9445 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9446 also decrement the suspend count of LWPs. Pass `except' down,
9447 instead of hacking its suspend count.
9448 (linux_pause_all): Add `freeze' parameter. Adjust.
9449 (linux_unpause_all): New.
9450 (linux_target_ops): Install linux_unpause_all.
9451 * server.c (handle_status): Adjust.
9452 * target.h (struct target_ops): New fields `unpause_all' and
9453 `cancel_breakpoints'. Add new parameter to `pause_all'.
9454 (pause_all): Add new `freeze' parameter.
9456 (cancel_breakpoints): New.
9457 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9459 (cmd_qtstart): Pause threads.
9460 (stop_tracing): Pause threads, and cancel breakpoints.
9461 * win32-low.c (win32_target_ops): Adjust.
9463 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9465 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9466 the inferior right away from here...
9467 (linux_wait_1): ... to here, and adjust to check the thread's
9468 last_resume_kind instead of the lwp's step or stop_expected flags.
9470 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9472 * README: Use consistent `GDB' and `GDBserver' spellings.
9474 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9476 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9477 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9478 (linux_detach_one_lwp): Assume the lwp is stopped.
9479 (any_thread_of): Delete.
9480 (linux_detach): Stop all lwps here. Don't blindly delete all
9482 (delete_lwp_callback): New.
9483 (linux_mourn): Delete all lwps of the process that is gone.
9484 (linux_wait_1): Don't delete the last lwp of the process here.
9485 * mem-break.h (mark_breakpoints_out): Declare.
9486 * mem-break.c (mark_breakpoints_out): New.
9487 (free_all_breakpoints): Use it.
9488 * server.c (handle_target_event): If the process is gone, mark
9490 * thread-db.c (struct thread_db) <create_bp>: New field.
9491 (thread_db_enable_reporting): Fix prototype. Store a thread event
9492 breakpoint reference in the thread_db struct.
9493 (thread_db_load_search): Clear the thread_db object.
9494 (try_thread_db_load_1): Ditto.
9495 (switch_to_process): New.
9496 (disable_thread_event_reporting): Use it.
9497 (remove_thread_event_breakpoints): New.
9498 (thread_db_detach, thread_db_mourn): Use it.
9500 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9502 * linux-low.c (linux_enable_event_reporting): New.
9503 (linux_wait_for_event_1, handle_extended_wait): Use it.
9505 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9507 * linux-low.c (linux_kill_one_lwp, linux_kill)
9508 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9509 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9510 SIGSTOP even if the LWP is stopped.
9511 (send_sigstop_callback): New.
9512 (stop_all_lwps): Use send_sigstop_callback instead.
9513 (linux_resume_one_thread): Adjust.
9514 (proceed_one_lwp): Still proceed an LWP that the client has
9515 requested to stop, if we haven't reported it as stopped yet. Make
9516 sure that LWPs the client want stopped, have a pending SIGSTOP.
9518 2010-04-26 Doug Evans <dje@google.com>
9520 * server.c (handle_general_set): Make static.
9522 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9523 Print received char after testing for error/eof instead of before.
9524 (input_interrupt): Tweak comment.
9526 2010-04-23 Doug Evans <dje@google.com>
9528 * server.c (start_inferior): Print inferior argv if --debug.
9530 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9532 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9533 * nto-x86-low.c: Include server.h
9535 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9537 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9538 be consistent with other sources of this directory.
9539 (init_registers_amd64): Correct name of source file of this function
9542 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9544 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9547 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9549 * win32-i386-low.c: Add 64-bit support.
9550 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9551 (init_registers_amd64): Declare.
9552 (mappings): Add 64-bit version of array.
9553 (init_windows_x86): New function.
9554 (the_low_target): Change init_arch field to init_windows_x86.
9556 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9558 * win32-low.c: Adapt to support also 64-bit architecture.
9559 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9560 (get_image_name): Use SIZE_T type for local variable `done'.
9561 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9562 (toolhelp_get_dll_name): Idem.
9563 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9564 Use uintptr_t typecast to avoid warning.
9565 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9566 (handle_exception): Use phex_nz to avoid warning.
9567 (win32_wait): Remove unused local variable `process'.
9569 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9571 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9574 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9576 * configure.ac: Use `ws2_32' library for srv_mingw.
9577 * configure: Regenerate.
9578 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9579 * remote-utils.c: Likewise.
9581 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9583 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9584 if __x86_64__ is defined.
9586 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9588 * configure: Regenerate.
9590 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9592 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9593 * target.h (target_ops): New get_tib_address field.
9594 * win32-low.h (win32_thread_info): Add thread_local_base field.
9595 * win32-low.c (child_add_thread): Add tlb argument.
9596 Set thread_local_base field to TLB.
9597 (get_child_debug_event): Adapt to child_add_thread change.
9598 (win32_get_tib_address): New function.
9599 (win32_target_ops): Set get_tib_address field to
9600 win32_get_tib_address.
9601 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9603 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9605 * linux-low.c (linux_mourn): Also remove the process.
9606 * server.c (handle_target_event): Don't remove the process here.
9607 * nto-low.c (nto_mourn): New.
9608 (nto_target_ops): Install it.
9609 * spu-low.c (spu_mourn): New.
9610 (spu_target_ops): Install it.
9611 * win32-low.c (win32_mourn): New.
9612 (win32_target_ops): Install it.
9614 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9616 * server.h (buffer_xml_printf): Remove redundant `;'.
9618 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9620 * regcache.c (set_register_cache): Invalidate regcaches before
9621 changing the register cache layout.
9622 (regcache_invalidate_one): Allow a NULL regcache.
9623 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9624 regcaches before changing the register cache layout or the target
9627 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9629 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9630 variable warning on Linux/x86-64.
9632 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9634 GDBserver disconnected tracing support.
9636 * linux-low.c (linux_remove_process): Delete.
9637 (add_lwp): Don't set last_resume_kind here.
9638 (linux_kill): Use `mourn'.
9639 (linux_detach): Use `thread_db_detach', and `mourn'.
9641 (linux_attach_lwp_1): Adjust comment.
9642 (linux_attach): last_resume_kind moved the thread_info; adjust.
9643 (status_pending_p_callback): Adjust.
9644 (linux_wait_for_event_1): Adjust.
9645 (count_events_callback, select_singlestep_lwp_callback)
9646 (select_event_lwp_callback, cancel_breakpoints_callback)
9647 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9648 (proceed_one_lwp): Adjust.
9649 (linux_async): Add debug output.
9650 (linux_thread_stopped): New.
9651 (linux_pause_all): New.
9652 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9654 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9655 (thread_db_free): Delete declaration.
9656 (thread_db_detach, thread_db_mourn): Declare.
9657 * thread-db.c (thread_db_init): Use thread_db_mourn.
9658 (thread_db_free): Delete, split in two.
9659 (disable_thread_event_reporting): New.
9660 (thread_db_detach): New.
9661 (thread_db_mourn): New.
9663 * server.h (struct thread_info) <last_resume_kind>: New field.
9664 <attached>: Add comment.
9665 <gdb_detached>: New field.
9666 (handler_func): Change return type to int.
9667 (handle_serial_event, handle_target_event): Ditto.
9668 (gdb_connected): Declare.
9670 (disconnected_tracing): Declare.
9671 (stop_tracing): Declare.
9673 * server.c (handle_query) <qSupported>: Report support for
9674 disconnected tracing.
9675 (queue_stop_reply_callback): Account for running threads.
9676 (gdb_wants_thread_stopped): New.
9677 (gdb_wants_all_threads_stopped): New.
9678 (gdb_reattached_process): New.
9679 (handle_status): Clear the `gdb_detached' flag of all processes.
9680 In all-stop, stop all threads.
9681 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9682 (process_serial_event): If the remote connection breaks, or if an
9683 exit was forced with "monitor exit", force an event loop exit.
9684 Handle disconnected tracing on detach.
9685 (handle_serial_event): Adjust.
9686 (handle_target_event): If GDB isn't connected, forward events back
9687 to the inferior, unless the last process exited, in which case,
9688 exit gdbserver. Adjust interface.
9690 * remote-utils.c (remote_open): Don't block in accept. Instead
9691 register an event loop source on the listen socket file
9692 descriptor. Refactor bits into ...
9693 (listen_desc): ... this new global.
9694 (gdb_connected): ... this new function.
9695 (enable_async_notification): ... this new function.
9696 (handle_accept_event): ... this new function.
9697 (remote_close): Clear remote_desc.
9699 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9701 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9703 (mourn_inferior): Define.
9704 (target_process_qsupported): Avoid the dangling else problem.
9705 (thread_stopped): Define.
9706 (pause_all): Define.
9707 (target_waitstatus_to_string): Declare.
9708 * target.c (target_waitstatus_to_string): New.
9710 * tracepoint.c (tracing): Make extern.
9711 (disconnected_tracing): New.
9712 (stop_tracing): Make extern. Handle tracing stops due to GDB
9714 (cmd_qtdisconnected): New.
9715 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9716 (handle_tracepoint_general_set): Handle QTDisconnected.
9718 * event-loop.c (event_handler_func): Change return type to int.
9719 (process_event): Bail out if the event handler wants the event
9721 (handle_file_event): Ditto.
9722 (start_event_loop): Bail out if the event handler wants the event
9725 * nto-low.c (nto_target_ops): Adjust.
9726 * spu-low.c (spu_wait): Don't remove the process here.
9727 (spu_target_ops): Adjust.
9728 * win32-low.c (win32_wait): Don't remove the process here.
9729 (win32_target_ops): Adjust.
9731 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9733 * regcache.c (realloc_register_cache): Invalidate inferior's
9734 regcache before recreating it.
9736 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9738 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9740 2010-04-09 Stan Shebs <stan@codesourcery.com>
9741 Pedro Alves <pedro@codesourcery.com>
9743 * server.h (LONGEST): New.
9744 (struct thread_info) <while_stepping>: New field.
9745 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9747 (initialize_tracepoint, handle_tracepoint_general_set)
9748 (handle_tracepoint_query, tracepoint_finished_step)
9749 (tracepoint_was_hit, release_while_stepping_state_list):
9750 (current_traceframe): Declare.
9751 * server.c (handle_general_set): Handle tracepoint packets.
9753 (write_memory): New.
9754 (handle_search_memory_1): Use read_memory.
9755 (handle_query): Report support for conditional tracepoints, trace
9756 state variables, and tracepoint sources. Handle tracepoint
9758 (main): Initialize the tracepoints module.
9759 (process_serial_event): Handle traceframe reads/writes.
9761 * linux-low.c (handle_tracepoints): New.
9762 (linux_wait_1): Call it.
9763 (linux_resume_one_lwp): Handle while-stepping.
9764 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9765 (linux_target_ops): Install them.
9766 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9768 * linux-x86-low.c (x86_supports_tracepoints): New.
9769 (the_low_target). Install it.
9771 * mem-break.h (delete_breakpoint): Declare.
9772 * mem-break.c (delete_breakpoint): Make external.
9774 * target.h (struct target_ops): Add `supports_tracepoints',
9775 `read_pc', and `write_pc' fields.
9776 (target_supports_tracepoints): Define.
9777 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9780 * regcache.h (struct regcache) <registers_owned>: New field.
9781 (init_register_cache, regcache_cpy): Declare.
9782 (regcache_read_pc, regcache_write_pc): Declare.
9783 (register_cache_size): Declare.
9784 (supply_regblock): Declare.
9785 * regcache.c (init_register_cache): New.
9786 (new_register_cache): Use it.
9787 (regcache_cpy): New.
9788 (register_cache_size): New.
9789 (supply_regblock): New.
9790 (regcache_read_pc, regcache_write_pc): New.
9792 * tracepoint.c: New.
9794 * Makefile.in (OBS): Add tracepoint.o.
9795 (tracepoint.o): New rule.
9797 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9799 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9801 (i386-mmx.c): Likewise.
9802 (i386-mmx-linux.o): Likewise.
9803 (i386-mmx-linux.c): Likewise.
9805 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9806 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9807 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9808 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9810 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9811 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9812 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9814 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9816 * Makefile.in (clean): Updated.
9818 (i386-avx.c): Likewise.
9819 (i386-avx-linux.o): Likewise.
9820 (i386-avx-linux.c): Likewise.
9821 (amd64-avx.o): Likewise.
9822 (amd64-avx.c): Likewise.
9823 (amd64-avx-linux.o): Likewise.
9824 (amd64-avx-linux.c): Likewise.
9826 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9827 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9828 (srv_amd64_regobj): Add amd64-avx.o.
9829 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9830 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9831 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9832 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9833 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9834 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9835 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9837 * i387-fp.c: Include "i386-xstate.h".
9839 (i387_cache_to_xsave): Likewise.
9840 (i387_xsave_to_cache): Likewise.
9841 (x86_xcr0): Likewise.
9843 * i387-fp.h (i387_cache_to_xsave): Likewise.
9844 (i387_xsave_to_cache): Likewise.
9845 (x86_xcr0): Likewise.
9847 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9848 * linux-crisv32-low.c (target_regsets): Likewise.
9849 * linux-m68k-low.c (target_regsets): Likewise.
9850 * linux-mips-low.c (target_regsets): Likewise.
9851 * linux-ppc-low.c (target_regsets): Likewise.
9852 * linux-s390-low.c (target_regsets): Likewise.
9853 * linux-sh-low.c (target_regsets): Likewise.
9854 * linux-sparc-low.c (target_regsets): Likewise.
9855 * linux-xtensa-low.c (target_regsets): Likewise.
9857 * linux-low.c: Include <sys/uio.h>.
9858 (regsets_fetch_inferior_registers): Support nt_type.
9859 (regsets_store_inferior_registers): Likewise.
9860 (linux_process_qsupported): New.
9861 (linux_target_ops): Add linux_process_qsupported.
9863 * linux-low.h (regset_info): Add nt_type.
9864 (linux_target_ops): Add process_qsupported.
9866 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9868 (init_registers_i386_avx_linux): New.
9869 (init_registers_amd64_avx_linux): Likewise.
9870 (xmltarget_i386_linux_no_xml): Likewise.
9871 (xmltarget_amd64_linux_no_xml): Likewise.
9872 (PTRACE_GETREGSET): Likewise.
9873 (PTRACE_SETREGSET): Likewise.
9874 (x86_fill_xstateregset): Likewise.
9875 (x86_store_xstateregset): Likewise.
9876 (use_xml): Likewise.
9877 (x86_linux_update_xmltarget): Likewise.
9878 (x86_linux_process_qsupported): Likewise.
9879 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9880 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9881 init_registers_i386_linux here. Call
9882 x86_linux_update_xmltarget.
9883 (the_low_target): Add x86_linux_process_qsupported.
9885 * server.c (handle_query): Call target_process_qsupported.
9887 * target.h (target_ops): Add process_qsupported.
9888 (target_process_qsupported): New.
9890 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9892 * inferiors.c (add_thread): Set last_status kind to
9893 TARGET_WAITKIND_IGNORE.
9894 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9895 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9896 (linux_wait_1): Move `thread' local definition to block that uses
9897 it. Don't NULL initialize `event_child'.
9898 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9899 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9900 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9902 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9904 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9905 an extended waitstatus, or by a watchpoint.
9906 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9907 thread was stepping or has been stopped by a watchpoint.
9909 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9911 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9912 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9913 of another, then delete the previous, and validate all
9915 (validate_inserted_breakpoint): New.
9916 (delete_disabled_breakpoints): New.
9917 (validate_breakpoints): New.
9918 (check_mem_read): Validate breakpoints before trusting their
9919 shadow. Delete disabled breakpoints.
9920 (check_mem_write): Validate breakpoints before trusting they
9921 should be inserted. Delete disabled breakpoints.
9922 * mem-break.h (validate_breakpoints):
9923 * server.c (handle_query): Validate breakpoints when we see a
9926 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9928 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9929 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9930 if we could tell there's a GDB breakpoint at stop_pc.
9931 (need_step_over_p): Don't do a step over if we find a GDB
9932 breakpoint at the resume PC.
9934 * mem-break.c (struct raw_breakpoint): New.
9935 (enum bkpt_type): New type `gdb_breakpoint'.
9936 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9937 fields. New field `raw'.
9938 (find_raw_breakpoint_at): New.
9939 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9941 (set_breakpoint_at): Adjust.
9942 (delete_raw_breakpoint): New.
9943 (release_breakpoint): New.
9944 (delete_breakpoint): Rename to...
9945 (delete_breakpoint_1): ... this. Add proc parameter. Use
9946 release_breakpoint. Return ENOENT.
9947 (delete_breakpoint): Reimplement.
9948 (find_breakpoint_at): Delete.
9949 (find_gdb_breakpoint_at): New.
9950 (delete_breakpoint_at): Delete.
9951 (set_gdb_breakpoint_at): New.
9952 (delete_gdb_breakpoint_at): New.
9953 (gdb_breakpoint_here): New.
9954 (set_reinsert_breakpoint): Use release_breakpoint.
9955 (uninsert_breakpoint): Rename to ...
9956 (uninsert_raw_breakpoint): ... this.
9957 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9958 (reinsert_raw_breakpoint): Change parameter type to
9960 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9962 (check_breakpoints): Adjust. Use release_breakpoint.
9963 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9964 (breakpoint_inserted_here): Ditto.
9965 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9966 Don't trust the breakpoint's shadow if it is not inserted.
9967 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9968 (delete_all_breakpoints): Adjust.
9969 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9970 use delete_breakpoint_1.
9972 * mem-break.h (breakpoints_supported): Delete declaration.
9973 (set_gdb_breakpoint_at): Declare.
9974 (gdb_breakpoint_here): Declare.
9975 (delete_breakpoint_at): Delete.
9976 (delete_gdb_breakpoint_at): Declare.
9978 * server.h (struct raw_breakpoint): Forward declare.
9979 (struct process_info): New field `raw_breakpoints'.
9981 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9984 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9986 * linux-low.c (status_pending_p_callback): Fix comment.
9987 (linux_wait_for_event_1): Move most of the internal breakpoint
9988 handling from here...
9989 (linux_wait_1): ... to here.
9990 (count_events_callback): New.
9991 (select_singlestep_lwp_callback): New.
9992 (select_event_lwp_callback): New.
9993 (cancel_breakpoints_callback): New.
9994 (select_event_lwp): New.
9995 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9996 priority to all LWPs that have had events that should be reported
9997 to the client. Cancel breakpoints when about to reporting the
9998 event to the client, not while stopping lwps. No longer cancel
9999 finished single-steps here.
10000 (cancel_finished_single_step): Delete.
10001 (cancel_finished_single_steps): Delete.
10003 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10005 * mem-break.c (enum bkpt_type): New.
10006 (struct breakpoint): New field `type'.
10007 (set_breakpoint_at): Change return type to struct breakpoint
10008 pointer. Set type to `other_breakpoint' by default.
10009 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10010 in the breakpoint list.
10011 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10012 (reinsert_breakpoint): Rename to ...
10013 (reinsert_raw_breakpoint): ... this.
10014 (reinsert_breakpoints_at): Adjust.
10015 * mem-break.h (struct breakpoint): Declare.
10016 (set_breakpoint_at): Change return type to struct breakpoint
10019 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10021 * server.c (handle_query): Assign, not compare.
10023 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10025 Teach linux gdbserver to step-over-breakpoints.
10027 * linux-low.c (can_hardware_single_step): New.
10028 (supports_breakpoints): New.
10029 (handle_extended_wait): If stopping threads, read the stop pc of
10030 the new cloned LWP.
10032 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10033 low target doesn't support retrieving the PC.
10034 (add_lwp): Set last_resume_kind to resume_continue.
10035 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10036 (linux_attach): Don't clear stop_expected. Set the lwp's
10037 last_resume_kind to resume_stop.
10038 (linux_detach_one_lwp): Don't check for removed breakpoints.
10039 (check_removed_breakpoint): Delete.
10040 (status_pending_p): Rename to ...
10041 (status_pending_p_callback): ... this. Don't check for removed
10042 breakpoints. Don't consider threads that are stopped from GDB's
10044 (linux_wait_for_lwp): Always read the stop_pc here.
10045 (cancel_breakpoint): New.
10046 (step_over_bkpt): New global.
10047 (linux_wait_for_event_1): Implement stepping over breakpoints.
10048 (gdb_wants_lwp_stopped): New.
10049 (gdb_wants_all_stopped): New.
10050 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10051 single-step traps here. Store the thread's last reported target
10053 (send_sigstop): Don't clear stop_expected. Always set it,
10055 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10056 (cancel_finished_single_step): New.
10057 (cancel_finished_single_steps): New.
10058 (wait_for_sigstop): Don't cancel finished single-step traps here.
10059 (linux_resume_one_lwp): Don't check for removed breakpoints.
10060 Don't set `step' on non-hardware step archs.
10061 (linux_set_resume_request): Ignore resume_stop requests if already
10062 stopping or stopped. Set the lwp's last_resume_kind.
10063 (resume_status_pending_p): Don't check for removed breakpoints.
10064 (need_step_over_p): New.
10065 (start_step_over): New.
10066 (finish_step_over): New.
10067 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10068 requests. Clear the thread's last reported target waitstatus.
10069 Don't use the `suspended' flag. Don't consider pending breakpoints.
10070 (linux_resume): Start a step-over if necessary.
10071 (proceed_one_lwp): New.
10072 (proceed_all_lwps): New.
10073 (unstop_all_lwps): New.
10074 * linux-low.h (struct lwp_info): Rewrite comment for the
10075 `suspended' flag. Add the `stop_pc' field. Delete the
10076 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10077 Add `'last_resume_kind' and `need_step_over' fields.
10078 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10079 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10080 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10081 (set_raw_breakpoint_at): New.
10082 (set_breakpoint_at): Rewrite to use it.
10083 (reinsert_breakpoint_handler): Delete.
10084 (set_reinsert_breakpoint): New.
10085 (reinsert_breakpoint_by_bp): Delete.
10086 (delete_reinsert_breakpoints): New.
10087 (uninsert_breakpoint): Rewrite.
10088 (uninsert_breakpoints_at): New.
10089 (reinsert_breakpoint): Rewrite.
10090 (reinsert_breakpoints_at): New.
10091 (check_breakpoints): Rewrite.
10092 (breakpoint_here): New.
10093 (breakpoint_inserted_here): New.
10094 (check_mem_read): Adjust.
10095 * mem-break.h (breakpoints_supported, breakpoint_here)
10096 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10097 (reinsert_breakpoint_by_bp): Delete declaration.
10098 (delete_reinsert_breakpoints): Declare.
10099 (reinsert_breakpoint): Delete declaration.
10100 (reinsert_breakpoints_at): Declare.
10101 (uninsert_breakpoint): Delete declaration.
10102 (uninsert_breakpoints_at): Declare.
10103 (check_breakpoints): Adjust prototype.
10104 * server.h: Adjust include order.
10105 (struct thread_info): Declare here. Add a `last_status' field.
10107 2010-03-23 Michael Snyder <msnyder@vmware.com>
10109 * server.c (crc32): New function.
10110 (handle_query): Add handling for 'qCRC:' request.
10112 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10114 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10115 lwp had been stopped by a watchpoint.
10117 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10119 * server.h (internal_error): Declare.
10120 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10121 * utils.c (internal_error): New function.
10123 2010-03-15 Andreas Schwab <schwab@redhat.com>
10125 * configure.srv: Fix typo setting srv_regobj.
10127 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10129 * linux-low.c (fetch_register): Avoid passing a non string literal
10131 (usr_store_inferior_registers): Ditto.
10133 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10135 * linux-low.c (linux_write_memory): Bail out early if peeking
10138 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10140 * linux-low.h (struct lwp_info): New fields
10141 `stopped_by_watchpoint' and `stopped_data_address'.
10142 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10143 here, and cache them in the lwp object.
10144 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10146 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10148 (linux_stopped_by_watchpoint): Rewrite.
10149 (linux_stopped_data_address): Rewrite.
10151 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10153 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10154 switching the current inferior, not before.
10156 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10158 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10159 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10160 i386-linux.c and amd64-linux.c.
10161 (reg-i386.o): Removed.
10162 (reg-i386.c): Likewise.
10163 (reg-i386-linux.o): Likewise.
10164 (reg-i386-linux.c): Likewise.
10165 (reg-x86-64.o): Likewise.
10166 (reg-x86-64.c): Likewise.
10167 (reg-x86-64-linux.o): Likewise.
10168 (reg-x86-64-linux.c): Likewise.
10170 (i386.c): Likewise.
10171 (i386-linux.o): Likewise.
10172 (i386-linux.c): Likewise.
10173 (amd64.o): Likewise.
10174 (amd64.c): Likewise.
10175 (amd64-linux.o): Likewise.
10176 (amd64-linux.c): Likewise.
10178 * configure.srv (srv_i386_regobj): New.
10179 (srv_i386_linux_regobj): Likewise.
10180 (srv_amd64_regobj): Likewise.
10181 (srv_amd64_linux_regobj): Likewise.
10182 (srv_i386_32bit_xmlfiles): Likewise.
10183 (srv_i386_64bit_xmlfiles): Likewise.
10184 (srv_i386_xmlfiles): Likewise.
10185 (srv_amd64_xmlfiles): Likewise.
10186 (srv_i386_linux_xmlfiles): Likewise.
10187 (srv_amd64_linux_xmlfiles): Likewise.
10188 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10189 srv_xmlfiles to $srv_i386_xmlfiles.
10190 (i[34567]86-*-mingw32ce*): Likewise.
10191 (i[34567]86-*-mingw*): Likewise.
10192 (i[34567]86-*-nto*): Likewise.
10193 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10194 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10195 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10196 (x86_64-*-linux*): Likewise.
10198 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10199 (init_registers_amd64_linux): New.
10200 (x86_arch_setup): Replace init_registers_x86_64_linux with
10201 init_registers_amd64_linux.
10203 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10205 * configure.ac: Check for libdl. If it is not available link against
10206 static libthread_db.
10207 * configure: Regenerate.
10209 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10213 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10214 handing a read watchpoint.
10215 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10217 2010-02-12 Doug Evans <dje@google.com>
10219 * linux-low.c (linux_supports_tracefork_flag): Document.
10220 (linux_look_up_symbols): Add comment.
10222 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10224 * regcache.c (supply_register): Clear regcache if buf is NULL.
10226 2010-02-02 Nicolas Roche <roche@sourceware.org>
10227 Joel Brobecker <brobecker@adacore.com>
10229 * inferiors.c (find_inferior): Add function documentation.
10230 (unloaded_dll): Handle the case where the unloaded dll has not
10231 been previously registered in the dll list.
10233 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10235 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10236 (thumb2_breakpoint): New.
10237 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10239 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10241 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10242 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10245 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10247 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10249 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10251 * linux-s390-low.c (s390_collect_ptrace_register)
10252 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10254 2010-01-21 Doug Evans <dje@google.com>
10256 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10257 (PTRACE_ARG4_TYPE): New macro.
10258 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10259 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10260 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10261 (usr_store_inferior_registers): Ditto.
10262 (linux_read_memory, linux_write_memory): Ditto.
10263 (linux_test_for_tracefork): Ditto.
10265 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10266 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10268 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10270 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10273 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10275 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10276 prototype to take a regcache. Adjust.
10278 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10280 * regcache.h (struct thread_info): Forward declare.
10281 (struct regcache): New.
10282 (new_register_cache): Adjust prototype.
10283 (get_thread_regcache): Declare.
10284 (free_register_cache): Adjust prototype.
10285 (registers_to_string, registers_from_string): Ditto.
10286 (supply_register, supply_register_by_name, collect_register)
10287 (collect_register_as_string, collect_register_by_name): Ditto.
10288 * regcache.c (struct inferior_regcache_data): Delete.
10289 (get_regcache): Rename to ...
10290 (get_thread_regcache): ... this. Adjust. Switch inferior before
10291 fetching registers.
10292 (regcache_invalidate_one): Adjust.
10293 (regcache_invalidate): Fix prototype.
10294 (new_register_cache): Return the new register cache.
10295 (free_register_cache): Change prototype.
10296 (realloc_register_cache): Adjust.
10297 (registers_to_string): Change prototype to take a regcache. Adjust.
10298 (registers_from_string): Ditto.
10299 (register_data): Ditto.
10300 (supply_register): Ditto.
10301 (supply_register_by_name): Ditto.
10302 (collect_register): Ditto.
10303 (collect_register_as_string): Ditto.
10304 (collect_register_by_name): Ditto.
10305 * server.c (process_serial_event): Adjust.
10306 * linux-low.h (regset_fill_func, regset_store_func): Change
10308 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10310 * linux-low.c (get_stop_pc): Adjust.
10311 (check_removed_breakpoint): Adjust.
10312 (linux_wait_for_event): Adjust.
10313 (linux_resume_one_lwp): Adjust.
10314 (fetch_register): Add regcache parameter. Adjust.
10315 (usr_store_inferior_registers): Ditto.
10316 (regsets_fetch_inferior_registers): Ditto.
10317 (regsets_store_inferior_registers): Ditto.
10318 (linux_fetch_registers, linux_store_registers): Ditto.
10319 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10321 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10323 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10324 prototype to take a regcache.
10325 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10326 * remote-utils.c (convert_ascii_to_int, outreg)
10327 (prepare_resume_reply): Change prototype to take a regcache.
10329 * target.h (struct target_ops) <fetch_registers, store_registers>:
10330 Change prototype to take a regcache.
10331 (fetch_inferior_registers, store_inferior_registers): Change
10332 prototype to take a regcache. Adjust.
10333 * proc-service.c (ps_lgetregs): Adjust.
10334 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10335 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10336 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10337 take a regcache. Adjust.
10338 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10339 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10340 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10341 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10342 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10343 (cris_cannot_fetch_register):
10344 (cris_breakpoint_at): Change prototype to take a regcache.
10346 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10347 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10348 to take a regcache. Adjust.
10349 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10351 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10352 take a regcache. Adjust.
10353 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10354 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10355 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10356 * linux-mips-low.c (mips_get_pc):
10357 (mips_set_pc): Change prototype to take a regcache. Adjust.
10358 (mips_reinsert_addr): Adjust.
10359 (mips_collect_register): Change prototype to take a regcache.
10361 (mips_supply_register):
10362 (mips_collect_register_32bit, mips_supply_register_32bit)
10363 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10364 (mips_store_fpregset): Ditto.
10365 * linux-ppc-low.c (ppc_supply_ptrace_register)
10366 (ppc_supply_ptrace_register): Ditto.
10367 (parse_spufs_run): Adjust.
10368 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10369 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10370 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10371 take a regcache. Adjust.
10372 * linux-s390-low.c (s390_collect_ptrace_register)
10373 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10374 (s390_set_pc): Change prototype to take a regcache. Adjust.
10375 (s390_arch_setup): Adjust.
10376 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10377 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10378 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10379 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10380 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10382 (sparc_breakpoint_at): Adjust.
10383 * linux-xtensa-low.c (xtensa_fill_gregset):
10384 (xtensa_store_gregset):
10385 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10386 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10387 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10388 prototype to take a regcache. Adjust.
10389 * win32-arm-low.c (arm_fetch_inferior_register)
10390 (arm_store_inferior_register): Change prototype to take a
10392 * win32-i386-low.c (i386_fetch_inferior_register)
10393 (i386_store_inferior_register): Change prototype to take a
10395 * win32-low.c (child_fetch_inferior_registers)
10396 (child_store_inferior_registers): Change prototype to take a
10398 (win32_wait): Adjust.
10399 (win32_fetch_inferior_registers): Change prototype to take a
10401 (win32_store_inferior_registers): Adjust.
10402 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10403 store_inferior_register>: Change prototype to take a regcache.
10405 2010-01-20 Doug Evans <dje@google.com>
10407 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10409 (linux_wait_for_event1, linux_init_signals): Ditto.
10410 (W_STOPCODE): Provide definition if missing.
10412 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10414 * linux-low.c (linux_core_of_thread): New.
10415 (compare_ints, show_process, list_threads): New.
10416 (linux_qxfer_osdata): Report threads and cores.
10417 (linux_target_op): Register linux_core_of_thread.
10418 * remote-utils.c (prepare_resume_reply): Report the core.
10419 (buffer_xml_printf): Support %d specifier.
10420 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10422 (handle_query): Handle qXfer:threads. Announce availability
10424 * target.h (struct target_ops): New field core_of_thread.
10426 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10428 * Makefile.in (clean): Remove new generated files.
10429 (reg-s390.o, reg-s390.c): Remove rules.
10430 (reg-s390x.o, reg-s390x.c): Likewise.
10431 (s390-linux32.o, s390-linux32.c): Add rules.
10432 (s390-linux64.o, s390-linux64.c): Likewise.
10433 (s390x-linux64.o, s390x-linux64.c): Likewise.
10434 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10435 * linux-s390-low.c: Include <elf.h>.
10436 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10437 (init_registers_s390): Remove prototype.
10438 (init_registers_s390x): Likewise.
10439 (init_registers_s390_linux32): Add prototype.
10440 (init_registers_s390_linux64): Likewise.
10441 (init_registers_s390x_linux64): Likewise.
10442 (s390_num_regs_3264): New define.
10443 (s390_regmap_3264): New global variable.
10444 (s390_cannot_fetch_register): Remove obsolete check.
10445 (s390_cannot_store_register): Likewise.
10446 (s390_collect_ptrace_register): Handle upper/lower register halves.
10447 (s390_supply_ptrace_register): Likewise.
10448 (s390_fill_gregset): Update to register number changes.
10449 (s390_get_hwcap): New routine.
10450 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10451 Install appropriate regmap and register set.
10453 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10455 * server.c (gdbserver_version): Update copyright year to 2010.
10456 * gdbreplay.c (gdbreplay_version): Likewise.
10458 2009-12-28 Doug Evans <dje@google.com>
10460 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10461 elf/external.h. Include <elf.h> instead but only if necessary.
10463 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10465 * linux-low.c (linux_remove_process): Remove `detaching'
10466 parameter. Don't release/detach from thread_db here.
10467 (linux_kill): Release/detach from thread_db here, ...
10468 (linux_detach): ... and here, before actually detaching.
10469 (linux_wait_1): ... and here, when a process exits.
10470 * thread-db.c (any_thread_of): New.
10471 (thread_db_free): Switch the current inferior to a thread of the
10474 2009-12-21 Doug Evans <dje@google.com>
10476 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10478 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10479 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10480 warning ifndef __NR_tkill. Move setting of errno there too.
10481 Delete unnecessary resetting of errno after syscall.
10482 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10484 * configure.ac: Check for dladdr.
10485 * config.in: Regenerate.
10486 * configure: Regenerate.
10487 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10488 (try_thread_db_load): Update.
10490 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10492 2009-12-18 Doug Evans <dje@google.com>
10494 * event-loop.c: Include unistd.h if it exists.
10496 * linux-low.c (my_waitpid): Move definition away from being in
10497 between linux_tracefork_child/linux_test_for_tracefork.
10499 * gdb_proc_service.h (psaddr_t): Fix type.
10500 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10501 signature to match glibc.
10503 2009-12-16 Doug Evans <dje@google.com>
10505 * linux-low.c (linux_read_memory): Fix argument to read.
10507 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10509 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10510 events, don't leave current_inferior pointing at null.
10512 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10514 * win32-low.c (LOG): Delete.
10515 (OUTMSG): Output to stderr.
10516 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10517 on compile time LOG macro.
10518 (win32_wait): Fix debug output.
10520 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10522 * win32-low.c (win32_add_one_solib): If the dll name is
10523 "ntdll.dll", prepend the system directory to the dll path.
10525 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10527 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10529 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10530 Vladimir Prus <vladimir@codesourcery.com>
10532 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10533 * configure.ac: Check for __mcoldfire__ and set
10534 gdb_cv_m68k_is_coldfire.
10535 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10536 reg-cf.o and reg-m68k.o.
10537 * configure: Regenerated.
10539 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10541 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10542 Pass it to thread_db_free.
10543 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10544 proper `detaching' argument to linux_remove_process.
10545 * linux-low.h (thread_db_free): Add `detaching' parameter.
10546 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10548 (thread_db_free): Add `detaching' parameter. Only
10549 call td_ta_clear_event if detaching from process.
10551 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10553 * thread-db.c (thread_db_free): Fix typo.
10555 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10558 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10560 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10562 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10563 with an i686 compiler.
10564 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10566 * configure: Rebuilt.
10568 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10572 * server.c (handle_search_memory_1): Correct read_addr initialization
10573 in loop for searching subsequent chunks.
10575 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10577 * configure.ac: New --with-libthread-db option.
10578 * thread-db.c: Allow direct dependence on libthread_db.
10579 (thread_db_free): Adjust.
10580 * config.in: Regenerate.
10581 * configure: Likewise.
10583 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10586 * thread-db.c (attach_thread): New function.
10587 (maybe_attach_thread): Return success/failure.
10588 (find_new_threads_callback): Adjust.
10589 (thread_db_find_new_threads): Loop until no new threads.
10591 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10593 * proc-service.c (ps_lgetregs): Formatting.
10595 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10597 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10598 * configure.ac: Adjust.
10599 * linux-low.h (struct process_info_private): Move members to struct
10601 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10602 * linux-low.c (linux_remove_process): Adjust.
10603 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10604 * server.c (handle_query): Move code ...
10605 (handle_monitor_command): ... here. New function.
10606 * target.h (struct target_ops): New member.
10607 * thread-db.c (struct thread_db): New.
10608 (libthread_db_search_path): New variable.
10609 (thread_db_create_event, thread_db_enable_reporting)
10610 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10611 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10612 (try_thread_db_load_1, dladdr_to_soname): New functions.
10613 (try_thread_db_load, thread_db_load_search): New functions.
10614 (thread_db_init): Search for libthread_db.
10615 (thread_db_free): New function.
10616 (thread_db_handle_monitor_command): Likewise.
10617 * config.in: Regenerate.
10618 * configure: Regenerate.
10620 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10622 * spu-low.c (spu_kill): Wait for inferior to terminate.
10623 Call clear_inferiors.
10624 (spu_detach): Call clear_inferiors.
10626 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10628 * aclocal.m4: Regenerate.
10629 * config.in: Likewise.
10630 * configure: Likewise.
10632 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10634 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10635 (parse_spufs_run): New function.
10636 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10637 (ppc_breakpoint_at): Handle SPU breakpoints.
10639 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10641 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10642 (SPUFS_MAGIC): Define.
10643 (spu_enumerate_spu_ids): New function.
10644 (linux_qxfer_spu): New function.
10645 (linux_target_ops): Install linux_qxfer_spu.
10647 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10649 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10650 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10651 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10652 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10653 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10654 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10655 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10656 (init_registers_powerpc_cell32l): Add prototype.
10657 (init_registers_powerpc_cell64l): Likewise.
10658 (ppc_arch_setup): Detect Cell/B.E. architecture.
10660 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10662 * Makefile.in (datarootdir): New variable.
10664 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10666 * linux-low.c (linux_write_memory): Update debugging output.
10667 * Makefile.in (clean): Add new descriptions.
10668 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10669 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10670 * configure.srv: Add new files for arm*-*-linux*.
10671 * linux-arm-low.c: Add new declarations.
10672 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10673 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10674 (HWCAP_VFPv3D16): New.
10675 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10676 instead of __IWMMXT__.
10677 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10678 (arm_arch_setup): New.
10679 (target_regsets): Remove #ifdef. Add VFP regset.
10680 (the_low_target): Use arm_arch_setup.
10682 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10684 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10685 the main thread again.
10687 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10689 Adding Neutrino gdbserver.
10690 * configure: Regenerated.
10691 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10692 * configure.srv (i[34567]86-*-nto*): New target.
10693 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10694 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10695 (nto_comctrl) [__QNX__]: New function.
10696 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10698 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10700 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10703 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10704 Pedro Alves <pedro@codesourcery.com>
10706 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10707 don't support CONTEXT_EXTENDED_REGISTERS.
10708 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10709 (the_low_target): Install them.
10710 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10711 failing with ERROR_PIPE_NOT_CONNECTED.
10713 2009-06-30 Doug Evans <dje@google.com>
10714 Pierre Muller <muller@ics.u-strasbg.fr>
10716 Add h/w watchpoint support to x86-linux, win32-i386.
10717 * Makefile.in (SFILES): Add i386-low.c
10718 (i386_low_h): Define.
10719 (i386-low.o): Add dependencies.
10720 (linux-x86-low.o): Add i386-low.h dependency.
10721 (win32-i386-low.o): Ditto.
10722 * i386-low.c: New file.
10723 * i386-low.h: New file.
10724 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10725 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10726 * linux-low.c (linux_add_process): Initialize arch_private.
10727 (linux_remove_process): Free arch_private.
10728 (add_lwp): Initialize arch_private.
10729 (delete_lwp): Free arch_private.
10730 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10732 * linux-low.h (process_info_private): New member arch_private.
10733 (lwp_info): New member arch_private.
10734 (linux_target_ops): New members new_process, new_thread,
10736 (ptid_of): New macro.
10737 * linux-x86-low.c: Include stddef.h, i386-low.h.
10738 (arch_process_info): New struct.
10739 (arch_lwp_info): New struct.
10740 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10741 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10742 (i386_dr_low_get_status): New function.
10743 (x86_insert_point, x86_remove_point): New functions.
10744 (x86_stopped_by_watchpoint): New function.
10745 (x86_stopped_data_address): New function.
10746 (x86_linux_new_process, x86_linux_new_thread): New functions.
10747 (x86_linux_prepare_to_resume): New function.
10748 (the_low_target): Add entries for insert_point, remove_point,
10749 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10751 * server.c (debug_hw_points): New global.
10752 (monitor_show_help): Document set debug-hw-points.
10753 (handle_query): Process "set debug-hw-points".
10754 * server.h (debug_hw_points): Declare.
10755 (paddress): Declare.
10756 * utils.c (NUMCELLS, CELLSIZE): New macros.
10757 (get_sell, xsnprintf, paddress): New functions.
10758 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10759 remove_point, stopped_by_watchpoint, stopped_data_address.
10760 * win32-i386-low.c: Include i386-low.h.
10761 (debug_reg_state): Replaces dr.
10762 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10763 (i386_dr_low_get_status): New function.
10764 (i386_insert_point, i386_remove_point): New functions.
10765 (i386_stopped_by_watchpoint): New function.
10766 (i386_stopped_data_address): New function.
10767 (i386_initial_stuff): Update.
10768 (get_thread_context,set_thread_context,i386_thread_added): Update.
10769 (the_low_target): Add entries for insert_point,
10770 remove_point, stopped_by_watchpoint, stopped_data_address.
10771 * win32-low.c (win32_insert_watchpoint): New function.
10772 (win32_remove_watchpoint): New function.
10773 (win32_stopped_by_watchpoint): New function.
10774 (win32_stopped_data_address): New function.
10775 (win32_target_ops): Add entries for insert_watchpoint,
10776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10777 * win32-low.h (win32_target_ops): New members insert_point,
10778 remove_point, stopped_by_watchpoint, stopped_data_address.
10780 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10782 * server.c (process_serial_event): Re-return unsupported, not
10783 error, if the type isn't recognized. Re-allow supporting only
10784 insert or remove packets. Also call require_running for
10785 breakpoints. Add missing break statement to default case. Tidy.
10786 * target.h (struct target_ops): Rename insert_watchpoint to
10787 insert_point, and remove_watchpoint to remove_point.
10789 * linux-low.h (struct linux_target_ops): Likewise.
10790 * linux-low.c (linux_insert_watchpoint): Rename to ...
10791 (linux_insert_point): ... this. Adjust.
10792 (linux_remove_watchpoint): Rename to ...
10793 (linux_remove_point): ... this. Adjust.
10794 (linux_target_ops): Adjust.
10795 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10796 (cris_insert_point): ... this.
10797 (cris_remove_watchpoint): Rename to ...
10798 (cris_remove_point): ... this.
10799 (the_low_target): Adjust.
10801 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10803 * server.c (handle_v_kill): Pass signal_pid to
10804 kill_inferior if multi_process is zero.
10806 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10808 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10809 * target.h (target_ops): Comment for *_watchpoint to make it clear
10810 the functions can get types '0' and '1'.
10812 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10814 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10815 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10816 * regcache.c (get_regcache): Likewise.
10817 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10818 * win32-low.c (child_fetch_inferior_registers): Remove check for
10821 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10822 Pedro Alves <pedro@codesourcery.com>
10824 * target.h (struct target_ops) <supports_multi_process>: New
10826 (target_supports_multi_process): New.
10827 * server.c (handle_query): Even if GDB reports support, only
10828 enable multi-process if the target also supports it. Report
10829 multi-process support only if the target backend supports it.
10830 * linux-low.c (linux_supports_multi_process): New function.
10831 (linux_target_ops): Install it as target_supports_multi_process
10834 2009-05-24 Doug Evans <dje@google.com>
10836 Global renaming of find_thread_pid to find_thread_ptid.
10837 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10838 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10839 All callers updated.
10841 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10842 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10845 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10846 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10847 (linux_resume_one_lwp): Ditto.
10849 2009-05-23 Doug Evans <dje@google.com>
10851 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10852 from struct inferior_list_entry * to struct lwp_info *.
10853 All callers updated.
10855 2009-05-13 Doug Evans <dje@google.com>
10857 * linux-x86-low.c: Don't include assert.h.
10858 (x86_siginfo_fixup): Use fatal, not assert.
10859 (x86_arch_setup): Fix comment.
10861 2009-05-12 Doug Evans <dje@google.com>
10863 Biarch support for i386/amd64 gdbserver.
10864 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10865 Add linux-x86-low.c.
10866 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10867 (linux-x86-low.o): Add.
10868 * linux-x86-64-low.c: Delete.
10869 * linux-i386-low.c: Delete.
10870 * linux-x86-low.c: New file.
10871 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10873 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10875 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10876 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10877 (linux_child_pid_to_exec_file): New function.
10878 (elf_64_header_p, elf_64_file_p): New functions.
10879 (siginfo_fixup): New function.
10880 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10881 give target a chance to convert layout.
10882 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10883 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10885 2009-05-07 Doug Evans <dje@google.com>
10887 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10888 (regsets_store_inferior_registers): Ditto.
10890 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10894 * linux-low.c (must_set_ptrace_flags): Delete.
10895 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10897 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10898 `lwp->must_set_ptrace_flags' instead.
10899 (linux_wait_for_event_1): Set ptrace options here.
10900 (linux_wait_1): ... not here.
10902 2009-04-30 Doug Evans <dje@google.com>
10904 * inferiors.c (started_inferior_callback): New function.
10905 (attached_inferior_callback): New function.
10906 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10907 * server.c (print_started_pid, print_attached_pid): New functions.
10908 (detach_or_kill_for_exit): New function.
10909 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10910 * server.h (have_started_inferiors_p): Declare.
10911 (have_attached_inferiors_p): Declare.
10913 * inferiors.c (remove_process): Fix memory leak, free process.
10914 * linux-low.c (linux_remove_process): New function.
10915 (linux_kill): Call it instead of remove_process.
10916 (linux_detach, linux_wait_1): Ditto.
10918 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10920 * configure.srv: Add x86 Windows CE target.
10922 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10924 * inferiors.c (get_thread_process): Make global.
10925 * server.h (get_thread_process): Add prototype.
10926 * thread-db.c (find_one_thread): Use get_thread_process
10927 instead of current_process.
10928 (thread_db_get_tls_address): Do not crash if called when
10929 thread layer is not yet initialized.
10931 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10933 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10934 * spu-low.c (current_tid): Rename to ...
10935 (current_ptid): ... this.
10936 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10937 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10938 ptid_get_lwp (current_ptid) instead of current_tid.
10939 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10940 instead of current_tid. Use find_process_pid to verify pid
10941 argument is valid. Pass proper argument to remove_process.
10942 (spu_thread_alive): Compare current_ptid instead of current_tid.
10943 (spu_resume): Likewise.
10945 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10947 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10950 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10952 Implement the multiprocess extensions, and add linux multiprocess
10955 * server.h (ULONGEST): Declare.
10956 (struct ptid, ptid_t): New.
10957 (minus_one_ptid, null_ptid): Declare.
10958 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10959 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10960 (struct inferior_list_entry): Change `id' type from unsigned from
10962 (struct sym_cache, struct breakpoint, struct
10963 process_info_private): Forward declare.
10964 (struct process_info): Declare.
10965 (current_process): Declare.
10966 (all_processes): Declare.
10967 (initialize_inferiors): Declare.
10968 (add_thread): Adjust to use ptid_t.
10969 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10970 (add_process, remove_process, find_thread_pid): Declare.
10971 (find_inferior_id): Adjust to use ptid_t.
10972 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10973 (multi_process): Declare.
10974 (push_event): Adjust to use ptid_t.
10975 (read_ptid, write_ptid): Declare.
10976 (prepare_resume_reply): Adjust to use ptid_t.
10977 (clear_symbol_cache): Declare.
10978 * inferiors.c (all_processes): New.
10979 (null_ptid, minus_one_ptid): New.
10980 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10981 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10982 (add_thread): Change unsigned long to ptid. Remove gdb_id
10984 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10985 (gdb_id_to_thread): Rename to ...
10986 (find_thread_pid): ... this. Change unsigned long to ptid.
10987 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10988 (loaded_dll, pull_pid_from_list): Adjust.
10989 (add_process, remove_process, find_process_pid)
10990 (get_thread_process, current_process, initialize_inferiors): New.
10991 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10992 (struct target_waitstatus) <related_pid>: Ditto.
10993 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10994 return type to int.
10995 (struct target_ops) <join>: Add `pid' argument.
10996 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10997 (struct target_ops) <wait>: Add `ptid' field. Change return type
10999 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11000 (mywait): Add `ptid' argument. Change return type to ptid_t.
11001 (target_pid_to_str): Declare.
11002 * target.c (set_desired_inferior): Adjust to use ptids.
11003 (mywait): Add new `ptid' argument. Adjust.
11004 (target_pid_to_str): New.
11005 * mem-break.h (free_all_breakpoints): Declare.
11006 * mem-break.c (breakpoints): Delelete.
11007 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11008 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11009 to use per-process breakpoint list.
11010 (free_all_breakpoints): New.
11011 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11012 (symbol_cache, all_symbols_looked_up): Delete.
11014 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11016 (prepare_resume_reply): Change ptid argument's type from unsigned
11017 long to ptid_t. Adjust. Implement W;process and X;process.
11018 (free_sym_cache, clear_symbol_cache): New.
11019 (look_up_one_symbol): Adjust to per-process symbol cache. *
11020 * server.c (cont_thread, general_thread, step_thread): Change type
11022 (attached): Delete.
11023 (multi_process): New.
11024 (last_ptid): Change type to ptid_t.
11025 (struct vstop_notif) <ptid>: Change type to ptid_t.
11026 (queue_stop_reply, push_event): Change `ptid' argument's type to
11028 (discard_queued_stop_replies): Add `pid' argument.
11029 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11030 changes. Don't reference the `attached' global.
11031 (attach_inferior): Adjust to mywait interface changes.
11032 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11033 features. Handle and report "multiprocess+". Handle
11035 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11037 (handle_v_kill): New.
11038 (handle_v_stopped): Adjust to use target_pid_to_str.
11039 (handle_v_requests): Allow multiple attaches and runs when
11040 multiprocess extensions are in effect. Handle "vKill".
11041 (myresume): Adjust to use ptids.
11042 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11043 (handle_status): Adjust to discard_queued_stop_replies interface
11045 (first_thread_of, kill_inferior_callback)
11046 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11047 (main): Call initialize_inferiors. Adjust to use ptids, killing
11048 and detaching from all inferiors. Handle multiprocess packet
11050 * linux-low.h: Include gdb_proc_service.h.
11051 (struct process_info_private): New.
11052 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11053 <lwpid_of>: Use ptid_get_lwp.
11054 (get_lwp_thread): Adjust.
11055 (struct lwp_info): Add `dead' member.
11056 (find_lwp_pid): Declare.
11057 * linux-low.c (thread_db_active): Delete.
11058 (new_inferior): Adjust comment.
11059 (inferior_pid): Delete.
11060 (linux_add_process): New.
11061 (handle_extended_wait): Adjust.
11062 (add_lwp): Change unsigned long to ptid.
11063 (linux_create_inferior): Add process to processes table. Adjust
11064 to use ptids. Don't set new_inferior here.
11065 (linux_attach_lwp): Rename to ...
11066 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11067 it. Adjust to use ptids.
11068 (linux_attach_lwp): New.
11069 (linux_attach): Add process to processes table. Don't set
11071 (struct counter): New.
11072 (second_thread_of_pid_p, last_thread_of_process_p): New.
11073 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11074 multiple processes.
11075 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11076 processes. Remove process from process table.
11077 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11078 to multiple processes.
11079 (any_thread_of): New.
11080 (linux_detach): Add `pid' argument, and handle it. Remove process
11081 from processes table.
11082 (linux_join): Add `pid' argument. Handle it.
11083 (linux_thread_alive): Change unsighed long argument to ptid_t.
11084 Consider dead lwps as not being alive.
11085 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11086 threads we're not interested in.
11087 (same_lwp, find_lwp_pid): New.
11088 (linux_wait_for_lwp): Change `pid' argument's type from int to
11090 (linux_wait_for_event): Rename to ...
11091 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11092 from int to ptid_t. Adjust.
11093 (linux_wait_for_event): New.
11094 (linux_wait_1): Add `ptid' argument. Change return type to
11095 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11096 that exit from the process table.
11097 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11099 (mark_lwp_dead): New.
11100 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11101 stopping all threads, mark its main lwp as dead.
11102 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11104 (fetch_register, usr_store_inferior_registers)
11105 (regsets_fetch_inferior_registers)
11106 (regsets_store_inferior_registers, linux_read_memory)
11107 (linux_write_memory): Inline `inferior_pid'.
11108 (linux_look_up_symbols): Adjust to use per-process
11109 `thread_db_active'.
11110 (linux_request_interrupt): Adjust to use ptids.
11111 (linux_read_auxv): Inline `inferior_pid'.
11112 (initialize_low): Don't reference thread_db_active.
11113 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11114 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11115 (ps_getpid): Return the pid of the current inferior.
11116 * thread-db.c (proc_handle, thread_agent): Delete.
11117 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11119 (find_one_thread): Change argument type to ptid_t. Adjust to
11121 (maybe_attach_thread): Adjust to per-process data and ptids.
11122 (thread_db_find_new_threads): Ditto.
11123 (thread_db_init): Ditto.
11124 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11125 processes table. Adjust to use ptids.
11126 (spu_kill, spu_detach): Adjust interface. Remove process from
11128 (spu_join, spu_thread_alive): Adjust interface.
11129 (spu_wait): Adjust interface. Remove process from processes
11130 table. Adjust to use ptids.
11131 * win32-low.c (current_inferior_tid): Delete.
11132 (current_inferior_ptid): New.
11133 (debug_event_ptid): New.
11134 (thread_rec): Take a ptid. Adjust.
11135 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11136 (child_delete_thread): Ditto.
11137 (do_initial_child_stuff): Add `attached' argument. Add process to
11139 (child_fetch_inferior_registers, child_store_inferior_registers):
11141 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11142 (win32_attach): Pass 1 to do_initial_child_stuff.
11143 (win32_kill): Adjust interface. Remove process from processes
11145 (win32_detach): Ditto.
11146 (win32_join): Adjust interface.
11147 (win32_thread_alive): Take a ptid.
11148 (win32_resume): Adjust to use ptids.
11149 (get_child_debug_event): Ditto.
11150 (win32_wait): Adjust interface. Remove exiting process from
11153 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11155 Non-stop mode support.
11157 * server.h (non_stop): Declare.
11158 (gdb_client_data, handler_func): Declare.
11159 (delete_file_handler, add_file_handler, start_event_loop):
11161 (handle_serial_event, handle_target_event, push_event)
11162 (putpkt_notif): Declare.
11163 * target.h (enum resume_kind): New.
11164 (struct thread_resume): Replace `step' field by `kind' field.
11165 (TARGET_WNOHANG): Define.
11166 (struct target_ops) <wait>: Add `options' argument.
11167 <supports_non_stop, async, start_non_stop>: New fields.
11168 (target_supports_non_stop, target_async): New.
11169 (start_non_stop): Declare.
11170 (mywait): Add `options' argument.
11171 * target.c (mywait): Add `options' argument. Print child exit
11172 notifications here.
11173 (start_non_stop): New.
11174 * server.c (non_stop, own_buf, mem_buf): New globals.
11175 (struct vstop_notif): New.
11176 (notif_queue): New global.
11177 (queue_stop_reply, push_event, discard_queued_stop_replies)
11178 (send_next_stop_reply): New.
11179 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11181 (attach_inferior): In non-stop mode, don't wait for the target
11183 (handle_general_set): Handle QNonStop.
11184 (handle_query): When handling qC, return the current general
11185 thread, instead of the first thread of the list.
11186 (handle_query): If the backend supports non-stop mode, include
11187 QNonStop+ in the qSupported query response.
11188 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11190 (handle_v_attach, handle_v_run): Handle non-stop mode.
11191 (handle_v_stopped): New.
11192 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11193 (myresume): Adjust to use resume_kind. Handle non-stop.
11194 (queue_stop_reply_callback): New.
11195 (handle_status): Handle non-stop mode.
11196 (main): Clear non_stop flag on reconnection. Use the event-loop.
11197 Refactor serial protocol handling from here ...
11198 (process_serial_event): ... to this new function. When GDB
11199 selects any thread, select one here. In non-stop mode, wait until
11200 GDB acks all pending events before exiting.
11201 (handle_serial_event, handle_target_event): New.
11202 * remote-utils.c (remote_open): Install remote_desc in the event
11204 (remote_close): Remove remote_desc from the event loop.
11205 (putpkt_binary): Rename to...
11206 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11207 (putpkt_binary): New as wrapper around putpkt_binary_1.
11208 (putpkt_notif): New.
11209 (prepare_resume_reply): In non-stop mode, don't change the
11211 * event-loop.c: New.
11212 * Makefile.in (OBJ): Add event-loop.o.
11213 (event-loop.o): New rule.
11215 * linux-low.h (pid_of): Moved here.
11217 (get_lwp_thread): Use lwpid_of.
11218 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11219 * linux-low.c (pid_of): Delete.
11220 (inferior_pid): Use lwpid_of.
11221 (linux_event_pipe): New.
11222 (target_is_async_p): New.
11224 (handle_extended_wait): Use lwpid_of.
11225 (add_lwp): Don't set lwpid field.
11226 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11227 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11228 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11229 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11230 first. Adjust to linux_wait_for_event interface changes. Use
11232 (linux_detach): Don't delete the main lwp here.
11233 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11234 (status_pending_p): Don't consider explicitly suspended lwps.
11235 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11236 pointer. Add OPTIONS argument. Change return type to int. Use
11237 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11238 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11239 pointer. Add status pointer argument. Return a pid instead of a
11240 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11241 changes. In non-stop mode, don't switch to a random thread.
11242 (linux_wait): Rename to...
11243 (linux_wait_1): ... this. Add target_options argument, and handle
11244 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11245 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11246 clean exit and signal exit code. Don't stop all threads in
11247 non-stop mode. In all-stop mode, only stop all threads when
11248 reporting a stop to GDB. Handle explicit thread stop requests.
11249 (async_file_flush, async_file_mark): New.
11251 (send_sigstop): Use lwpid_of.
11252 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11253 interface changes. In non-stop mode, don't switch to a random
11255 (linux_resume_one_lwp): Use lwpid_of.
11256 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11257 (linux_resume_one_thread): ... this. Handle resume_stop. In
11258 non-stop mode, don't look for pending flag in all threads.
11259 (resume_status_pending_p): Don't consider explicitly suspended
11261 (my_waitpid): Reimplement. Emulate __WALL.
11262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11264 (sigchld_handler, linux_supports_non_stop, linux_async)
11265 (linux_start_non_stop): New.
11266 (linux_target_ops): Register linux_supports_non_stop, linux_async
11267 and linux_start_non_stop.
11268 (initialize_low): Install SIGCHLD handler.
11269 * thread-db.c (thread_db_create_event, find_one_thread)
11270 (thread_db_get_tls_address): Use lwpid_of.
11271 * win32-low.c (win32_detach): Adjust to use resume_kind.
11272 (win32_wait): Add `options' argument.
11273 * spu-low.c (spu_resume): Adjust to use resume_kind.
11274 (spu_wait): Add `options' argument.
11276 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11278 Decouple target code from remote protocol.
11280 * target.h (enum target_waitkind): New.
11281 (struct target_waitstatus): New.
11282 (struct target_ops) <wait>: Return an unsigned long. Take a
11283 target_waitstatus pointer instead of a char pointer.
11284 (mywait): Likewise.
11285 * target.c (mywait): Change prototype to return an unsigned long.
11286 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11287 * server.h (thread_from_wait, old_thread_from_wait): Delete
11289 (prepare_resume_reply): Change prototype to take a
11291 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11292 (last_status, last_ptid): New.
11293 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11294 pid instead of a signal.
11295 (attach_inferior): Remove "status" and "signal" parameters.
11297 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11299 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11300 (handle_v_requests, myresume): Remove "status" and "signal"
11301 parameters. Adjust.
11302 (handle_status): New.
11303 (main): Delete local `status'. Adjust.
11304 * remote-utils.c: Include target.h.
11305 (prepare_resume_reply): Change prototype to take a
11306 target_waitstatus. Adjust.
11308 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11310 * spu-low.c (spu_wait): Adjust.
11311 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11313 (win32_wait): Adjust.
11315 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11317 * target.h (struct thread_resume): Delete leave_stopped member.
11318 (struct target_ops): Add a `n' argument to the `resume' callback.
11319 * server.c (start_inferior): Adjust.
11320 (handle_v_cont, myresume): Adjust.
11321 * linux-low.c (check_removed_breakpoint): Adjust to resume
11322 interface change, and to removed leave_stopped field.
11323 (resume_ptr): Delete.
11324 (struct thread_resume_array): New.
11325 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11326 resume interface change.
11327 (linux_continue_one_thread, linux_queue_one_thread)
11328 (resume_status_pending_p): Check if the resume field is NULL
11329 instead of checking the leave_stopped member.
11330 (linux_resume): Adjust to the target resume interface change.
11331 * spu-low.c (spu_resume): Adjust to the target resume interface
11333 * win32-low.c (win32_detach, win32_resume): Ditto.
11335 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11337 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11339 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11341 (linux_continue_one_thread): Only preserve the stepping flag if
11342 there's a pending breakpoint.
11344 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11346 * server.c (main): After the inferior having exited, call
11347 remote_close before exiting gdbserver.
11349 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11351 Fix size of FPSCR in Power 7 processors.
11352 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11353 (PPC_FEATURE_HAS_DFP): New #define.
11354 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11357 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11359 * server.c (handle_query) Whitespace and formatting.
11361 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11363 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11364 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11365 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11366 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11367 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11368 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11369 Makefile.in, configure.ac: Fix whitespace throughout.
11370 * configure: Regenerate.
11372 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11374 * inferiors.c (find_inferior): Make it safe for the callback
11375 function to delete the currently iterated inferior.
11377 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11379 * Makefile.in (linuw_low_h): Move higher.
11380 (thread-db.o): Depend on $(linux_low_h).
11382 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11384 Rename "process" to "lwp" throughout.
11386 * linux-low.c (all_processes): Rename to...
11387 (all_lwps): ... this.
11388 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11389 (add_process): Rename to ...
11390 (add_lwp): ... this. Adjust.
11391 (linux_create_inferior): Adjust.
11392 (linux_attach_lwp): Adjust.
11393 (linux_attach): Adjust.
11394 (linux_kill_one_process): Rename to ...
11395 (linux_kill_one_lwp): ... this. Adjust.
11396 (linux_kill): Adjust.
11397 (linux_detach_one_process): Rename to ...
11398 (linux_detach_one_lwp): ... this. Adjust.
11399 (linux_detach): Adjust.
11400 (check_removed_breakpoint): Adjust.
11401 (status_pending_p): Adjust.
11402 (linux_wait_for_process): Rename to ...
11403 (linux_wait_for_lwp): ... this. Adjust.
11404 (linux_wait_for_event): Adjust.
11405 (send_sigstop): Adjust.
11406 (wait_for_sigstop): Adjust.
11407 (stop_all_processes): Rename to ...
11408 (stop_all_lwps): ... this.
11409 (linux_resume_one_process): Rename to ...
11410 (linux_resume_one_lwp): ... this. Adjust.
11411 (linux_set_resume_request, linux_continue_one_thread)
11412 (linux_queue_one_thread, resume_status_pending_p)
11413 (usr_store_inferior_registers, regsets_store_inferior_registers)
11414 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11416 * linux-low.h (get_process): Rename to ...
11417 (get_lwp): ... this. Adjust.
11418 (get_thread_process): Rename to ...
11419 (get_thread_lwp): ... this. Adjust.
11420 (get_process_thread): Rename to ...
11421 (get_lwp_thread): ... this. Adjust.
11422 (struct process_info): Rename to ...
11423 (struct lwp_info): ... this.
11424 (all_processes): Rename to ...
11425 (all_lwps): ... this.
11426 * proc-service.c (ps_lgetregs): Adjust.
11427 * thread-db.c (thread_db_create_event, find_one_thread)
11428 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11430 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11432 * server.c (handle_query): Handle "qAttached".
11434 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11436 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11437 GPLv3, update license URL.
11439 2009-03-01 Doug Evans <dje@google.com>
11441 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11442 (server_h): Add gdb_signals.h.
11443 (signals.o): Update.
11444 * server.h (target_signal_from_host,target_signal_to_host_p)
11445 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11447 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11449 * remote-utils.c (getpkt): Also generate remote-debug
11450 information if noack_mode is set.
11452 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11454 * server.c (handle_query): Report qXfer:siginfo:read and
11455 qXfer:siginfo:write as supported and handle them.
11456 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11457 * linux-low.c (linux_xfer_siginfo): New.
11458 (linux_target_ops): Set it.
11460 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11462 * server.c (gdbserver_usage): Mention --remote-debug.
11463 (main): Accept '--remote-debug' switch.
11465 2009-01-18 Doug Evans <dje@google.com>
11467 * regcache.c (new_register_cache): No need to check result of xcalloc.
11468 * server.c (handle_search_memory): Back out calls to xmalloc,
11469 result is checked and error is returned to user upon failure.
11470 (handle_query): Ditto. Add more checks for result of malloc.
11471 (handle_v_cont): Check result of malloc, report error back to
11473 (handle_v_run): Ditto. Call freeargv.
11474 * server.h (freeargv): Declare.
11475 * utils.c (freeargv): New fn.
11477 2009-01-15 Doug Evans <dje@google.com>
11479 * gdbreplay.c (perror_with_name): Make arg const char *.
11480 * server.h (target_signal_to_name): Make return type const char *.
11481 * thread-db.c (thread_db_err_str): Make return type const char *.
11482 * utils.c (perror_with_name): Make arg const char *.
11484 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11486 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11487 when handling a EXIT_PROCESS_DEBUG_EVENT.
11489 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11491 * gdbreplay.c (gdbreplay_version): Update copyright year.
11492 * server.c (gdbserver_version): Likewise.
11494 2009-01-05 Doug Evans <dje@google.com>
11496 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11497 (handle_extended_wait): Improve comment.
11499 2008-12-13 Doug Evans <dje@google.com>
11501 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11502 * server.h (ATTR_MALLOC): New macro.
11503 (xmalloc,xcalloc,xstrdup): Declare.
11504 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11505 * inferiors.c: Ditto.
11506 * linux-low.c: Ditto.
11507 * mem-break.c: Ditto.
11508 * regcache.c: Ditto.
11509 * remote-utils.c: Ditto.
11512 * win32-low.c: Ditto.
11514 2008-12-12 Doug Evans <dje@google.com>
11516 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11517 in debugging printf.
11519 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11521 2008-12-09 Doug Evans <dje@google.com>
11523 * linux-low.h (struct process_info): Delete member tid, unused.
11524 * thread-db.c (find_one_thread): Update.
11525 (maybe_attach_thread): Update.
11527 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11529 * target.h (struct target_ops): Add qxfer_osdata member.
11530 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11532 (linux_qxfer_osdata): New functions.
11533 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11535 * server.c (handle_query): Handle "qXfer:osdata:read:".
11536 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11537 (buffer_xml_printf): New functions.
11538 * server.h (struct buffer): New.
11539 (buffer_grow_str, buffer_grow_str0): New macros.
11540 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11541 (buffer_xml_printf): Declare.
11543 2008-11-24 Doug Evans <dje@google.com>
11545 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11547 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11549 * server.c (handle_v_run): Always use the supplied argument list.
11551 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11553 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11554 (xtensa_regmap_table): Add entry for scompare1.
11556 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11558 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11559 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11560 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11561 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11562 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11563 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11564 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11565 XML target descriptions.
11566 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11567 when inferior is running on an ISA 2.05 or later processor. Add
11568 special case to return offset for full 64-bit slot of FPSCR when
11571 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11573 * Makefile.in (SFILES, clean): Added sparc64 files.
11574 (reg-sparc64.o, reg-sparc64.c): New.
11575 * configure.srv (sparc*-*-linux*): New configuration.
11576 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11577 syscall arguments for SPARC.
11578 (regsets_store_inferior_registers): Likewise.
11579 * linux-sparc-low.c: New file.
11581 2008-10-21 Doug Evans <dje@google.com>
11583 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11584 (READLINE_DIR,READLINE_DEP): Delete.
11585 (INTERNAL_CFLAGS): Update.
11586 (LINTFLAGS): Update.
11588 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11590 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11591 whole argv from the last run, not just argv[0].
11593 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11595 * regcache.c (new_register_cache): Return NULL if the register
11596 cache size isn't known yet.
11597 (free_register_cache): Avoid dereferencing a NULL regcache.
11599 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11601 * configure.srv: Merge MIPS and MIPS64.
11603 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11605 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11607 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11609 * Makefile.in: Add required vsx dependencies.
11611 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11612 Declare init_registers_powerpc_vsx32l.
11613 Declare init_registers_powerpc_vsx64l.
11614 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11615 (ppc_arch_setup): Check for VSX in hwcap.
11616 (ppc_fill_vsxregset): New function.
11617 (ppc_store_vsxregset): New function.
11618 Add new VSX entry in regset_info target_regsets.
11620 * configure.srv: Add new VSX dependencies.
11622 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11624 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11625 (remote_open): Set or clear transport_is_reliable.
11626 (putpkt_binary): Don't expect acks in noack mode.
11627 (getpkt): Don't send ack/nac in noack mode.
11628 * server.c (handle_general_set): Handle QStartNoAckMode.
11629 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11631 (main): Reset noack_mode on every connection.
11632 * server.h (noack_mode): Declare.
11634 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11636 * Makefile.in (GDBREPLAY_OBS): New variable.
11637 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11639 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11640 Daniel Jacobowitz <dan@codesourcery.com>
11642 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11643 (usr_store_inferior_registers): Likewise.
11644 (regsets_store_inferior_registers): Likewise.
11646 2008-07-31 Rolf Jansen <rj@surtec.com>
11647 Pedro Alves <pedro@codesourcery.com>
11649 * configure.ac: Check for memmem declaration.
11650 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11651 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11652 (disable_packet_qfThreadInfo): Unconditionally compile.
11653 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11654 * configure, config.in: Regenerate.
11656 2008-07-28 Doug Kwan <dougkwan@google.com>
11658 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11659 (linux_write_memory): Remove declaration of errno.
11661 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11663 * linux-low.c (handle_extended_wait): Do not use "status"
11664 variable uninitialized.
11666 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11668 * server.c (handle_v_attach): Inhibit reporting dll changes.
11670 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11672 * remote-utils.c (prepare_resume_reply): If requested, don't
11673 output "thread:TID" in the T stop reply.
11675 * server.c (disable_packet_vCont, disable_packet_Tthread)
11676 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11677 (handle_query): If requested, disable support for qC, qfThreadInfo
11679 (handle_v_requests): If requested, disable support for vCont.
11680 (gdbserver_show_disableable): New.
11681 (main): Handle --disable-packet and --disable-packet=LIST.
11683 * server.h (disable_packet_vCont, disable_packet_Tthread)
11684 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11686 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11688 * server.c (gdbserver_usage): Mention --version.
11690 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11692 * Makefile.in (gdbreplay.o): New rule.
11694 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11696 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11697 message, not gdbserver.
11699 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11700 Nathan Sidwell <nathan@codesourcery.com>
11701 Joseph Myers <joseph@codesourcery.com>
11703 * acinclude.m4: Include ../../config/acx.m4.
11704 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11705 * configure, config.in: Regenerate.
11706 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11707 * server.c (gdbserver_version): Print PKGVERSION.
11708 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11709 (main): Adjust gdbserver_usage calls.
11710 * gdbreplay.c (version, host_name): Add declarations.
11711 (gdbreplay_version, gdbreplay_usage): New.
11712 (main): Accept --version and --help options.
11714 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11716 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11717 (arm_breakpoint_at): Handle Thumb.
11718 (the_low_target): Add comment.
11720 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11722 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11724 2008-05-09 Doug Evans <dje@google.com>
11726 * server.h (decode_search_memory_packet): Declare.
11727 * remote-utils.c (decode_search_memory_packet): New fn.
11728 * server.c (handle_search_memory_1): New fn.
11729 (handle_search_memory): New fn.
11730 (handle_query): Process qSearch:memory packets.
11732 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11734 * regcache.c (registers_length): Remove.
11735 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11736 full register packet.
11737 * regcache.h (registers_length): Remove prototype.
11738 * server.h (PBUFSIZ): Define to 16384.
11740 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11742 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11743 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11744 powerpc-64l.o, and powerpc-altivec64l.o.
11745 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11746 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11747 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11748 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11749 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11752 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11753 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11754 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11755 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11756 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11757 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11758 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11759 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11760 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11761 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11764 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11765 (init_registers_powerpc_32l): ... this new prototype.
11766 (init_registers_powerpc_32): Remove, replace by ...
11767 (init_registers_powerpc_altivec32l): ... this new prototype.
11768 (init_registers_powerpc_e500): Remove, replace by ...
11769 (init_registers_powerpc_e500l): ... this new prototype.
11770 (init_registers_ppc64): Remove, replace by ...
11771 (init_registers_powerpc_64l): ... this new prototype.
11772 (init_registers_powerpc_64): Remove, replace by ...
11773 (init_registers_powerpc_altivec64l): ... this new prototype.
11774 (ppc_num_regs): Set to 73.
11775 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11776 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11777 (ppc_cannot_store_register): Handle orig_r3 and trap.
11778 (ppc_arch_setup): Update init_registers_... calls.
11779 (ppc_fill_gregset): Handle orig_r3 and trap.
11781 * inferiors.c (clear_inferiors): Reset current_inferior.
11783 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11785 * acinclude.m4: Add override.m4.
11786 * configure: Regenerate.
11788 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11790 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11791 initial call to init_register_ppc64.
11793 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11795 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11796 single powerpc*-*-linux* case.
11797 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11799 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11801 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11802 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11804 * linux-ppc-low.c: Include <elf.h>.
11805 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11806 (ppc_hwcap): New global variable.
11807 (ppc_regmap): Remove __SPE__ #ifdef sections.
11808 (ppc_regmap_e500): New global variable.
11809 (ppc_cannot_store_register): Update __SPE__ special case.
11810 (ppc_get_hwcap): New function.
11811 (ppc_arch_setup): Use it to determine whether inferior supports
11812 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11813 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11814 Do not access registers if target does not support AltiVec.
11815 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11816 Do not access registers if target does not support SPE.
11817 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11819 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11821 * linux-low.c (disabled_regsets, num_regsets): New.
11822 (use_regsets_p): Delete.
11823 (linux_wait_for_process): Clear disabled_regsets.
11824 (regsets_fetch_inferior_registers): Check and set it.
11825 (regsets_store_inferior_registers): Likewise.
11826 (linux_fetch_registers, linux_store_registers): Do not use
11828 (initialize_low): Allocate disabled_regsets.
11830 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11832 * Makefile.in (LIBOBJS): New.
11833 (OBS): Use LIBOBJS.
11834 (memmem.o): New rule.
11835 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11836 * configure: Regenerated.
11838 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11840 * server.c (handle_query): Never return "unsupported" for
11841 qXfer:features:read queries.
11843 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11845 * server.c (get_features_xml): Fix inverted condition.
11846 (handle_query): Always support qXfer:feature:read.
11848 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11850 * server.c (wrapper_argv): New.
11851 (start_inferior): Handle wrapper_argv. If set, expect an extra
11853 (gdbserver_usage): Document --wrapper.
11854 (main): Parse --wrapper.
11856 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11858 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11859 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11860 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11861 (ppc_set_pc): Likewise.
11862 (ppc_arch_setup): New function.
11863 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11864 of collect_register.
11865 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11867 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11869 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11870 instead of linux-ppc64-low.o.
11871 * linux-ppc64-low.c: Remove file.
11872 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11873 (linux-ppc64-low.o): Remove rule.
11875 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11876 (init_registers_powerpc_64): Likewise.
11877 (ppc_regmap): Conditionally define depending on __powerpc64__.
11878 (ppc_cannot_store_register): Do not special-case "fpscr" when
11879 compiled on __powerpc64__.
11880 (ppc_collect_ptrace_register): New function.
11881 (ppc_supply_ptrace_register): New function.
11882 (ppc_breakpoint): Change type to "unsigned int".
11883 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11884 (the_low_target): Conditionally provide initializers for the
11885 arch_setup member depending on __powerpc64__. Install
11886 collect_ptrace_register and supply_ptrace_register members.
11888 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11890 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11891 * server.c (gdbserver_xmltarget): Define.
11892 (get_features_xml): Use it to replace "target.xml" and arch_string.
11894 * configure.srv: Remove srv_xmltarget. Add XML files that were
11895 mentioned there to srv_xmlfiles instead. Remove conditional tests
11896 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11897 srv_xmlfiles and srv_regobj to include all possible choices.
11898 * configure.ac (srv_xmltarget): Remove.
11899 (srv_xmlfiles): Do not add "target.xml".
11900 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11901 checks for supplementary target information.
11902 * configure: Regenerate.
11903 * Makefile.in (XML_TARGET): Remove.
11904 (target.xml): Remove rule.
11905 (clean): Do not clean up target.xml.
11906 (.PRECIOUS): Do not mention target.xml.
11908 * target.h (struct target_ops): Remove arch_string member.
11909 * linux-low.c (linux_arch_string): Remove.
11910 (linux_target_ops): Remove arch_string initializer.
11911 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11912 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11913 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11914 * spu-low.c (spu_arch_string): Remove.
11915 (spu_target_ops): Remove arch_string initializer.
11916 * win32-low.c (win32_arch_string): Remove.
11917 (win32_target_ops): Remove arch_string initializer.
11918 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11919 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11920 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11922 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11924 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11925 by collect_ptrace_register and supply_ptrace_register hooks.
11926 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11927 instead of checking for the_low_target.left_pad_xfer.
11928 (usr_store_inferior_registers): Use collect_ptrace_register callback
11929 instead of checking for the_low_target.left_pad_xfer.
11931 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11932 (s390_supply_ptrace_register): Likewise.
11933 (s390_fill_gregset): Call s390_collect_ptrace_register.
11934 (the_low_target): Update.
11936 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11937 (ppc_supply_ptrace_register): Likewise.
11938 (the_low_target): Update.
11940 * linux-i386-low.c (the_low_target): Update.
11941 * linux-x86-64-low.c (the_low_target): Update.
11943 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11945 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11946 reg-s390.o and reg-s390x.o.
11948 * linux-low.c (new_inferior): New global variable.
11949 (linux_create_inferior, linux_attach): Set it.
11950 (linux_wait_for_process): Call the_low_target.arch_setup after the
11951 target has stopped for the first time.
11952 (initialize_low): Do not call the_low_target.arch_setup.
11954 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11955 (s390_set_pc): Likewise.
11956 (s390_arch_setup): New function.
11957 (the_low_target): Use s390_arch_setup as arch_setup routine.
11959 * regcache.c (realloc_register_cache): New function.
11960 (set_register_cache): Call it for each existing regcache.
11962 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11964 * server.h (init_registers): Remove prototype.
11966 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11967 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11968 instead of init_registers ().
11969 * linux-arm-low.c (init_registers_arm): Add prototype.
11970 (init_registers_arm_with_iwmmxt): Likewise.
11971 (the_low_target): Add initializer for arch_setup field.
11972 * linux-cris-low.c (init_registers_cris): Add prototype.
11973 (the_low_target): Add initializer for arch_setup field.
11974 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11975 (the_low_target): Add initializer for arch_setup field.
11976 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11977 (the_low_target): Add initializer for arch_setup field.
11978 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11979 (the_low_target): Add initializer for arch_setup field.
11980 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11981 (the_low_target): Add initializer for arch_setup field.
11982 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11983 (the_low_target): Add initializer for arch_setup field.
11984 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11985 (init_registers_mips64_linux): Likewise.
11986 (the_low_target): Add initializer for arch_setup field.
11987 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11988 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11989 (the_low_target): Add initializer for arch_setup field.
11990 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11991 (init_registers_powerpc_64): Likewise.
11992 (the_low_target): Add initializer for arch_setup field.
11993 * linux-s390-low.c (init_registers_s390): Add prototype.
11994 (init_registers_s390x): Likewise.
11995 (the_low_target): Add initializer for arch_setup field.
11996 * linux-sh-low.c (init_registers_sh): Add prototype.
11997 (the_low_target): Add initializer for arch_setup field.
11998 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11999 (the_low_target): Add initializer for arch_setup field.
12000 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12001 (the_low_target): Add initializer for arch_setup field.
12003 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12004 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12005 instead of init_registers ().
12006 * win32-arm-low.c (init_registers_arm): Add prototype.
12007 (the_low_target): Add initializer for arch_setup field.
12008 * win32-i386-low.c (init_registers_i386): Add prototype.
12009 (the_low_target): Add initializer for arch_setup field.
12011 * spu-low.c (init_registers_spu): Add prototype.
12012 (initialize_low): Call initialie_registers_spu () instead of
12013 initialize_registers ().
12015 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12017 * server.c (handle_v_requests): When handling the vRun and vAttach
12018 packets, if already debugging a process, don't kill it. Return an
12021 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12023 * server.c (handle_query): Correct length check.
12025 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12027 * win32-low.c (do_initial_child_stuff): Add process handle
12028 parameter. Set current_process_handle and current_process_id from the
12029 parameters. Clear globals.
12030 (win32_create_inferior): Don't set current_process_handle and
12031 current_process_id here. Instead pass them on the call to
12032 do_initial_child_stuff.
12033 (win32_attach): Likewise.
12034 (win32_clear_inferiors): New.
12035 (win32_kill): Don't close the current process handle or the
12036 current thread handle here. Instead call win32_clear_inferiors.
12037 (win32_detach): Don't open a new handle to the process. Call
12038 win32_clear_inferiors.
12039 (win32_join): Don't rely on current_process_handle; open a new
12040 handle using the process id.
12041 (win32_wait): Call win32_clear_inferiors when the inferior process
12044 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12046 * server.c (monitor_show_help): Add "exit".
12048 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12050 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12051 (clean): Add reg-xtensa.c.
12052 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12053 * configure.srv (xtensa*-*-linux*) New target.
12054 * linux-xtensa-low.c: New.
12055 * xtensa-xtregs.c: New.
12057 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12059 * hostio.c: Don't include errno.h.
12060 (errno_to_fileio_errno): Move to hostio-errno.
12061 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12062 error number outputting to the target->hostio_last_error callback.
12063 (hostio_packet_error): Use FILEIO_EINVAL directly.
12064 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12065 calls to hostio_error.
12066 * hostio-errno.c: New.
12067 * server.h (hostio_last_error_from_errno): Declare.
12068 * target.h (target_ops): Add hostio_last_error member.
12069 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12070 as hostio_last_error handler.
12071 * spu-low.c (spu_target_ops): Likewise.
12072 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12073 (wince_hostio_last_error): New functions.
12074 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12075 as hostio_last_error handler.
12076 (win32_target_ops) [!_WIN32_WCE]: Register
12077 hostio_last_error_from_errno as hostio_last_error handler.
12078 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12079 (hostio-errno.o): New rule.
12080 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12081 * configure.srv (srv_hostio_err_objs): New variable. Default to
12083 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12084 * configure: Regenerate.
12086 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12088 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12089 (linux_kill, linux_detach): Clean up the process list.
12090 * remote-utils.c (remote_open): Improve port number parsing.
12091 (putpkt_binary, input_interrupt): Only send interrupts if the target
12093 * server.c (extended_protocol): Make static.
12094 (attached): Define earlier.
12095 (exit_requested, response_needed, program_argv): New variables.
12096 (target_running): New.
12097 (start_inferior): Clear attached here.
12098 (attach_inferior): Set attached here.
12099 (require_running): Define.
12100 (handle_query): Use require_running and target_running. Implement
12102 (handle_v_attach, handle_v_run): New.
12103 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12104 (gdbserver_usage): Update.
12105 (main): Redo argument parsing. Handle --debug and --multi. Handle
12106 --attach along with other options or after the port. Save
12107 program_argv. Support no initial program. Resynchronize
12108 communication with GDB after an error. Handle "monitor exit".
12109 Use require_running and target_running. Always allow the extended
12110 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12111 restart in extended mode.
12112 * README: Refer to the GDB manual. Update --attach usage.
12114 2007-12-20 Andreas Schwab <schwab@suse.de>
12116 * linux-low.c (STACK_SIZE): Define.
12117 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12118 (linux_test_for_tracefork): Likewise.
12120 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12122 * linux-low.c (linux_wait_for_event): Update messages. Do not
12123 reinsert auto-delete breakpoints.
12124 * mem-break.c (struct breakpoint): Change return type of handler to
12126 (set_breakpoint_at): Update handler type.
12127 (reinsert_breakpoint_handler): Return 1 instead of calling
12129 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12131 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12132 * mem-break.h (set_breakpoint_at): Update handler type.
12133 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12134 * win32-low.c (auto_delete_breakpoint): New.
12135 (get_child_debug_event): Use it.
12137 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12139 * configure.ac: Check for pread and pwrite.
12140 * hostio.c (handle_pread): Fall back to lseek and read.
12141 (handle_pwrite): Fall back to lseek and write.
12142 * config.in, configure: Regenerated.
12144 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12146 * server.c (myresume): Add own_buf argument.
12147 (main): Update calls.
12149 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12151 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12152 * remote-utils.c (remote_open): Do not call disable_async_io.
12153 (block_async_io): Delete.
12154 (unblock_async_io): Make static.
12155 (initialize_async_io): New.
12156 * server.c (handle_v_cont): Handle async I/O here.
12157 (myresume): Likewise. Move other common resume tasks here...
12158 (main): ... from here. Call initialize_async_io. Disable async
12159 I/O before the main loop.
12160 * server.h (initialize_async_io): Declare.
12161 (block_async_io, unblock_async_io): Delete prototypes.
12162 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12164 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12166 * remote-utils.c (readchar): Allow binary data in received messages.
12168 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12170 * win32-low.c (attaching): New global.
12171 (win32_create_inferior): Clear the `attaching' global.
12172 (win32_attach): Set the `attaching' global.
12173 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12174 attaching. Only set a breakpoint at the entry point if not
12177 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12179 * server.c (main): Don't report dll events on the initial
12180 connection on attaches.
12182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12184 * server.c (main): Relax numerical bases supported for the pid of
12185 the --attach command line argument.
12187 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12189 * win32-low.c (win32_attach): Call OpenProcess before
12190 DebugActiveProcess, not after. Add last error output to error
12193 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12195 * win32-low.c (win32_get_thread_context)
12196 (win32_set_thread_context): New functions.
12197 (thread_rec): Use win32_get_thread_context.
12198 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12199 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12202 2007-12-03 Leo Zayas
12203 Pedro Alves <pedro_alves@portugalmail.pt>
12205 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12207 (child_add_thread): Minor cleanup.
12208 (child_continue): Resume artificially suspended threads before
12209 calling ContinueDebugEvent.
12210 (suspend_one_thread): New.
12211 (fake_breakpoint_event): New.
12212 (get_child_debug_event): Change return type to int. Check here if
12213 gdb sent an interrupt request. If a soft interrupt was requested,
12214 fake a breakpoint event. Return 0 if there is no event to handle,
12216 (win32_wait): Don't check here if gdb sent an interrupt request.
12217 Ensure there is a valid event to handle.
12218 (win32_request_interrupt): Add soft interruption method as last
12221 2007-12-03 Leo Zayas
12222 Pedro Alves <pedro_alves@portugalmail.pt>
12224 * win32-low.h (win32_thread_info): Add descriptions to the
12225 structure members. Replace `suspend_count' counter by a
12227 * win32-low.c (thread_rec): Update condition of when to get the
12228 context from the inferior. Rely on ContextFlags being set if it
12229 has already been retrieved. Only suspend the inferior thread if
12230 we haven't already. Warn if that fails.
12231 (continue_one_thread): s/suspend_count/suspended/. Only call
12232 ResumeThread once. Warn if that fails.
12234 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12236 * win32-low.c (win32_wait): Don't read from the inferior when it
12237 has already exited.
12239 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12241 * Makefile.in (win32_low_h): New variable.
12242 (win32-low.o): Add dependency on $(win32_low_h).
12243 (win32-arm-low.o, win32-i386-low.o): New rules.
12245 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12247 * hostio.c: Correct copyright year.
12249 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12251 * Makefile.in (OBS): Add hostio.o.
12252 (hostio.o): New rule.
12253 * server.h (handle_vFile): Declare.
12254 * hostio.c: New file.
12255 * server.c (handle_v_requests): Take packet_len and new_packet_len
12256 for binary packets. Call handle_vFile.
12257 (main): Update call to handle_v_requests.
12259 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12261 * linux-low.c: Include <sched.h>.
12263 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12265 * linux-low.c (linux_tracefork_grandchild): New.
12266 (linux_tracefork_child): Use clone.
12267 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12269 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12271 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12273 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12275 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12277 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12279 * inferiors.c (change_inferior_id): Delete.
12280 (add_pid_to_list, pull_pid_from_list): New.
12281 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12282 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12283 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12284 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12285 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12286 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12287 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12288 (using_threads): Always set to 1.
12289 (handle_extended_wait): New.
12290 (add_process): Do not set TID.
12291 (linux_create_inferior): Set must_set_ptrace_flags.
12292 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12293 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12294 (linux_thread_alive): Rename TID argument to LWPID.
12295 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12296 (linux_wait_for_event): Do not use TID or check using_threads. Update
12297 call to dead_thread_notify. Call handle_extended_wait.
12298 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12299 (send_sigstop): Delete sigstop_sent.
12300 (wait_for_sigstop): Avoid TID.
12301 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12302 (linux_test_for_tracefork): New.
12303 (linux_lookup_signals): Use thread_db_active and
12304 linux_supports_tracefork_flag.
12305 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12306 * linux-low.h (get_process_thread): Avoid TID.
12307 (struct process_ifo): Move thread_known and tid to the end. Remove
12309 (linux_attach_lwp, thread_db_init): Update prototypes.
12310 * server.h (change_inferior_id): Delete prototype.
12311 (add_pid_to_list, pull_pid_from_list): New prototypes.
12312 * thread-db.c (thread_db_use_events): New.
12313 (find_first_thread): Rename to...
12314 (find_one_thread): ...this. Update callers and messages. Do not
12315 call fatal. Check thread_db_use_events. Do not call
12316 change_inferior_id or new_thread_notify.
12317 (maybe_attach_thread): Update. Do not call new_thread_notify.
12318 (thread_db_init): Set thread_db_use_events. Check use_events.
12319 * utils.c (fatal, warning): Correct message prefix.
12321 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12323 * Makefile.in (clean): Remove new files.
12324 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12325 (powerpc-64.o, powerpc-64.c): New rules.
12326 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12327 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12329 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12331 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12332 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12333 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12334 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12335 (target_regsets): Add AltiVec and SPE register sets.
12336 * configure.ac: Check for AltiVec and SPE.
12337 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12338 (ppc_fill_vrregset, ppc_store_vrregset): New.
12339 (target_regsets): Add AltiVec register set.
12340 * configure: Regenerated.
12342 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12344 * linux-low.c (O_LARGEFILE): Define.
12345 (linux_read_memory): Use /proc/PID/mem.
12346 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12347 * configure, config.in: Regenerated.
12349 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12351 * linux-low.c (linux_wait_for_event): Do not pass signals while
12354 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12356 * win32-low.c (create_process): New.
12357 (win32_create_inferior): Use create_process instead of
12358 CreateProcess. If create_process failed retry appending an ".exe"
12359 suffix. Store the GetLastError result immediatelly after
12360 create_process calls and use it on the call to error.
12362 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12364 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12366 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12368 * configure.ac: Switch license to GPLv3.
12370 2007-08-01 Michael Snyder <msnyder@access-company.com>
12372 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12374 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12376 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12378 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12379 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12380 CloseToolhelp32Snapshot.
12381 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12382 CloseToolhelp32Snapshot.
12384 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12386 * server.c (main): Check for inferior exit before main loop.
12388 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12390 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12391 instead of on tmp_desc.
12393 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12394 Daniel Jacobowitz <dan@codesourcery.com>
12396 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12397 (add_thread): Minor cleanups.
12398 (clear_inferiors): Move lower in the file. Clear the DLL
12400 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12401 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12402 (xml_escape_text): New.
12403 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12405 (handle_v_cont): Report errors.
12406 (gdbserver_version): Update.
12407 (main): Correct size of own_buf. Do not report initial DLL events.
12408 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12409 (unloaded_dll, xml_escape_text): New.
12410 * win32-low.c (enum target_waitkind): Update comments.
12411 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12412 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12413 (win32_EnumProcessModules, win32_GetModuleInformation)
12414 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12415 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12416 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12417 (win32_Module32First, win32_Module32Next, load_toolhelp)
12418 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12419 (get_child_debug_event): Handle DLL events.
12420 (win32_wait): Likewise.
12422 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12424 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12425 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12427 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12429 * win32-low.c (handle_output_debug_string): Ignore event if not
12432 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12434 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12436 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12438 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12440 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12442 * inferiors.c (change_inferior_id): Add comment.
12443 * linux-low.c (check_removed_breakpoint): Add an early
12444 prototype. Improve debug output.
12445 (linux_attach): Doc update.
12446 (linux_detach_one_process, linux_detach): Clean up before releasing
12448 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12449 * linux-low.h (struct process_info): Doc improvement.
12450 * mem-break.c (delete_all_breakpoints): New.
12451 * mem-break.h (delete_all_breakpoints): New prototype.
12452 * thread-db.c (find_first_thread): New.
12453 (thread_db_create_event): Call it instead of
12454 thread_db_find_new_threads. Clean up unused variables.
12455 (maybe_attach_thread): Remove first thread handling.
12456 (thread_db_find_new_threads): Use find_first_thread.
12457 (thread_db_get_tls_address): Likewise.
12459 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12461 * thread-db.c (thread_db_find_new_threads): Add prototype.
12462 (thread_db_create_event): Check for the main thread before adding
12464 (maybe_attach_thread): Only enable event reporting if TID == 0.
12465 (thread_db_get_tls_address): Check for new threads.
12467 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12469 * linux-low.c (linux_create_inferior): Try execv before execvp.
12470 * spu-low.c (spu_create_inferior): Likewise.
12472 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12474 * linux-low.c (linux_create_inferior): Change execv to execvp.
12475 * spu-low.c (spu_create_inferior): Likewies.
12477 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12479 * Makefile.in (clean): Clean new files instead of deleted ones.
12480 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12481 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12483 * configure.srv: Specify XML files and new regformats for MIPS and
12485 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12486 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12487 an entry for the restart register.
12488 (mips_cannot_fetch_register, mips_cannot_store_register)
12489 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12490 register names to match the XML descriptions.
12491 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12492 restart register instead of $0.
12494 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12495 Markus Deuling <deuling@de.ibm.com>
12497 * remote-utils.c (decode_xfer_write): New function.
12498 * server.h (decode_xfer_write): Add prototype.
12499 * server.c (handle_query): Add PACKET_LEN argument. Support
12500 qXfer:spu:read and qXfer:spu:write packets.
12501 (main): Pass packet_len to handle_query.
12502 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12503 * target.h (target_ops): Add qxfer_spu.
12505 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12507 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12508 accessing non-seekable spufs files.
12510 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12512 * server.c (handle_query): Add reply for qC packet.
12514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12515 Leo Zayas <lerele@champenstudios@com>
12517 * server.h (check_remote_input_interrupt_request): New function.
12518 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12519 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12520 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12521 (check_remote_input_interrupt_request): New function.
12522 * server.h (check_remote_input_interrupt_request): Declare.
12523 * win32-low.c (winapi_DebugBreakProcess,
12524 winapi_GenerateConsoleCtrlEvent): New typedefs.
12525 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12527 (win32_wait): Check for remote interrupt request
12528 with check_remote_input_interrupt_request.
12529 (win32_request_interrupt): New function.
12530 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12534 * win32-low.c (debug_registers_changed,
12535 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12536 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12537 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12538 (thread_rec): Get context using the low target.
12539 (child_add_thread): Call thread_added on the low target,
12540 which does the same thing.
12542 (do_initial_child_stuff): Remove debug registers references.
12543 Set context using the low target. Resume threads after
12544 setting the contexts.
12545 (child_continue): Remove dead variable. Remove debug
12546 registers references.
12547 (child_fetch_inferior_registers): Go through the low target.
12548 (do_child_store_inferior_registers): Remove.
12549 (child_store_inferior_registers): Go through the low target.
12550 (win32_resume): Remove debug registers references.
12551 Set context using the low target.
12552 (handle_exception): Change return type to void. Don't record
12553 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12554 first chance exception.
12555 (get_child_debug_event): Change return type to void. Remove
12556 goto loop. Always return after waiting for debug event.
12557 (win32_wait): Convert to switch statement. Handle spurious
12560 * win32-i386-low.c (debug_registers_changed,
12561 debug_registers_used): New.
12562 (initial_stuff): Rename to ...
12563 (i386_initial_stuff): ... this. Clear debug registers
12565 (store_debug_registers): Delete.
12566 (i386_get_thread_context): New.
12567 (load_debug_registers): Delete.
12568 (i386_set_thread_context): New.
12569 (i386_thread_added): New.
12570 (single_step): Rename to ...
12571 (i386_single_step): ... this.
12572 (do_fetch_inferior_registers): Rename to ...
12573 (i386_fetch_inferior_register): ... this.
12574 (i386_store_inferior_register): New.
12575 (the_low_target): Adapt to new interface.
12577 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12578 (arm_get_thread_context): New.
12579 (arm_set_thread_context): New.
12581 (do_fetch_inferior_registers): Rename to ...
12582 (arm_fetch_inferior_register): ... this.
12583 (arm_store_inferior_register): New.
12584 (arm_wince_breakpoint): Reimplement as unsigned long.
12585 (arm_wince_breakpoint_len): Define.
12586 (the_low_target): Adapt to new interface.
12588 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12589 load_debug_registers. Add get_thread_context, set_thread_context,
12590 thread_added and store_inferior_register. Rename
12591 fetch_inferior_registers to fetch_inferior_register.
12592 (regptr): Remove declaration.
12594 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12596 * linux-low.c (linux_detach): Change return type to int. Return 0.
12597 * spu-low.c (spu_detach): Likewise.
12599 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12601 * target.h (target_ops): Change return type of detach to int.
12603 (join_inferior): New.
12604 * server.c (main): Don't skip detach support on mingw32.
12605 If the inferior doesn't support detaching return error.
12606 Call join_inferior instead of using waitpid.
12607 * linux-low.c (linux_join): New.
12608 (linux_target_op): Add linux_join.
12609 * spu-low.c (spu_join): New.
12610 (spu_target_ops): Add spu_join.
12611 * win32-low.c (win32_detach): Adapt to new interface.
12612 Reopen current_process_handle before detaching. Issue a child
12613 resume before detaching.
12615 (win32_target_op): Add win32_join.
12617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12619 * win32-low.c (win32-attach): Fix return value.
12620 * target.h (target_ops): Describe ATTACH return values.
12622 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12624 * win32-low.c (GETPROCADDRESS): Define.
12625 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12626 (winapi_DebugSetProcessKillOnExit): Likewise.
12627 (win32_create_inferior): Force usage of ansi CreateProcessA.
12628 (win32_attach): Use GETPROCADDRESS.
12629 (win32_detach): Likewise.
12631 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12633 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12635 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12637 * win32-low.c: Commit leftover changes from 2007-03-29.
12639 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12641 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12642 fields short instead of int. Add explicit padding.
12643 (i387_cache_to_fsave): Remove unnecessary casts.
12644 (i387_fsave_to_cache): Doc fix.
12645 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12647 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12649 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12650 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12652 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12654 * configure.srv (arm*-*-mingw32ce*): Move near the other
12657 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12659 * configure.ac: Add errno checking.
12660 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12661 sys/file.h and malloc.h.
12662 (AC_CHECK_DECLS): Add perror.
12663 (srv_mingwce): Handle.
12664 * configure.srv (i[34567]86-*-cygwin*): Add
12665 win32-i386-low.o to srv_tgtobj.
12666 (i[34567]86-*-mingw*): Likewise.
12667 (arm*-*-mingw32ce*): Add case.
12668 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12669 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12670 [__MINGW32CE__] (strerror): New function.
12671 [__MINGW32CE__] (errno): Define to GetLastError.
12672 [__MINGW32CE__] (COUNTOF): New macro.
12673 (remote_open): Remove extra close call.
12674 * mem-break.c (delete_breakpoint_at): New function.
12675 * mem-break.h (delete_breakpoint_at): Declare.
12676 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12677 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12678 [USE_WIN32API] (read, write): Add char* casts.
12679 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12680 * server.h: Include wincecompat.h on Windows CE.
12681 [HAVE_ERRNO_H]: Check.
12682 (perror): Declare if not declared.
12683 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12684 (perror_with_name): Remove errno declaration.
12685 * wincecompat.h: New.
12686 * wincecompat.c: New.
12687 * win32-low.h: New.
12688 * win32-arm-low.c: New.
12689 * win32-i386-low.c: New.
12690 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12691 (OUTMSG2): Make it safe.
12693 (COUNTOF): New macro.
12694 (NUM_REGS): Get it from the low target.
12695 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12696 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12697 (thread_rec): Let low target handle debug registers.
12698 (child_add_thread): Likewise.
12699 (child_init_thread_list): Likewise.
12700 (continue_one_thread): Likewise.
12702 (do_child_fetch_inferior_registers): Move to ...
12703 * win32-i386-low.c: ... here, and rename to ...
12704 (do_fetch_inferior_registers): ... this.
12705 * win32-low.c (child_fetch_inferior_registers):
12706 Go through the low target.
12707 (do_child_store_inferior_registers): Use regptr.
12708 (strwinerror): New function.
12709 (win32_create_inferior): Handle Windows CE.
12710 Use strwinerror instead of strerror on Windows error
12711 codes. Add program to the error output.
12712 Don't close the main thread handle on Windows CE.
12713 (win32_attach): Use coredll.dll on Windows CE.
12714 (win32_kill): Close current process and current
12716 (win32_detach): Use coredll.dll on Windows CE.
12717 (win32_resume): Let low target handle debug registers, and
12719 (handle_exception): Add/Remove initial breakpoint. Avoid
12720 non-existant WSTOPSIG on Windows CE.
12721 (win32_read_inferior_memory): Cast to remove warning.
12722 (win32_arch_string): Go through the low target.
12723 (initialize_low): Call set_breakpoint_data with the low
12724 target's breakpoint.
12725 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12726 FOP_REGNUM, mappings): Move to ...
12727 * win32-i386-low.c: ... here.
12728 * win32-low.c (win32_thread_info): Move to ...
12729 * win32-low.h: ... here.
12730 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12731 win32-arm-low.c and wincecompat.c.
12732 (all:): Add $EXEEXT.
12733 (install-only:): Likewise.
12734 (gdbserver:): Likewise.
12735 (gdbreplay:): Likewise.
12736 * config.in: Regenerate.
12737 * configure: Regenerate.
12739 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12741 * win32-low.c: Rename typedef thread_info to
12742 win32_thread_info throughout.
12744 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12746 * win32-i386-low.c: Rename to ...
12747 * win32-low.c: ... this.
12748 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12749 * Makefile.in: Likewise.
12751 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12753 * remote-utils.c (monitor_output): Constify msg parameter.
12754 * server.h (monitor_output): Likewise.
12755 * win32-i386-low.c (handle_output_debug_string): New.
12756 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12757 handle_output_debug_string.
12758 (get_child_debug_event): Likewise.
12760 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12762 * server.c (main): Correct strtoul check.
12764 2007-03-27 Jon Ringle <jon@ringle.org>
12766 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12768 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12770 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12772 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12774 * terminal.h: Check HAVE_SGTTY_H.
12776 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12778 * remote-utils.c (remote_open): Print out the assigned port number.
12780 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12782 * remote-utils.c (monitor_output): New function.
12783 * server.c (debug_threads): Define here.
12784 (monitor_show_help): New function.
12785 (handle_query): Handle qRcmd.
12786 (main): Do not handle 'd' packet.
12787 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12788 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12791 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12793 * Makefile.in (EXEEXT): New.
12794 (clean): Use $(EXEEXT).
12796 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12798 * target.h (target_ops): Rename send_signal to request_interrupt,
12799 and remove enum target_signal parameter.
12800 * linux-low.c (linux_request_interrupt): Rename from
12801 linux_send_signal, and always send SIGINT.
12802 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12803 and always send SIGINT.
12804 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12806 (input_interrupt): Likewise.
12808 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12810 * server.c (get_features_xml): Check if target implemented
12812 * win32-i386-low.c (win32_arch_string): New.
12813 (win32_target_ops): Add win32_arch_string as arch_string member.
12815 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12817 * spu-low.c (spu_arch_string): New.
12818 (spu_target_ops): Add spu_arch_string.
12820 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12822 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12823 * configure.ac: Do not check for terminal.h.
12824 * configure, config.in: Regenerated.
12826 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12828 * Makefile.in (OBS): Add $(XML_BUILTIN).
12829 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12831 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12832 (arm-with-iwmmxt.c): New.
12833 * config.in, configure: Regenerate.
12834 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12835 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12836 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12837 (arm*-*-linux*): Add iWMMXt and regset support.
12838 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12839 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12840 (arm_store_wmmxregset, target_regsets): New.
12841 * server.c (get_features_xml): Take annex argument. Check builtin
12843 (handle_query): Handle multiple annexes.
12845 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12847 * remote-utils.c [USE_WIN32API] (read, write): Define.
12848 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12851 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12853 * linux-i386-low.c (the_low_target): Set arch_string.
12854 * linux-x86-64-low.c (the_low_target): Likewise.
12855 * linux-low.c (linux_arch_string): New.
12856 (linux_target_ops): Add it.
12857 * linux-low.h (struct linux_target_ops): Add arch_string.
12858 * server.c (write_qxfer_response): Use const void * for DATA.
12859 (get_features_xml): New.
12860 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12861 * target.h (struct target_ops): Add arch_string method.
12863 2007-01-03 Denis Pilat <denis.pilat@st.com>
12864 Daniel Jacobowitz <dan@codesourcery.com>
12866 * linux-low.c (linux_kill): Handle being called with no threads.
12867 * win32-i386-low.c (win32_kill): Likewise.
12868 (get_child_debug_event): Clear current_process_handle.
12870 2006-12-30 Denis PILAT <denis.pilat@st.com>
12871 Daniel Jacobowitz <dan@codesourcery.com>
12873 * remote-utils.c (remote_open): Check the type of specified
12874 serial port devices before opening them.
12875 * server.c (main): Kill the inferior if an error occurs during
12876 the first remote_open.
12878 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12880 * README: Update supported targets.
12882 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12884 * Makefile.in (clean): Remove reg-mips64.c.
12885 (reg-mips64.c, reg-mips64.o): New rules.
12886 * configure.srv: Handle mips64. Include regset support for mips.
12887 * linux-mips-low.c (union mips_register): New.
12888 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12889 (mips_breakpoint, mips_breakpoint_at): Use int.
12890 (mips_collect_register, mips_supply_register)
12891 (mips_collect_register_32bit, mips_supply_register_32bit)
12892 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12893 (mips_store_fpregset, target_regsets): New.
12894 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12896 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12898 * configure.srv: Add target "spu*-*-*".
12899 * Makefile.in (clean): Remove reg-spu.c.
12900 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12901 * spu-low.c: New file.
12903 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12905 * configure.ac: Correct td_thr_tls_get_addr test.
12906 * configure: Regenerated.
12908 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12910 * linux-low.c (linux_wait_for_event): Reformat. Use the
12911 pass_signals array.
12912 * remote-utils.c (decode_address_to_semicolon): New.
12913 * server.c (pass_signals, handle_general_set): New.
12914 (handle_query): Mention QPassSignals for qSupported.
12915 (main): Call handle_general_set.
12916 * server.h (pass_signals, decode_address_to_semicolon): New.
12918 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12920 * server.c (handle_query): Correct error handling for read_auxv.
12922 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12924 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12925 and srv_linux_thread_db to yes.
12926 * linux-s390-low.c (s390_fill_gregset): New function.
12927 (target_regsets): Define data structure.
12929 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12931 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12932 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12933 * config.in, configure: Regenerated.
12934 * inferiors.c (gdb_id_to_thread): New function.
12935 (gdb_id_to_thread_id): Use it.
12936 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12937 * linux-low.h (struct process_info): Add th member.
12938 (thread_db_get_tls_address): New prototype.
12939 * remote-utils.c (decode_address): Make non-static.
12940 * server.c (handle_query): Handle qGetTLSAddr.
12941 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12942 * target.h (struct target_ops): Add get_tls_address.
12943 * thread-db.c (maybe_attach_thread): Save the thread handle.
12944 (thread_db_get_tls_address): New.
12946 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12948 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12949 (linux_resume_one_process): Take a siginfo_t *. Update all
12950 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12951 (struct pending_signals): Add a siginfo_t.
12952 (linux_wait_for_process): Always set last_status.
12953 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12954 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12955 * linux-low.h (struct process_info): Add last_status.
12957 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12959 * remote-utils.c (try_rle): New function.
12960 (putpkt_binary): Use it.
12962 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12964 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12965 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12966 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12967 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12968 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12971 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12973 * server.c (terminal_fd): New variable.
12974 (old_foreground_pgrp): Likewise.
12975 (restore_old_foreground_pgrp): New function.
12976 (start_inferior): Record the terminal file descriptor in terminal_fd
12977 and its original foreground group in old_foreground_pgrp. Register
12978 restore_old_foreground_pgrp with atexit().
12980 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12982 * server.c (handle_query): Correct qPart to qXfer.
12984 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12986 * configure.ac: Check for more headers which are missing on
12987 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12988 * configure.srv: Add Cygwin and mingw32.
12989 * remote-utils.c: Don't include headers unconditionally which
12990 are missing on mingw32. Include <winsock.h> for mingw32.
12991 (remote_open): Adjust for mingw32 support. Flush
12992 standard error after writing to it.
12993 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12994 (unblock_async_io, enable_async_io, disable_async_io)
12995 (readchar, getpkt): Update for Winsock support.
12996 (prepare_resume_reply): Expect a protocol signal number.
12997 * server.c: Disable <sys/wait.h> on mingw32.
12998 (start_inferior): Adjust for mingw32 support. Flush
12999 standard error after writing to it.
13000 (attach_inferior): Likewise. Use protocol signal
13002 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13004 * win32-i386-low.c: New file.
13005 * Makefile.in (XM_CLIBS): Set.
13006 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13007 (win32-i386-low.o): New dependency rule.
13008 * linux-low.c (linux_wait): Use target signal numbers.
13009 * target.h (struct target_ops): Doc fix.
13010 * server.h (target_signal_to_name): New prototype.
13011 * gdbreplay.c: Don't include headers unconditionally which
13012 are missing on mingw32. Include <winsock.h> for mingw32.
13013 (remote_close, remote_open): Adjust for Winsock support.
13014 * configure, config.in: Regenerated.
13016 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13018 * server.c (decode_xfer_read, write_qxfer_response): New.
13019 (handle_query): Take a packet length argument. Handle
13020 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13021 the qSupported response.
13022 (main): Update call to handle_query.
13024 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13026 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13027 (putpkt_binary): Renamed from putpkt and adjusted for binary
13029 (putpkt): New wrapper for putpkt_binary.
13030 (readchar): Don't mask off the high bit.
13031 (decode_X_packet): New function.
13032 * server.c (main): Call putpkt_binary if a handler sets the packet
13033 length. Save the length of the incoming packet. Handle 'X'.
13034 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13036 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13038 * server.c (handle_query): Handle qSupported.
13040 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13042 * remote-utils.c (all_symbols_looked_up): New variable.
13043 (look_up_one_symbol): Check it.
13044 * server.h (look_up_one_symbol): New declaration.
13045 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13047 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13049 * Makefile.in (linux-arm-low.o): Update dependencies.
13050 * linux-arm-low.c: Include "gdb_proc_service.h".
13051 (PTRACE_GET_THREAD_AREA): Define.
13052 (ps_get_thread_area): New function.
13054 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13056 * configure.srv (m68k*-*-uclinux*): New target.
13057 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13058 (linux_resume_one_process): Remove extraneous cast.
13059 (linux_read_offsets): New.
13060 (linux_target_op): Add linux_read_offsets on mmuless systems.
13061 * server.c (handle_query): Add qOffsets logic.
13062 * target.h (struct target_ops): Add read_offsets.
13064 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13066 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13067 (PTRACE_GET_THREAD_AREA): Define.
13068 (ps_get_thread_area): New function.
13069 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13070 (linux-x86-64-low.o): Update.
13072 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13074 * configure.ac: Remove checks for prfpregset_t.
13075 * gdb_proc_service.h: New file.
13076 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13077 new "gdb_proc_service.h".
13078 * proc-service.c: Likewise.
13079 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13080 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13081 * Makefile.in (gdb_proc_service_h): Updated.
13082 * configure, config.in: Regenerated.
13084 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13086 * remote-utils.c (prepare_resume_reply): Move declaration
13087 of gdb_id_from_wait to the top of the block.
13089 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13091 * linux-low.c (regsets_store_inferior_registers): Read the regset
13092 from the target before filling it.
13094 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13096 * server.c (attach_inferior): Return SIGTRAP for a successful
13099 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13101 * Makefile.in (OBS): Add version.o.
13102 (STAGESTUFF): Delete.
13103 (version.o): Add dependencies.
13104 (version.c): Replace rule.
13105 (clean): Remove version.c.
13106 * server.c (gdbserver_version): New.
13107 (gdbserver_usage): Use printf.
13108 (main): Handle --version and --help.
13109 * server.h (version, host_name): Add declarations.
13111 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13123 * linux-x86-64-low.c:
13125 * linux-s390-low.c:
13126 * linux-ppc64-low.c:
13128 * linux-mips-low.c:
13129 * linux-m68k-low.c:
13130 * linux-m32r-low.c:
13133 * linux-ia64-low.c:
13134 * linux-i386-low.c:
13135 * linux-crisv32-low.c:
13147 * gdbserver.1: Add (C) after Copyright. Update the FSF
13150 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13152 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13153 (arm_breakpoint_at): Recognize both breakpoints.
13154 (the_low_target): Use the correct breakpoint instruction.
13156 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13158 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13159 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13160 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13161 (the_low_target): Update.
13163 2005-10-25 Andreas Schwab <schwab@suse.de>
13165 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13167 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13168 (ia64_num_regs): Reduce to 462.
13170 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13172 * acinclude.m4: Correct quoting.
13173 * aclocal.m4: Regenerated.
13175 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13176 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13177 (thread_db_init): Call thread_db_err_str.
13178 * configure.ac: Check for TD_VERSION.
13179 * config.in, configure: Regenerated.
13181 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13183 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13185 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13187 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13188 is not available. Define HAVE_PTRACE_GETREGS if it is.
13189 * config.in, configure: Regenerated.
13190 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13191 * linux-i386-low.c, linux-m68k-low.c: Update to use
13192 HAVE_PTRACE_GETREGS.
13193 * linux-low.c (regsets_fetch_inferior_registers)
13194 (regsets_store_inferior_registers): Only return 0 if we processed
13196 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13197 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13199 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13201 * inferiors.c (struct thread_info): Add gdb_id.
13202 (add_thread): Add gdb_id argument.
13203 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13204 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13205 calls to add_thread.
13206 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13207 * server.c (handle_query): Use thread_to_gdb_id.
13208 (handle_v_cont, main): Use gdb_id_to_thread_id.
13209 * server.h (add_thread): Update prototype.
13210 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13213 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13215 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13216 left-padded registers.
13217 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13218 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13220 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13222 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13223 * configure: Regenerate.
13224 * config.in: Regenerate.
13225 * server.h (NEED_DECLARATION_STRERROR):
13226 Replace with !HAVE_DECL_STRERROR.
13228 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13230 * linux-low.c (linux_wait, linux_send_signal): Don't test
13231 an unsigned long variable for > 0 if it could be MAX_ULONG.
13232 * server.c (myresume): Likewise.
13233 * target.c (set_desired_inferior): Likewise.
13235 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13237 * configure.ac: Simplify and improve check for socklen_t.
13238 * configure, config.in: Regenerate.
13240 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13242 * acconfig.h: Remove.
13243 * configure.ac: Add a test for socklen_t. Use three-argument
13244 AC_DEFINE throughout.
13245 * config.in: Regenerated using autoheader 2.59.
13246 * configure: Regenerated.
13248 * gdbreplay.c (socklen_t): Provide a default.
13249 (remote_open): Use socklen_t.
13250 * remote-utils.c (socklen_t): Provide a default.
13251 (remote_open): Use socklen_t.
13252 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13255 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13257 * linux-low.c (linux_read_memory, linux_write_memory)
13258 (linux_read_auxv): Likewise.
13259 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13260 (check_mem_write): Likewise.
13261 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13263 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13264 (registers_from_string, register_data): Likewise.
13265 * server.c (handle_query, main): Likewise.
13266 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13267 (decode_M_packet): Likewise.
13268 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13269 * target.h (struct target_ops): Update read_memory, write_memory,
13271 (read_inferior_memory, write_inferior_memory): Update.
13272 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13273 to unsigned char *.
13274 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13275 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13276 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13277 linux-s390-low.c, linux-sh-low.c: Update for changes in
13278 read_inferior_memory and the_low_target->breakpoint.
13280 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13282 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13283 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13284 * configure.srv: Add powerpc64-*-linux*.
13285 * linux-ppc64-low.c: New file.
13287 2005-05-23 Orjan Friberg <orjanf@axis.com>
13289 * linux-cris-low.c: New file with support for CRIS.
13290 * linux-crisv32-low.c: Ditto for CRISv32.
13291 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13292 (clean): Add reg-cris.c and reg-crisv32.c.
13293 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13294 reg-crisv32.o, and reg-crisv32.c to make rules.
13295 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13296 recognized targets.
13298 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13300 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13301 of sizeof (PTRACE_XFER_TYPE).
13302 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13304 2005-05-12 Orjan Friberg <orjanf@axis.com>
13306 * target.h (struct target_ops): Add insert_watchpoint,
13307 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13308 pointers for hardware watchpoint support.
13309 * linux-low.h (struct linux_target_ops): Ditto.
13310 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13311 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13312 to linux_target_ops.
13313 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13315 * server.c (main): Recognize 'Z' and 'z' packets.
13317 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13319 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13320 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13321 (the_low_target): Add new members.
13323 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13325 * proc-service.c (ps_lgetregs): Search all_processes instead of
13328 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13330 * server.c (start_inferior): Change return type to int.
13331 (attach_inferior): Change sigptr to int *.
13332 (handle_v_cont, handle_v_requests): Change signal to int *.
13333 (main): Change signal to int.
13335 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13337 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13338 * configure.srv: Add m32r*-*-linux*.
13339 * linux-m32r-low.c: New file.
13341 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13343 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13345 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13347 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13348 Take unsigned long arguments for PIDs.
13349 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13350 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13351 (wait_for_sigstop, linux_resume_one_process)
13352 (regsets_fetch_inferior_registers, linux_send_signal)
13353 (linux_read_auxv): Likewise. Update the types of variables holding
13354 PIDs. Update format string specifiers.
13355 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13356 * remote-utils.c (prepare_resume_reply): Likewise.
13357 * server.c (cont_thread, general_thread, step_thread)
13358 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13360 (handle_query): Update format specifiers.
13361 (handle_v_cont, main): Use strtoul for thread IDs.
13362 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13363 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13364 (general_thread, step_thread, thread_from_wait)
13365 (old_thread_from_wait): Update.
13366 * target.h (struct thread_resume): Use unsigned long for THREAD.
13367 (struct target_ops): Use unsigned long for arguments to attach and
13370 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13372 * acinclude.m4: Include bfd/bfd.m4 directly.
13373 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13374 <agriffis@toolchain.org>.
13375 * aclocal.m4, configure: Regenerated.
13377 2005-01-07 Andrew Cagney <cagney@gnu.org>
13379 * configure.ac: Rename configure.in, require autoconf 2.59.
13380 * configure: Re-generate.
13382 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13384 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13385 LIBS when finished.
13386 * aclocal.m4: Regenerated.
13387 * configure: Regenerated.
13389 2004-11-21 Andreas Schwab <schwab@suse.de>
13391 * linux-m68k-low.c (m68k_num_gregs): Define.
13392 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13393 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13394 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13395 (m68k_breakpoint_at): New. Add to the_low_target.
13397 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13398 srv_linux_thread_db to yes.
13400 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13402 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13403 (ARCH_SET_FS): Likewise.
13404 (ARCH_GET_FS): Likewise.
13405 (ARCH_GET_GS): Likewise.
13407 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13409 * linux-i386-low.c (ps_get_thread_area): New.
13410 * linux-x86-64-low.c (ps_get_thread_area): New.
13411 * linux-low.c: Include <sys/syscall.h>.
13412 (linux_kill_one_process): Don't kill the first thread here.
13413 (linux_kill): Kill the first thread here.
13414 (kill_lwp): New function.
13415 (send_sigstop, linux_send_signal): Use it.
13416 * proc-service.c: Clean up #ifdefs.
13417 (fpregset_info): Delete.
13418 (ps_lgetregs): Update and enable implementation.
13419 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13421 * remote-utils.c (struct sym_cache, symbol_cache): New.
13422 (input_interrupt): Print a clearer message.
13423 (async_io_enabled): New variable.
13424 (enable_async_io, disable_async_io): Use it. Update comments.
13425 (look_up_one_symbol): Use the symbol cache.
13426 * thread-db.c (thread_db_look_up_symbols): New function.
13427 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13429 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13431 * configure.in: Test for -rdynamic.
13432 * configure: Regenerated.
13433 * Makefile (INTERNAL_LDFLAGS): New.
13434 (gdbserver, gdbreplay): Use it.
13436 2004-09-02 Andrew Cagney <cagney@gnu.org>
13438 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13440 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13442 * linux-low.c (linux_wait): Clear all_processes list also.
13444 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13446 * linux-low.c: Include <errno.h>. Remove extern declaration of
13449 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13451 * gdbreplay.c, server.h, utils.c: Update copyright years.
13453 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13455 * server.c (main): Print child status or termination signal from
13456 variable 'signal', not 'sig'.
13458 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13460 * linux-low.c (linux_read_memory): Change return type to
13461 int. Check for and return error from ptrace().
13462 * target.c (read_inferior_memory): Change return type to int. Pass
13463 back return status from the_target->read_memory().
13464 * target.h (struct target_ops): Adapt *read_memory() prototype.
13466 (read_inferior_memory): Adapt prototype.
13467 * server.c (main): Return an error packet if
13468 read_inferior_memory() returns an error.
13470 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13472 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13473 Unify with other clean targets.
13475 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13477 * server.c (handle_v_cont): Call set_desired_inferior.
13479 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13481 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13483 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13485 * linux-low.c (linux_wait): Unblock async I/O.
13486 (linux_resume): Block and enable async I/O.
13487 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13488 * server.h (block_async_io, unblock_async_io): Add prototypes.
13490 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13492 * remote-utils.c (remote_open): Print a status notice after
13493 opening a TCP port.
13494 * server.c (attach_inferior): Print a status notice after
13497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13499 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13501 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13503 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13505 * server.c, target.h: Update copyright years.
13507 2004-02-25 Roland McGrath <roland@redhat.com>
13509 * target.h (struct target_ops): New member `read_auxv'.
13510 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13511 * linux-low.c (linux_read_auxv): New function.
13512 (linux_target_ops): Initialize `read_auxv' member to that.
13514 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13516 Committed by Jim Blandy <jimb@redhat.com>.
13518 * linux-s390-low.c (s390_num_regs): Update.
13519 (s390_regmap): Remove control registers. Use __s390x__ predefine
13520 instead of GPR_SIZE to distiguish s390 and s390x targets.
13522 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13524 * linux-low.c: Update copyright year.
13525 (check_removed_breakpoint): Clear pending_is_breakpoint.
13526 (linux_set_resume_request, linux_queue_one_thread)
13527 (resume_status_pending_p): New functions.
13528 (linux_continue_one_thread): Use process->resume.
13529 (linux_resume): Only resume threads if there are no pending events.
13530 * linux-low.h (struct process_info): Add resume request
13533 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13535 * regcache.c (new_register_cache): Clear the allocated register
13536 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13538 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13540 * linux-low.c (linux_resume): Take a struct thread_resume *
13542 (linux_wait): Update call.
13543 (resume_ptr): New static variable.
13544 (linux_continue_one_thread): Renamed from
13545 linux_continue_one_process. Use resume_ptr.
13546 (linux_resume): Use linux_continue_one_thread.
13547 * server.c (handle_v_cont, handle_v_requests): New functions.
13548 (myresume): New function.
13549 (main): Handle 'v' case.
13550 * target.h (struct thread_resume): New type.
13551 (struct target_ops): Change argument of "resume" to struct
13553 (myresume): Delete macro.
13555 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13557 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13558 (uninstall): Support DESTDIR.
13560 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13562 * configure.srv: Add xscale*linux copy of arm*linux entry.
13564 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13566 * linux-arm-low.c (arm_reinsert_addr): New function.
13567 (the_low_target): Add arm_reinsert_addr.
13569 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13571 * mem-break.c: Remove whitespace at end of file.
13573 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13575 * configure.in: Check whether we need to prototype strerror.
13576 * server.h: Optionally prototype strerror.
13577 * gdbreplay.c (perror_with_name): Use strerror.
13578 * linux-low.c (linux_attach_lwp): Use strerror.
13579 * utils.c (perror_with_name): Use strerror.
13580 * config.in, configure: Regenerated.
13582 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13584 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13585 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13587 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13589 * Makefile.in (SFILES): Update.
13590 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13591 low-sun3.c: Remove files.
13593 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13595 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13596 (linux_detach_one_process, linux_detach): New functions.
13597 (linux_target_ops): Add linux_detach.
13598 * server.c (main): Handle 'D' packet.
13599 * target.h (struct target_ops): Add "detach" member.
13600 (detach_inferior): Define.
13602 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13604 From Kelley Cook <kelleycook@wideopenwest.com>:
13605 * configure.srv: Accept i[34567]86 variants.
13607 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13609 * linux-low.c (linux_wait_for_event): Correct comment typos.
13610 (linux_resume_one_process): Call check_removed_breakpoint.
13611 (linux_send_signal): New function.
13612 (linux_target_ops): Add linux_send_signal.
13613 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13615 * target.h (struct target_ops): Add send_signal.
13617 2003-05-29 Jim Blandy <jimb@redhat.com>
13619 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13620 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13621 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13622 away part of the register's value.
13624 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13626 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13627 (linux_wait_for_event, linux_init_signals): Likewise.
13629 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13631 * configure.in: Check for stdlib.h.
13632 * configure: Regenerated.
13633 * config.in: Regenerated.
13635 2003-01-04 Andreas Schwab <schwab@suse.de>
13637 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13639 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13641 * Makefile.in: Remove obsolete code.
13643 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13645 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13646 defined(PT_FPR0_HI).
13648 2002-11-17 Stuart Hughes <seh@zee2.com>
13650 * linux-arm-low.c (arm_num_regs): Increase.
13651 (arm_regmap): Include status register.
13653 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13655 * linux-low.c (register_addr): Remove incorrect -1 check.
13657 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13659 * linux-low.c (linux_create_inferior): Call setpgid. Return
13661 (unstopped_p, linux_signal_pid): Remove.
13662 (linux_target_ops): Remove linux_signal_pid.
13663 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13664 global instead of target method.
13665 * target.h (struct target_ops): Remove signal_pid. Update comment
13666 for create_inferior.
13667 * server.c (signal_pid): New variable.
13668 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13669 gdbserver. Set the child to be the foreground process group.
13670 (attach_inferior): Set signal_pid.
13672 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13674 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13676 2002-08-20 Jim Blandy <jimb@redhat.com>
13678 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13681 2002-08-01 Andrew Cagney <cagney@redhat.com>
13683 * Makefile.in: Make chill references obsolete.
13685 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13687 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13688 * configure: Regenerate.
13689 * config.in: Regenerate.
13691 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13693 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13694 (perror_with_name, remote_close, remote_open, expect, play): Static.
13696 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13698 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13699 byte offsets instead of an array of indexes.
13700 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13702 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13704 * regcache.c: Add comment.
13706 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13708 * thread-db.c: New file.
13709 * proc-service.c: New file.
13710 * acinclude.m4: New file.
13711 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13712 proc-service.o, and thread-db.o.
13713 (linux-low.o): Add USE_THREAD_DB.
13714 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13715 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13716 * aclocal.m4: Regenerated.
13717 * config.in: Regenerated.
13718 * configure: Regenerated.
13719 * configure.in: Check for proc_service.h, sys/procfs.h,
13720 thread_db.h, and linux/elf.h headrs.
13721 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13722 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13723 Check for -lthread_db and thread support.
13724 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13725 PowerPC, and SuperH.
13726 * i387-fp.c: Constify arguments.
13727 * i387-fp.h: Likewise.
13728 * inferiors.c: (struct thread_info): Renamed from
13729 `struct inferior_info'. Remove PID member. Use generic inferior
13730 list header. All uses updated.
13731 (inferiors, signal_pid): Removed.
13732 (all_threads): New variable.
13733 (get_thread): Define.
13734 (add_inferior_to_list): New function.
13735 (for_each_inferior): New function.
13736 (change_inferior_id): New function.
13737 (add_inferior): Removed.
13738 (remove_inferior): New function.
13739 (add_thread): New function.
13740 (free_one_thread): New function.
13741 (remove_thread): New function.
13742 (clear_inferiors): Use for_each_inferior and free_one_thread.
13743 (find_inferior): New function.
13744 (find_inferior_id): New function.
13745 (inferior_target_data): Update argument type.
13746 (set_inferior_target_data): Likewise.
13747 (inferior_regcache_data): Likewise.
13748 (set_inferior_regcache_data): Likewise.
13749 * linux-low.c (linux_bp_reinsert): Remove.
13750 (all_processes, stopping_threads, using_thrads)
13751 (struct pending_signals, debug_threads, pid_of): New.
13752 (inferior_pid): Replace with macro.
13753 (struct inferior_linux_data): Remove.
13754 (get_stop_pc, add_process): New functions.
13755 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13756 Use add_process and add_thread.
13757 (linux_attach_lwp): New function, based on old linux_attach. Use
13758 add_process and add_thread. Set stop_expected for new threads.
13759 (linux_attach): New function.
13760 (linux_kill_one_process): New function.
13761 (linux_kill): Kill all LWPs.
13762 (linux_thread_alive): Use find_inferior_id.
13763 (check_removed_breakpoints, status_pending_p): New functions.
13764 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13765 Update. Use WNOHANG. Wait for cloned processes also. Update process
13766 struct for the found process.
13767 (linux_wait_for_event): New function.
13768 (linux_wait): Use it. Support LWPs.
13769 (send_sigstop, wait_for_sigstop, stop_all_processes)
13770 (linux_resume_one_process, linux_continue_one_process): New functions.
13771 (linux_resume): Support LWPs.
13772 (REGISTER_RAW_SIZE): Remove.
13773 (fetch_register): Use register_size instead. Call supply_register.
13774 (usr_store_inferior_registers): Likewise. Call collect_register.
13775 Fix recursive case.
13776 (regsets_fetch_inferior_registers): Improve error message.
13777 (regsets_store_inferior_registers): Add debugging.
13778 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13779 (unstopped_p, linux_signal_pid): New functions.
13780 (linux_target_ops): Add linux_signal_pid.
13781 (linux_init_signals): New function.
13782 (initialize_low): Call it. Initialize using_threads.
13783 * regcache.c (inferior_regcache_data): Add valid
13785 (get_regcache): Fetch registers lazily. Add fetch argument
13786 and update all callers.
13787 (regcache_invalidate_one, regcache_invalidate): New
13789 (new_register_cache): Renamed from create_register_cache.
13790 Return the new regcache.
13791 (free_register_cache): Change argument to a void *.
13792 (registers_to_string, registers_from_string): Call get_regcache
13793 with fetch flag set.
13794 (register_data): Make static. Pass fetch flag to get_regcache.
13795 (supply_register): Call get_regcache with fetch flag clear.
13796 (collect_register): Call get_regcache with fetch flag set.
13797 (collect_register_as_string): New function.
13798 * regcache.h: Update.
13799 * remote-utils.c (putpkt): Flush after debug output and use
13801 Handle input interrupts while waiting for an ACK.
13802 (input_interrupt): Use signal_pid method.
13803 (getpkt): Flush after debug output and use stderr.
13804 (outreg): Use collect_register_as_string.
13805 (new_thread_notify, dead_thread_notify): New functions.
13806 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13807 and general_thread.
13808 (look_up_one_symbol): Flush after debug output.
13809 * server.c (step_thread, server_waiting): New variables.
13810 (start_inferior): Don't use signal_pid. Update call to mywait.
13811 (attach_inferior): Update call to mywait.
13812 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13813 (main): Don't fetch/store registers explicitly. Use
13814 set_desired_inferior. Support proposed ``Hs'' packet. Update
13816 * server.h: Update.
13817 (struct inferior_list, struct_inferior_list_entry): New.
13818 * target.c (set_desired_inferior): New.
13819 (write_inferior_memory): Constify.
13820 (mywait): New function.
13821 * target.h: Update.
13822 (struct target_ops): New signal_pid method.
13823 (mywait): Removed macro, added prototype.
13825 * linux-low.h (regset_func): Removed.
13826 (regset_fill_func, regset_store_func): New.
13827 (enum regset_type): New.
13828 (struct regset_info): Add type field. Use new operation types.
13829 (struct linux_target_ops): stop_pc renamed to get_pc.
13830 Add decr_pc_after_break and breakpoint_at.
13831 (get_process, get_thread_proess, get_process_thread)
13832 (strut process_info, all_processes, linux_attach_lwp)
13833 (thread_db_init): New.
13835 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13836 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13837 (the_low_target): Add new members.
13838 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13839 (i386_store_fpxregset): Constify.
13840 (target_regsets): Add new kind identifier.
13841 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13842 (i386_set_pc): Add debugging.
13843 (i386_breakpoint_at): New function.
13844 (the_low_target): Add new members.
13845 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13846 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13847 (mips_breakpoint_at): New.
13848 (the_low_target): Add new members.
13849 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13850 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13851 (the_low_target): Add new members.
13852 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13853 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13854 (the_low_target): Add new members.
13855 * linux-x86-64-low.c (target_regsets): Add new kind
13858 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13860 From Martin Pool <mbp@samba.org>:
13861 * server.c (gdbserver_usage): New function.
13864 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13866 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13867 stop_at -> stop_pc.
13869 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13871 * Makefile.in: Remove obsolete code.
13873 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13875 * linux-low.c (regsets_fetch_inferior_registers),
13876 (regsets_store_inferior_registers): Removed cast to int from
13878 * regcache.h: Added declaration of struct inferior_info.
13880 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13882 * inferiors.c (struct inferior_info): Add regcache_data.
13883 (add_inferior): Call create_register_cache.
13884 (clear_inferiors): Call free_register_cache.
13885 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13886 * regcache.c (struct inferior_regcache_data): New.
13887 (registers): Remove.
13888 (get_regcache): New function.
13889 (create_register_cache, free_register_cache): New functions.
13890 (set_register_cache): Don't initialize the register cache here.
13891 (registers_to_string, registers_from_string, register_data): Call
13893 * regcache.h: Add prototypes.
13894 * server.h: Likewise.
13896 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13898 * mem-break.c: New file.
13899 * mem-break.h: New file.
13900 * Makefile.in: Add mem-break.o rule; update server.h
13902 * inferiors.c (struct inferior_info): Add target_data
13904 (clear_inferiors): Free target_data member if set.
13905 (inferior_target_data, set_inferior_target_data): New functions.
13906 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13907 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13908 * linux-low.c (linux_bp_reinsert): New variable.
13909 (struct inferior_linux_data): New.
13910 (linux_create_inferior): Use set_inferior_target_data.
13911 (linux_attach): Likewise. Call add_inferior.
13912 (linux_wait_for_one_inferior): New function.
13913 (linux_wait): Call it.
13914 (linux_write_memory): Add const.
13915 (initialize_low): Call set_breakpoint_data.
13916 * linux-low.h (struct linux_target_ops): Add breakpoint
13918 * server.c (attach_inferior): Remove extra add_inferior
13920 * server.h: Include mem-break.h. Update inferior.c
13922 * target.c (read_inferior_memory)
13923 (write_inferior_memory): New functions.
13924 * target.h (read_inferior_memory)
13925 (write_inferior_memory): Change macros to prototypes.
13926 (struct target_ops): Update comments. Add const to write_memory
13929 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13931 * linux-low.c (usr_store_inferior_registers): Support
13932 registers which are allowed to fail to store.
13933 * linux-low.h (linux_target_ops): Likewise.
13934 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13935 (ppc_cannot_store_register): FPSCR may not be storable.
13937 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13939 * server.h: Include <string.h> if HAVE_STRING_H.
13940 * ChangeLog: Correct paths in last ChangeLog entry.
13942 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13944 * linux-low.h: Remove obsolete prototypes.
13945 (struct linux_target_ops): New.
13946 (extern the_low_target): New.
13947 * linux-low.c (num_regs, regmap): Remove declarations.
13948 (register_addr): Use the_low_target explicitly.
13949 (fetch_register): Likewise.
13950 (usr_fetch_inferior_registers): Likewise.
13951 (usr_store_inferior_registers): Likewise.
13952 * linux-arm-low.c (num_regs): Remove.
13953 (arm_num_regs): Define.
13954 (arm_regmap): Renamed from regmap, made static.
13955 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13957 (arm_cannot_store_register): Renamed from cannot_store_register,
13959 (the_low_target): New.
13960 * linux-i386-low.c (num_regs): Remove.
13961 (i386_num_regs): Define.
13962 (i386_regmap): Renamed from regmap, made static.
13963 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13965 (i386_cannot_store_register): Renamed from cannot_store_register,
13967 (the_low_target): New.
13968 * linux-ia64-low.c (num_regs): Remove.
13969 (ia64_num_regs): Define.
13970 (ia64_regmap): Renamed from regmap, made static.
13971 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13973 (ia64_cannot_store_register): Renamed from cannot_store_register,
13975 (the_low_target): New.
13976 * linux-m68k-low.c (num_regs): Remove.
13977 (m68k_num_regs): Define.
13978 (m68k_regmap): Renamed from regmap, made static.
13979 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13981 (m68k_cannot_store_register): Renamed from cannot_store_register,
13983 (the_low_target): New.
13984 * linux-mips-low.c (num_regs): Remove.
13985 (mips_num_regs): Define.
13986 (mips_regmap): Renamed from regmap, made static.
13987 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13989 (mips_cannot_store_register): Renamed from cannot_store_register,
13991 (the_low_target): New.
13992 * linux-ppc-low.c (num_regs): Remove.
13993 (ppc_num_regs): Define.
13994 (ppc_regmap): Renamed from regmap, made static.
13995 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13997 (ppc_cannot_store_register): Renamed from cannot_store_register,
13999 (the_low_target): New.
14000 * linux-s390-low.c (num_regs): Remove.
14001 (s390_num_regs): Define.
14002 (s390_regmap): Renamed from regmap, made static.
14003 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14005 (s390_cannot_store_register): Renamed from cannot_store_register,
14007 (the_low_target): New.
14008 * linux-sh-low.c (num_regs): Remove.
14009 (sh_num_regs): Define.
14010 (sh_regmap): Renamed from regmap, made static.
14011 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14013 (sh_cannot_store_register): Renamed from cannot_store_register,
14015 (the_low_target): New.
14016 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14017 (the_low_target): New.
14019 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14021 * Makefile.in: Add stamp-h target.
14022 * configure.in: Create stamp-h.
14023 * configure: Regenerated.
14025 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14027 * inferiors.c: New file.
14028 * target.c: New file.
14029 * target.h: New file.
14030 * Makefile.in: Add target.o and inferiors.o. Update
14032 * linux-low.c (inferior_pid): New static variable,
14033 moved from server.c.
14034 (linux_create_inferior): Renamed from create_inferior.
14035 Call add_inferior. Return 0 on success instead of a PID.
14036 (linux_attach): Renamed from myattach.
14037 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14038 (linux_thread_alive): Renamed from mythread_alive.
14039 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14041 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14042 (regsets_store_inferior_registers): Correct error message.
14043 Add missing ``return 0''.
14044 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14045 (linux_store_registers): Renamed from store_inferior_registers.
14046 (linux_read_memory): Renamed from read_inferior_memory.
14047 (linux_write_memory): Renamed from write_inferior_memory.
14048 (linux_target_ops): New structure.
14049 (initialize_low): Call set_target_ops ().
14050 * remote-utils.c (unhexify): New function.
14051 (hexify): New function.
14052 (input_interrupt): Send signals to ``signal_pid''.
14053 * server.c (inferior_pid): Remove.
14054 (start_inferior): Update create_inferior call.
14055 (attach_inferior): Call add_inferior.
14056 (handle_query): New function.
14057 (main): Call handle_query for `q' packets.
14058 * server.h: Include "target.h". Remove obsolete prototypes.
14059 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14061 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14063 * Makefile.in: Add WARN_CFLAGS. Update configury
14065 * configure.in: Check for <string.h>
14066 * configure: Regenerate.
14067 * config.in: Regenerate.
14068 * gdbreplay.c: Include needed system headers.
14069 (remote_open): Remove strchr prototype.
14070 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14071 * regcache.c (supply_register): Change buf argument to const void *.
14072 (supply_register_by_name): Likewise.
14073 (collect_register): Change buf argument to void *.
14074 (collect_register_by_name): Likewise.
14075 * regcache.h: Add missing prototypes.
14076 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14077 * server.c (handle_query): New function.
14078 (attached): New static variable, moved out of main.
14079 (main): Quiet longjmp clobber warnings.
14080 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14081 * utils.c (error): Remove NORETURN.