1 2016-05-17 Yao Qi <yao.qi@linaro.org>
3 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4 instead of find_inferior.
6 2016-05-05 Yao Qi <yao.qi@linaro.org>
8 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
9 Initialize res to zero.
11 2016-05-05 Yao Qi <yao.qi@linaro.org>
13 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
16 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
19 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
20 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
22 2016-04-28 Par Olsson <par.olsson@windriver.com>
23 Simon Marchi <simon.marchi@ericsson.com>
25 * tracepoint.c (write_inferior_int8): New function.
26 (cmd_qtenable_disable): Write enable flag using
29 2016-04-25 Yao Qi <yao.qi@linaro.org>
31 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
32 (need_step_over_p): Return zero if the LWP has pending signals
33 can be delivered on software single step target.
35 2016-04-25 Yao Qi <yao.qi@linaro.org>
37 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
38 return instead of error.
40 2016-04-22 Yao Qi <yao.qi@linaro.org>
42 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
45 2016-04-22 Yao Qi <yao.qi@linaro.org>
47 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
48 signal when stepping over breakpoint with software single
51 2016-04-21 Pedro Alves <palves@redhat.com>
53 * linux-s390-low.c (s390_collect_ptrace_register)
54 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
56 (s390_check_regset): Use void * instead of gdb_byte *.
58 2016-04-20 Pedro Alves <palves@redhat.com>
60 * configure: Renegerate.
62 2016-04-20 Yao Qi <yao.qi@linaro.org>
64 * linux-aarch32-low.c: Include "arch/arm-linux.h".
65 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
67 (arm_store_gregset): Likewise.
69 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
71 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
72 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
73 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
74 (amd64-avx-mpx-linux.c): New rules.
75 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
76 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
77 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
78 (srv_amd64_regobj): Add amd64-avx-mpx.o.
79 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
80 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
81 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
82 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
83 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
84 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
85 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
86 * linux-x86-low.c (x86_linux_read_description): Add case for
87 X86_XSTATE_AVX_MPX_MASK.
88 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
89 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
90 init_registers_i386_avx_mpx_linux.
91 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
92 (initialize_low_tracepoint): Call
93 init_registers_i386_avx_mpx_linux.
94 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
95 (initialize_low_tracepoint): Call
96 init_registers_amd64_avx_mpx_linux.
97 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
98 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
99 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
102 2016-04-18 Pedro Alves <palves@redhat.com>
104 * configure: Regenerate.
106 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
108 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
109 (aarch64_emit_sub): Likewise.
111 2016-04-12 Pedro Alves <palves@redhat.com>
113 * utils.c (prepare_to_throw_exception): Delete.
115 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
117 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
119 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
121 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
123 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
125 * linux-aarch64-ipa.c: Add <elf.h> include.
126 * linux-ppc-ipa.c: Add <elf.h> include.
127 * linux-s390-ipa.c: Add <elf.h> include.
129 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
131 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
132 (get_raw_reg_ptr): Likewise.
133 (get_trace_state_variable_value_ptr): Likewise.
134 (set_trace_state_variable_value_ptr): Likewise.
135 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
138 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
139 Marcin Kościelnicki <koriakin@0x04.net>
142 * linux-ppc-low.c (emit_insns): New function.
143 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
144 (ppc_emit_prologue): New function.
145 (ppc_emit_epilogue): New function.
146 (ppc_emit_add): New function.
147 (ppc_emit_sub): New function.
148 (ppc_emit_mul): New function.
149 (ppc_emit_lsh): New function.
150 (ppc_emit_rsh_signed): New function.
151 (ppc_emit_rsh_unsigned): New function.
152 (ppc_emit_ext): New function.
153 (ppc_emit_zero_ext): New function.
154 (ppc_emit_log_not): New function.
155 (ppc_emit_bit_and): New function.
156 (ppc_emit_bit_or): New function.
157 (ppc_emit_bit_xor): New function.
158 (ppc_emit_bit_not): New function.
159 (ppc_emit_equal): New function.
160 (ppc_emit_less_signed): New function.
161 (ppc_emit_less_unsigned): New function.
162 (ppc_emit_ref): New function.
163 (ppc_emit_const): New function.
164 (ppc_emit_reg): New function.
165 (ppc_emit_pop): New function.
166 (ppc_emit_stack_flush): New function.
167 (ppc_emit_swap): New function.
168 (ppc_emit_stack_adjust): New function.
169 (ppc_emit_call): New function.
170 (ppc_emit_int_call_1): New function.
171 (ppc_emit_void_call_2): New function.
172 (ppc_emit_if_goto): New function.
173 (ppc_emit_goto): New function.
174 (ppc_emit_eq_goto): New function.
175 (ppc_emit_ne_goto): New function.
176 (ppc_emit_lt_goto): New function.
177 (ppc_emit_le_goto): New function.
178 (ppc_emit_gt_goto): New function.
179 (ppc_emit_ge_goto): New function.
180 (ppc_write_goto_address): New function.
181 (ppc_emit_ops_impl): New static variable.
182 (ppc64v1_emit_prologue): New function.
183 (ppc64v2_emit_prologue): New function.
184 (ppc64_emit_epilogue): New function.
185 (ppc64_emit_add): New function.
186 (ppc64_emit_sub): New function.
187 (ppc64_emit_mul): New function.
188 (ppc64_emit_lsh): New function.
189 (ppc64_emit_rsh_signed): New function.
190 (ppc64_emit_rsh_unsigned): New function.
191 (ppc64_emit_ext): New function.
192 (ppc64_emit_zero_ext): New function.
193 (ppc64_emit_log_not): New function.
194 (ppc64_emit_bit_and): New function.
195 (ppc64_emit_bit_or): New function.
196 (ppc64_emit_bit_xor): New function.
197 (ppc64_emit_bit_not): New function.
198 (ppc64_emit_equal): New function.
199 (ppc64_emit_less_signed): New function.
200 (ppc64_emit_less_unsigned): New function.
201 (ppc64_emit_ref): New function.
202 (ppc64_emit_const): New function.
203 (ppc64v1_emit_reg): New function.
204 (ppc64v2_emit_reg): New function.
205 (ppc64_emit_pop): New function.
206 (ppc64_emit_stack_flush): New function.
207 (ppc64_emit_swap): New function.
208 (ppc64v1_emit_call): New function.
209 (ppc64v2_emit_call): New function.
210 (ppc64v1_emit_int_call_1): New function.
211 (ppc64v2_emit_int_call_1): New function.
212 (ppc64v1_emit_void_call_2): New function.
213 (ppc64v2_emit_void_call_2): New function.
214 (ppc64_emit_if_goto): New function.
215 (ppc64_emit_eq_goto): New function.
216 (ppc64_emit_ne_goto): New function.
217 (ppc64_emit_lt_goto): New function.
218 (ppc64_emit_le_goto): New function.
219 (ppc64_emit_gt_goto): New function.
220 (ppc64_emit_ge_goto): New function.
221 (ppc64v1_emit_ops_impl): New static variable.
222 (ppc64v2_emit_ops_impl): New static variable.
223 (ppc_emit_ops): New function.
224 (linux_low_target): Wire in ppc_emit_ops.
226 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
227 Marcin Kościelnicki <koriakin@0x04.net>
230 * Makefile.in: Add powerpc-*-ipa.o
231 * configure.srv: Add ipa_obj for powerpc*-linux.
232 * linux-ppc-ipa.c: New file.
233 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
235 (PPC_FIELD): New macro.
236 (PPC_SEXT): New macro.
237 (PPC_OP6): New macro.
241 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
242 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
243 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
244 (ppc_get_thread_area): New function.
245 (is_elfv2_inferior): New function.
246 (gen_ds_form): New function.
247 (GEN_STD): New macro.
248 (GEN_STDU): New macro.
250 (GEN_LDU): New macro.
251 (gen_d_form): New function.
252 (GEN_ADDI): New macro.
253 (GEN_ADDIS): New macro.
255 (GEN_LIS): New macro.
256 (GEN_ORI): New macro.
257 (GEN_ORIS): New macro.
258 (GEN_LWZ): New macro.
259 (GEN_STW): New macro.
260 (GEN_STWU): New macro.
261 (gen_xfx_form): New function.
262 (GEN_MFSPR): New macro.
263 (GEN_MTSPR): New macro.
264 (GEN_MFCR): New macro.
265 (GEN_MTCR): New macro.
266 (GEN_SYNC): New macro.
267 (GEN_LWSYNC): New macro.
268 (gen_x_form): New function.
271 (GEN_LWARX): New macro.
272 (GEN_STWCX): New macro.
273 (GEN_CMPW): New macro.
274 (gen_md_form): New function.
275 (GEN_RLDICL): New macro.
276 (GEN_RLDICR): New macro.
277 (gen_i_form): New function.
280 (gen_b_form): New function.
281 (GEN_BNE): New macro.
282 (GEN_LOAD): New macro.
283 (GEN_STORE): New macro.
284 (gen_limm): New function.
285 (gen_atomic_xchg): New function.
286 (gen_call): New function.
287 (ppc_relocate_instruction): New function.
288 (ppc_install_fast_tracepoint_jump_pad): New function.
289 (ppc_get_min_fast_tracepoint_insn_len): New function.
290 (ppc_get_ipa_tdesc_idx): New function.
291 (the_low_target): Wire in the new functions.
292 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
294 * linux-ppc-tdesc.h: New file.
296 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
298 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
299 (alloc_jump_pad_buffer): New function.
300 * linux-amd64-ipa.c: Add <sys/mman.h> include.
301 (alloc_jump_pad_buffer): New function.
302 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
303 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
304 (alloc_jump_pad_buffer): New function.
305 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
306 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
307 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
308 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
310 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
312 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
313 * linux-amd64-ipa.c: Likewise.
314 * linux-i386-ipa.c: Likewise.
315 * linux-s390-ipa.c: Likewise.
316 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
317 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
318 set_trace_state_variable_value_ptr.
319 (struct ipa_sym_addresses): Likewise.
320 (symbol_list): Likewise.
321 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
322 accessing gdb_collect directly.
323 (gdb_collect_ptr_type): New typedef.
324 (get_raw_reg_ptr_type): New typedef.
325 (get_trace_state_variable_value_ptr_type): New typedef.
326 (set_trace_state_variable_value_ptr_type): New typedef.
327 (gdb_collect_ptr): New global.
328 (get_raw_reg_ptr): New global.
329 (get_trace_state_variable_value_ptr): New global.
330 (set_trace_state_variable_value_ptr): New global.
331 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
332 accessing get_raw_reg directly.
333 (get_get_tsv_func_addr): Likewise for
334 get_trace_state_variable_value_ptr.
335 (get_set_tsv_func_addr): Likewise for
336 set_trace_state_variable_value_ptr.
337 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
339 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
341 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
343 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
345 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
347 (relocate_instruction): Remove own_buf.
348 * server.c (own_buf): Make global.
349 (handle_v_requests): Make global.
350 * server.h (own_buf): New declaration.
351 (handle_v_requests): New prototype.
353 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
356 * linux-s390-low.c (add_insns): New function.
357 (s390_emit_prologue): New function.
358 (s390_emit_epilogue): New function.
359 (s390_emit_add): New function.
360 (s390_emit_sub): New function.
361 (s390_emit_mul): New function.
362 (s390_emit_lsh): New function.
363 (s390_emit_rsh_signed): New function.
364 (s390_emit_rsh_unsigned): New function.
365 (s390_emit_ext): New function.
366 (s390_emit_log_not): New function.
367 (s390_emit_bit_and): New function.
368 (s390_emit_bit_or): New function.
369 (s390_emit_bit_xor): New function.
370 (s390_emit_bit_not): New function.
371 (s390_emit_equal): New function.
372 (s390_emit_less_signed): New function.
373 (s390_emit_less_unsigned): New function.
374 (s390_emit_ref): New function.
375 (s390_emit_if_goto): New function.
376 (s390_emit_goto): New function.
377 (s390_write_goto_address): New function.
378 (s390_emit_litpool): New function.
379 (s390_emit_const): New function.
380 (s390_emit_call): New function.
381 (s390_emit_reg): New function.
382 (s390_emit_pop): New function.
383 (s390_emit_stack_flush): New function.
384 (s390_emit_zero_ext): New function.
385 (s390_emit_swap): New function.
386 (s390_emit_stack_adjust): New function.
387 (s390_emit_set_r2): New function.
388 (s390_emit_int_call_1): New function.
389 (s390_emit_void_call_2): New function.
390 (s390_emit_eq_goto): New function.
391 (s390_emit_ne_goto): New function.
392 (s390_emit_lt_goto): New function.
393 (s390_emit_le_goto): New function.
394 (s390_emit_gt_goto): New function.
395 (s390_emit_ge_goto): New function.
396 (s390x_emit_prologue): New function.
397 (s390x_emit_epilogue): New function.
398 (s390x_emit_add): New function.
399 (s390x_emit_sub): New function.
400 (s390x_emit_mul): New function.
401 (s390x_emit_lsh): New function.
402 (s390x_emit_rsh_signed): New function.
403 (s390x_emit_rsh_unsigned): New function.
404 (s390x_emit_ext): New function.
405 (s390x_emit_log_not): New function.
406 (s390x_emit_bit_and): New function.
407 (s390x_emit_bit_or): New function.
408 (s390x_emit_bit_xor): New function.
409 (s390x_emit_bit_not): New function.
410 (s390x_emit_equal): New function.
411 (s390x_emit_less_signed): New function.
412 (s390x_emit_less_unsigned): New function.
413 (s390x_emit_ref): New function.
414 (s390x_emit_if_goto): New function.
415 (s390x_emit_const): New function.
416 (s390x_emit_call): New function.
417 (s390x_emit_reg): New function.
418 (s390x_emit_pop): New function.
419 (s390x_emit_stack_flush): New function.
420 (s390x_emit_zero_ext): New function.
421 (s390x_emit_swap): New function.
422 (s390x_emit_stack_adjust): New function.
423 (s390x_emit_int_call_1): New function.
424 (s390x_emit_void_call_2): New function.
425 (s390x_emit_eq_goto): New function.
426 (s390x_emit_ne_goto): New function.
427 (s390x_emit_lt_goto): New function.
428 (s390x_emit_le_goto): New function.
429 (s390x_emit_gt_goto): New function.
430 (s390x_emit_ge_goto): New function.
431 (s390_emit_ops): New function.
432 (struct linux_target_ops): Fill in emit_ops hook.
434 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
437 * Makefile.in: Add s390 IPA files.
438 * configure.srv: Build IPA for s390.
439 * linux-s390-ipa.c: New file.
440 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
441 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
442 (tdesc_s390_linux32): Likewise.
443 (init_registers_s390_linux32v1): Likewise.
444 (tdesc_s390_linux32v1): Likewise.
445 (init_registers_s390_linux32v2): Likewise.
446 (tdesc_s390_linux32v2): Likewise.
447 (init_registers_s390_linux64): Likewise.
448 (tdesc_s390_linux64): Likewise.
449 (init_registers_s390_linux64v1): Likewise.
450 (tdesc_s390_linux64v1): Likewise.
451 (init_registers_s390_linux64v2): Likewise.
452 (tdesc_s390_linux64v2): Likewise.
453 (init_registers_s390_te_linux64): Likewise.
454 (tdesc_s390_te_linux64): Likewise.
455 (init_registers_s390_vx_linux64): Likewise.
456 (tdesc_s390_vx_linux64): Likewise.
457 (init_registers_s390_tevx_linux64): Likewise.
458 (tdesc_s390_tevx_linux64): Likewise.
459 (init_registers_s390x_linux64): Likewise.
460 (tdesc_s390x_linux64): Likewise.
461 (init_registers_s390x_linux64v1): Likewise.
462 (tdesc_s390x_linux64v1): Likewise.
463 (init_registers_s390x_linux64v2): Likewise.
464 (tdesc_s390x_linux64v2): Likewise.
465 (init_registers_s390x_te_linux64): Likewise.
466 (tdesc_s390x_te_linux64): Likewise.
467 (init_registers_s390x_vx_linux64): Likewise.
468 (tdesc_s390x_vx_linux64): Likewise.
469 (init_registers_s390x_tevx_linux64): Likewise.
470 (tdesc_s390x_tevx_linux64): Likewise.
471 (have_hwcap_s390_vx): New static variable.
472 (s390_arch_setup): Fill have_hwcap_s390_vx.
473 (s390_get_thread_area): New function.
474 (s390_ft_entry_gpr_esa): New const.
475 (s390_ft_entry_gpr_zarch): New const.
476 (s390_ft_entry_misc): New const.
477 (s390_ft_entry_fr): New const.
478 (s390_ft_entry_vr): New const.
479 (s390_ft_main_31): New const.
480 (s390_ft_main_64): New const.
481 (s390_ft_exit_fr): New const.
482 (s390_ft_exit_vr): New const.
483 (s390_ft_exit_misc): New const.
484 (s390_ft_exit_gpr_esa): New const.
485 (s390_ft_exit_gpr_zarch): New const.
486 (append_insns): New function.
487 (s390_relocate_instruction): New function.
488 (s390_install_fast_tracepoint_jump_pad): New function.
489 (s390_get_min_fast_tracepoint_insn_len): New function.
490 (s390_get_ipa_tdesc_idx): New function.
491 (struct linux_target_ops): Wire in the above functions.
492 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
493 * linux-s390-tdesc.h: New file.
495 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
497 * linux-s390-low.c (s390_supports_tracepoints): New function.
498 (struct linux_target_ops): Fill supports_tracepoints hook.
500 2016-03-18 Yao Qi <yao.qi@linaro.org>
502 * linux-low.c (lwp_signal_can_be_delivered): New function.
503 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
505 2016-03-18 Yao Qi <yao.qi@linaro.org>
507 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
508 0 if signal is enqueued. Remove 'signal' from one debugging
509 message. Move one debugging message to some lines below.
510 Remove code setting 'signal' to 0.
512 2016-03-18 Yao Qi <yao.qi@linaro.org>
514 * linux-low.c (linux_low_filter_event): Remove redundant
515 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
517 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
519 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
520 (struct linux_target_ops): Wire in the above.
522 2016-03-03 Yao Qi <yao.qi@linaro.org>
524 * linux-low.c: Update comments to start_step_over.
526 2016-03-03 Yao Qi <yao.qi@linaro.org>
529 * linux-low.c (handle_extended_wait): Set child suspended
530 if event_lwp->bp_reinsert isn't zero.
532 2016-03-02 Yao Qi <yao.qi@linaro.org>
534 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
535 enqueue_pending_signal.
537 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
539 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
542 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
544 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
545 (s390_regmap_3264) [!__s390x__]: New global.
546 (s390_collect_ptrace_register): Skip map entries containing -1.
547 (s390_supply_ptrace_register): Ditto.
548 (s390_fill_gprs_high): New function.
549 (s390_store_gprs_high): New function.
550 (s390_regsets): Add NT_S390_HIGH_GPRS.
551 (s390_get_hwcap): Enable on 31-bit.
552 (have_hwcap_s390_high_gprs): Enable on 31-bit.
553 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
554 Detect NT_S390_HIGH_GPRS.
555 (s390_usrregs_info_3264): Enable on 31-bit.
556 (s390_regs_info): Enable regs_info_3264 on 31-bit.
557 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
559 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
562 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
563 * configure.srv: Ditto.
564 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
565 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
566 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
567 (init_registers_amd64_linux): Remove prototype.
568 (tdesc_amd64_linux): Remove declaration.
569 (get_ipa_tdesc): New function.
570 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
571 initialize remaining tdescs.
572 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
573 (init_registers_i386_linux): Remove prototype.
574 (tdesc_i386_linux): Remove declaration.
575 (get_ipa_tdesc): New function.
576 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
577 initialize remaining tdescs.
578 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
579 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
580 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
581 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
582 (x86_get_ipa_tdesc_idx): New function.
583 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
584 * linux-x86-tdesc.h: New file.
585 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
586 (target_get_ipa_tdesc_idx): New macro.
587 * tracepoint.c (ipa_tdesc_idx): New macro.
588 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
589 (symbol_list): Add ipa_tdesc_idx.
590 (cmd_qtstart): Write ipa_tdesc_idx in the target.
592 (ipa_tdesc_idx): New variable.
593 (get_context_regcache): Use get_ipa_tdesc.
594 (gdb_collect): Ditto.
596 * tracepoint.h (get_ipa_tdesc): New prototype.
599 2016-02-24 Pedro Alves <palves@redhat.com>
601 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
602 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
603 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
604 Factor out common code between the USE_SIGTRAP_SIGINFO and
605 !USE_SIGTRAP_SIGINFO blocks.
606 (linux_low_filter_event): Call save_stop_reason instead of
607 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
609 (linux_wait_1): Update comments.
611 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
613 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
614 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
615 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
616 ppc_insert_point, ppc_remove_point.
618 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
620 * linux-s390-low.c (s390_supports_z_point_type): New function.
621 (struct linux_target_ops): Wire s390_supports_z_point_type in.
623 2016-02-16 Yao Qi <yao.qi@linaro.org>
625 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
626 PC. Get pc from regcache_read_pc.
628 2016-02-12 Yao Qi <yao.qi@linaro.org>
630 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
631 or linux_get_pc_32bit.
632 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
634 2016-02-12 Yao Qi <yao.qi@linaro.org>
636 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
637 arm_linux_get_next_pcs_fixup.
639 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
641 * tracepoint.c (x_tracepoint_action_download): Change
642 write_inferior_data_ptr to write_inferior_data_pointer.
643 (cmd_qtstart): Likewise.
644 (write_inferior_data_ptr): Remove.
645 (download_agent_expr): Change write_inferior_data_ptr to
646 write_inferior_data_pointer.
647 (download_tracepoint_1): Likewise.
648 (download_tracepoint): Likewise.
649 (download_trace_state_variables): Likewise.
651 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
652 Marcin Kościelnicki <koriakin@0x04.net>
654 * tracepoint.c (struct tracepoint_action_ops): Remove.
655 (struct tracepoint_action): Remove ops.
656 (m_tracepoint_action_download, r_tracepoint_action_download)
657 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
658 size and offset accordingly.
659 (m_tracepoint_action_ops, r_tracepoint_action_ops)
660 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
661 (tracepoint_action_send, tracepoint_action_download): New functions.
662 Helpers for trace action handlers.
663 (add_tracepoint_action): Remove setup actions ops.
664 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
666 2016-02-10 Yao Qi <yao.qi@linaro.org>
668 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
670 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
672 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
674 * configure: Regenerate.
676 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
678 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
679 void * to gdb_byte *.
680 * linux-low.c (siginfo_fixup): Likewise.
681 (linux_xfer_siginfo): Likewise.
682 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
684 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
686 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
688 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
690 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
692 * linux-x86-low.c [__x86_64__]: Include
693 "nat/amd64-linux-siginfo.h".
694 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
695 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
696 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
697 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
698 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
699 (cpt_si_fd, si_timerid, si_overrun): Move from
700 nat/amd64-linux-siginfo.c.
701 * Makefile.in (amd64-linux-siginfo.o:): New rule.
703 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
705 * server.c (skip_to_semicolon): Remove.
706 (process_point_options): Use strchrnul instead of
709 2016-01-26 Yao Qi <yao.qi@linaro.org>
711 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
712 * linux-low.c (install_software_single_step_breakpoints): Don't
713 call regcache_read_pc.
714 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
717 2016-01-26 Yao Qi <yao.qi@linaro.org>
719 * linux-low.c (install_software_single_step_breakpoints): Call
720 regcache_read_pc instead of get_pc.
722 2016-01-26 Yao Qi <yao.qi@linaro.org>
724 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
725 (unblock_async_io): Rename to ...
726 (block_unblock_async_io): ... it. New function.
727 (enable_async_io): Don't install SIGIO handler. Unblock it
729 (disable_async_io): Don't ignore SIGIO. Block it instead.
730 (initialize_async_io): Install SIGIO handler. Don't call
733 2016-01-26 Yao Qi <yao.qi@linaro.org>
735 * remote-utils.c (getpkt): If the buffer isn't empty, and the
736 first character is '\003', call *the_target->request_interrupt.
738 2016-01-25 Yao Qi <yao.qi@linaro.org>
740 * remote-utils.c (new_thread_notify): Remove.
741 (dead_thread_notify): Likewise.
742 * remote-utils.h (new_thread_notify): Remove declaration.
743 (dead_thread_notify): Likewise.
745 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
747 * gdb.trace/pending.exp: Fix expected message on continue.
749 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
751 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
752 it works properly on big-endian machines where sizeof (CORE_ADDR)
755 2016-01-21 Pedro Alves <palves@redhat.com>
757 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
758 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
759 * configure: Regenerate.
761 2016-01-21 Yao Qi <yao.qi@linaro.org>
763 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
764 is_thumb and set it according to CPSR saved on the stack.
765 (get_next_pcs_syscall_next_pc): Pass is_thumb to
766 arm_sigreturn_next_pc.
768 2016-01-18 Yao Qi <yao.qi@linaro.org>
770 * linux-low.c (linux_set_pc_64bit): New function.
771 (linux_get_pc_64bit): New function.
772 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
774 * linux-sparc-low.c (debug_threads): Remove declaration.
775 (sparc_get_pc): Remove.
776 (the_low_target): Use linux_get_pc_64bit instead of
778 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
779 (the_low_target): Use linux_get_pc_64bit and
782 2016-01-18 Yao Qi <yao.qi@linaro.org>
784 * linux-arm-low.c (debug_threads): Remove declaration.
785 (arm_get_pc, arm_set_pc): Remove.
786 (the_low_target): Use linux_get_pc_32bit and
788 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
789 (the_low_target): Use linux_get_pc_32bit and
791 * linux-cris-low.c (debug_threads): Remove declaration.
792 (cris_get_pc, cris_set_pc,): Remove.
793 (the_low_target): Use linux_get_pc_32bit and
795 * linux-crisv32-low.c (debug_threads): Remove declaration.
796 (cris_get_pc, cris_set_pc): Remove.
797 (the_low_target): Use linux_get_pc_32bit and
799 * linux-low.c: Include inttypes.h.
800 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
801 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
802 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
803 (the_low_target): Use linux_get_pc_32bit and
805 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
806 (the_low_target): Use linux_get_pc_32bit and
808 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
809 (the_low_target): Use linux_get_pc_32bit and
811 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
812 (the_low_target): Use linux_get_pc_32bit and
814 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
815 (the_low_target): Use linux_get_pc_32bit and
818 2016-01-18 Gary Benson <gbenson@redhat.com>
820 * configure.ac (AC_FUNC_FORK): New check.
821 * config.in: Regenerate.
822 * configure: Likewise.
824 2016-01-14 Yao Qi <yao.qi@linaro.org>
826 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
827 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
828 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
829 arm_get_next_pcs_ctor.
831 2016-01-12 Josh Stone <jistone@redhat.com>
832 Philippe Waroquiers <philippe.waroquiers@skynet.be>
834 * inferiors.h: Include "gdb_vecs.h".
835 (struct process_info): Add syscalls_to_catch.
836 * inferiors.c (remove_process): Free syscalls_to_catch.
837 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
838 syscall_return stops.
839 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
840 * server.c (handle_general_set): Handle QCatchSyscalls.
841 (handle_query): Report support for QCatchSyscalls.
842 * target.h (struct target_ops): Add supports_catch_syscall.
843 (target_supports_catch_syscall): New macro.
844 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
845 (struct lwp_info): Add syscall_state.
846 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
847 Maintain syscall_state and syscalls_to_catch across exec.
848 (get_syscall_trapinfo): New function, proxy to the_low_target.
849 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
850 (linux_low_filter_event): Toggle syscall_state entry/return for
851 syscall traps, and set it ignored for all others.
852 (gdb_catching_syscalls_p): New function.
853 (gdb_catch_this_syscall_p): New function.
854 (linux_wait_1): Handle SYSCALL_SIGTRAP.
855 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
856 (linux_supports_catch_syscall): New function.
857 (linux_target_ops): Install it.
858 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
859 (the_low_target): Install it.
861 2016-01-12 Mike Frysinger <vapier@gentoo.org>
863 * acinclude.m4: Include new ../warning.m4 file.
864 * configure: Regenerated.
865 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
867 2016-01-12 Mike Frysinger <vapier@gentoo.org>
869 * ax.c (is_goto_target): Mark static.
870 * linux-low.c (register_addr): Likewise.
871 (linux_fetch_registers, linux_store_registers): Likewise.
872 * mem-break.c (any_persistent_commands): Fix old prototype.
873 (add_commands_to_breakpoint): Mark static.
874 * regcache.c (find_register_by_name): Delete unused func.
875 * remote-utils.c (hex_or_minus_one): Mark static.
876 * server.c (monitor_show_help): Mark static.
877 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
878 handle_v_requests): Likewise.
880 2016-01-12 Pedro Alves <palves@redhat.com>
882 Remove use of the registered trademark symbol throughout.
884 2016-01-08 Yao Qi <yao.qi@linaro.org>
886 * remote-utils.c (getpkt): If c is '\003', call target hook
889 2016-01-06 Yao Qi <yao.qi@linaro.org>
891 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
893 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
894 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
895 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
896 (thumb2_breakpoint): Declare.
897 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
899 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
900 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
901 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
903 2016-01-01 Joel Brobecker <brobecker@adacore.com>
905 * gdbreplay.c (gdbreplay_version): Change copyright year in
907 * server.c (gdbserver_version): Likewise.
909 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
911 * server.c (crc32_table): Delete.
912 (crc32): Use libiberty's xcrc32 function.
914 2015-12-22 Joel Brobecker <brobecker@adacore.com>
916 * lynx-low.c (lynx_delete_thread_callback): New function.
917 (lynx_mourn): Properly delete our process and all of its
918 threads. Remove call to clear_inferiors.
920 2015-12-22 Joel Brobecker <brobecker@adacore.com>
922 * target.c (thread_search_callback): Add check that
923 the thread_stopped target callback is not NULL before
926 2015-12-21 Yao Qi <yao.qi@linaro.org>
928 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
931 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
933 * server.c (handle_query): Call target_supports_software_single_step.
935 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
937 * linux-low.c (single_step): New function.
938 (linux_resume_one_lwp_throw): Call single_step.
939 (start_step_over): Likewise.
941 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
943 * Makefile.in (SFILES): Append arch/arm-linux.c,
944 arch/arm-get-next-pcs.c.
945 (arm-linux.o): New rule.
946 (arm-get-next-pcs.o): New rule.
947 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
949 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
950 to linux-aarch32-low.c.
951 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
952 (arm_breakpoint_len, thumb_breakpoint): Likewise.
953 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
954 (thumb2_breakpoint_len): Likewise.
955 (arm_is_thumb_mode): Make non-static.
956 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
957 from linux-aarch32-low.c.
958 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
959 (arm_breakpoint_len, thumb_breakpoint): Likewise.
960 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
961 (thumb2_breakpoint_len): Likewise.
962 (arm_is_thumb_mode): New declaration.
963 * linux-arm-low.c: Include arch/arm-linux.h
964 aarch/arm-get-next-pcs.h, sys/syscall.h.
965 (get_next_pcs_ops): New struct.
966 (get_next_pcs_addr_bits_remove): New function.
967 (get_next_pcs_is_thumb): New function.
968 (get_next_pcs_read_memory_unsigned_integer): Likewise.
969 (arm_sigreturn_next_pc): Likewise.
970 (get_next_pcs_syscall_next_pc): Likewise.
971 (arm_gdbserver_get_next_pcs): Likewise.
972 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
974 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
975 * server.h: Include gdb_vecs.h.
977 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
979 * Makefile.in (SFILES): Append common/common-regcache.c.
980 (OBS): Append common-regcache.o.
981 (common-regcache.o): New rule.
982 * regcache.c (init_register_cache): Initialize cache to
984 (regcache_raw_read_unsigned): New function.
985 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
986 register_status enum.
988 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
990 * linux-aarch64-low.c (the_low_targets): Rename
991 breakpoint_reinsert_addr to get_next_pcs.
992 * linux-arm-low.c (the_low_targets): Likewise.
993 * linux-bfin-low.c (the_low_targets): Likewise.
994 * linux-cris-low.c (the_low_targets): Likewise.
995 * linux-crisv32-low.c (the_low_targets): Likewise.
996 * linux-low.c (can_software_single_step): Likewise.
997 (install_software_single_step_breakpoints): New function.
998 (start_step_over): Use install_software_single_step_breakpoints.
999 * linux-low.h: New CORE_ADDR vector.
1000 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1002 * linux-mips-low.c (the_low_targets): Likewise.
1003 * linux-nios2-low.c (the_low_targets): Likewise.
1004 * linux-sparc-low.c (the_low_targets): Likewise.
1006 2015-12-17 Pedro Alves <palves@redhat.com>
1008 * linux-low.c (linux_kill_one_lwp): Remove references to
1010 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1012 (linux_init_signals): Delete.
1013 (initialize_low): Adjust.
1014 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1016 2015-12-16 Pedro Alves <palves@redhat.com>
1018 * configure.ac (compiler warning flags): When testing a
1019 -Wno-foo option, check whether -Wfoo works instead.
1020 * configure: Regenerate.
1022 2015-12-11 Don Breazeal <donb@codesourcery.com>
1024 * server.c (process_serial_event): Don't exit from gdbserver
1025 in remote mode if there are still active inferiors.
1027 2015-12-11 Yao Qi <yao.qi@linaro.org>
1029 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1030 arm_breakpoint_at if the process is 32-bit.
1032 2015-12-11 Yao Qi <yao.qi@linaro.org>
1034 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1037 2015-12-07 Yao Qi <yao.qi@linaro.org>
1039 * configure.srv: Append arm.o to srv_tgtobj for
1040 aarch64*-*-linux* target.
1041 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1042 from linux-arm-low.c.
1043 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1044 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1045 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1046 (thumb2_breakpoint_len): Likewise.
1047 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1048 (arm_breakpoint_kinds): Likewise.
1049 (arm_breakpoint_kind_from_pc): Likewise.
1050 (arm_sw_breakpoint_from_kind): Likewise.
1051 (arm_breakpoint_kind_from_current_state): Likewise.
1052 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1053 (arm_sw_breakpoint_from_kind): Declare.
1054 (arm_breakpoint_kind_from_current_state): Declare.
1055 (arm_breakpoint_at): Declare.
1056 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1057 arm_sw_breakpoint_from_kind if process is 32-bit.
1058 (aarch64_breakpoint_kind_from_pc): New function.
1059 (aarch64_breakpoint_kind_from_current_state): New function.
1060 (the_low_target): Initialize fields breakpoint_kind_from_pc
1061 and breakpoint_kind_from_current_state.
1062 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1063 linux-aarch32-low.c.
1064 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1065 (arm_breakpoint, arm_breakpoint_len): Likewise.
1066 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1067 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1068 (arm_is_thumb_mode): Likewise.
1069 (arm_breakpoint_at): Likewise.
1070 (arm_breakpoint_kind_from_pc): Likewise.
1071 (arm_sw_breakpoint_from_kind): Likewise.
1072 (arm_breakpoint_kind_from_current_state): Likewise.
1075 2015-08-04 Yao Qi <yao.qi@linaro.org>
1077 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1078 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1079 * server.c (extended_protocol): Remove "static".
1080 * server.h (extended_protocol): Declare it.
1082 2015-12-04 Josh Stone <jistone@redhat.com>
1084 * target.h (struct target_ops) <arch_setup>: Rename to ...
1085 (struct target_ops) <post_create_inferior>: ... this.
1086 (target_arch_setup): Rename to ...
1087 (target_post_create_inferior): ... this, calling post_create_inferior.
1088 * server.c (start_inferior): Update target_arch_setup calls to
1089 target_post_create_inferior.
1090 * linux-low.c (linux_low_ptrace_options): Forward declare.
1091 (linux_arch_setup): Update its comment for general use.
1092 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1093 (struct linux_target_ops): Use linux_post_create_inferior.
1094 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1095 to post_create_inferior.
1096 * nto-low.c (struct nto_target_ops): Likewise.
1097 * spu-low.c (struct spu_target_ops): Likewise.
1098 * win32-low.c (struct win32_target_ops): Likewise.
1100 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1102 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1104 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1106 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1107 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1108 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1109 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1110 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1112 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1114 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1116 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1119 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1121 * linux-low.c (linux_look_up_symbols): Don't call
1122 linux_supports_traceclone.
1123 * linux-low.h (thread_db_init): Remove use_events argument.
1124 * thread-db.c (thread_db_use_event): Remove global variable.
1125 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1126 (struct thread_db) <td_create_bp>: Remove field.
1127 (thread_db_create_event): Remove function.
1128 (thread_db_enable_reporting): Likewise.
1129 (find_one_thread): Don't check for thread_db_use_events.
1130 (attach_thread): Likewise.
1131 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1132 (try_thread_db_load_1): Don't check for thread_db_use_events.
1133 (thread_db_init): Remove use_events argument and thread events
1135 (remove_thread_event_breakpoints): Remove function.
1136 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1138 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1140 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1142 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1143 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1145 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1146 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1148 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1151 * linux-low.c (can_hardware_single_step): Use
1152 supports_hardware_single_step.
1153 (can_software_single_step): New function.
1154 (start_step_over): Call can_software_single_step.
1155 (linux_supports_hardware_single_step): New function.
1156 (struct target_ops) <supports_software_single_step>: Initialize.
1157 * linux-low.h (struct linux_target_ops)
1158 <supports_hardware_single_step>: Initialize.
1159 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1160 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1161 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1162 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1163 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1164 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1165 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1167 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1168 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1170 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1171 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1173 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1174 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1175 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1177 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1178 * target.h (struct target_ops): <supports_software_single_step>:
1180 (target_supports_software_single_step): New macro.
1182 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1184 * linux-low.c (linux_wait_1): Fix pc advance condition.
1185 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1186 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1188 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1190 * linux-arm-low.c (arm_is_thumb_mode): New function.
1191 (arm_breakpoint_at): Use arm_is_thumb_mode.
1192 (arm_breakpoint_kind_from_current_state): New function.
1193 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1195 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1196 (linux_breakpoint_kind_from_current_state): New function.
1197 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1198 * linux-low.h (struct linux_target_ops)
1199 <breakpoint_kind_from_current_state>: New field.
1200 * target.h (struct target_ops): Likewise.
1201 (target_breakpoint_kind_from_current_state): New macro.
1203 2015-11-30 Pedro Alves <palves@redhat.com>
1205 * linux-low.c (linux_resume): Wake up the event loop before
1208 2015-11-30 Pedro Alves <palves@redhat.com>
1210 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1212 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1214 * target.c (struct thread_search): New structure.
1215 (thread_search_callback): New function.
1216 (prev_general_thread): New global.
1217 (prepare_to_access_memory, done_accessing_memory): New functions.
1218 * target.h (prepare_to_access_memory, done_accessing_memory):
1219 Replace macros with function declarations.
1221 2015-11-30 Pedro Alves <palves@redhat.com>
1224 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1225 report TARGET_WAITKIND_NO_RESUMED.
1226 * remote-utils.c (prepare_resume_reply): Handle
1227 TARGET_WAITKIND_NO_RESUMED.
1228 * server.c (report_no_resumed): New global.
1229 (handle_query) <qSupported>: Handle "no-resumed+". Report
1230 "no-resumed+" support.
1231 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1232 return error if the client doesn't support no-resumed events.
1233 (push_stop_notification): New function.
1234 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1235 events if the client supports them.
1237 2015-11-30 Pedro Alves <palves@redhat.com>
1239 * linux-low.c (thread_still_has_status_pending_p): Don't check
1241 (lwp_resumed): New function.
1242 (status_pending_p_callback): Return early if the LWP is not
1243 supposed to be resumed.
1245 2015-11-30 Pedro Alves <palves@redhat.com>
1247 * linux-low.c (handle_extended_wait): Assert that the LWP's
1248 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1249 thread create events, leave the new child's status pending.
1250 (linux_low_filter_event): If GDB wants to hear about thread exit
1251 events, leave the LWP marked dead and don't delete it.
1252 (linux_wait_for_event_filtered): Don't check for thread exit.
1253 (filter_exit_event): New function.
1254 (linux_wait_1): Use it, when returning an exit event.
1255 (linux_resume_one_lwp_throw): Assert that the LWP's
1256 waitstatus is TARGET_WAITKIND_IGNORE.
1257 * remote-utils.c (prepare_resume_reply): Handle
1258 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1259 * server.c (report_thread_events): New global.
1260 (handle_general_set): Handle QThreadEvents.
1261 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1262 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1263 TARGET_WAITKIND_THREAD_EXITED.
1264 * server.h (report_thread_events): Declare.
1266 2015-11-30 Pedro Alves <palves@redhat.com>
1268 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1269 the thread's last_resume_kind was resume_stop.
1271 2015-11-30 Pedro Alves <palves@redhat.com>
1273 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1276 2015-11-30 Pedro Alves <palves@redhat.com>
1278 * server.c (handle_v_requests): Handle vCtrlC.
1280 2015-11-30 Pedro Alves <palves@redhat.com>
1282 * gdbthread.h (find_any_thread_of_pid): Declare.
1283 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1285 * server.c (handle_query): If current_thread is NULL, look for
1286 another thread of the selected process.
1288 2015-11-26 Daniel Colascione <dancol@dancol.org>
1289 Simon Marchi <simon.marchi@ericsson.com>
1291 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1292 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1294 * target.h (struct target_ops) <thread_name>: New field.
1295 (target_thread_name): New macro.
1297 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1299 * regcache.h (regcache_invalidate_pid): Add declaration.
1300 * regcache.c (regcache_invalidate_pid): New function, extracted
1301 from regcache_invalidate.
1302 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1303 Add trivial documentation comment.
1304 * lynx-low.c: Use regcache_invalidate_pid instead of
1305 regcache_invalidate.
1307 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1309 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1310 and Elf64_auxv_t if the target is Android.
1312 2015-11-22 Doug Evans <xdje42@gmail.com>
1314 * target.h: #include <sys/types.h>.
1316 2015-11-19 Pedro Alves <palves@redhat.com>
1318 * linux-low.c (linux_process_qsupported): Change prototype.
1320 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1322 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1323 and adjust to loop over all features.
1324 * server.c (handle_query) <qSupported>: Adjust to call
1325 target_process_qsupported once, passing it a vector of unprocessed
1327 * target.h (struct target_ops) <process_qsupported>: Change
1329 (target_process_qsupported): Adjust.
1331 2015-11-19 Pedro Alves <palves@redhat.com>
1333 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1335 * configure: Regenerate.
1337 2015-11-19 Pedro Alves <palves@redhat.com>
1339 * configure: Regenerate.
1341 2015-11-19 Yao Qi <yao.qi@linaro.org>
1343 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1346 2015-11-19 Yao Qi <yao.qi@linaro.org>
1348 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1349 (struct aarch64_operand): Move enum out.
1351 2015-11-19 Yao Qi <yao.qi@linaro.org>
1353 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1354 struct user_fpsimd_state *.
1355 (aarch64_store_fpregset): Likewise.
1357 2015-11-19 Yao Qi <yao.qi@linaro.org>
1359 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1360 struct user_pt_regs *.
1361 (aarch64_store_gregset): Likewise.
1363 2015-11-18 Pedro Alves <palves@redhat.com>
1365 * Makefile.in (all_object_files): Add $IPA_OBJS.
1367 2015-11-17 Pedro Alves <palves@redhat.com>
1369 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1370 GDB_SIGNAL_0 and gdb_signal_to_string.
1372 2015-11-17 Pedro Alves <palves@redhat.com>
1374 * win32-low.c (handle_output_debug_string): Remove parameter.
1375 (win32_kill): Remove our_status local and adjust call to
1376 handle_output_debug_string.
1377 (get_child_debug_event): Adjust call to
1378 handle_output_debug_string.
1380 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1382 * linux-mips-low.c (mips_fill_gregset): Add cast.
1383 (mips_store_gregset): Likewise.
1384 (mips_fill_fpregset): Likewise.
1385 (mips_store_fpregset): Likewise.
1387 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1389 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1392 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1394 * linux-mips-low.c (mips_linux_new_thread): Change type of
1395 watch_type to enum target_hw_bp_type.
1397 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1399 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1400 Change return type to arm_hwbp_type.
1402 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1404 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1405 (arm_store_gregset): Likewise.
1406 * linux-arm-low.c (arm_get_hwcap): Likewise.
1407 (arm_read_description): Likewise.
1409 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1411 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1413 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1415 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1416 (ppc_fill_vsxregset): Likewise.
1417 (ppc_store_vsxregset): Likewise.
1418 (ppc_fill_vrregset): Likewise.
1419 (ppc_store_vrregset): Likewise.
1420 (ppc_fill_evrregset): Likewise.
1421 (ppc_store_evrregset): Likewise.
1423 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1425 * linux-ppc-low.c (ppc_usrregs_info): Remove
1426 forward-declaration.
1427 (ppc_arch_setup): Move lower in file.
1429 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1431 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1432 (ps_pdwrite): Likewise.
1434 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1436 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1437 to after assert checks.
1439 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1441 * proc-service.c (ps_pdread): Add/adjust casts.
1442 (ps_pdwrite): Add/adjust casts.
1444 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1446 * server.c (handle_search_memory_1): Cast return value of
1449 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1451 * server.c (write_qxfer_response): Change type of data to
1454 2015-10-29 Pedro Alves <palves@redhat.com>
1456 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1458 2015-10-29 Pedro Alves <palves@redhat.com>
1460 * tracepoint.c (clear_installed_tracepoints): Add casts.
1462 2015-10-29 Pedro Alves <palves@redhat.com>
1464 * server.c (handle_v_cont, process_serial_event): Add enum
1465 gdb_signal casts to signal parsing code.
1467 2015-10-29 Pedro Alves <palves@redhat.com>
1469 * linux-low.h (NULL_REGSET): Define.
1470 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1471 * linux-arm-low.c (arm_regsets): Likewise.
1472 * linux-crisv32-low.c (cris_regsets): Likewise.
1473 * linux-m68k-low.c (m68k_regsets): Likewise.
1474 * linux-mips-low.c (mips_regsets): Likewise.
1475 * linux-nios2-low.c (nios2_regsets): Likewise.
1476 * linux-ppc-low.c (ppc_regsets): Likewise.
1477 * linux-s390-low.c (s390_regsets): Likewise.
1478 * linux-sh-low.c (sh_regsets): Likewise.
1479 * linux-sparc-low.c (sparc_regsets): Likewise.
1480 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1481 * linux-tile-low.c (tile_regsets): Likewise.
1482 * linux-x86-low.c (x86_regsets): Likewise.
1483 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1485 2015-10-29 Pedro Alves <palves@redhat.com>
1487 * linux-low.h (NULL_REGSET): Define.
1488 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1489 * linux-arm-low.c (arm_regsets): Likewise.
1490 * linux-crisv32-low.c (cris_regsets): Likewise.
1491 * linux-m68k-low.c (m68k_regsets): Likewise.
1492 * linux-mips-low.c (mips_regsets): Likewise.
1493 * linux-nios2-low.c (nios2_regsets): Likewise.
1494 * linux-ppc-low.c (ppc_regsets): Likewise.
1495 * linux-s390-low.c (s390_regsets): Likewise.
1496 * linux-sh-low.c (sh_regsets): Likewise.
1497 * linux-sparc-low.c (sparc_regsets): Likewise.
1498 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1499 * linux-tile-low.c (tile_regsets): Likewise.
1500 * linux-x86-low.c (x86_regsets): Likewise.
1501 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1503 2015-10-26 Doug Evans <dje@google.com>
1505 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1507 2015-10-26 Doug Evans <dje@google.com>
1509 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1511 2015-10-26 Doug Evans <dje@google.com>
1513 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1515 (attach_thread, find_new_threads_callback): Ditto.
1517 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1519 * mem-break.h (set_breakpoint_data): Remove.
1521 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1523 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1524 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1525 (initialize_low): Remove set_breakpoint_data call.
1526 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1527 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1528 (initialize_low): Remove set_breakpoint_data call.
1529 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1530 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1531 (initialize_low): Remove set_breakpoint_data call.
1533 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1535 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1536 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1537 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1538 * target.h (target_breakpoint_kind_from_pc): New macro.
1540 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1542 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1543 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1544 the default breakpoint kind.
1546 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1548 * linux-arm-low.c (arm_supports_z_point_type): Add software
1551 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1553 * linux-arm-low.c: Refactor breakpoint definitions.
1554 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1555 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1557 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1559 * Makefile.in: Add arm.c/o.
1560 * configure.srv: Likewise.
1561 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1562 (arm_breakpoint_kind_from_pc): New function.
1563 (arm_sw_breakpoint_from_kind): Return proper kind.
1564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1566 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1568 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1570 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1571 (struct raw_breakpoint) <size>: Remove.
1572 (struct raw_breakpoint) <kind>: Add.
1573 (bp_size): New function.
1574 (bp_opcode): Likewise.
1575 (find_raw_breakpoint_at): Adjust for kind.
1576 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1577 (remove_memory_breakpoint): Adjust for kind call bp_size.
1578 (set_raw_breakpoint_at): Adjust for kind.
1579 (set_breakpoint): Likewise.
1580 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1581 (delete_raw_breakpoint): Adjust for kind.
1582 (delete_breakpoint): Likewise.
1583 (find_gdb_breakpoint): Likewise.
1584 (set_gdb_breakpoint_1): Likewise.
1585 (set_gdb_breakpoint): Likewise.
1586 (delete_gdb_breakpoint_1): Likewise.
1587 (delete_gdb_breakpoint): Likewise.
1588 (uninsert_raw_breakpoint): Likewise.
1589 (reinsert_raw_breakpoint): Likewise.
1590 (set_breakpoint_data): Remove.
1591 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1592 (check_mem_read): Adjust for kind call bp_size.
1593 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1594 (clone_one_breakpoint): Adjust for kind.
1595 * mem-break.h (set_gdb_breakpoint): Likewise.
1596 (delete_gdb_breakpoint): Likewise.
1597 * server.c (process_serial_event): Likewise.
1599 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1601 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1602 (struct linux_target_ops) <breakpoint>: Remove.
1603 (struct linux_target_ops) <breakpoint_len>: Remove.
1604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1606 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1607 (arm_sw_breakpoint_from_kind): New function.
1608 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1609 (struct linux_target_ops) <breakpoint>: Remove.
1610 (struct linux_target_ops) <breakpoint_len>: Remove.
1611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1613 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1614 (struct linux_target_ops) <breakpoint>: Remove.
1615 (struct linux_target_ops) <breakpoint_len>: Remove.
1616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1618 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1624 and sw_breakpoint_from_kind to increment the pc.
1625 (linux_breakpoint_kind_from_pc): New function.
1626 (linux_sw_breakpoint_from_kind): New function.
1627 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1628 (initialize_low): Call breakpoint_kind_from_pc and
1629 sw_breakpoint_from_kind to replace breakpoint_data/len.
1630 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1633 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1664 (struct linux_target_ops) <breakpoint>: Remove.
1665 (struct linux_target_ops) <breakpoint_len>: Remove.
1666 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1667 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1668 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1669 (struct linux_target_ops) <breakpoint>: Remove.
1670 (struct linux_target_ops) <breakpoint_len>: Remove.
1671 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1672 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1673 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1674 (struct linux_target_ops) <breakpoint>: Remove.
1675 (struct linux_target_ops) <breakpoint_len>: Remove.
1676 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1677 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1678 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1679 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1680 (struct linux_target_ops) <breakpoint>: Remove.
1681 (struct linux_target_ops) <breakpoint_len>: Remove.
1682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1684 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1685 (struct linux_target_ops) <breakpoint>: Remove.
1686 (struct linux_target_ops) <breakpoint_len>: Remove.
1687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1690 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1692 * linux-cris-low.c (cris_get_pc): Remove void arg.
1694 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1696 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1699 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1701 * inferiors.c (thread_pid_matches_callback): New function.
1702 (find_thread_process): New function.
1703 (remove_thread): Reset current_thread.
1704 (remove_process): Assert threads have been removed first.
1706 2015-10-15 Yao Qi <yao.qi@linaro.org>
1708 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1710 (aarch64_remove_point): Likewise.
1711 * regcache.c (regcache_register_size): New function.
1713 2015-10-12 Yao Qi <yao.qi@linaro.org>
1715 * linux-aarch64-low.c: Update all callers as emit_load_store
1716 is renamed to aarch64_emit_load_store.
1718 2015-10-12 Yao Qi <yao.qi@linaro.org>
1720 * linux-aarch64-low.c: Update all callers of function renaming
1721 from emit_insn to aarch64_emit_insn.
1723 2015-10-12 Yao Qi <yao.qi@linaro.org>
1725 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1726 arch/aarch64-insn.h.
1727 (struct aarch64_memory_operand): Likewise.
1729 (emit_insn): Move to arch/aarch64-insn.c.
1730 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1731 (emit_load_store): Move to arch/aarch64-insn.c.
1732 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1733 (can_encode_int32): Remove.
1735 2015-10-12 Yao Qi <yao.qi@linaro.org>
1737 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1738 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1739 (aarch64_relocate_instruction): Likewise.
1740 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1741 (struct aarch64_insn_visitor): Likewise.
1743 2015-10-12 Yao Qi <yao.qi@linaro.org>
1745 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1746 (struct aarch64_insn_visitor): New.
1747 (struct aarch64_insn_relocation_data): New.
1748 (aarch64_ftrace_insn_reloc_b): New function.
1749 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1750 (aarch64_ftrace_insn_reloc_cb): Likewise.
1751 (aarch64_ftrace_insn_reloc_tb): Likewise.
1752 (aarch64_ftrace_insn_reloc_adr): Likewise.
1753 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1754 (aarch64_ftrace_insn_reloc_others): Likewise.
1756 (aarch64_relocate_instruction): Use visitor.
1758 2015-10-12 Yao Qi <yao.qi@linaro.org>
1760 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1761 int. Add argument buf.
1762 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1763 aarch64_relocate_instruction.
1765 2015-10-12 Yao Qi <yao.qi@linaro.org>
1767 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1768 argument insn. Remove local variable insn. Don't call
1770 (aarch64_install_fast_tracepoint_jump_pad): Call
1773 2015-09-30 Yao Qi <yao.qi@linaro.org>
1775 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1776 (emit_load_store_pair): Likewise.
1778 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1780 * dll.c (match_dll): Add cast(s).
1781 (unloaded_dll): Likewise.
1782 * linux-low.c (second_thread_of_pid_p): Likewise.
1783 (delete_lwp_callback): Likewise.
1784 (count_events_callback): Likewise.
1785 (select_event_lwp_callback): Likewise.
1786 (linux_set_resume_request): Likewise.
1787 * server.c (accumulate_file_name_length): Likewise.
1788 (emit_dll_description): Likewise.
1789 (handle_qxfer_threads_worker): Likewise.
1790 (visit_actioned_threads): Likewise.
1791 * thread-db.c (any_thread_of): Likewise.
1792 * tracepoint.c (same_process_p): Likewise.
1793 (match_blocktype): Likewise.
1794 (build_traceframe_info_xml): Likewise.
1796 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1798 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1800 (gdb_unparse_agent_expr): Likewise.
1801 * hostio.c (require_data): Likewise.
1802 (handle_pread): Likewise.
1803 * linux-low.c (disable_regset): Likewise.
1804 (fetch_register): Likewise.
1805 (store_register): Likewise.
1806 (get_dynamic): Likewise.
1807 (linux_qxfer_libraries_svr4): Likewise.
1808 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1809 (set_fast_tracepoint_jump): Likewise.
1810 (uninsert_fast_tracepoint_jumps_at): Likewise.
1811 (reinsert_fast_tracepoint_jumps_at): Likewise.
1812 (validate_inserted_breakpoint): Likewise.
1813 (clone_agent_expr): Likewise.
1814 * regcache.c (init_register_cache): Likewise.
1815 * remote-utils.c (putpkt_binary_1): Likewise.
1816 (decode_M_packet): Likewise.
1817 (decode_X_packet): Likewise.
1818 (look_up_one_symbol): Likewise.
1819 (relocate_instruction): Likewise.
1820 (monitor_output): Likewise.
1821 * server.c (handle_search_memory): Likewise.
1822 (handle_qxfer_exec_file): Likewise.
1823 (handle_qxfer_libraries): Likewise.
1824 (handle_qxfer): Likewise.
1825 (handle_query): Likewise.
1826 (handle_v_cont): Likewise.
1827 (handle_v_run): Likewise.
1828 (captured_main): Likewise.
1829 * target.c (write_inferior_memory): Likewise.
1830 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1831 * tracepoint.c (init_trace_buffer): Likewise.
1832 (add_tracepoint_action): Likewise.
1833 (add_traceframe): Likewise.
1834 (add_traceframe_block): Likewise.
1835 (cmd_qtdpsrc): Likewise.
1836 (cmd_qtdv): Likewise.
1837 (cmd_qtstatus): Likewise.
1838 (response_source): Likewise.
1839 (response_tsv): Likewise.
1840 (cmd_qtnotes): Likewise.
1841 (gdb_collect): Likewise.
1842 (initialize_tracepoint): Likewise.
1844 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1846 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1847 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1848 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1850 (enum aarch64_condition_codes): New enum.
1851 (w0): New static global.
1854 (struct aarch64_memory_operand) <type>: New
1855 MEMORY_OPERAND_POSTINDEX type.
1856 (postindex_memory_operand): New helper function.
1857 (emit_ret): New function.
1858 (emit_load_store_pair): New function, factored out of emit_stp
1859 with support for MEMORY_OPERAND_POSTINDEX.
1860 (emit_stp): Rewrite using emit_load_store_pair.
1861 (emit_ldp): New function.
1862 (emit_load_store): Likewise.
1863 (emit_ldr): Mention post-index instruction in comment.
1864 (emit_ldrh): New function.
1865 (emit_ldrb): New function.
1866 (emit_ldrsw): Mention post-index instruction in comment.
1867 (emit_str): Likewise.
1868 (emit_subs): New function.
1869 (emit_cmp): Likewise.
1870 (emit_and): Likewise.
1871 (emit_orr): Likewise.
1872 (emit_orn): Likewise.
1873 (emit_eor): Likewise.
1874 (emit_mvn): Likewise.
1875 (emit_lslv): Likewise.
1876 (emit_lsrv): Likewise.
1877 (emit_asrv): Likewise.
1878 (emit_mul): Likewise.
1879 (emit_sbfm): Likewise.
1880 (emit_sbfx): Likewise.
1881 (emit_ubfm): Likewise.
1882 (emit_ubfx): Likewise.
1883 (emit_csinc): Likewise.
1884 (emit_cset): Likewise.
1885 (emit_nop): Likewise.
1886 (emit_ops_insns): New helper function.
1887 (emit_pop): Likewise.
1888 (emit_push): Likewise.
1889 (aarch64_emit_prologue): New function.
1890 (aarch64_emit_epilogue): Likewise.
1891 (aarch64_emit_add): Likewise.
1892 (aarch64_emit_sub): Likewise.
1893 (aarch64_emit_mul): Likewise.
1894 (aarch64_emit_lsh): Likewise.
1895 (aarch64_emit_rsh_signed): Likewise.
1896 (aarch64_emit_rsh_unsigned): Likewise.
1897 (aarch64_emit_ext): Likewise.
1898 (aarch64_emit_log_not): Likewise.
1899 (aarch64_emit_bit_and): Likewise.
1900 (aarch64_emit_bit_or): Likewise.
1901 (aarch64_emit_bit_xor): Likewise.
1902 (aarch64_emit_bit_not): Likewise.
1903 (aarch64_emit_equal): Likewise.
1904 (aarch64_emit_less_signed): Likewise.
1905 (aarch64_emit_less_unsigned): Likewise.
1906 (aarch64_emit_ref): Likewise.
1907 (aarch64_emit_if_goto): Likewise.
1908 (aarch64_emit_goto): Likewise.
1909 (aarch64_write_goto_address): Likewise.
1910 (aarch64_emit_const): Likewise.
1911 (aarch64_emit_call): Likewise.
1912 (aarch64_emit_reg): Likewise.
1913 (aarch64_emit_pop): Likewise.
1914 (aarch64_emit_stack_flush): Likewise.
1915 (aarch64_emit_zero_ext): Likewise.
1916 (aarch64_emit_swap): Likewise.
1917 (aarch64_emit_stack_adjust): Likewise.
1918 (aarch64_emit_int_call_1): Likewise.
1919 (aarch64_emit_void_call_2): Likewise.
1920 (aarch64_emit_eq_goto): Likewise.
1921 (aarch64_emit_ne_goto): Likewise.
1922 (aarch64_emit_lt_goto): Likewise.
1923 (aarch64_emit_le_goto): Likewise.
1924 (aarch64_emit_gt_goto): Likewise.
1925 (aarch64_emit_ge_got): Likewise.
1926 (aarch64_emit_ops_impl): New static global variable.
1927 (aarch64_emit_ops): New target function, return
1928 &aarch64_emit_ops_impl.
1929 (struct linux_target_ops): Install it.
1931 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1933 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1934 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1936 * linux-aarch64-ipa.c: New file.
1937 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1939 (aarch64_get_thread_area): New target method.
1940 (extract_signed_bitfield): New helper function.
1941 (aarch64_decode_ldr_literal): New function.
1942 (enum aarch64_opcodes): New enum.
1943 (struct aarch64_register): New struct.
1944 (struct aarch64_operand): New struct.
1945 (x0): New static global.
1954 (aarch64_register): New helper function.
1955 (register_operand): Likewise.
1956 (immediate_operand): Likewise.
1957 (struct aarch64_memory_operand): New struct.
1958 (offset_memory_operand): New helper function.
1959 (preindex_memory_operand): Likewise.
1960 (enum aarch64_system_control_registers): New enum.
1961 (ENCODE): New macro.
1962 (emit_insn): New helper function.
1963 (emit_b): New function.
1964 (emit_bcond): Likewise.
1965 (emit_cb): Likewise.
1966 (emit_tb): Likewise.
1967 (emit_blr): Likewise.
1968 (emit_stp): Likewise.
1969 (emit_ldp_q_offset): Likewise.
1970 (emit_stp_q_offset): Likewise.
1971 (emit_load_store): Likewise.
1972 (emit_ldr): Likewise.
1973 (emit_ldrsw): Likewise.
1974 (emit_str): Likewise.
1975 (emit_ldaxr): Likewise.
1976 (emit_stxr): Likewise.
1977 (emit_stlr): Likewise.
1978 (emit_data_processing_reg): Likewise.
1979 (emit_data_processing): Likewise.
1980 (emit_add): Likewise.
1981 (emit_sub): Likewise.
1982 (emit_mov): Likewise.
1983 (emit_movk): Likewise.
1984 (emit_mov_addr): Likewise.
1985 (emit_mrs): Likewise.
1986 (emit_msr): Likewise.
1987 (emit_sevl): Likewise.
1988 (emit_wfe): Likewise.
1989 (append_insns): Likewise.
1990 (can_encode_int32_in): New helper function.
1991 (aarch64_relocate_instruction): New function.
1992 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1993 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1994 (struct linux_target_ops): Install aarch64_get_thread_area,
1995 aarch64_install_fast_tracepoint_jump_pad and
1996 aarch64_get_min_fast_tracepoint_insn_len.
1998 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2000 * Makefile.in (aarch64-insn.o): New rule.
2001 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2003 2015-09-21 Yao Qi <yao.qi@linaro.org>
2005 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2007 2015-09-21 Yao Qi <yao.qi@linaro.org>
2009 * tracepoint.c (max_jump_pad_size): Remove.
2011 2015-09-18 Yao Qi <yao.qi@linaro.org>
2013 * linux-aarch64-low.c: Don't include sys/uio.h.
2014 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2016 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2018 * tracepoint.c (eval_result_type): Change prototype.
2019 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2021 2015-09-15 Pedro Alves <palves@redhat.com>
2023 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2024 Check whether to report exec events instead of checking whether
2025 multiprocess is enabled.
2027 2015-09-15 Pedro Alves <palves@redhat.com>
2030 * remote-utils.c (prepare_resume_reply): Merge
2031 TARGET_WAITKIND_VFORK_DONE switch case with the
2032 TARGET_WAITKIND_FORKED case.
2034 2015-09-15 Yao Qi <yao.qi@linaro.org>
2036 * server.c (handle_query): Check string comparison using
2037 "else if" instead of "if".
2039 2015-09-15 Yao Qi <yao.qi@linaro.org>
2041 * server.c (vCont_supported): New global variable.
2042 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2043 matches. Append ";vContSupported+" to own_buf.
2044 (handle_v_requests): Append ";s;S" to own_buf if target supports
2045 hardware single step or vCont_supported is false.
2046 (capture_main): Set vCont_supported to zero.
2048 2015-09-15 Yao Qi <yao.qi@linaro.org>
2050 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2052 (linux_supports_hardware_single_step): ... New function.
2053 (linux_target_ops): Update.
2054 * lynx-low.c (lynx_target_ops): Set field
2055 supports_hardware_single_step to target_can_do_hardware_single_step.
2056 * nto-low.c (nto_target_ops): Likewise.
2057 * spu-low.c (spu_target_ops): Likewise.
2058 * win32-low.c (win32_target_ops): Likewise.
2059 * target.c (target_can_do_hardware_single_step): New function.
2060 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2061 Remove. <supports_hardware_single_step>: New field.
2062 (target_supports_conditional_breakpoints): Remove.
2063 (target_supports_hardware_single_step): New macro.
2064 (target_can_do_hardware_single_step): Declare.
2065 * server.c (handle_query): Use target_supports_hardware_single_step
2066 instead of target_supports_conditional_breakpoints.
2068 2015-09-15 Yao Qi <yao.qi@linaro.org>
2070 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2072 (struct linux_target_ops the_low_target): Install
2073 aarch64_linux_siginfo_fixup.
2075 2015-09-11 Don Breazeal <donb@codesourcery.com>
2076 Luis Machado <lgustavo@codesourcery.com>
2078 * linux-low.c (linux_mourn): Static declaration.
2079 (linux_arch_setup): Move in front of
2080 handle_extended_wait.
2081 (linux_arch_setup_thread): New function.
2082 (handle_extended_wait): Handle exec events. Call
2083 linux_arch_setup_thread. Make event_lwp argument a
2084 pointer-to-a-pointer.
2085 (check_zombie_leaders): Do not check stopped threads.
2086 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2087 (linux_low_filter_event): Add lwp and thread for exec'ing
2088 non-leader thread if leader thread has been deleted.
2089 Refactor code into linux_arch_setup_thread and call it.
2090 Pass child lwp pointer by reference to handle_extended_wait.
2091 (linux_wait_for_event_filtered): Update comment.
2092 (linux_wait_1): Prevent clobbering exec event status.
2093 (linux_supports_exec_events): New function.
2094 (linux_target_ops) <supports_exec_events>: Initialize new member.
2095 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2097 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2098 * server.c (report_exec_events): New global variable.
2099 (handle_query): Handle qSupported query for exec-events feature.
2100 (captured_main): Initialize report_exec_events.
2101 * server.h (report_exec_events): Declare new global variable.
2102 * target.h (struct target_ops) <supports_exec_events>: New
2104 (target_supports_exec_events): New macro.
2105 * win32-low.c (win32_target_ops) <supports_exec_events>:
2106 Initialize new member.
2108 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2110 * linux-low.c (linux_low_enable_btrace): Remove.
2111 (linux_target_ops): Replace linux_low_enable_btrace with
2112 linux_enable_btrace.
2114 2015-09-03 Yao Qi <yao.qi@linaro.org>
2116 * linux-aarch64-low.c (aarch64_insert_point): Call
2117 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2120 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2122 * linux-low.c (check_stopped_by_breakpoint): Use
2123 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2125 2015-08-27 Pedro Alves <palves@redhat.com>
2127 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2129 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2131 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2132 the XNEW-family equivalent.
2133 (compile_bytecodes): Likewise.
2134 * dll.c (loaded_dll): Likewise.
2135 * event-loop.c (append_callback_event): Likewise.
2136 (create_file_handler): Likewise.
2137 (create_file_event): Likewise.
2138 * hostio.c (handle_open): Likewise.
2139 * inferiors.c (add_thread): Likewise.
2140 (add_process): Likewise.
2141 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2142 * linux-arm-low.c (arm_new_process): Likewise.
2143 (arm_new_thread): Likewise.
2144 * linux-low.c (add_to_pid_list): Likewise.
2145 (linux_add_process): Likewise.
2146 (handle_extended_wait): Likewise.
2147 (add_lwp): Likewise.
2148 (enqueue_one_deferred_signal): Likewise.
2149 (enqueue_pending_signal): Likewise.
2150 (linux_resume_one_lwp_throw): Likewise.
2151 (linux_resume_one_thread): Likewise.
2152 (linux_read_memory): Likewise.
2153 (linux_write_memory): Likewise.
2154 * linux-mips-low.c (mips_linux_new_process): Likewise.
2155 (mips_linux_new_thread): Likewise.
2156 (mips_add_watchpoint): Likewise.
2157 * linux-x86-low.c (initialize_low_arch): Likewise.
2158 * lynx-low.c (lynx_add_process): Likewise.
2159 * mem-break.c (set_raw_breakpoint_at): Likewise.
2160 (set_breakpoint): Likewise.
2161 (add_condition_to_breakpoint): Likewise.
2162 (add_commands_to_breakpoint): Likewise.
2163 (clone_agent_expr): Likewise.
2164 (clone_one_breakpoint): Likewise.
2165 * regcache.c (new_register_cache): Likewise.
2166 * remote-utils.c (look_up_one_symbol): Likewise.
2167 * server.c (queue_stop_reply): Likewise.
2168 (start_inferior): Likewise.
2169 (queue_stop_reply_callback): Likewise.
2170 (handle_target_event): Likewise.
2171 * spu-low.c (fetch_ppc_memory): Likewise.
2172 (store_ppc_memory): Likewise.
2173 * target.c (set_target_ops): Likewise.
2174 * thread-db.c (thread_db_load_search): Likewise.
2175 (try_thread_db_load_1): Likewise.
2176 * tracepoint.c (add_tracepoint): Likewise.
2177 (add_tracepoint_action): Likewise.
2178 (create_trace_state_variable): Likewise.
2179 (cmd_qtdpsrc): Likewise.
2180 (cmd_qtro): Likewise.
2181 (add_while_stepping_state): Likewise.
2182 * win32-low.c (child_add_thread): Likewise.
2183 (get_image_name): Likewise.
2185 2015-08-25 Yao Qi <yao.qi@linaro.org>
2187 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2189 2015-08-25 Yao Qi <yao.qi@linaro.org>
2191 * Makefile.in (aarch64-linux.o): New rule.
2192 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2194 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2195 (aarch64_init_debug_reg_state): Make it extern.
2196 (aarch64_linux_prepare_to_resume): Remove.
2198 2015-08-25 Yao Qi <yao.qi@linaro.org>
2200 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2201 lwp_arch_private_info and ptid_of_lwp.
2203 2015-08-25 Yao Qi <yao.qi@linaro.org>
2205 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2206 Find proc_info by find_process_pid. All callers updated.
2208 2015-08-25 Yao Qi <yao.qi@linaro.org>
2210 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2212 (debug_reg_change_callback): Remove.
2213 (aarch64_notify_debug_reg_change): Remove.
2215 2015-08-25 Yao Qi <yao.qi@linaro.org>
2217 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2218 Call current_lwp_ptid.
2220 2015-08-25 Yao Qi <yao.qi@linaro.org>
2222 * linux-aarch64-low.c (debug_reg_change_callback): Use
2225 2015-08-25 Yao Qi <yao.qi@linaro.org>
2227 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2229 2015-08-25 Yao Qi <yao.qi@linaro.org>
2231 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2233 2015-08-25 Yao Qi <yao.qi@linaro.org>
2235 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2238 2015-08-25 Yao Qi <yao.qi@linaro.org>
2240 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2242 (debug_reg_change_callback): Remove argument entry and add argument
2243 lwp. Remove local variable thread. Don't print thread id in the
2244 debugging output. Don't check whether pid of thread equals to pid.
2245 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2246 iterate_over_lwps instead find_inferior.
2248 2015-08-24 Pedro Alves <palves@redhat.com>
2250 * inferiors.c (get_first_process): New function.
2251 * inferiors.h (get_first_process): New declaration.
2252 * remote-utils.c (read_ptid): Default to the first process in the
2253 list, instead of to the current thread's process.
2255 2015-08-24 Pedro Alves <palves@redhat.com>
2257 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2258 * event-loop.c: Likewise.
2259 * remote-utils.c: Likewise.
2260 * tracepoint.c: Likewise.
2262 2015-08-24 Pedro Alves <palves@redhat.com>
2264 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2267 2015-08-21 Pedro Alves <palves@redhat.com>
2269 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2270 instead of literal 1.
2272 2015-08-21 Pedro Alves <palves@redhat.com>
2274 * tdesc.c (default_description): Explicitly zero-initialize.
2276 2015-08-21 Pedro Alves <palves@redhat.com>
2279 * inferiors.c (remove_thread): Discard any pending stop reply for
2281 * server.c (remove_all_on_match_pid): Rename to ...
2282 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2284 (discard_queued_stop_replies): Change parameter to a ptid. Now
2286 (handle_v_kill, kill_inferior_callback, captured_main)
2287 (process_serial_event): Adjust.
2288 * server.h (discard_queued_stop_replies): Declare.
2290 2015-08-21 Pedro Alves <palves@redhat.com>
2292 * linux-low.c (wait_for_sigstop): Always switch to no thread
2293 selected if the previously current thread dies.
2294 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2295 process instead of the current thread's.
2296 * remote-utils.c (input_interrupt): Don't check if there's no
2298 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2299 current thread to the general thread fails, error out.
2300 (handle_qxfer_auxv, handle_qxfer_libraries)
2301 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2302 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2303 (handle_query): Check if there's a thread selected instead of
2304 checking whether there's any thread in the thread list.
2305 (handle_qxfer_threads, handle_qxfer_btrace)
2306 (handle_qxfer_btrace_conf): Don't error out early if there's no
2307 thread in the thread list.
2308 (handle_v_cont, myresume): Don't set the current thread to the
2310 (process_serial_event) <Hg handling>: Also set thread_id if the
2311 previous general thread is still alive.
2312 (process_serial_event) <g/G handling>: If setting the current
2313 thread to the general thread fails, error out.
2314 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2315 thread's lwp instead of the current thread's.
2316 * target.c (set_desired_thread): If the desired thread was not
2317 found, leave the current thread pointing to NULL. Return an int
2318 (boolean) indicating success.
2319 * target.h (set_desired_thread): Change return type to int.
2321 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2323 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2324 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2326 (ps_get_thread_area): New function.
2328 2015-08-19 Gary Benson <gbenson@redhat.com>
2330 * hostio.c (handle_pread): Do not attempt to read more data
2331 than hostio_reply_with_data can fit in a packet.
2333 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2335 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2337 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2339 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2341 2015-08-06 Pedro Alves <palves@redhat.com>
2343 * tracepoint.c (expr_eval_result): Now an int.
2345 2015-08-06 Pedro Alves <palves@redhat.com>
2347 * gdbthread.h (struct regcache): Forward declare.
2348 (struct thread_info) <regcache_data>: Now a struct regcache
2350 * inferiors.c (inferior_regcache_data)
2351 (set_inferior_regcache_data): Now work with struct regcache
2353 * inferiors.h (struct regcache): Forward declare.
2354 (inferior_regcache_data, set_inferior_regcache_data): Now work
2355 with struct regcache pointers.
2356 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2357 (free_register_cache_thread): Remove struct regcache pointer
2360 2015-08-06 Pedro Alves <palves@redhat.com>
2362 * server.c (captured_main): On error, print the exception message
2363 to stderr, and if run_once is set, throw a quit.
2365 2015-08-06 Pedro Alves <palves@redhat.com>
2367 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2370 2015-08-06 Pedro Alves <palves@redhat.com>
2372 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2373 reading beyond the passed in buffer length.
2375 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2377 * tracepoint.c (symbol_list) <required>: Remove.
2379 2015-08-06 Pedro Alves <palves@redhat.com>
2381 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2382 count if stopping and suspending threads.
2383 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2384 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2385 (linux_detach): Complete an ongoing step-over.
2386 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2388 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2389 (linux_wait_1): If passing a signal to the inferior after
2390 finishing a step-over, unsuspend and re-resume all lwps. If we
2391 see a single-step event but the thread should be continuing, don't
2392 pass the trap to gdb.
2393 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2394 internal_error instead of gdb_assert.
2395 (enqueue_pending_signal): New function.
2396 (check_ptrace_stopped_lwp_gone): Add debug output.
2397 (start_step_over): Use internal_error instead of gdb_assert.
2398 (complete_ongoing_step_over): New function.
2399 (linux_resume_one_thread): Don't resume a suspended thread.
2400 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2403 2015-08-06 Pedro Alves <palves@redhat.com>
2405 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2406 (linux_thread_alive): Use lwp_is_marked_dead.
2407 (extended_event_reported): Delete.
2408 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2409 instead of extended_event_reported.
2410 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2412 (lwp_is_marked_dead): New function.
2413 (lwp_running): Use lwp_is_marked_dead.
2414 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2417 2015-08-06 Pedro Alves <palves@redhat.com>
2419 * linux-low.c (linux_wait_1): Move fork event output out of the
2420 !report_to_gdb check. Pass event_child->waitstatus to
2421 target_waitstatus_to_string instead of ourstatus.
2423 2015-08-04 Yao Qi <yao.qi@linaro.org>
2425 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2426 if current_thread is 32 bit.
2428 2015-08-04 Yao Qi <yao.qi@linaro.org>
2430 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2431 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2432 * server.c (extended_protocol): Remove "static".
2433 * server.h (extended_protocol): Declare it.
2435 2015-08-04 Yao Qi <yao.qi@linaro.org>
2437 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2438 both aarch64 and aarch32.
2439 (aarch64_set_pc): Likewise.
2441 2015-08-04 Yao Qi <yao.qi@linaro.org>
2443 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2444 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2445 arm-with-neon.xml to srv_xmlfiles.
2446 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2447 (is_64bit_tdesc): New function.
2448 (aarch64_linux_read_description): New function.
2449 (aarch64_arch_setup): Call aarch64_linux_read_description.
2450 (regs_info): Rename to regs_info_aarch64.
2451 (aarch64_regs_info): Return right regs_info.
2452 (initialize_low_arch): Call initialize_low_arch_aarch32.
2454 2015-08-04 Yao Qi <yao.qi@linaro.org>
2456 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2457 * linux-aarch32-low.c: New file.
2458 * linux-aarch32-low.h: New file.
2459 * linux-arm-low.c (arm_fill_gregset): Move it to
2460 linux-aarch32-low.c.
2461 (arm_store_gregset): Likewise.
2462 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2463 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2464 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2465 (regs_info): Rename to regs_info_arm.
2466 (arm_regs_info): Return regs_info_aarch32 if
2467 have_ptrace_getregset is 1 and target description is
2468 arm_with_neon or arm_with_vfpv3.
2469 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2470 Call initialize_low_arch_aarch32 instead.
2472 2015-08-04 Yao Qi <yao.qi@linaro.org>
2474 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2475 * linux-low.c: ... here.
2476 * linux-low.h (have_ptrace_getregset): Declare it.
2478 2015-08-04 Pedro Alves <palves@redhat.com>
2480 * thread-db.c (struct thread_db): Use new typedefs.
2481 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2483 (disable_thread_event_reporting): Cast result of dlsym to
2484 destination function pointer type.
2485 (thread_db_mourn): Use td_ta_delete_ftype.
2487 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2489 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2491 (CDX_BREAKPOINT): Define for R2.
2492 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2493 (the_low_target): Add comments.
2495 2015-07-30 Yao Qi <yao.qi@linaro.org>
2497 * linux-arm-low.c (arm_hwcap): Remove it.
2498 (arm_read_description): New local variable arm_hwcap. Don't
2499 set arm_hwcap to zero.
2501 2015-07-30 Yao Qi <yao.qi@linaro.org>
2503 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2504 Use regcache->tdesc instead.
2505 (arm_store_wmmxregset): Likewise.
2506 (arm_fill_vfpregset): Likewise.
2507 (arm_store_vfpregset): Likewise.
2509 2015-07-30 Yao Qi <yao.qi@linaro.org>
2511 * linux-arm-low.c: Include arch/arm.h.
2512 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2513 (arm_store_gregset): Likewise.
2515 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2517 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2518 ptrace's 4th parameter.
2520 2015-07-27 Yao Qi <yao.qi@linaro.org>
2522 * configure.srv (case aarch64*-*-linux*): Don't set
2525 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2527 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2529 * linux-arm-low.c: Likewise.
2530 * linux-cris-low.c: Likewise.
2531 * linux-crisv32-low.c: Likewise.
2532 * linux-low.c: Likewise.
2533 * linux-m68k-low.c: Likewise.
2534 * linux-mips-low.c: Likewise.
2535 * linux-nios2-low.c: Likewise.
2536 * linux-s390-low.c: Likewise.
2537 * linux-sparc-low.c: Likewise.
2538 * linux-tic6x-low.c: Likewise.
2539 * linux-tile-low.c: Likewise.
2540 * linux-x86-low.c: Likewise.
2542 2015-07-24 Pedro Alves <palves@redhat.com>
2544 * config.in: Regenerate.
2545 * configure: Regenerate.
2547 2015-07-24 Pedro Alves <palves@redhat.com>
2549 * acinclude.m4: Include ../ptrace.m4.
2550 * configure.ac: Call GDB_AC_PTRACE.
2551 * config.in, configure: Regenerate.
2553 2015-07-24 Yao Qi <yao.qi@linaro.org>
2555 * linux-low.c (linux_create_inferior): Remove setting to
2556 proc->priv->new_inferior.
2557 (linux_attach): Likewise.
2558 (linux_low_filter_event): Likewise.
2559 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2561 2015-07-24 Yao Qi <yao.qi@linaro.org>
2563 * linux-low.c (linux_arch_setup): New function.
2564 (linux_low_filter_event): If proc->tdesc is NULL and
2565 proc->attached is true, call the_low_target.arch_setup.
2566 Otherwise, keep status pending, and return.
2567 (linux_resume_one_lwp_throw): Don't call get_pc if
2568 thread->while_stepping isn't NULL. Don't call
2569 get_thread_regcache if proc->tdesc is NULL.
2570 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2571 (linux_target_ops): Install arch_setup.
2572 * server.c (start_inferior): Call the_target->arch_setup.
2573 * target.h (struct target_ops) <arch_setup>: New field.
2574 (target_arch_setup): New marco.
2575 * lynx-low.c (lynx_target_ops): Update.
2576 * nto-low.c (nto_target_ops): Update.
2577 * spu-low.c (spu_target_ops): Update.
2578 * win32-low.c (win32_target_ops): Update.
2580 2015-07-24 Yao Qi <yao.qi@linaro.org>
2582 * linux-low.c (linux_add_process): Don't set
2583 proc->priv->new_inferior.
2584 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2585 (linux_attach): Likewise.
2587 2015-07-24 Yao Qi <yao.qi@linaro.org>
2589 * server.c (start_inferior): Code refactor.
2591 2015-07-24 Yao Qi <yao.qi@linaro.org>
2593 * server.c (process_serial_event): Set general_thread.
2595 2015-07-21 Yao Qi <yao.qi@linaro.org>
2597 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2598 aarch64_linux_get_debug_reg_capacity.
2600 2015-07-17 Yao Qi <yao.qi@linaro.org>
2602 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2603 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2604 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2605 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2606 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2607 (AARCH64_HWP_ALIGNMENT): Likewise.
2608 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2609 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2610 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2611 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2612 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2613 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2614 (struct aarch64_debug_reg_state): Likewise.
2615 (struct arch_lwp_info): Likewise.
2616 (aarch64_align_watchpoint): Likewise.
2617 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2618 (aarch64_watchpoint_length): Likewise.
2619 (aarch64_point_encode_ctrl_reg): Likewise
2620 (aarch64_point_is_aligned): Likewise.
2621 (aarch64_align_watchpoint): Likewise.
2622 (aarch64_linux_set_debug_regs):
2623 (aarch64_dr_state_insert_one_point): Likewise.
2624 (aarch64_dr_state_remove_one_point): Likewise.
2625 (aarch64_handle_breakpoint): Likewise.
2626 (aarch64_handle_aligned_watchpoint): Likewise.
2627 (aarch64_handle_unaligned_watchpoint): Likewise.
2628 (aarch64_handle_watchpoint): Likewise.
2630 2015-07-17 Yao Qi <yao.qi@linaro.org>
2632 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2633 and don't aarch64_get_debug_reg_state. All callers update.
2634 (aarch64_handle_aligned_watchpoint): Likewise.
2635 (aarch64_handle_unaligned_watchpoint): Likewise.
2636 (aarch64_handle_watchpoint): Likewise.
2637 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2638 (aarch64_remove_point): Likewise.
2640 2015-07-17 Yao Qi <yao.qi@linaro.org>
2642 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2644 (aarch64_handle_unaligned_watchpoint): Likewise.
2646 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2648 Revert the previous 3 commits:
2649 Move gdb_regex* to common/
2650 Move linux_find_memory_regions_full & co.
2651 gdbserver build-id attribute generator
2653 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2654 Jan Kratochvil <jan.kratochvil@redhat.com>
2656 gdbserver build-id attribute generator.
2657 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2658 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2659 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2661 (get_dynamic): Use find_pdhr to traverse program headers.
2662 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2663 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2664 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2665 (get_hex_build_id): New.
2666 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2667 to reply XML document.
2669 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2670 Jan Kratochvil <jan.kratochvil@redhat.com>
2672 * target.c: Include target/target-utils.h and fcntl.h.
2673 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2674 (target_fileio_read_stralloc): New functions.
2676 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2678 * Makefile.in (OBS): Add gdb_regex.o.
2680 * config.in: Rebuilt.
2681 * configure: Rebuilt.
2683 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2684 Jan Kratochvil <jan.kratochvil@redhat.com>
2686 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2687 * Makefile.in (OBS): Add target-utils.o.
2688 (linux-maps.o, target-utils.o): New.
2689 * configure.srv (srv_linux_obj): Add linux-maps.o.
2691 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2693 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2695 (the_low_target): Install it.
2697 2015-07-14 Pedro Alves <palves@redhat.com>
2699 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2700 Instead, ignore ECHILD, and throw an error for other errnos.
2702 2015-07-10 Pedro Alves <palves@redhat.com>
2704 * event-loop.c (struct callback_event) <data>: Change type to
2705 gdb_client_data instance instead of gdb_client_data pointer.
2706 (append_callback_event): Adjust.
2708 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2710 * linux-aarch64-low.c: Add comments for each linux_target_ops
2711 method. Remove comments already covered in target_ops and
2712 linux_target_ops definitions.
2713 (the_low_target): Add comments for each unimplemented method.
2715 2015-07-09 Yao Qi <yao.qi@linaro.org>
2717 * linux-aarch64-low.c (aarch64_regmap): Remove.
2718 (aarch64_usrregs_info): Remove.
2719 (regs_info): Set field usrregs to NULL.
2721 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2723 * linux-low.c: Include "rsp-low.h"
2724 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2725 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2726 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2727 (handle_btrace_enable_pt): New.
2728 (handle_btrace_general_set): Support "pt".
2729 (handle_btrace_conf_general_set): Support "pt:size".
2731 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2733 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2736 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2738 * linux-aarch64-low.c: Remove comment about endianness.
2739 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2740 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2743 2015-06-24 Gary Benson <gbenson@redhat.com>
2745 * linux-i386-ipa.c (stdint.h): Do not include.
2746 * lynx-i386-low.c (stdint.h): Likewise.
2747 * lynx-ppc-low.c (stdint.h): Likewise.
2748 * mem-break.c (stdint.h): Likewise.
2749 * thread-db.c (stdint.h): Likewise.
2750 * tracepoint.c (stdint.h): Likewise.
2751 * win32-low.c (stdint.h): Likewise.
2753 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2755 * server.c (write_qxfer_response): Update call to
2756 remote_escape_output.
2758 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2759 Jan Kratochvil <jan.kratochvil@redhat.com>
2761 Merge multiple hex conversions.
2762 * gdbreplay.c (tohex): Rename to 'fromhex'.
2763 (logchar): Use fromhex.
2765 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2767 * server.c (handle_qxfer_libraries): Set `version' attribute for
2770 2015-06-10 Gary Benson <gbenson@redhat.com>
2772 * target.h (struct target_ops) <multifs_open>: New field.
2773 <multifs_unlink>: Likewise.
2774 <multifs_readlink>: Likewise.
2775 * linux-low.c (nat/linux-namespaces.h): New include.
2776 (linux_target_ops): Initialize the_target->multifs_open,
2777 the_target->multifs_unlink and the_target->multifs_readlink.
2778 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2779 * hostio.c (hostio_fs_pid): New static variable.
2780 (hostio_handle_new_gdb_connection): New function.
2781 (handle_setfs): Likewise.
2782 (handle_open): Use the_target->multifs_open as appropriate.
2783 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2784 (handle_readlink): Use the_target->multifs_readlink as
2786 (handle_vFile): Handle vFile:setfs packets.
2787 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2788 after target_handle_new_gdb_connection.
2790 2015-06-10 Gary Benson <gbenson@redhat.com>
2792 * configure.ac (AC_CHECK_FUNCS): Add setns.
2793 * config.in: Regenerate.
2794 * configure: Likewise.
2795 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2796 (linux-namespaces.o): New rule.
2797 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2799 2015-06-09 Gary Benson <gbenson@redhat.com>
2801 * hostio.c (handle_open): Process mode argument with
2802 fileio_to_host_mode.
2804 2015-06-01 Yao Qi <yao.qi@linaro.org>
2806 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2807 * linux-x86-low.c: Likewise.
2809 2015-05-28 Don Breazeal <donb@codesourcery.com>
2811 * linux-low.c (handle_extended_wait): Initialize
2812 thread_info.last_resume_kind for new fork children.
2814 2015-05-15 Pedro Alves <palves@redhat.com>
2816 * target.h (target_handle_new_gdb_connection): Rewrite using if
2817 wrapped in do/while.
2819 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2821 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2822 * configure, config.in: Regenerate.
2823 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2826 2015-05-12 Don Breazeal <donb@codesourcery.com>
2828 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2829 PTRACE_EVENT_VFORK_DONE.
2830 (linux_low_ptrace_options, extended_event_reported): Add vfork
2832 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2833 and "vforkdone" for RSP 'T' Stop Reply Packet.
2834 * server.h (report_vfork_events): Declare
2837 2015-05-12 Don Breazeal <donb@codesourcery.com>
2839 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2840 (the_low_target) <new_fork>: Initialize new member.
2841 * linux-arm-low.c (arm_new_fork): New function.
2842 (the_low_target) <new_fork>: Initialize new member.
2843 * linux-low.c (handle_extended_wait): Call new target function
2845 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2846 * linux-mips-low.c (mips_add_watchpoint): New function
2847 extracted from mips_insert_point.
2848 (the_low_target) <new_fork>: Initialize new member.
2849 (mips_linux_new_fork): New function.
2850 (mips_insert_point): Call mips_add_watchpoint.
2851 * linux-x86-low.c (x86_linux_new_fork): New function.
2852 (the_low_target) <new_fork>: Initialize new member.
2854 2015-05-12 Don Breazeal <donb@codesourcery.com>
2856 * linux-low.c (handle_extended_wait): Implement return value,
2857 rename argument 'event_child' to 'event_lwp', handle
2858 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2859 (linux_low_ptrace_options): New function.
2860 (linux_low_filter_event): Call linux_low_ptrace_options,
2861 use different argument fo linux_enable_event_reporting,
2862 use return value from handle_extended_wait.
2863 (extended_event_reported): New function.
2864 (linux_wait_1): Call extended_event_reported and set
2865 status to report fork events.
2866 (linux_write_memory): Add pid to debug message.
2867 (reset_lwp_ptrace_options_callback): New function.
2868 (linux_handle_new_gdb_connection): New function.
2869 (linux_target_ops): Initialize new structure member.
2870 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2871 * lynx-low.c: Initialize new structure member.
2872 * remote-utils.c (prepare_resume_reply): Implement stop reason
2873 "fork" for "T" stop message.
2874 * server.c (handle_query): Call handle_new_gdb_connection.
2875 * server.h (report_fork_events): Declare global flag.
2876 * target.h (struct target_ops) <handle_new_gdb_connection>:
2878 (target_handle_new_gdb_connection): New macro.
2879 * win32-low.c: Initialize new structure member.
2881 2015-05-12 Don Breazeal <donb@codesourcery.com>
2883 * mem-break.c (APPEND_TO_LIST): Define macro.
2884 (clone_agent_expr): New function.
2885 (clone_one_breakpoint): New function.
2886 (clone_all_breakpoints): New function.
2887 * mem-break.h: Declare new functions.
2889 2015-05-12 Don Breazeal <donb@codesourcery.com>
2891 * linux-low.c (linux_supports_fork_events): New function.
2892 (linux_supports_vfork_events): New function.
2893 (linux_target_ops): Initialize new structure members.
2894 (initialize_low): Call linux_check_ptrace_features.
2895 * lynx-low.c (lynx_target_ops): Initialize new structure
2897 * server.c (report_fork_events, report_vfork_events):
2899 (handle_query): Add new features to qSupported packet and
2901 (captured_main): Initialize new global variables.
2902 * target.h (struct target_ops) <supports_fork_events>:
2904 <supports_vfork_events>: New member.
2905 (target_supports_fork_events): New macro.
2906 (target_supports_vfork_events): New macro.
2907 * win32-low.c (win32_target_ops): Initialize new structure
2910 2015-05-12 Gary Benson <gbenson@redhat.com>
2912 * server.c (handle_qxfer_exec_file): Use current process
2915 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2917 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2918 Remove HAVE_PTRACE_GETREGS conditionals.
2919 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2920 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2922 2015-05-08 Yao Qi <yao.qi@linaro.org>
2924 * linux-low.c (linux_supports_conditional_breakpoints): New
2926 (linux_target_ops): Install new target method.
2927 * lynx-low.c (lynx_target_ops): Install NULL hook for
2928 supports_conditional_breakpoints.
2929 * nto-low.c (nto_target_ops): Likewise.
2930 * spu-low.c (spu_target_ops): Likewise.
2931 * win32-low.c (win32_target_ops): Likewise.
2932 * server.c (handle_query): Check
2933 target_supports_conditional_breakpoints.
2934 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2936 (target_supports_conditional_breakpoints): New macro.
2938 2015-05-06 Pedro Alves <palves@redhat.com>
2941 * server.c (start_inferior): If the process exits, mourn it.
2943 2015-04-21 Gary Benson <gbenson@redhat.com>
2945 * hostio.c (fileio_open_flags_to_host): Factored out to
2946 fileio_to_host_openflags in common/fileio.c. Single use
2949 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2951 * linux-xtensa-low.c (xtensa_fill_gregset)
2952 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2955 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2957 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2958 (regs_info): Replace usrregs pointer with NULL.
2960 2015-04-17 Gary Benson <gbenson@redhat.com>
2962 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2963 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2964 * server.c (handle_qxfer_exec_file): New function.
2965 (qxfer_packets): Add exec-file entry.
2966 (handle_query): Report qXfer:exec-file:read as supported packet.
2968 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2970 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2972 2015-04-09 Gary Benson <gbenson@redhat.com>
2974 * hostio-errno.c (errno_to_fileio_error): Remove function.
2975 Update caller to use remote_fileio_to_fio_error.
2977 2015-04-09 Yao Qi <yao.qi@linaro.org>
2979 * linux-low.c (linux_insert_point): Call
2980 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2981 (linux_remove_point): Call remove_memory_breakpoint if type is
2983 * linux-x86-low.c (x86_insert_point): Don't call
2984 insert_memory_breakpoint.
2985 (x86_remove_point): Don't call remove_memory_breakpoint.
2987 2015-04-01 Pedro Alves <palves@redhat.com>
2988 Cleber Rosa <crosa@redhat.com>
2990 * server.c (gdbserver_usage): Reorganize and extend the usage
2993 2015-03-24 Pedro Alves <palves@redhat.com>
2995 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2996 output. Also dump TRAP_TRACE.
2997 (linux_low_filter_event): In debug output, distinguish a
2998 resume_stop SIGSTOP from a delayed SIGSTOP.
3000 2015-03-24 Gary Benson <gbenson@redhat.com>
3002 * linux-x86-low.c (x86_linux_new_thread): Moved to
3004 (x86_linux_prepare_to_resume): Likewise.
3006 2015-03-24 Gary Benson <gbenson@redhat.com>
3008 * Makefile.in (x86-linux-dregs.o): New rule.
3009 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3010 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3011 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3012 (x86_linux_dr_get): Likewise.
3013 (x86_linux_dr_set): Likewise.
3014 (update_debug_registers_callback): Likewise.
3015 (x86_linux_dr_set_addr): Likewise.
3016 (x86_linux_dr_get_addr): Likewise.
3017 (x86_linux_dr_set_control): Likewise.
3018 (x86_linux_dr_get_control): Likewise.
3019 (x86_linux_dr_get_status): Likewise.
3020 (x86_linux_update_debug_registers): Likewise.
3022 2015-03-24 Gary Benson <gbenson@redhat.com>
3024 * linux-x86-low.c (x86_linux_update_debug_registers):
3025 New function, factored out from...
3026 (x86_linux_prepare_to_resume): ...this.
3028 2015-03-24 Gary Benson <gbenson@redhat.com>
3030 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3031 (x86_linux_dr_set): Likewise.
3032 (update_debug_registers_callback): Likewise.
3033 (x86_linux_dr_set_addr): Likewise.
3034 (x86_linux_dr_get_addr): Likewise.
3035 (x86_linux_dr_set_control): Likewise.
3036 (x86_linux_dr_get_control): Likewise.
3037 (x86_linux_dr_get_status): Likewise.
3038 (x86_linux_prepare_to_resume): Likewise.
3040 2015-03-24 Gary Benson <gbenson@redhat.com>
3042 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3043 Use perror_with_name. Pass string through gettext.
3044 (x86_linux_dr_set): Likewise.
3046 2015-03-24 Gary Benson <gbenson@redhat.com>
3048 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3049 (x86_linux_dr_set_addr): ...this.
3050 (x86_dr_low_get_addr): Rename to...
3051 (x86_linux_dr_get_addr): ...this.
3052 (x86_dr_low_set_control): Rename to...
3053 (x86_linux_dr_set_control): ...this.
3054 (x86_dr_low_get_control): Rename to...
3055 (x86_linux_dr_get_control): ...this.
3056 (x86_dr_low_get_status): Rename to...
3057 (x86_linux_dr_get_status): ...this.
3058 (x86_dr_low): Update with new function names.
3060 2015-03-24 Gary Benson <gbenson@redhat.com>
3062 * Makefile.in (x86-linux.o): New rule.
3063 * configure.srv: Add x86-linux.o to relevant targets.
3064 * linux-low.c (lwp_set_arch_private_info): New function.
3065 (lwp_arch_private_info): Likewise.
3066 * linux-x86-low.c: Include nat/x86-linux.h.
3067 (arch_lwp_info): Removed structure.
3068 (update_debug_registers_callback):
3069 Use lwp_set_debug_registers_changed.
3070 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3071 and lwp_set_debug_registers_changed.
3072 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3074 2015-03-24 Gary Benson <gbenson@redhat.com>
3076 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3077 * linux-arm-low.c (arm_new_thread): Likewise.
3078 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3079 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3080 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3081 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3083 2015-03-24 Gary Benson <gbenson@redhat.com>
3085 * linux-low.c (ptid_of_lwp): New function.
3086 (lwp_is_stopped): Likewise.
3087 (lwp_stop_reason): Likewise.
3088 * linux-x86-low.c (update_debug_registers_callback):
3090 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3093 2015-03-24 Gary Benson <gbenson@redhat.com>
3095 * linux-low.h (linux_stop_lwp): Remove declaration.
3097 2015-03-24 Gary Benson <gbenson@redhat.com>
3099 * linux-low.h: Include nat/linux-nat.h.
3100 * linux-low.c (iterate_over_lwps_args): New structure.
3101 (iterate_over_lwps_filter): New function.
3102 (iterate_over_lwps): Likewise.
3103 * linux-x86-low.c (update_debug_registers_callback):
3104 Update signature to what iterate_over_lwps expects.
3105 Remove PID check that iterate_over_lwps now performs.
3106 (x86_dr_low_set_addr): Use iterate_over_lwps.
3107 (x86_dr_low_set_control): Likewise.
3109 2015-03-24 Gary Benson <gbenson@redhat.com>
3111 * linux-x86-low.c (x86_debug_reg_state): New function.
3112 (x86_linux_prepare_to_resume): Use the above.
3114 2015-03-24 Gary Benson <gbenson@redhat.com>
3116 * linux-low.c (current_lwp_ptid): New function.
3117 * linux-x86-low.c: Include nat/linux-nat.h.
3118 (x86_dr_low_get_addr): Use current_lwp_ptid.
3119 (x86_dr_low_get_control): Likewise.
3120 (x86_dr_low_get_status): Likewise.
3122 2015-03-20 Pedro Alves <palves@redhat.com>
3124 * tracepoint.c (cmd_qtstatus): Make "str" const.
3126 2015-03-20 Pedro Alves <palves@redhat.com>
3128 * server.c (handle_general_set): Make "req_str" const.
3130 2015-03-19 Pedro Alves <palves@redhat.com>
3132 * linux-low.c (linux_resume_one_lwp): Rename to ...
3133 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3134 instead call perror_with_name.
3135 (check_ptrace_stopped_lwp_gone): New function.
3136 (linux_resume_one_lwp): Reimplement as wrapper around
3137 linux_resume_one_lwp_throw that swallows errors if the LWP is
3140 2015-03-19 Pedro Alves <palves@redhat.com>
3142 * linux-low.c (count_events_callback, select_event_lwp_callback):
3143 No longer check whether the thread has resume_stop as last resume
3146 2015-03-19 Pedro Alves <palves@redhat.com>
3148 * linux-low.c (count_events_callback, select_event_lwp_callback):
3149 Use the lwp's status_pending_p field, not the thread's.
3151 2015-03-19 Pedro Alves <palves@redhat.com>
3153 * linux-low.c (select_event_lwp_callback): Update comments to
3154 no longer mention SIGTRAP.
3156 2015-03-18 Gary Benson <gbenson@redhat.com>
3158 * server.c (handle_query): Do not report vFile:fstat as supported.
3160 2015-03-11 Gary Benson <gbenson@redhat.com>
3162 * hostio.c (sys/types.h): New include.
3163 (sys/stat.h): Likewise.
3164 (common-remote-fileio.h): Likewise.
3165 (handle_fstat): New function.
3166 (handle_vFile): Handle vFile:fstat packets.
3168 2015-03-11 Gary Benson <gbenson@redhat.com>
3170 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3171 struct stat.st_blocks and struct stat.st_blksize.
3172 * configure: Regenerate.
3173 * config.in: Likewise.
3174 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3175 (OBS): Add common-remote-fileio.o.
3176 (common-remote-fileio.o): New rule.
3178 2015-03-09 Pedro Alves <palves@redhat.com>
3180 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3181 'struct sockaddr' pointer in 'accept' call.
3183 2015-03-09 Pedro Alves <palves@redhat.com>
3186 2015-03-07 Pedro Alves <palves@redhat.com>
3187 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3188 or <winsock2.h> here. Instead include "gdb_socket.h".
3189 (remote_open): Use union gdb_sockaddr_u.
3190 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3191 or <winsock2.h> here. Instead include "gdb_socket.h".
3192 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3193 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3195 (init_named_socket, gdb_agent_helper_thread): Use union
3198 2015-03-07 Pedro Alves <palves@redhat.com>
3200 * configure.ac (build_warnings): Move
3201 -Wdeclaration-after-statement to the C-specific set.
3202 * configure: Regenerate.
3204 2015-03-07 Pedro Alves <palves@redhat.com>
3206 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3207 or <winsock2.h> here. Instead include "gdb_socket.h".
3208 (remote_open): Use union gdb_sockaddr_u.
3209 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3210 or <winsock2.h> here. Instead include "gdb_socket.h".
3211 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3212 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3214 (init_named_socket, gdb_agent_helper_thread): Use union
3217 2015-03-07 Pedro Alves <palves@redhat.com>
3219 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3222 2015-03-06 Yao Qi <yao.qi@linaro.org>
3224 * linux-aarch64-low.c (aarch64_insert_point): Use
3225 show_debug_regs as a boolean.
3226 (aarch64_remove_point): Likewise.
3228 2015-03-05 Pedro Alves <palves@redhat.com>
3230 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3231 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3232 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3233 * nto-low.c (nto_target_ops): Likewise.
3234 * spu-low.c (spu_target_ops): Likewise.
3235 * win32-low.c (win32_target_ops): Likewise.
3237 2015-03-04 Pedro Alves <palves@redhat.com>
3239 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3240 Decide whether a breakpoint triggered based on the SIGTRAP's
3242 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3243 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3244 (linux_low_filter_event): Check for breakpoints before checking
3246 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3248 (linux_stopped_by_sw_breakpoint)
3249 (linux_supports_stopped_by_sw_breakpoint)
3250 (linux_stopped_by_hw_breakpoint)
3251 (linux_supports_stopped_by_hw_breakpoint): New functions.
3252 (linux_target_ops): Install new target methods.
3254 2015-03-04 Pedro Alves <palves@redhat.com>
3256 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3257 * server.c (swbreak_feature, hwbreak_feature): New globals.
3258 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3259 (captured_main): Clear swbreak_feature and hwbreak_feature.
3260 * server.h (swbreak_feature, hwbreak_feature): Declare.
3261 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3262 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3263 supports_stopped_by_hw_breakpoint>: New fields.
3264 (target_supports_stopped_by_sw_breakpoint)
3265 (target_stopped_by_sw_breakpoint)
3266 (target_supports_stopped_by_hw_breakpoint)
3267 (target_stopped_by_hw_breakpoint): Declare.
3269 2015-03-04 Pedro Alves <palves@redhat.com>
3271 enum lwp_stop_reason -> enum target_stop_reason
3272 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3273 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3274 (linux_wait_1, stuck_in_jump_pad_callback)
3275 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3276 (linux_stopped_by_watchpoint):
3277 * linux-low.h (enum lwp_stop_reason): Delete.
3278 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3279 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3281 2015-03-04 Yao Qi <yao.qi@linaro.org>
3283 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3285 2015-03-03 Gary Benson <gbenson@redhat.com>
3287 * hostio.c (handle_vFile): Fix prefix lengths.
3289 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3291 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3294 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3296 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3297 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3298 (clean): Add "rm -f" for above C files.
3299 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3300 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3301 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3302 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3303 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3304 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3305 (init_registers_s390x_vx_linux64)
3306 (init_registers_s390x_tevx_linux64)
3307 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3308 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3310 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3311 (s390_store_vxrs_high): New functions.
3312 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3314 (s390_arch_setup): Add logic for selecting one of the new target
3315 descriptions. Activate the new vector regsets if applicable.
3316 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3317 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3318 and init_registers_s390x_tevx_linux64.
3320 2015-03-01 Pedro Alves <palves@redhat.com>
3322 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3325 2015-02-27 Pedro Alves <palves@redhat.com>
3327 * linux-x86-low.c (u_debugreg_offset): New function.
3328 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3330 2015-02-27 Pedro Alves <palves@redhat.com>
3332 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3333 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3334 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3335 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3336 (ps_lsetfpregs, ps_getpid)
3337 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3338 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3339 (ps_lsetxregs, ps_plog): Declare.
3341 2015-02-27 Pedro Alves <palves@redhat.com>
3343 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3344 IP_AGENT_EXPORT_FUNC.
3345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3346 IP_AGENT_EXPORT_FUNC.
3347 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3348 (IP_AGENT_EXPORT): Delete.
3349 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3350 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3351 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3352 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3353 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3354 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3355 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3356 (traceframe_read_count, traceframe_write_count)
3357 (traceframes_created, trace_state_variables, get_raw_reg)
3358 (get_trace_state_variable_value, set_trace_state_variable_value)
3359 (ust_loaded, helper_thread_id, cmd_buf): Use
3360 IPA_SYM_EXPORTED_NAME.
3361 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3362 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3363 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3364 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3365 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3366 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3367 EXTERN_C_PUSH/EXTERN_C_POP.
3368 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3369 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3370 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3371 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3372 (traceframe_write_count, traceframe_read_count)
3373 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3374 (about_to_request_buffer_space, get_trace_state_variable_value)
3375 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3376 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3377 EXTERN_C_PUSH/EXTERN_C_POP.
3378 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3379 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3380 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3381 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3382 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3383 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3384 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3385 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3387 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3388 (IP_AGENT_EXPORT_VAR_DECL): Define.
3390 (gdb_agent_get_raw_reg): Declare.
3392 2015-02-27 Tom Tromey <tromey@redhat.com>
3393 Pedro Alves <palves@redhat.com>
3395 Rename symbols whose names are reserved C++ keywords throughout.
3397 2015-02-27 Pedro Alves <palves@redhat.com>
3399 * Makefile.in (COMPILER): New, get it from autoconf.
3400 (CXX): Get from autoconf instead.
3401 (COMPILE.pre): Use COMPILER.
3402 (CC-LD): Rename to ...
3403 (CC_LD): ... this. Use COMPILER.
3404 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3405 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3406 * acinclude.m4: Include build-with-cxx.m4.
3407 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3408 Disable -Werror by default if building in C++ mode.
3409 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3410 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3411 the C++ compiler. Save/restore CXXFLAGS too.
3412 * configure: Regenerate.
3414 2015-02-27 Pedro Alves <palves@redhat.com>
3416 * acinclude.m4: Include libiberty.m4.
3417 * configure.ac: Call libiberty_INIT.
3418 * config.in, configure: Regenerate.
3420 2015-02-26 Pedro Alves <palves@redhat.com>
3422 * linux-low.c (linux_wait_1): When incrementing the PC past a
3423 program breakpoint always use the_low_target.breakpoint_len as
3424 increment, rather than the maximum between that and
3425 the_low_target.decr_pc_after_break.
3427 2015-02-23 Pedro Alves <palves@redhat.com>
3429 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3430 thread was doing a step-over; always adjust the PC if
3431 we stepped over a permanent breakpoint.
3432 (linux_wait_1): If we stepped over breakpoint that was on top of a
3433 permanent breakpoint, manually advance the PC past it.
3435 2015-02-23 Pedro Alves <palves@redhat.com>
3437 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3439 (x86_fill_gregset, x86_store_gregset): Use it when handling
3442 2015-02-20 Pedro Alves <palves@redhat.com>
3444 * thread-db.c: Include "nat/linux-procfs.h".
3445 (thread_db_init): Skip listing new threads if the kernel supports
3446 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3448 2015-02-20 Pedro Alves <palves@redhat.com>
3450 * linux-low.c (status_pending_p_callback): Use ptid_match.
3452 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3454 PR breakpoints/16812
3455 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3456 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3457 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3459 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3461 PR breakpoints/15956
3462 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3464 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3466 * linux-low.c (linux_low_btrace_conf): Print size.
3467 * server.c (handle_btrace_conf_general_set): New.
3468 (hanle_general_set): Call handle_btrace_conf_general_set.
3469 (handle_query): Report Qbtrace-conf:bts:size as supported.
3471 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3473 * linux-low.c (linux_low_enable_btrace): Update parameters.
3474 (linux_low_btrace_conf): New.
3475 (linux_target_ops)<to_btrace_conf>: Initialize.
3476 * server.c (current_btrace_conf): New.
3477 (handle_btrace_enable): Rename to ...
3478 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3479 to target_enable_btrace. Update comment. Update users.
3480 (handle_qxfer_btrace_conf): New.
3481 (qxfer_packets): Add btrace-conf entry.
3482 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3483 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3484 (target_ops)<read_btrace_conf>: New.
3485 (target_enable_btrace): Update parameters.
3486 (target_read_btrace_conf): New.
3488 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3490 * server.c (handle_btrace_general_set): Remove call to
3491 target_supports_btrace.
3492 (supported_btrace_packets): New.
3493 (handle_query): Call supported_btrace_packets.
3494 * target.h: include btrace-common.h.
3495 (btrace_target_info): Removed.
3496 (supports_btrace, target_supports_btrace): Update parameters.
3498 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3500 * Makefile.in (SFILES): Add common/btrace-common.c.
3501 (OBS): Add common/btrace-common.o.
3502 (btrace-common.o): Add build rules.
3503 * linux-low: Include btrace-common.h.
3504 (linux_low_read_btrace): Use struct btrace_data. Call
3505 btrace_data_init and btrace_data_fini.
3507 2015-02-06 Pedro Alves <palves@redhat.com>
3509 * thread-db.c (find_new_threads_callback): Add debug output.
3511 2015-02-04 Pedro Alves <palves@redhat.com>
3513 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3514 (resume_stopped_resumed_lwps): New function.
3515 (linux_wait_for_event_filtered): Use it.
3517 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3519 * Makefile.in (SFILES): Add linux-personality.c.
3520 (linux-personality.o): New rule.
3521 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3522 list of objects to be built.
3523 * linux-low.c: Include nat/linux-personality.h.
3524 (linux_create_inferior): Remove code to disable address space
3525 randomization (moved to ../nat/linux-personality.c). Create
3526 cleanup to disable address space randomization.
3528 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3530 * Makefile.in (posix-strerror.o): New rule.
3531 (mingw-strerror.o): Likewise.
3532 * configure: Regenerated.
3533 * configure.ac: Source file ../common/common.host. Initialize new
3534 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3536 2015-01-14 Yao Qi <yao@codesourcery.com>
3538 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3539 (ppc-linux.o): New rule.
3540 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3541 * configure.ac: AC_CHECK_FUNCS(getauxval).
3542 * config.in: Re-generated.
3543 * configure: Re-generated.
3544 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3545 ppc64_64bit_inferior_p
3547 2015-01-14 Yao Qi <yao@codesourcery.com>
3549 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3550 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3551 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3552 (PT_ORIG_R3, PT_TRAP): Likewise.
3553 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3554 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3555 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3557 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3559 * i387-fp.c (i387_cache_to_xsave): In look over
3560 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3561 zmmh_low_space field by use of zmmh_high_space.
3563 2015-01-09 Pedro Alves <palves@redhat.com>
3565 * linux-low.c (step_over_bkpt): Move higher up in the file.
3566 (handle_extended_wait): Don't store the stop_pc here.
3567 (get_stop_pc): Adjust comments and rename to ...
3568 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3569 stopped for a software breakpoint or hardware breakpoint.
3570 (thread_still_has_status_pending_p): New function.
3571 (status_pending_p_callback): Use
3572 thread_still_has_status_pending_p. If the event is no longer
3573 interesting, resume the LWP.
3574 (handle_tracepoints): Add assert.
3575 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3576 (wstatus_maybe_breakpoint): New function.
3577 (cancel_breakpoint): Delete function.
3578 (check_stopped_by_watchpoint): New function, factored out from
3579 linux_low_filter_event.
3580 (lp_status_maybe_breakpoint): Delete function.
3581 (linux_low_filter_event): Remove filter_ptid argument.
3582 Leave thread group exits pending here. Store the LWP's stop PC.
3583 Always leave events pending.
3584 (linux_wait_for_event_filtered): Pull all events out of the
3585 kernel, and leave them all pending.
3586 (count_events_callback, select_event_lwp_callback): Consider all
3588 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3589 (select_event_lwp): Only give preference to the stepping LWP in
3590 all-stop mode. Adjust comments.
3591 (ignore_event): New function.
3592 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3593 references to cancel_breakpoints. Adjust to renames. Also give
3594 equal priority to all LWPs that have had events in non-stop mode.
3595 If reporting a software breakpoint event, unadjust the LWP's PC.
3596 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3597 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3599 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3600 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3601 (linux_stopped_by_watchpoint): Adjust.
3602 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3603 * linux-low.h (enum lwp_stop_reason): New.
3604 (struct lwp_info) <stop_pc>: Adjust comment.
3605 <stopped_by_watchpoint>: Delete field.
3606 <stop_reason>: New field.
3607 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3608 * mem-break.c (software_breakpoint_inserted_here)
3609 (hardware_breakpoint_inserted_here): New function.
3610 * mem-break.h (software_breakpoint_inserted_here)
3611 (hardware_breakpoint_inserted_here): Declare.
3612 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3613 (cancel_breakpoints): Delete.
3614 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3615 (upload_fast_traceframes): Remove references to
3618 2015-01-09 Pedro Alves <palves@redhat.com>
3620 * thread-db.c (find_new_threads_callback): Ignore thread if the
3621 kernel thread ID is -1.
3623 2015-01-09 Pedro Alves <palves@redhat.com>
3625 * linux-low.c (linux_attach_fail_reason_string): Move to
3626 nat/linux-ptrace.c, and rename.
3627 (linux_attach_lwp): Update comment.
3628 (attach_proc_task_lwp_callback): New function.
3629 (linux_attach): Adjust to rename and use
3630 linux_proc_attach_tgid_threads.
3631 (linux_attach_fail_reason_string): Delete declaration.
3633 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3635 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3636 * server.c (gdbserver_version): Likewise.
3638 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3640 * remote-utils.c: Include ctype.h.
3641 (input_interrupt): Explicitly handle the case when the char
3642 received is the NUL byte. Improve the printing of non-ASCII
3645 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3647 * linux-low.c (linux_low_filter_event): Update call to
3648 linux_enable_event_reporting following the addition of
3649 a new parameter to that function.
3651 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3654 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3655 (AARCH64_FPCR_REGNO): Likewise.
3656 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3657 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3658 (aarch64_store_fpregset): Likewise.
3660 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3662 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3663 Remove FIXME comment about assumption about N.
3665 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3667 * configure.ac: If large-file support is disabled in GDBserver,
3668 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3669 * configure: Regenerate.
3671 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3673 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3674 warning upon ENODATA from ptrace.
3675 * linux-s390-low.c (s390_store_tdb): New.
3676 (s390_regsets): Add regset for NT_S390_TDB.
3678 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3680 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3681 without a fill_function.
3682 * linux-s390-low.c (s390_fill_last_break): Remove.
3683 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3684 (s390_arch_setup): Use regset's size instead of fill_function for
3687 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3689 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3690 the regset's store function when ptrace returned an error.
3691 * regcache.c (get_thread_regcache): Invalidate register cache
3692 before fetching inferior's registers.
3694 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3696 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3697 while-loop as for-loop.
3698 (regsets_store_inferior_registers): Likewise.
3700 2014-11-28 Yao Qi <yao@codesourcery.com>
3702 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3703 * config.in, configure: Re-generate.
3704 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3707 2014-11-21 Yao Qi <yao@codesourcery.com>
3709 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3710 (AC_CHECK_HEADERS): Remove malloc.h.
3711 * configure: Re-generated.
3712 * config.in: Re-generated.
3713 * server.h: Don't include alloca.h and malloc.h.
3714 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3715 Don't include malloc.h.
3717 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3719 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3720 corresponding ERRNO check in same block.
3722 2014-11-12 Pedro Alves <palves@redhat.com>
3724 * server.c (cont_thread): Update comment.
3725 (start_inferior, attach_inferior): No longer clear cont_thread.
3726 (handle_v_cont): No longer set cont_thread.
3727 (captured_main): Clear cont_thread each time a GDB connects.
3729 2014-11-12 Pedro Alves <palves@redhat.com>
3731 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3732 thread, and don't resume all threads if the Hc thread has exited.
3734 2014-11-12 Pedro Alves <palves@redhat.com>
3736 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3737 the process group instead of to a specific LWP.
3739 2014-10-15 Pedro Alves <palves@redhat.com>
3742 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3744 (arm_set_thread_context): Delete.
3745 (the_low_target): Adjust.
3746 * win32-i386-low.c (debug_registers_changed)
3747 (debug_registers_used): Delete.
3748 (update_debug_registers_callback): New function.
3749 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3750 needing to update their debug registers.
3751 (win32_get_current_dr): New function.
3752 (x86_dr_low_get_addr, x86_dr_low_get_control)
3753 (x86_dr_low_get_status): Fetch the debug register from the thread
3755 (i386_initial_stuff): Adjust.
3756 (i386_get_thread_context): Remove current_event parameter. Don't
3757 clear debug_registers_changed nor copy DR values to
3759 (i386_set_thread_context): Delete.
3760 (i386_prepare_to_resume): New function.
3761 (i386_thread_added): Mark the thread as needing to update irs
3763 (the_low_target): Remove i386_set_thread_context and install
3764 i386_prepare_to_resume.
3765 * win32-low.c (win32_get_thread_context): Adjust.
3766 (win32_set_thread_context): Use SetThreadContext
3768 (win32_prepare_to_resume): New function.
3769 (win32_require_context): New function, factored out from ...
3770 (thread_rec): ... this.
3771 (continue_one_thread): Call win32_prepare_to_resume on each thread
3772 we're about to continue.
3773 (win32_resume): Call win32_prepare_to_resume on the event thread.
3774 * win32-low.h (struct win32_thread_info)
3775 <debug_registers_changed>: New field.
3776 (struct win32_target_ops): Change prototype of set_thread_context,
3777 delete set_thread_context and add prepare_to_resume.
3778 (win32_require_context): New declaration.
3780 2014-10-08 Gary Benson <gbenson@redhat.com>
3782 * server.h: Do not include common-exceptions.h.
3784 2014-10-08 Gary Benson <gbenson@redhat.com>
3786 * server.h: Do not include cleanups.h.
3788 2014-09-30 James Hogan <james.hogan@imgtec.com>
3790 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3793 2014-09-23 Yao Qi <yao@codesourcery.com>
3795 * linux-low.c (lp_status_maybe_breakpoint): New function.
3796 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3797 (count_events_callback): Likewise.
3798 (select_event_lwp_callback): Likewise.
3799 (cancel_breakpoints_callback): Likewise.
3801 2014-09-19 Don Breazeal <donb@codesourcery.com>
3803 * linux-low.c (handle_extended_wait): Call
3804 linux_ptrace_get_extended_event.
3805 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3806 linux_is_extended_waitstatus.
3808 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3810 * Makefile.in (CPPFLAGS): Define.
3811 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3812 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3814 2014-09-16 Gary Benson <gbenson@redhat.com>
3816 * inferiors.h (current_inferior): Renamed as...
3817 (current_thread): New variable. All uses updated.
3818 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3819 (maybe_move_out_of_jump_pad): Likewise.
3820 (cancel_breakpoint): Likewise.
3821 (linux_low_filter_event): Likewise.
3822 (wait_for_sigstop): Likewise.
3823 (linux_resume_one_lwp): Likewise.
3824 (need_step_over_p): Likewise.
3825 (start_step_over): Likewise.
3826 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3827 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3828 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3829 and save_inferior as saved_thread.
3830 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3832 (regcache_invalidate_thread): Likewise.
3833 * remote-utils.c (prepare_resume_reply): Likewise.
3834 * thread-db.c (thread_db_get_tls_address): Likewise.
3835 (disable_thread_event_reporting): Likewise.
3836 (remove_thread_event_breakpoints): Likewise.
3837 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3839 * target.h (set_desired_inferior): Renamed as...
3840 (set_desired_thread): New declaration. All uses updated.
3841 * server.c (myresume): Updated comment to reference thread instead
3843 (handle_serial_event): Likewise.
3844 (handle_target_event): Likewise.
3846 2014-09-12 Tom Tromey <tromey@redhat.com>
3847 Gary Benson <gbenson@redhat.com>
3849 * regcache.h: Include common-regcache.h.
3850 (regcache_read_pc): Don't declare.
3851 * regcache.c (get_thread_regcache_for_ptid): New function.
3853 2014-09-11 Tom Tromey <tromey@redhat.com>
3854 Gary Benson <gbenson@redhat.com>
3856 * symbol.c: New file.
3857 * Makefile.in (SFILES): Add symbol.c.
3858 (OBS): Add symbol.o.
3860 2014-09-11 Gary Benson <gbenson@redhat.com>
3862 * target.c (target_stop_ptid, target_continue_ptid): New
3865 2014-09-11 Tom Tromey <tromey@redhat.com>
3866 Gary Benson <gbenson@redhat.com>
3868 * target.h: Include target/target.h.
3869 * target.c (target_read_memory, target_read_uint32)
3870 (target_write_memory): New functions.
3872 2014-09-11 Gary Benson <gbenson@redhat.com>
3874 * server.h (debug_hw_points): Don't declare.
3875 * server.c (debug_hw_points): Don't define. Replace all uses
3876 with show_debug_regs.
3877 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3878 all uses with show_debug_regs.
3880 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3882 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3883 endianness into account.
3884 (ppc_supply_ptrace_register): Likewise.
3886 2014-09-03 James Hogan <james.hogan@imgtec.com>
3888 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3889 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3891 2014-09-03 Gary Benson <gbenson@redhat.com>
3893 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3894 ALL_DEBUG_ADDRESS_REGISTERS.
3896 2014-09-02 Gary Benson <gbenson@redhat.com>
3898 * i386-low.h: Renamed as...
3899 * x86-low.h: New file. All type, function and variable name
3900 prefixes changed from "i386_" to "x86_". All references updated.
3901 * i386-low.c: Renamed as...
3902 * x86-low.c: New file. All type, function and variable name
3903 prefixes changed from "i386_" to "x86_". All references updated.
3905 2014-09-02 Gary Benson <gbenson@redhat.com>
3907 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3908 (x86_linux_new_thread): Likewise.
3910 2014-08-29 Gary Benson <gbenson@redhat.com>
3912 * server.h (setjmp.h): Do not include.
3913 (toplevel): Do not declare.
3914 (common-exceptions.h): Include.
3915 (cleanups.h): Likewise.
3916 * server.c (toplevel): Do not define.
3917 (exit_code): New static global.
3918 (detach_or_kill_for_exit_cleanup): New function.
3919 (main): New function. Original main renamed to...
3920 (captured_main): New function.
3921 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3923 2014-08-29 Gary Benson <gbenson@redhat.com>
3925 * Makefile.in (SFILES): Add common/common-exceptions.c.
3926 (OBS): Add common-exceptions.o.
3927 (common-exceptions.o): New rule.
3928 * utils.c (prepare_to_throw_exception): New function.
3930 2014-08-29 Gary Benson <gbenson@redhat.com>
3932 * config.in: Regenerate.
3933 * configure: Likewise.
3935 2014-08-29 Gary Benson <gbenson@redhat.com>
3937 * Makefile.in (SFILES): Add common/cleanups.c.
3939 (cleanups.o): New rule.
3941 2014-08-29 Gary Benson <gbenson@redhat.com>
3943 * utils.c (internal_vwarning): New function.
3945 2014-08-28 Gary Benson <gbenson@redhat.com>
3947 * utils.h (fatal): Remove declaration.
3948 * utils.c (fatal): Remove function.
3950 2014-08-28 Gary Benson <gbenson@redhat.com>
3952 * tracepoint.c (gdb_agent_init): Replace fatal with
3954 (initialize_tracepoint): Likewise.
3956 2014-08-28 Gary Benson <gbenson@redhat.com>
3958 * remote-utils.c (remote_prepare): Replace fatal with error.
3960 2014-08-28 Gary Benson <gbenson@redhat.com>
3962 * linux-low.c (linux_async): Replace fatal with warning.
3964 (linux_start_non_stop): Return -1 if linux_async failed.
3966 2014-08-28 Gary Benson <gbenson@redhat.com>
3968 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3970 (i386_dr_low_get_addr): Remove vague comment.
3971 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3974 2014-08-28 Gary Benson <gbenson@redhat.com>
3976 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3977 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3979 (linux_resume_one_lwp): Likewise.
3980 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3982 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3983 with internal_error.
3984 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3985 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3986 (find_register_by_name): Replace fatal with internal_error.
3987 (find_regno): Likewise.
3988 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3989 * thread-db.c (thread_db_create_event): Likewise.
3990 (thread_db_load_search): Likewise.
3991 (try_thread_db_load_1): Likewise.
3992 * tracepoint.c (get_jump_space_head): Replace fatal with
3994 (claim_trampoline_space): Likewise.
3995 (have_fast_tracepoint_trampoline_buffer): Likewise.
3996 (cmd_qtstart): Likewise.
3997 (stop_tracing): Likewise.
3998 (fast_tracepoint_collecting): Likewise.
3999 (target_malloc): Likewise.
4000 (download_tracepoint): Likewise.
4001 (download_trace_state_variables): Replace check with gdb_assert.
4002 (upload_fast_traceframes): Replace fatal with internal_error.
4004 2014-08-19 Tom Tromey <tromey@redhat.com>
4005 Gary Benson <gbenson@redhat.com>
4007 * Makefile.in (SFILES): Add common/common-debug.c.
4008 (OBS): Add common-debug.o.
4009 (common-debug.o): New rule.
4010 * debug.h (debug_printf): Don't declare.
4011 * debug.c (debug_printf): Renamed and rewritten as...
4012 (debug_vprintf): New function.
4014 2014-08-19 Gary Benson <gbenson@redhat.com>
4016 * utils.h: Do not include print-utils.h.
4018 2014-08-19 Tom Tromey <tromey@redhat.com>
4019 Gary Benson <gbenson@redhat.com>
4021 * server.h: Add static assertion.
4022 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4024 2014-08-19 Tom Tromey <tromey@redhat.com>
4025 Gary Benson <gbenson@redhat.com>
4027 * Makefile.in (SFILES): Add common/errors.c.
4028 (OBS): Add errors.o.
4029 (IPA_OBS): Add errors-ipa.o.
4030 (errors.o): New rule.
4031 (errors-ipa.o): Likewise.
4032 * utils.h (perror_with_name, error, warning): Don't declare.
4033 * utils.c (warning): Renamed and rewritten as...
4034 (vwarning): New function.
4035 (error): Renamed and rewritten as...
4036 (verror): New function.
4037 (internal_error): Renamed and rewritten as...
4038 (internal_verror): New function.
4040 2014-08-07 Gary Benson <gbenson@redhat.com>
4042 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4043 * configure: Regenerate.
4044 * config.in: Likewise.
4045 * server.h: Do not include errno.h.
4046 * event-loop.c: Likewise.
4047 * hostio-errno.c: Likewise.
4048 * linux-low.c: Likewise.
4049 * remote-utils.c: Likewise.
4050 * spu-low.c: Likewise.
4051 * utils.c: Likewise.
4052 * gdbreplay.c: Unconditionally include errno.h.
4054 2014-08-07 Gary Benson <gbenson@redhat.com>
4056 * server.h: Do not include string.h.
4057 * event-loop.c: Likewise.
4058 * linux-low.c: Likewise.
4059 * regcache.c: Likewise.
4060 * remote-utils.c: Likewise.
4061 * spu-low.c: Likewise.
4062 * utils.c: Likewise.
4064 2014-08-07 Gary Benson <gbenson@redhat.com>
4066 * server.h: Do not include gdb_assert.h.
4068 2014-08-07 Gary Benson <gbenson@redhat.com>
4070 * server.h: Do not include common-utils.h.
4072 2014-08-07 Gary Benson <gbenson@redhat.com>
4074 * server.h: Do not include ptid.h.
4075 * notif.h: Likewise.
4077 2014-08-07 Gary Benson <gbenson@redhat.com>
4079 * server.h: Do not include gdb_locale.h.
4081 2014-08-07 Gary Benson <gbenson@redhat.com>
4083 * server.h: Do not include gdb/signals.h.
4084 * win32-low.c: Likewise.
4086 2014-08-07 Gary Benson <gbenson@redhat.com>
4088 * server.h: Do not include pathmax.h.
4090 2014-08-07 Gary Benson <gbenson@redhat.com>
4092 * server.h: Do not include libiberty.h.
4093 * linux-bfin-low.c: Likewise.
4095 2014-08-07 Gary Benson <gbenson@redhat.com>
4097 * server.h: Do not include ansidecl.h.
4099 2014-08-07 Gary Benson <gbenson@redhat.com>
4101 * linux-x86-low.c: Do not include stddef.h.
4102 * lynx-ppc-low.c: Likewise.
4103 * tracepoint.c: Likewise.
4105 2014-08-07 Gary Benson <gbenson@redhat.com>
4107 * server.h: Do not include stdarg.h.
4108 * nto-low.c: Likewise.
4110 2014-08-07 Gary Benson <gbenson@redhat.com>
4112 * server.h: Do not include stdlib.h.
4113 * inferiors.c: Likewise.
4114 * linux-low.c: Likewise.
4115 * regcache.c: Likewise.
4116 * spu-low.c: Likewise.
4117 * tracepoint.c: Likewise.
4118 * utils.c: Likewise.
4120 2014-08-07 Gary Benson <gbenson@redhat.com>
4122 * server.h: Do not include stdio.h.
4123 * linux-low.c: Likewise.
4124 * remote-utils.c: Likewise.
4125 * spu-low.c: Likewise.
4126 * utils.c: Likewise.
4127 * wincecompat.c: Likewise.
4129 2014-08-06 Gary Benson <gbenson@redhat.com>
4131 * regcache.c (init_register_cache): Move conditionals inside if.
4133 2014-08-06 Gary Benson <gbenson@redhat.com>
4135 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4137 2014-07-31 Gary Benson <gbenson@redhat.com>
4139 * ax.h: Do not include server.h.
4140 * gdbthread.h: Likewise.
4141 * lynx-low.h: Likewise.
4142 * notif.h: Likewise.
4144 2014-07-30 Gary Benson <gbenson@redhat.com>
4146 * server.h: Include common-defs.h.
4147 Do not include config.h or build-gnulib-gdbserver/config.h.
4149 2014-07-30 Gary Benson <gbenson@redhat.com>
4151 * hostio-errno.c: Move server.h to top of includes list.
4152 * inferiors.c: Likewise.
4153 * linux-x86-low.c: Likewise.
4154 * notif.c: Include server.h.
4156 2014-07-24 Tom Tromey <tromey@redhat.com>
4157 Gary Benson <gbenson@redhat.com>
4159 * server.h (CORE_ADDR): Now unsigned.
4161 2014-07-16 Pedro Alves <palves@redhat.com>
4163 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4165 2014-07-15 Pedro Alves <palves@redhat.com>
4167 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4170 2014-07-11 Pedro Alves <palves@redhat.com>
4172 * linux-low.c (kill_wait_lwp): New function, based on
4173 kill_one_lwp_callback, but use my_waitpid directly.
4174 (kill_one_lwp_callback, linux_kill): Use it.
4176 2014-06-23 Pedro Alves <palves@redhat.com>
4178 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4179 before setting DR0..DR3.
4181 2014-06-20 Gary Benson <gbenson@redhat.com>
4183 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4184 * configure: Regenerated.
4185 * config.in: Likewise.
4187 2014-06-20 Gary Benson <gbenson@redhat.com>
4189 * Makefile.in (SFILES): Update locations for files moved
4191 (object file files): Reordered.
4193 2014-06-20 Gary Benson <gbenson@redhat.com>
4195 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4196 (i386_dr_low_set_addr): Likewise.
4197 (i386_dr_low_get_addr): Likewise.
4198 (i386_dr_low_can_set_control): Likewise.
4199 (i386_dr_low_set_control): Likewise.
4200 (i386_dr_low_get_control): Likewise.
4201 (i386_dr_low_get_status): Likewise.
4202 (i386_get_debug_register_length): Likewise.
4203 * linux-x86-low.c (i386_dr_low_set_addr):
4204 Changed signature. Made static.
4205 (i386_dr_low_get_addr): Likewise.
4206 (i386_dr_low_set_control): Likewise.
4207 (i386_dr_low_get_control): Likewise.
4208 (i386_dr_low_get_status): Likewise.
4209 (i386_dr_low): New global variable.
4210 * win32-i386-low.c (i386_dr_low_set_addr):
4211 Changed signature. Made static.
4212 (i386_dr_low_get_addr): Likewise.
4213 (i386_dr_low_set_control): Likewise.
4214 (i386_dr_low_get_control): Likewise.
4215 (i386_dr_low_get_status): Likewise.
4216 (i386_dr_low): New global variable.
4218 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4220 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4221 * Makefile.in (AR, AR_FLAGS): Define.
4222 * configure: Regenerate.
4224 2014-06-19 Gary Benson <gbenson@redhat.com>
4226 * Makefile.in (i386-dregs.o): New rule.
4227 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4228 * i386-low.c (target.h): Remove include.
4229 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4230 (DR_CONTROL_SHIFT): Likewise.
4231 (DR_CONTROL_SIZE): Likewise.
4232 (DR_RW_EXECUTE): Likewise.
4233 (DR_RW_WRITE): Likewise.
4234 (DR_RW_READ): Likewise.
4235 (DR_RW_IORW): Likewise.
4236 (DR_LEN_1): Likewise.
4237 (DR_LEN_2): Likewise.
4238 (DR_LEN_4): Likewise.
4239 (DR_LEN_8): Likewise.
4240 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4241 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4242 (DR_ENABLE_SIZE): Likewise.
4243 (DR_LOCAL_SLOWDOWN): Likewise.
4244 (DR_GLOBAL_SLOWDOWN): Likewise.
4245 (DR_CONTROL_RESERVED): Likewise.
4246 (I386_DR_CONTROL_MASK): Likewise.
4247 (I386_DR_VACANT): Likewise.
4248 (I386_DR_LOCAL_ENABLE): Likewise.
4249 (I386_DR_GLOBAL_ENABLE): Likewise.
4250 (I386_DR_DISABLE): Likewise.
4251 (I386_DR_SET_RW_LEN): Likewise.
4252 (I386_DR_GET_RW_LEN): Likewise.
4253 (I386_DR_WATCH_HIT): Likewise.
4254 (i386_wp_op_t): Likewise.
4255 (i386_show_dr): Likewise.
4256 (i386_length_and_rw_bits): Likewise.
4257 (i386_insert_aligned_watchpoint): Likewise.
4258 (i386_remove_aligned_watchpoint): Likewise.
4259 (i386_handle_nonaligned_watchpoint): Likewise.
4260 i386_update_inferior_debug_regs(): Likewise.
4261 (i386_dr_insert_watchpoint): Likewise.
4262 (i386_dr_remove_watchpoint): Likewise.
4263 (i386_dr_region_ok_for_watchpoint): Likewise.
4264 (i386_dr_stopped_data_address): Likewise.
4265 (i386_dr_stopped_by_watchpoint): Likewise.
4267 2014-06-19 Gary Benson <gbenson@redhat.com>
4269 * i386-low.c (i386_dr_show): Renamed to
4270 i386_show_dr and made static. All uses updated.
4271 (i386_dr_length_and_rw_bits): Renamed to
4272 i386_length_and_rw_bits and made static.
4274 (i386_dr_insert_aligned_watchpoint): Renamed to
4275 i386_insert_aligned_watchpoint and made static.
4277 (i386_dr_remove_aligned_watchpoint): Renamed to
4278 i386_remove_aligned_watchpoint and made static.
4280 (i386_dr_update_inferior_debug_regs): Renamed to
4281 i386_update_inferior_debug_regs and made static.
4284 2014-06-18 Gary Benson <gbenson@redhat.com>
4286 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4287 (i386_dr_low_can_set_control): Likewise.
4288 (i386_get_debug_register_length): Likewise.
4289 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4290 (i386_dr_low_can_set_control): Likewise.
4291 (i386_get_debug_register_length): Likewise.
4293 2014-06-17 Gary Benson <gbenson@redhat.com>
4295 * i386-low.h (i386-dregs.h): New include.
4296 (DR_FIRSTADDR): Now in i386-dregs.h.
4297 (DR_LASTADDR): Likewise.
4298 (DR_NADDR): Likewise.
4299 (DR_STATUS): Likewise.
4300 (DR_CONTROL): Likewise.
4301 (i386_debug_reg_state): Likewise.
4302 (i386_dr_insert_watchpoint): Likewise.
4303 (i386_dr_remove_watchpoint): Likewise.
4304 (i386_dr_region_ok_for_watchpoint): Likewise.
4305 (i386_dr_stopped_data_address): Likewise.
4306 (i386_dr_stopped_by_watchpoint): Likewise.
4307 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4309 2014-06-18 Gary Benson <gbenson@redhat.com>
4311 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4312 i386_dr_insert_watchpoint.
4313 (i386_low_remove_watchpoint): Renamed to
4314 i386_dr_remove_watchpoint.
4315 (i386_low_region_ok_for_watchpoint): Renamed to
4316 i386_dr_region_ok_for_watchpoint.
4317 (i386_low_stopped_data_address): Renamed to
4318 i386_dr_stopped_data_address.
4319 (i386_low_stopped_by_watchpoint): Renamed to
4320 i386_dr_stopped_by_watchpoint.
4321 * i386-low.c (i386_show_dr): Renamed to
4322 i386_dr_show and made nonstatic. All uses updated.
4323 (i386_length_and_rw_bits): Renamed to
4324 i386_dr_length_and_rw_bits and made nonstatic.
4326 (i386_insert_aligned_watchpoint): Renamed to
4327 i386_dr_insert_aligned_watchpoint and made nonstatic.
4329 (i386_remove_aligned_watchpoint): Renamed to
4330 i386_dr_remove_aligned_watchpoint and made nonstatic.
4332 (i386_update_inferior_debug_regs): Renamed to
4333 i386_dr_update_inferior_debug_regs and made nonstatic.
4335 (i386_low_insert_watchpoint): Renamed to
4336 i386_dr_insert_watchpoint. All uses updated.
4337 (i386_low_remove_watchpoint): Renamed to
4338 i386_dr_remove_watchpoint. All uses updated.
4339 (i386_low_region_ok_for_watchpoint): Renamed to
4340 i386_dr_region_ok_for_watchpoint. All uses updated.
4341 (i386_low_stopped_data_address): Renamed to
4342 i386_dr_stopped_data_address. All uses updated.
4343 (i386_low_stopped_by_watchpoint): Renamed to
4344 i386_dr_stopped_by_watchpoint. All uses updated.
4346 2014-06-18 Gary Benson <gbenson@redhat.com>
4348 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4349 (i386_dr_low_can_set_control): Likewise.
4350 (i386_insert_aligned_watchpoint): New check.
4352 2014-06-18 Gary Benson <gbenson@redhat.com>
4354 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4357 2014-06-18 Gary Benson <gbenson@redhat.com>
4359 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4360 instead of fatal and error.
4361 (i386_handle_nonaligned_watchpoint): Likewise.
4363 2014-06-18 Gary Benson <gbenson@redhat.com>
4365 * i386-low.c (i386_get_debug_register_length): New macro.
4366 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4367 (i386_show_dr): Use debug_printf instead of fprintf. Use
4368 phex to format values.
4370 2014-06-18 Gary Benson <gbenson@redhat.com>
4372 * i386-low.h: Comment changes.
4373 * i386-low.c: Likewise.
4375 2014-06-18 Gary Benson <gbenson@redhat.com>
4377 * i386-low.c: Whitespace changes.
4379 2014-06-12 Tom Tromey <tromey@redhat.com>
4381 * utils.c (freeargv): Remove.
4383 2014-06-12 Tom Tromey <tromey@redhat.com>
4385 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4386 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4387 (parse_debug_format_options): Likewise.
4388 (gdbserver_usage): Likewise.
4389 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4390 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4391 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4393 ($(LIBGNU)): Depend on libiberty.
4394 (all-lib): Recurse into all subdirs.
4395 (install-only): Invoke "install" target in subdirs.
4396 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4398 * configure: Rebuild.
4399 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4400 for vasprintf, vsnprintf, or gettimeofday.
4401 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4404 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4406 * development.sh: Delete.
4407 * Makefile.in (config.status): Adjust dependency on development.sh.
4408 * configure.ac: Adjust development.sh source call.
4409 * configure: Regenerate.
4411 2014-06-02 Pedro Alves <palves@redhat.com>
4413 * ax.c (gdb_free_agent_expr): New function.
4414 * ax.h (gdb_free_agent_expr): New declaration.
4415 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4417 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4419 (clear_breakpoint_conditions_and_commands): New function.
4420 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4421 (clear_breakpoint_conditions_and_commands): New declaration.
4423 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4425 * linux-aarch64-low.c (asm/ptrace.h): Include.
4427 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4429 Fix TLS access for -static -pthread.
4430 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4431 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4432 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4434 2014-05-20 Pedro Alves <palves@redhat.com>
4436 * linux-aarch64-low.c (aarch64_insert_point)
4437 (aarch64_remove_point): No longer check whether the type is
4438 supported here. Adjust to new interface.
4439 (the_low_target): Install aarch64_supports_z_point_type as
4440 supports_z_point_type method.
4441 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4442 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4443 instead of a Z packet char. Adjust.
4444 (arm_supports_z_point_type): New function.
4445 (arm_insert_point, arm_remove_point): Adjust to new interface.
4446 (the_low_target): Install arm_supports_z_point_type.
4447 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4448 (cris_insert_point, cris_remove_point): Adjust to new interface.
4449 Don't check whether the type is supported here.
4450 (the_low_target): Install cris_supports_z_point_type.
4451 * linux-low.c (linux_supports_z_point_type): New function.
4452 (linux_insert_point, linux_remove_point): Adjust to new interface.
4453 * linux-low.h (struct linux_target_ops) <insert_point,
4454 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4455 raw_breakpoint pointer parameter.
4456 <supports_z_point_type>: New method.
4457 * linux-mips-low.c (mips_supports_z_point_type): New function.
4458 (mips_insert_point, mips_remove_point): Adjust to new interface.
4459 Use mips_supports_z_point_type.
4460 (the_low_target): Install mips_supports_z_point_type.
4461 * linux-ppc-low.c (the_low_target): Install NULL as
4462 supports_z_point_type method.
4463 * linux-s390-low.c (the_low_target): Install NULL as
4464 supports_z_point_type method.
4465 * linux-sparc-low.c (the_low_target): Install NULL as
4466 supports_z_point_type method.
4467 * linux-x86-low.c (x86_supports_z_point_type): New function.
4468 (x86_insert_point): Adjust to new insert_point interface. Use
4469 insert_memory_breakpoint. Adjust to new
4470 i386_low_insert_watchpoint interface.
4471 (x86_remove_point): Adjust to remove_point interface. Use
4472 remove_memory_breakpoint. Adjust to new
4473 i386_low_remove_watchpoint interface.
4474 (the_low_target): Install x86_supports_z_point_type.
4475 * lynx-low.c (lynx_target_ops): Install NULL as
4476 supports_z_point_type callback.
4477 * nto-low.c (nto_supports_z_point_type): New.
4478 (nto_insert_point, nto_remove_point): Adjust to new interface.
4479 (nto_target_ops): Install nto_supports_z_point_type.
4480 * mem-break.c: Adjust intro comment.
4481 (struct raw_breakpoint) <raw_type, size>: New fields.
4482 <inserted>: Update comment.
4483 <shlib_disabled>: Delete field.
4484 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4485 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4486 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4487 (raw_bkpt_type_to_target_hw_bp_type): New function.
4488 (find_enabled_raw_code_breakpoint_at): New function.
4489 (find_raw_breakpoint_at): New type and size parameters. Use them.
4490 (insert_memory_breakpoint): New function, based off
4491 set_raw_breakpoint_at.
4492 (remove_memory_breakpoint): New function.
4493 (set_raw_breakpoint_at): Reimplement.
4494 (set_breakpoint): New, based on set_breakpoint_at.
4495 (set_breakpoint_at): Reimplement.
4496 (delete_raw_breakpoint): Go through the_target->remove_point
4497 instead of assuming memory breakpoints.
4498 (find_gdb_breakpoint_at): Delete.
4499 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4500 (find_gdb_breakpoint): New function.
4501 (set_gdb_breakpoint_at): Delete.
4502 (z_type_supported): New function.
4503 (set_gdb_breakpoint_1): New function, loosely based off
4504 set_gdb_breakpoint_at.
4505 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4506 (delete_gdb_breakpoint_at): Delete.
4507 (delete_gdb_breakpoint_1): New function, loosely based off
4508 delete_gdb_breakpoint_at.
4509 (delete_gdb_breakpoint): New function.
4510 (clear_gdb_breakpoint_conditions): Rename to ...
4511 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4513 (add_condition_to_breakpoint): Make static.
4514 (add_breakpoint_condition): Take a struct breakpoint pointer
4515 instead of an address. Adjust.
4516 (gdb_condition_true_at_breakpoint): Rename to ...
4517 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4519 (gdb_condition_true_at_breakpoint): Reimplement.
4520 (add_breakpoint_commands): Take a struct breakpoint pointer
4521 instead of an address. Adjust.
4522 (gdb_no_commands_at_breakpoint): Rename to ...
4523 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4524 parameter. Return true if no breakpoint was found. Change debug
4526 (gdb_no_commands_at_breakpoint): Reimplement.
4527 (run_breakpoint_commands): Rename to ...
4528 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4529 and change return type to boolean.
4530 (run_breakpoint_commands): New function.
4531 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4532 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4533 breakpoint. Go through the_target->remove_point instead of
4534 assuming memory breakpoint.
4535 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4536 software and hardware breakpoints.
4537 (reinsert_raw_breakpoint): Go through the_target->insert_point
4538 instead of assuming memory breakpoint.
4539 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4540 software and hardware breakpoints.
4541 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4542 Check both software and hardware breakpoints.
4543 (validate_inserted_breakpoint): Assert the breakpoint is a
4544 software breakpoint. Set the inserted flag to -1 instead of
4545 setting shlib_disabled.
4546 (delete_disabled_breakpoints): Adjust.
4547 (validate_breakpoints): Only validate software breakpoints.
4548 Adjust to inserted flag change.
4549 (check_mem_read, check_mem_write): Skip breakpoint types other
4550 than software breakpoints. Adjust to inserted flag change.
4551 * mem-break.h (enum raw_bkpt_type): New enum.
4552 (raw_breakpoint, struct process_info): Forward declare.
4553 (Z_packet_to_target_hw_bp_type): Delete declaration.
4554 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4555 (set_gdb_breakpoint, delete_gdb_breakpoint)
4556 (clear_breakpoint_conditions): New declarations.
4557 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4558 (breakpoint_inserted_here): Update comment.
4559 (add_breakpoint_condition, add_breakpoint_commands): Replace
4560 address parameter with a breakpoint pointer parameter.
4561 (gdb_breakpoint_here): Update comment.
4562 (delete_gdb_breakpoint_at): Delete.
4563 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4564 * server.c (process_point_options): Take a struct breakpoint
4565 pointer instead of an address. Adjust.
4566 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4567 delete_gdb_breakpoint.
4568 * spu-low.c (spu_target_ops): Install NULL as
4569 supports_z_point_type method.
4570 * target.h: Include mem-break.h.
4571 (struct target_ops) <prepare_to_access_memory>: Update comment.
4572 <supports_z_point_type>: New field.
4573 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4574 instead of a char. Also take a raw breakpoint pointer.
4575 * win32-arm-low.c (the_low_target): Install NULL as
4576 supports_z_point_type.
4577 * win32-i386-low.c (i386_supports_z_point_type): New function.
4578 (i386_insert_point, i386_remove_point): Adjust to new interface.
4579 (the_low_target): Install i386_supports_z_point_type.
4580 * win32-low.c (win32_supports_z_point_type): New function.
4581 (win32_insert_point, win32_remove_point): Adjust to new interface.
4582 (win32_target_ops): Install win32_supports_z_point_type.
4583 * win32-low.h (struct win32_target_ops):
4584 <supports_z_point_type>: New method.
4585 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4586 instead of a char. Also take a raw breakpoint pointer.
4588 2014-05-20 Pedro Alves <palves@redhat.com>
4590 * mem-break.h: Include break-common.h.
4591 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4592 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4593 (Z_packet_to_target_hw_bp_type): New declaration.
4594 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4595 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4596 (Z_PACKET_ACCESS_WP): Delete macros.
4597 (Z_packet_to_hw_type): Delete function.
4598 * i386-low.h: Don't include break-common.h here.
4599 (Z_packet_to_hw_type): Delete declaration.
4600 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4601 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4602 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4604 * linux-aarch64-low.c: Don't include break-common.h here.
4605 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4606 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4607 (Z_packet_to_target_hw_bp_type): Delete function.
4608 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4610 (mips_insert_point, mips_remove_point): Use
4611 Z_packet_to_target_hw_bp_type.
4613 2014-05-20 Pedro Alves <palves@redhat.com>
4615 * linux-aarch64-low.c: Include break-common.h.
4616 (enum target_point_type): Delete.
4617 (Z_packet_to_point_type): Rename to ...
4618 (Z_packet_to_target_hw_bp_type): ... this, and return a
4619 target_hw_bp_type instead.
4620 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4621 instead of an enum target_point_type.
4622 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4624 (aarch64_dr_state_insert_one_point)
4625 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4626 (aarch64_handle_aligned_watchpoint)
4627 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4628 Take an enum target_hw_bp_type instead of an enum
4630 (aarch64_supports_z_point_type): New function.
4631 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4632 use Z_packet_to_target_hw_bp_type.
4634 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4636 * configure.ac: Only use -Werror by default when DEVELOPMENT
4638 * configure: Regenerate.
4640 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4642 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4643 * linux-x86-low.c (X86_64_USER_REGS): New.
4644 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4646 2014-04-28 Yao Qi <yao@codesourcery.com>
4648 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4651 2014-04-25 Pedro Alves <palves@redhat.com>
4654 * linux-low.c (linux_attach_fail_reason_string): New function.
4655 (linux_attach_lwp): Delete.
4656 (linux_attach_lwp_1): Rename to ...
4657 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4658 argument. Remove "initial" parameter. Return int instead of
4659 void. Don't error or warn here.
4660 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4661 failure to attach to the tgid. Call warning when failing to
4663 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4664 argument. Remove "initial" parameter. Return int instead of
4665 void. Don't error or warn here.
4666 (linux_attach_fail_reason_string): New declaration.
4667 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4668 interface change. Use linux_attach_fail_reason_string.
4670 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4671 Walfred Tedeschi <walfred.tedeschi@intel.com>
4673 * Makefile.in: Added rules to handle new files
4674 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4675 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4676 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4677 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4678 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4679 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4681 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4682 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4683 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4684 i386/x32-avx512.xml.
4685 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4686 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4687 i386/x32-avx512-linux.xml.
4688 * i387-fp.c (num_avx512_k_registers): New constant for number
4690 (num_avx512_zmmh_low_registers): New constant for number of
4691 lower ZMM registers (0-15).
4692 (num_avx512_zmmh_high_registers): New constant for number of
4693 higher ZMM registers (16-31).
4694 (num_avx512_ymmh_registers): New contant for number of higher
4695 YMM registers (ymm16-31 added by avx521 on x86_64).
4696 (num_avx512_xmm_registers): New constant for number of higher
4697 XMM registers (xmm16-31 added by AVX512 on x86_64).
4698 (struct i387_xsave): Add space for AVX512 registers.
4699 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4700 Add code to handle AVX512 registers.
4701 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4702 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4703 prototypei from generated file.
4704 (tdesc_amd64_avx512_linux): Likewise.
4705 (init_registers_x32_avx512_linux): Likewise.
4706 (tdesc_x32_avx512_linux): Likewise.
4707 (init_registers_i386_avx512_linux): Likewise.
4708 (tdesc_i386_avx512_linux): Likewise.
4709 (x86_64_regmap): Add AVX512 registers.
4710 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4712 (initialize_low_arch): Add code to initialize AVX512 registers.
4714 2014-04-23 Pedro Alves <palves@redhat.com>
4716 * mem-break.c (find_gdb_breakpoint_at): Make static.
4717 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4719 2014-04-23 Pedro Alves <palves@redhat.com>
4721 * i386-low.c: Don't include break-common.h here.
4722 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4723 prototype to take target_hw_bp_type as argument instead of a Z
4725 * i386-low.h: Include break-common.h here.
4726 (Z_packet_to_hw_type): Declare.
4727 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4729 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4730 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4731 (x86_remove_point): Convert the packet number to a
4732 target_hw_bp_type before calling i386_low_remove_watchpoint.
4733 * win32-i386-low.c (i386_insert_point): Convert the packet number
4734 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4735 (i386_remove_point): Convert the packet number to a
4736 target_hw_bp_type before calling i386_low_remove_watchpoint.
4738 2014-04-23 Pedro Alves <palves@redhat.com>
4740 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4742 2014-04-10 Pedro Alves <palves@redhat.com>
4744 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4745 Check if the condition or command is NULL before checking if the
4746 breakpoint is known. On success, return true.
4747 * mem-break.h (add_breakpoint_condition): Document return.
4748 (add_breakpoint_commands): Add describing comment.
4749 * server.c (skip_to_semicolon): New function.
4750 (process_point_options): Use it.
4752 2014-04-09 Pedro Alves <palves@redhat.com>
4754 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4757 2014-02-27 Pedro Alves <palves@redhat.com>
4760 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4762 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4764 (last_thread_of_process_p): Take a PID argument instead of a
4766 (linux_wait_for_lwp): Delete.
4767 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4769 (linux_low_filter_event): New function, party factored out from
4770 linux_wait_for_event.
4771 (linux_wait_for_event): Rename to ...
4772 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4773 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4774 sigsuspend. Check for zombie leaders.
4775 (linux_wait_for_event): Reimplement as wrapper around
4776 linux_wait_for_event_filtered.
4777 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4778 a normal or signal exit is seen, it's the whole process exiting.
4779 (wait_for_sigstop): No longer a for_each_inferior callback.
4780 Rewrite on top of linux_wait_for_event_filtered.
4781 (stop_all_lwps): Call wait_for_sigstop directly.
4782 * server.c (resume, handle_target_event): Handle
4783 TARGET_WAITKIND_NO_RESUMED.
4785 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4787 * win32-low.c (psapi_get_dll_name,
4788 * win32_CreateToolhelp32Snapshot): Delete.
4789 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4790 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4792 (handle_load_dll): Add function description.
4793 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4795 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4797 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4799 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4800 base address when calling win32_add_one_solib.
4801 (handle_load_dll): Delete local variable load_addr.
4802 Remove 0x1000 offset applied to DLL base address when calling
4803 win32_add_one_solib.
4804 (handle_unload_dll): Add comment.
4806 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4808 * win32-low.c (win32_add_all_dlls): Renames
4809 win32_ensure_ntdll_loaded. Rewrite function documentation.
4810 Adjust implementation to always load all DLLs.
4811 Add 0x1000 offset to DLL base address when calling
4812 win32_add_one_solib.
4813 (child_initialization_done): New static global.
4814 (do_initial_child_stuff): Set child_initialization_done to
4815 zero during child initialization, and 1 after. Replace call
4816 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4818 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4819 (handle_unload_dll): Add function documentation.
4820 (get_child_debug_event): Ignore load and unload DLL events
4821 during child initialization.
4823 2014-02-20 Doug Evans <dje@google.com>
4825 Remove global all_lwps.
4826 * inferiors.h (ptid_of): Move here from linux-low.h.
4827 (pid_of, lwpid_of): Ditto.
4828 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4829 parameter is a struct thread_info * now.
4830 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4831 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4832 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4834 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4835 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4836 * linux-arm-low.c (update_registers_callback): Update, "entry"
4837 parameter is a struct thread_info * now.
4838 Fetch lwpid from current_inferior directly.
4839 (arm_insert_point): Pass &all_threads to find_inferior instead of
4841 (arm_remove_point): Ditto.
4842 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4843 (arm_prepare_to_resume): Fetch pid from thread.
4844 (arm_read_description): Fetch lwpid from current_inferior directly.
4845 * linux-low.c (all_lwps): Delete.
4846 (delete_lwp): Delete call to remove_inferior.
4847 (handle_extended_wait): Fetch lwpid from thread.
4848 (add_lwp): Don't set lwp->entry.id. Remove call to
4849 add_inferior_to_list.
4850 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4851 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4852 (kill_one_lwp_callback): Ditto.
4853 (linux_kill): Don't dereference NULL pointer.
4854 Fetch ptid,lwpid from thread.
4855 (get_detach_signal): Fetch ptid from thread.
4856 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4857 Simplify call to regcache_invalidate_thread.
4858 (delete_lwp_callback): Update, "entry" parameter is a
4859 struct thread_info * now. Fetch pid from thread.
4860 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4861 (status_pending_p_callback): Update, "entry" parameter is a
4862 struct thread_info * now. Fetch ptid from thread.
4863 (find_lwp_pid): Update, "entry" parameter is a
4864 struct thread_info * now.
4865 (linux_wait_for_lwp): Fetch pid from thread.
4866 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4867 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4868 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4869 (dequeue_one_deferred_signal): Ditto.
4870 (cancel_breakpoint): Fetch ptid from current_inferior.
4871 (linux_wait_for_event): Pass &all_threads to find_inferior,
4872 not &all_lwps. Fetch ptid, lwpid from thread.
4873 (count_events_callback): Update, "entry" parameter is a
4874 struct thread_info * now.
4875 (select_singlestep_lwp_callback): Ditto.
4876 (select_event_lwp_callback): Ditto.
4877 (cancel_breakpoints_callback): Ditto.
4878 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4880 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4881 (unsuspend_one_lwp): Update, "entry" parameter is a
4882 struct thread_info * now.
4883 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4885 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4886 Fetch lwpid from thread, not lwp.
4887 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4888 Pass &all_threads to find_inferior, not &all_lwps.
4889 (send_sigstop): Fetch lwpid from thread, not lwp.
4890 (send_sigstop_callback): Update, "entry" parameter is a
4891 struct thread_info * now.
4892 (suspend_and_send_sigstop_callback): Ditto.
4893 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4894 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4895 struct thread_info * now.
4896 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4898 (lwp_running): Update, "entry" parameter is a
4899 struct thread_info * now.
4900 (stop_all_lwps): Fetch ptid from thread.
4901 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4902 (linux_resume_one_lwp): Fetch lwpid from thread.
4903 (linux_set_resume_request): Update, "entry" parameter is a
4904 struct thread_info * now. Fetch pid, lwpid from thread.
4905 (resume_status_pending_p): Update, "entry" parameter is a
4906 struct thread_info * now.
4907 (need_step_over_p): Ditto. Fetch lwpid from thread.
4908 (start_step_over): Fetch lwpid from thread.
4909 (linux_resume_one_thread): Update, "entry" parameter is a
4910 struct thread_info * now. Fetch lwpid from thread.
4911 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4912 (proceed_one_lwp): Update, "entry" parameter is a
4913 struct thread_info * now. Fetch lwpid from thread.
4914 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4915 struct thread_info * now.
4916 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4917 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4918 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4920 (regsets_store_inferior_registers): Ditto.
4921 (fetch_register, store_register): Ditto.
4922 (linux_read_memory, linux_write_memory): Ditto.
4923 (linux_request_interrupt): Ditto.
4924 (linux_read_auxv): Ditto.
4925 (linux_xfer_siginfo): Ditto.
4926 (linux_qxfer_spu): Ditto.
4927 (linux_qxfer_libraries_svr4): Ditto.
4928 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4929 moved to inferiors.h.
4931 (get_thread_lwp): Update.
4932 (struct lwp_info): Delete member "entry". Simplify comment for
4935 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4936 current_inferior directly.
4937 (update_watch_registers_callback): Update, "entry" parameter is a
4938 struct thread_info * now. Fetch pid from thread.
4939 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4940 (mips_insert_point): Fetch lwpid from current_inferior.
4941 Pass &all_threads to find_inferior, not &all_lwps.
4942 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4943 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4945 (mips_stopped_data_address): Ditto.
4946 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4948 * linux-tile-low.c (tile_arch_setup): Ditto.
4949 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4950 (update_debug_registers_callback): Update, "entry" parameter is a
4951 struct thread_info * now. Fetch pid from thread.
4952 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4953 Pass &all_threads to find_inferior, not &all_lwps.
4954 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4955 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4956 Pass &all_threads to find_inferior, not &all_lwps.
4957 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4958 (i386_dr_low_get_status): Ditto.
4959 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4960 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4961 (x86_linux_read_description): Ditto.
4962 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4964 2014-02-20 Doug Evans <dje@google.com>
4966 * inferiors.c (get_first_inferior): Fix buglet.
4968 2014-02-19 Doug Evans <dje@google.com>
4970 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4971 * inferiors.c (add_thread): Change result type to struct thread_info *.
4972 All callers updated.
4973 (add_lwp): Call add_thread here instead of in callers.
4974 All callers updated.
4975 * linux-low.h (get_lwp_thread): Rewrite.
4976 (struct lwp_info): New member "thread".
4978 2014-02-19 Doug Evans <dje@google.com>
4980 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4981 All callers updated.
4983 2014-02-19 Doug Evans <dje@google.com>
4985 * inferiors.c (add_thread): Fix whitespace.
4987 2014-02-19 Doug Evans <dje@google.com>
4989 * dll.c (clear_dlls): Replace accessing list implemention details
4991 * gdbthread.h (get_first_thread): Declare.
4992 * inferiors.c (for_each_inferior_with_data): New function.
4993 (get_first_thread): New function.
4994 (find_thread_ptid): Simplify.
4995 (get_first_inferior): New function.
4996 (clear_list): Delete.
4997 (one_inferior_p): New function.
4998 (clear_inferior_list): New function.
4999 (clear_inferiors): Update.
5000 * inferiors.h (for_each_inferior_with_data): Declare.
5001 (clear_inferior_list): Declare.
5002 (one_inferior_p): Declare.
5003 (get_first_inferior): Declare.
5004 * linux-low.c (linux_wait_for_event): Replace accessing list
5005 implemention details with API function.
5006 * server.c (target_running): Ditto.
5007 (accumulate_file_name_length): New function.
5008 (emit_dll_description): New function.
5009 (handle_qxfer_libraries): Replace accessing list implemention
5010 details with API function.
5011 (handle_qxfer_threads_worker): New function.
5012 (handle_qxfer_threads_proper): Replace accessing list implemention
5013 details with API function.
5014 (handle_query): Ditto.
5015 (visit_actioned_threads_callback_ftype): New typedef.
5016 (visit_actioned_threads_data): New struct.
5017 (visit_actioned_threads): Rewrite to be find_inferior callback.
5018 (resume): Call find_inferior.
5019 (handle_status): Replace accessing list implemention
5020 details with API function.
5021 (process_serial_event): Replace accessing list implemention details
5023 * target.c (set_desired_inferior): Replace accessing list implemention
5024 details with API function.
5025 * tracepoint.c (same_process_p): New function.
5026 (gdb_agent_about_to_close): Replace accessing list implemention
5027 details with API function.
5028 * win32-low.c (child_delete_thread): Replace accessing list
5029 implemention details with API function.
5030 (match_dll_by_basename): New function.
5031 (dll_is_loaded_by_basename): New function.
5032 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5033 details call to dll_is_loaded_by_basename.
5035 2014-02-19 Doug Evans <dje@google.com>
5037 * dll.h (struct dll_info): Add comment.
5038 * gdbthread.h (struct thread_info): Add comment.
5039 (current_ptid): Simplify.
5040 * inferiors.c (add_process): Update.
5041 (remove_process): Update.
5042 * inferiors.h (struct process_info): Rename member "head" to "entry".
5043 * linux-low.c (delete_lwp): Update.
5045 (last_thread_of_process_p): Update.
5046 (kill_one_lwp_callback, linux_kill): Update.
5047 (status_pending_p_callback): Update.
5048 (wait_for_sigstop): Update. Simplify read of ptid.
5049 (start_step_over): Update.
5050 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5051 (get_lwp_thread): Update.
5052 (struct lwp_info): Rename member "head" to "entry".
5053 * regcache.h (inferior_list_entry): Delete.
5054 * server.c (kill_inferior_callback): Update.
5055 (detach_or_kill_inferior_callback): Update.
5056 (print_started_pid): Update.
5057 (print_attached_pid): Update.
5058 (process_serial_event): Simplify read of ptid.
5059 * thread-db.c (thread_db_create_event): Update.
5060 (thread_db_get_tls_address): Update.
5061 * win32-low.c (current_inferior_ptid): Simplify.
5063 2014-02-19 Tom Tromey <tromey@redhat.com>
5065 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5067 (target_supports_btrace): Update.
5069 2014-02-14 Yao Qi <yao@codesourcery.com>
5071 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5072 (rsp-low-ipa.o): New target.
5074 2014-02-12 Tom Tromey <tromey@redhat.com>
5076 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5077 convert_ascii_to_int.
5078 * regcache.c (registers_to_string): Likewise.
5079 * remote-utils.c (decode_M_packet): Likewise.
5080 * server.c (process_serial_event): Likewise.
5082 2014-02-12 Tom Tromey <tromey@redhat.com>
5084 * server.c (handle_query, handle_v_run): Use hex2bin, not
5086 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5088 2014-02-12 Tom Tromey <tromey@redhat.com>
5090 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5091 convert_int_to_ascii.
5092 * regcache.c (registers_to_string, collect_register_as_string):
5094 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5096 * server.c (process_serial_event): Likewise.
5097 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5098 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5100 2014-02-12 Tom Tromey <tromey@redhat.com>
5102 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5103 bin2hex, not hexify.
5104 * tracepoint.c (cmd_qtstatus): Likewise.
5106 2014-02-12 Tom Tromey <tromey@redhat.com>
5108 * remote-utils.c (monitor_output): Pass explicit length to
5111 2014-02-12 Tom Tromey <tromey@redhat.com>
5113 * tracepoint.c: Include rsp-low.h.
5114 * server.c: Include rsp-low.h.
5115 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5116 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5118 * remote-utils.c: Include rsp-low.h.
5119 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5120 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5121 (convert_int_to_ascii, convert_ascii_to_int): Move to
5123 * regcache.c: Include rsp-low.h.
5124 * ax.c: Include rsp-low.h.
5125 * Makefile.in (SFILES): Add common/rsp-low.c.
5126 (OBS): Add rsp-low.o.
5127 (rsp-low.o): New target.
5129 2014-02-12 Tom Tromey <tromey@redhat.com>
5131 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5132 Include print-utils.h.
5133 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5134 (plongest, thirty_two, phex_nz): Remove.
5135 * Makefile.in (SFILES): Add common/print-utils.c.
5136 (OBS): Add print-utils.o.
5137 (print-utils-ipa.o): New target.
5138 (print-utils.o): New target.
5139 (IPA_OBJS): Add print-utils-ipa.o.
5141 2014-02-06 Tom Tromey <tromey@redhat.com>
5143 * Makefile.in (SFILES): Fix indentation.
5145 2014-02-05 Doug Evans <dje@google.com>
5147 * linux-low.c (linux_wait_for_event): Improve comment.
5148 (linux_wait_1): Keep current_inferior in sync with event_child.
5150 2014-01-22 Doug Evans <dje@google.com>
5152 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5154 2014-01-22 Doug Evans <dje@google.com>
5156 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5157 * configure: Regenerate.
5158 * config.in: Regenerate.
5159 * Makefile.in (SFILES): Add debug.c.
5161 * debug.c: New file.
5162 * debug.h: New file.
5163 * linux-aarch64-low.c (*): Update all debugging printfs to use
5164 debug_printf instead of fprintf.
5165 * linux-arm-low.c (*): Ditto.
5166 * linux-cris-low.c (*): Ditto.
5167 * linux-crisv32-low.c (*): Ditto.
5168 * linux-m32r-low.c (*): Ditto.
5169 * linux-sparc-low.c (*): Ditto.
5170 * linux-x86.c (*): Ditto.
5171 * linux-low.c (*): Ditto.
5172 (linux_wait_1): Add calls to debug_enter, debug_exit.
5173 (linux_wait): Remove redundant debugging printf.
5174 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5175 (linux_resume, unstop_all_lwps): Ditto.
5176 * mem-break.c (*): Update all debugging printfs to use
5177 debug_printf instead of fprintf.
5178 * remote-utils.c (*): Ditto.
5179 * thread-db.c (*): Ditto.
5180 * server.c #include <ctype.h>, "gdb_vecs.h".
5181 (debug_threads): Moved to debug.c.
5182 (*): Update all debugging printfs to use debug_printf instead of
5184 (start_inferior): Replace call to fflush with call to debug_flush.
5185 (monitor_show_help): Mention set debug-format.
5186 (parse_debug_format_options): New function.
5187 (handle_monitor_command): Handle "monitor set debug-format".
5188 (gdbserver_usage): Mention --debug-format.
5189 (main): Parse --debug-format.
5190 * server.h (debug_threads): Declaration moved to debug.h.
5192 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5193 trace_debug_1 that uses debug_printf.
5194 (tracepoint_look_up_symbols): Update all debugging printfs to use
5195 debug_printf instead of fprintf.
5197 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5199 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5202 2014-01-17 Pedro Alves <palves@redhat.com>
5205 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5206 defined after including gdb_proc_service.h.
5208 2014-01-16 Doug Evans <dje@google.com>
5210 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5211 (match_dll): Use it.
5213 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5215 * target.h (target_ops) <read_btrace>: Change parameters and
5216 return type to allow error reporting.
5217 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5218 trace reading errors on.
5219 * linux-low.c (linux_low_read_btrace): Pass trace reading
5221 (linux_low_disable_btrace): New.
5223 2014-01-15 Doug Evans <dje@google.com>
5225 * inferiors.c (thread_id_to_gdb_id): Delete.
5226 * inferiors.h (thread_id_to_gdb_id): Delete.
5228 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5230 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5231 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5234 2014-01-08 Pedro Alves <palves@redhat.com>
5236 * server.c (handle_status): Don't discard previous queued stop
5237 replies or thread's pending status here.
5238 (main) <disconnection>: Do it here instead.
5240 2014-01-08 Pedro Alves <palves@redhat.com>
5242 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5243 * server.c (visit_actioned_threads, handle_pending_status): New
5245 (handle_v_cont): Factor out parts to ...
5246 (resume): ... this new function. If in all-stop, and a thread
5247 being resumed has a pending status, report it without actually
5249 (myresume): Adjust to use the new 'resume' function.
5250 (clear_pending_status_callback, set_pending_status_callback)
5251 (find_status_pending_thread_callback): New functions.
5252 (handle_status): Handle the case of multiple threads having
5253 interesting statuses to report. Report threads' real last signal
5254 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5255 with an interesting thread to report the status for, instead of
5256 always reporting the status of the first thread.
5258 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5260 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5261 * gdbreplay.c (gdbreplay_version): Likewise.
5263 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5265 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5266 iov.iov_len with the real length in use.
5268 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5270 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5271 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5272 for all targets that use win32-low.c.
5273 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5274 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5276 2013-12-13 Pedro Alves <palves@redhat.com>
5278 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5279 if equal to TARGET_WAITKIND_LOADED.
5280 * win32-low.c (cached_status): New static global.
5281 (win32_wait): Add declaration.
5282 (do_initial_child_stuff): Flush all initial pending debug events
5283 up to the initial breakpoint.
5284 (win32_wait): If CACHED_STATUS was set, return that instead
5285 of doing a real wait. Remove the code resuming the execution
5286 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5287 during the initial phase. Also remove the code changing
5288 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5289 TARGET_WAITKIND_STOPPED.
5291 2013-12-11 Yao Qi <yao@codesourcery.com>
5293 * notif.c (handle_notif_ack): Return 0 if no notification
5296 2013-11-20 Doug Evans <dje@google.com>
5298 * linux-low.c (linux_set_resume_request): Fix comment.
5300 2013-11-20 Doug Evans <dje@google.com>
5302 * linux-low.c (resume_status_pending_p): Tweak comment.
5304 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5306 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5307 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5308 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5309 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5310 (srv_amd64_regobj): Add amd64-mpx.o.
5311 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5312 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5313 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5314 * i387-fp.c (num_pl_bnd_register) Added constant.
5315 (num_pl_bnd_cfg_registers) Added constant.
5316 (struct i387_xsave) Added reserved area and MPX fields.
5317 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5318 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5320 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5321 (init_registers_amd64_mpx_linux): Declare new function.
5322 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5323 (x86_64_regmap): Add MPX registers.
5324 (x86_linux_read_description): Add MPX case.
5325 (initialize_low_arch): Initialize MPX targets.
5327 2013-11-18 Tom Tromey <tromey@redhat.com>
5329 * configure: Rebuild.
5330 * configure.ac: Don't check for stdlib.h.
5331 * gdbreplay.c: Unconditionally include stdlib.h.
5333 2013-11-18 Tom Tromey <tromey@redhat.com>
5335 * config.in: Rebuild.
5336 * configure: Rebuild.
5337 * configure.ac: Don't use AC_HEADER_DIRENT.
5339 2013-11-18 Tom Tromey <tromey@redhat.com>
5341 * server.h: Don't check HAVE_STRING_H.
5342 * gdbreplay.c: Don't check HAVE_STRING_H.
5343 * configure: Rebuild.
5345 2013-11-18 Tom Tromey <tromey@redhat.com>
5347 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5350 2013-11-08 Tom Tromey <tromey@redhat.com>
5352 * configure, config.in: Rebuild.
5353 * configure.ac: Remove unused configury.
5355 2013-11-08 Tom Tromey <tromey@redhat.com>
5357 * acinclude.m4: Include common.m4, codeset.m4.
5358 * configure, config.in: Rebuild.
5359 * configure.ac: Use GDB_AC_COMMON.
5361 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5363 * linux-s390-low.c (HWCAP_S390_TE): New define.
5364 (s390_arch_setup): Consider the TE field in the HWCAP for
5365 determining 'have_regset_tdb'.
5367 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5370 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5373 2013-10-02 Pedro Alves <palves@redhat.com>
5375 * server.c (process_serial_event): Don't output "GDBserver
5376 exiting" if GDB is connected through stdio.
5377 * target.c (mywait): Likewise, be silent if GDB is connected
5380 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5382 * lynx-low.c (lynx_add_threads_after_attach): New function.
5383 (lynx_attach): Remove call to add_thread. Add call to
5384 lynx_add_threads_after_attach instead.
5386 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5388 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5389 * config.in, configure: Regenerated.
5391 2013-09-18 Yao Qi <yao@codesourcery.com>
5394 * server.c (start_inferior): Clear 'resume_info'.
5396 2013-09-16 Jiong Wang <jiwang@tilera.com>
5398 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5401 2013-09-16 Jiong Wang <jiwang@tilera.com>
5403 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5404 linux-tile-low.o to srv_tgtobj.
5406 2013-09-16 Will Newton <will.newton@linaro.org>
5408 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5411 2013-09-06 Pedro Alves <palves@redhat.com>
5413 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5414 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5415 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5416 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5417 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5418 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5420 2013-09-06 Pedro Alves <palves@redhat.com>
5422 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5423 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5425 2013-09-06 Pedro Alves <palves@redhat.com>
5427 * linux-amd64-ipa.c: Include tracepoint.h.
5428 * linux-i386-ipa.c: Include tracepoint.h.
5430 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5432 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5433 (ps_get_thread_area): New function.
5435 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5437 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5438 (initialize_low_arch): Call init_registers_crisv32 rather than
5439 init_register_crisv32.
5441 2013-09-05 Pedro Alves <palves@redhat.com>
5443 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5445 * hostio.h: ... this new file.
5446 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5447 win32-low.c: Include hostio.h.
5449 2013-09-05 Pedro Alves <palves@redhat.com>
5451 * server.h (gdb_client_data, handler_func, callback_handler_func)
5452 (delete_file_handler, add_file_handler, append_callback_event)
5453 (delete_callback_event, start_event_loop, initialize_event_loop):
5454 Move to event-loop.h and include it.
5455 * event-loop.h: New file.
5457 2013-09-05 Pedro Alves <palves@redhat.com>
5459 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5460 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5461 (loaded_dll, unloaded_dll): Move to ...
5462 * dll.h: ... this new file.
5463 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5465 2013-09-05 Pedro Alves <palves@redhat.com>
5467 * server.h (current_process, get_thread_process, all_processes)
5468 (add_inferior_to_list, for_each_inferior, current_inferior)
5469 (remove_inferior, add_process, remove_process, find_process_pid)
5470 (have_started_inferiors_p, have_attached_inferiors_p)
5471 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5472 (clear_inferiors, find_inferior, find_inferior_id)
5473 (inferior_target_data, set_inferior_target_data)
5474 (inferior_regcache_data, set_inferior_regcache_data): Move to
5475 inferiors.h, and include it.
5476 * inferiors.h: New file.
5478 2013-09-05 Pedro Alves <palves@redhat.com>
5480 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5484 2013-09-05 Pedro Alves <palves@redhat.com>
5486 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5488 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5489 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5490 (handle_tracepoint_general_set, handle_tracepoint_query)
5491 (tracepoint_finished_step, tracepoint_was_hit)
5492 (release_while_stepping_state_list, current_traceframe)
5493 (in_readonly_region, traceframe_read_mem)
5494 (fetch_traceframe_registers, traceframe_read_sdata)
5495 (traceframe_read_info, struct fast_tpoint_collect_status)
5496 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5497 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5498 (supply_fast_tracepoint_registers)
5499 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5500 (ipa_tdesc, claim_trampoline_space)
5501 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5502 (agent_mem_read, agent_get_trace_state_variable_value)
5503 (agent_set_trace_state_variable_value, agent_tsv_read)
5504 (agent_mem_read_string, get_raw_reg_func_addr)
5505 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5506 * tracepoint.h: ... this new file.
5508 2013-09-05 Pedro Alves <palves@redhat.com>
5510 * server.h (perror_with_name, error, fatal, warning, paddress)
5511 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5513 * utils.h: New file.
5515 2013-09-05 Pedro Alves <palves@redhat.com>
5517 * server.h (remote_debug, noack_mode, transport_is_reliable)
5518 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5519 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5520 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5521 (write_enn, initialize_async_io, enable_async_io)
5522 (disable_async_io, check_remote_input_interrupt_request)
5523 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5524 (dead_thread_notify, prepare_resume_reply)
5525 (decode_address_to_semicolon, decode_address, decode_m_packet)
5526 (decode_M_packet, decode_X_packet, decode_xfer_write)
5527 (decode_search_memory_packet, unhexify, hexify)
5528 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5529 (look_up_one_symbol, relocate_instruction)
5530 (monitor_output): Move to remote-utils.h, and include it.
5531 * remote-utils.h: New file.
5533 2013-09-05 Pedro Alves <palves@redhat.com>
5535 * server.h (_): Delete.
5537 2013-09-02 Pedro Alves <palves@redhat.com>
5539 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5540 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5542 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5544 2013-09-02 Pierre Muller <muller@sourceware.org>
5546 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5547 or WriteProcessMemory complete successfully and handle
5548 ERROR_PARTIAL_COPY error.
5550 2013-09-02 Pedro Alves <palves@redhat.com>
5552 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5553 error instead of EIO.
5555 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5558 * linux-low.c: Include filestuff.h.
5559 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5560 * lynx-low.c: Include filestuff.h.
5561 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5562 * server.c: Include filestuff.h.
5563 (main): Call notice_open_fds.
5564 * spu-low.c: Include filestuff.h.
5565 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5567 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5569 * Makefile.in: Explain why ../target and ../nat are not
5570 listed as include file search paths.
5571 (linux-waitpid.o): New object file rule.
5572 * configure.srv (srv_native_linux_obj): New variable.
5573 Replace all occurrences of linux native object files with
5574 $srv_native_linux_obj.
5575 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5576 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5577 (linux_enable_event_reporting): Remove declaration.
5578 (my_waitpid): Moved to common/linux-waitpid.c.
5579 (linux_wait_for_event): Pass ptid when calling
5580 linux_enable_event_reporting.
5581 (linux_supports_tracefork_flag): Remove.
5582 (linux_enable_event_reporting): Likewise.
5583 (linux_tracefork_grandchild): Remove.
5584 (STACK_SIZE): Moved to common/linux-ptrace.c.
5585 (linux_tracefork_child): Remove.
5586 (linux_test_for_tracefork): Remove.
5587 (linux_look_up_symbols): Call linux_supports_traceclone.
5588 (initialize_low): Remove call to linux_test_for_tracefork.
5589 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5590 common/linux-ptrace.h.
5591 (PTRACE_TYPE_ARG4): Likewise.
5592 Include linux-ptrace.h.
5594 2013-08-21 Pedro Alves <palves@redhat.com>
5596 * config.in: Renegerate.
5598 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5600 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5601 (SFILES): Remove $(srcdir)/common/target-common.c and
5602 add $(srcdir)/target/waitstatus.c.
5603 (OBS): Remove target-common.o and add waitstatus.o.
5604 (server_h): Remove $(srcdir)/../common/target-common.h and
5605 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5606 and $(srcdir)/../target/waitstatus.h.
5607 (target-common.o): Remove.
5608 (waitstatus.o): New target object file.
5609 * target.h: Do not include target-common.h and
5610 include target/resume.h, target/wait.h and
5611 target/waitstatus.h.
5613 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5615 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5616 to PTRACE_TYPE_ARG3.
5617 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5618 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5620 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5621 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5623 2013-07-27 Jie Zhang <jie@codesourcery.com>
5624 Daniel Jacobowitz <dan@codesourcery.com>
5625 Yao Qi <yao@codesourcery.com>
5627 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5628 (mips-linux-watch.o): New rule.
5629 (mips_linux_watch_h): New variable.
5630 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5632 * linux-mips-low.c: Include mips-linux-watch.h.
5633 (struct arch_process_info, struct arch_lwp_info): New.
5634 (update_watch_registers_callback): New function.
5635 (mips_linux_new_process, mips_linux_new_thread) New functions.
5636 (mips_linux_prepare_to_resume, mips_insert_point): New
5638 (mips_remove_point, mips_stopped_by_watchpoint): New
5640 (rsp_bp_type_to_target_hw_bp_type): New function.
5641 (mips_stopped_data_address): New function.
5642 (the_low_target): Add watchpoint support functions.
5644 2013-07-27 Yao Qi <yao@codesourcery.com>
5646 * i386-low.c: Include break-common.h.
5647 (enum target_hw_bp_type): Remove.
5649 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5651 * Makefile.in (SFILES): /common/target-common.c.
5652 (OBS): Add target-common.o.
5653 (server_h): Add $(srcdir)/../common/target-common.h.
5654 (target-common.o): New target.
5655 * server.c (queue_stop_reply_callback): Free
5656 status string after use.
5657 * target.c (target_waitstatus_to_string): Remove.
5658 * target.h: Include target-common.h.
5659 (resume_kind): Likewise.
5660 (target_waitkind): Likewise.
5661 (target_waitstatus): Likewise.
5662 (TARGET_WNOHANG): Likewise.
5664 2013-07-04 Yao Qi <yao@codesourcery.com>
5666 * Makefile.in (host_alias): Use @host_noncanonical@.
5667 (target_alias): Use @target_noncanonical@.
5668 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5669 ACX_NONCANONICAL_HOST.
5670 * configure: Regenerated.
5673 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5675 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5676 * configure: Rebuild.
5677 * Makefile.in (version_host, version_target): Get from configure.
5678 (version.c): Use $(version_host) and $(version_target).
5680 2013-07-03 Pedro Alves <palves@redhat.com>
5682 * Makefile.in (config.status): Depend on development.sh.
5683 * acinclude.m4: Include libmcheck.m4.
5684 * configure: Regenerate.
5686 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5688 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5689 attribute inside the parentheses.
5690 (winapi_DebugSetProcessKillOnExit): Ditto.
5691 (winapi_DebugBreakProcess): Ditto.
5692 (winapi_GenerateConsoleCtrlEvent): Ditto.
5694 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5696 * notif.h (notif_event): Add a dummy member to avoid compiler
5699 2013-07-01 Pedro Alves <palves@redhat.com>
5701 * hostio.c (HOSTIO_PATH_MAX): Define.
5702 (require_filename, handle_open, handle_unlink, handle_readlink):
5705 2013-07-01 Pedro Alves <palves@redhat.com>
5707 * server.h: Include "pathmax.h".
5708 * linux-low.c: Don't include sys/param.h.
5709 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5711 * win32-low.c: Don't include sys/param.h.
5712 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5714 2013-07-01 Pedro Alves <palves@redhat.com>
5716 * event-loop.c: Don't check HAVE_UNISTD_H before including
5718 * gdbreplay.c: Likewise.
5719 * remote-utils.c: Likewise.
5720 * server.c: Likewise.
5721 * configure.ac: Don't check for unistd.h.
5722 * configure: Regenerate.
5724 2013-06-28 Tom Tromey <tromey@redhat.com>
5726 * Makefile.in (version.c): Use version.in, not
5729 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5731 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5732 * configure: Rebuild.
5733 * Makefile.in (version_host, version_target): Get from configure.
5734 (version.c): Use $(version_host) and $(version_target).
5736 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5738 Fix trace-status to output user name without trailing colon.
5739 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5741 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5743 Fix trace-status to output proper start-time and stop-time.
5744 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5745 output start time and stop time in hex as gdb expects.
5747 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5749 * tracepoint.c (build_traceframe_info_xml): Output trace state
5750 variables present in the trace buffer.
5752 2013-06-24 Tom Tromey <tromey@redhat.com>
5754 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5756 (version.o): Remove.
5757 * gdbreplay.c: Include version.h.
5758 (version, host_name): Don't declare.
5759 * server.h: Include version.h.
5760 (version, host_name): Don't declare.
5762 2013-06-12 Pedro Alves <palves@redhat.com>
5764 * linux-x86-low.c (linux_is_elf64): Delete global.
5765 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5766 with local linux_pid_exe_is_elf_64_file use.
5768 2013-06-11 Pedro Alves <palves@redhat.com>
5770 * linux-low.c (regset_disabled, disable_regset): New functions.
5771 (regsets_fetch_inferior_registers)
5772 (regsets_store_inferior_registers): Use them.
5773 (initialize_regsets_info); Don't allocate the disabled_regsets
5775 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5778 2013-06-11 Pedro Alves <palves@redhat.com>
5780 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5783 2013-06-11 Pedro Alves <palves@redhat.com>
5785 * linux-x86-low.c (initialize_low_arch): Call
5786 init_registers_x32_avx_linux.
5788 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5790 Fix compatibility with Android Bionic.
5791 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5794 2013-06-07 Pedro Alves <palves@redhat.com>
5797 * Makefile.in (OBS): Add tdesc.o.
5798 (IPA_OBJS): Add tdesc-ipa.o.
5799 (tdesc-ipa.o): New rule.
5800 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5802 * linux-low.c (new_inferior): Delete.
5803 (disabled_regsets, num_regsets): Delete.
5804 (linux_add_process): Adjust to set the new per-process
5806 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5807 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5808 was a stop. When calling arch_setup, switch the current inferior
5809 to the thread that got an event.
5810 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5811 (regsets_fetch_inferior_registers)
5812 (regsets_store_inferior_registers): New regsets_info parameter.
5814 (linux_register_in_regsets): New regs_info parameter. Adjust to
5816 (register_addr, fetch_register, store_register): New usrregs_info
5817 parameter. Adjust to use it.
5818 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5819 parameter regs_info. Adjust to use it.
5820 (linux_fetch_registers): Get the current inferior's regs_info, and
5822 (linux_store_registers): Ditto.
5823 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5824 (initialize_low): Don't initialize the target_regsets here. Call
5825 initialize_low_arch.
5826 * linux-low.h (target_regsets): Delete declaration.
5827 (struct regsets_info): New.
5828 (struct usrregs_info): New.
5829 (struct regs_info): New.
5830 (struct process_info_private) <new_inferior>: New field.
5831 (struct linux_target_ops): Delete the num_regs, regmap, and
5832 regset_bitmap fields. New field regs_info.
5833 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5834 * i387-fp.c (num_xmm_registers): Delete.
5835 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5836 calls to new interface.
5837 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5838 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5839 Infer the number of xmm registers from the regcache's target
5841 * i387-fp.h (num_xmm_registers): Delete.
5842 * inferiors.c (add_thread): Don't install the thread's regcache
5844 * proc-service.c (gregset_info): Fetch the current inferior's
5845 regs_info. Adjust to use it.
5846 * regcache.c: Include tdesc.h.
5847 (register_bytes, reg_defs, num_registers)
5848 (gdbserver_expedite_regs): Delete.
5849 (get_thread_regcache): If the thread doesn't have a regcache yet,
5850 create one, instead of aborting gdbserver.
5851 (regcache_invalidate_one): Rename to ...
5852 (regcache_invalidate_thread): ... this.
5853 (regcache_invalidate_one): New.
5854 (regcache_invalidate): Only invalidate registers of the current
5856 (init_register_cache): Add target_desc parameter, and use it.
5857 (new_register_cache): Ditto. Assert the target description has a
5858 non zero registers_size.
5859 (regcache_cpy): Add assertions. Adjust.
5860 (realloc_register_cache, set_register_cache): Delete.
5861 (registers_to_string, registers_from_string): Adjust.
5862 (find_register_by_name, find_regno, find_register_by_number)
5863 (register_cache_size): Add target_desc parameter, and use it.
5864 (free_register_cache_thread, free_register_cache_thread_one)
5865 (regcache_release, register_cache_size): New.
5866 (register_size): Add target_desc parameter, and use it.
5867 (register_data, supply_register, supply_register_zeroed)
5868 (supply_regblock, supply_register_by_name, collect_register)
5869 (collect_register_as_string, collect_register_by_name): Adjust.
5870 * regcache.h (struct target_desc): Forward declare.
5871 (struct regcache) <tdesc>: New field.
5872 (init_register_cache, new_register_cache): Add target_desc
5874 (regcache_invalidate_thread): Declare.
5875 (regcache_invalidate_one): Delete declaration.
5876 (regcache_release): Declare.
5877 (find_register_by_number, register_cache_size, register_size)
5878 (find_regno): Add target_desc parameter.
5879 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5881 * remote-utils.c: Include tdesc.h.
5882 (outreg, prepare_resume_reply): Adjust.
5883 * server.c: Include tdesc.h.
5884 (gdbserver_xmltarget): Delete declaration.
5885 (get_features_xml, process_serial_event): Adjust.
5886 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5888 (struct process_info) <tdesc>: New field.
5889 (ipa_tdesc): Declare.
5890 * tdesc.c: New file.
5891 * tdesc.h: New file.
5892 * tracepoint.c: Include tdesc.h.
5893 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5894 (get_context_regcache): Adjust to pass ipa_tdesc down.
5895 (do_action_at_tracepoint): Adjust to get the register cache size
5896 from the context regcache's description.
5897 (traceframe_walk_blocks): Adjust to get the register cache size
5898 from the current trace frame's description.
5899 (traceframe_get_pc): Adjust to get current trace frame's
5900 description and pass it down.
5901 (gdb_collect): Adjust to get the register cache size from the
5903 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5904 (gdbserver_xmltarget): Delete.
5905 (initialize_low_tracepoint): Set the ipa's target description.
5906 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5907 (initialize_low_tracepoint): Set the ipa's target description.
5908 * linux-x86-low.c: Include tdesc.h.
5909 [__x86_64__] (is_64bit_tdesc): New.
5910 (ps_get_thread_area, x86_get_thread_area): Use it.
5911 (i386_cannot_store_register): Rename to ...
5912 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5913 (i386_cannot_fetch_register): Rename to ...
5914 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5915 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5917 (target_regsets): Rename to ...
5918 (x86_regsets): ... this.
5919 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5921 (x86_siginfo_fixup): Use is_64bit_tdesc.
5922 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5923 (tdesc_x32_avx_linux, tdesc_x32_linux)
5924 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5926 (x86_linux_update_xmltarget): Delete.
5927 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5928 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5929 (AMD64_LINUX_USER64_CS): New.
5930 (x86_linux_read_description): New, based on
5931 x86_linux_update_xmltarget.
5932 (same_process_callback): New.
5933 (x86_arch_setup_process_callback): New.
5934 (x86_linux_update_xmltarget): New.
5935 (x86_regsets_info): New.
5936 (amd64_linux_regs_info): New.
5937 (i386_linux_usrregs_info): New.
5938 (i386_linux_regs_info): New.
5939 (x86_linux_regs_info): New.
5940 (x86_arch_setup): Reimplement.
5941 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5942 (x86_emit_ops): Ditto.
5943 (the_low_target): Adjust. Install x86_linux_regs_info,
5944 x86_cannot_fetch_register, and x86_cannot_store_register.
5945 (initialize_low_arch): New.
5946 * linux-ia64-low.c (tdesc_ia64): Declare.
5947 (ia64_fetch_register): Adjust.
5948 (ia64_usrregs_info, regs_info): New globals.
5949 (ia64_regs_info): New function.
5950 (the_low_target): Adjust.
5951 (initialize_low_arch): New function.
5952 * linux-sparc-low.c (tdesc_sparc64): Declare.
5953 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5955 (sparc_arch_setup): New function.
5956 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5957 (the_low_target): Adjust.
5958 (initialize_low_arch): New function.
5959 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5960 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5961 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5962 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5963 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5964 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5965 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5966 (tdesc_powerpc_isa205_vsx64l): Declare.
5967 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5968 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5969 (ppc_set_pc, ppc_get_hwcap): Adjust.
5970 (ppc_usrregs_info): Forward declare.
5971 (!__powerpc64__) ppc_regmap_adjusted: New global.
5972 (ppc_arch_setup): Adjust to the current process'es target
5974 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5975 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5976 (ppc_store_evrregset): Adjust.
5977 (target_regsets): Rename to ...
5978 (ppc_regsets): ... this, and make static.
5979 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5980 (ppc_regs_info): New function.
5981 (the_low_target): Adjust.
5982 (initialize_low_arch): New function.
5983 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5984 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5985 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5986 (tdesc_s390x_linux64v2): Declare.
5987 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5988 (s390_fill_gregset, s390_store_last_break): Adjust.
5989 (target_regsets): Rename to ...
5990 (s390_regsets): ... this, and make static.
5991 (s390_get_pc, s390_set_pc): Adjust.
5992 (s390_get_hwcap): New target_desc parameter, and use it.
5993 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5994 (s390_arch_setup): Adjust to set the current process'es target
5995 description. Don't adjust the regmap.
5996 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5997 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5998 (regs_info_3264): New globals.
5999 (s390_regs_info): New function.
6000 (the_low_target): Adjust.
6001 (initialize_low_arch): New function.
6002 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6003 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6004 [__mips64] (init_registers_mips_linux)
6005 (init_registers_mips_dsp_linux): Delete defines.
6006 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6007 (have_dsp): New global.
6008 (mips_read_description): New, based on mips_arch_setup.
6009 (mips_arch_setup): Reimplement.
6010 (get_usrregs_info): New function.
6011 (mips_cannot_fetch_register, mips_cannot_store_register)
6012 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6013 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6014 (target_regsets): Rename to ...
6015 (mips_regsets): ... this, and make static.
6016 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6017 (dsp_regs_info, regs_info): New globals.
6018 (mips_regs_info): New function.
6019 (the_low_target): Adjust.
6020 (initialize_low_arch): New function.
6021 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6022 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6024 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6025 (arm_read_description): New, with bits factored from
6027 (arm_arch_setup): Reimplement.
6028 (target_regsets): Rename to ...
6029 (arm_regsets): ... this, and make static.
6030 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6031 (arm_regs_info): New function.
6032 (the_low_target): Adjust.
6033 (initialize_low_arch): New function.
6034 * linux-m68k-low.c (tdesc_m68k): Declare.
6035 (target_regsets): Rename to ...
6036 (m68k_regsets): ... this, and make static.
6037 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6038 (m68k_regs_info): New function.
6039 (m68k_arch_setup): New function.
6040 (the_low_target): Adjust.
6041 (initialize_low_arch): New function.
6042 * linux-sh-low.c (tdesc_sharch): Declare.
6043 (target_regsets): Rename to ...
6044 (sh_regsets): ... this, and make static.
6045 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6046 (sh_regs_info, sh_arch_setup): New functions.
6047 (the_low_target): Adjust.
6048 (initialize_low_arch): New function.
6049 * linux-bfin-low.c (tdesc_bfin): Declare.
6050 (bfin_arch_setup): New function.
6051 (bfin_usrregs_info, regs_info): New globals.
6052 (bfin_regs_info): New function.
6053 (the_low_target): Adjust.
6054 (initialize_low_arch): New function.
6055 * linux-cris-low.c (tdesc_cris): Declare.
6056 (cris_arch_setup): New function.
6057 (cris_usrregs_info, regs_info): New globals.
6058 (cris_regs_info): New function.
6059 (the_low_target): Adjust.
6060 (initialize_low_arch): New function.
6061 * linux-cris-low.c (tdesc_crisv32): Declare.
6062 (cris_arch_setup): New function.
6063 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6064 (cris_regs_info): New function.
6065 (the_low_target): Adjust.
6066 (initialize_low_arch): New function.
6067 * linux-m32r-low.c (tdesc_m32r): Declare.
6068 (m32r_arch_setup): New function.
6069 (m32r_usrregs_info, regs_info): New globals.
6070 (m32r_regs_info): Adjust.
6071 (initialize_low_arch): New function.
6072 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6073 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6074 (tic6x_usrregs_info): Forward declare.
6075 (tic6x_read_description): New function, based on ...
6076 (tic6x_arch_setup): ... this. Reimplement.
6077 (target_regsets): Rename to ...
6078 (tic6x_regsets): ... this, and make static.
6079 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6080 (tic6x_regs_info): New function.
6081 (the_low_target): Adjust.
6082 (initialize_low_arch): New function.
6083 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6084 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6085 (target_regsets): Rename to ...
6086 (xtensa_regsets): ... this, and make static.
6087 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6089 (xtensa_arch_setup, xtensa_regs_info): New functions.
6090 (the_low_target): Adjust.
6091 (initialize_low_arch): New function.
6092 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6093 (nios2_arch_setup): Set the current process'es tdesc.
6094 (target_regsets): Rename to ...
6095 (nios2_regsets): ... this.
6096 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6097 (nios2_regs_info): New function.
6098 (the_low_target): Adjust.
6099 (initialize_low_arch): New function.
6100 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6101 (aarch64_arch_setup): Set the current process'es tdesc.
6102 (target_regsets): Rename to ...
6103 (aarch64_regsets): ... this.
6104 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6105 (aarch64_regs_info): New function.
6106 (the_low_target): Adjust.
6107 (initialize_low_arch): New function.
6108 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6110 (target_regsets): Rename to ...
6111 (tile_regsets): ... this.
6112 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6113 (tile_regs_info): New function.
6114 (tile_arch_setup): Set the current process'es tdesc.
6115 (the_low_target): Adjust.
6116 (initialize_low_arch): New function.
6117 * spu-low.c (tdesc_spu): Declare.
6118 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6119 * win32-arm-low.c (tdesc_arm): Declare.
6120 (arm_arch_setup): New function.
6121 (the_low_target): Install arm_arch_setup instead of
6123 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6124 (init_windows_x86): Rename to ...
6125 (i386_arch_setup): ... this. Set `win32_tdesc'.
6126 (the_low_target): Adjust.
6127 * win32-low.c (win32_tdesc): New global.
6128 (child_add_thread): Don't create the thread cache here.
6129 (do_initial_child_stuff): Set the new process'es tdesc.
6130 * win32-low.h (struct target_desc): Forward declare.
6131 (win32_tdesc): Declare.
6132 * lynx-i386-low.c (tdesc_i386): Declare global.
6133 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6134 * lynx-low.c (lynx_tdesc): New global.
6135 (lynx_add_process): Set the new process'es tdesc.
6136 * lynx-low.h (struct target_desc): Forward declare.
6137 (lynx_tdesc): Declare global.
6138 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6139 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6140 * nto-low.c (nto_tdesc): New global.
6141 (do_attach): Set the new process'es tdesc.
6142 * nto-low.h (struct target_desc): Forward declare.
6143 (nto_tdesc): Declare.
6144 * nto-x86-low.c (tdesc_i386): Declare.
6145 (nto_x86_arch_setup): Set `nto_tdesc'.
6147 2013-06-04 Gary Benson <gbenson@redhat.com>
6149 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6150 to qSupported response when appropriate.
6151 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6152 with nonzero-length annex.
6153 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6154 arguments supplied in annex.
6156 2013-05-31 Doug Evans <dje@google.com>
6159 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6160 64 bits in 64-cross-32 environment.
6162 2013-05-28 Pedro Alves <palves@redhat.com>
6164 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6165 (aarch64-without-fpu.c): Delete rule.
6166 * configure.srv (aarch64*-*-linux*): Remove references to
6167 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6168 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6171 2013-05-24 Pedro Alves <palves@redhat.com>
6173 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6174 instead of strchr/decode_address. Error if the range isn't split
6175 with a ','. Don't assume there's be a ':' in the action.
6177 2013-05-23 Yao Qi <yao@codesourcery.com>
6178 Pedro Alves <palves@redhat.com>
6180 * linux-low.c (lwp_in_step_range): New function.
6181 (linux_wait_1): If the thread was range stepping and stopped
6182 outside the stepping range, report the stop to GDB. Otherwise,
6183 continue stepping. Add range stepping debug output.
6184 (linux_set_resume_request): Copy the step range from the resume
6186 (linux_supports_range_stepping): New.
6187 (linux_target_ops) <supports_range_stepping>: Set to
6188 linux_supports_range_stepping.
6189 * linux-low.h (struct linux_target_ops)
6190 <supports_range_stepping>: New field.
6191 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6192 * linux-x86-low.c (x86_supports_range_stepping): New.
6193 (the_low_target) <supports_range_stepping>: Set to
6194 x86_supports_range_stepping.
6195 * server.c (handle_v_cont): Handle 'r' action.
6196 (handle_v_requests): Append ";r" if the target supports range
6198 * target.h (struct thread_resume) <step_range_start,
6199 step_range_end>: New fields.
6200 (struct target_ops) <supports_range_stepping>:
6202 (target_supports_range_stepping): New macro.
6204 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6206 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6207 confusion in comment.
6209 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6211 * lynx-low.c (struct process_info_private): New type.
6212 (lynx_add_process): New function.
6213 (lynx_create_inferior, lynx_attach): Replace calls to
6214 add_process by calls to lynx_add_process.
6215 (lynx_resume): If PTID is null, then try using
6216 current_process()->private->last_wait_event_ptid.
6218 (lynx_clear_inferiors): Delete. The contents of that function
6219 has been inlined in lynx_mourn;
6220 (lynx_wait_1): Save the ptid in the process's private data.
6221 (lynx_mourn): Free the process' private data. Replace call
6222 to lynx_clear_inferiors by call to clear_inferiors.
6224 2013-05-17 Yao Qi <yao@codesourcery.com>
6226 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6229 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6231 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6232 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6233 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6234 PT_TEXT_END_ADDR guards. Update comments.
6235 (linux_target_op) <read_offsets>: Conditionally define to
6236 linux_read_offsets if the target is UCLIBC and if it defines
6237 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6239 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6240 Andrew Jenner <andrew@codesourcery.com>
6242 * Makefile.in (SFILES): Add linux-nios2-low.c.
6243 (clean): Add action to delete nios2-linux.c.
6244 (nios2-linux.c): New rule.
6245 * configure.srv: Add nios2*-*-linux*.
6246 * linux-nios2-low.c: New.
6248 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6250 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6252 2013-04-25 Hui Zhu <hui@codesourcery.com>
6255 * ax.c (ax_printf): Add fflush.
6257 2013-04-22 Tom Tromey <tromey@redhat.com>
6259 * Makefile.in (SFILES): Add filestuff.c.
6260 (OBS): Add filestuff.o.
6261 (filestuff.o): New target.
6262 * config.in, configure: Rebuild.
6263 * configure.ac: Check for fdwalk, pipe2.
6265 2013-04-17 Pedro Alves <palves@redhat.com>
6267 * configure.ac (USE_THREAD_DB): Delete variable.
6268 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6269 Don't AC_SUBST USE_THREAD_DB.
6270 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6271 * config.in, configure: Regenerate.
6273 2013-04-16 Pedro Alves <palves@redhat.com>
6275 * linux-low.h (struct lwp_info) <thread_known>: Move under
6276 the USE_THREAD_DB #ifdef.
6278 2013-04-16 Pedro Alves <palves@redhat.com>
6280 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6281 (linux-low.o): Delete rule.
6282 * linux-low.h: Always include "gdb_thread_db.h" instead of
6283 conditionally including thread_db.h.
6284 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6287 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6289 * Makefile.in (install-only): Fix make install regression.
6291 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6293 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6294 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6296 * gdbserver.1: Remove.
6298 2013-03-22 Pedro Alves <palves@redhat.com>
6300 * linux-low.c (handle_extended_wait): Don't call
6301 linux_enable_event_reporting.
6303 2013-03-15 Tony Theodore <tonyt@logyst.com>
6306 * Makefile.in (SHELL): Use @SHELL@.
6308 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6310 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6313 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6315 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6316 Remove extraneous NULL element.
6318 2013-03-13 Yao Qi <yao@codesourcery.com>
6320 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6321 'V' block in trace frame.
6323 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6325 * target.h (struct target_ops): Add btrace ops.
6326 (target_supports_btrace): New macro.
6327 (target_enable_btrace): New macro.
6328 (target_disable_btrace): New macro.
6329 (target_read_btrace): New macro.
6330 * gdbthread.h (struct thread_info): Add btrace field.
6331 * server.c: Include btrace-common.h.
6332 (handle_btrace_general_set): New function.
6333 (handle_btrace_enable): New function.
6334 (handle_btrace_disable): New function.
6335 (handle_general_set): Call handle_btrace_general_set.
6336 (handle_qxfer_btrace): New function.
6337 (struct qxfer qxfer_packets[]): Add btrace entry.
6338 * inferiors.c (remove_thread): Disable btrace.
6339 * linux-low: Include linux-btrace.h.
6340 (linux_low_enable_btrace): New function.
6341 (linux_low_read_btrace): New function.
6342 (linux_target_ops): Add btrace ops.
6343 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6344 Add srv_linux_btrace=yes.
6345 (x86_64-*-linux*): Add linux-btrace.o.
6346 Add srv_linux_btrace=yes.
6347 * configure.ac: Define HAVE_LINUX_BTRACE.
6348 * config.in: Regenerated.
6349 * configure: Regenerated.
6351 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6353 * server.c (handle_qxfer): Preserve error message if -3 is
6355 (qxfer): Document the -3 return value.
6357 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6359 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6360 (linux_btrace_h): New variable.
6361 (linux-btrace.o): New rule.
6363 2013-03-08 Stan Shebs <stan@codesourcery.com>
6364 Hafiz Abid Qadeer <abidh@codesourcery.com>
6366 * tracepoint.c (trace_buffer_size): New global.
6367 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6368 (init_trace_buffer): Change to one-argument function. Allocate
6369 trace buffer memory.
6370 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6371 handle QTBuffer:size packet.
6372 (cmd_bigqtbuffer_size): New function.
6373 (initialize_tracepoint): Call init_trace_buffer with
6374 DEFAULT_TRACE_BUFFER_SIZE.
6375 * server.c (handle_query): Add QTBuffer:size in the
6378 2013-03-07 Yao Qi <yao@codesourcery.com>
6380 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6381 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6383 (cmd_qtsp): Adjust condition. Do post increment.
6384 Set cur_action and cur_step_action back to 0.
6386 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6389 * linux-low.c (linux_write_memory): Return early success if LEN is
6392 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6394 * configure.srv: Add x86_64-*-cygwin* as target.
6396 2013-02-28 Tom Tromey <tromey@redhat.com>
6398 * configure.ac: Invoke AC_SYS_LARGEFILE.
6399 * configure, config.in: Rebuild.
6401 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6403 * win32-low.c: Throughout, fix format strings and casts of
6404 printf-like functions to avoid type related warnings on all
6406 (get_child_debug_event): Print dwDebugEventCode as hex since
6407 that's how it's usually documented.
6409 2013-02-28 Yao Qi <yao@codesourcery.com>
6411 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6414 2013-02-27 Jiong Wang <jiwang@tilera.com>
6416 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6417 (reg-tilegx32.c): New rule.
6418 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6419 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6420 different register info initializer according to elf class.
6421 (init_registers_tilgx32): New function. The tilegx32 register info
6423 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6424 (tile_store_gregset): Likewise.
6426 2013-02-27 Yao Qi <yao@codesourcery.com>
6428 * server.c (process_point_options): Print debug message when
6429 debug_threads is true.
6431 2013-02-26 Yao Qi <yao@codesourcery.com>
6433 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6435 2013-02-19 Pedro Alves <palves@redhat.com>
6436 Kai Tietz <ktietz@redhat.com>
6440 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6441 instead of strtoul to extract address from packet.
6442 (process_serial_event) <'z'>: Likewise.
6444 2013-02-18 Yao Qi <yao@codesourcery.com>
6446 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6448 2013-02-14 Pedro Alves <palves@redhat.com>
6452 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6453 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6455 2013-02-14 Pedro Alves <palves@redhat.com>
6457 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6459 2013-02-14 Pedro Alves <palves@redhat.com>
6461 * tracepoint.c (save_string): Delete.
6462 (add_tracepoint_action): Use savestring instead of save_string.
6464 2013-02-12 Pedro Alves <palves@redhat.com>
6466 * linux-xtensa-low.c: Ditto.
6467 * xtensa-xtregs.c: Ditto.
6469 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6471 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6474 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6476 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6477 aarch64_num_wp_regs and aarch64_num_bp_regs to
6478 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6480 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6482 * linux-aarch64-low.c (ps_get_thread_area): Replace
6483 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6485 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6486 Marcus Shawcroft <marcus.shawcroft@arm.com>
6487 Nigel Stephens <nigel.stephens@arm.com>
6488 Yufeng Zhang <yufeng.zhang@arm.com>
6490 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6491 (aarch64.c, aarch64-without-fpu.c): New targets.
6492 * configure.srv (aarch64*-*-linux*): New.
6493 * linux-aarch64-low.c: New file.
6495 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6497 * linux-low.c (handle_extended_wait, linux_create_inferior)
6498 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6499 (dequeue_one_deferred_signal, linux_resume_one_thread)
6500 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6501 (linux_tracefork_grandchild, linux_test_for_tracefork)
6502 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6503 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6504 where the argument is 0.
6506 2013-01-25 Yao Qi <yao@codesourcery.com>
6508 * event-loop.c: Include "queue.h".
6509 (gdb_event_p): New typedef.
6510 (struct gdb_event) <next_event>: Remove.
6511 (event_queue): Change to QUEUE(gdb_event_p).
6512 (async_queue_event): Remove.
6513 (gdb_event_xfree): New.
6514 (initialize_event_loop): New.
6515 (process_event): Use API from QUEUE.
6516 (wait_for_event): Likewise.
6517 * server.c (main): Call initialize_event_loop.
6518 * server.h (initialize_event_loop): Declare.
6520 2013-01-18 Yao Qi <yao@codesourcery.com>
6522 * ax.h (struct eval_agent_expr_context): New.
6523 (gdb_eval_agent_expr): Update declaration.
6524 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6525 TFRAME. Add new argument CTX.
6526 * server.h (struct eval_agent_expr_context): Declare.
6527 (agent_mem_read, agent_tsv_read): Update declaration.
6528 (agent_mem_read_string): Likewise.
6529 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6530 (add_traceframe_block): Add new argument TPOINT.
6531 Increase TPOINT->traceframe_usage.
6532 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6533 eval_tracepoint_agent_expr.
6534 (condition_true_at_tracepoint): Likewise.
6535 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6536 (agent_mem_read_string, agent_tsv_read): Likewise.
6538 2013-01-16 Yao Qi <yao@codesourcery.com>
6540 * linux-low.c (linux_resume_one_lwp): Don't check
6541 'lwp->bp_reinsert != 0'.
6543 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6544 Pedro Alves <palves@redhat.com>
6546 * lynx-low.c (ptrace_request_to_str): Define a temporary
6547 macro and use it to simplify this function's implementation.
6549 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6551 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6554 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6556 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6558 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6560 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6562 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6564 * lynx-low.c (lynx_resume): Use the resume_info parameter
6565 to determine the ptid for the lynx_ptrace call, unless
6566 it is equal to minus_one_ptid, in which case we use the
6567 ptid of the current_inferior.
6568 (lynx_wait_1): After having received a thread create/exit
6569 event, resume the inferior's execution using the signaling
6570 thread's ptid, rather than the old ptid.
6572 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6574 * lynx-low.c (lynx_resume): Delete variable ret.
6576 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6578 * gdbreplay.c (gdbreplay_version): Update copyright year.
6579 * server.c (gdbserver_version): Likewise.
6581 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6583 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6586 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6588 * lynx-low.c (ptrace_request_to_str): Add handling for
6591 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6593 * lynx-low.c (lynx_attach): Delete variable new_process.
6595 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6597 * lynx-low.c (lynx_create_inferior): Delete variable
6600 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6602 * lynx-low.c (ptrace_request_to_str): Do not handle
6603 PTRACE_GETTHREADLIST if this macro does not exist.
6605 2012-12-15 Yao Qi <yao@codesourcery.com>
6607 * Makefile.in (OBS): Add notif.o.
6608 * notif.c, notif.h: New.
6609 * server.c: Include "notif.h".
6610 (struct vstop_notif) <next>: Remove.
6612 (queue_stop_reply): Update.
6613 (push_event, send_next_stop_reply): Remove.
6614 (discard_queued_stop_replies): Update.
6615 (notif_stop): New variable.
6616 (handle_v_stopped): Remove.
6617 (handle_v_requests): Don't call handle_v_stopped. Call
6618 handle_ack_notif instead.
6619 (queue_stop_reply_callback): Call notif_event_enque instead
6620 of queue_stop_reply.
6621 (handle_status): Don't call send_next_stop_reply, call
6622 notif_write_event instead.
6623 (kill_inferior_callback): Likewise.
6624 (detach_or_kill_inferior_callback): Likewise.
6625 (main): Call initialize_notif.
6626 (process_serial_event): Call QUEUE_is_empty.
6627 (handle_target_event): Call notif_push instead of push event.
6628 * server.h (push_event): Remove declaration.
6630 2012-12-10 Tom Tromey <tromey@redhat.com>
6632 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6633 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6636 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6637 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6638 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6639 (amd64-linux-ipa.o, ax.o): Rewrite.
6640 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6641 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6642 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6643 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6644 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6645 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6646 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6647 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6648 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6649 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6650 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6651 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6652 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6653 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6654 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6655 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6656 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6657 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6658 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6659 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6660 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6661 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6662 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6663 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6664 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6665 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6666 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6667 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6668 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6669 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6670 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6671 (reg-tilegx.o): Remove.
6672 (all_object_files): New macro.
6673 Include .deps files.
6674 * aclocal.m4, configure: Rebuild.
6675 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6676 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6677 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6679 2012-12-05 Tom Tromey <tromey@redhat.com>
6682 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6684 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6686 * configure.ac: Check for linux/perf_event.h.
6687 * config.in: Regenerated.
6688 * configure: Regenerated.
6690 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6692 * hostio.c (handle_readlink): Decrease buffer size
6693 parameter passed to readlink by one byte.
6695 2012-11-26 Yao Qi <yao@codesourcery.com>
6697 * configure.ac (build_warnings): Append '-Wempty-body'.
6698 * configure: Regenerated.
6699 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6702 2012-11-15 Pierre Muller <muller@sourceware.org>
6704 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6705 * config.in: Regenerate.
6706 * configure: Regenerate.
6707 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6708 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6709 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6710 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6712 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6713 instead of <sys/wait.h> header.
6714 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6716 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6718 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6719 (various make rules): Remove -DGDBSERVER
6721 2012-11-09 Yao Qi <yao@codesourcery.com>
6723 * spu-low.c (current_ptid): Move it to ..
6724 * gdbthread.h: ... here. New.
6725 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6726 * server.c (myresume, process_serial_event): Likewise.
6727 * thread-db.c (thread_db_find_new_threads): Likewise.
6728 * tracepoint.c (run_inferior_command): Likewise.
6730 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6732 * server.c (handle_search_memory_1): Include access length in
6735 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6737 * linux-crisv32-low.c: Fix compile errors.
6739 2012-09-04 Yao Qi <yao@codesourcery.com>
6741 * tracepoint.c (cmd_qtsv): Adjust debug message.
6742 Don't check CUR_TPOINT.
6744 2012-08-28 Yao Qi <yao@codesourcery.com>
6746 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6747 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6748 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6749 Remove declarations of xmalloc, xreallloc, xstrdup and
6751 * Makefile.in (libiberty_h): New.
6752 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6753 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6755 2012-08-23 Yao Qi <yao@codesourcery.com>
6757 * server.h: Remove declaration of 'xsnprintf'.
6759 2012-08-22 Keith Seitz <keiths@redhat.com>
6761 * server.h: Include build-gnulib-gbserver/config.h.
6762 * gdbreplay.c: Likewise.
6764 2012-08-08 Doug Evans <dje@google.com>
6766 * Makefile.in (SFILES): Add gdb_vecs.c.
6767 (OBS): Add gdb_vecs.o.
6768 (gdb_vecs_h, host_defs_h): New variables.
6769 (thread-db.o): Add $(gdb_vecs_h) dependency.
6770 (gdb_vecs.o): New rule.
6771 * thread-db.c: #include "gdb_vecs.h".
6772 (thread_db_load_search): Use a vector to iterate over path elements.
6773 Handle text appearing after "$pdir".
6775 * configure.ac: Add check for strstr.
6776 * config.in: Regenerate.
6777 * configure: Regenerate.
6779 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6781 * hostio.c (handle_pread): If pread fails, fall back to attempting
6783 (handle_pwrite): Likewise for pwrite.
6785 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6787 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6788 between unsupported TYPE and unimplementable ADDR/LEN combination.
6789 (arm_insert_point): Act on new return value.
6791 2012-07-31 Pedro Alves <palves@redhat.com>
6793 * server.c (process_point_options): Only skip tokens if we find
6794 one that is unrecognized. Don't treat 'X' specially while
6795 skipping unrecognized tokens.
6797 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6799 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6800 to 4-byte-align HW breakpoint addresses for Thumb.
6802 2012-07-27 Yao Qi <yao@codesourcery.com>
6806 * server.h: Declare gdb_agent_about_to_close.
6807 * target.c (kill_inferior): Include "agent.h".
6808 New. Send command 'kill'.
6809 * target.h (kill_inferior): Removed macro.
6810 * tracepoint.c (gdb_agent_about_to_close): New.
6811 (gdb_agent_helper_thread): Handle command 'close'.
6812 Wait endlessly until the inferior stops.
6813 Install gdb_agent_remove_socket to atexit hook.
6814 (agent_socket_name): New static variable.
6815 (gdb_agent_socket_init): Replace local variable 'name' with
6816 'agent_socket_name'.
6817 (gdb_agent_remove_socket): New.
6819 2012-07-27 Yao Qi <yao@codesourcery.com>
6821 * server.c (process_point_options): Stop at 'X' when parsing.
6823 2012-07-19 Michael Eager <eager@eagercon.com>
6825 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6827 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6828 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6829 hardware breakpoint.
6831 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6833 * gdbserver/linux-low.c (initialize_low): Call
6834 linux_ptrace_init_warnings.
6836 2012-07-02 Doug Evans <dje@google.com>
6838 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6841 2012-07-02 Stan Shebs <stan@codesourcery.com>
6843 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6844 (ax.o): Add it to build rule.
6846 (OBS): Add format.o.
6847 (IPA_OBS): Add format.o.
6848 * server.c (handle_query): Claim support for breakpoint commands.
6849 (process_point_options): Add command case.
6850 (process_serial_event): Leave running if there are printfs in
6852 * mem-break.h (any_persistent_commands): Declare.
6853 (add_breakpoint_commands): Declare.
6854 (gdb_no_commands_at_breakpoint): Declare.
6855 (run_breakpoint_commands): Declare.
6856 * mem-break.c (struct point_command_list): New struct.
6857 (struct breakpoint): New field command_list.
6858 (any_persistent_commands): New function.
6859 (add_commands_to_breakpoint): New function.
6860 (add_breakpoint_commands): New function.
6861 (gdb_no_commands_at_breakpoint): New function.
6862 (run_breakpoint_commands): New function.
6863 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6865 * ax.c: Include format.h.
6866 (ax_printf): New function.
6867 (gdb_eval_agent_expr): Add printf opcode.
6869 2012-06-13 Yao Qi <yao@codesourcery.com>
6871 * server.c (start_inferior): Remove duplicated writes to fields
6872 'last_resume_kind' and 'last_status' of 'current_inferior'.
6874 2012-06-12 Yao Qi <yao@codesourcery.com>
6875 Pedro Alves <palves@redhat.com>
6877 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6879 * server.c (handle_v_cont): Extend comment.
6881 2012-06-11 Yao Qi <yao@codesourcery.com>
6883 * linux-low.c (linux_attach): Add 'static'.
6885 2012-06-06 Yao Qi <yao@codesourcery.com>
6887 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6889 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6891 Fix gcc -flto compilation warning.
6892 * server.c (main): Make variable multi_mode and attach volatile.
6894 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6896 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6897 if the platform doesn't know about it.
6899 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6901 * Makefile.in (SFILES): Add linux-tile-low.c.
6902 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6903 * configure.srv: Handle tilegx-*-linux*.
6904 * linux-tile-low.c: New file.
6906 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6908 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6910 2012-05-24 Pedro Alves <palves@redhat.com>
6914 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6916 2012-05-24 Pedro Alves <palves@redhat.com>
6920 Replace target_signal with gdb_signal throughout.
6922 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6924 * linux-low.c (linux_store_registers): Avoid the copying sequence
6925 when no data has been retrieved by ptrace.
6927 2012-05-22 Will Deacon <will.deacon@arm.com>
6929 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6930 Include asm/ptrace.h.
6931 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6934 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6936 * linux-low.c (linux_store_registers): Don't re-retrieve data
6937 with ptrace that has already been obtained from /proc. Always
6938 copy any data retrieved with ptrace to the buffer supplied.
6940 2012-05-11 Yao Qi <yao@codesourcery.com>
6941 Pedro Alves <palves@redhat.com>
6943 * linux-low.c (enum stopping_threads_kind): New.
6944 (stopping_threads): Change type to `enum stopping_threads_kind'.
6945 (handle_extended_wait): If stopping and suspending threads, leave
6946 the new_lwp suspended too.
6947 (linux_wait_for_event): Adjust.
6948 (stop_all_lwps): Set `stopping_threads' to
6949 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6950 whether we're suspending threads or just stopping them. Assert no
6953 2012-04-29 Yao Qi <yao@codesourcery.com>
6955 * server.h: Move some code to ...
6956 * gdbthread.h: ... here. New.
6957 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6958 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6959 (nto-low.o, win32-low.o): Likewise.
6960 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6961 * regcache.c, remote-utils.c, server.c: Likewise.
6962 * target.c, tracepoint.c, win32-low.c: Likewise.
6964 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6966 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6967 (PTRACE_ARG4_TYPE): Likewise.
6968 (PTRACE_XFER_TYPE): Likewise.
6969 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6970 ptrace to PTRACE_ARG3_TYPE.
6971 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6972 (PTRACE_ARG4_TYPE): Likewise.
6973 (PTRACE_XFER_TYPE): Likewise.
6974 (linux_detach_one_lwp): Cast fourth argument of
6975 ptrace to long then PTRACE_ARG4_TYPE.
6976 (regsets_fetch_inferior_registers): Cast third argument of
6977 ptrace to long then PTRACE_ARG3_TYPE.
6978 (regsets_store_inferior_registers): Likewise.
6980 2012-04-20 Pedro Alves <palves@redhat.com>
6982 * configure: Regenerate.
6984 2012-04-19 Pedro Alves <palves@redhat.com>
6986 * Makefile.in (GNULIB_BUILDDIR): New.
6987 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6988 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6989 (all, install-only, uninstall, clean-info, all-lib, clean): No
6990 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6991 (maintainer-clean realclean distclean): Use subdir_do.
6993 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6994 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6995 * acinclude.m4: Include acx_configure_dir.m4.
6996 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6997 calls. Call AC_PROG_RANLIB. Configure gnulib using
7000 (GNULIB_STDINT_H): Adjust.
7001 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7002 * gdbreplay.c: Include build-gnulib/config.h.
7003 * server.h: Likewise.
7004 * aclocal.m4: Regenerate.
7005 * config.in: Regenerate.
7006 * configure: Regenerate.
7008 2012-04-19 Pedro Alves <palves@redhat.com>
7010 * Makefile.in (LIBGNU, INCGNU): Adjust.
7011 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7012 (all, install-only, uninstall, clean-info, all-lib, clean)
7013 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7014 * configure.ac: Adjust AC_OUTPUT output.
7015 * aclocal.m4: Regenerate.
7016 * configure: Regenerate.
7018 2012-04-19 Pedro Alves <palves@redhat.com>
7020 * Makefile.in (generated_files): New.
7021 (server_h): Remove the explicit dependency on config.h, and depend
7022 on $generated_files.
7024 2012-04-19 Pedro Alves <palves@redhat.com>
7026 * Makefile.in (INCGNU): Add -Ignulib.
7028 2012-04-19 Pedro Alves <palves@redhat.com>
7030 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7031 (INCGNU): ... this, and spell out -I here.
7032 (GNULIB_LIB): Rename to ...
7034 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7036 2012-04-19 Pedro Alves <palves@redhat.com>
7038 * config.in: Regenerate.
7040 2012-04-19 Pedro Alves <palves@redhat.com>
7042 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7043 * server.h (memmem): Remove declaration.
7044 * config.in: Regenerate.
7045 * configure: Regenerate.
7047 2012-04-19 Yao Qi <yao@codesourcery.com>
7049 * Makefile.in (SFILES): Add common/vec.c.
7053 2012-04-19 Yao Qi <yao@codesourcery.com>
7055 * remote-utils.c (prepare_resume_reply): Replace with macro
7056 target_core_of_thread.
7057 * server.c (handle_qxfer_threads_proper): Likewise.
7058 * target.h (traget_core_of_thread): New macro.
7060 2012-04-18 Pedro Alves <palves@redhat.com>
7062 * aclocal.m4: Regenerate.
7063 * configure: Regenerate.
7065 2012-04-16 Yao Qi <yao@codesourcery.com>
7067 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7068 duplicated on address.
7070 2012-04-16 Yao Qi <yao@codesourcery.com>
7072 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7073 (struct tracepoint_action_ops) <send>: New field.
7074 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7075 (agent_expr_send, x_tracepoint_action_send): New.
7076 (l_tracepoint_action_send): New.
7077 (cmd_qtdp): Download and install tracepoint
7078 according to `use_agent'.
7079 (run_inferior_command): Add one more parameter `len'.
7081 (tracepoint_send_agent): New.
7082 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7084 2012-04-16 Yao Qi <yao@codesourcery.com>
7086 * tracepoint.c (download_tracepoints): Moved to ...
7087 (cmd_qtstart): ... here.
7089 2012-04-14 Yao Qi <yao@codesourcery.com>
7091 * tracepoint.c: Include inttypes.h.
7092 (struct collect_memory_action): Use sized types.
7093 (struct tracepoint): Likewise.
7094 (cmd_qtdp, stop_tracing): Update print specifiers.
7095 (cmd_qtp, response_tracepoint): Likewise.
7096 (collect_data_at_tracepoint): Likewise.
7097 (collect_data_at_step): Likewise.
7099 2012-04-14 Yao Qi <yao@codesourcery.com>
7101 Import gnulib module inttypes.
7102 * aclocal.m4, config.in, configure: Regenerated.
7104 2012-04-14 Yao Qi <yao@codesourcery.com>
7106 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7107 Makefile and config.status at last.
7109 2012-04-13 Yao Qi <yao@codesourcery.com>
7111 * tracepoint.c: Include stdint.h unconditionally.
7113 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7115 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7116 on BFD_HAVE_SYS_PROCFS_TYPE.
7117 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7118 * configure: Regenerate.
7119 * config.in: Likewise.
7121 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7123 * Makefile.in (clean): Also remove x32.c x32-linux.c
7124 x32-avx.c x32-avx-linux.c.
7125 (x32.o): New target.
7127 (x32-linux.o): Likewise.
7128 (x32-linux.c): Likewise.
7129 (x32-avx.o): Likewise.
7130 (x32-avx.c): Likewise.
7131 (x32-avx-linux.o): Likewise.
7132 (x32-avx-linux.c): Likewise.
7134 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7135 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7136 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7137 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7138 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7139 i386/x32-avx-linux.xml.
7141 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7142 (init_registers_x32_avx_linux): Likwise.
7143 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7144 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7146 2012-04-13 Pedro Alves <palves@redhat.com>
7148 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7149 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7150 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7151 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7154 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7156 * linux-x86-low.c (compat_x32_clock_t): New.
7157 (compat_x32_siginfo_t): Likewise.
7158 (compat_x32_siginfo_from_siginfo): Likewise.
7159 (siginfo_from_compat_x32_siginfo): Likewise.
7160 (linux_is_elf64): Likewise.
7161 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7162 and siginfo_from_compat_x32_siginfo for x32.
7163 (x86_arch_setup): Set linux_is_elf64.
7165 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7168 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7170 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7171 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7172 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7173 compatible with process.
7175 2012-04-12 Yao Qi <yao@codesourcery.com>
7177 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7178 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7179 (install-only, install-info, clean): Handle sub dir gnulib.
7180 (all-lib, am--refresh): New targets.
7181 (memmem.o): Remove target.
7182 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7183 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7184 (AC_REPLACE_FUNCS): Remove memmem.
7185 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7186 (AC_OUTPUT): Generate Makefile in gnulib/.
7187 * aclocal.m4, config.in, configure: Regenerated.
7189 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7191 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7193 2012-04-05 Pedro Alves <palves@redhat.com>
7195 -Werror=strict-aliasing
7197 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7200 2012-04-04 Pedro Alves <palves@redhat.com>
7202 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7203 (sparc_store_gregset_from_stack, sparc_store_gregset)
7204 (sparc_breakpoint_at): Fix formatting.
7206 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7208 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7210 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7211 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7212 * config.in: Regenerate.
7213 * configure: Likewise.
7215 2012-03-29 Pedro Alves <palves@redhat.com>
7217 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7218 Correct ptrace arguments.
7220 2012-03-28 Pedro Alves <palves@redhat.com>
7222 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7223 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7224 (IA64_FR1_REGNUM): New defines.
7225 (ia64_fetch_register): New.
7226 (the_low_target): Install it.
7227 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7229 * linux-low.c (linux_fetch_registers): Try the
7230 the_low_target.fetch_register hook first.
7232 * linux-arm-low.c (the_low_target): Adjust.
7233 * linux-bfin-low.c (the_low_target): Adjust.
7234 * linux-cris-low.c (the_low_target): Adjust.
7235 * linux-crisv32-low.c (the_low_target): Adjust.
7236 * linux-m32r-low.c (the_low_target): Adjust.
7237 * linux-m68k-low.c (the_low_target): Adjust.
7238 * linux-mips-low.c (the_low_target): Adjust.
7239 * linux-ppc-low.c (the_low_target): Adjust.
7240 * linux-s390-low.c (the_low_target): Adjust.
7241 * linux-sh-low.c (the_low_target): Adjust.
7242 * linux-sparc-low.c (the_low_target): Adjust.
7243 * linux-tic6x-low.c (the_low_target): Adjust.
7244 * linux-x86-low.c (the_low_target): Adjust.
7245 * linux-xtensa-low.c (the_low_target): Adjust.
7247 2012-03-26 Pedro Alves <palves@redhat.com>
7249 * server.c (handle_qxfer_libraries): Don't bail early if
7250 the_target->qxfer_libraries_svr4 is not NULL.
7252 2012-03-26 Pedro Alves <palves@redhat.com>
7254 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7256 2012-03-23 Pedro Alves <palves@redhat.com>
7258 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7259 "library-list-svr4" element's start tag when the the DSO list is
7262 2012-03-23 Pedro Alves <palves@redhat.com>
7264 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7265 a variable whose type size is the same as the inferior's pointer
7268 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7270 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7272 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7273 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7274 * linux-low.h: Include <signal.h>.
7275 (struct siginfo): Remove forward declaration.
7276 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7279 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7281 * .gitignore: Ignore more files.
7283 2012-03-19 Pedro Alves <palves@redhat.com>
7284 Jan Kratochvil <jan.kratochvil@redhat.com>
7286 * server.c (cont_thread, general_thread): Add describing comments.
7287 (start_inferior): Clear `cont_thread'.
7288 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7291 2012-03-15 Yao Qi <yao@codesourcery.com>
7293 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7295 (cmd_qtdp): ... here.
7297 2012-03-15 Yao Qi <yao@codesourcery.com>
7299 * tracepoint.c (struct tracepoint_action_ops): New.
7300 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7301 (m_tracepoint_action_download): New.
7302 (r_tracepoint_action_download): New.
7303 (x_tracepoint_action_download): New.
7304 (l_tracepoint_action_download): New.
7305 (add_tracepoint_action): Install `action->ops' according type.
7306 (download_tracepoint_1): Move code `download' function pointer
7307 of various tracepoint_action_ops.
7309 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7311 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7312 linux_ptrace_attach_warnings.
7314 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7316 * Makefile.in (linux-ptrace.o): New.
7317 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7318 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7319 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7320 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7321 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7323 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7325 2012-03-08 Yao Qi <yao@codesourcery.com>
7326 Pedro Alves <palves@redhat.com>
7328 Fix PR server/13392.
7329 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7331 * tracepoint.c (remove_tracepoint): New.
7332 (cmd_qtdp): Call remove_tracepoint when failed to install.
7334 2012-03-07 Pedro Alves <palves@redhat.com>
7336 * linux-low.c (get_detach_signal): New.
7337 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7338 Pass on pending signals to PTRACE_DETACH. Check the result of the
7340 * server.c (program_signals, program_signals_p): New.
7341 (handle_general_set): Handle QProgramSignals.
7342 * server.h (program_signals, program_signals_p): Declare.
7344 2012-03-05 Pedro Alves <palves@redhat.com>
7345 Jan Kratochvil <jan.kratochvil@redhat.com>
7347 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7350 2012-03-03 Yao Qi <yao@codesourcery.com>
7352 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7353 agent_look_up_symbols.
7355 2012-03-03 Yao Qi <yao@codesourcery.com>
7357 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7358 (linux-x86-low.o): Likewise.
7359 * server.h: Remove in_process_agent_loaded.
7360 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7364 2012-03-03 Yao Qi <yao@codesourcery.com>
7366 * tracepoint.c (gdb_agent_capability): New global.
7367 (in_process_agent_loaded_ust): Renamed to
7368 `in_process_agent_supports_ust'.
7370 (in_process_agent_supports_ust): Call agent_capability_check.
7371 (clear_installed_tracepoints): Assert that agent supports
7374 2012-03-03 Yao Qi <yao@codesourcery.com>
7376 * linux-low.c (linux_supports_agent): New.
7377 (linux_target_ops): Initialize field `supports_agent' with
7378 linux_supports_agent.
7379 * target.h (struct target_ops) <supports_agent>: New.
7380 (target_supports_agent): New macro.
7381 * server.c (handle_general_set): Handle packet 'QAgent'.
7382 (handle_query): Send `QAgent+'.
7383 * Makefile.in (server.o): Depends on agent.h.
7385 2012-03-03 Yao Qi <yao@codesourcery.com>
7387 * Makefile.in (OBS): Add agent.o.
7388 Add new rule for agent.o.
7389 Track dependence of tracepoint.c on agent.h.
7390 * tracepoint.c (run_inferior_command_1):
7391 (run_inferior_command): Call agent_run_command.
7392 (gdb_ust_connect_sync_socket): Deleted. Move it to
7394 (resume_thread, stop_thread): Likewise.
7395 (gdb_ust_socket_init): Renamed to ...
7396 (gdb_agent_socket_init): ... New.
7397 (gdb_ust_thread): Renamed to ...
7398 (gdb_agent_helper_thread): ... New.
7399 (gdb_ust_init): Move some code to ...
7400 (gdb_agent_init): ... here. New.
7401 [HAVE_UST]: Call gdb_ust_init.
7402 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7403 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7404 * config.in, configure: Regenerated.
7406 2012-03-02 Pedro Alves <palves@redhat.com>
7408 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7409 * linux-low.c (struct simple_pid_list): New.
7410 (stopped_pids): New a struct simple_pid_list pointer.
7411 (add_to_pid_list, pull_pid_from_list): New.
7412 (handle_extended_wait): Don't assume the first signal new children
7413 report is SIGSTOP. Adjust call to pull_pid_from_list.
7414 (linux_wait_for_lwp): Adjust.
7416 2012-03-02 Yao Qi <yao@codesourcery.com>
7418 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7421 2012-03-02 Yao Qi <yao@codesourcery.com>
7423 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7424 `stop_pc' and `tpoint'. Update caller.
7426 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7428 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7429 * linux-low.c (use_linux_regsets): New macro.
7430 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7431 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7432 (linux_register_in_regsets): New function.
7433 (usr_fetch_inferior_registers): Skip registers covered by
7435 (usr_store_inferior_registers): Likewise.
7436 (usr_fetch_inferior_registers): New macro.
7437 (usr_store_inferior_registers): Likewise.
7438 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7439 (linux_store_registers): Likewise.
7440 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7442 (init_registers_mips64_dsp_linux): Likewise.
7443 (init_registers_mips_linux): New macro.
7444 (init_registers_mips_dsp_linux): Likewise.
7445 (mips_dsp_num_regs): Likewise.
7446 (DSP_BASE, DSP_CONTROL): New fallback macros.
7447 (mips_base_regs): New macro.
7448 (mips_regmap): Use it. Fix the size.
7449 (mips_dsp_regmap): New variable.
7450 (mips_dsp_regset_bitmap): Likewise.
7451 (mips_arch_setup): New function.
7452 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7454 (mips_cannot_store_register): Likewise.
7455 (the_low_target): Update .arch_setup, .num_regs and .regmap
7456 initializers. Add .regset_bitmap initializer.
7457 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7459 * linux-bfin-low.c (the_low_target): Likewise.
7460 * linux-cris-low.c (the_low_target): Likewise.
7461 * linux-crisv32-low.c (the_low_target): Likewise.
7462 * linux-ia64-low.c (the_low_target): Likewise.
7463 * linux-m32r-low.c (the_low_target): Likewise.
7464 * linux-m68k-low.c (the_low_target): Likewise.
7465 * linux-ppc-low.c (the_low_target): Likewise.
7466 * linux-s390-low.c (the_low_target): Likewise.
7467 * linux-sh-low.c (the_low_target): Likewise.
7468 * linux-sparc-low.c (the_low_target): Likewise.
7469 * linux-tic6x-low.c (the_low_target): Likewise.
7470 * linux-x86-low.c (the_low_target): Likewise.
7471 * linux-xtensa-low.c (the_low_target): Likewise.
7472 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7473 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7474 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7476 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7477 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7479 2012-02-29 Yao Qi <yao@codesourcery.com>
7480 Pedro Alves <palves@redhat.com>
7482 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7483 `step_over_finished' is true.
7485 2012-02-27 Pedro Alves <palves@redhat.com>
7487 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7488 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7490 2012-02-27 Pedro Alves <palves@redhat.com>
7493 * linux-low.c (pid_is_stopped): New.
7494 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7496 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7498 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7501 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7503 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7505 2012-02-24 Luis Machado <lgustavo@codesourcery>
7507 * server.c (handle_query): Advertise support for target-side
7508 breakpoint condition evaluation.
7509 (process_point_options): New function.
7510 (process_serial_event): When inserting a breakpoint, check for
7511 a target-side condition that should be evaluated.
7513 * mem-break.c: Include regcache.h and ax.h.
7514 (point_cond_list_t): New data structure.
7515 (breakpoint) <cond_list>: New field.
7516 (find_gdb_breakpoint_at): Make non-static.
7517 (delete_gdb_breakpoint_at): Clear any target-side
7519 (clear_gdb_breakpoint_conditions): New function.
7520 (add_condition_to_breakpoint): Likewise.
7521 (add_breakpoint_condition): Likewise.
7522 (gdb_condition_true_at_breakpoint): Likewise.
7523 (gdb_breakpoint_here): Return result directly instead
7524 of going through a local variable.
7526 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7527 (clear_gdb_breakpoint_conditions): Likewise.
7528 (add_breakpoint_condition): Likewise.
7529 (gdb_condition_true_at_breakpoint): Likewise.
7531 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7532 (need_step_over_p): Take target-side breakpoint condition into
7535 2012-02-24 Luis Machado <lgustavo@codesourcery>
7537 * server.h: Include tracepoint.h.
7538 (agent_mem_read, agent_get_trace_state_variable_value,
7539 agent_set_trace_state_variable_value,
7540 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7541 get_set_tsv_func_addr): New prototypes.
7543 * ax.h: New include file.
7544 * ax.c: New source file.
7546 * tracepoint.c: Include ax.h.
7547 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7548 agent_expr, eval_result_type): Move to ax.h.
7549 (parse_agent_expr): Rename to ...
7550 (gdb_parse_agent_expr): ... this, make it non-static and move
7552 (unparse_agent_expr) Rename to ...
7553 (gdb_unparse_agent_expr): ... this, make it non-static and move
7555 (eval_agent_expr): Rename to ...
7556 (eval_tracepoint_agent_expr): ... this.
7557 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7558 forward declarations.
7559 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7560 (agent_get_trace_state_variable_value): New function.
7561 (agent_set_trace_state_variable_value): New function.
7562 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7563 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7564 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7565 (condition_true_at_tracepoint): Likewise.
7566 (parse_agent_expr): Rename to ...
7567 (gdb_parse_agent_expr): ... this and move to ax.c.
7568 (unparse_agent_expr): Rename to ...
7569 (gdb_unparse_agent_expr): ... this and move to ax.c.
7570 (gdb_agent_op_name): Move to ax.c.
7571 (eval_agent_expr): Rename to ...
7572 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7574 (eval_tracepoint_agent_expr): New function.
7575 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7577 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7579 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7580 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7581 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7582 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7583 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7584 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7585 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7586 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7587 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7588 (compile_bytecodes): Remove forward declaration.
7589 (is_goto_target): Move to ax.c.
7590 (compile_bytecodes): Move to ax.c and call
7591 agent_get_trace_state_variable_value (...) and
7592 agent_set_trace_state_variable_value (...).
7594 * Makefile.in: Update ax.c and IPA dependencies.
7596 2012-02-24 Pedro Alves <palves@redhat.com>
7598 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7599 (cmd_bigqtbuffer_circular): ... this. Only handle
7600 'QTBuffer:circular:'.
7601 (handle_tracepoint_general_set): Adjust.
7603 2012-02-16 Yao Qi <yao@codesourcery.com>
7605 * inferiors.c: Move code to ...
7606 * dll.c: .... here. New.
7607 * server.h: Declare clear_dlls.
7608 * Makefile.in (SFILES): Add dll.c.
7612 2012-02-11 Yao Qi <yao@codesourcery.com>
7614 * server.c: (handle_monitor_command): Add a new parameter
7616 (handle_query): Update caller.
7618 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7620 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7621 * configure, config.in: Regenerate.
7622 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7625 2012-02-02 Pedro Alves <palves@redhat.com>
7627 Try SIGKILL first, then PTRACE_KILL.
7628 * linux-low.c (linux_kill_one_lwp): New.
7629 (linux_kill_one_lwp): Rename to ...
7630 (kill_one_lwp_callback): ... this. Use the new
7633 2012-02-02 Pedro Alves <palves@redhat.com>
7635 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7638 2012-01-27 Pedro Alves <palves@redhat.com>
7640 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7641 (elf_64_file_p): Make static.
7642 (linux_pid_exe_is_elf_64_file): New.
7643 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7644 Delete declarations.
7645 (linux_pid_exe_is_elf_64_file): Declare.
7646 * linux-x86-low.c (x86_arch_setup): Use
7647 linux_pid_exe_is_elf_64_file.
7649 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7651 * linux-low.c (linux_wait_for_event_1): Rename to ...
7652 (linux_wait_for_event): ... here and merge it with former
7653 linux_wait_for_event - new variable wait_ptid, use it.
7654 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7656 2012-01-23 Pedro Alves <palves@redhat.com>
7658 * server.c (main): Avoid yet another case of infinite loop while
7659 detaching/killing after a longjmp.
7661 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7664 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7666 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7668 * hostio.c (handle_readlink): New function.
7669 (handle_vFile): Call it to handle "vFile:readlink" packets.
7671 2012-01-20 Pedro Alves <palves@redhat.com>
7672 Ulrich Weigand <ulrich.weigand@linaro.org>
7674 * server.c (handle_v_requests): Only support vAttach and vRun to
7675 start multiple processes when in extended protocol mode.
7677 2012-01-17 Pedro Alves <palves@redhat.com>
7679 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7680 memalign plus mprotect to allocate the scratch buffer.
7682 2012-01-13 Pedro Alves <palves@redhat.com>
7684 * server.c (attach_inferior): Clear `cont_thread'.
7686 2012-01-13 Pedro Alves <palves@redhat.com>
7688 * server.c (main): Avoid infinite loop while detaching/killing
7691 2012-01-09 Doug Evans <dje@google.com>
7693 * server.c (start_inferior): Set last_ptid in --wrapper case.
7695 2012-01-06 Yao Qi <yao@codesourcery.com>
7697 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7699 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7701 2012-01-04 Yao Qi <yao@codesourcery.com>
7703 * tracepoint.c (cmd_qtdp): Print debug message
7704 for static tracepoint.
7706 2012-01-04 Yao Qi <yao@codesourcery.com>
7708 * tracepoint.c (trace_vdebug): Differentiate debug message
7709 between gdbserver and IPA.
7711 2012-01-03 Yao Qi <yao@codesourcery.com>
7713 * tracepoint.c (tracepoint_was_hit): Don't collect for
7716 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7718 * terminal.h: Reformat copyright header.
7720 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7722 * server.c (gdbserver_version): Update copyright year.
7723 * gdbreplay.c (gdbreplay_version): Likewise.
7725 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7727 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7730 2011-12-18 Hui Zhu <teawater@gmail.com>
7731 * linux-low.c (linux_create_inferior): Save return value to ret.
7733 2011-12-18 Hui Zhu <teawater@gmail.com>
7735 * linux-low.c (linux_create_inferior): Save return value to ret.
7737 2011-12-16 Doug Evans <dje@google.com>
7739 * linux-low.c (linux_create_inferior): If stdio connection,
7740 redirect stdin from /dev/null, stdout to stderr.
7741 * remote-utils.c (remote_is_stdio): New static global.
7742 (remote_connection_is_stdio): New function.
7743 (remote_prepare): Handle stdio connection.
7744 (remote_open): Ditto.
7745 (remote_close): Don't close stdin for stdio connections.
7746 (read_prim,write_prim): New functions. Replace all calls to
7747 read/write to these.
7748 * server.c (main): Watch for "-" argument. Move call to
7749 remote_prepare before start_inferior.
7750 * server.h (STDIO_CONNECTION_NAME): New macro.
7751 (remote_connection_is_stdio): Declare.
7753 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7754 in debugging output.
7756 2011-12-15 Yao Qi <yao@codesourcery.com>
7758 * tracepoint.c: Include sys/syscall.h.
7759 (gdb_ust_thread): Remove preprocessor conditional.
7761 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7763 * linux-low.c (linux_detach_one_lwp): Call
7764 the_low_target.prepare_to_resume before detaching.
7766 2011-12-14 Yao Qi <yao@codesourcery.com>
7768 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7771 2011-12-14 Yao Qi <yao@codesourcery.com>
7773 * i386-low.c (i386_low_stopped_data_address): Initialize local
7776 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7780 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7781 DR_CONTROL unless necessary. Extend comments.
7782 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7783 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7785 2011-12-13 Yao Qi <yao@codesourcery.com>
7787 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7789 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7791 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7793 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7794 Print new debug message for such case.
7796 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7798 Fix overlapping memcpy.
7799 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7800 the read_inferior_memory transfer.
7801 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7802 write_inferior_memory transfer.
7803 (set_fast_tracepoint_jump): New variable buf. Use it for the
7804 read_inferior_memory and write_inferior_memory transfers.
7805 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7806 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7807 Use it for the write_inferior_memory transfer.
7808 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7811 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7813 * linux-low.c (fetch_register, store_register): Make code
7814 consistent, fix formatting.
7816 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7818 * linux-low.c (usr_store_inferior_registers): Factor out code
7819 to handle individual registers into...
7820 (store_register): ... this new function.
7822 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7824 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7825 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7826 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7827 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7828 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7829 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7830 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7831 (srv_xmlfiles): Add new XML files.
7833 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7835 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7836 (init_registers_s390_linux32v1): Add prototype.
7837 (init_registers_s390_linux32v2): Likewise.
7838 (init_registers_s390_linux64v1): Likewise.
7839 (init_registers_s390_linux64v2): Likewise.
7840 (init_registers_s390x_linux64v1): Likewise.
7841 (init_registers_s390x_linux64v2): Likewise.
7842 (s390_num_regs): Increment to 52.
7843 (s390_regmap): Add orig_r2 register.
7844 (s390_num_regs_3264): Increment to 68.
7845 (s390_regmap_3264): Add orig_r2 register.
7846 (s390_collect_ptrace_register): Handle orig_r2 register.
7847 (s390_supply_ptrace_register): Likewise.
7848 (s390_fill_last_break): New function.
7849 (s390_store_last_break): Likewise.
7850 (s390_fill_system_call): New function.
7851 (s390_store_system_call): Likewise.
7852 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7854 (s390_check_regset): New function.
7855 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7856 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7857 Update target_regsets for available register sets.
7859 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7860 Jan Kratochvil <jan.kratochvil@redhat.com>
7862 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7863 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7865 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7866 * linux-low.h (struct process_info_private): New member r_debug.
7867 * server.c (handle_qxfer_libraries): Call
7868 the_target->qxfer_libraries_svr4.
7869 (handle_qxfer_libraries_svr4): New function.
7870 (qxfer_packets): New entry "libraries-svr4".
7871 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7872 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7873 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7874 PACKET_qXfer_libraries_svr4.
7876 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7878 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7879 PSW address/mask between 8-byte and 16-byte formats.
7880 (s390_supply_ptrace_register): Likewise.
7881 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7882 basic addressing mode bit.
7884 2011-11-24 Stan Shebs <stan@codesourcery.com>
7886 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7888 2011-11-17 Stan Shebs <stan@codesourcery.com>
7890 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7891 (tracing_start_time): New global.
7892 (tracing_stop_time): New global.
7893 (tracing_user_name): New global.
7894 (tracing_notes): New global.
7895 (tracing_stop_note): New global.
7896 (cmd_qtstart): Set traceframe_usage, start_time.
7897 (stop_tracing): Set stop_time.
7898 (cmd_qtstatus): Report additional status.
7899 (cmd_qtp): New function.
7900 (handle_tracepoint_query): Call it.
7901 (cmd_qtnotes): New function.
7902 (handle_tracepoint_general_set): Call it.
7903 (get_timestamp): Rename from tsv_get_timestamp.
7905 2011-11-14 Stan Shebs <stan@codesourcery.com>
7906 Kwok Cheung Yeung <kcy@codesourcery.com>
7908 * linux-x86-low.c (small_jump_insn): New.
7909 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7910 trampoline and error message, build a trampoline and issue a small
7911 jump instruction to it.
7912 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7913 trampoline and error message.
7914 (x86_get_min_fast_tracepoint_insn_len): New.
7915 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7916 * linux-low.h (struct linux_target_ops): Add arguments to
7917 install_fast_tracepoint_jump_pad operation, add new operation.
7918 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7920 (linux_get_min_fast_tracepoint_insn_len): New function.
7921 (linux_target_op): Add new operation.
7922 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7923 (gdb_trampoline_buffer_end): Ditto.
7924 (gdb_trampoline_buffer_error): Ditto.
7925 (struct ipa_sym_addresses): Add fields for new IPA variables.
7926 (symbol_list): Add entries for new IPA variables.
7927 (struct tracepoint): Add fields to hold the address range of the
7928 trampoline used by the tracepoint.
7929 (trampoline_buffer_head): New static variable.
7930 (trampoline_buffer_tail): Ditto.
7931 (claim_trampoline_space): New function.
7932 (have_fast_tracepoint_trampoline_buffer): New function.
7933 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7935 (install_fast_tracepoint): Ditto, also add error buffer argument.
7936 (cmd_qtminftpilen): New function.
7937 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7938 (fast_tracepoint_from_trampoline_address): New function.
7939 (fast_tracepoint_collecting): Handle trampoline as part of jump
7941 (set_trampoline_buffer_space): New function.
7942 (initialize_tracepoint): Initialize new IPA variables.
7943 * target.h (struct target_ops): Add arguments to
7944 install_fast_tracepoint_jump_pad operation, add new
7945 get_min_fast_tracepoint_insn_len operation.
7946 (target_get_min_fast_tracepoint_insn_len): New.
7947 (install_fast_tracepoint_jump_pad): Add arguments.
7948 * server.h (IPA_BUFSIZ): Define.
7949 * linux-i386-ipa.c: Include extra header files.
7950 (initialize_fast_tracepoint_trampoline_buffer): New function.
7951 (initialize_low_tracepoint): Call it.
7952 * server.h (set_trampoline_buffer_space): Declare.
7953 (claim_trampoline_space): Ditto.
7954 (have_fast_tracepoint_trampoline_buffer): Ditto.
7956 2011-11-14 Yao Qi <yao@codesourcery.com>
7958 * server.c (handle_query): Handle InstallInTrace for qSupported.
7959 * tracepoint.c (add_tracepoint): Sort list.
7960 (install_tracepoint, download_tracepoint): New.
7961 (cmd_qtdp): Call them to install and download tracepoints.
7962 (sort_tracepoints): Removed.
7963 (cmd_qtstart): Update.
7965 2011-11-14 Yao Qi <yao@codesourcery.com>
7967 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7968 * mem-break.h: Declare.
7969 * tracepoint.c (cmd_qtstart): Move some code to ...
7970 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7972 (download_tracepoints): Move some code to ...
7973 (download_tracepoint_1): ... here. New.
7975 2011-11-08 Yao Qi <yao@codesourcery.com>
7977 * remote-utils.c (relocate_instruction): A comment fix.
7979 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7981 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7982 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7983 dr_status_mirror and dr_control_mirror from debug_reg_state.
7984 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7985 (i386_initial_stuff): Remove use of deleted globals.
7986 (i386_get_thread_context, i386_set_thread_context,
7987 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7988 from debug_reg_state.
7990 2011-11-05 Yao Qi <yao@codesourcery.com>
7992 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7993 address as TPOINT's.
7995 2011-11-02 Stan Shebs <stan@codesourcery.com>
7997 * tracepoint.c (agent_mem_read_string): New function.
7998 (eval_agent_expr): Call it for tracenz.
7999 * server.c (handle_query): Report support for tracenz.
8001 2011-11-02 Yao Qi <yao@codesourcery.com>
8003 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8005 2011-11-02 Yao Qi <yao@codesourcery.com>
8007 * target.h: Fix a typo in comment.
8009 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8011 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8012 clobber the breakpoints' shadows with fast tracepoint jumps.
8013 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8014 * target.c (write_inferior_memory): Also pass MYADDR down to
8017 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8019 * configure.ac: Check support for personality routine.
8020 * configure: Regenerate.
8021 * config.in: Likewise.
8022 * linux-low.c: Include <sys/personality.h>.
8023 Define ADDR_NO_RANDOMIZE if necessary.
8024 (linux_create_inferior): Disable address space randomization when
8025 forking inferior, if requested.
8026 (linux_supports_disable_randomization): New function.
8027 (linux_target_ops): Install it.
8028 * server.h (disable_randomization): Declare.
8029 * server.c (disable_randomization): New global variable.
8030 (handle_general_set): Handle QDisableRandomization.
8031 (handle_query): Likewise for qSupported.
8032 (main): Support --disable-randomization and --no-disable-randomization
8033 command line arguments.
8034 * target.h (struct target_ops): Add supports_disable_randomization.
8035 (target_supports_disable_randomization): New macro.
8037 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8039 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8041 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8042 [!PT_GETDSBT] (target_loadmap): New definition.
8043 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8044 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8045 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8046 and PT_GETDSBT to LINUX_LOADMAP.
8047 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8048 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8050 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8052 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8053 (arm_linux_hwbp_cap): New static variable.
8054 (arm_linux_get_hwbp_cap): Replace by ...
8055 (arm_linux_init_hwbp_cap): ... this new function.
8056 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8057 (arm_linux_get_hw_watchpoint_count): Likewise.
8058 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8059 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8060 (arm_prepare_to_resume): Use perror_with_name instead of error.
8062 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8064 * linux-arm-low.c: Include <signal.h>.
8065 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8066 (struct arm_linux_hwbp_cap): New data type.
8067 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8068 (struct arm_linux_hw_breakpoint): New data type.
8069 (MAX_BPTS, MAX_WPTS): Define.
8070 (struct arch_process_info, struct arch_lwp_info): New data types.
8071 (arm_linux_get_hwbp_cap): New function.
8072 (arm_linux_get_hw_breakpoint_count): Likewise.
8073 (arm_linux_get_hw_watchpoint_count): Likewise.
8074 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8075 (arm_hwbp_control_initialize): Likewise.
8076 (arm_hwbp_control_is_enabled): Likewise.
8077 (arm_hwbp_control_is_initialized): Likewise.
8078 (arm_hwbp_control_disable): Likewise.
8079 (arm_linux_hw_breakpoint_equal): Likewise.
8080 (arm_linux_hw_point_initialize): Likewise.
8081 (struct update_registers_data): New data structure.
8082 (update_registers_callback: New function.
8083 (arm_insert_point): Likewise.
8084 (arm_remove_point): Likewise.
8085 (arm_stopped_by_watchpoint): Likewise.
8086 (arm_stopped_data_address): Likewise.
8087 (arm_new_process): Likewise.
8088 (arm_new_thread): Likewise.
8089 (arm_prepare_to_resume): Likewise.
8090 (the_low_target): Register arm_insert_point, arm_remove_point,
8091 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8092 arm_new_thread, and arm_prepare_to_resume.
8094 2011-09-15 Stan Shebs <stan@codesourcery.com>
8096 * server.h (struct emit_ops): Add compare-goto fields.
8097 * tracepoint.c (gdb_agent_op_sizes): New table.
8098 (emit_eq_goto): New function.
8099 (emit_ne_goto): New function.
8100 (emit_lt_goto): New function.
8101 (emit_le_goto): New function.
8102 (emit_gt_goto): New function.
8103 (emit_ge_goto): New function.
8104 (is_goto_target): New function.
8105 (compile_bytecodes): Recognize special cases of compare-goto
8106 combinations and call specialized emitters for them.
8107 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8108 (amd64_emit_ne_goto): New function.
8109 (amd64_emit_lt_goto): New function.
8110 (amd64_emit_le_goto): New function.
8111 (amd64_emit_gt_goto): New function.
8112 (amd64_emit_ge_goto): New function.
8113 (amd64_emit_ops): Add the new functions.
8114 (i386_emit_eq_goto): New function.
8115 (i386_emit_ne_goto): New function.
8116 (i386_emit_lt_goto): New function.
8117 (i386_emit_le_goto): New function.
8118 (i386_emit_gt_goto): New function.
8119 (i386_emit_ge_goto): New function.
8120 (i386_emit_ops): Add the new functions.
8122 2011-09-08 Stan Shebs <stan@codesourcery.com>
8124 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8125 (i386_emit_epilogue): Restore %ebx.
8127 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8129 * server.c (step_thread): Remove definition.
8130 (process_serial_event): Don't handle Hs.
8131 * server.h (step_thread): Remove declaration.
8132 * target.c (set_desired_inferior): Remove use of step_thread.
8134 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8136 * linux-low.c: Include linux-procfs.h.
8137 (linux_attach_lwp_1): Update comments.
8138 (linux_attach): Scan for existing threads when attaching to a
8139 process that is the tgid.
8140 * Makefile.in: Update dependencies.
8142 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8144 * configure.srv: Add linux-procfs.o dependencies.
8146 2011-08-14 Yao Qi <yao@codesourcery.com>
8148 * target.h (struct target_ops): Fix indent.
8149 * win32-low.c (win32_target_ops): Fix comment.
8151 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8152 Yao Qi <yao@codesourcery.com>
8154 * Makefile.in (clean): Remove tic6x-*.c files.
8155 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8156 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8157 (tic6x-c64xp-linux.c): Likewise.
8158 * configure.srv: Add support for tic6x-*-uclinux.
8159 * linux-tic6x-low.c: New.
8160 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8162 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8163 Yao Qi <yao@codesourcery.com>
8165 * target.h (struct target_ops): Add read_loadmap.
8166 * linux-low.c (struct target_loadseg): New type.
8167 (struct target_loadmap): New type.
8168 (linux_read_loadmap): New function.
8169 (linux_target_ops): Add linux_read_loadmap.
8170 * server.c (handle_query): Support qXfer:fdpic:read packet.
8171 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8174 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8176 * win32-low.c: Include <stdint.h>.
8178 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8180 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8181 to the inferior here.
8182 (i386_remove_aligned_watchpoint): Ditto.
8183 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8184 fit part of the watchpoint in the debug registers.
8185 (i386_update_inferior_debug_regs): New.
8186 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8187 registers, and only update the inferior on success.
8188 (i386_low_remove_watchpoint): Ditto.
8190 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8192 * linux-low.c (compare_ints, unique, list_threads, show_process,
8193 linux_core_of_thread): Delete.
8194 (linux_target_ops): Change linux_core_of_thread to
8195 linux_common_core_of_thread.
8196 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8197 * utils.c (malloc_failure): Change type of argument.
8198 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8199 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8200 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8201 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8202 (IPA_OBJS): Add common-utils-ipa.o.
8203 (ptid_h, linux_osdata_h): New macros.
8204 (server_h): Add common/common-utils.h, common/xml-utils.h,
8205 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8207 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8208 ptid.o, buffer.o): New rules.
8209 (linux-low.o): Add common/linux-osdata.h as a dependency.
8210 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8211 * configure.ac: Add AC_HEADER_DIRENT check.
8212 * config.in: Regenerate.
8213 * configure: Regenerate.
8214 * remote-utils.c (xml_escape_text): Delete.
8215 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8216 buffer_xml_printf): Move to common/buffer.c.
8217 * server.c (main): Remove call to initialize_inferiors.
8218 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8219 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8220 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8221 internal_error, gdb_assert, gdb_assert_fail): Delete.
8222 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8223 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8225 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8226 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8227 initialize_inferiors): Delete.
8229 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8231 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8234 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8236 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8238 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8240 2011-05-26 Yao Qi <yao@codesourcery.com>
8242 * Makefile.in (thread-db.o): Track dependence to
8243 common/gdb_thread_db.h.
8244 * thread-db.c: include gdb_thread_db.h from right place.
8246 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8248 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8249 __FILE__ and __LINE__ to internal_error.
8251 2011-05-13 Doug Evans <dje@google.com>
8253 * thread-db.c (try_thread_db_load_from_sdir): New function.
8254 (try_thread_db_load_from_dir): New function.
8255 (thread_db_load_search): Handle $sdir, ignore $pdir.
8256 Remove trying of system directories if search of
8257 libthread-db-search-path fails, that is now done via $sdir.
8259 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8261 * server.c (handle_query): Add EnableDisableTracepoints to the list
8262 of supported features.
8263 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8265 (cmd_qtenable_disable): New.
8266 (cmd_qtstart): Install tracepoints even if disabled.
8267 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8268 receiving a QTEnable or QTDisable packet.
8269 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8270 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8272 (gdb_probe): Skip data collection if static tracepoint is disabled.
8274 2011-05-10 Doug Evans <dje@google.com>
8276 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8278 2011-05-04 Doug Evans <dje@google.com>
8280 * linux-low.c (linux_join): Skip process lookup.
8281 * spu-low.c (spu_join): Ditto.
8282 * server.c (join_inferiors_callback): Delete.
8283 (process_serial_event): For 'D' packet (detach) call join_inferior
8286 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8288 * README: Don't mention xscale*-*-linux*.
8289 * configure.srv (xscale*-*-linux*): Don't handle target.
8291 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8293 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8295 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8296 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8297 (i386_emit_void_call_2): Likewise.
8299 2011-04-26 Yao Qi <yao@codesourcery.com>
8301 * linux-low.c: Move common macros to linux-ptrace.h.
8302 Include linux-ptrace.h.
8303 * Makefile.in (linux_ptrace_h): New.
8304 (linux-low.o): Depends on linux-ptrace.h.
8306 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8308 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8309 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8310 (remote_prepare): New function with most of the TCP code from ...
8311 (remote_open): ... here. Detect PORT here unconditionally. Move also
8312 setting transport_is_reliable.
8313 * server.c (run_once): New variable.
8314 (gdbserver_usage): Document it.
8315 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8316 the first run if RUN_ONCE.
8317 * server.h (run_once, remote_prepare): New declarations.
8319 2011-04-19 Tom Tromey <tromey@redhat.com>
8321 * win32-low.c (handle_load_dll): Remove duplicate "the".
8323 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8325 Remove support for old Cygwin 1.5 versions.
8326 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8327 function to avoid warning.
8328 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8331 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8333 * gdbserver/server.h (Macro _): Define it if not available.
8335 2011-03-14 Michael Snyder <msnyder@vmware.com>
8337 * hostio.c (handle_close): Remove unnecessary null test.
8339 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8341 * Makefile.in (maintainer-clean realclean distclean): Remove
8342 "make ... subdir_do" command.
8344 2011-03-10 Michael Snyder <msnyder@vmware.com>
8346 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8348 * server.c (handle_v_run): Free alloced buffer on early return.
8350 2011-03-09 Yao Qi <yao@codesourcery.com>
8353 2011-03-04 Yao Qi <yao@codesourcery.com>
8355 * Makefile.in: Remove GNU make feature --directory.
8357 2011-03-05 Yao Qi <yao@codesourcery.com>
8359 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8360 (subdir_do): New make target. Copied from gdb/Makefile.
8361 (maintainer-clean, realclean, distclean, clean): Call corresponding
8362 make targets in common/Makefile.
8364 2011-02-11 Yao Qi <yao@codesourcery.com>
8366 * configure.ac: Call AC_PROG_RANLIB.
8367 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8368 * configure: Regenerate.
8370 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8372 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8374 2011-03-06 Yao Qi <yao@codesourcery.com>
8376 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8378 2011-03-05 Yao Qi <yao@codesourcery.com>
8380 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8381 (subdir_do): New make target. Copied from gdb/Makefile.
8382 (maintainer-clean, realclean, distclean, clean): Call corresponding
8383 make targets in common/Makefile.
8385 2011-03-04 Yao Qi <yao@codesourcery.com>
8387 * Makefile.in: Remove GNU make feature --directory.
8389 2011-03-04 Michael Snyder <msnyder@vmware.com>
8391 * server.c (queue_stop_reply): Call xmalloc not malloc.
8393 2011-03-02 Michael Snyder <msnyder@vmware.com>
8395 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8397 2011-02-28 Michael Snyder <msnyder@vmware.com>
8399 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8400 (cmd_qtframe): Ditto.
8401 (cmd_qtbuffer): Ditto.
8402 (cmd_bigqtbuffer): Ditto.
8404 * utils.c (decimal2str): Initialize 'width' to nine, then
8407 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8409 * hostio.c (require_data): Free *data, not data.
8411 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8413 * hostio.c (require_data): Use free, not xfree.
8415 2011-02-27 Michael Snyder <msnyder@vmware.com>
8417 * server.c (handle_query): Discard unused value.
8419 * hostio.c (require_data): Free malloc memory before returning
8422 2011-02-26 Michael Snyder <msnyder@vmware.com>
8424 * linux-low.c (list_threads): Call closedir for dirent.
8426 2011-02-27 Michael Snyder <msnyder@vmware.com>
8428 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8429 a case statement falls through.
8431 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8433 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8436 2011-02-26 Michael Snyder <msnyder@vmware.com>
8438 * utils.c (decimal2str): Eliminate dead code and dead param.
8439 (pulongest): Drop dead param from call to decimal2str.
8442 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8444 Revert the following patch (not approved yet):
8445 2011-02-21 Hui Zhu <teawater@gmail.com>
8446 * tracepoint.c (tp_printf): New function.
8447 (eval_agent_expr): Handle gdb_agent_op_printf.
8449 2011-02-21 Hui Zhu <teawater@gmail.com>
8451 * tracepoint.c (tp_printf): New function.
8452 (eval_agent_expr): Handle gdb_agent_op_printf.
8454 2011-02-18 Tom Tromey <tromey@redhat.com>
8456 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8457 (tracepoint.o): Likewise.
8458 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8459 (gdb_agent_op_names): Likewise.
8461 2011-02-18 Tom Tromey <tromey@redhat.com>
8463 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8464 gdb_agent_op_rot>: New constants.
8465 (gdb_agent_op_names): Add pick and roll.
8466 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8469 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8471 * aclocal.m4: Regenerated with aclocal-1.11.1.
8473 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8475 * server.c (handle_qxfer_traceframe_info): New.
8476 (qxfer_packets): Register "traceframe-info".
8477 (handle_query): Report support for qXfer:traceframe-info:read+.
8478 * tracepoint.c (match_blocktype): New.
8479 (traceframe_find_block_type): Rename to ...
8480 (traceframe_walk_blocks): ... this. Add callback filter argument,
8482 (traceframe_find_block_type): New, reimplemented on top of
8483 traceframe_walk_blocks.
8484 (build_traceframe_info_xml): New.
8485 (traceframe_read_info): New.
8486 * server.h (traceframe_read_info): Declare.
8488 2011-02-11 Yao Qi <yao@codesourcery.com>
8490 * configure.ac: Call AC_PROG_RANLIB.
8491 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8492 * configure: Regenerate.
8494 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8496 * server.c (gdb_read_memory): Change return semantics to allow
8498 (handle_search_memory_1): Adjust.
8499 (process_serial_event) <'m' packet>: Handle partial transfers.
8500 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8502 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8504 * regcache.c (init_register_cache): Initialize
8505 regcache->register_status.
8506 (free_register_cache): Release regcache->register_status.
8507 (regcache_cpy): Copy register_status.
8508 (registers_to_string): Print 'x's for unavailable registers.
8509 (supply_register): Mark the register's status valid or
8510 unavailable, depending on whether a buffer was passed in or not.
8511 (supply_register_zeroed): New.
8512 (supply_regblock): Mark the registers' status valid or
8513 unavailable, depending on whether a buffer was passed in or not.
8514 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8515 (struct regcache): New `register_status' field.
8516 (supply_register_zeroed): Declare.
8517 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8518 supply_register_zeroed, rather than passing a NULL buffer to
8520 * tracepoint.c (fetch_traceframe_registers): Update comment.
8522 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8524 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8527 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8529 * server.h (decode_xfer_write): Change prototype.
8530 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8531 and don't extract the annex here.
8532 * server.c (decode_xfer_read): Remove `annex' parameter,
8533 and don't extract the annex here.
8535 (struct qxfer): New.
8536 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8537 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8538 (handle_qxfer_statictrace): New functions, abstracted out from
8539 handle_query, and made to use the struct qxfer interface.
8540 (handle_threads_qxfer_proper): Rename to ...
8541 (handle_qxfer_threads_proper): ... this.
8542 (handle_threads_qxfer): Rename to ...
8543 (handle_qxfer_threads): ... this. Adjust.
8544 (qxfer_packets): New array.
8545 (handle_qxfer): New function.
8546 (handle_query): Use handle_qxfer.
8548 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8550 * gdbreplay.c: Shorten lines of >= 80 columns.
8551 * linux-low.c: Ditto.
8552 * linux-ppc-low.c: Ditto.
8553 * linux-s390-low.c: Ditto.
8554 * linux-sparc-low.c: Ditto.
8555 * linux-x86-low.c: Ditto.
8556 * linux-xtensa-low.c: Ditto.
8557 * mem-break.c: Ditto.
8559 * regcache.h: Ditto.
8560 * remote-utils.c: Ditto.
8563 * thread-db.c: Ditto.
8564 * tracepoint.c: Ditto.
8566 * win32-low.h: Ditto.
8568 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8570 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8573 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8575 * server.c (gdbserver_version): Update copyright year in version
8577 * gdbreplay.c (gdbreplay_version): Ditto.
8579 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8581 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8582 * linux-bfin-low.c: New file.
8583 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8584 PT_DATA_ADDR for BFIN targets.
8585 * Makefile.in (SFILES): Add linux-bfin-low.c.
8586 (clean): Remove reg-bfin.c.
8587 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8588 * README: Mention supported Blackfin targets.
8590 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8592 * .gitignore: New file.
8594 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8596 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8598 2010-10-22 Jie Zhang <jie@codesourcery.com>
8600 * Makefile.in: Add FLAGS_TO_PASS variable.
8601 (install): Remove dependency of install-only and recursively
8602 invoke make for install-only.
8604 2010-10-04 Doug Evans <dje@google.com>
8606 * Makefile.in (uninstall): Use $(DESTDIR).
8608 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8612 * linux-x86-low.c (compat_siginfo_from_siginfo)
8613 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8614 si_code is < 0. Check for si_code == SI_TIMER before checking for
8617 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8619 * lynx-i386-low.c: New file.
8620 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8622 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8624 * lynx-low.c (ptrace_request_to_str): Remove handling for
8625 request values that have been removed in LynxOS 5.x.
8627 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8629 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8632 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8634 * configure.ac: Add --enable-inprocess-agent option.
8635 * configure: Rebuilt.
8637 2010-09-06 Yao Qi <yao@codesourcery.com>
8639 * linux-low.c (linux_kill): Remove unused variable.
8640 (linux_stabilize_threads): Likewise.
8641 * server.c (start_inferior): Likewise.
8642 (queue_stop_reply_callback): Likewise.
8643 * tracepoint.c (do_action_at_tracepoint): Likewise.
8645 2010-09-06 Yao Qi <yao@codesourcery.com>
8647 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8650 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8652 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8654 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8656 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8659 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8661 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8662 gdbserver/lynx-ppc-low.c: New files.
8663 * Makefile.in (lynx_low_h): New variable.
8664 (lynx-low.o, lynx-ppc-low.o): New rules.
8665 * configure.ac: On LynxOS, link with -lnetinet.
8666 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8667 * configure: regenerate.
8669 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8671 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8672 * configure.ac: Add check for vasprintf and vsnprintf.
8673 * configure, config.in: Regenerate.
8674 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8676 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8678 * gdbreplay.c: Move include of alloca.h up, next to include of
8680 * server.h: Add include of malloc.h.
8681 * mem-break.c: Remove include of malloc.h.
8682 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8684 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8686 * Makefile.in (memmem.o): Build with -Wno-error.
8688 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8690 * utils.c (xsnprintf): Make non-static.
8691 * server.h: Add xsnprintf declaration.
8692 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8693 replace calls to snprintf by calls to xsnprintf throughout.
8695 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8697 * configure.ac: Add configure check for alloca.
8698 * configure, config.in: Regenerate.
8699 * server.h: Include alloca.h if it exists.
8700 * gdbreplay.c: Include alloca.h if it exists.
8702 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8704 * linux-low.c (__SIGRTMIN): Define if not already defined.
8705 (linux_create_inferior): Check for __ANDROID__ rather than
8707 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8708 are already deferred.
8709 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8710 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8711 stopped and already has a pending signal to report.
8712 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8713 a pending signal to report or is moving out of a jump pad.
8714 (linux_init_signals): Check for __ANDROID__ rather than
8717 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8719 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8720 debug_threads check. Avoid a linear search when not doing debug
8723 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8725 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8726 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8727 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8728 (process_event): Change local fd's type to gdb_fildes_t.
8729 (create_file_handler): Adjust prototype.
8730 (delete_file_handler): Adjust prototype.
8731 (handle_file_event): Adjust prototype. Use pfildes.
8732 (create_file_event): Adjsut prototype.
8733 * remote-utils.c (remote_desc, listen_desc): Change type to
8735 * server.h: New gdb_fildes_t typedef.
8736 [USE_WIN32API]: Include winsock2.h.
8737 (delete_file_handler, add_file_handler): Adjust prototypes.
8739 * utils.c (pfildes): New.
8741 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8743 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8744 * configure: Regenerate.
8746 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8748 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8749 (linux_done_accessing_memory): ... this.
8750 (linux_target_ops): Adjust.
8751 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8752 * nto-low.c (nto_target_ops): Adjust comment.
8753 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8754 * spu-low.c (spu_target_ops): Adjust comment.
8755 * target.h (target_ops): Rename unprepare_to_access_memory field
8756 to done_accessing_memory.
8757 (unprepare_to_access_memory): Rename to ...
8758 (done_accessing_memory): ... this.
8760 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8762 * linux-low.c (linux_prepare_to_access_memory): New.
8763 (linux_unprepare_to_access_memory): New.
8764 (linux_target_ops): Install them.
8765 * server.c (read_memory): Rename to ...
8766 (gdb_read_memory): ... this. Use
8767 prepare_to_access_memory/prepare_to_access_memory.
8768 (write_memory): Rename to ...
8769 (gdb_write_memory): ... this. Use
8770 prepare_to_access_memory/prepare_to_access_memory.
8771 (handle_search_memory_1): Adjust.
8772 (process_serial_event): Adjust.
8773 * target.h (struct target_ops): New fields
8774 prepare_to_access_memory and unprepare_to_access_memory.
8775 (prepare_to_access_memory, unprepare_to_access_memory): New.
8776 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8777 prepare_to_access_memory/prepare_to_access_memory.
8778 * nto-low.c (nto_target_ops): Adjust.
8779 * spu-low.c (spu_target_ops): Adjust.
8780 * win32-low.c (win32_target_ops): Adjust.
8782 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8784 * Makefile.in (WARN_CFLAGS): Get it from configure.
8785 (WERROR_CFLAGS): New.
8786 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8787 * configure.ac: Introduce --enable-werror, which adds -Werror to
8788 the compiler command line. Enabled by default. Disable with
8789 --disable-werror. Add -Wdeclaration-after-statement
8790 Wpointer-arith and -Wformat-nonliteral to warning flags.
8791 * configure: Regenerate.
8793 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8795 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8797 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8799 * gdbreplay.c (remote_error): New.
8801 (expect): Use gdbchar. Check for error reading from GDB.
8802 Clarify sync error output.
8803 (play): Check for errors writing to GDB.
8804 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8805 * remote-utils.c (getpkt): Check for errors writing to the remote
8808 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8810 * linux-low.c (linux_wait_1): Move non-debugging code out of
8811 `debug_threads' control.
8813 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8815 * linux-low.c (linux_wait_1): Don't set last_status here.
8816 * server.c (push_event, queue_stop_reply_callback): Assert we're
8817 not pushing a TARGET_WAITKIND_IGNORE event.
8818 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8819 (myresume, handle_target_event): Set the thread's last_resume_kind
8820 and last_status from the target returned status.
8822 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8826 * linux-x86-low.c (update_debug_registers_callback): New.
8827 (i386_dr_low_set_addr): Use it.
8828 (i386_dr_low_get_addr): New.
8829 (i386_dr_low_set_control): Use update_debug_registers_callback.
8830 (i386_dr_low_get_control): New.
8831 (i386_dr_low_get_status): Adjust.
8832 * linux-low.c (linux_stop_lwp): New.
8833 * linux-low.h (linux_stop_lwp): Declare.
8835 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8836 argument instead of a i386_debug_reg_state.
8837 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8838 a i386_debug_reg_state.
8839 (i386_insert_aligned_watchpoint): Adjust.
8840 (i386_remove_aligned_watchpoint): Adjust.
8841 (i386_low_stopped_data_address): Read the debug registers from the
8842 inferior instead of from the mirrors.
8843 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8844 (i386_dr_low_get_addr): Declare.
8845 (i386_dr_low_get_control): Declare.
8846 (i386_dr_low_get_status): Change prototype.
8848 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8849 (i386_dr_low_get_addr): New.
8850 (i386_dr_low_get_control): New.
8851 (i386_dr_low_get_status): Adjust prototype. Return
8853 (i386_initial_stuff): Clear dr_status_mirror and
8855 (i386_get_thread_context): Adjust.
8856 (i386_set_thread_context): Adjust.
8857 (i386_thread_added): Adjust.
8859 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8861 * linux-low.h (linux_thread_area): Delete declaration.
8863 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8865 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8866 after its termination.
8868 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8870 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8871 (gdb_wants_all_stopped): Delete.
8872 (linux_wait_1): Don't call them.
8873 * server.c (handle_v_cont): Tag all threads as want-stopped.
8874 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8875 stopped as "client-wants-stopped".
8877 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8879 * Makefile.in (signals_h): New.
8880 (server_h): Depend on it.
8881 (server.o): Don't depend on $(signals_def).
8882 (signals.o): Depend on $(signals_def).
8884 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8886 * Makefile.in (signals_def): New.
8887 (server_h): Append include/gdb/signals.h and signals_def.
8888 (server.o): Append signals_def.
8890 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8892 * server.c (handle_target_event): Use target_signal_to_host for
8893 resume_info.sig initialization.
8894 * target.h (struct thread_resume) <sig>: New comment.
8896 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8898 * server.c (handle_query): strcpy() the returned string from paddress()
8899 instead of sprintf().
8900 * utils.c (paddress): Return phex_nz().
8902 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8904 * server.c (handle_v_cont): Call mourn_inferior if process
8906 (myresume): Likewise.
8908 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8910 Static tracepoints, and integration with UST.
8912 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8913 * mem-break.c (uninsert_all_breakpoints)
8914 (reinsert_all_breakpoints): New.
8915 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8916 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8917 (gdb_agent_ust_loaded, helper_thread_id)
8918 (gdb_agent_helper_thread_id): New macros.
8919 (struct ipa_sym_addresses): Add addr_ust_loaded,
8920 addr_helper_thread_id, addr_cmd_buf.
8921 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8922 (in_process_agent_loaded_ust): New.
8923 (write_e_ust_not_loaded): New.
8924 (maybe_write_ipa_ust_not_loaded): New.
8925 (struct collect_static_trace_data_action): New.
8926 (enum tracepoint_type) <static_tracepoint>: New.
8927 (struct tracepoint) <handle>: Mention static tracepoints.
8928 (struct static_tracepoint_ctx): New.
8929 (CMD_BUF_SIZE): New.
8930 (add_tracepoint_action): Handle static tracepoint actions.
8931 (unprobe_marker_at): New.
8932 (clear_installed_tracepoints): Handle static tracepoints.
8933 (cmd_qtdp): Handle static tracepoints.
8934 (probe_marker_at): New.
8935 (cmd_qtstart): Handle static tracepoints.
8936 (response_tracepoint): Handle static tracepoints.
8937 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8938 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8939 (get_context_regcache): Handle static tracepoints.
8940 (do_action_at_tracepoint): Handle static tracepoint actions.
8941 (traceframe_find_block_type): Handle static trace data blocks.
8942 (traceframe_read_sdata): New.
8943 (download_tracepoints): Download static tracepoint actions.
8944 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8945 (GDB_PROBE_NAME): New.
8950 (ust_marker_to_static_tracepoint): New.
8952 (collect_ust_data_at_tracepoint): New.
8953 (gdb_ust_probe): New.
8954 (UNIX_PATH_MAX, SOCK_DIR): New.
8955 (gdb_ust_connect_sync_socket): New.
8956 (resume_thread, stop_thread): New.
8957 (run_inferior_command): New.
8958 (init_named_socket): New.
8959 (gdb_ust_socket_init): New.
8960 (cstr_to_hexstr): New.
8962 (first_marker, next_marker): New.
8963 (response_ust_marker): New.
8964 (cmd_qtfstm, cmd_qtsstm): New.
8965 (unprobe_marker_at, probe_marker_at): New.
8966 (cmd_qtstmat, gdb_ust_thread): New.
8967 (gdb_ust_init): New.
8968 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8969 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8971 (x86_64_st_collect_regmap): New.
8972 (X86_64_NUM_ST_COLLECT_GREGS): New.
8973 (AMD64_RIP_REGNUM): New.
8974 (supply_static_tracepoint_registers): New.
8975 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8977 (i386_st_collect_regmap): New.
8978 (i386_NUM_ST_COLLECT_GREGS): New.
8979 (supply_static_tracepoint_registers): New.
8980 * server.c (handle_query): Handle qXfer:statictrace:read.
8981 <qSupported>: Report support for StaticTracepoints, and
8982 qXfer:statictrace:read features.
8983 * server.h (traceframe_read_sdata)
8984 (supply_static_tracepoint_registers): Declare.
8985 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8986 (unpack_varlen_hex): Include in IPA build.
8987 * Makefile.in (ustlibs, ustinc): New.
8988 (IPA_OBJS): Add remote-utils-ipa.o.
8989 ($(IPA_LIB)): Link -ldl and -lpthread.
8991 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8992 * config.in, configure: Regenerate.
8994 2010-06-20 Ian Lance Taylor <iant@google.com>
8995 Pedro Alves <pedro@codesourcery.com>
8997 * linux-x86-low.c (always_true): Delete.
8998 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8999 trying to fool the compiler with always_true.
9001 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9003 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9004 conditions in gdbserver.
9006 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9008 * spu-low.c (spu_read_memory): Wrap around local store limit.
9009 (spu_write_memory): Likewise.
9011 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9013 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9014 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9016 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9018 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9019 uses with LONGEST uses.
9021 2010-06-14 Stan Shebs <stan@codesourcery.com>
9022 Pedro Alves <pedro@codesourcery.com>
9026 * linux-x86-low.c: Include limits.h.
9031 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9032 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9033 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9034 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9035 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9036 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9037 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9038 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9039 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9040 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9041 (amd64_emit_void_call_2): New.
9042 (amd64_emit_ops): New.
9043 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9044 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9045 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9046 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9047 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9048 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9049 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9050 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9051 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9052 (i386_emit_stack_adjust, i386_emit_int_call_1)
9053 (i386_emit_void_call_2): New.
9054 (i386_emit_ops): New.
9055 (x86_emit_ops): New.
9056 (the_low_target): Install x86_emit_ops.
9057 * server.h (struct emit_ops): New.
9058 (get_raw_reg_func_addr): Declare.
9059 (current_insn_ptr, emit_error): Declare.
9060 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9061 (set_trace_state_variable_value): New defines.
9062 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9063 addr_get_trace_state_variable_value and
9064 addr_set_trace_state_variable_value.
9065 (symbol_list): New fields for get_raw_reg,
9066 get_trace_state_variable_value and set_trace_state_variable_value.
9067 (condfn): New typedef.
9068 (struct tracepoint): New field `compiled_cond'.
9069 (do_action_at_tracepoint): Clear compiled_cond.
9070 (get_trace_state_variable_value, set_trace_state_variable_value):
9072 (condition_true_at_tracepoint): If there's a compiled condition,
9074 (current_insn_ptr, emit_error): New globals.
9075 (struct bytecode_address): New.
9076 (get_raw_reg_func_addr): New.
9077 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9078 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9079 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9080 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9081 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9082 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9083 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9084 (compile_tracepoint_condition, compile_bytecodes): New.
9085 * target.h (emit_ops): Forward declare.
9086 (struct target_ops): New field emit_ops.
9087 (target_emit_ops): New.
9088 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9089 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9090 * linux-low.c (linux_emit_ops): New.
9091 (linux_target_ops): Install it.
9092 * linux-low.h (struct linux_target_ops): New field emit_ops.
9094 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9096 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9097 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9099 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9100 Stan Shebs <stan@codesourcery.com>
9102 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9103 (all): Depend on $(extra_libraries).
9104 (install-only): Install the IPA.
9105 (IPA_OBJS, IPA_LIB): New.
9106 (clean): Remove the IPA lib.
9107 (IPAGENT_CFLAGS): New.
9108 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9109 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9110 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9111 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9112 * configure.ac: Check for atomic builtins support in the compiler.
9113 (IPA_DEPFILES, extra_libraries): Define.
9114 * configure.srv (ipa_obj): Add description.
9115 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9116 (i[34567]86-*-linux*): Set ipa_obj.
9117 (x86_64-*-linux*): Set ipa_obj.
9118 * linux-low.c (stabilizing_threads): New.
9119 (supports_fast_tracepoints): New.
9120 (linux_detach): Stabilize threads before detaching.
9121 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9122 the lwp is either not stabilizing, or is moving out of a jump pad.
9123 (linux_fast_tracepoint_collecting): New.
9124 (maybe_move_out_of_jump_pad): New.
9125 (enqueue_one_deferred_signal): New.
9126 (dequeue_one_deferred_signal): New.
9127 (linux_wait_for_event_1): If moving out of a jump pad, defer
9128 pending signals to later.
9129 (linux_stabilize_threads): New.
9130 (linux_wait_1): Check if threads need moving out of jump pads, and
9132 (stuck_in_jump_pad_callback): New.
9133 (move_out_of_jump_pad_callback): New.
9135 (linux_resume_one_lwp): Handle moving out of jump pads.
9136 (linux_set_resume_request): Dequeue deferred signals.
9137 (need_step_over_p): Also step over fast tracepoint jumps.
9138 (start_step_over): Also uninsert fast tracepoint jumps.
9139 (finish_step_over): Also reinsert fast tracepoint jumps.
9140 (linux_install_fast_tracepoint_jump): New.
9141 (linux_target_ops): Install linux_stabilize_threads and
9142 linux_install_fast_tracepoint_jump_pad.
9143 * linux-low.h (linux_target_ops) <get_thread_area,
9144 install_fast_tracepoint_jump_pad>: New fields.
9145 (struct lwp_info) <collecting_fast_tracepoint,
9146 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9147 (linux_get_thread_area): Declare.
9148 * linux-x86-low.c (jump_insn): New.
9149 (x86_get_thread_area): New.
9150 (append_insns): New.
9152 (amd64_install_fast_tracepoint_jump_pad): New.
9153 (i386_install_fast_tracepoint_jump_pad): New.
9154 (x86_install_fast_tracepoint_jump_pad): New.
9155 (the_low_target): Install x86_get_thread_area and
9156 x86_install_fast_tracepoint_jump_pad.
9157 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9158 (struct fast_tracepoint_jump): New.
9159 (fast_tracepoint_jump_insn): New.
9160 (fast_tracepoint_jump_shadow): New.
9161 (find_fast_tracepoint_jump_at): New.
9162 (fast_tracepoint_jump_here): New.
9163 (delete_fast_tracepoint_jump): New.
9164 (set_fast_tracepoint_jump): New.
9165 (uninsert_fast_tracepoint_jumps_at): New.
9166 (reinsert_fast_tracepoint_jumps_at): New.
9167 (set_breakpoint_at): Use write_inferior_memory.
9168 (uninsert_raw_breakpoint): Use write_inferior_memory.
9169 (check_mem_read): Mask out fast tracepoint jumps.
9170 (check_mem_write): Mask out fast tracepoint jumps.
9171 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9172 (set_fast_tracepoint_jump): Declare.
9173 (delete_fast_tracepoint_jump)
9174 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9175 (reinsert_fast_tracepoint_jumps_at): Declare.
9176 * regcache.c: Don't compile many functions when building the
9177 in-process agent library.
9178 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9179 the register buffer in the heap.
9180 (free_register_cache): If the register buffer isn't owned by the
9181 regcache, don't free it.
9182 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9183 pre-existing register caches.
9184 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9186 (convert_ascii_to_int): : Constify `from' parameter type.
9187 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9188 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9189 the needed buffer in-place.
9190 (relocate_instruction): New.
9191 * server.c (handle_query) <qSymbols>: If the target supports
9192 tracepoints, give it a chance of looking up symbols. Report
9193 support for fast tracepoints.
9194 (handle_status): Stabilize threads.
9195 (process_serial_event): Adjust.
9196 * server.h (struct fast_tracepoint_jump): Forward declare.
9197 (struct process_info) <fast_tracepoint_jumps>: New field.
9198 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9199 (decode_X_packet, decode_M_packet): Adjust.
9200 (relocate_instruction): Declare.
9201 (in_process_agent_loaded): Declare.
9202 (tracepoint_look_up_symbols): Declare.
9203 (struct fast_tpoint_collect_status): Declare.
9204 (fast_tracepoint_collecting): Declare.
9205 (force_unlock_trace_buffer): Declare.
9206 (handle_tracepoint_bkpts): Declare.
9207 (initialize_low_tracepoint)
9208 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9209 * target.h (struct target_ops) <stabilize_threads,
9210 install_fast_tracepoint_jump_pad>: New fields.
9211 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9212 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9213 [HAVE_STDINT_H]: Include stdint.h.
9214 (trace_debug_1): Rename to ...
9215 (trace_vdebug): ... this.
9216 (trace_debug): Rename to ...
9217 (trace_debug_1): ... this. Add `level' parameter.
9219 (ATTR_USED, ATTR_NOINLINE): New.
9220 (IP_AGENT_EXPORT): New.
9221 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9222 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9223 (about_to_request_buffer_space, trace_buffer_is_full)
9224 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9225 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9226 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9227 (traceframe_write_count, traceframes_created)
9228 (trace_state_variables)
9229 New renaming defines.
9230 (struct ipa_sym_addresses): New.
9231 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9233 (ipa_sym_addrs): New.
9234 (all_tracepoint_symbols_looked_up): New.
9235 (in_process_agent_loaded): New.
9236 (write_e_ipa_not_loaded): New.
9237 (maybe_write_ipa_not_loaded): New.
9238 (tracepoint_look_up_symbols): New.
9239 (debug_threads) [IN_PROCESS_AGENT]: New.
9240 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9241 (UNKNOWN_SIDE_EFFECTS): New.
9242 (stop_tracing): New.
9243 (flush_trace_buffer): New.
9244 (stop_tracing_bkpt): New.
9245 (flush_trace_buffer_bkpt): New.
9246 (read_inferior_integer): New.
9247 (read_inferior_uinteger): New.
9248 (read_inferior_data_pointer): New.
9249 (write_inferior_data_pointer): New.
9250 (write_inferior_integer): New.
9251 (write_inferior_uinteger): New.
9252 (struct collect_static_trace_data_action): Delete.
9253 (enum tracepoint_type): New.
9254 (struct tracepoint) <type>: New field `type'.
9255 <actions_str, step_actions, step_actions_str>: Only include in
9257 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9258 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9259 (tracepoints): Use IP_AGENT_EXPORT.
9260 (last_tracepoint): Don't include in the IPA.
9261 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9262 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9263 (alloced_trace_state_variables): New.
9264 (trace_state_variables): Use IP_AGENT_EXPORT.
9265 (traceframe_t): Delete unused variable.
9266 (circular_trace_buffer): Don't include in the IPA.
9267 (trace_buffer_start): Delete.
9268 (struct trace_buffer_control): New.
9269 (trace_buffer_free): Delete.
9270 (struct ipa_trace_buffer_control): New.
9271 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9272 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9274 (trace_buffer_ctrl): New.
9275 (TRACE_BUFFER_CTRL_CURR): New.
9276 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9277 Reimplement as macros.
9278 (trace_buffer_wrap): Delete.
9279 (traceframe_write_count, traceframe_read_count)
9280 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9281 (struct tracepoint_hit_ctx) <type>: New field.
9282 (struct fast_tracepoint_ctx): New.
9283 (memory_barrier): New.
9285 (record_tracepoint_error): Update atomically in the IPA.
9286 (clear_inferior_trace_buffer): New.
9287 (about_to_request_buffer_space): New.
9288 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9289 updating the same buffer.
9290 (add_tracepoint): Default the tracepoint's type to trap
9291 tracepoint, and orig_size to -1.
9292 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9294 (create_trace_state_variable): New parameter `gdb'. Handle it.
9295 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9296 (cmd_qtdp): Handle fast tracepoints.
9298 (max_jump_pad_size): New.
9299 (gdb_jump_pad_head): New.
9300 (get_jump_space_head): New.
9301 (claim_jump_space): New.
9302 (sort_tracepoints): New.
9303 (MAX_JUMP_SIZE): New.
9304 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9306 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9307 support. Upload fast traceframes, and delete internal IPA
9309 (stop_tracing_handler): New.
9310 (flush_trace_buffer_handler): New.
9311 (cmd_qtstop): Upload fast tracepoints.
9312 (response_tracepoint): Handle fast tracepoints.
9313 (tracepoint_finished_step): Upload fast traceframes. Set the
9314 tracepoint hit context's tracepoint type.
9315 (handle_tracepoint_bkpts): New.
9316 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9317 type. Add comment about fast tracepoints.
9318 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9319 non-existing action_str field.
9320 (get_context_regcache): Handle fast tracepoints.
9321 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9323 (fast_tracepoint_from_jump_pad_address): New.
9324 (fast_tracepoint_from_ipa_tpoint_address): New.
9325 (collecting_t): New.
9326 (force_unlock_trace_buffer): New.
9327 (fast_tracepoint_collecting): New.
9330 (write_inferior_data_ptr): New.
9331 (target_tp_heap): New.
9332 (target_malloc): New.
9333 (download_agent_expr): New.
9335 (download_tracepoints): New.
9336 (download_trace_state_variables): New.
9337 (upload_fast_traceframes): New.
9338 (IPA_FIRST_TRACEFRAME): New.
9339 (IPA_NEXT_TRACEFRAME_1): New.
9340 (IPA_NEXT_TRACEFRAME): New.
9341 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9342 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9343 (gdb_jump_pad_buffer_end): New.
9344 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9345 (initialize_tracepoint): Adjust.
9346 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9347 buffer. Initialize the low module.
9348 * utils.c (PREFIX, TOOLNAME): New.
9349 (malloc_failure): Use PREFIX.
9350 (error): In the IPA, an error causes an exit.
9351 (fatal, warning): Use PREFIX.
9352 (internal_error): Use TOOLNAME.
9353 (NUMCELLS): Increase to 10.
9354 * configure, config.in: Regenerate.
9356 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9358 * server.c (handle_query) <qSupported>: Do two passes over the
9359 qSupported string to avoid nesting strtok.
9361 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9363 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9365 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9367 * configure: Regenerate.
9368 * proc-service.list: New.
9370 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9372 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9375 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9377 * gdbreplay.c (remote_open): Check error return from socket() call by
9378 its equality to -1 not by it being negative.
9379 * remote-utils.c (remote_open): Likewise.
9381 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9383 * config.h: Regenerate.
9385 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9387 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9388 doesn't provide PTRACE_GET_THREAD_AREA.
9390 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9392 * linux-m68k-low.c: Include <asm/ptrace.h>
9393 (ps_get_thread_area): Implement.
9395 2010-05-03 Doug Evans <dje@google.com>
9397 * event-loop.c (struct callback_event): New struct.
9398 (callback_list): New global.
9399 (append_callback_event, delete_callback_event): New functions.
9400 (process_callback): New function.
9401 (start_event_loop): Call it.
9402 * remote-utils.c (NOT_SCHEDULED): Define.
9403 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9404 moved out of readchar.
9405 (readchar): Rewrite. Call reschedule before returning.
9406 (reset_readchar): New function.
9407 (remote_close): Call it.
9408 (process_remaining, reschedule): New functions.
9409 * server.h (callback_handler_func): New typedef.
9410 (append_callback_event, delete_callback_event): Declare.
9412 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9414 * proc-service.c (ps_pglobal_lookup): Use
9415 thread_db_look_up_one_symbol.
9416 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9417 parameter. Use it instead of all_symbols_looked_up.
9418 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9420 (all_symbols_looked_up): Don't declare.
9421 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9422 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9424 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9425 Set all_symbols_looked_up here.
9426 (thread_db_look_up_one_symbol): New.
9427 (thread_db_get_tls_address): Adjust.
9428 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9429 thread_db object on the heap, and tentatively set it in the
9431 (thread_db_init): Don't set all_symbols_looked_up here.
9432 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9434 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9436 * linux-low.c (linux_kill, linux_detach): Adjust.
9437 (status_pending_p_callback): Remove redundant statement. Check
9438 for !TARGET_WAITIKIND_IGNORE, instead of
9439 TARGET_WAITKIND_STOPPED.
9440 (handle_tracepoints): Make sure LWP is locked. Adjust.
9441 (linux_wait_for_event_1): Adjust.
9442 (linux_cancel_breakpoints): New.
9443 (unsuspend_one_lwp): New.
9444 (unsuspend_all_lwps): New.
9445 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9446 (send_sigstop_callback): Change return type to int, add new
9447 `except' parameter and handle it.
9448 (suspend_and_send_sigstop_callback): New.
9449 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9450 pass them down. If SUSPEND, also increment the lwp's suspend
9452 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9453 (need_step_over_p): Don't consider suspended LWPs.
9454 (start_step_over): Adjust.
9455 (proceed_one_lwp): Change return type to int, add new `except'
9456 parameter and handle it.
9457 (unsuspend_and_proceed_one_lwp): New.
9458 (proceed_all_lwps): Use find_inferior instead of
9460 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9461 also decrement the suspend count of LWPs. Pass `except' down,
9462 instead of hacking its suspend count.
9463 (linux_pause_all): Add `freeze' parameter. Adjust.
9464 (linux_unpause_all): New.
9465 (linux_target_ops): Install linux_unpause_all.
9466 * server.c (handle_status): Adjust.
9467 * target.h (struct target_ops): New fields `unpause_all' and
9468 `cancel_breakpoints'. Add new parameter to `pause_all'.
9469 (pause_all): Add new `freeze' parameter.
9471 (cancel_breakpoints): New.
9472 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9474 (cmd_qtstart): Pause threads.
9475 (stop_tracing): Pause threads, and cancel breakpoints.
9476 * win32-low.c (win32_target_ops): Adjust.
9478 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9480 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9481 the inferior right away from here...
9482 (linux_wait_1): ... to here, and adjust to check the thread's
9483 last_resume_kind instead of the lwp's step or stop_expected flags.
9485 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9487 * README: Use consistent `GDB' and `GDBserver' spellings.
9489 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9491 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9492 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9493 (linux_detach_one_lwp): Assume the lwp is stopped.
9494 (any_thread_of): Delete.
9495 (linux_detach): Stop all lwps here. Don't blindly delete all
9497 (delete_lwp_callback): New.
9498 (linux_mourn): Delete all lwps of the process that is gone.
9499 (linux_wait_1): Don't delete the last lwp of the process here.
9500 * mem-break.h (mark_breakpoints_out): Declare.
9501 * mem-break.c (mark_breakpoints_out): New.
9502 (free_all_breakpoints): Use it.
9503 * server.c (handle_target_event): If the process is gone, mark
9505 * thread-db.c (struct thread_db) <create_bp>: New field.
9506 (thread_db_enable_reporting): Fix prototype. Store a thread event
9507 breakpoint reference in the thread_db struct.
9508 (thread_db_load_search): Clear the thread_db object.
9509 (try_thread_db_load_1): Ditto.
9510 (switch_to_process): New.
9511 (disable_thread_event_reporting): Use it.
9512 (remove_thread_event_breakpoints): New.
9513 (thread_db_detach, thread_db_mourn): Use it.
9515 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9517 * linux-low.c (linux_enable_event_reporting): New.
9518 (linux_wait_for_event_1, handle_extended_wait): Use it.
9520 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9522 * linux-low.c (linux_kill_one_lwp, linux_kill)
9523 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9524 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9525 SIGSTOP even if the LWP is stopped.
9526 (send_sigstop_callback): New.
9527 (stop_all_lwps): Use send_sigstop_callback instead.
9528 (linux_resume_one_thread): Adjust.
9529 (proceed_one_lwp): Still proceed an LWP that the client has
9530 requested to stop, if we haven't reported it as stopped yet. Make
9531 sure that LWPs the client want stopped, have a pending SIGSTOP.
9533 2010-04-26 Doug Evans <dje@google.com>
9535 * server.c (handle_general_set): Make static.
9537 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9538 Print received char after testing for error/eof instead of before.
9539 (input_interrupt): Tweak comment.
9541 2010-04-23 Doug Evans <dje@google.com>
9543 * server.c (start_inferior): Print inferior argv if --debug.
9545 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9547 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9548 * nto-x86-low.c: Include server.h
9550 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9552 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9553 be consistent with other sources of this directory.
9554 (init_registers_amd64): Correct name of source file of this function
9557 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9559 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9562 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9564 * win32-i386-low.c: Add 64-bit support.
9565 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9566 (init_registers_amd64): Declare.
9567 (mappings): Add 64-bit version of array.
9568 (init_windows_x86): New function.
9569 (the_low_target): Change init_arch field to init_windows_x86.
9571 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9573 * win32-low.c: Adapt to support also 64-bit architecture.
9574 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9575 (get_image_name): Use SIZE_T type for local variable `done'.
9576 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9577 (toolhelp_get_dll_name): Idem.
9578 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9579 Use uintptr_t typecast to avoid warning.
9580 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9581 (handle_exception): Use phex_nz to avoid warning.
9582 (win32_wait): Remove unused local variable `process'.
9584 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9586 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9589 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9591 * configure.ac: Use `ws2_32' library for srv_mingw.
9592 * configure: Regenerate.
9593 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9594 * remote-utils.c: Likewise.
9596 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9598 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9599 if __x86_64__ is defined.
9601 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9603 * configure: Regenerate.
9605 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9607 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9608 * target.h (target_ops): New get_tib_address field.
9609 * win32-low.h (win32_thread_info): Add thread_local_base field.
9610 * win32-low.c (child_add_thread): Add tlb argument.
9611 Set thread_local_base field to TLB.
9612 (get_child_debug_event): Adapt to child_add_thread change.
9613 (win32_get_tib_address): New function.
9614 (win32_target_ops): Set get_tib_address field to
9615 win32_get_tib_address.
9616 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9618 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9620 * linux-low.c (linux_mourn): Also remove the process.
9621 * server.c (handle_target_event): Don't remove the process here.
9622 * nto-low.c (nto_mourn): New.
9623 (nto_target_ops): Install it.
9624 * spu-low.c (spu_mourn): New.
9625 (spu_target_ops): Install it.
9626 * win32-low.c (win32_mourn): New.
9627 (win32_target_ops): Install it.
9629 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9631 * server.h (buffer_xml_printf): Remove redundant `;'.
9633 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9635 * regcache.c (set_register_cache): Invalidate regcaches before
9636 changing the register cache layout.
9637 (regcache_invalidate_one): Allow a NULL regcache.
9638 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9639 regcaches before changing the register cache layout or the target
9642 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9644 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9645 variable warning on Linux/x86-64.
9647 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9649 GDBserver disconnected tracing support.
9651 * linux-low.c (linux_remove_process): Delete.
9652 (add_lwp): Don't set last_resume_kind here.
9653 (linux_kill): Use `mourn'.
9654 (linux_detach): Use `thread_db_detach', and `mourn'.
9656 (linux_attach_lwp_1): Adjust comment.
9657 (linux_attach): last_resume_kind moved the thread_info; adjust.
9658 (status_pending_p_callback): Adjust.
9659 (linux_wait_for_event_1): Adjust.
9660 (count_events_callback, select_singlestep_lwp_callback)
9661 (select_event_lwp_callback, cancel_breakpoints_callback)
9662 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9663 (proceed_one_lwp): Adjust.
9664 (linux_async): Add debug output.
9665 (linux_thread_stopped): New.
9666 (linux_pause_all): New.
9667 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9669 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9670 (thread_db_free): Delete declaration.
9671 (thread_db_detach, thread_db_mourn): Declare.
9672 * thread-db.c (thread_db_init): Use thread_db_mourn.
9673 (thread_db_free): Delete, split in two.
9674 (disable_thread_event_reporting): New.
9675 (thread_db_detach): New.
9676 (thread_db_mourn): New.
9678 * server.h (struct thread_info) <last_resume_kind>: New field.
9679 <attached>: Add comment.
9680 <gdb_detached>: New field.
9681 (handler_func): Change return type to int.
9682 (handle_serial_event, handle_target_event): Ditto.
9683 (gdb_connected): Declare.
9685 (disconnected_tracing): Declare.
9686 (stop_tracing): Declare.
9688 * server.c (handle_query) <qSupported>: Report support for
9689 disconnected tracing.
9690 (queue_stop_reply_callback): Account for running threads.
9691 (gdb_wants_thread_stopped): New.
9692 (gdb_wants_all_threads_stopped): New.
9693 (gdb_reattached_process): New.
9694 (handle_status): Clear the `gdb_detached' flag of all processes.
9695 In all-stop, stop all threads.
9696 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9697 (process_serial_event): If the remote connection breaks, or if an
9698 exit was forced with "monitor exit", force an event loop exit.
9699 Handle disconnected tracing on detach.
9700 (handle_serial_event): Adjust.
9701 (handle_target_event): If GDB isn't connected, forward events back
9702 to the inferior, unless the last process exited, in which case,
9703 exit gdbserver. Adjust interface.
9705 * remote-utils.c (remote_open): Don't block in accept. Instead
9706 register an event loop source on the listen socket file
9707 descriptor. Refactor bits into ...
9708 (listen_desc): ... this new global.
9709 (gdb_connected): ... this new function.
9710 (enable_async_notification): ... this new function.
9711 (handle_accept_event): ... this new function.
9712 (remote_close): Clear remote_desc.
9714 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9716 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9718 (mourn_inferior): Define.
9719 (target_process_qsupported): Avoid the dangling else problem.
9720 (thread_stopped): Define.
9721 (pause_all): Define.
9722 (target_waitstatus_to_string): Declare.
9723 * target.c (target_waitstatus_to_string): New.
9725 * tracepoint.c (tracing): Make extern.
9726 (disconnected_tracing): New.
9727 (stop_tracing): Make extern. Handle tracing stops due to GDB
9729 (cmd_qtdisconnected): New.
9730 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9731 (handle_tracepoint_general_set): Handle QTDisconnected.
9733 * event-loop.c (event_handler_func): Change return type to int.
9734 (process_event): Bail out if the event handler wants the event
9736 (handle_file_event): Ditto.
9737 (start_event_loop): Bail out if the event handler wants the event
9740 * nto-low.c (nto_target_ops): Adjust.
9741 * spu-low.c (spu_wait): Don't remove the process here.
9742 (spu_target_ops): Adjust.
9743 * win32-low.c (win32_wait): Don't remove the process here.
9744 (win32_target_ops): Adjust.
9746 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9748 * regcache.c (realloc_register_cache): Invalidate inferior's
9749 regcache before recreating it.
9751 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9753 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9755 2010-04-09 Stan Shebs <stan@codesourcery.com>
9756 Pedro Alves <pedro@codesourcery.com>
9758 * server.h (LONGEST): New.
9759 (struct thread_info) <while_stepping>: New field.
9760 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9762 (initialize_tracepoint, handle_tracepoint_general_set)
9763 (handle_tracepoint_query, tracepoint_finished_step)
9764 (tracepoint_was_hit, release_while_stepping_state_list):
9765 (current_traceframe): Declare.
9766 * server.c (handle_general_set): Handle tracepoint packets.
9768 (write_memory): New.
9769 (handle_search_memory_1): Use read_memory.
9770 (handle_query): Report support for conditional tracepoints, trace
9771 state variables, and tracepoint sources. Handle tracepoint
9773 (main): Initialize the tracepoints module.
9774 (process_serial_event): Handle traceframe reads/writes.
9776 * linux-low.c (handle_tracepoints): New.
9777 (linux_wait_1): Call it.
9778 (linux_resume_one_lwp): Handle while-stepping.
9779 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9780 (linux_target_ops): Install them.
9781 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9783 * linux-x86-low.c (x86_supports_tracepoints): New.
9784 (the_low_target). Install it.
9786 * mem-break.h (delete_breakpoint): Declare.
9787 * mem-break.c (delete_breakpoint): Make external.
9789 * target.h (struct target_ops): Add `supports_tracepoints',
9790 `read_pc', and `write_pc' fields.
9791 (target_supports_tracepoints): Define.
9792 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9795 * regcache.h (struct regcache) <registers_owned>: New field.
9796 (init_register_cache, regcache_cpy): Declare.
9797 (regcache_read_pc, regcache_write_pc): Declare.
9798 (register_cache_size): Declare.
9799 (supply_regblock): Declare.
9800 * regcache.c (init_register_cache): New.
9801 (new_register_cache): Use it.
9802 (regcache_cpy): New.
9803 (register_cache_size): New.
9804 (supply_regblock): New.
9805 (regcache_read_pc, regcache_write_pc): New.
9807 * tracepoint.c: New.
9809 * Makefile.in (OBS): Add tracepoint.o.
9810 (tracepoint.o): New rule.
9812 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9814 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9816 (i386-mmx.c): Likewise.
9817 (i386-mmx-linux.o): Likewise.
9818 (i386-mmx-linux.c): Likewise.
9820 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9821 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9822 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9823 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9825 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9826 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9827 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9829 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9831 * Makefile.in (clean): Updated.
9833 (i386-avx.c): Likewise.
9834 (i386-avx-linux.o): Likewise.
9835 (i386-avx-linux.c): Likewise.
9836 (amd64-avx.o): Likewise.
9837 (amd64-avx.c): Likewise.
9838 (amd64-avx-linux.o): Likewise.
9839 (amd64-avx-linux.c): Likewise.
9841 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9842 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9843 (srv_amd64_regobj): Add amd64-avx.o.
9844 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9845 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9846 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9847 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9848 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9849 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9850 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9852 * i387-fp.c: Include "i386-xstate.h".
9854 (i387_cache_to_xsave): Likewise.
9855 (i387_xsave_to_cache): Likewise.
9856 (x86_xcr0): Likewise.
9858 * i387-fp.h (i387_cache_to_xsave): Likewise.
9859 (i387_xsave_to_cache): Likewise.
9860 (x86_xcr0): Likewise.
9862 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9863 * linux-crisv32-low.c (target_regsets): Likewise.
9864 * linux-m68k-low.c (target_regsets): Likewise.
9865 * linux-mips-low.c (target_regsets): Likewise.
9866 * linux-ppc-low.c (target_regsets): Likewise.
9867 * linux-s390-low.c (target_regsets): Likewise.
9868 * linux-sh-low.c (target_regsets): Likewise.
9869 * linux-sparc-low.c (target_regsets): Likewise.
9870 * linux-xtensa-low.c (target_regsets): Likewise.
9872 * linux-low.c: Include <sys/uio.h>.
9873 (regsets_fetch_inferior_registers): Support nt_type.
9874 (regsets_store_inferior_registers): Likewise.
9875 (linux_process_qsupported): New.
9876 (linux_target_ops): Add linux_process_qsupported.
9878 * linux-low.h (regset_info): Add nt_type.
9879 (linux_target_ops): Add process_qsupported.
9881 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9883 (init_registers_i386_avx_linux): New.
9884 (init_registers_amd64_avx_linux): Likewise.
9885 (xmltarget_i386_linux_no_xml): Likewise.
9886 (xmltarget_amd64_linux_no_xml): Likewise.
9887 (PTRACE_GETREGSET): Likewise.
9888 (PTRACE_SETREGSET): Likewise.
9889 (x86_fill_xstateregset): Likewise.
9890 (x86_store_xstateregset): Likewise.
9891 (use_xml): Likewise.
9892 (x86_linux_update_xmltarget): Likewise.
9893 (x86_linux_process_qsupported): Likewise.
9894 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9895 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9896 init_registers_i386_linux here. Call
9897 x86_linux_update_xmltarget.
9898 (the_low_target): Add x86_linux_process_qsupported.
9900 * server.c (handle_query): Call target_process_qsupported.
9902 * target.h (target_ops): Add process_qsupported.
9903 (target_process_qsupported): New.
9905 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9907 * inferiors.c (add_thread): Set last_status kind to
9908 TARGET_WAITKIND_IGNORE.
9909 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9910 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9911 (linux_wait_1): Move `thread' local definition to block that uses
9912 it. Don't NULL initialize `event_child'.
9913 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9914 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9915 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9917 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9919 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9920 an extended waitstatus, or by a watchpoint.
9921 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9922 thread was stepping or has been stopped by a watchpoint.
9924 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9926 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9927 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9928 of another, then delete the previous, and validate all
9930 (validate_inserted_breakpoint): New.
9931 (delete_disabled_breakpoints): New.
9932 (validate_breakpoints): New.
9933 (check_mem_read): Validate breakpoints before trusting their
9934 shadow. Delete disabled breakpoints.
9935 (check_mem_write): Validate breakpoints before trusting they
9936 should be inserted. Delete disabled breakpoints.
9937 * mem-break.h (validate_breakpoints):
9938 * server.c (handle_query): Validate breakpoints when we see a
9941 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9943 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9944 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9945 if we could tell there's a GDB breakpoint at stop_pc.
9946 (need_step_over_p): Don't do a step over if we find a GDB
9947 breakpoint at the resume PC.
9949 * mem-break.c (struct raw_breakpoint): New.
9950 (enum bkpt_type): New type `gdb_breakpoint'.
9951 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9952 fields. New field `raw'.
9953 (find_raw_breakpoint_at): New.
9954 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9956 (set_breakpoint_at): Adjust.
9957 (delete_raw_breakpoint): New.
9958 (release_breakpoint): New.
9959 (delete_breakpoint): Rename to...
9960 (delete_breakpoint_1): ... this. Add proc parameter. Use
9961 release_breakpoint. Return ENOENT.
9962 (delete_breakpoint): Reimplement.
9963 (find_breakpoint_at): Delete.
9964 (find_gdb_breakpoint_at): New.
9965 (delete_breakpoint_at): Delete.
9966 (set_gdb_breakpoint_at): New.
9967 (delete_gdb_breakpoint_at): New.
9968 (gdb_breakpoint_here): New.
9969 (set_reinsert_breakpoint): Use release_breakpoint.
9970 (uninsert_breakpoint): Rename to ...
9971 (uninsert_raw_breakpoint): ... this.
9972 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9973 (reinsert_raw_breakpoint): Change parameter type to
9975 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9977 (check_breakpoints): Adjust. Use release_breakpoint.
9978 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9979 (breakpoint_inserted_here): Ditto.
9980 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9981 Don't trust the breakpoint's shadow if it is not inserted.
9982 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9983 (delete_all_breakpoints): Adjust.
9984 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9985 use delete_breakpoint_1.
9987 * mem-break.h (breakpoints_supported): Delete declaration.
9988 (set_gdb_breakpoint_at): Declare.
9989 (gdb_breakpoint_here): Declare.
9990 (delete_breakpoint_at): Delete.
9991 (delete_gdb_breakpoint_at): Declare.
9993 * server.h (struct raw_breakpoint): Forward declare.
9994 (struct process_info): New field `raw_breakpoints'.
9996 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9999 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10001 * linux-low.c (status_pending_p_callback): Fix comment.
10002 (linux_wait_for_event_1): Move most of the internal breakpoint
10003 handling from here...
10004 (linux_wait_1): ... to here.
10005 (count_events_callback): New.
10006 (select_singlestep_lwp_callback): New.
10007 (select_event_lwp_callback): New.
10008 (cancel_breakpoints_callback): New.
10009 (select_event_lwp): New.
10010 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10011 priority to all LWPs that have had events that should be reported
10012 to the client. Cancel breakpoints when about to reporting the
10013 event to the client, not while stopping lwps. No longer cancel
10014 finished single-steps here.
10015 (cancel_finished_single_step): Delete.
10016 (cancel_finished_single_steps): Delete.
10018 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10020 * mem-break.c (enum bkpt_type): New.
10021 (struct breakpoint): New field `type'.
10022 (set_breakpoint_at): Change return type to struct breakpoint
10023 pointer. Set type to `other_breakpoint' by default.
10024 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10025 in the breakpoint list.
10026 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10027 (reinsert_breakpoint): Rename to ...
10028 (reinsert_raw_breakpoint): ... this.
10029 (reinsert_breakpoints_at): Adjust.
10030 * mem-break.h (struct breakpoint): Declare.
10031 (set_breakpoint_at): Change return type to struct breakpoint
10034 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10036 * server.c (handle_query): Assign, not compare.
10038 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10040 Teach linux gdbserver to step-over-breakpoints.
10042 * linux-low.c (can_hardware_single_step): New.
10043 (supports_breakpoints): New.
10044 (handle_extended_wait): If stopping threads, read the stop pc of
10045 the new cloned LWP.
10047 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10048 low target doesn't support retrieving the PC.
10049 (add_lwp): Set last_resume_kind to resume_continue.
10050 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10051 (linux_attach): Don't clear stop_expected. Set the lwp's
10052 last_resume_kind to resume_stop.
10053 (linux_detach_one_lwp): Don't check for removed breakpoints.
10054 (check_removed_breakpoint): Delete.
10055 (status_pending_p): Rename to ...
10056 (status_pending_p_callback): ... this. Don't check for removed
10057 breakpoints. Don't consider threads that are stopped from GDB's
10059 (linux_wait_for_lwp): Always read the stop_pc here.
10060 (cancel_breakpoint): New.
10061 (step_over_bkpt): New global.
10062 (linux_wait_for_event_1): Implement stepping over breakpoints.
10063 (gdb_wants_lwp_stopped): New.
10064 (gdb_wants_all_stopped): New.
10065 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10066 single-step traps here. Store the thread's last reported target
10068 (send_sigstop): Don't clear stop_expected. Always set it,
10070 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10071 (cancel_finished_single_step): New.
10072 (cancel_finished_single_steps): New.
10073 (wait_for_sigstop): Don't cancel finished single-step traps here.
10074 (linux_resume_one_lwp): Don't check for removed breakpoints.
10075 Don't set `step' on non-hardware step archs.
10076 (linux_set_resume_request): Ignore resume_stop requests if already
10077 stopping or stopped. Set the lwp's last_resume_kind.
10078 (resume_status_pending_p): Don't check for removed breakpoints.
10079 (need_step_over_p): New.
10080 (start_step_over): New.
10081 (finish_step_over): New.
10082 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10083 requests. Clear the thread's last reported target waitstatus.
10084 Don't use the `suspended' flag. Don't consider pending breakpoints.
10085 (linux_resume): Start a step-over if necessary.
10086 (proceed_one_lwp): New.
10087 (proceed_all_lwps): New.
10088 (unstop_all_lwps): New.
10089 * linux-low.h (struct lwp_info): Rewrite comment for the
10090 `suspended' flag. Add the `stop_pc' field. Delete the
10091 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10092 Add `'last_resume_kind' and `need_step_over' fields.
10093 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10094 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10095 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10096 (set_raw_breakpoint_at): New.
10097 (set_breakpoint_at): Rewrite to use it.
10098 (reinsert_breakpoint_handler): Delete.
10099 (set_reinsert_breakpoint): New.
10100 (reinsert_breakpoint_by_bp): Delete.
10101 (delete_reinsert_breakpoints): New.
10102 (uninsert_breakpoint): Rewrite.
10103 (uninsert_breakpoints_at): New.
10104 (reinsert_breakpoint): Rewrite.
10105 (reinsert_breakpoints_at): New.
10106 (check_breakpoints): Rewrite.
10107 (breakpoint_here): New.
10108 (breakpoint_inserted_here): New.
10109 (check_mem_read): Adjust.
10110 * mem-break.h (breakpoints_supported, breakpoint_here)
10111 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10112 (reinsert_breakpoint_by_bp): Delete declaration.
10113 (delete_reinsert_breakpoints): Declare.
10114 (reinsert_breakpoint): Delete declaration.
10115 (reinsert_breakpoints_at): Declare.
10116 (uninsert_breakpoint): Delete declaration.
10117 (uninsert_breakpoints_at): Declare.
10118 (check_breakpoints): Adjust prototype.
10119 * server.h: Adjust include order.
10120 (struct thread_info): Declare here. Add a `last_status' field.
10122 2010-03-23 Michael Snyder <msnyder@vmware.com>
10124 * server.c (crc32): New function.
10125 (handle_query): Add handling for 'qCRC:' request.
10127 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10129 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10130 lwp had been stopped by a watchpoint.
10132 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10134 * server.h (internal_error): Declare.
10135 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10136 * utils.c (internal_error): New function.
10138 2010-03-15 Andreas Schwab <schwab@redhat.com>
10140 * configure.srv: Fix typo setting srv_regobj.
10142 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10144 * linux-low.c (fetch_register): Avoid passing a non string literal
10146 (usr_store_inferior_registers): Ditto.
10148 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10150 * linux-low.c (linux_write_memory): Bail out early if peeking
10153 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10155 * linux-low.h (struct lwp_info): New fields
10156 `stopped_by_watchpoint' and `stopped_data_address'.
10157 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10158 here, and cache them in the lwp object.
10159 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10161 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10163 (linux_stopped_by_watchpoint): Rewrite.
10164 (linux_stopped_data_address): Rewrite.
10166 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10168 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10169 switching the current inferior, not before.
10171 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10173 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10174 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10175 i386-linux.c and amd64-linux.c.
10176 (reg-i386.o): Removed.
10177 (reg-i386.c): Likewise.
10178 (reg-i386-linux.o): Likewise.
10179 (reg-i386-linux.c): Likewise.
10180 (reg-x86-64.o): Likewise.
10181 (reg-x86-64.c): Likewise.
10182 (reg-x86-64-linux.o): Likewise.
10183 (reg-x86-64-linux.c): Likewise.
10185 (i386.c): Likewise.
10186 (i386-linux.o): Likewise.
10187 (i386-linux.c): Likewise.
10188 (amd64.o): Likewise.
10189 (amd64.c): Likewise.
10190 (amd64-linux.o): Likewise.
10191 (amd64-linux.c): Likewise.
10193 * configure.srv (srv_i386_regobj): New.
10194 (srv_i386_linux_regobj): Likewise.
10195 (srv_amd64_regobj): Likewise.
10196 (srv_amd64_linux_regobj): Likewise.
10197 (srv_i386_32bit_xmlfiles): Likewise.
10198 (srv_i386_64bit_xmlfiles): Likewise.
10199 (srv_i386_xmlfiles): Likewise.
10200 (srv_amd64_xmlfiles): Likewise.
10201 (srv_i386_linux_xmlfiles): Likewise.
10202 (srv_amd64_linux_xmlfiles): Likewise.
10203 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10204 srv_xmlfiles to $srv_i386_xmlfiles.
10205 (i[34567]86-*-mingw32ce*): Likewise.
10206 (i[34567]86-*-mingw*): Likewise.
10207 (i[34567]86-*-nto*): Likewise.
10208 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10209 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10210 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10211 (x86_64-*-linux*): Likewise.
10213 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10214 (init_registers_amd64_linux): New.
10215 (x86_arch_setup): Replace init_registers_x86_64_linux with
10216 init_registers_amd64_linux.
10218 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10220 * configure.ac: Check for libdl. If it is not available link against
10221 static libthread_db.
10222 * configure: Regenerate.
10224 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10228 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10229 handing a read watchpoint.
10230 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10232 2010-02-12 Doug Evans <dje@google.com>
10234 * linux-low.c (linux_supports_tracefork_flag): Document.
10235 (linux_look_up_symbols): Add comment.
10237 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10239 * regcache.c (supply_register): Clear regcache if buf is NULL.
10241 2010-02-02 Nicolas Roche <roche@sourceware.org>
10242 Joel Brobecker <brobecker@adacore.com>
10244 * inferiors.c (find_inferior): Add function documentation.
10245 (unloaded_dll): Handle the case where the unloaded dll has not
10246 been previously registered in the dll list.
10248 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10250 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10251 (thumb2_breakpoint): New.
10252 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10254 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10256 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10257 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10260 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10262 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10264 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10266 * linux-s390-low.c (s390_collect_ptrace_register)
10267 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10269 2010-01-21 Doug Evans <dje@google.com>
10271 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10272 (PTRACE_ARG4_TYPE): New macro.
10273 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10274 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10275 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10276 (usr_store_inferior_registers): Ditto.
10277 (linux_read_memory, linux_write_memory): Ditto.
10278 (linux_test_for_tracefork): Ditto.
10280 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10281 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10283 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10285 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10288 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10290 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10291 prototype to take a regcache. Adjust.
10293 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10295 * regcache.h (struct thread_info): Forward declare.
10296 (struct regcache): New.
10297 (new_register_cache): Adjust prototype.
10298 (get_thread_regcache): Declare.
10299 (free_register_cache): Adjust prototype.
10300 (registers_to_string, registers_from_string): Ditto.
10301 (supply_register, supply_register_by_name, collect_register)
10302 (collect_register_as_string, collect_register_by_name): Ditto.
10303 * regcache.c (struct inferior_regcache_data): Delete.
10304 (get_regcache): Rename to ...
10305 (get_thread_regcache): ... this. Adjust. Switch inferior before
10306 fetching registers.
10307 (regcache_invalidate_one): Adjust.
10308 (regcache_invalidate): Fix prototype.
10309 (new_register_cache): Return the new register cache.
10310 (free_register_cache): Change prototype.
10311 (realloc_register_cache): Adjust.
10312 (registers_to_string): Change prototype to take a regcache. Adjust.
10313 (registers_from_string): Ditto.
10314 (register_data): Ditto.
10315 (supply_register): Ditto.
10316 (supply_register_by_name): Ditto.
10317 (collect_register): Ditto.
10318 (collect_register_as_string): Ditto.
10319 (collect_register_by_name): Ditto.
10320 * server.c (process_serial_event): Adjust.
10321 * linux-low.h (regset_fill_func, regset_store_func): Change
10323 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10325 * linux-low.c (get_stop_pc): Adjust.
10326 (check_removed_breakpoint): Adjust.
10327 (linux_wait_for_event): Adjust.
10328 (linux_resume_one_lwp): Adjust.
10329 (fetch_register): Add regcache parameter. Adjust.
10330 (usr_store_inferior_registers): Ditto.
10331 (regsets_fetch_inferior_registers): Ditto.
10332 (regsets_store_inferior_registers): Ditto.
10333 (linux_fetch_registers, linux_store_registers): Ditto.
10334 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10336 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10338 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10339 prototype to take a regcache.
10340 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10341 * remote-utils.c (convert_ascii_to_int, outreg)
10342 (prepare_resume_reply): Change prototype to take a regcache.
10344 * target.h (struct target_ops) <fetch_registers, store_registers>:
10345 Change prototype to take a regcache.
10346 (fetch_inferior_registers, store_inferior_registers): Change
10347 prototype to take a regcache. Adjust.
10348 * proc-service.c (ps_lgetregs): Adjust.
10349 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10350 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10351 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10352 take a regcache. Adjust.
10353 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10354 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10355 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10356 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10357 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10358 (cris_cannot_fetch_register):
10359 (cris_breakpoint_at): Change prototype to take a regcache.
10361 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10362 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10363 to take a regcache. Adjust.
10364 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10366 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10367 take a regcache. Adjust.
10368 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10369 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10370 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10371 * linux-mips-low.c (mips_get_pc):
10372 (mips_set_pc): Change prototype to take a regcache. Adjust.
10373 (mips_reinsert_addr): Adjust.
10374 (mips_collect_register): Change prototype to take a regcache.
10376 (mips_supply_register):
10377 (mips_collect_register_32bit, mips_supply_register_32bit)
10378 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10379 (mips_store_fpregset): Ditto.
10380 * linux-ppc-low.c (ppc_supply_ptrace_register)
10381 (ppc_supply_ptrace_register): Ditto.
10382 (parse_spufs_run): Adjust.
10383 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10384 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10385 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10386 take a regcache. Adjust.
10387 * linux-s390-low.c (s390_collect_ptrace_register)
10388 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10389 (s390_set_pc): Change prototype to take a regcache. Adjust.
10390 (s390_arch_setup): Adjust.
10391 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10392 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10393 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10394 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10395 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10397 (sparc_breakpoint_at): Adjust.
10398 * linux-xtensa-low.c (xtensa_fill_gregset):
10399 (xtensa_store_gregset):
10400 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10401 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10402 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10403 prototype to take a regcache. Adjust.
10404 * win32-arm-low.c (arm_fetch_inferior_register)
10405 (arm_store_inferior_register): Change prototype to take a
10407 * win32-i386-low.c (i386_fetch_inferior_register)
10408 (i386_store_inferior_register): Change prototype to take a
10410 * win32-low.c (child_fetch_inferior_registers)
10411 (child_store_inferior_registers): Change prototype to take a
10413 (win32_wait): Adjust.
10414 (win32_fetch_inferior_registers): Change prototype to take a
10416 (win32_store_inferior_registers): Adjust.
10417 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10418 store_inferior_register>: Change prototype to take a regcache.
10420 2010-01-20 Doug Evans <dje@google.com>
10422 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10424 (linux_wait_for_event1, linux_init_signals): Ditto.
10425 (W_STOPCODE): Provide definition if missing.
10427 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10429 * linux-low.c (linux_core_of_thread): New.
10430 (compare_ints, show_process, list_threads): New.
10431 (linux_qxfer_osdata): Report threads and cores.
10432 (linux_target_op): Register linux_core_of_thread.
10433 * remote-utils.c (prepare_resume_reply): Report the core.
10434 (buffer_xml_printf): Support %d specifier.
10435 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10437 (handle_query): Handle qXfer:threads. Announce availability
10439 * target.h (struct target_ops): New field core_of_thread.
10441 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10443 * Makefile.in (clean): Remove new generated files.
10444 (reg-s390.o, reg-s390.c): Remove rules.
10445 (reg-s390x.o, reg-s390x.c): Likewise.
10446 (s390-linux32.o, s390-linux32.c): Add rules.
10447 (s390-linux64.o, s390-linux64.c): Likewise.
10448 (s390x-linux64.o, s390x-linux64.c): Likewise.
10449 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10450 * linux-s390-low.c: Include <elf.h>.
10451 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10452 (init_registers_s390): Remove prototype.
10453 (init_registers_s390x): Likewise.
10454 (init_registers_s390_linux32): Add prototype.
10455 (init_registers_s390_linux64): Likewise.
10456 (init_registers_s390x_linux64): Likewise.
10457 (s390_num_regs_3264): New define.
10458 (s390_regmap_3264): New global variable.
10459 (s390_cannot_fetch_register): Remove obsolete check.
10460 (s390_cannot_store_register): Likewise.
10461 (s390_collect_ptrace_register): Handle upper/lower register halves.
10462 (s390_supply_ptrace_register): Likewise.
10463 (s390_fill_gregset): Update to register number changes.
10464 (s390_get_hwcap): New routine.
10465 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10466 Install appropriate regmap and register set.
10468 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10470 * server.c (gdbserver_version): Update copyright year to 2010.
10471 * gdbreplay.c (gdbreplay_version): Likewise.
10473 2009-12-28 Doug Evans <dje@google.com>
10475 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10476 elf/external.h. Include <elf.h> instead but only if necessary.
10478 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10480 * linux-low.c (linux_remove_process): Remove `detaching'
10481 parameter. Don't release/detach from thread_db here.
10482 (linux_kill): Release/detach from thread_db here, ...
10483 (linux_detach): ... and here, before actually detaching.
10484 (linux_wait_1): ... and here, when a process exits.
10485 * thread-db.c (any_thread_of): New.
10486 (thread_db_free): Switch the current inferior to a thread of the
10489 2009-12-21 Doug Evans <dje@google.com>
10491 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10493 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10494 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10495 warning ifndef __NR_tkill. Move setting of errno there too.
10496 Delete unnecessary resetting of errno after syscall.
10497 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10499 * configure.ac: Check for dladdr.
10500 * config.in: Regenerate.
10501 * configure: Regenerate.
10502 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10503 (try_thread_db_load): Update.
10505 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10507 2009-12-18 Doug Evans <dje@google.com>
10509 * event-loop.c: Include unistd.h if it exists.
10511 * linux-low.c (my_waitpid): Move definition away from being in
10512 between linux_tracefork_child/linux_test_for_tracefork.
10514 * gdb_proc_service.h (psaddr_t): Fix type.
10515 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10516 signature to match glibc.
10518 2009-12-16 Doug Evans <dje@google.com>
10520 * linux-low.c (linux_read_memory): Fix argument to read.
10522 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10524 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10525 events, don't leave current_inferior pointing at null.
10527 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10529 * win32-low.c (LOG): Delete.
10530 (OUTMSG): Output to stderr.
10531 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10532 on compile time LOG macro.
10533 (win32_wait): Fix debug output.
10535 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10537 * win32-low.c (win32_add_one_solib): If the dll name is
10538 "ntdll.dll", prepend the system directory to the dll path.
10540 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10542 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10544 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10545 Vladimir Prus <vladimir@codesourcery.com>
10547 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10548 * configure.ac: Check for __mcoldfire__ and set
10549 gdb_cv_m68k_is_coldfire.
10550 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10551 reg-cf.o and reg-m68k.o.
10552 * configure: Regenerated.
10554 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10556 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10557 Pass it to thread_db_free.
10558 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10559 proper `detaching' argument to linux_remove_process.
10560 * linux-low.h (thread_db_free): Add `detaching' parameter.
10561 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10563 (thread_db_free): Add `detaching' parameter. Only
10564 call td_ta_clear_event if detaching from process.
10566 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10568 * thread-db.c (thread_db_free): Fix typo.
10570 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10573 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10575 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10577 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10578 with an i686 compiler.
10579 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10581 * configure: Rebuilt.
10583 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10587 * server.c (handle_search_memory_1): Correct read_addr initialization
10588 in loop for searching subsequent chunks.
10590 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10592 * configure.ac: New --with-libthread-db option.
10593 * thread-db.c: Allow direct dependence on libthread_db.
10594 (thread_db_free): Adjust.
10595 * config.in: Regenerate.
10596 * configure: Likewise.
10598 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10601 * thread-db.c (attach_thread): New function.
10602 (maybe_attach_thread): Return success/failure.
10603 (find_new_threads_callback): Adjust.
10604 (thread_db_find_new_threads): Loop until no new threads.
10606 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10608 * proc-service.c (ps_lgetregs): Formatting.
10610 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10612 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10613 * configure.ac: Adjust.
10614 * linux-low.h (struct process_info_private): Move members to struct
10616 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10617 * linux-low.c (linux_remove_process): Adjust.
10618 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10619 * server.c (handle_query): Move code ...
10620 (handle_monitor_command): ... here. New function.
10621 * target.h (struct target_ops): New member.
10622 * thread-db.c (struct thread_db): New.
10623 (libthread_db_search_path): New variable.
10624 (thread_db_create_event, thread_db_enable_reporting)
10625 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10626 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10627 (try_thread_db_load_1, dladdr_to_soname): New functions.
10628 (try_thread_db_load, thread_db_load_search): New functions.
10629 (thread_db_init): Search for libthread_db.
10630 (thread_db_free): New function.
10631 (thread_db_handle_monitor_command): Likewise.
10632 * config.in: Regenerate.
10633 * configure: Regenerate.
10635 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10637 * spu-low.c (spu_kill): Wait for inferior to terminate.
10638 Call clear_inferiors.
10639 (spu_detach): Call clear_inferiors.
10641 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10643 * aclocal.m4: Regenerate.
10644 * config.in: Likewise.
10645 * configure: Likewise.
10647 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10649 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10650 (parse_spufs_run): New function.
10651 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10652 (ppc_breakpoint_at): Handle SPU breakpoints.
10654 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10656 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10657 (SPUFS_MAGIC): Define.
10658 (spu_enumerate_spu_ids): New function.
10659 (linux_qxfer_spu): New function.
10660 (linux_target_ops): Install linux_qxfer_spu.
10662 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10664 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10665 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10666 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10667 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10668 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10669 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10670 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10671 (init_registers_powerpc_cell32l): Add prototype.
10672 (init_registers_powerpc_cell64l): Likewise.
10673 (ppc_arch_setup): Detect Cell/B.E. architecture.
10675 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10677 * Makefile.in (datarootdir): New variable.
10679 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10681 * linux-low.c (linux_write_memory): Update debugging output.
10682 * Makefile.in (clean): Add new descriptions.
10683 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10684 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10685 * configure.srv: Add new files for arm*-*-linux*.
10686 * linux-arm-low.c: Add new declarations.
10687 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10688 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10689 (HWCAP_VFPv3D16): New.
10690 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10691 instead of __IWMMXT__.
10692 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10693 (arm_arch_setup): New.
10694 (target_regsets): Remove #ifdef. Add VFP regset.
10695 (the_low_target): Use arm_arch_setup.
10697 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10699 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10700 the main thread again.
10702 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10704 Adding Neutrino gdbserver.
10705 * configure: Regenerated.
10706 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10707 * configure.srv (i[34567]86-*-nto*): New target.
10708 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10709 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10710 (nto_comctrl) [__QNX__]: New function.
10711 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10713 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10715 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10718 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10719 Pedro Alves <pedro@codesourcery.com>
10721 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10722 don't support CONTEXT_EXTENDED_REGISTERS.
10723 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10724 (the_low_target): Install them.
10725 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10726 failing with ERROR_PIPE_NOT_CONNECTED.
10728 2009-06-30 Doug Evans <dje@google.com>
10729 Pierre Muller <muller@ics.u-strasbg.fr>
10731 Add h/w watchpoint support to x86-linux, win32-i386.
10732 * Makefile.in (SFILES): Add i386-low.c
10733 (i386_low_h): Define.
10734 (i386-low.o): Add dependencies.
10735 (linux-x86-low.o): Add i386-low.h dependency.
10736 (win32-i386-low.o): Ditto.
10737 * i386-low.c: New file.
10738 * i386-low.h: New file.
10739 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10740 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10741 * linux-low.c (linux_add_process): Initialize arch_private.
10742 (linux_remove_process): Free arch_private.
10743 (add_lwp): Initialize arch_private.
10744 (delete_lwp): Free arch_private.
10745 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10747 * linux-low.h (process_info_private): New member arch_private.
10748 (lwp_info): New member arch_private.
10749 (linux_target_ops): New members new_process, new_thread,
10751 (ptid_of): New macro.
10752 * linux-x86-low.c: Include stddef.h, i386-low.h.
10753 (arch_process_info): New struct.
10754 (arch_lwp_info): New struct.
10755 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10756 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10757 (i386_dr_low_get_status): New function.
10758 (x86_insert_point, x86_remove_point): New functions.
10759 (x86_stopped_by_watchpoint): New function.
10760 (x86_stopped_data_address): New function.
10761 (x86_linux_new_process, x86_linux_new_thread): New functions.
10762 (x86_linux_prepare_to_resume): New function.
10763 (the_low_target): Add entries for insert_point, remove_point,
10764 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10766 * server.c (debug_hw_points): New global.
10767 (monitor_show_help): Document set debug-hw-points.
10768 (handle_query): Process "set debug-hw-points".
10769 * server.h (debug_hw_points): Declare.
10770 (paddress): Declare.
10771 * utils.c (NUMCELLS, CELLSIZE): New macros.
10772 (get_sell, xsnprintf, paddress): New functions.
10773 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10774 remove_point, stopped_by_watchpoint, stopped_data_address.
10775 * win32-i386-low.c: Include i386-low.h.
10776 (debug_reg_state): Replaces dr.
10777 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10778 (i386_dr_low_get_status): New function.
10779 (i386_insert_point, i386_remove_point): New functions.
10780 (i386_stopped_by_watchpoint): New function.
10781 (i386_stopped_data_address): New function.
10782 (i386_initial_stuff): Update.
10783 (get_thread_context,set_thread_context,i386_thread_added): Update.
10784 (the_low_target): Add entries for insert_point,
10785 remove_point, stopped_by_watchpoint, stopped_data_address.
10786 * win32-low.c (win32_insert_watchpoint): New function.
10787 (win32_remove_watchpoint): New function.
10788 (win32_stopped_by_watchpoint): New function.
10789 (win32_stopped_data_address): New function.
10790 (win32_target_ops): Add entries for insert_watchpoint,
10791 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10792 * win32-low.h (win32_target_ops): New members insert_point,
10793 remove_point, stopped_by_watchpoint, stopped_data_address.
10795 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10797 * server.c (process_serial_event): Re-return unsupported, not
10798 error, if the type isn't recognized. Re-allow supporting only
10799 insert or remove packets. Also call require_running for
10800 breakpoints. Add missing break statement to default case. Tidy.
10801 * target.h (struct target_ops): Rename insert_watchpoint to
10802 insert_point, and remove_watchpoint to remove_point.
10804 * linux-low.h (struct linux_target_ops): Likewise.
10805 * linux-low.c (linux_insert_watchpoint): Rename to ...
10806 (linux_insert_point): ... this. Adjust.
10807 (linux_remove_watchpoint): Rename to ...
10808 (linux_remove_point): ... this. Adjust.
10809 (linux_target_ops): Adjust.
10810 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10811 (cris_insert_point): ... this.
10812 (cris_remove_watchpoint): Rename to ...
10813 (cris_remove_point): ... this.
10814 (the_low_target): Adjust.
10816 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10818 * server.c (handle_v_kill): Pass signal_pid to
10819 kill_inferior if multi_process is zero.
10821 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10823 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10824 * target.h (target_ops): Comment for *_watchpoint to make it clear
10825 the functions can get types '0' and '1'.
10827 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10829 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10830 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10831 * regcache.c (get_regcache): Likewise.
10832 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10833 * win32-low.c (child_fetch_inferior_registers): Remove check for
10836 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10837 Pedro Alves <pedro@codesourcery.com>
10839 * target.h (struct target_ops) <supports_multi_process>: New
10841 (target_supports_multi_process): New.
10842 * server.c (handle_query): Even if GDB reports support, only
10843 enable multi-process if the target also supports it. Report
10844 multi-process support only if the target backend supports it.
10845 * linux-low.c (linux_supports_multi_process): New function.
10846 (linux_target_ops): Install it as target_supports_multi_process
10849 2009-05-24 Doug Evans <dje@google.com>
10851 Global renaming of find_thread_pid to find_thread_ptid.
10852 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10853 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10854 All callers updated.
10856 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10857 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10860 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10861 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10862 (linux_resume_one_lwp): Ditto.
10864 2009-05-23 Doug Evans <dje@google.com>
10866 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10867 from struct inferior_list_entry * to struct lwp_info *.
10868 All callers updated.
10870 2009-05-13 Doug Evans <dje@google.com>
10872 * linux-x86-low.c: Don't include assert.h.
10873 (x86_siginfo_fixup): Use fatal, not assert.
10874 (x86_arch_setup): Fix comment.
10876 2009-05-12 Doug Evans <dje@google.com>
10878 Biarch support for i386/amd64 gdbserver.
10879 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10880 Add linux-x86-low.c.
10881 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10882 (linux-x86-low.o): Add.
10883 * linux-x86-64-low.c: Delete.
10884 * linux-i386-low.c: Delete.
10885 * linux-x86-low.c: New file.
10886 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10888 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10890 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10891 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10892 (linux_child_pid_to_exec_file): New function.
10893 (elf_64_header_p, elf_64_file_p): New functions.
10894 (siginfo_fixup): New function.
10895 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10896 give target a chance to convert layout.
10897 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10898 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10900 2009-05-07 Doug Evans <dje@google.com>
10902 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10903 (regsets_store_inferior_registers): Ditto.
10905 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10909 * linux-low.c (must_set_ptrace_flags): Delete.
10910 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10912 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10913 `lwp->must_set_ptrace_flags' instead.
10914 (linux_wait_for_event_1): Set ptrace options here.
10915 (linux_wait_1): ... not here.
10917 2009-04-30 Doug Evans <dje@google.com>
10919 * inferiors.c (started_inferior_callback): New function.
10920 (attached_inferior_callback): New function.
10921 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10922 * server.c (print_started_pid, print_attached_pid): New functions.
10923 (detach_or_kill_for_exit): New function.
10924 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10925 * server.h (have_started_inferiors_p): Declare.
10926 (have_attached_inferiors_p): Declare.
10928 * inferiors.c (remove_process): Fix memory leak, free process.
10929 * linux-low.c (linux_remove_process): New function.
10930 (linux_kill): Call it instead of remove_process.
10931 (linux_detach, linux_wait_1): Ditto.
10933 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10935 * configure.srv: Add x86 Windows CE target.
10937 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10939 * inferiors.c (get_thread_process): Make global.
10940 * server.h (get_thread_process): Add prototype.
10941 * thread-db.c (find_one_thread): Use get_thread_process
10942 instead of current_process.
10943 (thread_db_get_tls_address): Do not crash if called when
10944 thread layer is not yet initialized.
10946 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10948 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10949 * spu-low.c (current_tid): Rename to ...
10950 (current_ptid): ... this.
10951 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10952 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10953 ptid_get_lwp (current_ptid) instead of current_tid.
10954 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10955 instead of current_tid. Use find_process_pid to verify pid
10956 argument is valid. Pass proper argument to remove_process.
10957 (spu_thread_alive): Compare current_ptid instead of current_tid.
10958 (spu_resume): Likewise.
10960 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10962 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10965 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10967 Implement the multiprocess extensions, and add linux multiprocess
10970 * server.h (ULONGEST): Declare.
10971 (struct ptid, ptid_t): New.
10972 (minus_one_ptid, null_ptid): Declare.
10973 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10974 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10975 (struct inferior_list_entry): Change `id' type from unsigned from
10977 (struct sym_cache, struct breakpoint, struct
10978 process_info_private): Forward declare.
10979 (struct process_info): Declare.
10980 (current_process): Declare.
10981 (all_processes): Declare.
10982 (initialize_inferiors): Declare.
10983 (add_thread): Adjust to use ptid_t.
10984 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10985 (add_process, remove_process, find_thread_pid): Declare.
10986 (find_inferior_id): Adjust to use ptid_t.
10987 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10988 (multi_process): Declare.
10989 (push_event): Adjust to use ptid_t.
10990 (read_ptid, write_ptid): Declare.
10991 (prepare_resume_reply): Adjust to use ptid_t.
10992 (clear_symbol_cache): Declare.
10993 * inferiors.c (all_processes): New.
10994 (null_ptid, minus_one_ptid): New.
10995 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10996 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10997 (add_thread): Change unsigned long to ptid. Remove gdb_id
10999 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11000 (gdb_id_to_thread): Rename to ...
11001 (find_thread_pid): ... this. Change unsigned long to ptid.
11002 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11003 (loaded_dll, pull_pid_from_list): Adjust.
11004 (add_process, remove_process, find_process_pid)
11005 (get_thread_process, current_process, initialize_inferiors): New.
11006 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11007 (struct target_waitstatus) <related_pid>: Ditto.
11008 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11009 return type to int.
11010 (struct target_ops) <join>: Add `pid' argument.
11011 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11012 (struct target_ops) <wait>: Add `ptid' field. Change return type
11014 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11015 (mywait): Add `ptid' argument. Change return type to ptid_t.
11016 (target_pid_to_str): Declare.
11017 * target.c (set_desired_inferior): Adjust to use ptids.
11018 (mywait): Add new `ptid' argument. Adjust.
11019 (target_pid_to_str): New.
11020 * mem-break.h (free_all_breakpoints): Declare.
11021 * mem-break.c (breakpoints): Delelete.
11022 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11023 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11024 to use per-process breakpoint list.
11025 (free_all_breakpoints): New.
11026 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11027 (symbol_cache, all_symbols_looked_up): Delete.
11029 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11031 (prepare_resume_reply): Change ptid argument's type from unsigned
11032 long to ptid_t. Adjust. Implement W;process and X;process.
11033 (free_sym_cache, clear_symbol_cache): New.
11034 (look_up_one_symbol): Adjust to per-process symbol cache. *
11035 * server.c (cont_thread, general_thread, step_thread): Change type
11037 (attached): Delete.
11038 (multi_process): New.
11039 (last_ptid): Change type to ptid_t.
11040 (struct vstop_notif) <ptid>: Change type to ptid_t.
11041 (queue_stop_reply, push_event): Change `ptid' argument's type to
11043 (discard_queued_stop_replies): Add `pid' argument.
11044 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11045 changes. Don't reference the `attached' global.
11046 (attach_inferior): Adjust to mywait interface changes.
11047 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11048 features. Handle and report "multiprocess+". Handle
11050 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11052 (handle_v_kill): New.
11053 (handle_v_stopped): Adjust to use target_pid_to_str.
11054 (handle_v_requests): Allow multiple attaches and runs when
11055 multiprocess extensions are in effect. Handle "vKill".
11056 (myresume): Adjust to use ptids.
11057 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11058 (handle_status): Adjust to discard_queued_stop_replies interface
11060 (first_thread_of, kill_inferior_callback)
11061 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11062 (main): Call initialize_inferiors. Adjust to use ptids, killing
11063 and detaching from all inferiors. Handle multiprocess packet
11065 * linux-low.h: Include gdb_proc_service.h.
11066 (struct process_info_private): New.
11067 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11068 <lwpid_of>: Use ptid_get_lwp.
11069 (get_lwp_thread): Adjust.
11070 (struct lwp_info): Add `dead' member.
11071 (find_lwp_pid): Declare.
11072 * linux-low.c (thread_db_active): Delete.
11073 (new_inferior): Adjust comment.
11074 (inferior_pid): Delete.
11075 (linux_add_process): New.
11076 (handle_extended_wait): Adjust.
11077 (add_lwp): Change unsigned long to ptid.
11078 (linux_create_inferior): Add process to processes table. Adjust
11079 to use ptids. Don't set new_inferior here.
11080 (linux_attach_lwp): Rename to ...
11081 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11082 it. Adjust to use ptids.
11083 (linux_attach_lwp): New.
11084 (linux_attach): Add process to processes table. Don't set
11086 (struct counter): New.
11087 (second_thread_of_pid_p, last_thread_of_process_p): New.
11088 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11089 multiple processes.
11090 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11091 processes. Remove process from process table.
11092 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11093 to multiple processes.
11094 (any_thread_of): New.
11095 (linux_detach): Add `pid' argument, and handle it. Remove process
11096 from processes table.
11097 (linux_join): Add `pid' argument. Handle it.
11098 (linux_thread_alive): Change unsighed long argument to ptid_t.
11099 Consider dead lwps as not being alive.
11100 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11101 threads we're not interested in.
11102 (same_lwp, find_lwp_pid): New.
11103 (linux_wait_for_lwp): Change `pid' argument's type from int to
11105 (linux_wait_for_event): Rename to ...
11106 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11107 from int to ptid_t. Adjust.
11108 (linux_wait_for_event): New.
11109 (linux_wait_1): Add `ptid' argument. Change return type to
11110 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11111 that exit from the process table.
11112 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11114 (mark_lwp_dead): New.
11115 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11116 stopping all threads, mark its main lwp as dead.
11117 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11119 (fetch_register, usr_store_inferior_registers)
11120 (regsets_fetch_inferior_registers)
11121 (regsets_store_inferior_registers, linux_read_memory)
11122 (linux_write_memory): Inline `inferior_pid'.
11123 (linux_look_up_symbols): Adjust to use per-process
11124 `thread_db_active'.
11125 (linux_request_interrupt): Adjust to use ptids.
11126 (linux_read_auxv): Inline `inferior_pid'.
11127 (initialize_low): Don't reference thread_db_active.
11128 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11129 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11130 (ps_getpid): Return the pid of the current inferior.
11131 * thread-db.c (proc_handle, thread_agent): Delete.
11132 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11134 (find_one_thread): Change argument type to ptid_t. Adjust to
11136 (maybe_attach_thread): Adjust to per-process data and ptids.
11137 (thread_db_find_new_threads): Ditto.
11138 (thread_db_init): Ditto.
11139 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11140 processes table. Adjust to use ptids.
11141 (spu_kill, spu_detach): Adjust interface. Remove process from
11143 (spu_join, spu_thread_alive): Adjust interface.
11144 (spu_wait): Adjust interface. Remove process from processes
11145 table. Adjust to use ptids.
11146 * win32-low.c (current_inferior_tid): Delete.
11147 (current_inferior_ptid): New.
11148 (debug_event_ptid): New.
11149 (thread_rec): Take a ptid. Adjust.
11150 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11151 (child_delete_thread): Ditto.
11152 (do_initial_child_stuff): Add `attached' argument. Add process to
11154 (child_fetch_inferior_registers, child_store_inferior_registers):
11156 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11157 (win32_attach): Pass 1 to do_initial_child_stuff.
11158 (win32_kill): Adjust interface. Remove process from processes
11160 (win32_detach): Ditto.
11161 (win32_join): Adjust interface.
11162 (win32_thread_alive): Take a ptid.
11163 (win32_resume): Adjust to use ptids.
11164 (get_child_debug_event): Ditto.
11165 (win32_wait): Adjust interface. Remove exiting process from
11168 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11170 Non-stop mode support.
11172 * server.h (non_stop): Declare.
11173 (gdb_client_data, handler_func): Declare.
11174 (delete_file_handler, add_file_handler, start_event_loop):
11176 (handle_serial_event, handle_target_event, push_event)
11177 (putpkt_notif): Declare.
11178 * target.h (enum resume_kind): New.
11179 (struct thread_resume): Replace `step' field by `kind' field.
11180 (TARGET_WNOHANG): Define.
11181 (struct target_ops) <wait>: Add `options' argument.
11182 <supports_non_stop, async, start_non_stop>: New fields.
11183 (target_supports_non_stop, target_async): New.
11184 (start_non_stop): Declare.
11185 (mywait): Add `options' argument.
11186 * target.c (mywait): Add `options' argument. Print child exit
11187 notifications here.
11188 (start_non_stop): New.
11189 * server.c (non_stop, own_buf, mem_buf): New globals.
11190 (struct vstop_notif): New.
11191 (notif_queue): New global.
11192 (queue_stop_reply, push_event, discard_queued_stop_replies)
11193 (send_next_stop_reply): New.
11194 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11196 (attach_inferior): In non-stop mode, don't wait for the target
11198 (handle_general_set): Handle QNonStop.
11199 (handle_query): When handling qC, return the current general
11200 thread, instead of the first thread of the list.
11201 (handle_query): If the backend supports non-stop mode, include
11202 QNonStop+ in the qSupported query response.
11203 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11205 (handle_v_attach, handle_v_run): Handle non-stop mode.
11206 (handle_v_stopped): New.
11207 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11208 (myresume): Adjust to use resume_kind. Handle non-stop.
11209 (queue_stop_reply_callback): New.
11210 (handle_status): Handle non-stop mode.
11211 (main): Clear non_stop flag on reconnection. Use the event-loop.
11212 Refactor serial protocol handling from here ...
11213 (process_serial_event): ... to this new function. When GDB
11214 selects any thread, select one here. In non-stop mode, wait until
11215 GDB acks all pending events before exiting.
11216 (handle_serial_event, handle_target_event): New.
11217 * remote-utils.c (remote_open): Install remote_desc in the event
11219 (remote_close): Remove remote_desc from the event loop.
11220 (putpkt_binary): Rename to...
11221 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11222 (putpkt_binary): New as wrapper around putpkt_binary_1.
11223 (putpkt_notif): New.
11224 (prepare_resume_reply): In non-stop mode, don't change the
11226 * event-loop.c: New.
11227 * Makefile.in (OBJ): Add event-loop.o.
11228 (event-loop.o): New rule.
11230 * linux-low.h (pid_of): Moved here.
11232 (get_lwp_thread): Use lwpid_of.
11233 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11234 * linux-low.c (pid_of): Delete.
11235 (inferior_pid): Use lwpid_of.
11236 (linux_event_pipe): New.
11237 (target_is_async_p): New.
11239 (handle_extended_wait): Use lwpid_of.
11240 (add_lwp): Don't set lwpid field.
11241 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11242 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11243 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11244 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11245 first. Adjust to linux_wait_for_event interface changes. Use
11247 (linux_detach): Don't delete the main lwp here.
11248 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11249 (status_pending_p): Don't consider explicitly suspended lwps.
11250 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11251 pointer. Add OPTIONS argument. Change return type to int. Use
11252 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11253 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11254 pointer. Add status pointer argument. Return a pid instead of a
11255 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11256 changes. In non-stop mode, don't switch to a random thread.
11257 (linux_wait): Rename to...
11258 (linux_wait_1): ... this. Add target_options argument, and handle
11259 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11260 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11261 clean exit and signal exit code. Don't stop all threads in
11262 non-stop mode. In all-stop mode, only stop all threads when
11263 reporting a stop to GDB. Handle explicit thread stop requests.
11264 (async_file_flush, async_file_mark): New.
11266 (send_sigstop): Use lwpid_of.
11267 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11268 interface changes. In non-stop mode, don't switch to a random
11270 (linux_resume_one_lwp): Use lwpid_of.
11271 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11272 (linux_resume_one_thread): ... this. Handle resume_stop. In
11273 non-stop mode, don't look for pending flag in all threads.
11274 (resume_status_pending_p): Don't consider explicitly suspended
11276 (my_waitpid): Reimplement. Emulate __WALL.
11277 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11279 (sigchld_handler, linux_supports_non_stop, linux_async)
11280 (linux_start_non_stop): New.
11281 (linux_target_ops): Register linux_supports_non_stop, linux_async
11282 and linux_start_non_stop.
11283 (initialize_low): Install SIGCHLD handler.
11284 * thread-db.c (thread_db_create_event, find_one_thread)
11285 (thread_db_get_tls_address): Use lwpid_of.
11286 * win32-low.c (win32_detach): Adjust to use resume_kind.
11287 (win32_wait): Add `options' argument.
11288 * spu-low.c (spu_resume): Adjust to use resume_kind.
11289 (spu_wait): Add `options' argument.
11291 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11293 Decouple target code from remote protocol.
11295 * target.h (enum target_waitkind): New.
11296 (struct target_waitstatus): New.
11297 (struct target_ops) <wait>: Return an unsigned long. Take a
11298 target_waitstatus pointer instead of a char pointer.
11299 (mywait): Likewise.
11300 * target.c (mywait): Change prototype to return an unsigned long.
11301 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11302 * server.h (thread_from_wait, old_thread_from_wait): Delete
11304 (prepare_resume_reply): Change prototype to take a
11306 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11307 (last_status, last_ptid): New.
11308 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11309 pid instead of a signal.
11310 (attach_inferior): Remove "status" and "signal" parameters.
11312 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11314 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11315 (handle_v_requests, myresume): Remove "status" and "signal"
11316 parameters. Adjust.
11317 (handle_status): New.
11318 (main): Delete local `status'. Adjust.
11319 * remote-utils.c: Include target.h.
11320 (prepare_resume_reply): Change prototype to take a
11321 target_waitstatus. Adjust.
11323 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11325 * spu-low.c (spu_wait): Adjust.
11326 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11328 (win32_wait): Adjust.
11330 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11332 * target.h (struct thread_resume): Delete leave_stopped member.
11333 (struct target_ops): Add a `n' argument to the `resume' callback.
11334 * server.c (start_inferior): Adjust.
11335 (handle_v_cont, myresume): Adjust.
11336 * linux-low.c (check_removed_breakpoint): Adjust to resume
11337 interface change, and to removed leave_stopped field.
11338 (resume_ptr): Delete.
11339 (struct thread_resume_array): New.
11340 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11341 resume interface change.
11342 (linux_continue_one_thread, linux_queue_one_thread)
11343 (resume_status_pending_p): Check if the resume field is NULL
11344 instead of checking the leave_stopped member.
11345 (linux_resume): Adjust to the target resume interface change.
11346 * spu-low.c (spu_resume): Adjust to the target resume interface
11348 * win32-low.c (win32_detach, win32_resume): Ditto.
11350 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11352 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11354 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11356 (linux_continue_one_thread): Only preserve the stepping flag if
11357 there's a pending breakpoint.
11359 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11361 * server.c (main): After the inferior having exited, call
11362 remote_close before exiting gdbserver.
11364 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11366 Fix size of FPSCR in Power 7 processors.
11367 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11368 (PPC_FEATURE_HAS_DFP): New #define.
11369 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11372 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11374 * server.c (handle_query) Whitespace and formatting.
11376 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11378 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11379 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11380 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11381 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11382 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11383 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11384 Makefile.in, configure.ac: Fix whitespace throughout.
11385 * configure: Regenerate.
11387 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11389 * inferiors.c (find_inferior): Make it safe for the callback
11390 function to delete the currently iterated inferior.
11392 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11394 * Makefile.in (linuw_low_h): Move higher.
11395 (thread-db.o): Depend on $(linux_low_h).
11397 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11399 Rename "process" to "lwp" throughout.
11401 * linux-low.c (all_processes): Rename to...
11402 (all_lwps): ... this.
11403 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11404 (add_process): Rename to ...
11405 (add_lwp): ... this. Adjust.
11406 (linux_create_inferior): Adjust.
11407 (linux_attach_lwp): Adjust.
11408 (linux_attach): Adjust.
11409 (linux_kill_one_process): Rename to ...
11410 (linux_kill_one_lwp): ... this. Adjust.
11411 (linux_kill): Adjust.
11412 (linux_detach_one_process): Rename to ...
11413 (linux_detach_one_lwp): ... this. Adjust.
11414 (linux_detach): Adjust.
11415 (check_removed_breakpoint): Adjust.
11416 (status_pending_p): Adjust.
11417 (linux_wait_for_process): Rename to ...
11418 (linux_wait_for_lwp): ... this. Adjust.
11419 (linux_wait_for_event): Adjust.
11420 (send_sigstop): Adjust.
11421 (wait_for_sigstop): Adjust.
11422 (stop_all_processes): Rename to ...
11423 (stop_all_lwps): ... this.
11424 (linux_resume_one_process): Rename to ...
11425 (linux_resume_one_lwp): ... this. Adjust.
11426 (linux_set_resume_request, linux_continue_one_thread)
11427 (linux_queue_one_thread, resume_status_pending_p)
11428 (usr_store_inferior_registers, regsets_store_inferior_registers)
11429 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11431 * linux-low.h (get_process): Rename to ...
11432 (get_lwp): ... this. Adjust.
11433 (get_thread_process): Rename to ...
11434 (get_thread_lwp): ... this. Adjust.
11435 (get_process_thread): Rename to ...
11436 (get_lwp_thread): ... this. Adjust.
11437 (struct process_info): Rename to ...
11438 (struct lwp_info): ... this.
11439 (all_processes): Rename to ...
11440 (all_lwps): ... this.
11441 * proc-service.c (ps_lgetregs): Adjust.
11442 * thread-db.c (thread_db_create_event, find_one_thread)
11443 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11445 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11447 * server.c (handle_query): Handle "qAttached".
11449 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11451 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11452 GPLv3, update license URL.
11454 2009-03-01 Doug Evans <dje@google.com>
11456 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11457 (server_h): Add gdb_signals.h.
11458 (signals.o): Update.
11459 * server.h (target_signal_from_host,target_signal_to_host_p)
11460 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11462 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11464 * remote-utils.c (getpkt): Also generate remote-debug
11465 information if noack_mode is set.
11467 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11469 * server.c (handle_query): Report qXfer:siginfo:read and
11470 qXfer:siginfo:write as supported and handle them.
11471 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11472 * linux-low.c (linux_xfer_siginfo): New.
11473 (linux_target_ops): Set it.
11475 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11477 * server.c (gdbserver_usage): Mention --remote-debug.
11478 (main): Accept '--remote-debug' switch.
11480 2009-01-18 Doug Evans <dje@google.com>
11482 * regcache.c (new_register_cache): No need to check result of xcalloc.
11483 * server.c (handle_search_memory): Back out calls to xmalloc,
11484 result is checked and error is returned to user upon failure.
11485 (handle_query): Ditto. Add more checks for result of malloc.
11486 (handle_v_cont): Check result of malloc, report error back to
11488 (handle_v_run): Ditto. Call freeargv.
11489 * server.h (freeargv): Declare.
11490 * utils.c (freeargv): New fn.
11492 2009-01-15 Doug Evans <dje@google.com>
11494 * gdbreplay.c (perror_with_name): Make arg const char *.
11495 * server.h (target_signal_to_name): Make return type const char *.
11496 * thread-db.c (thread_db_err_str): Make return type const char *.
11497 * utils.c (perror_with_name): Make arg const char *.
11499 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11501 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11502 when handling a EXIT_PROCESS_DEBUG_EVENT.
11504 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11506 * gdbreplay.c (gdbreplay_version): Update copyright year.
11507 * server.c (gdbserver_version): Likewise.
11509 2009-01-05 Doug Evans <dje@google.com>
11511 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11512 (handle_extended_wait): Improve comment.
11514 2008-12-13 Doug Evans <dje@google.com>
11516 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11517 * server.h (ATTR_MALLOC): New macro.
11518 (xmalloc,xcalloc,xstrdup): Declare.
11519 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11520 * inferiors.c: Ditto.
11521 * linux-low.c: Ditto.
11522 * mem-break.c: Ditto.
11523 * regcache.c: Ditto.
11524 * remote-utils.c: Ditto.
11527 * win32-low.c: Ditto.
11529 2008-12-12 Doug Evans <dje@google.com>
11531 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11532 in debugging printf.
11534 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11536 2008-12-09 Doug Evans <dje@google.com>
11538 * linux-low.h (struct process_info): Delete member tid, unused.
11539 * thread-db.c (find_one_thread): Update.
11540 (maybe_attach_thread): Update.
11542 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11544 * target.h (struct target_ops): Add qxfer_osdata member.
11545 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11547 (linux_qxfer_osdata): New functions.
11548 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11550 * server.c (handle_query): Handle "qXfer:osdata:read:".
11551 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11552 (buffer_xml_printf): New functions.
11553 * server.h (struct buffer): New.
11554 (buffer_grow_str, buffer_grow_str0): New macros.
11555 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11556 (buffer_xml_printf): Declare.
11558 2008-11-24 Doug Evans <dje@google.com>
11560 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11562 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11564 * server.c (handle_v_run): Always use the supplied argument list.
11566 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11568 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11569 (xtensa_regmap_table): Add entry for scompare1.
11571 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11573 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11574 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11575 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11576 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11577 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11578 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11579 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11580 XML target descriptions.
11581 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11582 when inferior is running on an ISA 2.05 or later processor. Add
11583 special case to return offset for full 64-bit slot of FPSCR when
11586 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11588 * Makefile.in (SFILES, clean): Added sparc64 files.
11589 (reg-sparc64.o, reg-sparc64.c): New.
11590 * configure.srv (sparc*-*-linux*): New configuration.
11591 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11592 syscall arguments for SPARC.
11593 (regsets_store_inferior_registers): Likewise.
11594 * linux-sparc-low.c: New file.
11596 2008-10-21 Doug Evans <dje@google.com>
11598 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11599 (READLINE_DIR,READLINE_DEP): Delete.
11600 (INTERNAL_CFLAGS): Update.
11601 (LINTFLAGS): Update.
11603 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11605 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11606 whole argv from the last run, not just argv[0].
11608 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11610 * regcache.c (new_register_cache): Return NULL if the register
11611 cache size isn't known yet.
11612 (free_register_cache): Avoid dereferencing a NULL regcache.
11614 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11616 * configure.srv: Merge MIPS and MIPS64.
11618 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11620 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11622 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11624 * Makefile.in: Add required vsx dependencies.
11626 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11627 Declare init_registers_powerpc_vsx32l.
11628 Declare init_registers_powerpc_vsx64l.
11629 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11630 (ppc_arch_setup): Check for VSX in hwcap.
11631 (ppc_fill_vsxregset): New function.
11632 (ppc_store_vsxregset): New function.
11633 Add new VSX entry in regset_info target_regsets.
11635 * configure.srv: Add new VSX dependencies.
11637 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11639 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11640 (remote_open): Set or clear transport_is_reliable.
11641 (putpkt_binary): Don't expect acks in noack mode.
11642 (getpkt): Don't send ack/nac in noack mode.
11643 * server.c (handle_general_set): Handle QStartNoAckMode.
11644 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11646 (main): Reset noack_mode on every connection.
11647 * server.h (noack_mode): Declare.
11649 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11651 * Makefile.in (GDBREPLAY_OBS): New variable.
11652 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11654 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11655 Daniel Jacobowitz <dan@codesourcery.com>
11657 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11658 (usr_store_inferior_registers): Likewise.
11659 (regsets_store_inferior_registers): Likewise.
11661 2008-07-31 Rolf Jansen <rj@surtec.com>
11662 Pedro Alves <pedro@codesourcery.com>
11664 * configure.ac: Check for memmem declaration.
11665 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11666 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11667 (disable_packet_qfThreadInfo): Unconditionally compile.
11668 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11669 * configure, config.in: Regenerate.
11671 2008-07-28 Doug Kwan <dougkwan@google.com>
11673 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11674 (linux_write_memory): Remove declaration of errno.
11676 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11678 * linux-low.c (handle_extended_wait): Do not use "status"
11679 variable uninitialized.
11681 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11683 * server.c (handle_v_attach): Inhibit reporting dll changes.
11685 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11687 * remote-utils.c (prepare_resume_reply): If requested, don't
11688 output "thread:TID" in the T stop reply.
11690 * server.c (disable_packet_vCont, disable_packet_Tthread)
11691 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11692 (handle_query): If requested, disable support for qC, qfThreadInfo
11694 (handle_v_requests): If requested, disable support for vCont.
11695 (gdbserver_show_disableable): New.
11696 (main): Handle --disable-packet and --disable-packet=LIST.
11698 * server.h (disable_packet_vCont, disable_packet_Tthread)
11699 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11701 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11703 * server.c (gdbserver_usage): Mention --version.
11705 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11707 * Makefile.in (gdbreplay.o): New rule.
11709 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11711 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11712 message, not gdbserver.
11714 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11715 Nathan Sidwell <nathan@codesourcery.com>
11716 Joseph Myers <joseph@codesourcery.com>
11718 * acinclude.m4: Include ../../config/acx.m4.
11719 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11720 * configure, config.in: Regenerate.
11721 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11722 * server.c (gdbserver_version): Print PKGVERSION.
11723 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11724 (main): Adjust gdbserver_usage calls.
11725 * gdbreplay.c (version, host_name): Add declarations.
11726 (gdbreplay_version, gdbreplay_usage): New.
11727 (main): Accept --version and --help options.
11729 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11731 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11732 (arm_breakpoint_at): Handle Thumb.
11733 (the_low_target): Add comment.
11735 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11737 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11739 2008-05-09 Doug Evans <dje@google.com>
11741 * server.h (decode_search_memory_packet): Declare.
11742 * remote-utils.c (decode_search_memory_packet): New fn.
11743 * server.c (handle_search_memory_1): New fn.
11744 (handle_search_memory): New fn.
11745 (handle_query): Process qSearch:memory packets.
11747 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11749 * regcache.c (registers_length): Remove.
11750 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11751 full register packet.
11752 * regcache.h (registers_length): Remove prototype.
11753 * server.h (PBUFSIZ): Define to 16384.
11755 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11757 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11758 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11759 powerpc-64l.o, and powerpc-altivec64l.o.
11760 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11761 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11762 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11763 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11764 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11767 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11768 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11769 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11770 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11771 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11772 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11773 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11774 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11775 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11776 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11779 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11780 (init_registers_powerpc_32l): ... this new prototype.
11781 (init_registers_powerpc_32): Remove, replace by ...
11782 (init_registers_powerpc_altivec32l): ... this new prototype.
11783 (init_registers_powerpc_e500): Remove, replace by ...
11784 (init_registers_powerpc_e500l): ... this new prototype.
11785 (init_registers_ppc64): Remove, replace by ...
11786 (init_registers_powerpc_64l): ... this new prototype.
11787 (init_registers_powerpc_64): Remove, replace by ...
11788 (init_registers_powerpc_altivec64l): ... this new prototype.
11789 (ppc_num_regs): Set to 73.
11790 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11791 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11792 (ppc_cannot_store_register): Handle orig_r3 and trap.
11793 (ppc_arch_setup): Update init_registers_... calls.
11794 (ppc_fill_gregset): Handle orig_r3 and trap.
11796 * inferiors.c (clear_inferiors): Reset current_inferior.
11798 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11800 * acinclude.m4: Add override.m4.
11801 * configure: Regenerate.
11803 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11805 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11806 initial call to init_register_ppc64.
11808 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11810 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11811 single powerpc*-*-linux* case.
11812 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11814 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11816 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11817 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11819 * linux-ppc-low.c: Include <elf.h>.
11820 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11821 (ppc_hwcap): New global variable.
11822 (ppc_regmap): Remove __SPE__ #ifdef sections.
11823 (ppc_regmap_e500): New global variable.
11824 (ppc_cannot_store_register): Update __SPE__ special case.
11825 (ppc_get_hwcap): New function.
11826 (ppc_arch_setup): Use it to determine whether inferior supports
11827 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11828 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11829 Do not access registers if target does not support AltiVec.
11830 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11831 Do not access registers if target does not support SPE.
11832 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11834 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11836 * linux-low.c (disabled_regsets, num_regsets): New.
11837 (use_regsets_p): Delete.
11838 (linux_wait_for_process): Clear disabled_regsets.
11839 (regsets_fetch_inferior_registers): Check and set it.
11840 (regsets_store_inferior_registers): Likewise.
11841 (linux_fetch_registers, linux_store_registers): Do not use
11843 (initialize_low): Allocate disabled_regsets.
11845 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11847 * Makefile.in (LIBOBJS): New.
11848 (OBS): Use LIBOBJS.
11849 (memmem.o): New rule.
11850 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11851 * configure: Regenerated.
11853 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11855 * server.c (handle_query): Never return "unsupported" for
11856 qXfer:features:read queries.
11858 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11860 * server.c (get_features_xml): Fix inverted condition.
11861 (handle_query): Always support qXfer:feature:read.
11863 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11865 * server.c (wrapper_argv): New.
11866 (start_inferior): Handle wrapper_argv. If set, expect an extra
11868 (gdbserver_usage): Document --wrapper.
11869 (main): Parse --wrapper.
11871 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11873 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11874 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11875 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11876 (ppc_set_pc): Likewise.
11877 (ppc_arch_setup): New function.
11878 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11879 of collect_register.
11880 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11882 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11884 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11885 instead of linux-ppc64-low.o.
11886 * linux-ppc64-low.c: Remove file.
11887 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11888 (linux-ppc64-low.o): Remove rule.
11890 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11891 (init_registers_powerpc_64): Likewise.
11892 (ppc_regmap): Conditionally define depending on __powerpc64__.
11893 (ppc_cannot_store_register): Do not special-case "fpscr" when
11894 compiled on __powerpc64__.
11895 (ppc_collect_ptrace_register): New function.
11896 (ppc_supply_ptrace_register): New function.
11897 (ppc_breakpoint): Change type to "unsigned int".
11898 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11899 (the_low_target): Conditionally provide initializers for the
11900 arch_setup member depending on __powerpc64__. Install
11901 collect_ptrace_register and supply_ptrace_register members.
11903 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11905 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11906 * server.c (gdbserver_xmltarget): Define.
11907 (get_features_xml): Use it to replace "target.xml" and arch_string.
11909 * configure.srv: Remove srv_xmltarget. Add XML files that were
11910 mentioned there to srv_xmlfiles instead. Remove conditional tests
11911 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11912 srv_xmlfiles and srv_regobj to include all possible choices.
11913 * configure.ac (srv_xmltarget): Remove.
11914 (srv_xmlfiles): Do not add "target.xml".
11915 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11916 checks for supplementary target information.
11917 * configure: Regenerate.
11918 * Makefile.in (XML_TARGET): Remove.
11919 (target.xml): Remove rule.
11920 (clean): Do not clean up target.xml.
11921 (.PRECIOUS): Do not mention target.xml.
11923 * target.h (struct target_ops): Remove arch_string member.
11924 * linux-low.c (linux_arch_string): Remove.
11925 (linux_target_ops): Remove arch_string initializer.
11926 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11927 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11928 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11929 * spu-low.c (spu_arch_string): Remove.
11930 (spu_target_ops): Remove arch_string initializer.
11931 * win32-low.c (win32_arch_string): Remove.
11932 (win32_target_ops): Remove arch_string initializer.
11933 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11934 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11935 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11937 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11939 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11940 by collect_ptrace_register and supply_ptrace_register hooks.
11941 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11942 instead of checking for the_low_target.left_pad_xfer.
11943 (usr_store_inferior_registers): Use collect_ptrace_register callback
11944 instead of checking for the_low_target.left_pad_xfer.
11946 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11947 (s390_supply_ptrace_register): Likewise.
11948 (s390_fill_gregset): Call s390_collect_ptrace_register.
11949 (the_low_target): Update.
11951 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11952 (ppc_supply_ptrace_register): Likewise.
11953 (the_low_target): Update.
11955 * linux-i386-low.c (the_low_target): Update.
11956 * linux-x86-64-low.c (the_low_target): Update.
11958 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11960 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11961 reg-s390.o and reg-s390x.o.
11963 * linux-low.c (new_inferior): New global variable.
11964 (linux_create_inferior, linux_attach): Set it.
11965 (linux_wait_for_process): Call the_low_target.arch_setup after the
11966 target has stopped for the first time.
11967 (initialize_low): Do not call the_low_target.arch_setup.
11969 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11970 (s390_set_pc): Likewise.
11971 (s390_arch_setup): New function.
11972 (the_low_target): Use s390_arch_setup as arch_setup routine.
11974 * regcache.c (realloc_register_cache): New function.
11975 (set_register_cache): Call it for each existing regcache.
11977 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11979 * server.h (init_registers): Remove prototype.
11981 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11982 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11983 instead of init_registers ().
11984 * linux-arm-low.c (init_registers_arm): Add prototype.
11985 (init_registers_arm_with_iwmmxt): Likewise.
11986 (the_low_target): Add initializer for arch_setup field.
11987 * linux-cris-low.c (init_registers_cris): Add prototype.
11988 (the_low_target): Add initializer for arch_setup field.
11989 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11990 (the_low_target): Add initializer for arch_setup field.
11991 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11992 (the_low_target): Add initializer for arch_setup field.
11993 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11994 (the_low_target): Add initializer for arch_setup field.
11995 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11996 (the_low_target): Add initializer for arch_setup field.
11997 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11998 (the_low_target): Add initializer for arch_setup field.
11999 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12000 (init_registers_mips64_linux): Likewise.
12001 (the_low_target): Add initializer for arch_setup field.
12002 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12003 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12004 (the_low_target): Add initializer for arch_setup field.
12005 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12006 (init_registers_powerpc_64): Likewise.
12007 (the_low_target): Add initializer for arch_setup field.
12008 * linux-s390-low.c (init_registers_s390): Add prototype.
12009 (init_registers_s390x): Likewise.
12010 (the_low_target): Add initializer for arch_setup field.
12011 * linux-sh-low.c (init_registers_sh): Add prototype.
12012 (the_low_target): Add initializer for arch_setup field.
12013 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12014 (the_low_target): Add initializer for arch_setup field.
12015 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12016 (the_low_target): Add initializer for arch_setup field.
12018 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12019 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12020 instead of init_registers ().
12021 * win32-arm-low.c (init_registers_arm): Add prototype.
12022 (the_low_target): Add initializer for arch_setup field.
12023 * win32-i386-low.c (init_registers_i386): Add prototype.
12024 (the_low_target): Add initializer for arch_setup field.
12026 * spu-low.c (init_registers_spu): Add prototype.
12027 (initialize_low): Call initialie_registers_spu () instead of
12028 initialize_registers ().
12030 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12032 * server.c (handle_v_requests): When handling the vRun and vAttach
12033 packets, if already debugging a process, don't kill it. Return an
12036 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12038 * server.c (handle_query): Correct length check.
12040 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12042 * win32-low.c (do_initial_child_stuff): Add process handle
12043 parameter. Set current_process_handle and current_process_id from the
12044 parameters. Clear globals.
12045 (win32_create_inferior): Don't set current_process_handle and
12046 current_process_id here. Instead pass them on the call to
12047 do_initial_child_stuff.
12048 (win32_attach): Likewise.
12049 (win32_clear_inferiors): New.
12050 (win32_kill): Don't close the current process handle or the
12051 current thread handle here. Instead call win32_clear_inferiors.
12052 (win32_detach): Don't open a new handle to the process. Call
12053 win32_clear_inferiors.
12054 (win32_join): Don't rely on current_process_handle; open a new
12055 handle using the process id.
12056 (win32_wait): Call win32_clear_inferiors when the inferior process
12059 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12061 * server.c (monitor_show_help): Add "exit".
12063 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12065 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12066 (clean): Add reg-xtensa.c.
12067 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12068 * configure.srv (xtensa*-*-linux*) New target.
12069 * linux-xtensa-low.c: New.
12070 * xtensa-xtregs.c: New.
12072 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12074 * hostio.c: Don't include errno.h.
12075 (errno_to_fileio_errno): Move to hostio-errno.
12076 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12077 error number outputting to the target->hostio_last_error callback.
12078 (hostio_packet_error): Use FILEIO_EINVAL directly.
12079 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12080 calls to hostio_error.
12081 * hostio-errno.c: New.
12082 * server.h (hostio_last_error_from_errno): Declare.
12083 * target.h (target_ops): Add hostio_last_error member.
12084 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12085 as hostio_last_error handler.
12086 * spu-low.c (spu_target_ops): Likewise.
12087 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12088 (wince_hostio_last_error): New functions.
12089 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12090 as hostio_last_error handler.
12091 (win32_target_ops) [!_WIN32_WCE]: Register
12092 hostio_last_error_from_errno as hostio_last_error handler.
12093 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12094 (hostio-errno.o): New rule.
12095 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12096 * configure.srv (srv_hostio_err_objs): New variable. Default to
12098 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12099 * configure: Regenerate.
12101 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12103 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12104 (linux_kill, linux_detach): Clean up the process list.
12105 * remote-utils.c (remote_open): Improve port number parsing.
12106 (putpkt_binary, input_interrupt): Only send interrupts if the target
12108 * server.c (extended_protocol): Make static.
12109 (attached): Define earlier.
12110 (exit_requested, response_needed, program_argv): New variables.
12111 (target_running): New.
12112 (start_inferior): Clear attached here.
12113 (attach_inferior): Set attached here.
12114 (require_running): Define.
12115 (handle_query): Use require_running and target_running. Implement
12117 (handle_v_attach, handle_v_run): New.
12118 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12119 (gdbserver_usage): Update.
12120 (main): Redo argument parsing. Handle --debug and --multi. Handle
12121 --attach along with other options or after the port. Save
12122 program_argv. Support no initial program. Resynchronize
12123 communication with GDB after an error. Handle "monitor exit".
12124 Use require_running and target_running. Always allow the extended
12125 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12126 restart in extended mode.
12127 * README: Refer to the GDB manual. Update --attach usage.
12129 2007-12-20 Andreas Schwab <schwab@suse.de>
12131 * linux-low.c (STACK_SIZE): Define.
12132 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12133 (linux_test_for_tracefork): Likewise.
12135 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12137 * linux-low.c (linux_wait_for_event): Update messages. Do not
12138 reinsert auto-delete breakpoints.
12139 * mem-break.c (struct breakpoint): Change return type of handler to
12141 (set_breakpoint_at): Update handler type.
12142 (reinsert_breakpoint_handler): Return 1 instead of calling
12144 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12146 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12147 * mem-break.h (set_breakpoint_at): Update handler type.
12148 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12149 * win32-low.c (auto_delete_breakpoint): New.
12150 (get_child_debug_event): Use it.
12152 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12154 * configure.ac: Check for pread and pwrite.
12155 * hostio.c (handle_pread): Fall back to lseek and read.
12156 (handle_pwrite): Fall back to lseek and write.
12157 * config.in, configure: Regenerated.
12159 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12161 * server.c (myresume): Add own_buf argument.
12162 (main): Update calls.
12164 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12166 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12167 * remote-utils.c (remote_open): Do not call disable_async_io.
12168 (block_async_io): Delete.
12169 (unblock_async_io): Make static.
12170 (initialize_async_io): New.
12171 * server.c (handle_v_cont): Handle async I/O here.
12172 (myresume): Likewise. Move other common resume tasks here...
12173 (main): ... from here. Call initialize_async_io. Disable async
12174 I/O before the main loop.
12175 * server.h (initialize_async_io): Declare.
12176 (block_async_io, unblock_async_io): Delete prototypes.
12177 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12179 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12181 * remote-utils.c (readchar): Allow binary data in received messages.
12183 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12185 * win32-low.c (attaching): New global.
12186 (win32_create_inferior): Clear the `attaching' global.
12187 (win32_attach): Set the `attaching' global.
12188 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12189 attaching. Only set a breakpoint at the entry point if not
12192 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12194 * server.c (main): Don't report dll events on the initial
12195 connection on attaches.
12197 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12199 * server.c (main): Relax numerical bases supported for the pid of
12200 the --attach command line argument.
12202 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12204 * win32-low.c (win32_attach): Call OpenProcess before
12205 DebugActiveProcess, not after. Add last error output to error
12208 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12210 * win32-low.c (win32_get_thread_context)
12211 (win32_set_thread_context): New functions.
12212 (thread_rec): Use win32_get_thread_context.
12213 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12214 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12217 2007-12-03 Leo Zayas
12218 Pedro Alves <pedro_alves@portugalmail.pt>
12220 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12222 (child_add_thread): Minor cleanup.
12223 (child_continue): Resume artificially suspended threads before
12224 calling ContinueDebugEvent.
12225 (suspend_one_thread): New.
12226 (fake_breakpoint_event): New.
12227 (get_child_debug_event): Change return type to int. Check here if
12228 gdb sent an interrupt request. If a soft interrupt was requested,
12229 fake a breakpoint event. Return 0 if there is no event to handle,
12231 (win32_wait): Don't check here if gdb sent an interrupt request.
12232 Ensure there is a valid event to handle.
12233 (win32_request_interrupt): Add soft interruption method as last
12236 2007-12-03 Leo Zayas
12237 Pedro Alves <pedro_alves@portugalmail.pt>
12239 * win32-low.h (win32_thread_info): Add descriptions to the
12240 structure members. Replace `suspend_count' counter by a
12242 * win32-low.c (thread_rec): Update condition of when to get the
12243 context from the inferior. Rely on ContextFlags being set if it
12244 has already been retrieved. Only suspend the inferior thread if
12245 we haven't already. Warn if that fails.
12246 (continue_one_thread): s/suspend_count/suspended/. Only call
12247 ResumeThread once. Warn if that fails.
12249 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12251 * win32-low.c (win32_wait): Don't read from the inferior when it
12252 has already exited.
12254 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12256 * Makefile.in (win32_low_h): New variable.
12257 (win32-low.o): Add dependency on $(win32_low_h).
12258 (win32-arm-low.o, win32-i386-low.o): New rules.
12260 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12262 * hostio.c: Correct copyright year.
12264 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12266 * Makefile.in (OBS): Add hostio.o.
12267 (hostio.o): New rule.
12268 * server.h (handle_vFile): Declare.
12269 * hostio.c: New file.
12270 * server.c (handle_v_requests): Take packet_len and new_packet_len
12271 for binary packets. Call handle_vFile.
12272 (main): Update call to handle_v_requests.
12274 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12276 * linux-low.c: Include <sched.h>.
12278 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12280 * linux-low.c (linux_tracefork_grandchild): New.
12281 (linux_tracefork_child): Use clone.
12282 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12284 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12286 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12288 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12290 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12292 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12294 * inferiors.c (change_inferior_id): Delete.
12295 (add_pid_to_list, pull_pid_from_list): New.
12296 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12297 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12298 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12299 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12300 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12301 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12302 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12303 (using_threads): Always set to 1.
12304 (handle_extended_wait): New.
12305 (add_process): Do not set TID.
12306 (linux_create_inferior): Set must_set_ptrace_flags.
12307 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12308 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12309 (linux_thread_alive): Rename TID argument to LWPID.
12310 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12311 (linux_wait_for_event): Do not use TID or check using_threads. Update
12312 call to dead_thread_notify. Call handle_extended_wait.
12313 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12314 (send_sigstop): Delete sigstop_sent.
12315 (wait_for_sigstop): Avoid TID.
12316 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12317 (linux_test_for_tracefork): New.
12318 (linux_lookup_signals): Use thread_db_active and
12319 linux_supports_tracefork_flag.
12320 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12321 * linux-low.h (get_process_thread): Avoid TID.
12322 (struct process_ifo): Move thread_known and tid to the end. Remove
12324 (linux_attach_lwp, thread_db_init): Update prototypes.
12325 * server.h (change_inferior_id): Delete prototype.
12326 (add_pid_to_list, pull_pid_from_list): New prototypes.
12327 * thread-db.c (thread_db_use_events): New.
12328 (find_first_thread): Rename to...
12329 (find_one_thread): ...this. Update callers and messages. Do not
12330 call fatal. Check thread_db_use_events. Do not call
12331 change_inferior_id or new_thread_notify.
12332 (maybe_attach_thread): Update. Do not call new_thread_notify.
12333 (thread_db_init): Set thread_db_use_events. Check use_events.
12334 * utils.c (fatal, warning): Correct message prefix.
12336 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12338 * Makefile.in (clean): Remove new files.
12339 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12340 (powerpc-64.o, powerpc-64.c): New rules.
12341 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12342 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12344 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12346 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12347 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12348 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12349 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12350 (target_regsets): Add AltiVec and SPE register sets.
12351 * configure.ac: Check for AltiVec and SPE.
12352 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12353 (ppc_fill_vrregset, ppc_store_vrregset): New.
12354 (target_regsets): Add AltiVec register set.
12355 * configure: Regenerated.
12357 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12359 * linux-low.c (O_LARGEFILE): Define.
12360 (linux_read_memory): Use /proc/PID/mem.
12361 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12362 * configure, config.in: Regenerated.
12364 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12366 * linux-low.c (linux_wait_for_event): Do not pass signals while
12369 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12371 * win32-low.c (create_process): New.
12372 (win32_create_inferior): Use create_process instead of
12373 CreateProcess. If create_process failed retry appending an ".exe"
12374 suffix. Store the GetLastError result immediatelly after
12375 create_process calls and use it on the call to error.
12377 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12379 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12381 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12383 * configure.ac: Switch license to GPLv3.
12385 2007-08-01 Michael Snyder <msnyder@access-company.com>
12387 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12389 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12391 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12393 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12394 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12395 CloseToolhelp32Snapshot.
12396 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12397 CloseToolhelp32Snapshot.
12399 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12401 * server.c (main): Check for inferior exit before main loop.
12403 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12405 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12406 instead of on tmp_desc.
12408 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12409 Daniel Jacobowitz <dan@codesourcery.com>
12411 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12412 (add_thread): Minor cleanups.
12413 (clear_inferiors): Move lower in the file. Clear the DLL
12415 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12416 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12417 (xml_escape_text): New.
12418 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12420 (handle_v_cont): Report errors.
12421 (gdbserver_version): Update.
12422 (main): Correct size of own_buf. Do not report initial DLL events.
12423 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12424 (unloaded_dll, xml_escape_text): New.
12425 * win32-low.c (enum target_waitkind): Update comments.
12426 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12427 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12428 (win32_EnumProcessModules, win32_GetModuleInformation)
12429 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12430 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12431 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12432 (win32_Module32First, win32_Module32Next, load_toolhelp)
12433 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12434 (get_child_debug_event): Handle DLL events.
12435 (win32_wait): Likewise.
12437 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12439 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12440 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12442 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12444 * win32-low.c (handle_output_debug_string): Ignore event if not
12447 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12449 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12451 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12453 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12455 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12457 * inferiors.c (change_inferior_id): Add comment.
12458 * linux-low.c (check_removed_breakpoint): Add an early
12459 prototype. Improve debug output.
12460 (linux_attach): Doc update.
12461 (linux_detach_one_process, linux_detach): Clean up before releasing
12463 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12464 * linux-low.h (struct process_info): Doc improvement.
12465 * mem-break.c (delete_all_breakpoints): New.
12466 * mem-break.h (delete_all_breakpoints): New prototype.
12467 * thread-db.c (find_first_thread): New.
12468 (thread_db_create_event): Call it instead of
12469 thread_db_find_new_threads. Clean up unused variables.
12470 (maybe_attach_thread): Remove first thread handling.
12471 (thread_db_find_new_threads): Use find_first_thread.
12472 (thread_db_get_tls_address): Likewise.
12474 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12476 * thread-db.c (thread_db_find_new_threads): Add prototype.
12477 (thread_db_create_event): Check for the main thread before adding
12479 (maybe_attach_thread): Only enable event reporting if TID == 0.
12480 (thread_db_get_tls_address): Check for new threads.
12482 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12484 * linux-low.c (linux_create_inferior): Try execv before execvp.
12485 * spu-low.c (spu_create_inferior): Likewise.
12487 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12489 * linux-low.c (linux_create_inferior): Change execv to execvp.
12490 * spu-low.c (spu_create_inferior): Likewies.
12492 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12494 * Makefile.in (clean): Clean new files instead of deleted ones.
12495 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12496 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12498 * configure.srv: Specify XML files and new regformats for MIPS and
12500 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12501 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12502 an entry for the restart register.
12503 (mips_cannot_fetch_register, mips_cannot_store_register)
12504 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12505 register names to match the XML descriptions.
12506 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12507 restart register instead of $0.
12509 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12510 Markus Deuling <deuling@de.ibm.com>
12512 * remote-utils.c (decode_xfer_write): New function.
12513 * server.h (decode_xfer_write): Add prototype.
12514 * server.c (handle_query): Add PACKET_LEN argument. Support
12515 qXfer:spu:read and qXfer:spu:write packets.
12516 (main): Pass packet_len to handle_query.
12517 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12518 * target.h (target_ops): Add qxfer_spu.
12520 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12522 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12523 accessing non-seekable spufs files.
12525 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12527 * server.c (handle_query): Add reply for qC packet.
12529 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12530 Leo Zayas <lerele@champenstudios@com>
12532 * server.h (check_remote_input_interrupt_request): New function.
12533 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12534 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12535 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12536 (check_remote_input_interrupt_request): New function.
12537 * server.h (check_remote_input_interrupt_request): Declare.
12538 * win32-low.c (winapi_DebugBreakProcess,
12539 winapi_GenerateConsoleCtrlEvent): New typedefs.
12540 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12542 (win32_wait): Check for remote interrupt request
12543 with check_remote_input_interrupt_request.
12544 (win32_request_interrupt): New function.
12545 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12547 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12549 * win32-low.c (debug_registers_changed,
12550 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12551 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12552 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12553 (thread_rec): Get context using the low target.
12554 (child_add_thread): Call thread_added on the low target,
12555 which does the same thing.
12557 (do_initial_child_stuff): Remove debug registers references.
12558 Set context using the low target. Resume threads after
12559 setting the contexts.
12560 (child_continue): Remove dead variable. Remove debug
12561 registers references.
12562 (child_fetch_inferior_registers): Go through the low target.
12563 (do_child_store_inferior_registers): Remove.
12564 (child_store_inferior_registers): Go through the low target.
12565 (win32_resume): Remove debug registers references.
12566 Set context using the low target.
12567 (handle_exception): Change return type to void. Don't record
12568 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12569 first chance exception.
12570 (get_child_debug_event): Change return type to void. Remove
12571 goto loop. Always return after waiting for debug event.
12572 (win32_wait): Convert to switch statement. Handle spurious
12575 * win32-i386-low.c (debug_registers_changed,
12576 debug_registers_used): New.
12577 (initial_stuff): Rename to ...
12578 (i386_initial_stuff): ... this. Clear debug registers
12580 (store_debug_registers): Delete.
12581 (i386_get_thread_context): New.
12582 (load_debug_registers): Delete.
12583 (i386_set_thread_context): New.
12584 (i386_thread_added): New.
12585 (single_step): Rename to ...
12586 (i386_single_step): ... this.
12587 (do_fetch_inferior_registers): Rename to ...
12588 (i386_fetch_inferior_register): ... this.
12589 (i386_store_inferior_register): New.
12590 (the_low_target): Adapt to new interface.
12592 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12593 (arm_get_thread_context): New.
12594 (arm_set_thread_context): New.
12596 (do_fetch_inferior_registers): Rename to ...
12597 (arm_fetch_inferior_register): ... this.
12598 (arm_store_inferior_register): New.
12599 (arm_wince_breakpoint): Reimplement as unsigned long.
12600 (arm_wince_breakpoint_len): Define.
12601 (the_low_target): Adapt to new interface.
12603 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12604 load_debug_registers. Add get_thread_context, set_thread_context,
12605 thread_added and store_inferior_register. Rename
12606 fetch_inferior_registers to fetch_inferior_register.
12607 (regptr): Remove declaration.
12609 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12611 * linux-low.c (linux_detach): Change return type to int. Return 0.
12612 * spu-low.c (spu_detach): Likewise.
12614 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12616 * target.h (target_ops): Change return type of detach to int.
12618 (join_inferior): New.
12619 * server.c (main): Don't skip detach support on mingw32.
12620 If the inferior doesn't support detaching return error.
12621 Call join_inferior instead of using waitpid.
12622 * linux-low.c (linux_join): New.
12623 (linux_target_op): Add linux_join.
12624 * spu-low.c (spu_join): New.
12625 (spu_target_ops): Add spu_join.
12626 * win32-low.c (win32_detach): Adapt to new interface.
12627 Reopen current_process_handle before detaching. Issue a child
12628 resume before detaching.
12630 (win32_target_op): Add win32_join.
12632 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12634 * win32-low.c (win32-attach): Fix return value.
12635 * target.h (target_ops): Describe ATTACH return values.
12637 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12639 * win32-low.c (GETPROCADDRESS): Define.
12640 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12641 (winapi_DebugSetProcessKillOnExit): Likewise.
12642 (win32_create_inferior): Force usage of ansi CreateProcessA.
12643 (win32_attach): Use GETPROCADDRESS.
12644 (win32_detach): Likewise.
12646 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12648 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12650 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12652 * win32-low.c: Commit leftover changes from 2007-03-29.
12654 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12656 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12657 fields short instead of int. Add explicit padding.
12658 (i387_cache_to_fsave): Remove unnecessary casts.
12659 (i387_fsave_to_cache): Doc fix.
12660 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12662 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12664 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12665 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12667 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12669 * configure.srv (arm*-*-mingw32ce*): Move near the other
12672 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12674 * configure.ac: Add errno checking.
12675 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12676 sys/file.h and malloc.h.
12677 (AC_CHECK_DECLS): Add perror.
12678 (srv_mingwce): Handle.
12679 * configure.srv (i[34567]86-*-cygwin*): Add
12680 win32-i386-low.o to srv_tgtobj.
12681 (i[34567]86-*-mingw*): Likewise.
12682 (arm*-*-mingw32ce*): Add case.
12683 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12684 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12685 [__MINGW32CE__] (strerror): New function.
12686 [__MINGW32CE__] (errno): Define to GetLastError.
12687 [__MINGW32CE__] (COUNTOF): New macro.
12688 (remote_open): Remove extra close call.
12689 * mem-break.c (delete_breakpoint_at): New function.
12690 * mem-break.h (delete_breakpoint_at): Declare.
12691 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12692 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12693 [USE_WIN32API] (read, write): Add char* casts.
12694 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12695 * server.h: Include wincecompat.h on Windows CE.
12696 [HAVE_ERRNO_H]: Check.
12697 (perror): Declare if not declared.
12698 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12699 (perror_with_name): Remove errno declaration.
12700 * wincecompat.h: New.
12701 * wincecompat.c: New.
12702 * win32-low.h: New.
12703 * win32-arm-low.c: New.
12704 * win32-i386-low.c: New.
12705 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12706 (OUTMSG2): Make it safe.
12708 (COUNTOF): New macro.
12709 (NUM_REGS): Get it from the low target.
12710 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12711 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12712 (thread_rec): Let low target handle debug registers.
12713 (child_add_thread): Likewise.
12714 (child_init_thread_list): Likewise.
12715 (continue_one_thread): Likewise.
12717 (do_child_fetch_inferior_registers): Move to ...
12718 * win32-i386-low.c: ... here, and rename to ...
12719 (do_fetch_inferior_registers): ... this.
12720 * win32-low.c (child_fetch_inferior_registers):
12721 Go through the low target.
12722 (do_child_store_inferior_registers): Use regptr.
12723 (strwinerror): New function.
12724 (win32_create_inferior): Handle Windows CE.
12725 Use strwinerror instead of strerror on Windows error
12726 codes. Add program to the error output.
12727 Don't close the main thread handle on Windows CE.
12728 (win32_attach): Use coredll.dll on Windows CE.
12729 (win32_kill): Close current process and current
12731 (win32_detach): Use coredll.dll on Windows CE.
12732 (win32_resume): Let low target handle debug registers, and
12734 (handle_exception): Add/Remove initial breakpoint. Avoid
12735 non-existant WSTOPSIG on Windows CE.
12736 (win32_read_inferior_memory): Cast to remove warning.
12737 (win32_arch_string): Go through the low target.
12738 (initialize_low): Call set_breakpoint_data with the low
12739 target's breakpoint.
12740 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12741 FOP_REGNUM, mappings): Move to ...
12742 * win32-i386-low.c: ... here.
12743 * win32-low.c (win32_thread_info): Move to ...
12744 * win32-low.h: ... here.
12745 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12746 win32-arm-low.c and wincecompat.c.
12747 (all:): Add $EXEEXT.
12748 (install-only:): Likewise.
12749 (gdbserver:): Likewise.
12750 (gdbreplay:): Likewise.
12751 * config.in: Regenerate.
12752 * configure: Regenerate.
12754 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12756 * win32-low.c: Rename typedef thread_info to
12757 win32_thread_info throughout.
12759 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12761 * win32-i386-low.c: Rename to ...
12762 * win32-low.c: ... this.
12763 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12764 * Makefile.in: Likewise.
12766 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12768 * remote-utils.c (monitor_output): Constify msg parameter.
12769 * server.h (monitor_output): Likewise.
12770 * win32-i386-low.c (handle_output_debug_string): New.
12771 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12772 handle_output_debug_string.
12773 (get_child_debug_event): Likewise.
12775 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12777 * server.c (main): Correct strtoul check.
12779 2007-03-27 Jon Ringle <jon@ringle.org>
12781 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12783 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12785 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12787 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12789 * terminal.h: Check HAVE_SGTTY_H.
12791 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12793 * remote-utils.c (remote_open): Print out the assigned port number.
12795 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12797 * remote-utils.c (monitor_output): New function.
12798 * server.c (debug_threads): Define here.
12799 (monitor_show_help): New function.
12800 (handle_query): Handle qRcmd.
12801 (main): Do not handle 'd' packet.
12802 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12803 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12806 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12808 * Makefile.in (EXEEXT): New.
12809 (clean): Use $(EXEEXT).
12811 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12813 * target.h (target_ops): Rename send_signal to request_interrupt,
12814 and remove enum target_signal parameter.
12815 * linux-low.c (linux_request_interrupt): Rename from
12816 linux_send_signal, and always send SIGINT.
12817 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12818 and always send SIGINT.
12819 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12821 (input_interrupt): Likewise.
12823 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12825 * server.c (get_features_xml): Check if target implemented
12827 * win32-i386-low.c (win32_arch_string): New.
12828 (win32_target_ops): Add win32_arch_string as arch_string member.
12830 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12832 * spu-low.c (spu_arch_string): New.
12833 (spu_target_ops): Add spu_arch_string.
12835 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12837 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12838 * configure.ac: Do not check for terminal.h.
12839 * configure, config.in: Regenerated.
12841 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12843 * Makefile.in (OBS): Add $(XML_BUILTIN).
12844 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12846 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12847 (arm-with-iwmmxt.c): New.
12848 * config.in, configure: Regenerate.
12849 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12850 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12851 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12852 (arm*-*-linux*): Add iWMMXt and regset support.
12853 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12854 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12855 (arm_store_wmmxregset, target_regsets): New.
12856 * server.c (get_features_xml): Take annex argument. Check builtin
12858 (handle_query): Handle multiple annexes.
12860 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12862 * remote-utils.c [USE_WIN32API] (read, write): Define.
12863 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12866 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12868 * linux-i386-low.c (the_low_target): Set arch_string.
12869 * linux-x86-64-low.c (the_low_target): Likewise.
12870 * linux-low.c (linux_arch_string): New.
12871 (linux_target_ops): Add it.
12872 * linux-low.h (struct linux_target_ops): Add arch_string.
12873 * server.c (write_qxfer_response): Use const void * for DATA.
12874 (get_features_xml): New.
12875 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12876 * target.h (struct target_ops): Add arch_string method.
12878 2007-01-03 Denis Pilat <denis.pilat@st.com>
12879 Daniel Jacobowitz <dan@codesourcery.com>
12881 * linux-low.c (linux_kill): Handle being called with no threads.
12882 * win32-i386-low.c (win32_kill): Likewise.
12883 (get_child_debug_event): Clear current_process_handle.
12885 2006-12-30 Denis PILAT <denis.pilat@st.com>
12886 Daniel Jacobowitz <dan@codesourcery.com>
12888 * remote-utils.c (remote_open): Check the type of specified
12889 serial port devices before opening them.
12890 * server.c (main): Kill the inferior if an error occurs during
12891 the first remote_open.
12893 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12895 * README: Update supported targets.
12897 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12899 * Makefile.in (clean): Remove reg-mips64.c.
12900 (reg-mips64.c, reg-mips64.o): New rules.
12901 * configure.srv: Handle mips64. Include regset support for mips.
12902 * linux-mips-low.c (union mips_register): New.
12903 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12904 (mips_breakpoint, mips_breakpoint_at): Use int.
12905 (mips_collect_register, mips_supply_register)
12906 (mips_collect_register_32bit, mips_supply_register_32bit)
12907 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12908 (mips_store_fpregset, target_regsets): New.
12909 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12911 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12913 * configure.srv: Add target "spu*-*-*".
12914 * Makefile.in (clean): Remove reg-spu.c.
12915 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12916 * spu-low.c: New file.
12918 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12920 * configure.ac: Correct td_thr_tls_get_addr test.
12921 * configure: Regenerated.
12923 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12925 * linux-low.c (linux_wait_for_event): Reformat. Use the
12926 pass_signals array.
12927 * remote-utils.c (decode_address_to_semicolon): New.
12928 * server.c (pass_signals, handle_general_set): New.
12929 (handle_query): Mention QPassSignals for qSupported.
12930 (main): Call handle_general_set.
12931 * server.h (pass_signals, decode_address_to_semicolon): New.
12933 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12935 * server.c (handle_query): Correct error handling for read_auxv.
12937 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12939 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12940 and srv_linux_thread_db to yes.
12941 * linux-s390-low.c (s390_fill_gregset): New function.
12942 (target_regsets): Define data structure.
12944 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12946 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12947 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12948 * config.in, configure: Regenerated.
12949 * inferiors.c (gdb_id_to_thread): New function.
12950 (gdb_id_to_thread_id): Use it.
12951 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12952 * linux-low.h (struct process_info): Add th member.
12953 (thread_db_get_tls_address): New prototype.
12954 * remote-utils.c (decode_address): Make non-static.
12955 * server.c (handle_query): Handle qGetTLSAddr.
12956 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12957 * target.h (struct target_ops): Add get_tls_address.
12958 * thread-db.c (maybe_attach_thread): Save the thread handle.
12959 (thread_db_get_tls_address): New.
12961 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12963 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12964 (linux_resume_one_process): Take a siginfo_t *. Update all
12965 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12966 (struct pending_signals): Add a siginfo_t.
12967 (linux_wait_for_process): Always set last_status.
12968 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12969 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12970 * linux-low.h (struct process_info): Add last_status.
12972 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12974 * remote-utils.c (try_rle): New function.
12975 (putpkt_binary): Use it.
12977 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12979 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12980 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12981 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12982 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12983 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12986 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12988 * server.c (terminal_fd): New variable.
12989 (old_foreground_pgrp): Likewise.
12990 (restore_old_foreground_pgrp): New function.
12991 (start_inferior): Record the terminal file descriptor in terminal_fd
12992 and its original foreground group in old_foreground_pgrp. Register
12993 restore_old_foreground_pgrp with atexit().
12995 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12997 * server.c (handle_query): Correct qPart to qXfer.
12999 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13001 * configure.ac: Check for more headers which are missing on
13002 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13003 * configure.srv: Add Cygwin and mingw32.
13004 * remote-utils.c: Don't include headers unconditionally which
13005 are missing on mingw32. Include <winsock.h> for mingw32.
13006 (remote_open): Adjust for mingw32 support. Flush
13007 standard error after writing to it.
13008 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13009 (unblock_async_io, enable_async_io, disable_async_io)
13010 (readchar, getpkt): Update for Winsock support.
13011 (prepare_resume_reply): Expect a protocol signal number.
13012 * server.c: Disable <sys/wait.h> on mingw32.
13013 (start_inferior): Adjust for mingw32 support. Flush
13014 standard error after writing to it.
13015 (attach_inferior): Likewise. Use protocol signal
13017 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13019 * win32-i386-low.c: New file.
13020 * Makefile.in (XM_CLIBS): Set.
13021 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13022 (win32-i386-low.o): New dependency rule.
13023 * linux-low.c (linux_wait): Use target signal numbers.
13024 * target.h (struct target_ops): Doc fix.
13025 * server.h (target_signal_to_name): New prototype.
13026 * gdbreplay.c: Don't include headers unconditionally which
13027 are missing on mingw32. Include <winsock.h> for mingw32.
13028 (remote_close, remote_open): Adjust for Winsock support.
13029 * configure, config.in: Regenerated.
13031 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13033 * server.c (decode_xfer_read, write_qxfer_response): New.
13034 (handle_query): Take a packet length argument. Handle
13035 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13036 the qSupported response.
13037 (main): Update call to handle_query.
13039 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13041 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13042 (putpkt_binary): Renamed from putpkt and adjusted for binary
13044 (putpkt): New wrapper for putpkt_binary.
13045 (readchar): Don't mask off the high bit.
13046 (decode_X_packet): New function.
13047 * server.c (main): Call putpkt_binary if a handler sets the packet
13048 length. Save the length of the incoming packet. Handle 'X'.
13049 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13051 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13053 * server.c (handle_query): Handle qSupported.
13055 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13057 * remote-utils.c (all_symbols_looked_up): New variable.
13058 (look_up_one_symbol): Check it.
13059 * server.h (look_up_one_symbol): New declaration.
13060 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13062 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13064 * Makefile.in (linux-arm-low.o): Update dependencies.
13065 * linux-arm-low.c: Include "gdb_proc_service.h".
13066 (PTRACE_GET_THREAD_AREA): Define.
13067 (ps_get_thread_area): New function.
13069 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13071 * configure.srv (m68k*-*-uclinux*): New target.
13072 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13073 (linux_resume_one_process): Remove extraneous cast.
13074 (linux_read_offsets): New.
13075 (linux_target_op): Add linux_read_offsets on mmuless systems.
13076 * server.c (handle_query): Add qOffsets logic.
13077 * target.h (struct target_ops): Add read_offsets.
13079 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13081 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13082 (PTRACE_GET_THREAD_AREA): Define.
13083 (ps_get_thread_area): New function.
13084 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13085 (linux-x86-64-low.o): Update.
13087 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13089 * configure.ac: Remove checks for prfpregset_t.
13090 * gdb_proc_service.h: New file.
13091 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13092 new "gdb_proc_service.h".
13093 * proc-service.c: Likewise.
13094 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13095 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13096 * Makefile.in (gdb_proc_service_h): Updated.
13097 * configure, config.in: Regenerated.
13099 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13101 * remote-utils.c (prepare_resume_reply): Move declaration
13102 of gdb_id_from_wait to the top of the block.
13104 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13106 * linux-low.c (regsets_store_inferior_registers): Read the regset
13107 from the target before filling it.
13109 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13111 * server.c (attach_inferior): Return SIGTRAP for a successful
13114 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13116 * Makefile.in (OBS): Add version.o.
13117 (STAGESTUFF): Delete.
13118 (version.o): Add dependencies.
13119 (version.c): Replace rule.
13120 (clean): Remove version.c.
13121 * server.c (gdbserver_version): New.
13122 (gdbserver_usage): Use printf.
13123 (main): Handle --version and --help.
13124 * server.h (version, host_name): Add declarations.
13126 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13138 * linux-x86-64-low.c:
13140 * linux-s390-low.c:
13141 * linux-ppc64-low.c:
13143 * linux-mips-low.c:
13144 * linux-m68k-low.c:
13145 * linux-m32r-low.c:
13148 * linux-ia64-low.c:
13149 * linux-i386-low.c:
13150 * linux-crisv32-low.c:
13162 * gdbserver.1: Add (C) after Copyright. Update the FSF
13165 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13167 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13168 (arm_breakpoint_at): Recognize both breakpoints.
13169 (the_low_target): Use the correct breakpoint instruction.
13171 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13173 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13174 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13175 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13176 (the_low_target): Update.
13178 2005-10-25 Andreas Schwab <schwab@suse.de>
13180 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13182 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13183 (ia64_num_regs): Reduce to 462.
13185 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13187 * acinclude.m4: Correct quoting.
13188 * aclocal.m4: Regenerated.
13190 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13191 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13192 (thread_db_init): Call thread_db_err_str.
13193 * configure.ac: Check for TD_VERSION.
13194 * config.in, configure: Regenerated.
13196 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13198 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13200 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13202 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13203 is not available. Define HAVE_PTRACE_GETREGS if it is.
13204 * config.in, configure: Regenerated.
13205 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13206 * linux-i386-low.c, linux-m68k-low.c: Update to use
13207 HAVE_PTRACE_GETREGS.
13208 * linux-low.c (regsets_fetch_inferior_registers)
13209 (regsets_store_inferior_registers): Only return 0 if we processed
13211 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13212 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13214 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13216 * inferiors.c (struct thread_info): Add gdb_id.
13217 (add_thread): Add gdb_id argument.
13218 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13219 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13220 calls to add_thread.
13221 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13222 * server.c (handle_query): Use thread_to_gdb_id.
13223 (handle_v_cont, main): Use gdb_id_to_thread_id.
13224 * server.h (add_thread): Update prototype.
13225 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13228 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13230 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13231 left-padded registers.
13232 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13233 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13235 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13237 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13238 * configure: Regenerate.
13239 * config.in: Regenerate.
13240 * server.h (NEED_DECLARATION_STRERROR):
13241 Replace with !HAVE_DECL_STRERROR.
13243 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13245 * linux-low.c (linux_wait, linux_send_signal): Don't test
13246 an unsigned long variable for > 0 if it could be MAX_ULONG.
13247 * server.c (myresume): Likewise.
13248 * target.c (set_desired_inferior): Likewise.
13250 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13252 * configure.ac: Simplify and improve check for socklen_t.
13253 * configure, config.in: Regenerate.
13255 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13257 * acconfig.h: Remove.
13258 * configure.ac: Add a test for socklen_t. Use three-argument
13259 AC_DEFINE throughout.
13260 * config.in: Regenerated using autoheader 2.59.
13261 * configure: Regenerated.
13263 * gdbreplay.c (socklen_t): Provide a default.
13264 (remote_open): Use socklen_t.
13265 * remote-utils.c (socklen_t): Provide a default.
13266 (remote_open): Use socklen_t.
13267 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13270 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13272 * linux-low.c (linux_read_memory, linux_write_memory)
13273 (linux_read_auxv): Likewise.
13274 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13275 (check_mem_write): Likewise.
13276 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13278 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13279 (registers_from_string, register_data): Likewise.
13280 * server.c (handle_query, main): Likewise.
13281 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13282 (decode_M_packet): Likewise.
13283 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13284 * target.h (struct target_ops): Update read_memory, write_memory,
13286 (read_inferior_memory, write_inferior_memory): Update.
13287 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13288 to unsigned char *.
13289 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13290 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13291 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13292 linux-s390-low.c, linux-sh-low.c: Update for changes in
13293 read_inferior_memory and the_low_target->breakpoint.
13295 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13297 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13298 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13299 * configure.srv: Add powerpc64-*-linux*.
13300 * linux-ppc64-low.c: New file.
13302 2005-05-23 Orjan Friberg <orjanf@axis.com>
13304 * linux-cris-low.c: New file with support for CRIS.
13305 * linux-crisv32-low.c: Ditto for CRISv32.
13306 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13307 (clean): Add reg-cris.c and reg-crisv32.c.
13308 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13309 reg-crisv32.o, and reg-crisv32.c to make rules.
13310 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13311 recognized targets.
13313 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13315 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13316 of sizeof (PTRACE_XFER_TYPE).
13317 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13319 2005-05-12 Orjan Friberg <orjanf@axis.com>
13321 * target.h (struct target_ops): Add insert_watchpoint,
13322 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13323 pointers for hardware watchpoint support.
13324 * linux-low.h (struct linux_target_ops): Ditto.
13325 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13326 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13327 to linux_target_ops.
13328 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13330 * server.c (main): Recognize 'Z' and 'z' packets.
13332 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13334 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13335 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13336 (the_low_target): Add new members.
13338 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13340 * proc-service.c (ps_lgetregs): Search all_processes instead of
13343 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13345 * server.c (start_inferior): Change return type to int.
13346 (attach_inferior): Change sigptr to int *.
13347 (handle_v_cont, handle_v_requests): Change signal to int *.
13348 (main): Change signal to int.
13350 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13352 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13353 * configure.srv: Add m32r*-*-linux*.
13354 * linux-m32r-low.c: New file.
13356 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13358 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13360 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13362 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13363 Take unsigned long arguments for PIDs.
13364 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13365 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13366 (wait_for_sigstop, linux_resume_one_process)
13367 (regsets_fetch_inferior_registers, linux_send_signal)
13368 (linux_read_auxv): Likewise. Update the types of variables holding
13369 PIDs. Update format string specifiers.
13370 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13371 * remote-utils.c (prepare_resume_reply): Likewise.
13372 * server.c (cont_thread, general_thread, step_thread)
13373 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13375 (handle_query): Update format specifiers.
13376 (handle_v_cont, main): Use strtoul for thread IDs.
13377 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13378 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13379 (general_thread, step_thread, thread_from_wait)
13380 (old_thread_from_wait): Update.
13381 * target.h (struct thread_resume): Use unsigned long for THREAD.
13382 (struct target_ops): Use unsigned long for arguments to attach and
13385 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13387 * acinclude.m4: Include bfd/bfd.m4 directly.
13388 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13389 <agriffis@toolchain.org>.
13390 * aclocal.m4, configure: Regenerated.
13392 2005-01-07 Andrew Cagney <cagney@gnu.org>
13394 * configure.ac: Rename configure.in, require autoconf 2.59.
13395 * configure: Re-generate.
13397 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13399 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13400 LIBS when finished.
13401 * aclocal.m4: Regenerated.
13402 * configure: Regenerated.
13404 2004-11-21 Andreas Schwab <schwab@suse.de>
13406 * linux-m68k-low.c (m68k_num_gregs): Define.
13407 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13408 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13409 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13410 (m68k_breakpoint_at): New. Add to the_low_target.
13412 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13413 srv_linux_thread_db to yes.
13415 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13417 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13418 (ARCH_SET_FS): Likewise.
13419 (ARCH_GET_FS): Likewise.
13420 (ARCH_GET_GS): Likewise.
13422 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13424 * linux-i386-low.c (ps_get_thread_area): New.
13425 * linux-x86-64-low.c (ps_get_thread_area): New.
13426 * linux-low.c: Include <sys/syscall.h>.
13427 (linux_kill_one_process): Don't kill the first thread here.
13428 (linux_kill): Kill the first thread here.
13429 (kill_lwp): New function.
13430 (send_sigstop, linux_send_signal): Use it.
13431 * proc-service.c: Clean up #ifdefs.
13432 (fpregset_info): Delete.
13433 (ps_lgetregs): Update and enable implementation.
13434 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13436 * remote-utils.c (struct sym_cache, symbol_cache): New.
13437 (input_interrupt): Print a clearer message.
13438 (async_io_enabled): New variable.
13439 (enable_async_io, disable_async_io): Use it. Update comments.
13440 (look_up_one_symbol): Use the symbol cache.
13441 * thread-db.c (thread_db_look_up_symbols): New function.
13442 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13444 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13446 * configure.in: Test for -rdynamic.
13447 * configure: Regenerated.
13448 * Makefile (INTERNAL_LDFLAGS): New.
13449 (gdbserver, gdbreplay): Use it.
13451 2004-09-02 Andrew Cagney <cagney@gnu.org>
13453 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13455 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13457 * linux-low.c (linux_wait): Clear all_processes list also.
13459 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13461 * linux-low.c: Include <errno.h>. Remove extern declaration of
13464 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13466 * gdbreplay.c, server.h, utils.c: Update copyright years.
13468 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13470 * server.c (main): Print child status or termination signal from
13471 variable 'signal', not 'sig'.
13473 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13475 * linux-low.c (linux_read_memory): Change return type to
13476 int. Check for and return error from ptrace().
13477 * target.c (read_inferior_memory): Change return type to int. Pass
13478 back return status from the_target->read_memory().
13479 * target.h (struct target_ops): Adapt *read_memory() prototype.
13481 (read_inferior_memory): Adapt prototype.
13482 * server.c (main): Return an error packet if
13483 read_inferior_memory() returns an error.
13485 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13487 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13488 Unify with other clean targets.
13490 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13492 * server.c (handle_v_cont): Call set_desired_inferior.
13494 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13496 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13498 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13500 * linux-low.c (linux_wait): Unblock async I/O.
13501 (linux_resume): Block and enable async I/O.
13502 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13503 * server.h (block_async_io, unblock_async_io): Add prototypes.
13505 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13507 * remote-utils.c (remote_open): Print a status notice after
13508 opening a TCP port.
13509 * server.c (attach_inferior): Print a status notice after
13512 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13514 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13516 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13518 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13520 * server.c, target.h: Update copyright years.
13522 2004-02-25 Roland McGrath <roland@redhat.com>
13524 * target.h (struct target_ops): New member `read_auxv'.
13525 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13526 * linux-low.c (linux_read_auxv): New function.
13527 (linux_target_ops): Initialize `read_auxv' member to that.
13529 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13531 Committed by Jim Blandy <jimb@redhat.com>.
13533 * linux-s390-low.c (s390_num_regs): Update.
13534 (s390_regmap): Remove control registers. Use __s390x__ predefine
13535 instead of GPR_SIZE to distiguish s390 and s390x targets.
13537 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13539 * linux-low.c: Update copyright year.
13540 (check_removed_breakpoint): Clear pending_is_breakpoint.
13541 (linux_set_resume_request, linux_queue_one_thread)
13542 (resume_status_pending_p): New functions.
13543 (linux_continue_one_thread): Use process->resume.
13544 (linux_resume): Only resume threads if there are no pending events.
13545 * linux-low.h (struct process_info): Add resume request
13548 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13550 * regcache.c (new_register_cache): Clear the allocated register
13551 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13553 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13555 * linux-low.c (linux_resume): Take a struct thread_resume *
13557 (linux_wait): Update call.
13558 (resume_ptr): New static variable.
13559 (linux_continue_one_thread): Renamed from
13560 linux_continue_one_process. Use resume_ptr.
13561 (linux_resume): Use linux_continue_one_thread.
13562 * server.c (handle_v_cont, handle_v_requests): New functions.
13563 (myresume): New function.
13564 (main): Handle 'v' case.
13565 * target.h (struct thread_resume): New type.
13566 (struct target_ops): Change argument of "resume" to struct
13568 (myresume): Delete macro.
13570 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13572 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13573 (uninstall): Support DESTDIR.
13575 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13577 * configure.srv: Add xscale*linux copy of arm*linux entry.
13579 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13581 * linux-arm-low.c (arm_reinsert_addr): New function.
13582 (the_low_target): Add arm_reinsert_addr.
13584 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13586 * mem-break.c: Remove whitespace at end of file.
13588 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13590 * configure.in: Check whether we need to prototype strerror.
13591 * server.h: Optionally prototype strerror.
13592 * gdbreplay.c (perror_with_name): Use strerror.
13593 * linux-low.c (linux_attach_lwp): Use strerror.
13594 * utils.c (perror_with_name): Use strerror.
13595 * config.in, configure: Regenerated.
13597 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13599 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13600 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13602 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13604 * Makefile.in (SFILES): Update.
13605 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13606 low-sun3.c: Remove files.
13608 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13610 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13611 (linux_detach_one_process, linux_detach): New functions.
13612 (linux_target_ops): Add linux_detach.
13613 * server.c (main): Handle 'D' packet.
13614 * target.h (struct target_ops): Add "detach" member.
13615 (detach_inferior): Define.
13617 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13619 From Kelley Cook <kelleycook@wideopenwest.com>:
13620 * configure.srv: Accept i[34567]86 variants.
13622 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13624 * linux-low.c (linux_wait_for_event): Correct comment typos.
13625 (linux_resume_one_process): Call check_removed_breakpoint.
13626 (linux_send_signal): New function.
13627 (linux_target_ops): Add linux_send_signal.
13628 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13630 * target.h (struct target_ops): Add send_signal.
13632 2003-05-29 Jim Blandy <jimb@redhat.com>
13634 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13635 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13636 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13637 away part of the register's value.
13639 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13641 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13642 (linux_wait_for_event, linux_init_signals): Likewise.
13644 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13646 * configure.in: Check for stdlib.h.
13647 * configure: Regenerated.
13648 * config.in: Regenerated.
13650 2003-01-04 Andreas Schwab <schwab@suse.de>
13652 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13654 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13656 * Makefile.in: Remove obsolete code.
13658 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13660 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13661 defined(PT_FPR0_HI).
13663 2002-11-17 Stuart Hughes <seh@zee2.com>
13665 * linux-arm-low.c (arm_num_regs): Increase.
13666 (arm_regmap): Include status register.
13668 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13670 * linux-low.c (register_addr): Remove incorrect -1 check.
13672 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13674 * linux-low.c (linux_create_inferior): Call setpgid. Return
13676 (unstopped_p, linux_signal_pid): Remove.
13677 (linux_target_ops): Remove linux_signal_pid.
13678 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13679 global instead of target method.
13680 * target.h (struct target_ops): Remove signal_pid. Update comment
13681 for create_inferior.
13682 * server.c (signal_pid): New variable.
13683 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13684 gdbserver. Set the child to be the foreground process group.
13685 (attach_inferior): Set signal_pid.
13687 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13689 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13691 2002-08-20 Jim Blandy <jimb@redhat.com>
13693 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13696 2002-08-01 Andrew Cagney <cagney@redhat.com>
13698 * Makefile.in: Make chill references obsolete.
13700 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13702 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13703 * configure: Regenerate.
13704 * config.in: Regenerate.
13706 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13708 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13709 (perror_with_name, remote_close, remote_open, expect, play): Static.
13711 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13713 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13714 byte offsets instead of an array of indexes.
13715 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13717 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13719 * regcache.c: Add comment.
13721 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13723 * thread-db.c: New file.
13724 * proc-service.c: New file.
13725 * acinclude.m4: New file.
13726 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13727 proc-service.o, and thread-db.o.
13728 (linux-low.o): Add USE_THREAD_DB.
13729 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13730 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13731 * aclocal.m4: Regenerated.
13732 * config.in: Regenerated.
13733 * configure: Regenerated.
13734 * configure.in: Check for proc_service.h, sys/procfs.h,
13735 thread_db.h, and linux/elf.h headrs.
13736 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13737 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13738 Check for -lthread_db and thread support.
13739 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13740 PowerPC, and SuperH.
13741 * i387-fp.c: Constify arguments.
13742 * i387-fp.h: Likewise.
13743 * inferiors.c: (struct thread_info): Renamed from
13744 `struct inferior_info'. Remove PID member. Use generic inferior
13745 list header. All uses updated.
13746 (inferiors, signal_pid): Removed.
13747 (all_threads): New variable.
13748 (get_thread): Define.
13749 (add_inferior_to_list): New function.
13750 (for_each_inferior): New function.
13751 (change_inferior_id): New function.
13752 (add_inferior): Removed.
13753 (remove_inferior): New function.
13754 (add_thread): New function.
13755 (free_one_thread): New function.
13756 (remove_thread): New function.
13757 (clear_inferiors): Use for_each_inferior and free_one_thread.
13758 (find_inferior): New function.
13759 (find_inferior_id): New function.
13760 (inferior_target_data): Update argument type.
13761 (set_inferior_target_data): Likewise.
13762 (inferior_regcache_data): Likewise.
13763 (set_inferior_regcache_data): Likewise.
13764 * linux-low.c (linux_bp_reinsert): Remove.
13765 (all_processes, stopping_threads, using_thrads)
13766 (struct pending_signals, debug_threads, pid_of): New.
13767 (inferior_pid): Replace with macro.
13768 (struct inferior_linux_data): Remove.
13769 (get_stop_pc, add_process): New functions.
13770 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13771 Use add_process and add_thread.
13772 (linux_attach_lwp): New function, based on old linux_attach. Use
13773 add_process and add_thread. Set stop_expected for new threads.
13774 (linux_attach): New function.
13775 (linux_kill_one_process): New function.
13776 (linux_kill): Kill all LWPs.
13777 (linux_thread_alive): Use find_inferior_id.
13778 (check_removed_breakpoints, status_pending_p): New functions.
13779 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13780 Update. Use WNOHANG. Wait for cloned processes also. Update process
13781 struct for the found process.
13782 (linux_wait_for_event): New function.
13783 (linux_wait): Use it. Support LWPs.
13784 (send_sigstop, wait_for_sigstop, stop_all_processes)
13785 (linux_resume_one_process, linux_continue_one_process): New functions.
13786 (linux_resume): Support LWPs.
13787 (REGISTER_RAW_SIZE): Remove.
13788 (fetch_register): Use register_size instead. Call supply_register.
13789 (usr_store_inferior_registers): Likewise. Call collect_register.
13790 Fix recursive case.
13791 (regsets_fetch_inferior_registers): Improve error message.
13792 (regsets_store_inferior_registers): Add debugging.
13793 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13794 (unstopped_p, linux_signal_pid): New functions.
13795 (linux_target_ops): Add linux_signal_pid.
13796 (linux_init_signals): New function.
13797 (initialize_low): Call it. Initialize using_threads.
13798 * regcache.c (inferior_regcache_data): Add valid
13800 (get_regcache): Fetch registers lazily. Add fetch argument
13801 and update all callers.
13802 (regcache_invalidate_one, regcache_invalidate): New
13804 (new_register_cache): Renamed from create_register_cache.
13805 Return the new regcache.
13806 (free_register_cache): Change argument to a void *.
13807 (registers_to_string, registers_from_string): Call get_regcache
13808 with fetch flag set.
13809 (register_data): Make static. Pass fetch flag to get_regcache.
13810 (supply_register): Call get_regcache with fetch flag clear.
13811 (collect_register): Call get_regcache with fetch flag set.
13812 (collect_register_as_string): New function.
13813 * regcache.h: Update.
13814 * remote-utils.c (putpkt): Flush after debug output and use
13816 Handle input interrupts while waiting for an ACK.
13817 (input_interrupt): Use signal_pid method.
13818 (getpkt): Flush after debug output and use stderr.
13819 (outreg): Use collect_register_as_string.
13820 (new_thread_notify, dead_thread_notify): New functions.
13821 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13822 and general_thread.
13823 (look_up_one_symbol): Flush after debug output.
13824 * server.c (step_thread, server_waiting): New variables.
13825 (start_inferior): Don't use signal_pid. Update call to mywait.
13826 (attach_inferior): Update call to mywait.
13827 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13828 (main): Don't fetch/store registers explicitly. Use
13829 set_desired_inferior. Support proposed ``Hs'' packet. Update
13831 * server.h: Update.
13832 (struct inferior_list, struct_inferior_list_entry): New.
13833 * target.c (set_desired_inferior): New.
13834 (write_inferior_memory): Constify.
13835 (mywait): New function.
13836 * target.h: Update.
13837 (struct target_ops): New signal_pid method.
13838 (mywait): Removed macro, added prototype.
13840 * linux-low.h (regset_func): Removed.
13841 (regset_fill_func, regset_store_func): New.
13842 (enum regset_type): New.
13843 (struct regset_info): Add type field. Use new operation types.
13844 (struct linux_target_ops): stop_pc renamed to get_pc.
13845 Add decr_pc_after_break and breakpoint_at.
13846 (get_process, get_thread_proess, get_process_thread)
13847 (strut process_info, all_processes, linux_attach_lwp)
13848 (thread_db_init): New.
13850 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13851 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13852 (the_low_target): Add new members.
13853 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13854 (i386_store_fpxregset): Constify.
13855 (target_regsets): Add new kind identifier.
13856 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13857 (i386_set_pc): Add debugging.
13858 (i386_breakpoint_at): New function.
13859 (the_low_target): Add new members.
13860 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13861 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13862 (mips_breakpoint_at): New.
13863 (the_low_target): Add new members.
13864 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13865 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13866 (the_low_target): Add new members.
13867 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13868 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13869 (the_low_target): Add new members.
13870 * linux-x86-64-low.c (target_regsets): Add new kind
13873 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13875 From Martin Pool <mbp@samba.org>:
13876 * server.c (gdbserver_usage): New function.
13879 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13881 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13882 stop_at -> stop_pc.
13884 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13886 * Makefile.in: Remove obsolete code.
13888 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13890 * linux-low.c (regsets_fetch_inferior_registers),
13891 (regsets_store_inferior_registers): Removed cast to int from
13893 * regcache.h: Added declaration of struct inferior_info.
13895 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13897 * inferiors.c (struct inferior_info): Add regcache_data.
13898 (add_inferior): Call create_register_cache.
13899 (clear_inferiors): Call free_register_cache.
13900 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13901 * regcache.c (struct inferior_regcache_data): New.
13902 (registers): Remove.
13903 (get_regcache): New function.
13904 (create_register_cache, free_register_cache): New functions.
13905 (set_register_cache): Don't initialize the register cache here.
13906 (registers_to_string, registers_from_string, register_data): Call
13908 * regcache.h: Add prototypes.
13909 * server.h: Likewise.
13911 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13913 * mem-break.c: New file.
13914 * mem-break.h: New file.
13915 * Makefile.in: Add mem-break.o rule; update server.h
13917 * inferiors.c (struct inferior_info): Add target_data
13919 (clear_inferiors): Free target_data member if set.
13920 (inferior_target_data, set_inferior_target_data): New functions.
13921 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13922 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13923 * linux-low.c (linux_bp_reinsert): New variable.
13924 (struct inferior_linux_data): New.
13925 (linux_create_inferior): Use set_inferior_target_data.
13926 (linux_attach): Likewise. Call add_inferior.
13927 (linux_wait_for_one_inferior): New function.
13928 (linux_wait): Call it.
13929 (linux_write_memory): Add const.
13930 (initialize_low): Call set_breakpoint_data.
13931 * linux-low.h (struct linux_target_ops): Add breakpoint
13933 * server.c (attach_inferior): Remove extra add_inferior
13935 * server.h: Include mem-break.h. Update inferior.c
13937 * target.c (read_inferior_memory)
13938 (write_inferior_memory): New functions.
13939 * target.h (read_inferior_memory)
13940 (write_inferior_memory): Change macros to prototypes.
13941 (struct target_ops): Update comments. Add const to write_memory
13944 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13946 * linux-low.c (usr_store_inferior_registers): Support
13947 registers which are allowed to fail to store.
13948 * linux-low.h (linux_target_ops): Likewise.
13949 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13950 (ppc_cannot_store_register): FPSCR may not be storable.
13952 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13954 * server.h: Include <string.h> if HAVE_STRING_H.
13955 * ChangeLog: Correct paths in last ChangeLog entry.
13957 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13959 * linux-low.h: Remove obsolete prototypes.
13960 (struct linux_target_ops): New.
13961 (extern the_low_target): New.
13962 * linux-low.c (num_regs, regmap): Remove declarations.
13963 (register_addr): Use the_low_target explicitly.
13964 (fetch_register): Likewise.
13965 (usr_fetch_inferior_registers): Likewise.
13966 (usr_store_inferior_registers): Likewise.
13967 * linux-arm-low.c (num_regs): Remove.
13968 (arm_num_regs): Define.
13969 (arm_regmap): Renamed from regmap, made static.
13970 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13972 (arm_cannot_store_register): Renamed from cannot_store_register,
13974 (the_low_target): New.
13975 * linux-i386-low.c (num_regs): Remove.
13976 (i386_num_regs): Define.
13977 (i386_regmap): Renamed from regmap, made static.
13978 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13980 (i386_cannot_store_register): Renamed from cannot_store_register,
13982 (the_low_target): New.
13983 * linux-ia64-low.c (num_regs): Remove.
13984 (ia64_num_regs): Define.
13985 (ia64_regmap): Renamed from regmap, made static.
13986 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13988 (ia64_cannot_store_register): Renamed from cannot_store_register,
13990 (the_low_target): New.
13991 * linux-m68k-low.c (num_regs): Remove.
13992 (m68k_num_regs): Define.
13993 (m68k_regmap): Renamed from regmap, made static.
13994 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13996 (m68k_cannot_store_register): Renamed from cannot_store_register,
13998 (the_low_target): New.
13999 * linux-mips-low.c (num_regs): Remove.
14000 (mips_num_regs): Define.
14001 (mips_regmap): Renamed from regmap, made static.
14002 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14004 (mips_cannot_store_register): Renamed from cannot_store_register,
14006 (the_low_target): New.
14007 * linux-ppc-low.c (num_regs): Remove.
14008 (ppc_num_regs): Define.
14009 (ppc_regmap): Renamed from regmap, made static.
14010 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14012 (ppc_cannot_store_register): Renamed from cannot_store_register,
14014 (the_low_target): New.
14015 * linux-s390-low.c (num_regs): Remove.
14016 (s390_num_regs): Define.
14017 (s390_regmap): Renamed from regmap, made static.
14018 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14020 (s390_cannot_store_register): Renamed from cannot_store_register,
14022 (the_low_target): New.
14023 * linux-sh-low.c (num_regs): Remove.
14024 (sh_num_regs): Define.
14025 (sh_regmap): Renamed from regmap, made static.
14026 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14028 (sh_cannot_store_register): Renamed from cannot_store_register,
14030 (the_low_target): New.
14031 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14032 (the_low_target): New.
14034 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14036 * Makefile.in: Add stamp-h target.
14037 * configure.in: Create stamp-h.
14038 * configure: Regenerated.
14040 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14042 * inferiors.c: New file.
14043 * target.c: New file.
14044 * target.h: New file.
14045 * Makefile.in: Add target.o and inferiors.o. Update
14047 * linux-low.c (inferior_pid): New static variable,
14048 moved from server.c.
14049 (linux_create_inferior): Renamed from create_inferior.
14050 Call add_inferior. Return 0 on success instead of a PID.
14051 (linux_attach): Renamed from myattach.
14052 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14053 (linux_thread_alive): Renamed from mythread_alive.
14054 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14056 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14057 (regsets_store_inferior_registers): Correct error message.
14058 Add missing ``return 0''.
14059 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14060 (linux_store_registers): Renamed from store_inferior_registers.
14061 (linux_read_memory): Renamed from read_inferior_memory.
14062 (linux_write_memory): Renamed from write_inferior_memory.
14063 (linux_target_ops): New structure.
14064 (initialize_low): Call set_target_ops ().
14065 * remote-utils.c (unhexify): New function.
14066 (hexify): New function.
14067 (input_interrupt): Send signals to ``signal_pid''.
14068 * server.c (inferior_pid): Remove.
14069 (start_inferior): Update create_inferior call.
14070 (attach_inferior): Call add_inferior.
14071 (handle_query): New function.
14072 (main): Call handle_query for `q' packets.
14073 * server.h: Include "target.h". Remove obsolete prototypes.
14074 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14076 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14078 * Makefile.in: Add WARN_CFLAGS. Update configury
14080 * configure.in: Check for <string.h>
14081 * configure: Regenerate.
14082 * config.in: Regenerate.
14083 * gdbreplay.c: Include needed system headers.
14084 (remote_open): Remove strchr prototype.
14085 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14086 * regcache.c (supply_register): Change buf argument to const void *.
14087 (supply_register_by_name): Likewise.
14088 (collect_register): Change buf argument to void *.
14089 (collect_register_by_name): Likewise.
14090 * regcache.h: Add missing prototypes.
14091 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14092 * server.c (handle_query): New function.
14093 (attached): New static variable, moved out of main.
14094 (main): Quiet longjmp clobber warnings.
14095 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14096 * utils.c (error): Remove NORETURN.